You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2017/09/14 14:42:53 UTC

[cxf] branch master updated: [CXF-6672] Catch throwable in PollingMesageListenerContainer

This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new a3d5886  [CXF-6672] Catch throwable in PollingMesageListenerContainer
a3d5886 is described below

commit a3d58867210694c82f791de32af4043d4227fb12
Author: Daniel Kulp <dk...@apache.org>
AuthorDate: Thu Sep 14 10:29:58 2017 -0400

    [CXF-6672] Catch throwable in PollingMesageListenerContainer
---
 .../cxf/transport/jms/util/PollingMessageListenerContainer.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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 a32c8a5..80d5f89 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
@@ -72,7 +72,7 @@ public class PollingMessageListenerContainer extends AbstractMessageListenerCont
                             safeRollBack(session);
                         }
                     }
-                } catch (Exception e) {
+                } catch (Throwable e) {
                     handleException(e);
                 }
             }
@@ -119,7 +119,7 @@ public class PollingMessageListenerContainer extends AbstractMessageListenerCont
                         LOG.log(Level.WARNING, "Exception while processing jms message in cxf. Rolling back", e);
                         safeRollBack(session);
                     }
-                } catch (Exception e) {
+                } catch (Throwable e) {
                     handleException(e);
                 }
             }
@@ -129,7 +129,7 @@ public class PollingMessageListenerContainer extends AbstractMessageListenerCont
         protected void safeRollBack(Session session) {
             try {
                 transactionManager.rollback();
-            } catch (Exception e) {
+            } catch (Throwable e) {
                 LOG.log(Level.WARNING, "Rollback of XA transaction failed", e);
             }
         }
@@ -144,7 +144,7 @@ public class PollingMessageListenerContainer extends AbstractMessageListenerCont
         return session.createConsumer(destination, messageSelector);
     }
     
-    protected void handleException(Exception e) {
+    protected void handleException(Throwable e) {
         running = false;
         JMSException wrapped;
         if (e  instanceof JMSException) {

-- 
To stop receiving notification emails like this one, please contact
['"commits@cxf.apache.org" <co...@cxf.apache.org>'].