[jboss-user] [EJB 3.0] - Re: NullPointerException in JavaEEComponentHelper with JBoss

jaikiran do-not-reply at jboss.com
Wed Apr 15 03:44:44 EDT 2009


"japase" wrote : 
  | But I still have problems with EJB injection in my web service 
  | 
  | An example of how our web service looks like:
  | 
  | 
  |   | @WebService
  |   | public class BTestHandler
  |   | {
  |   |    @EJB
  |   |    private ifs.application.btestservice.BTestHandlerLocal local;
  |   | 
  |   | 
  |   | 
  | 
  | 

After reading  a few related posts, i realize that injection in webservice is supported only for EJB3 endpoints http://www.jboss.org/index.html?module=bb&op=viewtopic&t=126665#4117577

Which means that you should additionally annotate the WebService as a @Stateless

@Stateless
  | @WebService
  | public class BTestHandler
  | {
  |    @EJB
  |    private ifs.application.btestservice.BTestHandlerLocal local;
  | 
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225538#4225538

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225538



More information about the jboss-user mailing list