Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 3
0
 /**
  * Propagation: NEVER
  *
  * <pre>{@code
  * None -> None
  * T1   -> Error
  * }</pre>
  */
 protected JtxTransaction propNever(
     JtxTransaction currentTx, JtxTransactionMode mode, Object scope) {
   if ((currentTx != null) && (currentTx.isNoTransaction() == false)) {
     throw new JtxException("Existing TX found for TX marked with propagation 'never'");
   }
   if (currentTx == null) {
     currentTx = createNewTransaction(mode, scope, false);
   }
   return currentTx;
 }
Ejemplo n.º 4
0
 /**
  * Propagation: NOT_SUPPORTED
  *
  * <pre>{@code
  * None -> None
  * T1   -> None
  * }</pre>
  */
 protected JtxTransaction propNotSupported(
     JtxTransaction currentTx, JtxTransactionMode mode, Object scope) {
   if (currentTx == null) {
     return createNewTransaction(mode, scope, false);
   }
   if (currentTx.isNoTransaction() == true) {
     return currentTx;
   }
   return createNewTransaction(mode, scope, false);
 }
Ejemplo n.º 5
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;
 }