aboutsummaryrefslogtreecommitdiff
path: root/juick-ws/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'juick-ws/src/main/java/com')
-rw-r--r--juick-ws/src/main/java/com/juick/ws/XMPPConnection.java14
-rw-r--r--juick-ws/src/main/java/com/juick/ws/configuration/WebsocketAppConfiguration.java7
2 files changed, 3 insertions, 18 deletions
diff --git a/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java b/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java
index 1b6eb3dc..c6ac5b50 100644
--- a/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java
+++ b/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java
@@ -29,11 +29,10 @@ import java.util.stream.Collectors;
/**
* @author ugnich
*/
-public class XMPPConnection implements InitializingBean, DisposableBean {
+public class XMPPConnection implements InitializingBean {
private static final Logger logger = LoggerFactory.getLogger(XMPPConnection.class);
private final JdbcTemplate jdbc;
- private final ExecutorService service;
private final WebsocketComponent wsHandler;
private final String xmppPassword;
private final MessageSerializer ms;
@@ -44,13 +43,11 @@ public class XMPPConnection implements InitializingBean, DisposableBean {
public XMPPConnection(
- final Environment env, final ExecutorService service, final WebsocketComponent wsHandler, final JdbcTemplate jdbc) {
+ final Environment env, final WebsocketComponent wsHandler, final JdbcTemplate jdbc) {
Assert.notNull(env);
- Assert.notNull(service);
Assert.notNull(wsHandler);
Assert.notNull(jdbc);
- this.service = service;
this.wsHandler = wsHandler;
this.jdbc = jdbc;
@@ -93,13 +90,6 @@ public class XMPPConnection implements InitializingBean, DisposableBean {
}
}
- @Override
- public void destroy() throws Exception {
- ThreadHelper.shutdownAndAwaitTermination(service);
-
- logger.info("XMPPConnection destroyed");
- }
-
MessageSerializer messageSerializer = new MessageSerializer();
private void onJuickPM(final int uid_to, final com.juick.Message jmsg) {
diff --git a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketAppConfiguration.java b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketAppConfiguration.java
index 9e2e4f6f..9824a30c 100644
--- a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketAppConfiguration.java
+++ b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketAppConfiguration.java
@@ -38,12 +38,7 @@ public class WebsocketAppConfiguration implements WebSocketConfigurer {
@Bean
public XMPPConnection ws() {
- return new XMPPConnection(env, service(), wsHandler(), jdbc);
- }
-
- @Bean
- public ExecutorService service() {
- return Executors.newCachedThreadPool();
+ return new XMPPConnection(env, wsHandler(), jdbc);
}
@Override