3 Replies Latest reply: Aug 23, 2012 7:52 PM by Kalyan Pasupuleti-Oracle RSS

    EJB - Transactionality

    user8801115
      Hi,

      I'm trying to implement container managed transactionality using EJBs. I have used weblogic wsat transaction annotations and deployed the same in weblogic. Please find the code snippet for the same.


      import weblogic.wsee.wstx.wsat.*;
      import weblogic.wsee.wstx.wsat.Transactional.TransactionFlowType;


      @WebService(serviceName = "DemoService", targetNamespace = "urn:DemoService ", portName = " DemoServiceWSPort", endpointInterface = "org.ws.DemoServiceWSPort")
      @Stateless
      @Transactional(value=TransactionFlowType.MANDATORY, version=weblogic.wsee.wstx.wsat.Transactional.Version.WSAT10)
      @TransactionAttribute(TransactionAttributeType.REQUIRED)
      public class DemoServiceWS {
      }

      Deployed the above EJB webservice successfully in weblogic and tested the transactionality from orchestrating layer as well. ( Oracle SOA Bpel ). But i'm having issues deploying this EJB in websphere,due to the below errors.


      [23/08/12 15:02:37:436 BST] 0000003e WSModuleDescr E WSWS7027E: JAX-WS Service Descriptions could not be correctly built because of the following error: javax.xml.ws.WebServiceException: WSWS7054E: The Web Services Description Language (WSDL) file could not be generated for the org.ws.DemoServiceWS Web service implementation class because of the following error: javax.xml.ws.WebServiceException: Annotation @weblogic.wsee.wstx.wsat.Transactional(enabled=true, value=MANDATORY, version=WSAT10) is not recognizable, atleast one constructor of class weblogic.wsee.wstx.wsat.TransactionalFeature should be marked with @FeatureConstructor
           at com.ibm.ws.websvcs.wsdl.WASWSDLGenerator.generateWsdl(WASWSDLGenerator.java:238)
           at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.generateWSDL(EndpointDescriptionImpl.java:2084)
           at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:449)
           at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:401)
           at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:297)
           at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescriptionFromDBCMap(DescriptionFactoryImpl.java:273)
           at org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescriptionFromDBCMap(DescriptionFactory.java:524)
           at com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl.buildJAXWSServices(WSModuleDescriptorImpl.java:1307)
           at com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl._containsJAXWSWebServices(WSModuleDescriptorImpl.java:481)
           at com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl.containsJAXWSWebServices(WSModuleDescriptorImpl.java:456)
           at com.ibm.ws.webservices.admin.utils.ServiceContainmentHelper.<init>(ServiceContainmentHelper.java:71)
           at com.ibm.ws.webservices.admin.utils.CommonUtils.getServiceContianmentHelper(CommonUtils.java:690)
           at com.ibm.ws.webservices.admin.utils.CommonUtils.hasWebServices(CommonUtils.java:295)
           at com.ibm.ws.webservices.admin.utils.CommonUtils.hasJAXWSWebServices(CommonUtils.java:238)
           at com.ibm.ws.webservices.admin.deploy.DeploymentValidation.getWebServiceType(DeploymentValidation.java:309)
           at com.ibm.ws.webservices.admin.deploy.DeploymentValidation.validateEarModules(DeploymentValidation.java:381)
           at com.ibm.ws.webservices.admin.deploy.DeploymentValidation.validateOperation_Required(DeploymentValidation.java:204)
           at com.ibm.ws.management.application.task.ValidateAppTask.performTask(ValidateAppTask.java:361)
           at com.ibm.ws.management.application.SchedulerImpl.run(SchedulerImpl.java:315)
           at java.lang.Thread.run(Thread.java:770)
      Caused by: javax.xml.ws.WebServiceException: Annotation @weblogic.wsee.wstx.wsat.Transactional(enabled=true, value=MANDATORY, version=WSAT10) is not recognizable, atleast one constructor of class weblogic.wsee.wstx.wsat.TransactionalFeature should be marked with @FeatureConstructor
           at com.ibm.jtc.jax.xml.ws.binding.WebServiceFeatureList.getWebServiceFeatureBean(WebServiceFeatureList.java:198)
           at com.ibm.jtc.jax.xml.ws.binding.WebServiceFeatureList.getFeature(WebServiceFeatureList.java:140)
           at com.ibm.jtc.jax.xml.ws.binding.WebServiceFeatureList.parseAnnotations(WebServiceFeatureList.java:153)
           at com.ibm.jtc.jax.xml.ws.binding.WebServiceFeatureList.<init>(WebServiceFeatureList.java:96)
           at com.ibm.jtc.jax.tools.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:243)
           at com.ibm.jtc.jax.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:123)
           at com.ibm.jtc.jax.tools.ws.util.WSToolsObjectFactoryImpl.wsgen(WSToolsObjectFactoryImpl.java:61)
           at com.ibm.jtc.jax.tools.ws.spi.WSToolsObjectFactory.wsgen(WSToolsObjectFactory.java:107)
           at com.ibm.ws.websvcs.wsdl.WASWSDLGenerator.wsgen(WASWSDLGenerator.java:572)
           at com.ibm.ws.websvcs.wsdl.WASWSDLGenerator.generateWsdl(WASWSDLGenerator.java:215)
           ... 19 more


      Would like to know if anyone has faced the same issues deploying EJB into websphere which uses weblogic transactional annotations.

      Thanks in advance.

      Regards,
      Phani