protected EJSHome initializeDeferredEJBImpl ( HomeRecord hr ) throws ContainerException , EJBConfigurationException { BeanMetaData bmd = hr . getBeanMetaData ( ) ; Object originalLoader = ThreadContextAccessor . UNCHANGED ; try { if ( ! bmd . fullyInitialized ) // d664917.1 { // The server class loader must be used during metadata processing // for XML parsing classes. d200714, PM57099 originalLoader = svThreadContextAccessor . pushContextClassLoader ( getServerClassLoader ( ) ) ; // d278756, d334557, PK83186, d640395.1 //------------------------------------------------------------------------ // WARNING: We MUST reload WCCM object pointers here in case the module was // unloaded. The WAS runtime code has an alarm thread which unloads // the module after a fixed time. In the case of deferred EJB init // processing it is up to us to "touch" the DeployedModule which will // cause WCCM to completely reload a new set of WCCM objects for us. //------------------------------------------------------------------------ bmd . wccm . reload ( ) ; // F743-18775 finishBMDInit ( bmd ) ; //497153 } //d200714 start // We must ensure that the application classloader is in force prior to starting // the home. originalLoader = svThreadContextAccessor . repushContextClassLoader ( originalLoader , hr . getClassLoader ( ) ) ; //d200714 end return fireMetaDataCreatedAndStartBean ( bmd ) ; // d648522, d739043 } finally { svThreadContextAccessor . popContextClassLoader ( originalLoader ) ; // d659020 - If an error occurs while initializing, then the wccm // field will not be cleared, so we need to unload its references. // The next attempt to initialize the bean will reload them again. if ( bmd . wccm != null ) { bmd . wccm . unload ( ) ; } } }
Actually initializes the deferred EJB . Assumes that a runtime thread context has already been established .