diff options
Diffstat (limited to 'src/main/java/com/juick/xmpp/s2s/XMPPComponent.java')
-rw-r--r-- | src/main/java/com/juick/xmpp/s2s/XMPPComponent.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java b/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java index 95641f5e..3720d963 100644 --- a/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java +++ b/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java @@ -27,7 +27,6 @@ public class XMPPComponent implements ServletContextListener { ExecutorService executorService; public static String HOSTNAME = null; - public static String COMPONENTNAME = null; public static String STATSFILE = null; public static ConnectionRouter connRouter; static final List<ConnectionIn> inConnections = Collections.synchronizedList(new ArrayList<>()); @@ -158,15 +157,16 @@ public class XMPPComponent implements ServletContextListener { try { conf.load(sce.getServletContext().getResourceAsStream("WEB-INF/s2s.conf")); HOSTNAME = conf.getProperty("hostname"); - COMPONENTNAME = conf.getProperty("componentname"); + String componentName = conf.getProperty("componentname"); STATSFILE = conf.getProperty("statsfile"); Class.forName("com.mysql.jdbc.Driver"); - sql = DriverManager.getConnection("jdbc:mysql://localhost/juick?autoReconnect=true&user=" + conf.getProperty("mysql_username", "") + "&password=" + conf.getProperty("mysql_password", "")); + sql = DriverManager.getConnection("jdbc:mysql://localhost/juick?autoReconnect=true&user=" + + conf.getProperty("mysql_username", "") + "&password=" + conf.getProperty("mysql_password", "")); childParsers.put(JuickMessage.XMLNS, new JuickMessage()); - connRouter = new ConnectionRouter(); + connRouter = new ConnectionRouter(componentName); new Thread(connRouter).start(); new Thread(new ConnectionListener()).start(); new Thread(new CleaningUp()).start(); |