[jboss-user] [JBoss Web Services] - @EJB not injected when using JBossWS-metro

Markus Kilås do-not-reply at jboss.com
Fri May 25 08:39:37 EDT 2012


Markus Kilås [https://community.jboss.org/people/ne1mackan] created the discussion

"@EJB not injected when using JBossWS-metro"

To view the discussion, visit: https://community.jboss.org/message/737937#737937

--------------------------------------------------------------
After switching from JBossWS-native in JBoss 5.1.0.GA-jdk6 to JBossWS-metro-3.3.1 my servlet endpoint no longer get the EJBs injected. This worked fine with JBossWS-native (and also in GlassFish) but not after changing to jbossws-metro.

The servlet endpoint is implemented as below:

@WebService(serviceName = "MyService", portName = "MyServicePort", endpointInterface = "com.example.server.MyService", targetNamespace = "http://myservice.server.example.com/", wsdlLocation = "WEB-INF/wsdl/MyService/MyService.wsdl")
public class MyService {
    @EJB
    private FirstSessionLocal first;
    @EJB
    private SecondSessionLocal second;
    @Resource
    private WebServiceContext wsContext;

    public void business() {
    LOG.debug(">business");
    if (first == null) LOG.error("first not injected");
    if (second == null) LOG.error("second not injected");
    if (wsContext == null) LOG.error("wsContext not injected");
    }
}


Is this a known issue? What could be the problem? Any workaround?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/737937#737937]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120525/82e9259b/attachment.html 


More information about the jboss-user mailing list