| 
GigaSpaces XAP 8.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.transaction.support.AbstractPlatformTransactionManager
org.openspaces.core.transaction.manager.AbstractJiniTransactionManager
public abstract class AbstractJiniTransactionManager
Base class for Jini implementation of Springs PlatformTransactionManager. Uses Jini
 TransactionManager in order to manage transactions with sub classes responsible for
 providing it using doCreateTransactionManager().
 
Jini transactions are bounded under the setTransactionalContext(Object) using Springs
 TransactionSynchronizationManager.bindResource(Object,Object). The transactional context
 is optional and defaults to the Jini TransactionManager instance. Note, this can be
 overridden by sub classes.
 
By default the transaction timeout will be 90 seconds. The default timeout on the
 transaction manager level can be set using AbstractPlatformTransactionManager.setDefaultTimeout(int). If the timeout is
 explicitly set using Spring support for transactions (for example using
 TransactionDefinition) this value will be used.
DefaultTransactionProvider, 
JiniTransactionHolder, 
Serialized Form| Nested Class Summary | |
|---|---|
static class | 
AbstractJiniTransactionManager.JiniTransactionObject
Jini Transaction object.  | 
static class | 
AbstractJiniTransactionManager.UnexpectedTransactionException
 | 
| Nested classes/interfaces inherited from class org.springframework.transaction.support.AbstractPlatformTransactionManager | 
|---|
AbstractPlatformTransactionManager.SuspendedResourcesHolder | 
| Field Summary | |
|---|---|
protected  String | 
beanName
 | 
protected static String | 
SERVICE_TYPE
 | 
| Fields inherited from class org.springframework.transaction.support.AbstractPlatformTransactionManager | 
|---|
logger, SYNCHRONIZATION_ALWAYS, SYNCHRONIZATION_NEVER, SYNCHRONIZATION_ON_ACTUAL_TRANSACTION | 
| Constructor Summary | |
|---|---|
AbstractJiniTransactionManager()
 | 
|
| Method Summary | |
|---|---|
 void | 
afterPropertiesSet()
 | 
protected  void | 
applyIsolationLevel(AbstractJiniTransactionManager.JiniTransactionObject txObject,
                    int isolationLevel)
 | 
protected  RuntimeException | 
convertJiniException(Exception exception)
 | 
 void | 
destroy()
 | 
protected  void | 
doBegin(Object transaction,
        TransactionDefinition definition)
 | 
protected  void | 
doCleanupAfterCompletion(Object transaction)
 | 
protected  void | 
doCommit(DefaultTransactionStatus status)
 | 
protected abstract  TransactionManager | 
doCreateTransactionManager()
Implemented by sub classes to provide a Jini TransactionManager. | 
protected  Object | 
doGetTransaction()
 | 
protected  void | 
doJiniBegin(AbstractJiniTransactionManager.JiniTransactionObject txObject,
            TransactionDefinition definition)
 | 
protected  void | 
doResume(Object transaction,
         Object suspendedResources)
 | 
protected  void | 
doRollback(DefaultTransactionStatus status)
 | 
protected  void | 
doSetRollbackOnly(DefaultTransactionStatus status)
 | 
protected  Object | 
doSuspend(Object transaction)
 | 
 String | 
getBeanName()
 | 
 Object | 
getTransactionalContext()
Returns the transactional context the jini transaction is bounded under (usually using Spring synchronization which is based on thread local).  | 
 TransactionManager | 
getTransactionManager()
 | 
protected  boolean | 
isExistingTransaction(Object transaction)
 | 
protected  String | 
logMessage(String message)
 | 
 void | 
setBeanName(String beanName)
 | 
 void | 
setCommitTimeout(Long commitTimeout)
Sets an optional timeout when performing commit in milliseconds.  | 
 void | 
setLeaseRenewalConfig(TransactionLeaseRenewalConfig leaseRenewalConfig)
Sets the transaction lease renewal configuration.  | 
 void | 
setRollbackTimeout(Long rollbackTimeout)
Sets an optional timeout when performing rollback/abort in milliseconds.  | 
 void | 
setTransactionalContext(Object txResource)
 | 
protected  boolean | 
useSavepointForNestedTransaction()
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface org.springframework.transaction.PlatformTransactionManager | 
|---|
commit, getTransaction, rollback | 
| Methods inherited from interface org.openspaces.pu.service.ServiceDetailsProvider | 
|---|
getServicesDetails | 
| Field Detail | 
|---|
protected static final String SERVICE_TYPE
protected String beanName
| Constructor Detail | 
|---|
public AbstractJiniTransactionManager()
| Method Detail | 
|---|
public void setBeanName(String beanName)
setBeanName in interface BeanNameAwarepublic String getBeanName()
getBeanName in interface JiniPlatformTransactionManagerpublic Object getTransactionalContext()
JiniPlatformTransactionManager
getTransactionalContext in interface JiniPlatformTransactionManagerpublic void setTransactionalContext(Object txResource)
public void setCommitTimeout(Long commitTimeout)
DEFAULT_TX_COMMIT_TIMEOUT.
public void setRollbackTimeout(Long rollbackTimeout)
DEFAULT_TX_ROLLBACK_TIMEOUT.
public void setLeaseRenewalConfig(TransactionLeaseRenewalConfig leaseRenewalConfig)
protected abstract TransactionManager doCreateTransactionManager()
                                                          throws Exception
TransactionManager.
Exceptionpublic TransactionManager getTransactionManager()
public void afterPropertiesSet()
                        throws Exception
afterPropertiesSet in interface InitializingBeanException
public void destroy()
             throws Exception
destroy in interface DisposableBeanException
protected Object doGetTransaction()
                           throws TransactionException
doGetTransaction in class AbstractPlatformTransactionManagerTransactionException
protected void doBegin(Object transaction,
                       TransactionDefinition definition)
                throws TransactionException
doBegin in class AbstractPlatformTransactionManagerTransactionException
protected void doJiniBegin(AbstractJiniTransactionManager.JiniTransactionObject txObject,
                           TransactionDefinition definition)
protected void applyIsolationLevel(AbstractJiniTransactionManager.JiniTransactionObject txObject,
                                   int isolationLevel)
                            throws InvalidIsolationLevelException
InvalidIsolationLevelException
protected void doCommit(DefaultTransactionStatus status)
                 throws TransactionException
doCommit in class AbstractPlatformTransactionManagerTransactionException
protected boolean isExistingTransaction(Object transaction)
                                 throws TransactionException
isExistingTransaction in class AbstractPlatformTransactionManagerTransactionException
protected void doRollback(DefaultTransactionStatus status)
                   throws TransactionException
doRollback in class AbstractPlatformTransactionManagerTransactionExceptionprotected void doCleanupAfterCompletion(Object transaction)
doCleanupAfterCompletion in class AbstractPlatformTransactionManager
protected void doSetRollbackOnly(DefaultTransactionStatus status)
                          throws TransactionException
doSetRollbackOnly in class AbstractPlatformTransactionManagerTransactionException
protected void doResume(Object transaction,
                        Object suspendedResources)
                 throws TransactionException
doResume in class AbstractPlatformTransactionManagerTransactionException
protected Object doSuspend(Object transaction)
                    throws TransactionException
doSuspend in class AbstractPlatformTransactionManagerTransactionExceptionprotected boolean useSavepointForNestedTransaction()
useSavepointForNestedTransaction in class AbstractPlatformTransactionManagerprotected RuntimeException convertJiniException(Exception exception)
protected String logMessage(String message)
  | 
GigaSpaces XAP 8.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||