Class LocalXAConnectionFactory.LocalXAResource

java.lang.Object
org.apache.tomcat.dbcp.dbcp2.managed.LocalXAConnectionFactory.LocalXAResource
All Implemented Interfaces:
XAResource
Enclosing class:
LocalXAConnectionFactory

protected static class LocalXAConnectionFactory.LocalXAResource extends Object implements XAResource
LocalXAResource is a fake XAResource for non-XA connections. When a transaction is started the connection auto-commit is turned off. When the connection is committed or rolled back, the commit or rollback method is called on the connection and then the original auto-commit value is restored.

The LocalXAResource also respects the connection read-only setting. If the connection is read-only the commit method will not be called, and the prepare method returns the XA_RDONLY.

It is assumed that the wrapper around a managed connection disables the setAutoCommit(), commit(), rollback() and setReadOnly() methods while a transaction is in progress.

Since:
2.0