5 Replies Latest reply on Nov 26, 2007 6:39 AM by dominik heller

    XTS Demo Basic Question

    dominik heller Newbie

      Hi All, I am pretty new to Transactions with Web Services and in particular with JBoss. So I just got started with the XTS Demo and have some basic questions now basically to get to know if I understand everything right, I hope this is the right Forum for this topic.

      For my understanding right now and from what I have read so far the Clientside, in this case the java class BasicClient, uses the JTA to create a transaction, a transactionManager and a transactionContext where as the transactionContext will be send to the web service when invoking.
      In order to establish a communication between the client and the web service the client uses jndi to get the local stub for the web service, right?

      On the web service side the participant which will be enlisted to the transaction wrapps the XARessource and so it works as the ressourceManager, right?

      Ok so my last question, I am in the need for a servlet on the clientside to inform the client about the outcome of the transaction, right?

      THX in advance

        • 1. Re: XTS Demo Basic Question
          Mark Little Master

           

          "odin69" wrote:
          Hi All, I am pretty new to Transactions with Web Services and in particular with JBoss. So I just got started with the XTS Demo and have some basic questions now basically to get to know if I understand everything right, I hope this is the right Forum for this topic.

          For my understanding right now and from what I have read so far the Clientside, in this case the java class BasicClient, uses the JTA to create a transaction,


          No. WS-TX, upon which XTS is based, does not tie itself to JTA. Our WS-TX (WS-AT and WS-BA) implementation uses the same core engine as our JTA implementation(s), but you're not starting and ending JTA transactions. The API is similar to JTA, but it's not identical. When we JSR 156 support in place the current API will vanish in favour of JTA when using WS-AT.

          a transactionManager and a transactionContext where as the transactionContext will be send to the web service when invoking.
          In order to establish a communication between the client and the web service the client uses jndi to get the local stub for the web service, right?


          Erm, what makes you think that?


          On the web service side the participant which will be enlisted to the transaction wrapps the XARessource and so it works as the ressourceManager, right?


          Again, the relationship with JTA is not that tight. You register WS-AT participants that can wrap XAResources, but WS-AT does not tie itself to XA. Our bridging work is more closely related though.


          Ok so my last question, I am in the need for a servlet on the clientside to inform the client about the outcome of the transaction, right?


          You do need some way of actively informing the client of the transaction outcome because the protocol is based on correlated one-way invocations.

          • 2. Re: XTS Demo Basic Question
            dominik heller Newbie

             


            No. WS-TX, upon which XTS is based, does not tie itself to JTA.
            Our WS-TX (WS-AT and WS-BA) implementation uses the same core engine as our JTA implementation(s),
            but you're not starting and ending JTA transactions. The API is similar to JTA, but it's not identical.
            When we JSR 156 support in place the current API will vanish in favour of JTA when using WS-AT.


            Ok I hope I got this right now, so JTA is an API for distributed TX in generall, where as XTS is a seperate API which is similar to JTA using the same core engine and by supporting JSR 156 which is the case using WS-AT then JTA will replace XTS. right?

            Erm, what makes you think that?


            So in the XTS Demo the BasicClient uses jndi to get a Stub of the web services which will be invoked,


            final InitialContext ic = new InitialContext() ;
            final Service service = (Service)ic.lookup(jndiName) ;
            final Stub stub = (Stub)service.getPort(portClass) ;
            stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, url) ;
            return stub ;


            and regarding to the JAX-RPC User Guide to the chapter about Client Proxies it seems to be common practise, right?



            So I hope I got that right and didn't mess up again.

            Thanks for your time and your patience, I really appreciate it.

            • 3. Re: XTS Demo Basic Question
              Mark Little Master

               

              "odin69" wrote:

              No. WS-TX, upon which XTS is based, does not tie itself to JTA.
              Our WS-TX (WS-AT and WS-BA) implementation uses the same core engine as our JTA implementation(s),
              but you're not starting and ending JTA transactions. The API is similar to JTA, but it's not identical.
              When we JSR 156 support in place the current API will vanish in favour of JTA when using WS-AT.


              Ok I hope I got this right now, so JTA is an API for distributed TX in generall,


              No, JTA says nothing about distribution at all. I'd recommend you buy this good book which will answer all your questions. Plus it would make a good Christmas present for someone ;-)


              where as XTS is a seperate API which is similar to JTA


              No. XTS is the name for the entire Web Services transactions component. The XTS API is similar to JTA.


              using the same core engine and by supporting JSR 156 which is the case using WS-AT then JTA will replace XTS. right?


              Almost. It's not JSR 156 compliant yet.


              Erm, what makes you think that?


              So in the XTS Demo the BasicClient uses jndi to get a Stub of the web services which will be invoked,


              final InitialContext ic = new InitialContext() ;
              final Service service = (Service)ic.lookup(jndiName) ;
              final Stub stub = (Stub)service.getPort(portClass) ;
              stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, url) ;
              return stub ;


              and regarding to the JAX-RPC User Guide to the chapter about Client Proxies it seems to be common practise, right?


              I'll let Jonathan comment about the demo specifics, since he wrote it originally. However, XTS doesn't care how you get a handle on your Web Service.


              So I hope I got that right and didn't mess up again.

              Thanks for your time and your patience, I really appreciate it.


              Glad to help.

              • 4. Re: XTS Demo Basic Question
                Jonathan Halliday Master

                The method you use to get a handle on the web services is really up to you. JNDI is used in the demo and is a common choice, but as Mark said it's not essential and not really relevant. The transaction related work all happens in the client and server side handlers, not as part of the lookup.

                • 5. Re: XTS Demo Basic Question
                  dominik heller Newbie

                  Hi Mark and Jonathan, thanks so much for your help.

                  Christmas was quite early this year and so i will put some quality time in reading now, most probably I will come back with some more questions in some days.

                  THX