aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'juick-xmpp/src/main')
-rw-r--r--juick-xmpp/src/main/java/com/juick/components/XMPPServer.java4
-rw-r--r--juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java4
2 files changed, 5 insertions, 3 deletions
diff --git a/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java b/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
index 31aa0bc7..a091d477 100644
--- a/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
+++ b/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
@@ -52,13 +52,13 @@ public class XMPPServer implements DisposableBean, Stream.StreamListener,
private final List<ConnectionIn> inConnections = Collections.synchronizedList(new ArrayList<>());
private final List<ConnectionOut> outConnections = Collections.synchronizedList(new ArrayList<>());
private final List<CacheEntry> outCache = Collections.synchronizedList(new ArrayList<>());
- @Inject
public JdbcTemplate jdbc;
final public HashMap<String, StanzaChild> childParsers = new HashMap<>();
@Inject
- public XMPPServer(Environment env, ExecutorService service) {
+ public XMPPServer(Environment env, ExecutorService service, JdbcTemplate jdbc) {
this.service = service;
+ this.jdbc = jdbc;
logger.info("component initialized");
try {
HOSTNAME = env.getProperty("hostname");
diff --git a/juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java b/juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java
index 1695de6a..7cada270 100644
--- a/juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java
+++ b/juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java
@@ -39,6 +39,8 @@ public class XMPPConfiguration extends WebMvcConfigurationSupport {
Environment env;
@Inject
ExecutorService service;
+ @Inject
+ JdbcTemplate jdbc;
@Bean
JdbcTemplate jdbc() {
@@ -78,7 +80,7 @@ public class XMPPConfiguration extends WebMvcConfigurationSupport {
}
@Bean
public XMPPServer xmpp() {
- return new XMPPServer(env, service);
+ return new XMPPServer(env, service, jdbc);
}
@Bean
public ExecutorService service() {