|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openspaces.core.transaction.DefaultTransactionProvider
public class DefaultTransactionProvider
Defaut 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 | |
---|---|
net.jini.core.transaction.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 byMethod Detail |
---|
public net.jini.core.transaction.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 TransactionProvider
transactionalContext
- Not Used. The transactional context used is the one provided in the constructor.space
- The actual Space this operation will be perfomed on
null
if no transaction is runningpublic PlatformTransactionManager getTransactionManager()
public JiniTransactionHolder getHolder()
public int getCurrentTransactionIsolationLevel(Object transactionalContext)
TransactionProvider
TransactionDefinition.getIsolationLevel()
values). A
transactional context can be passed and optionally used in order to fetch the current running
transaction.
getCurrentTransactionIsolationLevel
in interface TransactionProvider
transactionalContext
- Transactional context to (optionally) fetch the transcation by
TransactionDefinition.getIsolationLevel()
.public boolean isEnabled()
TransactionProvider
true
if this transaction provider is enabled or not.
isEnabled
in interface TransactionProvider
|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |