|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.transaction.TransactionServiceImpl
public class TransactionServiceImpl
Default implementation of Transaction Service.
Default retry behaviour: see RetryingTransactionHelper.RetryingTransactionHelper()
Constructor Summary | |
---|---|
TransactionServiceImpl()
|
Method Summary | |
---|---|
javax.transaction.UserTransaction |
getNonPropagatingUserTransaction()
Gets a user transaction that ensures a new transaction is created. |
javax.transaction.UserTransaction |
getNonPropagatingUserTransaction(boolean readOnly)
Gets a user transaction that ensures a new transaction is created. |
RetryingTransactionHelper |
getRetryingTransactionHelper()
Creates a new helper instance. |
javax.transaction.UserTransaction |
getUserTransaction()
Gets a user transaction that supports transaction propagation. |
javax.transaction.UserTransaction |
getUserTransaction(boolean readOnly)
Gets a user transaction that supports transaction propagation. |
boolean |
isReadOnly()
Determine if ALL user transactions will be read-only. |
void |
setAllowWrite(boolean allowWrite)
Set the read-only mode for all generated transactions. |
void |
setAuthenticationContext(AuthenticationContext authenticationContext)
Sets the authentication context. |
void |
setMaxRetries(int maxRetries)
|
void |
setMaxRetryWaitMs(int maxRetryWaitMs)
|
void |
setMinRetryWaitMs(int minRetryWaitMs)
|
void |
setRetryWaitIncrementMs(int retryWaitIncrementMs)
|
void |
setSysAdminParams(SysAdminParams sysAdminParams)
|
void |
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
Set the transaction manager to use |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransactionServiceImpl()
Method Detail |
---|
public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
transactionManager
- platform transaction managerpublic void setAuthenticationContext(AuthenticationContext authenticationContext)
authenticationContext
- the authentication contextpublic void setSysAdminParams(SysAdminParams sysAdminParams)
public void setAllowWrite(boolean allowWrite)
allowWrite
- false if all transactions must be read-onlypublic boolean isReadOnly()
TransactionService
isReadOnly
in interface TransactionService
public void setMaxRetries(int maxRetries)
RetryingTransactionHelper.setMaxRetries(int)
public void setMinRetryWaitMs(int minRetryWaitMs)
RetryingTransactionHelper.setMinRetryWaitMs(int)
public void setMaxRetryWaitMs(int maxRetryWaitMs)
RetryingTransactionHelper.setMaxRetryWaitMs(int)
public void setRetryWaitIncrementMs(int retryWaitIncrementMs)
RetryingTransactionHelper.setRetryWaitIncrementMs(int)
public javax.transaction.UserTransaction getUserTransaction()
TransactionService
getUserTransaction
in interface TransactionService
TransactionDefinition.PROPAGATION_REQUIRED
public javax.transaction.UserTransaction getUserTransaction(boolean readOnly)
TransactionService
getUserTransaction
in interface TransactionService
readOnly
- Set true for a READONLY transaction instance, false otherwise.
Note that it is not always possible to force a write transaction if the
system is in read-only mode.
TransactionDefinition.PROPAGATION_REQUIRED
public javax.transaction.UserTransaction getNonPropagatingUserTransaction()
TransactionService
getNonPropagatingUserTransaction
in interface TransactionService
TransactionDefinition.PROPAGATION_REQUIRES_NEW
public javax.transaction.UserTransaction getNonPropagatingUserTransaction(boolean readOnly)
TransactionService
getNonPropagatingUserTransaction
in interface TransactionService
readOnly
- Set true for a READONLY transaction instance, false otherwise.
Note that it is not always possible to force a write transaction if the
system is in read-only mode.
TransactionDefinition.PROPAGATION_REQUIRES_NEW
public RetryingTransactionHelper getRetryingTransactionHelper()
getRetryingTransactionHelper
in interface TransactionService
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |