protected void disconnect ( ) { if ( localWrapperProxyState != null ) // F58064 { localWrapperProxyState . disconnect ( ) ; } if ( ivBusinessLocalWrapperProxyStates != null ) // F58064 { for ( WrapperProxyState state : ivBusinessLocalWrapperProxyStates ) { state . disconnect ( ) ; } } if ( ivRemoteObjectWrapper != null ) { // synchronized on the remote Wrapper to set the isRemoteRegistered flag synchronized ( ivRemoteObjectWrapper ) { if ( isRemoteRegistered ) { try { // @PQ98903A // On zOS even though we don't call the object // adapter to register the servant, we need // to call it to unregister it if the wrapper // is connected to the ORB (i.e. it has a Tie). if ( ( ! isZOS ) || ( ivRemoteObjectWrapper . intie != null ) ) // @PQ98903C { ivRemoteObjectWrapper . container . getEJBRuntime ( ) . unregisterServant ( ivRemoteObjectWrapper ) ; } isRemoteRegistered = false ; } catch ( Exception ex ) { FFDCFilter . processException ( ex , CLASS_NAME + ".unregisterServant" , "207" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Failed to unregister wrapper instance" , new Object [ ] { ivRemoteObjectWrapper , ex } ) ; } } } } } // d416391 start // Unregister any BusinessRemoteWrapper objects that are registered with ORB. if ( ivBusinessRemote != null ) // d416391 d424839 { int numWrappers = ivBusinessRemote . length ; for ( int i = 0 ; i < numWrappers ; ++ i ) { BusinessRemoteWrapper wrapper = ivBusinessRemote [ i ] ; synchronized ( wrapper ) { if ( ivBusinessRemoteRegistered [ i ] ) { try { // On zOS even though we don't call the object adapter to register // the servant, we need to call it to unregister it if the wrapper // is connected to the ORB (i.e. it has a Tie). if ( ( ! isZOS ) || ( wrapper . intie != null ) ) { wrapper . container . getEJBRuntime ( ) . unregisterServant ( wrapper ) ; } ivBusinessRemoteRegistered [ i ] = false ; } catch ( Throwable ex ) { FFDCFilter . processException ( ex , CLASS_NAME + ".unregisterServant" , "516" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Failed to unregister wrapper instance" , new Object [ ] { wrapper , ex } ) ; } } } } // end synchronized } // end for } // d416391 end }
Disconnect all wrappers . Unregisters the remote wrapper servant from ORB and disconnects local wrapper proxy states .