10 Replies Latest reply on Mar 22, 2008 4:27 AM by marklittle

    Web Services Transactions

    matias.blasi

      Hello, I am researching about the web services transactions behaiviour...
      I have read the WS-C, WS-AT & WS-BA specifications, and several internet papers, i have the concepts.
      Now I am looking for a working sample, to have something runing something to begin from...
      I know that Arjuna had an implementation, and it was included in jboss project so far. I understand it is now the jbossts component.
      I was trying to run the xts-demo application into the jboss-4.2.2 & jbossts-4.2.2 with no success...
      Now I am with jboss-5.0.0-beta4, where is the web services transcation support here? I see only a jbossws component, as a .sar application, but no samples, and nothing seems to provide the web services transaction support...

      Can anyone help me? I've put a lot of days in that, and I need a sample to see this feature really working...

      Thank you a lot!

      Matias Blasi.

        • 1. Re: Web Services Transactions
          adinn

           


          I was trying to run the xts-demo application into the jboss-4.2.2 & jbossts-4.2.2 with no success...
          Now I am with jboss-5.0.0-beta4, where is the web services transcation support here?


          The web services transaction component of JBoss AS is currently delivered as a separately bundled deliverable and can be built from the code in the JBossTS project XTS directory. It is not yet ready for inclusion in AS 5.0 although I should be checking a version into trunk in the next week or so which will work with AS 5.0Beta4. You can expect an implementation of WS-C/AT/BA 1.0 to be integrated into the full (non-beta) AS 5.0 community release as a .sar.

          What was the problem you had getting the xts demo to work in 4.2.2? It has been tested in that environment and should work ok.


          • 2. Re: Web Services Transactions
            matias.blasi

            I tried the xts-demo with the jboss 4.2.2 default server profile I have this error message in the ui:

            "Transaction failed! Cause: com.arjuna.wst.SystemException: VersionMismatch[html]"


            Later, I understood that it should be run with tha all server profile, but after following the jbossts-full-4.2.2.GA INSTALL instructions, I couldn't start the server :(

            This is the output:


            ===============================================================================
            
             JBoss Bootstrap Environment
            
             JBOSS_HOME: C:\jboss_422
            
             JAVA: c:\Program Files\Java\jdk1.5.0_04\bin\java
            
             JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
            
             CLASSPATH: c:\Program Files\Java\jdk1.5.0_04\lib\tools.jar;C:\jboss_422\bin\run.jar
            
            ===============================================================================
            
            14:03:26,710 INFO [Server] Starting JBoss (MX MicroKernel)...
            14:03:26,710 INFO [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)
            14:03:26,710 INFO [Server] Home Dir: C:\jboss_422
            14:03:26,710 INFO [Server] Home URL: file:/C:/jboss_422/
            14:03:26,710 INFO [Server] Patch URL: null
            14:03:26,710 INFO [Server] Server Name: all
            14:03:26,710 INFO [Server] Server Home Dir: C:\jboss_422\server\all
            14:03:26,710 INFO [Server] Server Home URL: file:/C:/jboss_422/server/all/
            14:03:26,710 INFO [Server] Server Log Dir: C:\jboss_422\server\all\log
            14:03:26,710 INFO [Server] Server Temp Dir: C:\jboss_422\server\all\tmp
            14:03:26,710 INFO [Server] Root Deployment Filename: jboss-service.xml
            14:03:27,538 INFO [ServerInfo] Java version: 1.5.0_04,Sun Microsystems Inc.
            14:03:27,538 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_04-b05,Sun Microsystems Inc.
            14:03:27,538 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
            14:03:28,850 INFO [Server] Core system initialized
            14:03:35,335 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
            14:03:35,335 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
            14:03:50,507 INFO [STDOUT] no object for null
            14:03:50,523 INFO [STDOUT] no object for null
            14:03:50,554 INFO [STDOUT] no object for null
            14:03:50,679 INFO [STDOUT] no object for {urn:jboss:bean-deployer}supplyType
            14:03:50,726 INFO [STDOUT] no object for {urn:jboss:bean-deployer}dependsType
            14:03:56,164 INFO [NativeServerConfig] JBoss Web Services - Native
            14:03:56,164 INFO [NativeServerConfig] jbossws-native-2.0.1.SP2 (build=200710210837)
            14:03:57,726 INFO [SnmpAgentService] SNMP agent going active
            14:04:00,336 INFO [DefaultPartition] Initializing
            14:04:00,445 INFO [STDOUT]
            -------------------------------------------------------
            GMS: address is 166.42.35.16:3568
            -------------------------------------------------------
            14:04:02,524 INFO [DefaultPartition] Number of cluster members: 1
            14:04:02,524 INFO [DefaultPartition] Other members: 0
            14:04:02,524 INFO [DefaultPartition] Fetching state (will wait for 30000 milliseconds):
            14:04:02,524 INFO [DefaultPartition] State could not be retrieved (we are the first member in group)
            14:04:02,602 INFO [HANamingService] Started ha-jndi bootstrap jnpPort=1100, backlog=50, bindAddress=/127.0.0.1
            14:04:02,633 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on /127.0.0.1:1102, group=230.0.0.4, HA-JNDI address=127.0.0.1:1100
            14:04:06,336 INFO [TreeCache] No transaction manager lookup class has been defined. Transactions cannot be used
            14:04:06,930 INFO [STDOUT]
            -------------------------------------------------------
            GMS: address is 166.42.35.16:3573
            -------------------------------------------------------
            14:04:08,930 INFO [TreeCache] viewAccepted(): [166.42.35.16:3573|0] [166.42.35.16:3573]
            14:04:08,946 INFO [TreeCache] TreeCache local address is 166.42.35.16:3573
            14:04:11,336 INFO [TransactionManagerService] JBossTS Transaction Service - JBoss Inc.
            14:04:11,336 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
            14:04:11,430 INFO [tsmxLogger] Registering mbean for module 'arjuna'
            14:04:11,446 INFO [tsmxLogger] Initialising JMX agent com.arjuna.ats.internal.jbossatx.agent.LocalJBossAgentImpl
            14:04:11,461 INFO [tsmxLogger] Registering mbean for module 'jta'
            14:04:11,461 INFO [tsmxLogger] Registering mbean for module 'txoj'
            14:04:11,461 INFO [tsmxLogger] Registering mbean for module 'jts'
            14:04:11,461 INFO [tsmxLogger] Registering mbean for module 'jta'
            14:04:11,477 WARN [ServiceController] Problem starting service jboss:service=TransactionManager
            com.arjuna.common.util.exceptions.ManagementPluginException: com.arjuna.common.util.exceptions.ManagementPluginException: Failed to register mbeans: javax.management.InstanceAlreadyExistsException: com.arjuna.ats.properties:module=jta already registered.
             at com.arjuna.common.internal.util.propertyservice.PropertyManagerImpl.addManagementPlugin(PropertyManagerImpl.java:496)
             at com.arjuna.ats.jbossatx.jts.TransactionManagerService.startService(TransactionManagerService.java:122)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
             at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
            


            • 3. Re: Web Services Transactions
              adinn

              There is a problem displaye din the log here but it is nothing to do with XTS


              14:04:11,461 INFO [tsmxLogger] Registering mbean for module 'jta'
              14:04:11,461 INFO [tsmxLogger] Registering mbean for module 'txoj'
              14:04:11,461 INFO [tsmxLogger] Registering mbean for module 'jts'
              14:04:11,461 INFO [tsmxLogger] Registering mbean for module 'jta'

              It looks like you have installed both the jbossjts and jbossjta jars in your JBoss AS server lib directory. You should only install one of these, along with the version of jbossjta-integration.jar which was built with it. Fix this and try again.


              • 4. Re: Web Services Transactions
                matias.blasi

                Thank you very much! That solved this problem, but now I get this one:


                10:33:51,328 INFO [STDOUT] CLIENT: obtaining userTransaction...
                10:33:51,328 INFO [STDOUT] CLIENT: starting the transaction...
                10:33:51,422 ERROR [[HTTP SOAP Service Multiplexor Servlet]] Servlet.service() para servlet HTTP SOAP Service Multiplexor Servlet lanz¾ excepci¾n
                java.io.IOException: javax.xml.stream.XMLStreamException: [com.arjuna.webservices.wsaddr.AddressingContext_1] - Addressing context is not valid
                 at com.arjuna.webservices.soap.SoapMessageBase.output(SoapMessageBase.java:87)
                 at com.arjuna.webservices.transport.http.HttpServiceMultiplexorServlet.doPost(HttpServiceMultiplexorServlet.java:177)
                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                 at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                 at java.lang.Thread.run(Thread.java:595)
                10:33:51,422 INFO [STDOUT] CLIENT: problem:
                10:33:51,422 INFO [STDOUT] com.arjuna.wst.SystemException: VersionMismatch[html]
                10:33:51,422 INFO [STDOUT] at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.startTransaction(UserTransactionImple.java:232)
                10:33:51,422 INFO [STDOUT] at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.begin(UserTransactionImple.java:105)
                10:33:51,422 INFO [STDOUT] at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.begin(UserTransactionImple.java:95)
                10:33:51,422 INFO [STDOUT] at com.arjuna.xts.nightout.clients.jboss.BasicClient.testAtomicTransaction(BasicClient.java:275)
                10:33:51,438 INFO [STDOUT] at com.arjuna.xts.nightout.clients.jboss.BasicClient.doGet(BasicClient.java:230)
                10:33:51,438 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
                10:33:51,438 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                10:33:51,438 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                10:33:51,438 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                10:33:51,438 INFO [STDOUT] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                10:33:51,438 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                10:33:51,438 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                10:33:51,438 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                10:33:51,438 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                10:33:51,438 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                10:33:51,438 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                10:33:51,438 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                10:33:51,438 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                10:33:51,438 INFO [STDOUT] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                10:33:51,438 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                10:33:51,438 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                10:33:51,438 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                10:33:51,438 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                10:33:51,438 INFO [STDOUT] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                10:33:51,438 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
                


                My request for the xts-demo app is the following:

                http://localhost:8080/xts-demo/basicclient?txType=AtomicTransaction&restaurant=1&theatrecount=1&theatrearea=0&taxi=0&submit=Submit+Booking+Requests
                


                I think that it should be another mistake from me...

                I remember you that I follow the INSTALLA from jbossts-full-4.2.2.GA step by step very carefully, twice...

                Thank you in advance!

                • 5. Re: Web Services Transactions
                  adinn

                  Ok, I believe this is due to a bug that we have patched in a later release -- see the following JIRA for details:


                  http://jira.jboss.com/jira/browse/JBTM-282?page=all


                  The problem detailed in this JIRA is a misplaced flush operation which means the server is not seeing the client data. It manifests as a version mismatch because that is the first thing which is checked. This used to work but was broken when the HTTP code switched to use buffering in the HTTP request output stream.

                  The relevant fixes were made to class

                  XTS/WS-C/dev/src/com/arjuna/webservices/soap/SoapMessageBase.java

                  at the revision detailed in the JIRA. You can either backpatch your release with these changes or upgrade to 4.3.0Beta2.

                  • 6. Re: Web Services Transactions
                    matias.blasi

                    Thank you again!
                    But I'm with problems again.

                    I dowloaded the jbossts-full-4.3.0.BETA2-src.zip, and I am trying to build it:


                    
                    C:\jbossts_430>ant jbossjts
                    ...
                    ...
                     [java] install-all:
                    
                     [java] run_jbossjts:
                    
                     [java] install_integration:
                    
                     [java] com.arjuna.mwlabs.ts.jbossatx.init:
                     [java] [echo] Initialising module atsintegration
                     [java] [echo] Source ID = unknown
                     [java] [echo] Version = unknown
                     [java] [echo] Builder = JBoss Inc. [matias.blasi] (Windows XP 5.1)
                     [java] [echo] Date = 2008/feb/28 19:30
                     [java] [echo] Notes =
                     [java] [mkdir] Created dir: C:\jbossts_430\atsintegration\build\classes
                    
                    
                     [java] com.arjuna.mwlabs.ts.jbossatx.service.compile:
                     [java] [echo] Compiling Transaction JBoss service
                     [java] [javac] Compiling 16 source files to C:\jbossts_430\atsintegrati
                    on\build\classes
                     [java] [javac] C:\jbossts_430\atsintegration\classes\com\arjuna\ats\int
                    ernal\jbossatx\agent\JBossAgentImpl.java:46: cannot access org.jboss.jmx.adaptor
                    .rmi.RMIAdaptor
                     [java] [javac] bad class file: C:\jboss_422\server\all\lib\jmx-adaptor-
                    plugin.jar(org/jboss/jmx/adaptor/rmi/RMIAdaptor.class)
                     [java] [javac] class file has wrong version 49.0, should be 48.0
                     [java] [javac] Please remove or make sure it appears in the correct sub
                    directory of the classpath.
                     [java] [javac] import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
                     [java] [javac] ^
                     [java] [javac] 1 error
                    
                     [java] BUILD FAILED
                     [java] C:\jbossts_430\build.xml:106: The following error occurred while exe
                    cuting this line:
                     [java] C:\jbossts_430\build.xml:141: The following error occurred while exe
                    cuting this line:
                     [java] C:\jbossts_430\atsintegration\build.xml:163: Compile failed; see the
                     compiler error output for details.
                    
                     [java] Total time: 3 minutes 28 seconds
                    
                    BUILD FAILED
                    C:\jbossts_430\build.xml:86: The following error occurred while executing this l
                    ine:
                    C:\jbossts_430\build.xml:49: Java returned: 1
                    
                    Total time: 3 minutes 29 seconds
                    C:\jbossts_430>
                    


                    What am i doing bad???

                    Thank you in advance!

                    • 7. Re: Web Services Transactions
                      matias.blasi

                      Please, excuse me... I was building with jdk1.4 :(

                      I'will continue with the steps... I will give you news soon... :)


                      Thanks...

                      • 8. Re: Web Services Transactions
                        matias.blasi

                        Hello, i am here again...

                        I have downloaded the jbossts-full-4.3.0.BETA2-src.zip... because i didn't find a binary distribution of this version...

                        I have built it, with

                        ant jbossjts
                        target.

                        Later, I have replaced the jbossjts.jar, jbossjts-jacorb.jts, jbossjts-integration.jar, jbossjts-common.jar and jacorb.jar in the jboss_422 folder and jbossts_422 folder with the new generated ones from the jboss_430_b2 src.

                        Before that, I rebuild the xts-demo application, started the jboss as, and deploy the app.

                        Finally i have the same error...
                        13:31:55,295 INFO [STDOUT] com.arjuna.wst.SystemException: VersionMismatch[html]
                        


                        Any idea what is my problem now?

                        Thanks you in advance!

                        • 9. Re: Web Services Transactions
                          matias.blasi

                          Please help me....

                          I couldn't make it work....

                          I need some kind of step by step of how to integrate the jobossts-4.3 with into the jboss-4.2.2GA...

                          I only found the source packaging of the jbossts-4.3 and after build it, i put the jts related jars into the jboss 422 folders... but i still have the same error...

                          I will thank you a lot if you give me some guide...

                          Thanks in advance!
                          Matias.

                          • 10. Re: Web Services Transactions
                            marklittle

                            If you used 'ant jts' in the root then you've only built the JTS. You want to build XTS. Go into XTS and run ant.