[CXF-6672] Catch trhowable instead of exception to grab errors as well

Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/8049b4c2
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8049b4c2
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8049b4c2

Branch: refs/heads/master
Commit: 8049b4c2df7690b493462997c37168622a11324c
Parents: 307cc3d
Author: Daniel Kulp <dk...@apache.org>
Authored: Thu Mar 23 14:12:29 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Mar 24 10:03:08 2017 -0400

----------------------------------------------------------------------
 .../transport/jms/util/PollingMessageListenerContainer.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/8049b4c2/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java
----------------------------------------------------------------------
diff --git 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java
 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java
index 8096eb3..c4276eb 100644
--- 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java
+++ 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java
@@ -65,12 +65,12 @@ public class PollingMessageListenerContainer extends 
AbstractMessageListenerCont
                             if (session.getTransacted()) {
                                 session.commit();
                             }
-                        } catch (Exception e) {
+                        } catch (Throwable e) {
                             LOG.log(Level.WARNING, "Exception while processing 
jms message in cxf. Rolling back", e);
                             safeRollBack(session);
                         }
                     }
-                } catch (Exception e) {
+                } catch (Throwable e) {
                     catchUnexpectedExceptionDuringPolling(null, e);
                 }
             }
@@ -83,7 +83,7 @@ public class PollingMessageListenerContainer extends 
AbstractMessageListenerCont
                 if (session != null && session.getTransacted()) {
                     session.rollback();
                 }
-            } catch (Exception e1) {
+            } catch (Throwable e1) {
                 LOG.log(Level.WARNING, "Rollback of Local transaction failed", 
e1);
             }
         }

Reply via email to