5 Replies Latest reply on Jul 16, 2014 6:30 AM by mmusgrov

    Can Narayana be used outside an application server?

    nbarrera

      Hi all,

       

      I 've read this article a couple of times already,

      Clarification on the use of the Transaction bridge in a inbound bridging

       

      Still, as this is a quite old post, I 'd like to ask if narayana can be used in a standalone or spring (no jboss) application.

       

      In case this is not possible perhaps somebody knows if there is any document that summarizes all the tests done in the discussion linked above.

       

       

      I thought in using narayana this way because I already have 3 spring applications running and was asked to develop a fourth one as a centralized CRUD application and thought that it would be great that those create operations on several applications could be treated as a spanning transaction using WS-AT, I hope that could be done with-out an application server.

       

      thank you,

       

      Nicolas.-

        • 1. Re: Can Narayana be used outside an application server?
          paul.robinson

          Nicholas,

           

          Can you clarify what you application will look like. In particular:

           

          1) Is there a requirement for both the Web Service client and service to be running outside of an application server?

          2) Is your Web Service client making updates to a transactional resource, such as a database or message queue?

          3) What transactional resource will your Web Service be updating?

           

          Paul.

          • 2. Re: Can Narayana be used outside an application server?
            nbarrera

            Thanks Paul for your quick response,

             

            Here I get more specific:

             

            1) Is there a requirement for both the Web Service client and service to be running outside of an application server?

             

            yes, both should run outside the application server I could consider run the client in an AS but the service is already running in a spring application.

             

            2) Is your Web Service client making updates to a transactional resource, such as a database or message queue?

             

            the client would only call to other webservices (also developed by my team) and those services will update each one a different database. We aim to use WS-AT so that if the third service that is called has a problem with it's database (i.e.: duplicated row exception) then changes to the first and second services' databases were rolledback.

             

            3) What transactional resource will your Web Service be updating?

             

            I think I have answered this in the second, but services would update some XA database.

             

             

            thank you so much again,

             

            Nicolas

            • 3. Re: Can Narayana be used outside an application server?
              paul.robinson

              Nicolas,

               

              The setup you describe is not something we have tried before. Normally our users use WildFly or JBoss EAP as the application server where XTS is automatically setup for them. However, it is theoretically possible to setup XTS with just a JVM in place and thus I'm sure you could get it working with Spring also. However, it is going to be quite a bit of work to setup. In general you will need to make sure all the XTS web services are started and that your application registers the required SOAP handlers. You will also need to make sure that XTS and the transaction manager are initiated correctly. You will also want to make sure the TXBridge is setup correctly too, so that you can bridge between WS-AT and JTA transactions. I think the post you linked to should explain this enough for now, so that you can get a feeling for wether it's something you want to do.

               

              Also, you may want to consider moving your application to run on WildFly or JBoss EAP. This could be less work than getting XTS to run standalone. WildFly and JBoss EAP are very lightweight and fast, so it could be worth considering.

               

              Paul.

              • 4. Re: Can Narayana be used outside an application server?
                slybuford

                out of curiosity, did you ever manage to get this to work?  i'm moving through the post from 2010 and trying to determine how much of that still applies today.

                • 5. Re: Can Narayana be used outside an application server?
                  mmusgrov

                  We have a *lots* of quickstarts (https://github.com/jbosstm/quickstart) that do not require an application server. These include examples that show how to use JTA with technologies such as hibernate, JCA, tomcat etc. If you don't need to use datasources then there are also plenty of other examples you can choose from.