Two connections in one transaction
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alex_Buck
Posted On:   Tuesday, January 28, 2003 07:24 AM

Hi, I'm using a stateless Session Bean as a facade to some Entity Beans. All transactions are managed by the container. I want to have access to two connection pools within one transaction. I'm using a DB2 with the COM.ibm.db2.jdbc.app.DB2Driver and an InstantDB with the org.enhydra.instantdb.jdbc.idbDriver. I know that it must be possible as these drivers support XA-Transactions. But with my setup I'm getting a java.sql.SQLException that there cannot be two connections within one transaction. Can anyone give me some hints how to setup my JTA properties for this scenario? BTW, I'm using Weblogic 7.0. Thanks in advance Alex    More>>

Hi,


I'm using a stateless Session Bean as a facade to some Entity Beans. All transactions are managed by the container.


I want to have access to two connection pools within one transaction. I'm using a DB2 with the COM.ibm.db2.jdbc.app.DB2Driver and an InstantDB with the org.enhydra.instantdb.jdbc.idbDriver. I know that it must be possible as these drivers support XA-Transactions.
But with my setup I'm getting a java.sql.SQLException that there cannot be two connections within one transaction. Can anyone give me some hints how to setup my JTA properties for this scenario? BTW, I'm using Weblogic 7.0.


Thanks in advance
Alex

   <<Less

Re: Two connections in one transaction

Posted By:   Nick_Maiorano  
Posted On:   Wednesday, January 29, 2003 07:53 PM

Alex,



This should be possible. Make sure you have configured your connection pool correctly by enabling XA on it. Just because the driver supports XA doesn't mean it does so by default - the connection pool must still be configured to use XA. With weblogic, you can enable XA on the the connection pool directly from the admin console. Or, you can do it directly in the config.xml file. More info can be found here

About | Sitemap | Contact