|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openspaces.core.transaction.DefaultTransactionProvider
public class DefaultTransactionProvider
Default transaction provider works in conjunction with
JiniPlatformTransactionManager
and one of its derived classes. Uses Spring support for transactional resource binding (using
thread local) in order to get the current transaction. If no transaction is active, will return
null (which means the operation will be executed under no transaction).
Also supports for Spring JTA transaction by automatically creating and binding GigaSpaces support for XA.
As a transaction context it uses the one passed to its constructor, and not the runtime
transactional context provided to getCurrentTransaction(Object,com.j_spaces.core.IJSpace)
AbstractJiniTransactionManager,
GigaSpaceFactoryBean,
JiniTransactionHolder,
TransactionSynchronizationManager| Constructor Summary | |
|---|---|
DefaultTransactionProvider(Object actualTransactionalContext,
PlatformTransactionManager transactionManager)
Creates a new transaction provider. |
|
| Method Summary | |
|---|---|
void |
destroy()
|
Transaction.Created |
getCurrentTransaction(Object transactionalContext,
IJSpace space)
Returns the current running transaction based on the constructor provided transactional context (Note that the passed transactional context is not used). |
int |
getCurrentTransactionIsolationLevel(Object transactionalContext)
Returns the currently running transaction isolation level (mapping to Spring TransactionDefinition.getIsolationLevel() values). |
JiniTransactionHolder |
getHolder()
|
PlatformTransactionManager |
getTransactionManager()
|
boolean |
isEnabled()
Returns true if this transaction provider is enabled or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultTransactionProvider(Object actualTransactionalContext,
PlatformTransactionManager transactionManager)
actualTransactionalContext - The transactional context to fetch the transaction by| Method Detail |
|---|
public Transaction.Created getCurrentTransaction(Object transactionalContext,
IJSpace space)
Uses Spring support for transactional resource registration in order to fetch the current
running transaction (or the JiniTransactionHolder. An example of Spring platform
transaction managers that register it are ones derived form
AbstractJiniTransactionManager.
If no transaction is found bound the the transactional context (provided in the constructor),
null is returned. This means that operations will execute without a
transaction.
getCurrentTransaction in interface TransactionProvidertransactionalContext - Not Used. The transactional context used is the one provided in the constructor.space - The actual Space this operation will be performed on
null if no transaction is runningpublic PlatformTransactionManager getTransactionManager()
public JiniTransactionHolder getHolder()
public int getCurrentTransactionIsolationLevel(Object transactionalContext)
TransactionProviderTransactionDefinition.getIsolationLevel() values). A
transactional context can be passed and optionally used in order to fetch the current running
transaction.
getCurrentTransactionIsolationLevel in interface TransactionProvidertransactionalContext - Transactional context to (optionally) fetch the transaction by
TransactionDefinition.getIsolationLevel().public boolean isEnabled()
TransactionProvidertrue if this transaction provider is enabled or not.
isEnabled in interface TransactionProvider
public void destroy()
throws RemoteException
RemoteException
|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||