public void addInstance ( Object instance ) throws Exception { if ( isDestroyed ( ) ) { throw new IllegalStateException ( "System already stopped" ) ; } else { startInstance ( instance ) ; if ( methodsMap . get ( instance . getClass ( ) ) . hasFor ( PreDestroy . class ) ) { managedInstances . add ( instance ) ; } } }
Add an additional managed instance