2 Replies Latest reply on Mar 29, 2006 8:26 AM by peter.knuts

    JMS + other JDBC operations in a single transaction

    jsalvo

      Hi,

      I am a bit confused with the statement here:

      http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigJBossMQDB

      To quote: "An XA datasource is not required for JBossMQ persistence. All work is done is separate transactions that only includes work on the JBossMQ tables. i.e. there is a single branch so there is no need for two phase commit."

      The reason I ask is that, I want to include in a single transaction ... JMS operations + other JDBC operations. Having said that, I intend to use a single database ( e.g. Sybase ASE ) for persisting JMS messages and for those "other JDBC operations".

      Thus, there will be essentially 2 JDBC connections to the same database ( 1 for JMS and 1 for my direct JDBC operations ) that will have to participate in a single transaction.

      Can this be done with JBoss ? If so, how ... since the link above sort of implies that it cannot be done ( that essentially, the 2 JDBC connections above will have separate transaction contexts ).

      Also, since there is really just one database but 2 connections needing to participate in a transaction ... do I still need an XADataSource ? and do I still need to have my database ( Sybase ASE ) enabled for XA ?