public class OsgiJtaPlatform extends Object implements JtaPlatform
Constructor and Description |
---|
OsgiJtaPlatform(OsgiServiceUtil osgiServiceUtil)
Constructs a OsgiJtaPlatform
|
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterSynchronization()
Can we currently register a
Synchronization ? |
int |
getCurrentStatus()
Obtain the current transaction status using whatever means is preferred for this platform
|
Object |
getTransactionIdentifier(Transaction transaction)
Determine an identifier for the given transaction appropriate for use in caching/lookup usages.
|
void |
registerSynchronization(Synchronization synchronization)
Register a JTA
Synchronization in the means defined by the platform. |
TransactionManager |
retrieveTransactionManager()
Locate the
TransactionManager |
UserTransaction |
retrieveUserTransaction()
Locate the
UserTransaction |
public OsgiJtaPlatform(OsgiServiceUtil osgiServiceUtil)
bundleContext
- The OSGi bundle contextpublic TransactionManager retrieveTransactionManager()
JtaPlatform
TransactionManager
retrieveTransactionManager
in interface JtaPlatform
TransactionManager
public UserTransaction retrieveUserTransaction()
JtaPlatform
UserTransaction
retrieveUserTransaction
in interface JtaPlatform
UserTransaction
public Object getTransactionIdentifier(Transaction transaction)
JtaPlatform
getTransactionIdentifier
in interface JtaPlatform
transaction
- The transaction to be identified.public boolean canRegisterSynchronization()
JtaPlatform
Synchronization
?canRegisterSynchronization
in interface JtaPlatform
Synchronization
is currently allowed; false otherwise.public void registerSynchronization(Synchronization synchronization)
JtaPlatform
Synchronization
in the means defined by the platform.registerSynchronization
in interface JtaPlatform
synchronization
- The synchronization to registerpublic int getCurrentStatus() throws SystemException
JtaPlatform
getCurrentStatus
in interface JtaPlatform
SystemException
- Indicates a problem access the underlying statusCopyright © 2001-2015 Red Hat, Inc. All Rights Reserved.