7 Replies Latest reply on Mar 27, 2012 2:26 PM by wdfink

    How to manage a distribute transaction between 2 Session Beans

    warxsg

      Hi all,

       

      I have 2 Session Beans which are deployed in 2 JBoss.

      Well, each SessionBean calls an EntityBean inside to insert some data in a table.

      The situation is the following:

       

      JBoss1 -> ( SessionBean 1 calls EntityBean 1 to insert data in Database 1)

       

      JBoss2 -> ( SessionBean 2 calls EntityBean 2 to insert data in Database 2)

       

      Well, from JBoss1 I must call a Servlet which calls the SessionBean1 and the SessionBean2.

      My purpose is to call SessionBean1 and SessionBean2 in ONE and UNIQUE Transaction.

       

      The situation is the following:

       

       

                     Servlet (deployed in JBoss1) --> | calls SessionBean1 ( deployed in JBoss1)

                                                                    |

                                                                    | calls SessionBean2 ( deployed in JBoss2)

       

       

      The question is : How Could I propagate the Transaction from JBoss1 and JBoss2 ?

      Any suggestion ?

      Cheers.

       

                       zoster