public EJSHome startBean ( BeanMetaData bmd ) throws ContainerException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; // d532639.2 if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "startBean: " + bmd . j2eeName ) ; J2EEName homeKey = bmd . j2eeName ; EJSHome ejsHome = null ; try { internalBeanMetaDataStore . put ( homeKey , bmd ) ; //end 89188 bmd . dump ( ) ; //---------------------- // Initialize home bean //---------------------- ejsHome = homeOfHomes . create ( bmd ) ; //------------------------------------------ // Complete initialization of the home bean //------------------------------------------ ejsHome . initialize ( this , new BeanId ( homeOfHomes , homeKey , true ) , bmd ) ; homeOfHomes . setActivationStrategy ( ejsHome , bmd ) ; ejsHome . completeInitialization ( ) ; // PK20648 if ( bmd . persister != null ) { bmd . persister . setHome ( ejsHome ) ; } } catch ( Throwable ex ) { FFDCFilter . processException ( ex , CLASS_NAME + ".startBean" , "1126" , this ) ; if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Caught exception" , ex ) ; if ( ejsHome != null ) { try { ejsHome . destroy ( ) ; } catch ( Throwable t ) { FFDCFilter . processException ( t , CLASS_NAME + ".startBean" , "1831" , this ) ; if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Caught exception destroying home" , t ) ; } } String msgTxt = "Failed to start " + homeKey ; throw new ContainerException ( msgTxt , ex ) ; } // d664917.1 - Set the homeInternal field to indicate that this bean is // fully started. ejsHome . homeRecord . homeInternal = ejsHome ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "startBean" ) ; return ejsHome ; }
Registers the bean with the container and creates enables and returns the home instance .