diff options
author | Vitaly Takmazov | 2016-07-06 19:34:54 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-07-06 19:34:54 +0300 |
commit | 2ebd7a050acf477b68a72397395a026ec63d89dd (patch) | |
tree | 2b6bfce0f397ce92bcbb47571316858faab3a507 | |
parent | 95869ef683a517eb48db1784150ded7661294f8a (diff) |
separate thread for xmpp component
-rw-r--r-- | src/main/java/com/juick/xmpp/s2s/XMPPComponent.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java b/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java index db7b11ac..5cdce82a 100644 --- a/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java +++ b/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java @@ -35,6 +35,7 @@ public class XMPPComponent implements ServletContextListener { private static final Logger LOGGER = Logger.getLogger(XMPPComponent.class.getName()); public final ExecutorService executorService = Executors.newCachedThreadPool(); + ExecutorService xmppService = Executors.newSingleThreadExecutor(); public String HOSTNAME = null; public String STATSFILE = null; @@ -169,7 +170,7 @@ public class XMPPComponent implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { LOGGER.info("component initialized"); - executorService.submit(() -> { + xmppService.submit(() -> { Properties conf = new Properties(); try { conf.load(sce.getServletContext().getResourceAsStream("/WEB-INF/juick.conf")); |