0 Replies Latest reply on May 25, 2012 8:39 AM by Markus Kilås

    @EJB not injected when using JBossWS-metro

    Markus Kilås Newbie

      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:

       

      {code}@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");

          }

      }{code}

       

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