Skip to content

Commit

Permalink
Propagate JMS IllegalStateException from commit/rollbackIfNecessary
Browse files Browse the repository at this point in the history
Closes gh-32473

(cherry picked from commit cd7ba18)
  • Loading branch information
jhoeller committed Mar 18, 2024
1 parent f6205d4 commit 0628b47
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -217,7 +217,7 @@ public static void commitIfNecessary(Session session) throws JMSException {
try {
session.commit();
}
catch (javax.jms.TransactionInProgressException | javax.jms.IllegalStateException ex) {
catch (javax.jms.TransactionInProgressException ex) {
// Ignore -> can only happen in case of a JTA transaction.
}
}
Expand All @@ -232,7 +232,7 @@ public static void rollbackIfNecessary(Session session) throws JMSException {
try {
session.rollback();
}
catch (javax.jms.TransactionInProgressException | javax.jms.IllegalStateException ex) {
catch (javax.jms.TransactionInProgressException ex) {
// Ignore -> can only happen in case of a JTA transaction.
}
}
Expand Down

0 comments on commit 0628b47

Please sign in to comment.