mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
69949: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (4.3/Cloud) 69867: Fix handling of non-propagating transactions embedded in write transactions that have been forced writable (MNT-11310) - Test to demonstrate the failure - Regardless of whether a RetryingTransactionHelper was going to create a new transaction (non-propagating) or not, it did a sanity check of its read-write state against the desired state. This was kicking things out for cases where the RetryingTransactionInterceptor should just have been going along with the current transaction. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@70465 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -360,11 +360,6 @@ public class RetryingTransactionHelper
|
||||
*/
|
||||
public <R> R doInTransaction(RetryingTransactionCallback<R> cb, boolean readOnly, boolean requiresNew)
|
||||
{
|
||||
if (this.readOnly && !readOnly)
|
||||
{
|
||||
throw new AccessDeniedException(MSG_READ_ONLY);
|
||||
}
|
||||
|
||||
// First validate the requiresNew setting
|
||||
if (!requiresNew)
|
||||
{
|
||||
@@ -390,6 +385,15 @@ public class RetryingTransactionHelper
|
||||
throw new RuntimeException("Unknown transaction state: " + readState);
|
||||
}
|
||||
}
|
||||
|
||||
// If we need a new transaction, then we have to check that the read-write request can be served
|
||||
if (requiresNew)
|
||||
{
|
||||
if (this.readOnly && !readOnly)
|
||||
{
|
||||
throw new AccessDeniedException(MSG_READ_ONLY);
|
||||
}
|
||||
}
|
||||
|
||||
// If we are time limiting, set ourselves a time limit and maintain the count of concurrent transactions
|
||||
long startTime = 0;
|
||||
|
Reference in New Issue
Block a user