commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Satya (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DBCP-356) ManagedDataSource doesn't work with an active transaction in progress on IBM JDK 6+
Date Wed, 11 May 2011 19:58:47 GMT

    [ https://issues.apache.org/jira/browse/DBCP-356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032004#comment-13032004
] 

Satya commented on DBCP-356:
----------------------------

My application uses BasicManagedDatasource. Transaction management is handled using JOTM.
It is a standalone java application running inside a JVM.
The implementation works on Oracle JDK (1.6.24) but fails when it runs on AIX with an error.

The call that fails is a simple 'getConnection' on the BasicManagedDatsource.
The error logged is:
java.sql.SQLException: Unable to connect to database. Connection does not have a registered
XAResource jdbc:oracle:thin:@xyz:1521:ABCD, UserName=XYZ, Oracle JDBC driver

Is this the same error as in this issue?

If it is, is there a workaround that I can use for the present?


> ManagedDataSource doesn't work with an active transaction in progress on IBM JDK 6+
> -----------------------------------------------------------------------------------
>
>                 Key: DBCP-356
>                 URL: https://issues.apache.org/jira/browse/DBCP-356
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.3, 1.4
>         Environment: IBM JDK 6
> java version "1.6.0"
> Java(TM) SE Runtime Environment (build pwa6460sr9fp1-20110208_03(SR9 FP1))
> IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows 7 amd64-64 jvmwa6460sr9-20110203_74623
(JIT enabled, AOT enabled)
> J9VM - 20110203_074623
> JIT  - r9_20101028_17488ifx3
> GC   - 20101027_AA)
> JCL  - 20110203_01
> commons-dbcp of version 1.3 / 1.4
>            Reporter: an envy guest
>              Labels: ibm, xaresource
>             Fix For: 1.3.1, 1.4.1
>
>
> When using IBM JDK 6+ and trying to build commons-dbcp, these tests fail:
> org.apache.commons.dbcp.managed.TestBasicManagedDataSource
> org.apache.commons.dbcp.managed.TestManagedDataSourceInTx
> with error:
> java.sql.SQLException: Connection does not have a registered XAResource null, UserName=null,
null
> 	at org.apache.commons.dbcp.managed.TransactionRegistry.getXAResource(TransactionRegistry.java:81)
> 	at org.apache.commons.dbcp.managed.TransactionContext.setSharedConnection(TransactionContext.java:88)
> 	at org.apache.commons.dbcp.managed.ManagedConnection.updateTransactionStatus(ManagedConnection.java:131)
> 	at org.apache.commons.dbcp.managed.ManagedConnection.<init>(ManagedConnection.java:55)
> 	at org.apache.commons.dbcp.managed.ManagedDataSource.getConnection(ManagedDataSource.java:76)
> 	at org.apache.commons.dbcp.managed.TestManagedDataSource.getConnection(TestManagedDataSource.java:53)
> 	at org.apache.commons.dbcp.TestConnectionPool.newConnection(TestConnectionPool.java:81)
> 	at org.apache.commons.dbcp.managed.TestManagedDataSourceInTx.testMaxActive(TestManagedDataSourceInTx.java:102)
> When used in conjunction with OpenEJB 3.1.4 examples, the error is the same.
> The problem disappears when switched to Oracle JDK 1.6.24 (so, all tests are passed and
OpenEJB examples are working).
> I beleive this has something to do with differences in java.lang.ref.WeakReference implementations
between IBM and Oracle JDKs, which was already discussed here:
> http://www.mail-archive.com/dev@commons.apache.org/msg13107.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message