Error in getting connections from two data sources in weblogic.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   roy_ngan
Posted On:   Tuesday, September 11, 2001 01:05 AM

I'm using Weblogic 6.0, my EJB is using container-managed transaction, and I want to make two connections to two different DB. So in Weblogic console, I've created two connection pools, namely localPool and centralPool, and then I've created two different Tx data sources. In my program, I can look up these two data sources successfully, and I can do a System.out.println for them. But when I try to get connections from the 2nd data sources, I got this exception: localDs: weblogic.jdbc.common.internal.RmiDataSource@2f9e98 local connection: weblogic.jdbc.rmi.SerialConnection@130611 centralDs: weblogic.jdbc.common.internal.RmiDataSource@76a882 java.sql.SQLException: Connection h   More>>

I'm using Weblogic 6.0, my EJB is using container-managed transaction, and I want to make two connections to two different DB.


So in Weblogic console, I've created two connection pools, namely localPool and centralPool, and then I've created two different Tx data sources.


In my program, I can look up these two data sources successfully, and I can do a System.out.println for them. But when I try to get connections from the 2nd data sources, I got this exception:

			
localDs: weblogic.jdbc.common.internal.RmiDataSource@2f9e98
local connection: weblogic.jdbc.rmi.SerialConnection@130611
centralDs: weblogic.jdbc.common.internal.RmiDataSource@76a882

java.sql.SQLException: Connection has already been created in this tx context fo
r pool named localPool. Illegal attempt to create connection from another pool:
centralPool
at weblogic.jdbcbase.jts.Driver.getExistingConnection(Driver.java:272)
at weblogic.jdbcbase.jts.Driver.connect(Driver.java:119)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
ce.java:44)


Is there any problem in my set up? Or weblogic does not support two connections in one transaction? Please help.

Regards,
Roy.

   <<Less
About | Sitemap | Contact