Injecting an instance into a resource

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Injecting an instance into a resource

EniacMlezi
Hello everybody,

I've been trying to find out why it seems impossible to inject an instance (of say, a TransportClient) into a Resource.

I've created this StackOverflow subject describing my endeavors in full length; http://stackoverflow.com/questions/40545403/jersey-inject-instance-into-resource

I'd like to know if what I am trying to achieve is indeed possible, and if not how else I should solve it.

All help would be much appreciated! Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Injecting an instance into a resource

EniacMlezi
Alright got it to work:

When I at first tried to deploy the app to glassfish it complained about some guava dependency. I swapped the Guava jar in glassfish/modules with the one maven had installed and got it to deploy. It may have something to do with that.

I decided to drop the whole glassfish stuff and start from scratch. On the jersey introduction page there's a maven archetype that's a good start. moral: don't chew off more than one bite I guess