I have a scenario that Jersey 2.13 (with HK2 as DI) is loaded up in Tomcat and on the same JVM (I start it up from a startup servlet) a netty-socket-io server is running. I want this second server's methods to have access to the injected classes that the rest of my web app is using and I wouldn't like to introduce another dependency injection framework just for that.
I read that you can get a ServiceLocatorProvider in Jersey for doing this here but you need to have a context provided while my methods are completely separated.