1 Reply Latest reply on Feb 25, 2009 6:08 AM by Jonathan Halliday

    JBossTS to manage transactions in cluster environment

    Aleksey Likhvarev Newbie

      I am developing a system that has several middle tier applications working in a cluster. Each of cluster nodes accesses the same database through Hibernate. Right now the HibernateTransactionManager does not satisfy as it does not provide ability to manage distributed transactions. By distributed I mean not databases are distributed but the applications that access the only one database are distributed. So I think any JTA compatible transaction manager should be suitable for that. I think JBoss should fit. But I have not found any example for the situation that I described. Could JBossTS help me? Could I use it for this purposes? Or I need JBossAS with JBossTS for that? Are there any example where JBoss components are used for this kind of "distributed transaction" management?

        • 1. Re: JBossTS to manage transactions in cluster environment
          Jonathan Halliday Master

          > So I think any JTA compatible transaction manager should be suitable for that.

          Have you actually read the JTA spec?

          "A communication resource manager (CRM) supports transaction context propagation and access to the transaction service for incoming and outgoing requests. The JTA document does not specify requirements pertained to communication. Refer to the JTS Specification [2] for more details on interoperability between Transaction Managers."

          Or to put it another way: JTA compatibility does not guarantee context propagation, interoperable or otherwise. If you want to ship a transaction context on business logic calls between JVMs you need a distributed JTA or a JTS. And yes, we do have one but no, it does not work with JBossAS 4.2. But it will with the shiny new EAP 5.0.

          http://www.jboss.org/community/docs/DOC-10804

          BTW, just clustering your app does not necessarily mean you need distributed tx. If the cluster load balancing algorithm is transaction sticky then all the calls for a given tx go to the same node and local tx work fine.