Commit f8a7abfb authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Use valid RosterManager module instead of creating new one.TRANS-9

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@7511 b35dd754-fafc-0310-a699-88a17e54d16e
parent 3d519025
...@@ -64,8 +64,6 @@ public class RosterManager extends BasicModule implements GroupEventListener, Us ...@@ -64,8 +64,6 @@ public class RosterManager extends BasicModule implements GroupEventListener, Us
public RosterManager() { public RosterManager() {
super("Roster Manager"); super("Roster Manager");
// Add the new instance as a listener of group events
GroupEventDispatcher.addListener(this);
} }
/** /**
...@@ -926,11 +924,15 @@ public class RosterManager extends BasicModule implements GroupEventListener, Us ...@@ -926,11 +924,15 @@ public class RosterManager extends BasicModule implements GroupEventListener, Us
// Add this module as a user event listener so we can update // Add this module as a user event listener so we can update
// rosters when users are created or deleted // rosters when users are created or deleted
UserEventDispatcher.addListener(this); UserEventDispatcher.addListener(this);
// Add the new instance as a listener of group events
GroupEventDispatcher.addListener(this);
} }
public void stop() { public void stop() {
super.stop(); super.stop();
// Remove this module as a user event listener // Remove this module as a user event listener
UserEventDispatcher.removeListener(this); UserEventDispatcher.removeListener(this);
// Remove this module as a listener of group events
GroupEventDispatcher.removeListener(this);
} }
} }
\ No newline at end of file
...@@ -13,10 +13,10 @@ package org.jivesoftware.wildfire.gateway; ...@@ -13,10 +13,10 @@ package org.jivesoftware.wildfire.gateway;
import org.dom4j.DocumentHelper; import org.dom4j.DocumentHelper;
import org.dom4j.Element; import org.dom4j.Element;
import org.dom4j.QName; import org.dom4j.QName;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.util.Log; import org.jivesoftware.util.Log;
import org.jivesoftware.util.NotFoundException; import org.jivesoftware.util.NotFoundException;
import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.wildfire.SessionManager; import org.jivesoftware.wildfire.SessionManager;
import org.jivesoftware.wildfire.XMPPServer; import org.jivesoftware.wildfire.XMPPServer;
import org.jivesoftware.wildfire.container.PluginManager; import org.jivesoftware.wildfire.container.PluginManager;
...@@ -70,6 +70,7 @@ public abstract class BaseTransport implements Component, RosterEventListener { ...@@ -70,6 +70,7 @@ public abstract class BaseTransport implements Component, RosterEventListener {
public void initialize(JID jid, ComponentManager componentManager) { public void initialize(JID jid, ComponentManager componentManager) {
this.jid = jid; this.jid = jid;
this.componentManager = componentManager; this.componentManager = componentManager;
rosterManager = XMPPServer.getInstance().getRosterManager();
sessionManager.startThreadManager(jid); sessionManager.startThreadManager(jid);
} }
...@@ -109,7 +110,7 @@ public abstract class BaseTransport implements Component, RosterEventListener { ...@@ -109,7 +110,7 @@ public abstract class BaseTransport implements Component, RosterEventListener {
/** /**
* Manager component for user rosters. * Manager component for user rosters.
*/ */
public final RosterManager rosterManager = new RosterManager(); public RosterManager rosterManager;
/** /**
* Type of the transport in question. * Type of the transport in question.
......
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