Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Connection has already been created in this tx context

32 views
Skip to first unread message

null

unread,
Jul 2, 2001, 12:29:56 AM7/2/01
to

WLS60 SP1

A SLSB with 'Required' trans attribute calls two (2) Entity Beans (EBs) with CMP.
All EBs methods have trans attribute = 'Required'. EBs are using _different_ connection
pools.

When second EB is called the following exception is raised. 'Enable Two-Phase
Commit' does not seem to make any difference. Any ideas? Thanks

--------------------------------------------------
javax.ejb.FinderException: Couldn't get connection: java.sql.SQLException: Connection
has already been created in this tx context for pool named Pool_1. Illegal attempt
to create connection from another pool: Pool_2
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(RmiDataSource.java:44)
at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSPersistenceManager.java:256)
...


Rob Woollen

unread,
Jul 2, 2001, 4:11:50 PM7/2/01
to
If you want to enlist a single resource in the transaction, you must specify the same JDBC Connection Pool to
both CMP beans.

If you want multiple resources to participate in an XA transaction, you need to use TxDataSources instead of
connection pools.

-- Rob

Ignaz Wanders

unread,
Jul 23, 2001, 10:23:58 AM7/23/01
to
Rob Woollen wrote:> If you want to enlist a single resource > in the transaction, you must specify the > same JDBC Connection Pool to both CMP > beans.> > If you want multiple resources to > participate in an XA transaction, you > need to use TxDataSources instead of> connection pools.But what if the code you are deploying isunchangeable? I cannot change the DataSourcecasts into XADataSource casts in the JNDIlookups, because I only have the compiled code, not the source code.(BEA's WLPI EJBs using MS SQL7.0 and WLCS EJBs using cloudscape.)How to solve this?Ignaz
0 new messages