Commit 05de80b2 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

1) Regression test fix.

2) Optimization - removed bottleneck in cluster - removed counter of sessions from cache. Calculated now on demand.
3) Fixed counter of authenticated session to not decrement when non-authenticated session is removed. JM-1095

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@8663 b35dd754-fafc-0310-a699-88a17e54d16e
parent 3d8eb1b4
......@@ -33,7 +33,7 @@ public class GetNumberUserSessions extends AdHocCommand {
field.setLabel(getLabel());
field.setVariable("onlineuserssessionsnum");
SessionManager sessionManager = SessionManager.getInstance();
field.addValue(sessionManager.getUserSessionsCount());
field.addValue(sessionManager.getUserSessionsCount(false));
command.add(form.getElement());
}
......
......@@ -2,7 +2,7 @@
* $Revision$
* $Date$
*
* Copyright (C) 1999-2005 Jive Software. All rights reserved.
* Copyright (C) 1999-2007 Jive Software. All rights reserved.
* This software is the proprietary information of Jive Software. Use is subject to license terms.
*/
package org.jivesoftware.util.cache;
......@@ -68,7 +68,6 @@ public class DefaultLocalCacheStrategy implements CacheFactoryStrategy {
cacheNames.put("Routing Users Cache", "routeUser");
cacheNames.put("Routing AnonymousUsers Cache", "routeAnonymousUser");
cacheNames.put("Routing User Sessions", "routeUserSessions");
cacheNames.put("Session Manager Counters", "sessManagerCounters");
cacheNames.put("Components Sessions", "componentsSessions");
cacheNames.put("Connection Managers Sessions", "connManagerSessions");
cacheNames.put("Incoming Server Sessions", "incServerSessions");
......@@ -117,8 +116,6 @@ public class DefaultLocalCacheStrategy implements CacheFactoryStrategy {
cacheProps.put("cache.routeAnonymousUser.expirationTime", -1l);
cacheProps.put("cache.routeUserSessions.size", -1l);
cacheProps.put("cache.routeUserSessions.expirationTime", -1l);
cacheProps.put("cache.sessManagerCounters.size", -1l);
cacheProps.put("cache.sessManagerCounters.expirationTime", -1l);
cacheProps.put("cache.componentsSessions.size", -1l);
cacheProps.put("cache.componentsSessions.expirationTime", -1l);
cacheProps.put("cache.connManagerSessions.size", -1l);
......
......@@ -15,12 +15,12 @@ import org.apache.mina.common.ExecutorThreadModel;
import org.apache.mina.management.MINAStatCollector;
import org.apache.mina.transport.socket.nio.SocketAcceptor;
import org.jivesoftware.database.DbConnectionManager;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.Log;
import org.jivesoftware.util.TaskEngine;
import org.jivesoftware.openfire.SessionManager;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.spi.ConnectionManagerImpl;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.Log;
import org.jivesoftware.util.TaskEngine;
import java.io.BufferedWriter;
import java.io.File;
......@@ -81,7 +81,7 @@ public class StatCollector extends TimerTask {
sb.append(executor.getCompletedTaskCount());
// Add info about number of connected sessions
sb.append(',');
sb.append(SessionManager.getInstance().getConnectionsCount());
sb.append(SessionManager.getInstance().getConnectionsCount(false));
// Add info about MINA statistics
sb.append(',');
sb.append(statCollector.getMsgRead());
......
......@@ -57,7 +57,7 @@
SessionManager sessionManager = webManager.getSessionManager();
// Get the session count
int sessionCount = sessionManager.getUserSessionsCount();
int sessionCount = sessionManager.getUserSessionsCount(false);
// Close a connection if requested
if (close) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment