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

Fixed initialization problem.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6432 b35dd754-fafc-0310-a699-88a17e54d16e
parent 4ad4752b
...@@ -295,7 +295,6 @@ public class XMPPServer { ...@@ -295,7 +295,6 @@ public class XMPPServer {
} }
loader = Thread.currentThread().getContextClassLoader(); loader = Thread.currentThread().getContextClassLoader();
componentManager = InternalComponentManager.getInstance();
httpServerManager = HttpServerManager.getInstance(); httpServerManager = HttpServerManager.getInstance();
initialized = true; initialized = true;
...@@ -364,6 +363,8 @@ public class XMPPServer { ...@@ -364,6 +363,8 @@ public class XMPPServer {
initModules(); initModules();
// Start all the modules // Start all the modules
startModules(); startModules();
// Keep a reference to the internal component manager
componentManager = getComponentManager();
} }
catch (Exception e) { catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -398,6 +399,8 @@ public class XMPPServer { ...@@ -398,6 +399,8 @@ public class XMPPServer {
initModules(); initModules();
// Start all the modules // Start all the modules
startModules(); startModules();
// Keep a reference to the internal component manager
componentManager = getComponentManager();
} }
// Initialize statistics // Initialize statistics
ServerTrafficCounter.initStatistics(); ServerTrafficCounter.initStatistics();
...@@ -1257,4 +1260,16 @@ public class XMPPServer { ...@@ -1257,4 +1260,16 @@ public class XMPPServer {
public FileTransferManager getFileTransferManager() { public FileTransferManager getFileTransferManager() {
return (FileTransferManager) modules.get(DefaultFileTransferManager.class); return (FileTransferManager) modules.get(DefaultFileTransferManager.class);
} }
/**
* Returns the <code>InternalComponentManager</code> registered with this server. The
* <code>InternalComponentManager</code> was registered with the server as a module while starting up
* the server.
*
* @return the <code>InternalComponentManager</code> registered with this server.
*/
private InternalComponentManager getComponentManager() {
return (InternalComponentManager) modules.get(InternalComponentManager.class);
}
} }
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