ANierbeck / Karaf-Vertx

Showcase to demonstrate Vertx in OSGi and especially in Karaf
Apache License 2.0
20 stars 5 forks source link

Vertx on karaf - How deployed Verticle? #35

Closed cleberlira closed 4 years ago

cleberlira commented 6 years ago

How to deploy Verticle (Vertx) on Karaf? I am using ServiceMix but not work.

The message look "Cannot deploy".

vertx2.deployVerticle(VertxMqtt.class.getName(), ar -> { if (ar.succeeded()) { System.out.println`("Verticle deployed"); } else { LOGGER.log(Level.SEVERE, "Cannot deploy " + verticle, ar.cause()); }

});
}
ANierbeck commented 4 years ago

Leaving this for future questions: First of all make sure you have the depending vertx feature installed. Second register your verticle as Services, for example as declarative Service which implements a Verticle interface. That'll register the verticle automatically.