Interface GlobalTransactionManager
-
- All Superinterfaces:
ADEPT2Service
public interface GlobalTransactionManager extends ADEPT2Service
AGlobalTransactionManager
handles transactions globally, this can be either service-specific, spanning several services, spanning several databases or even several database management systems.
In the most simplest case, it just provides aTxManager
handling transactions. This handles transactions that span several method calls without having the need to provide the correspondingConnection
as parameter to each of the involved methods. By sharing oneTxManager
by several services (but the very same database), transactions can span several services easily.- Author:
- Ulrich Kreher
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TxManager<SessionToken>
getTxManager(JDBCDataSource dataSource)
Gets a transaction manager based onSessionToken
for the designated data source.-
Methods inherited from interface de.aristaflow.adept2.base.service.ADEPT2Service
getLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, start
-
-
-
-
Method Detail
-
getTxManager
TxManager<SessionToken> getTxManager(JDBCDataSource dataSource)
Gets a transaction manager based onSessionToken
for the designated data source. This may be a newTxManager
(and therefore service-specific) or a transaction manager used by several services.
It is crucial for using services to only retrieve their transaction manager once!- Parameters:
dataSource
- The data source of the using service to be wrapped by a transaction manager.- Returns:
- A new transaction manager wrapping the designated data source or a transaction manager shared by several services.
-
-