2 Replies Latest reply on Mar 23, 2011 12:28 PM by thegroove

    Howto implement Webservice Transactionmanagement


      Hello Everyone,


      I would like to implement an compensation mechanism for webservice calls that write into other systems (using JAX-WS). I call webservices from my (stateless) EJB Services.


      I thought of implementing an undo mechanism via the command pattern. A webservice - call represents a command. I could the put all the webservice calls on a stack and if something went wrong during the transaction, the sucessfully called webservices are taken from the stack, and the undo method gets called.


      I am sure this problem is not a new one: it sounds pretty much like implementing a Transaction manager. I dont want to reinvent the wheel. Could I do so by implementing some API (maybe via JCA?`or using mbeans?)



      What is the right way to do this?


      Any help highly appreciated!




        • 1. Re: Howto implement Webservice Transactionmanagement

          Hi Alexander,


          JBoss supervised a Master's student project on this theme which was presented at JavaOne 2007 which you can download as both binary and source.


          I am currently reworking  this code to integrate it with JBossTS and XTS. The current plan is to have it available in JBossTS 4.15 and from there to eventually include it as a supported product in EAP 6.0.

          • 2. Howto implement Webservice Transactionmanagement

            Salut Andrew,

            Salut Alexander,


            would'nt it be a better solution to implement a managed client

            webservice as with a conector mechanism.

            I think i would be an advantage to get my ressource out

            of a pool of connection. Beside it would be preferable, to

            have watermarks, in oder to limit the use of connections.


            Last not least the configuration is a task, that needs to

            be acomplished. Timeout and overwritten target URL

            need to be managed, cause nobody wants to use the

            default target given by a wsdl file.


            Any overridden parametes should be stored in a datasource-file,

            that should stay, regardless iff the aplication has been undeployed

            or broght back into business.


            Maybe we can provide a sort of generic connector, that

            gets a wsdl a dynymic template pater, in order to generate

            the filter files while deploying the app.




            I think a