@ Override public void serverStopping ( ) { BundleContext bundleContext = componentContext . getBundleContext ( ) ; Collection < ServiceReference < EndpointActivationService > > refs ; try { refs = bundleContext . getServiceReferences ( EndpointActivationService . class , null ) ; } catch ( InvalidSyntaxException x ) { FFDCFilter . processException ( x , getClass ( ) . getName ( ) , "61" , this ) ; throw new RuntimeException ( x ) ; } for ( ServiceReference < EndpointActivationService > ref : refs ) { EndpointActivationService eas = bundleContext . getService ( ref ) ; try { for ( ActivationParams a ; null != ( a = eas . endpointActivationParams . poll ( ) ) ; ) try { eas . endpointDeactivation ( ( ActivationSpec ) a . activationSpec , a . messageEndpointFactory ) ; } catch ( Throwable x ) { FFDCFilter . processException ( x , getClass ( ) . getName ( ) , "71" , this ) ; } } finally { bundleContext . ungetService ( ref ) ; } } }
Invoked when server is quiescing . Deactivate all endpoints .