2 Replies Latest reply on Oct 26, 2012 11:37 AM by Philippe Aubertin

    @WebService @Stateless

    Philippe Aubertin Newbie

      Hi,

      I have a little question for you:

       

      When I create a stateless EJB, Jboss deploy it correctly like this:

      @Stateless
      public class ParameterBS implements ParameterBSInterface, Serializable 
      

       

      17:18:25,256 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-8) JNDI bindings for session bean named ParameterBS in deployment unit deployment "Services.jar" are as follows:
      
      
                java:global/Services/ParameterBS!bs.parameter.ParameterBSInterface
                java:app/-Services/ParameterBS!fs.parameter.ParameterBSInterface
                java:module/ParameterBS!bs.parameter.ParameterBSInterface
                java:global/ervices/ParameterBS
                java:app/Services/ParameterBS
                java:module/ParameterBS
      

       

       

       

      But when I decide to expose the EJB as a web service with @WebService, the web service is exposed but not the EJB anymore:

      @Stateless
      @WebService
      public class ParameterBS implements ParameterBSInterface, Serializable 
      

       

       

       

      16:51:20,089 INFO  [org.jboss.weld.deployer] (MSC service thread 1-7) JBAS016005: Starting Services for CDI deployment:Services.jar
      16:51:20,125 INFO  [org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] (MSC service thread 1-7) Add Service
       id=ParameterBS
       address=http://localhost:8080/Services/ParameterBS
       implementor=bs.parameter.ParameterBS
       invoker=org.jboss.wsf.stack.cxf.JBossWSInvoker
       serviceName={http://parameter.bs/}ParameterBSService
       portName={http://parameter.bs/}ParameterBSPort
       wsdlLocation=null
       mtomEnabled=false
       properties=[org.jboss.as.webservices.metadata.modelEjbComponentViewName -> service jboss.deployment.unit."Services.jar".component.ParameterBS.VIEW."bs.parameter.ParameterBS".SERVICE_ENDPOINT]
      

       

       

      My question is: Why JBoss cannot deploy the WebService and the EJB at the same time?

      Thanks by advance for any help,

       

      Philippe