throw tx exception if NOT_SUPPORTED is used with an active tx
This commit is contained in:
@@ -136,8 +136,14 @@ public class RetryingTransactionAspect {
|
||||
if (txl.isReadOnly())
|
||||
throw new IllegalTransactionStateException("A read/write transaction exists where a read-only one is mandatory");
|
||||
}
|
||||
case NOT_SUPPORTED:
|
||||
switch (AlfrescoTransactionSupport.getTransactionReadState()) {
|
||||
case TXN_NONE:
|
||||
return false;
|
||||
default:
|
||||
throw new IllegalTransactionStateException("A transaction exists and pausing it is not supported");
|
||||
}
|
||||
case SUPPORTS:
|
||||
//case NOT_SUPPORTED: not supported; we would have to create another thread to simulate
|
||||
return false;
|
||||
case REQUIRED:
|
||||
switch (AlfrescoTransactionSupport.getTransactionReadState()) {
|
||||
|
||||
Reference in New Issue
Block a user