My Oracle Support Banner

WLS: Logging Last Resource Transaction Optimization Does Not Guarantee ACID (Doc ID 1347613.1)

Last updated on APRIL 06, 2018

Applies to:

Oracle Weblogic Server - Version: 10.3 and later   [Release: and later ]
Information in this document applies to any platform.

Symptoms

WebLogic Server is not throwing an expected transaction exception when there are two datasources in a transaction and one involved table with DEFERRED constraint, thus ACID is not guaranted.

The first datasource is Oracle XA and second one is a non-XA with Global Transactions and Logging Last Resource enable.

Two tables (one with DEFERRED constraint) are updated with these two different datasources then a complete rollback is not executed by the driver (as expected) then it is not ACID complaint.

The expected exception should be something similar to:


weblogic.transaction.RollbackException: ORA-02091: transaction rolled back
ORA-02290: check constraint (TEST1.D1) violated

at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1881)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:345)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:240)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:300)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:294)
at org.example.llrtest.LLRTestServlet.doTransaction(LLRTestServlet.java:64)
at org.example.llrtest.LLRTestServlet.doGet(LLRTestServlet.java:39)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3717)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: weblogic.transaction.nonxa.NonXAException: ORA-02091: transaction rolled back
ORA-02290: check constraint (TEST1.D1) violated

at weblogic.jdbc.wrapper.JTSLoggableResourceImpl.commit(JTSLoggableResourceImpl.java:371)
at weblogic.transaction.internal.NonXAServerResourceInfo.commit(NonXAServerResourceInfo.java:331)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrepare(ServerTransactionImpl.java:2263)


However it is necessary to check the data in the tables if the rollback was successfully done.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.