Added read-only option to non-propagating user transactions as well as TransactionUtil methods

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2421 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-02-16 19:37:06 +00:00
parent e5b9b0ccd3
commit 530b2b9026

View File

@@ -48,13 +48,12 @@ public interface TransactionService
* Gets a user transaction that supports transaction propagation.
* This is like the EJB <b>REQUIRED</b> transaction attribute.
*
* @param readonly Set true for a READONLY transaction instance, false otherwise.
* @param readOnly Set true for a READONLY transaction instance, false otherwise.
* Note that it is not <i>always</i> possible to force a write transaction if the
* system is in read-only mode.
*
* @return the user transaction
*/
UserTransaction getUserTransaction(boolean readonly);
UserTransaction getUserTransaction(boolean readOnly);
/**
* Gets a user transaction that ensures a new transaction is created.
@@ -63,7 +62,21 @@ public interface TransactionService
* when the transaction is started, the current transaction will be
* suspended and a new one started.
*
* @return Returns a non-gating user transaction
* @return Returns a non-propagating user transaction
*/
UserTransaction getNonPropagatingUserTransaction();
/**
* Gets a user transaction that ensures a new transaction is created.
* Any enclosing transaction is not propagated.
* This is like the EJB <b>REQUIRES_NEW</b> transaction attribute -
* when the transaction is started, the current transaction will be
* suspended and a new one started.
*
* @param readOnly Set true for a READONLY transaction instance, false otherwise.
* Note that it is not <i>always</i> possible to force a write transaction if the
* system is in read-only mode.
* @return Returns a non-gating user transaction
*/
UserTransaction getNonPropagatingUserTransaction(boolean readOnly);
}