Hi,
I am having trouble injecting into a message body writer.
Is it possible that the combination of Glassfish and Jersey 2 as described here
https://blogs.oracle.com/arungupta/entry/jersey_2_in_glassfish_4
messes up injection?
In resource classes I can only get injection to work by making the class @Stateless and injecting via @EJB (injected class is an EJB singleton).
In my message body writer I cannot get injection to work at all. Note even with @Stateless and @EJB, as in
@Provider
@Stateless
public class MyMBR implements MessageBodyWriter<Customer> {
@EJB
MyService myService;
...
}
(I have a beans.xml ... )
Jan