For Vert.x 2, which is what the original poster was using. I recommend next time starting up a new thread.
Vert.x 2 solution of shared data still doesn't work either because there are only certain types you can put in there, and that it is only shared in the Vert.x instance. Anyway, not the question now.
If Vert.x 3 since the classloaders were flattened, simple solution is to just store the object as a static variable in any class. That is what we did with our Spring Application Context instance.
public class AppContextHolder {
private static ApplicationContext context
public ApplicationContext getApplicationContext(){
if (context == null) {
context = new ClasspathXmlApplicationContext("locationOfConfigFile")
}
return context
}
}
Mark