Skip to main content

@WebServiceProvider annotation, dependency injection fails, BUG?

2 replies [Last post]
keil
Offline
Joined: 2003-06-16

Hello,

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

<br />
@Stateless()<br />
@ServiceMode(Mode.PAYLOAD)<br />
@WebServiceProvider(...)<br />
public class Service implements Provider {<br />
    @EJB() private OtherBean other;<br />
    public Source invoke( Source request ) {<br />
        ...<br />
        other.xyz();  // NullPointerException, other == null !!!<br />
        ...<br />
    }<br />
}<br />

Is this a Glassfish bug?

Thanks,
Keil

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bhaktimehta
Offline
Joined: 2004-03-18

I will look at it. Please can you file an issue on Glassfish subcategory webservices and attach your source code/NB project etc.

keil
Offline
Joined: 2003-06-16