aboutsummaryrefslogtreecommitdiff
path: root/juick-ws/src/main/java/com/juick/ws/configuration
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-08-07 23:46:00 +0300
committerGravatar Vitaly Takmazov2016-08-07 23:46:00 +0300
commit589901b03688e073eb85b5b51a58cec3c8d5d5e9 (patch)
tree5537bf1bd3f9dc99b210143a7cd0e0220bbc05fc /juick-ws/src/main/java/com/juick/ws/configuration
parent9f2901c0ad230b272c6bbae192e88d939cbb30f8 (diff)
juick-ws: do not use servlet api directly, refactor components as InitializingBean
Diffstat (limited to 'juick-ws/src/main/java/com/juick/ws/configuration')
-rw-r--r--juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java
index ecd44908..92b61bc7 100644
--- a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java
+++ b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java
@@ -3,7 +3,6 @@ package com.juick.ws.configuration;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.juick.ws.WebsocketComponent;
-import com.juick.ws.XMPPConnection;
import com.mitchellbosecke.pebble.PebbleEngine;
import com.mitchellbosecke.pebble.loader.Loader;
import com.mitchellbosecke.pebble.loader.ServletLoader;
@@ -31,8 +30,6 @@ import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry
import javax.inject.Inject;
import javax.servlet.ServletContext;
import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
/**
* Created by vitalyster on 28.06.2016.
@@ -44,17 +41,11 @@ import java.util.concurrent.Executors;
public class WebsocketConfiguration extends WebMvcConfigurationSupport implements WebSocketConfigurer {
@Inject
Environment env;
- ExecutorService xmppThread = Executors.newSingleThreadExecutor();
@Bean
WebsocketComponent wsHandler() {
return new WebsocketComponent();
}
- @Bean
- XMPPConnection xmpp() {
- XMPPConnection xmpp = new XMPPConnection(env, wsHandler());
- xmppThread.submit(xmpp);
- return xmpp;
- }
+
@Bean
JdbcTemplate jdbc() {
BasicDataSource dataSource = new BasicDataSource();