Commit 88ba2f0f authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Cache content is populated before cleaning up presences when leaving the cluster.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9230 b35dd754-fafc-0310-a699-88a17e54d16e
parent fbadb61f
......@@ -174,6 +174,11 @@
<attribute name="URI" value="/WEB-INF/lib/commons-httpclient.jar" />
<url>jar://$MODULE_DIR$/../lib/merge/commons-httpclient.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/commons-lang.jar" />
<url>jar://$MODULE_DIR$/../lib/merge/commons-lang.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/commons-logging.jar" />
......@@ -194,6 +199,16 @@
<attribute name="URI" value="/WEB-INF/lib/jaxen.jar" />
<url>jar://$MODULE_DIR$/../lib/merge/jaxen.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/jdom.jar" />
<url>jar://$MODULE_DIR$/../lib/merge/jdom.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/jetty-sslengine.jar" />
<url>jar://$MODULE_DIR$/../lib/merge/jetty-sslengine.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/jetty-util.jar" />
......@@ -234,16 +249,41 @@
<attribute name="URI" value="/WEB-INF/lib/mina-core-1.2.0.jar" />
<url>jar://$MODULE_DIR$/../lib/merge/mina-core-1.2.0.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/mina-core.jar" />
<url>jar://$MODULE_DIR$/../lib/merge/mina-core.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/mina-filter-compression-1.2.0.jar" />
<url>jar://$MODULE_DIR$/../lib/merge/mina-filter-compression-1.2.0.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/mina-filter-compression.jar" />
<url>jar://$MODULE_DIR$/../lib/merge/mina-filter-compression.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/mina-filter-ssl-1.2.0.jar" />
<url>jar://$MODULE_DIR$/../lib/merge/mina-filter-ssl-1.2.0.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/mina-filter-ssl.jar" />
<url>jar://$MODULE_DIR$/../lib/merge/mina-filter-ssl.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/rome-fetcher.jar" />
<url>jar://$MODULE_DIR$/../lib/merge/rome-fetcher.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/rome.jar" />
<url>jar://$MODULE_DIR$/../lib/merge/rome.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/shaj.jar" />
......
......@@ -7,22 +7,27 @@
<exclude-exploded />
<content url="file://$MODULE_DIR$/../../src/plugins">
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/broadcast/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/broadcast/src/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/componentTracker/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/contentFilter/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/debugger/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/dumper/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/gateway/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/gateway/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/loadStats/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/presence/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/registration/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/search/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/subscription/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/userCreation/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/userImportExport/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/userservice/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/plugins/xmldebugger/src/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/../../src/plugins/enterprise" />
<excludeFolder url="file://$MODULE_DIR$/../../src/plugins/fastpath" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="Openfire" />
<orderEntry type="module" module-name="Openfire" exported="" />
<orderEntry type="module-library">
<library>
<CLASSES>
......@@ -162,7 +167,16 @@
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/smack.jar!/" />
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/axis.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/commons-discovery.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
......@@ -171,7 +185,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/jakarta-regexp.jar!/" />
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/jaxrpc.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
......@@ -180,7 +194,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/openymsg.jar!/" />
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/xml-apis.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
......@@ -189,7 +203,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/jggapi.jar!/" />
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/wsdl4j.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
......@@ -198,7 +212,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/martyr.jar!/" />
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/saaj.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
......@@ -207,7 +221,16 @@
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/jainsipri.jar!/" />
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/xercesImpl.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/smack.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
......@@ -225,7 +248,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/concurrent.jar!/" />
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/openymsg_support.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
......@@ -234,7 +257,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/jsocks.jar!/" />
<root url="jar://$MODULE_DIR$/../../src/plugins/gateway/lib/openymsg_network.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
......
......@@ -2,7 +2,7 @@
<module version="4" relativePaths="true" type="J2EE_WEB_MODULE">
<component name="AppServerSpecificValidatorsManager" />
<component name="ModuleRootManager" />
<component name="NewModuleRootManager" inherit-compiler-output="true">
<component name="NewModuleRootManager" inherit-compiler-output="false">
<exclude-output />
<exclude-exploded />
<content url="file://$MODULE_DIR$/../../src/spank" />
......@@ -35,6 +35,11 @@
<attribute name="method" value="1" />
<attribute name="URI" value="/WEB-INF/classes" />
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/Clover_for_IDEA_2848.jar" />
<url>jar://$MODULE_DIR$/../../../../Documents and Settings/gato/.IntelliJIdea60/config/plugins/Clover_for_IDEA_2848.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/ant-contrib.jar" />
......@@ -55,6 +60,11 @@
<attribute name="URI" value="/WEB-INF/lib/ant.jar" />
<url>jar://$MODULE_DIR$/../lib/ant.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/cglib-nodep.jar" />
<url>jar://$MODULE_DIR$/../lib/cglib-nodep.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/commons-el.jar" />
......@@ -100,6 +110,16 @@
<attribute name="URI" value="&lt;N/A&gt;" />
<url>jar://$MODULE_DIR$/../lib/dist/servlet.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/hamcrest-api.jar" />
<url>jar://$MODULE_DIR$/../lib/hamcrest-api.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/hamcrest-library.jar" />
<url>jar://$MODULE_DIR$/../lib/hamcrest-library.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/i4jruntime.jar" />
......@@ -115,6 +135,16 @@
<attribute name="URI" value="/WEB-INF/lib/jasper-runtime.jar" />
<url>jar://$MODULE_DIR$/../lib/jasper-runtime.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/jmock-junit4.jar" />
<url>jar://$MODULE_DIR$/../lib/jmock-junit4.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/jmock.jar" />
<url>jar://$MODULE_DIR$/../lib/jmock.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/junit.jar" />
......@@ -235,6 +265,11 @@
<attribute name="URI" value="/WEB-INF/lib/xpp3.jar" />
<url>jar://$MODULE_DIR$/../lib/merge/xpp3.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/objenesis.jar" />
<url>jar://$MODULE_DIR$/../lib/objenesis.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="0" />
<attribute name="URI" value="/WEB-INF/lib/xmltask.jar" />
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -136,7 +136,7 @@ public class RemoteMUCRole implements MUCRole, Externalizable {
}
public void send(Packet packet) {
XMPPServer.getInstance().getPacketRouter().route(packet);
XMPPServer.getInstance().getRoutingTable().routePacket(userAddress, packet, false);
}
public void writeExternal(ObjectOutput out) throws IOException {
......
......@@ -123,12 +123,13 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable, Clust
}
public boolean addClientRoute(JID route, LocalClientSession destination) {
boolean added;
boolean available = destination.getPresence().isAvailable();
boolean added = localRoutingTable.addRoute(route.toString(), destination);
localRoutingTable.addRoute(route.toString(), destination);
if (destination.getAuthToken().isAnonymous()) {
anonymousUsersCache.put(route.toString(), new ClientRoute(server.getNodeID(), available));
added = anonymousUsersCache.put(route.toString(), new ClientRoute(server.getNodeID(), available)) == null;
// Add the session to the list of user sessions
if (route.getResource() != null && !available) {
if (route.getResource() != null && (!available || added)) {
Lock lock = LockManager.getLock(route.toBareJID());
try {
lock.lock();
......@@ -140,9 +141,9 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable, Clust
}
}
else {
usersCache.put(route.toString(), new ClientRoute(server.getNodeID(), available));
added = usersCache.put(route.toString(), new ClientRoute(server.getNodeID(), available)) == null;
// Add the session to the list of user sessions
if (route.getResource() != null && !available) {
if (route.getResource() != null && (!available || added)) {
Lock lock = LockManager.getLock(route.toBareJID());
try {
lock.lock();
......
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