New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sharing vertx instance? #330
Comments
No it's not a "global". This allows you to instantiate stuff as you need to, especially if your verticle doesn't have a default constructor, hence Vert.x cannot instantiate it, then pass it to Vert.x so that it goes through "the verticle lifecycle" (init, start, ...). |
ok i see, so i guess the fix i have works well enough? |
I'd have moved the |
I was getting an NPE when referring to a vertx instance in one of the 2 verticles, so I did this:
whereas the example in the project is like so:
using the second example, how does the vertx instance get shared? is it basically a global?
the Null Pointer Exception I was getting was here:
so I had to change it to:
kinda weird TBH
The text was updated successfully, but these errors were encountered: