diff options
author | Vitaly Takmazov | 2016-02-01 19:48:21 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-02-01 19:48:21 +0300 |
commit | a9a7dd2da8db472e20c3aa44ae7cac274b8ed499 (patch) | |
tree | 76791098b26e0bd77b08e9f9b586e77e8c8c896c /src/main/java/com/juick/xmpp/s2s/XMPPComponent.java | |
parent | 14c5ddd69a6f76a96d7eb98afb01caac79308553 (diff) |
refactoring
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(); |