Skip to content

Commit

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

(cherry picked from commit cd7ba18)
  • Loading branch information
jhoeller authored and Yangushan committed Mar 19, 2024
1 parent 5d25f9b commit 6a64e21
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 6a64e21

Please sign in to comment.