The BTP demonstration is based on a common transaction example: a
travel agency which books both one hotel and one flight in the same
transaction.
The demonstration is composed of 3 Web services:
The TravelAgency will contact both HotelReservation
and FlightReservation to book them in the same
transaction. If a problem occurs (such as no more place in the hotel
or in the flight), the transaction will be rolled back for
both. Otherwise, a reservation will be kept for both of them under the
same transaction ID.
In addition to the travel agency client, there are two other servlets which can be used to supervise SOAP messages, transaction messages, hotel and flight reservation,...
Before installing the demonstration, you'll need to have a correct installation of both Tomcat and Axis (see Prerequisites).
To deploy, in the demo/ directory, type:
$ java org.apache.axis.client.AdminClient deploy.wsddSee Axis documentation to set the CLASSPATH before deploying (so you can find the AdminClient class).
After deployment, start Tomcat and browse at http://localhost:8080/axis/ to check for the deployment status (3 web services, respectively called TravelAgency, HotelReservation and FlightReservation should be deployed).
To simulate a transaction failure, check the Transaction failure simulation... box in the TravelAgencyServlet home page (will cause one of the participants to reject the "prepare" call, then the decider will cancel both participants).
Since all these tasks are really tedious, if you're using CVS version
of JOTM-BTP, there is a simpler way to do.
In jotm-btp/ directory, type:
$ ant demo.jar $ ant demo.copyIt will create the btp-demo.jar jar files and copy all the needed jars in axis/WEB-INF/lib/ directory.
Then, you still have to manually insert content of
demo/btp-web.xml into axis/WEB-INF/web.xml.
Start Tomcat.
In jotm-btp/ directory, type:
$ ant demo.deployThat's it!