Commit a9cb101f authored by Brian Long's avatar Brian Long
Browse files

throw tx exception if NOT_SUPPORTED is used with an active tx

parent 580a9bda
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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()) {