public EJSWrapperCommon activateBean ( BeanId beanId , ContainerTx currentTx ) throws CSIException , RemoteException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; // d532639.2 if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "activateBean (" + beanId + ")" , currentTx ) ; homeEnabled ( ) ; EJSWrapperCommon result = null ; try { // For Single-object finder methods (other than findByPrimaryKey), // the Persistence Manager is required to perform a flush of the // Entity beans prior to the query. If this flush was not // performed, then throw an exception indicating the tx is in an // illegal state. if ( currentTx . ivFlushRequired ) { IllegalStateException isex = new IllegalStateException ( "Persistence Manager failed to perform synchronization " + "of Entity beans prior to find<METHOD>" ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "activateBean" , isex ) ; throw isex ; } // Look to see if this beanId is already cached with its serialized // byte array to improve performance. This also causes the beanId // in the wrapper to == the one in the BeanO. beanId = wrapperManager . beanIdCache . find ( beanId ) ; container . activator . activateBean ( EJSContainer . getThreadData ( ) , currentTx , beanId ) ; // d630940 result = wrapperManager . getWrapper ( beanId ) ; // d156807.1 } catch ( NoSuchObjectException ex ) { FFDCFilter . processException ( ex , CLASS_NAME + ".activateBean" , "998" , this ) ; if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "activateBean : NoSuchObjectException" , ex ) ; // Something very odd has happened. The collection does not care // that the object doesn't exist, nor should it have to deal with // it, so just create a wrapper instead of activating..... result = getWrapper ( beanId ) ; } if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "activateBean" , result ) ; return result ; }
d146034 . 6