arjuna logoarjuna strap line


print this page
email this page

You can begin experimenting with the XML Transaction component of JBoss 4.3.0 by editing the sample application source code, which is heavily commented to assist your understanding. The source code can be found in the <jbossts 4.3.0 install>demo/src directory. Deployment descriptors for the application can be found iin directory <jbossts 4.3.0 install>demo/dd. (corresponding files for the JaxRPC implementation are in directories <jbossts 4.3.0 install>demo/srcrpc and <jbossts 4.3.0 install>demo/ddrpc).

It is structured as follows:

  • com/jboss/jbosstm/xts/demo/

    • client/BasicClient.java:

      A servlet that processes the form input and runs either an Atomic Transaction (AT) or Business Activity (BA) to make the bookings.

      This servlet uses the JBossWS JaxWS implementation as the SOAP transport library.

      Method configureClientHandler installs the JBoss handler on the JaxWS service endpoint proxies. This ensurs that the client's AT or BA transaction context is propagated to the web services when their remote methods are invoked.

    • restaurant/* :

      JaxWS client interfaces for accessing the remote restaurant web services via JaxWS service proxies.

    • taxi/* :

      JaxWS client interfaces for accessing the remote taxi web services via JaxWS service proxies.

    • theatre/* :

      JaxWS client interfaces for accessing the remote theatre web services via JaxWS service proxies.

    • services/[restuarant|taxi|theatre]/* :

      JaxWS service endpoint implementation classes

      Each of these three Web services has similar structure, featuring a *Manager.java class (the transactional business logic, knowing nothing of Web services), a *View.java file (the GUI component, largely tool generated), and the files that expose the business logic as transactional JaxWS Web services.

      In the filenames, AT denotes Atomic Transaction, whilst BA is for Business Activities.

      The *ServiceAT/BA.java file is the business interface, whilst the *Participant.java file has the transaction management code.

      The *ServiceAT/BA classes expose their JaxWS SEI methods using 'javax.jws.WebService' and 'javax.jws.WebMethod' annotations.

      A 'javax.jws.HandlerChain' annotation identifies a handler chain deployment descriptor file deployed with the demo applciation. This decriptor configures the services with handlers that run SEI method invocations in the transaction context propagated from the client.

Copyright 2002-2005 Arjuna Technologies All Rights Reserved.
info@arjuna.com +44 191 243 0676