protected synchronized void releaseResources ( ) { // Set the local flag indicating global resource release is occuring _releasingAll = true ; // // Iterate through the list of acquired ResourceContexts and release them // while ( ! _resourceContexts . empty ( ) ) { ResourceContext resourceContext = _resourceContexts . pop ( ) ; resourceContext . release ( ) ; } // Clear the local flag indicating global resource release is occuring _releasingAll = false ; }
Releases all ResourceContexts associated with the current ControlContainerContext . This method is called by the associated container whenever all managed ResourceContexts that have acquired resources should release them .