mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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@2420 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -99,4 +99,18 @@ public class TransactionComponent implements TransactionService
|
||||
TransactionDefinition.TIMEOUT_DEFAULT);
|
||||
return txn;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.springframework.transaction.TransactionDefinition#PROPAGATION_REQUIRES_NEW
|
||||
*/
|
||||
public UserTransaction getNonPropagatingUserTransaction(boolean readOnly)
|
||||
{
|
||||
SpringAwareUserTransaction txn = new SpringAwareUserTransaction(
|
||||
transactionManager,
|
||||
(readOnly | this.readOnly),
|
||||
TransactionDefinition.ISOLATION_DEFAULT,
|
||||
TransactionDefinition.PROPAGATION_REQUIRES_NEW,
|
||||
TransactionDefinition.TIMEOUT_DEFAULT);
|
||||
return txn;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user