Skip to content

Commit

Permalink
Propagate JMS IllegalStateException from commit/rollbackIfNecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Mar 18, 2024
1 parent 5dc6a16 commit cd7ba18
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-2023 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 (jakarta.jms.TransactionInProgressException | jakarta.jms.IllegalStateException ex) {
catch (jakarta.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 (jakarta.jms.TransactionInProgressException | jakarta.jms.IllegalStateException ex) {
catch (jakarta.jms.TransactionInProgressException ex) {
// Ignore -> can only happen in case of a JTA transaction.
}
}
Expand Down

0 comments on commit cd7ba18

Please sign in to comment.