Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ public static Map<String, Object> payPalCheckoutUpdate(DispatchContext dctx, Map
boolean beganTransaction = false;
Transaction parentTransaction = null;
try {
parentTransaction = TransactionUtil.suspend();
if (TransactionUtil.isTransactionInPlace()) {
parentTransaction = TransactionUtil.suspend();
}
beganTransaction = TransactionUtil.begin();
} catch (GenericTransactionException e1) {
Debug.logError(e1, MODULE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5623,7 +5623,9 @@ public static Map<String, Object> callProcessOrderPayments(DispatchContext dctx,
Transaction trans = null;
try {
// disable transaction processing
trans = TransactionUtil.suspend();
if (TransactionUtil.isTransactionInPlace()) {
trans = TransactionUtil.suspend();
}

// get the cart
ShoppingCart cart = (ShoppingCart) context.get("shoppingCart");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ public static boolean userLogin(DispatchContext ctx, Map<String, ?> context) {
boolean beganTransaction = false;
try {
try {
parentTx = TransactionUtil.suspend();
if (TransactionUtil.isTransactionInPlace()) {
parentTx = TransactionUtil.suspend();
}
} catch (GenericTransactionException e) {
Debug.logError(e, "Could not suspend transaction: " + e.getMessage(), MODULE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,9 @@ public static Map<String, Object> userLogin(DispatchContext ctx, Map<String, ?>

try {
try {
parentTx = TransactionUtil.suspend();
if (TransactionUtil.isTransactionInPlace()) {
parentTx = TransactionUtil.suspend();
}
} catch (GenericTransactionException e) {
Debug.logError(e, "Could not suspend transaction: " + e.getMessage(), MODULE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ private void fillBank(long stagger) {

Transaction suspendedTransaction = null;
try {
suspendedTransaction = TransactionUtil.suspend();
if (TransactionUtil.isTransactionInPlace()) {
suspendedTransaction = TransactionUtil.suspend();
}

boolean beganTransaction = false;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ public void schedule(String jobName, String poolName, String serviceName, Map<St
Transaction suspendedTransaction = null;
try {
boolean beganTransaction = false;
suspendedTransaction = TransactionUtil.suspend();
if (TransactionUtil.isTransactionInPlace()) {
suspendedTransaction = TransactionUtil.suspend();
}
try {
beganTransaction = TransactionUtil.begin();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ private static boolean recordPathMapping(Delegator delegator, String path, Strin
Transaction trans = null;
try {
try {
trans = TransactionUtil.suspend();
if (TransactionUtil.isTransactionInPlace()) {
trans = TransactionUtil.suspend();
}
TransactionUtil.begin();
delegator.create("ShortenedPath", Map.of("shortenedPath", shortenedPath,
"originalPath", path,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ public static void setLoggedOut(String userLoginId, Delegator delegator) {

try {
try {
parentTx = TransactionUtil.suspend();
if (TransactionUtil.isTransactionInPlace()) {
parentTx = TransactionUtil.suspend();
}
} catch (GenericTransactionException e) {
Debug.logError(e, "Cannot suspend current transaction: " + e.getMessage(), MODULE);
}
Expand Down
Loading