users@glassfish.java.net

_at_WebServiceProvider annotation, dependency injection fails, BUG?

From: <glassfish_at_javadesktop.org>
Date: Wed, 24 Oct 2007 11:38:07 PDT

Hello,

dependency injection fails when using @WebServiceProvider annotation with Stateless Session EJB. Glassfish deploys the Session EJB properly and calling the web service works fine. But no resources are injected! (i have tried @PersistenceContext and @EJB)

[code]
@Stateless()
@ServiceMode(Mode.PAYLOAD)
@WebServiceProvider(...)
public class Service implements Provider<Source> {
    @EJB() private OtherBean other;
    public Source invoke( Source request ) {
        ...
        other.xyz(); // NullPointerException, other == null !!!
        ...
    }
}
[/code]
Is this a Glassfish bug?

Thanks,
Keil
[Message sent by forum member 'keil' (keil)]

http://forums.java.net/jive/thread.jspa?messageID=241952