Commit c677c99b authored by Christian Schudt's avatar Christian Schudt

Revert fix for OF-874 because it introduced a critical regression.

Appearently there can only be one ServerItemsProvider. What happened here is that disco#items requests were now routed to SessionManager, which returned an empty result, which means service discovery fails.

It seems like Openfire can only host items for the whole server, not for single users, so the real fix needs some more investigation.
parent c8f6434d
...@@ -88,7 +88,7 @@ import org.xmpp.packet.Presence; ...@@ -88,7 +88,7 @@ import org.xmpp.packet.Presence;
* *
* @author Derek DeMoro * @author Derek DeMoro
*/ */
public class SessionManager extends BasicModule implements ClusterEventListener, ServerItemsProvider, DiscoInfoProvider, DiscoItemsProvider { public class SessionManager extends BasicModule implements ClusterEventListener/*, ServerItemsProvider, DiscoInfoProvider, DiscoItemsProvider */{
private static final Logger Log = LoggerFactory.getLogger(SessionManager.class); private static final Logger Log = LoggerFactory.getLogger(SessionManager.class);
...@@ -1171,7 +1171,7 @@ public class SessionManager extends BasicModule implements ClusterEventListener, ...@@ -1171,7 +1171,7 @@ public class SessionManager extends BasicModule implements ClusterEventListener,
conflictLimit = limit; conflictLimit = limit;
JiveGlobals.setProperty("xmpp.session.conflict-limit", Integer.toString(conflictLimit)); JiveGlobals.setProperty("xmpp.session.conflict-limit", Integer.toString(conflictLimit));
} }
/*
@Override @Override
public Iterator<DiscoServerItem> getItems() { public Iterator<DiscoServerItem> getItems() {
return Arrays.asList(new DiscoServerItem(serverAddress, null, null, null, this, this)).iterator(); return Arrays.asList(new DiscoServerItem(serverAddress, null, null, null, this, this)).iterator();
...@@ -1215,7 +1215,7 @@ public class SessionManager extends BasicModule implements ClusterEventListener, ...@@ -1215,7 +1215,7 @@ public class SessionManager extends BasicModule implements ClusterEventListener,
return Collections.emptyIterator(); return Collections.emptyIterator();
} }
} }
*/
private class ClientSessionListener implements ConnectionCloseListener { private class ClientSessionListener implements ConnectionCloseListener {
/** /**
* Handle a session that just closed. * Handle a session that just closed.
...@@ -1374,7 +1374,7 @@ public class SessionManager extends BasicModule implements ClusterEventListener, ...@@ -1374,7 +1374,7 @@ public class SessionManager extends BasicModule implements ClusterEventListener,
sessionInfoCache = CacheFactory.createCache(C2S_INFO_CACHE_NAME); sessionInfoCache = CacheFactory.createCache(C2S_INFO_CACHE_NAME);
// Listen to cluster events // Listen to cluster events
ClusterManager.addListener(this); ClusterManager.addListener(this);
server.getIQDiscoItemsHandler().addServerItemsProvider(this); //server.getIQDiscoItemsHandler().addServerItemsProvider(this);
} }
......
...@@ -540,6 +540,7 @@ public class XMPPServer { ...@@ -540,6 +540,7 @@ public class XMPPServer {
loadModule(PrivateStorage.class.getName()); loadModule(PrivateStorage.class.getName());
// Load core modules // Load core modules
loadModule(PresenceManagerImpl.class.getName()); loadModule(PresenceManagerImpl.class.getName());
loadModule(SessionManager.class.getName());
loadModule(PacketRouterImpl.class.getName()); loadModule(PacketRouterImpl.class.getName());
loadModule(IQRouter.class.getName()); loadModule(IQRouter.class.getName());
loadModule(MessageRouter.class.getName()); loadModule(MessageRouter.class.getName());
...@@ -579,8 +580,6 @@ public class XMPPServer { ...@@ -579,8 +580,6 @@ public class XMPPServer {
loadModule(PubSubModule.class.getName()); loadModule(PubSubModule.class.getName());
loadModule(IQDiscoInfoHandler.class.getName()); loadModule(IQDiscoInfoHandler.class.getName());
loadModule(IQDiscoItemsHandler.class.getName()); loadModule(IQDiscoItemsHandler.class.getName());
// SessionManager registers to IQDiscoItemsHandler, therefore load it after it.
loadModule(SessionManager.class.getName());
loadModule(UpdateManager.class.getName()); loadModule(UpdateManager.class.getName());
loadModule(FlashCrossDomainHandler.class.getName()); loadModule(FlashCrossDomainHandler.class.getName());
loadModule(InternalComponentManager.class.getName()); loadModule(InternalComponentManager.class.getName());
......
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