Commit 8db02bc9 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[JM-1217] Important fix for multi-componnent mapping.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9772 b35dd754-fafc-0310-a699-88a17e54d16e
parent 5a16264b
...@@ -118,10 +118,10 @@ public class InternalComponentManager extends BasicModule implements ComponentMa ...@@ -118,10 +118,10 @@ public class InternalComponentManager extends BasicModule implements ComponentMa
else { else {
routable = new RoutableComponent(componentJID, component); routable = new RoutableComponent(componentJID, component);
routables.put(subdomain, routable); routables.put(subdomain, routable);
}
// Add the route to the new service provided by the component // Add the route to the new service provided by the component
XMPPServer.getInstance().getRoutingTable().addComponentRoute(componentJID, routable); XMPPServer.getInstance().getRoutingTable().addComponentRoute(componentJID, routable);
}
// Initialize the new component // Initialize the new component
try { try {
...@@ -174,7 +174,7 @@ public class InternalComponentManager extends BasicModule implements ComponentMa ...@@ -174,7 +174,7 @@ public class InternalComponentManager extends BasicModule implements ComponentMa
routable.removeComponent(component); routable.removeComponent(component);
if (routable.numberOfComponents() == 0) { if (routable.numberOfComponents() == 0) {
routables.remove(subdomain); routables.remove(subdomain);
}
// Remove any info stored with the component being removed // Remove any info stored with the component being removed
componentInfo.remove(subdomain); componentInfo.remove(subdomain);
...@@ -203,6 +203,10 @@ public class InternalComponentManager extends BasicModule implements ComponentMa ...@@ -203,6 +203,10 @@ public class InternalComponentManager extends BasicModule implements ComponentMa
} }
Log.debug("InternalComponentManager: Component unregistered for domain: " + subdomain); Log.debug("InternalComponentManager: Component unregistered for domain: " + subdomain);
} }
else {
Log.debug("InternalComponentManager: Other components still tied to domain: " + subdomain);
}
}
public void sendPacket(Component component, Packet packet) { public void sendPacket(Component component, Packet packet) {
if (packet != null && packet.getFrom() == null) { if (packet != null && packet.getFrom() == null) {
...@@ -552,7 +556,6 @@ public class InternalComponentManager extends BasicModule implements ComponentMa ...@@ -552,7 +556,6 @@ public class InternalComponentManager extends BasicModule implements ComponentMa
synchronized (components) { synchronized (components) {
component = components.get(0); component = components.get(0);
Collections.rotate(components, 1); Collections.rotate(components, 1);
Log.debug("Returning a component and rotated list of size "+components.size());
} }
return component; return component;
} }
......
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