1 Reply Latest reply on Apr 10, 2002 2:51 AM by pra

    JMS->MDB->EJB->Oracle->JMS single uow container transaction?

    duslow

      Our shop is currently using Weblogic 6.1sp2 for our development and production environments. I am doing some prototypes with JBoss 3.0beta to see if our shop can use JBoss as an alternative to Weblogic for our developers and maybe even production boxes.

      Our system consists of an inbound pub/sub JMS queue with MDB consumers. The MDB begins a container transaction, calls a Stateless SessionBean which then acquires a TxDataSource from Weblogic's database connection pool (using Oracle's 8.1.7 thin driver with 2 phase commits turned on) and does some database inserts/updates. If the database inserts/updates are successful, then another JMS message is created and posted to another pub/sub outbound JMS queue.

      If all goes well, the container transaction is committed, the JMS message is considered properly consumed and is removed from the inbound queue, the Oracle data is committed, and an outbound message is posted on the outbound queue.

      If all doesn't go well (ie a System level exception is thrown, or any of the components invoke setRollbackOnly() on the container transaction context) everything (including the database inserts/update and the post to the outbound JMS queue) rolls back. The original message is left on the inbound JMS queue to either be consumed again, or shunted to a 3rd JMS queue that we term our manual work queue.

      Can jBoss provide the same container based transaction control between the persistent points of the JMS queues and an Oracle database? Do I need any 3rd part drivers (aside from the Oracle jdbc thin driver) to tightly couple the multiple persistent resources together in a single, container managed, unit of work?

      BTW: All of these resources are locally allocated in a single non-clustered app server.