Community
Participate
Working Groups
Build Identifier: 1.0.2 We're having problems using eclipselink with Weblogic data source. We were able to get connection successfully from Weblogic data source connection pool but we encountered an issue which seems to be related to JTA. In one of our operation we acquire an UnitOfWork object from client session and acquire another UnitOfWork object from same session to read some stuffs from DB, release it, and finally commit the first UnitOfWork object. It looks like: // acquire first UnitOfWork object UnitOfWork uow1 = clientSession.acquireUnitOfWork(); // do some work with uow1 .... // acquire another UnitOfWork UnitOfWork uow2 = clientSession.acquireUnitOfWork(); // read things from DB uow2.executeQuery(); // release 2nd UnitOfWork object uow2.release(); // do some more work with uow1 ... // commit uow1 uow1.commit(); However we got the following error: org.eclipse.persistence.exceptions.TransactionException: Exception Description: Error committing externally managed transaction Internal Exception: weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion: sync=org.eclipse.persistence.transaction.JTASynchronizationListener@2c0e5a1 Exception Description: UnitOfWork [UnitOfWork( DatabaseAccessor(connected) Oracle11Platform)] was rendered inactive before associated externally managed transaction was complete. We didn't want to use external JTA controller so in sessions.xml we have <external-transaction-controller>false</external-transaction-controller> Also in Weblogic data source configuration we disabled "Supports Global Transactions" for our data source. Not sure why it still complained about JTA. Just wonder if we missed anything? Appreciate for the help! Reproducible: Always Steps to Reproduce: 1. configure non-JTA data source in Weblogic 2. configure sessions.xml to use external connection pool while not using external transaction controller 3. acquire first UnitOfWork from ClientSession 4. acquire second UnitOfWork from same ClientSession 5. execute read query from second UnitOfWork and then release 2nd UnitOfWork 6. commit first UnitOfWork and get the following error: org.eclipse.persistence.exceptions.TransactionException: Exception Description: Error committing externally managed transaction Internal Exception: weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion: sync=org.eclipse.persistence.transaction.JTASynchronizationListener@2c0e5a1
It appears to be using an external transaction controller. Can you show the code that bootstraps the shared server session reading the sessions.xml file?
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink