Browse code

Fix verticle injection

Thomas Cataldo authored on 12/06/2018 06:46:00
Showing 3 changed files
... ...
@@ -48,6 +48,7 @@
48 48
       <plugin id="com.google.guava"/>
49 49
       <plugin id="com.hazelcast"/>
50 50
       <plugin id="com.lowagie.itext"/>
51
+      <plugin id="com.netflix.spectator.api"/>
51 52
       <plugin id="com.newrelic.agent.java.newrelic-api"/>
52 53
       <plugin id="com.ning.async-http-client"/>
53 54
       <plugin id="com.ning.compress-lzf"/>
... ...
@@ -56,6 +57,7 @@
56 56
       <plugin id="com.tdunning.t-digest"/>
57 57
       <plugin id="com.twitter.jsr166e"/>
58 58
       <plugin id="io.netty"/>
59
+      <plugin id="io.netty41"/>
59 60
       <plugin id="io.vertx.core"/>
60 61
       <plugin id="io.vertx.platform"/>
61 62
       <plugin id="javax.mail-api"/>
... ...
@@ -259,6 +261,7 @@
259 259
       <plugin id="net.bluemind.mailshare.api"/>
260 260
       <plugin id="net.bluemind.mailshare.hook"/>
261 261
       <plugin id="net.bluemind.mailshare.service"/>
262
+      <plugin id="net.bluemind.metrics.registry"/>
262 263
       <plugin id="net.bluemind.mime4j.common"/>
263 264
       <plugin id="net.bluemind.neko.common"/>
264 265
       <plugin id="net.bluemind.node.api"/>
... ...
@@ -389,6 +392,7 @@
389 389
       <plugin id="org.freemarker.freemarker"/>
390 390
       <plugin id="org.hibernate.validator"/>
391 391
       <plugin id="org.iq80.snappy"/>
392
+      <plugin id="org.jboss.logging.jboss-logging"/>
392 393
       <plugin id="org.jboss.netty"/>
393 394
       <plugin id="org.jsoup"/>
394 395
       <plugin id="org.mnode.ical4j"/>
... ...
@@ -53,7 +53,7 @@
53 53
       <extension
54 54
          point="net.bluemind.lib.vertx.verticles">
55 55
       <verticle
56
-            impl="net.bluemind.directory.service.internal.DirectoryVerticle">
56
+            impl="net.bluemind.directory.service.internal.DirectoryVerticle$Factory">
57 57
       </verticle>
58 58
    </extension>
59 59
    
... ...
@@ -8,6 +8,8 @@ import org.vertx.java.platform.Verticle;
8 8
 
9 9
 import com.netflix.spectator.api.Registry;
10 10
 
11
+import net.bluemind.lib.vertx.IUniqueVerticleFactory;
12
+import net.bluemind.lib.vertx.IVerticleFactory;
11 13
 import net.bluemind.metrics.registry.IdFactory;
12 14
 import net.bluemind.metrics.registry.MetricsRegistry;
13 15
 
... ...
@@ -15,6 +17,20 @@ public class DirectoryVerticle extends Verticle {
15 15
 	private static final Registry registry = MetricsRegistry.get();
16 16
 	private static final IdFactory idFactory = new IdFactory(MetricsRegistry.get(), DirectoryVerticle.class);
17 17
 
18
+	public static class Factory implements IVerticleFactory, IUniqueVerticleFactory {
19
+
20
+		@Override
21
+		public boolean isWorker() {
22
+			return true;
23
+		}
24
+
25
+		@Override
26
+		public Verticle newInstance() {
27
+			return new DirectoryVerticle();
28
+		}
29
+
30
+	}
31
+
18 32
 	@Override
19 33
 	public void start() {
20 34
 		getVertx().eventBus().registerHandler("dir.changed", new Handler<Message<JsonObject>>() {