From 2ebd7a050acf477b68a72397395a026ec63d89dd Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 6 Jul 2016 19:34:54 +0300 Subject: separate thread for xmpp component --- src/main/java/com/juick/xmpp/s2s/XMPPComponent.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/juick') 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")); -- cgit v1.2.3