@ Programmatic public void logoutAllSessions ( final Timestamp logoutTimestamp ) { final PersistenceManager pm = isisJdoSupport . getJdoPersistenceManager ( ) ; final Properties properties = pm . getPersistenceManagerFactory ( ) . getProperties ( ) ; if ( isTrue ( properties . get ( DN_BULK_UPDATES_KEY ) ) ) { final javax . jdo . Query jdoQuery = pm . newNamedQuery ( SessionLogEntry . class , "logoutAllActiveSessions" ) ; final Map argumentsByParameterName = ImmutableMap . of ( "logoutTimestamp" , logoutTimestamp , "causedBy2" , SessionLogEntry . CausedBy2 . RESTART ) ; try { final Long numRows = ( Long ) jdoQuery . executeWithMap ( argumentsByParameterName ) ; } finally { jdoQuery . closeAll ( ) ; } } else { final List < SessionLogEntry > activeEntries = repositoryService . allMatches ( new QueryDefault <> ( SessionLogEntry . class , "listAllActiveSessions" ) ) ; for ( SessionLogEntry activeEntry : activeEntries ) { activeEntry . setCausedBy2 ( SessionLogEntry . CausedBy2 . RESTART ) ; activeEntry . setLogoutTimestamp ( logoutTimestamp ) ; } } }
region > logoutAllSessions