What will happen when 2 entity beans having different transaction attribute involve in a transaction?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   bhavani_prabakaran
Posted On:   Monday, July 29, 2002 12:08 AM

I am using Weblogic App Server(v5.1). I have 2 Entity Beans,, myBeanA and myBeanB Both using Container managed transaction. {myBeanA has business methodX() whose Transaction attribute is set to Required in the XML descriptor.} {myBeanB has business methodY() whose Transaction attribute is set to RequiresNew in the XML descriptor.} My servlet calls methodX() in BeanA which does the following and in the sequence mentioned below: 1. Updates Database DB1 (uses a connection from connection Pool P1). 2. Looks up for BeanB and calls methodY(). methodY() updates another Database DB2(uses a DB connection from connection Pool P2). ----------I have 2 questions:- (1) If there is run time exception in methodY() which will rollback the Transaction of DB2. Will it also rollback the T   More>>

I am using Weblogic App Server(v5.1). I have 2 Entity Beans,, myBeanA and myBeanB Both using Container managed transaction. {myBeanA has business methodX() whose Transaction attribute is set to Required in the XML descriptor.} {myBeanB has business methodY() whose Transaction attribute is set to RequiresNew in the XML descriptor.} My servlet calls methodX() in BeanA which does the following and in the sequence mentioned below: 1. Updates Database DB1 (uses a connection from connection Pool P1). 2. Looks up for BeanB and calls methodY(). methodY() updates another Database DB2(uses a DB connection from connection Pool P2). ----------I have 2 questions:- (1) If there is run time exception in methodY() which will rollback the Transaction of DB2. Will it also rollback the Transaction of DB1?(Note the Transaction attributes I have mentioned)----- (2)Is it Illegal to use connections from 2 diffrent pools in the same Transaction? (3)How will the transaction flow take place

   <<Less
About | Sitemap | Contact