I created two XA datasource and getting connection from both datasource in
same transaction. I'm getting below exeception when i try to get connection
from second data source
Caused by: java.sql.SQLException: Unable to enlist connection in
transaction: enlistResource returns 'false'.
at
org.apache.openejb.resource.jdbc.managed.local.ManagedConnection.invoke(ManagedConnection.java:136)
at com.sun.proxy.$Proxy82.prepareStatement(Unknown Source)
TomEE Version: 7.0.2
Database: Oracle
Here are the datasource configurations
<Resource id="jdbc/default" type="DataSource">
XaDataSource XA/Datasource
UserName $UserName$
Password $Password$
PasswordCipher TestCipher
maxActive = 40
minIdle = 2
validationQuery = select 1 from dual
testOnBorrow = true
validationInterval = 30000
</Resource>
<Resource id="jdbc/common" type="DataSource">
XaDataSource XA/Datasource
UserName $UserName$
Password $Password$
PasswordCipher TestCipher
maxActive = 20
minIdle = 2
validationQuery = select 1 from dual
testOnBorrow = true
validationInterval = 30000
</Resource>
<Resource id="XA/Datasource"
class-name="oracle.jdbc.xa.client.OracleXADataSource">
Url $JdbcUrl$
</Resource>
Note: I'm not seeing this issue when i use PostgreSQL database
Thank You.
--
View this message in context:
http://tomee-openejb.979440.n4.nabble.com/Unable-to-use-two-XA-Datasource-in-a-same-transaction-tp4681579.html
Sent from the TomEE Dev mailing list archive at Nabble.com.