private void closeAllSession ( ManageableRepository mr ) throws NoSuchWorkspaceException { for ( String wsName : mr . getWorkspaceNames ( ) ) { if ( ! mr . canRemoveWorkspace ( wsName ) ) { WorkspaceContainerFacade wc = mr . getWorkspaceContainer ( wsName ) ; SessionRegistry sessionRegistry = ( SessionRegistry ) wc . getComponent ( SessionRegistry . class ) ; sessionRegistry . closeSessions ( wsName ) ; } } }
Close all open session in repository