com.atomikos.datasource
Interface TransactionalResource
- All Superinterfaces:
- RecoverableResource
- All Known Implementing Classes:
- AcceptAllXATransactionalResource, JcaTransactionalResource, JdbcTransactionalResource, JmsTransactionalResource, TemporaryXATransactionalResource, XATransactionalResource
public interface TransactionalResource
- extends RecoverableResource
A Transactional Resource is the abstraction of a data source that
supports transactions and recovery.
getResourceTransaction
ResourceTransaction getResourceTransaction(CompositeTransaction ct)
throws IllegalStateException,
ResourceException
- Get or create a ResourceTransaction. This instructs the resource
to internally start a context for a new transaction.
If the resource decides to return a new instance, it should
also make sure that before returning, the new resource
transaction is registered as a participant for the current
composite transaction.
- Parameters:
ct
- The composite transaction for whom this is done.
This serves as a handle for the resource to determine isolation
properties, coordinator reference and so on.
For instance, XA implementations can use the isSameTransaction()
function to determine if an existing XID should be used to
start the internal XAResource before passing it on as a
ResourceTransaction (wrapped) instance.
- Returns:
- ResourceTransaction a handle to the new context.
- Throws:
IllegalStateException
- If the given transaction is no longer
active.
ResourceException
- On failure.
Copyright © 2011. All Rights Reserved.