protected void initializeNewEngineComponent ( JsEngineComponent engineComponent ) throws Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "initializeNewEngineComponent" , engineComponent ) ; } // Synchronize on stateChangeLock to manage the startup of the engine with // potential addition of new engine components via dynamic config. synchronized ( stateChangeLock ) { if ( _state != STATE_UNINITIALIZED && _state != STATE_DESTROYED ) { // Initialize engineComponent . initialize ( this ) ; // Set ME config engineComponent . setConfig ( this ) ; } if ( _state == STATE_STARTING || _state == STATE_STARTED ) { // Start engine component (in recovery mode if needed) int mode = JsConstants . ME_START_DEFAULT ; if ( _mainImpl . isServerInRecoveryMode ( ) == true ) { mode += JsConstants . ME_START_RECOVERY ; } engineComponent . start ( mode ) ; } } // synchronized (stateChangeLock) if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc , "initializeNewEngineComponent" ) ; } }
Move state of new component to current engine state