Multiple Connection and transaction
1 posts in topic
Flat View  Flat View

Posted By:   sathya_nagarajan
Posted On:   Friday, February 7, 2003 07:13 AM

I have a method in a session bean whose transaction attribute is set to TX_REQUIRED, from this method i'm invoking two DAO's and each DAO gets a new connection object and performs it's operation. My question is if an exception occurs in the second DAo, will the operation performed by the first DAO be rollbacked? Can operations done in multiple connections be rollbacked when they are in single transaction

Re: Multiple Connection and transaction

Posted By:   abhishek_roy  
Posted On:   Friday, February 7, 2003 08:40 AM

First. Your DAO's are connecting to same Database or different?

Second, Which Application Server you are using.

In Weblogic atleaset currently, the transaction manager in EJB does not have logging, which is a requirement for handling transactions across multiple databases. So its does not support multiple Database. If you have DAO's for same database, instead of making new connection every time, you can use common connection pool for all your DAO's and transaction will work absolutely fine on all the App Server. Not sure in the way you are doing. Why dont you test it and let me know too if its works.

About | Sitemap | Contact