O'Reilly logo

Sams Teach Yourself EJB in 21 Days by Krishna Kothapalli, Ragae Ghaly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Example of Distributed Transactions

Today's example is to implement a distributed transaction that accesses two resource managers: a JDBC resource manager and a JMS provider. The example runs in both the WebLogic and JBoss server environments. The PointBase database is used for the WebLogic Server, and the HyperSonic database for JBoss server, whereas each server provides JMS service separately.

The example consists of a stateless session bean, UserManager, which uses JTA's distributed transaction to perform the following tasks as one unit of work:

  • Updates the database with student information

  • Sends a JMS message to the registration office

The registration office is modeled as a message-driven bean: RegistrarMDB.

Figure 16.4 depicts the components ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required