protected void logSessionCounts ( final HttpSession sess , final boolean start ) { StringBuffer sb ; String appname = getAppName ( sess ) ; Counts ct = getCounts ( appname ) ; if ( start ) { sb = new StringBuffer ( "SESSION-START:" ) ; } else { sb = new StringBuffer ( "SESSION-END:" ) ; } sb . append ( getSessionId ( sess ) ) ; sb . append ( ":" ) ; sb . append ( appname ) ; sb . append ( ":" ) ; sb . append ( ct . activeSessions ) ; sb . append ( ":" ) ; sb . append ( ct . totalSessions ) ; sb . append ( ":" ) ; sb . append ( Runtime . getRuntime ( ) . freeMemory ( ) / ( 1024 * 1024 ) ) ; sb . append ( "M:" ) ; sb . append ( Runtime . getRuntime ( ) . totalMemory ( ) / ( 1024 * 1024 ) ) ; sb . append ( "M" ) ; info ( sb . toString ( ) ) ; }
Log the session counters for applications that maintain them .