5 Replies Latest reply on May 22, 2010 3:39 AM by davidfdr.davidfdr.gmail.com

    Injection @In in Web Services EJB doesn’t inject component

    pomcompot.pomme_compote-seamframework.yahoo.fr

      Hi,


      I’m developping web services based on Seam and JBoss WS. I have successfully deployed them, but get a problem when invoking them. A backing component to which the job is delegated isn’t properly injected in my EJB endpoint. Hereunder details on my configuration.


      Three projects: entities-common-ws-objects, entities-ejb and ws-ejb packaged with maven. entities-common-ws-objects contains the XML mashalled/unmarshalled web service objects shared between client and server, entities-ejb contains the entities (sic), ws-ejb the endpoints of the web service and the processing backing classes.


      Here, one of my endpoint:


      @Stateless
      @WebService(name="Sample", serviceName="Sample")
      @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
      public class SampleEndPoint implements ISampleLivraisonEndPoint {
          @In(create=true, required=true)
          private SampleService sampleService;
              
          @WebMethod
          public SampleResponse invokeInternal(SampleRequest request) throws Exception {
              return sampleService.inscription(request);
          }
      }




      Here, my backing class SampleService:


      @Transactional
      @Name("sampleService")
      public class SampleService {
          @Logger
          private org.jboss.seam.log.Log logger;
      
          @In
          private EntityManager entityManager; 
          
          @Transactional
          public SampleResponse inscription(SampleRequest request) {
              […]
          }
      }




      The sampleService in the SampleEndPoint is desperately null. In the deploy log, I never see the sampleService component neither in the application context debug view of JBoss. I have put the same files in the META-INF of ws-ejb than in entities-ejb: seam.properties and components.properties just in case. No clue on what prevent the injection to be done and the component to be created.


      Any idea would be very helpful.


      Thanks in advance.