A JDBC transaction coordinator.

An instance of this type represents a potential transaction or an active transaction at any given time. The begin() method must be called on a transaction to actually initiate a transaction.

This type is effectively an asynchronous adapter to the JDBC Connection class's transactional methods such as Connection.commit() , Connection.setSavepoint() , Connection.rollback() etc.

It also (optionally) manages an execution global binding, analogous to thread local globals with synchronous frameworks such as Spring's transaction management. This allows implicit use of the “current” transaction's connection (see current() and connection() ).

Transaction objects are reusable, but cannot be used concurrently.