示例#1
0
 /**
  * Propagation: MANDATORY
  *
  * <pre>{@code
  * None -> Error
  * T1   -> T1 (cont.)
  * }</pre>
  */
 @SuppressWarnings({"UnusedDeclaration"})
 protected JtxTransaction propMandatory(
     JtxTransaction currentTx, JtxTransactionMode mode, Object scope) {
   if ((currentTx == null) || (currentTx.isNoTransaction() == true)) {
     throw new JtxException("No existing TX found for TX marked with propagation 'mandatory'");
   }
   continueTx(currentTx, mode);
   return currentTx;
 }
示例#2
0
 /**
  * Propagation: REQUIRED
  *
  * <pre>{@code
  * None -> T2
  * T1   -> T1 (cont.)
  * }</pre>
  */
 protected JtxTransaction propRequired(
     JtxTransaction currentTx, JtxTransactionMode mode, Object scope) {
   if ((currentTx == null) || (currentTx.isNoTransaction() == true)) {
     currentTx = createNewTransaction(mode, scope, true);
   } else {
     continueTx(currentTx, mode);
   }
   return currentTx;
 }
示例#3
0
 /**
  * Propagation: SUPPORTS
  *
  * <pre>{@code
  * None -> None
  * T1   -> T1 (cont.)
  * }</pre>
  */
 protected JtxTransaction propSupports(
     JtxTransaction currentTx, JtxTransactionMode mode, Object scope) {
   if ((currentTx != null) && (currentTx.isNoTransaction() != true)) {
     continueTx(currentTx, mode);
   }
   if (currentTx == null) {
     currentTx = createNewTransaction(mode, scope, false);
   }
   return currentTx;
 }