import groovy.transform.CompileStaticimport groovy.util.logging.Slf4jimport io.vertx.core.AsyncResultimport io.vertx.core.Vertximport java.util.function.Consumer@CompileStatic@Slf4jclass MongoServiceTest {public static void main(String[] args) {Consumer<Vertx> runner = {try {Vertx.vertx().deployVerticle("service:io.vertx.mongo-service") { AsyncResult<String> result ->if (result.succeeded()) {log.info("Mongo service was started");}else {log.error("FAILED to start Mongo service", result.cause());Vertx.vertx().close()}}}catch (Exception e) {log.error("FAILED to start Mongo service", e);Vertx.vertx().close()}}runner.accept(Vertx.vertx())}}
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 10 Apr 2015 at 08:52:33, Zsolt Kovács (zs....@gmail.com) wrote:
Thanks Julien, that was the issue. To be honest, it is not clear from the mongodb documentation (3.0), that this dependency is needed.
it should indeed be added in the documentation as a “NOTE”, could you create an issue for that in the project please ?
BTW. I see one more issue. Even if Vertx.vertx().close() was called the JVM does not exit. Is that normal?
I don’t think it should be , perhaps you can provide a “reproducer” for your case ?
Thanks Julien, that was the issue. To be honest, it is not clear from the mongodb documentation (3.0), that this dependency is needed.it should indeed be added in the documentation as a “NOTE”, could you create an issue for that in the project please ?
BTW. I see one more issue. Even if Vertx.vertx().close() was called the JVM does not exit. Is that normal?I don’t think it should be , perhaps you can provide a “reproducer” for your case ?