This demo shows the usage of JTA transactions over SOAP messaging. It accesses EJBs run on an application server using JNDI connector and calls their methods within JTA transactions. The transactions are delegated over SOAP to the application server using SESJ's implementation of the JTA interface. It also shows how JTA transactions can be called concurrently from multiple threads.
The demo includes a regular SESJ Web service client. We assume that you have deployed SESJ and the EJBs into an application server and have ensured that the EJBs are accessible to SESJ. For the most commonly used application servers, you can use the script 'WASP_HOME/demos/advanced/j2eeIntegration/deployWithEJBs' to make the EJBs accessible. The script creates an enterprise application containing SESJ and EJBs and modifies the environment of your SESJ installation so that URLs of demos point to the deployed SESJ. Properties and classpaths are set so that JMS transport is able to find administered objects and demo clients are able to communicate with the deployed SESJ by SOAP messaging over JMS.
You can find the sources of EJBs used by this demo in the directory 'WASP_HOME/demo/advanced/j2eeIntegration/jndiOverSoap/src'
In addition to the files described in Files and Directories, this demo contains:
File or directory | Description |
---|---|
src/demo/advanced/jtaOverSoap | J2EE client sources |
This demo assumes, that you deployed SESJ and EJBs into some application server and EJBs can be found in the SESJ's context. URLs in all env.bat scripts must be changed according to your deployment.
You can run the demo using "run.sh" or "run.bat" scripts. The script on invocation without arguments prints out a help message.
Demo can be run in the following way:
Compile client and EJBs classes ...
Windows: run.bat make_client Linux: ./run.sh make_client
Run the J2EE client (it calls EJBs within JTA transactions)
Windows: run.bat run_client Linux: ./run.sh run_client
If you wish to follow the progress of the invocation with SoapSpy, perform the following:
Run server_java60/bin/soapspy.bat or soapspy.sh. This will bring up the SoapSpy GUI.
Start spying by selecting Start Spying from the Spy menu or by clicking the spy icon in the main pane.
Run the client using the run spy_client command instead of run_client.