Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 9abefd26b -> cae5b6fb8


Fix compile failures


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

Branch: refs/heads/3.0.x-fixes
Commit: cae5b6fb8b2189bd57959c7ca5e7fb88c5c0eb34
Parents: 9abefd2
Author: Daniel Kulp <dk...@apache.org>
Authored: Fri Mar 24 12:36:48 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Mar 24 12:37:23 2017 -0400

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/cae5b6fb/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 c087f25..7e9113e 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
@@ -70,12 +70,17 @@ public class PollingMessageListenerContainer extends 
AbstractMessageListenerCont
                                 session.commit();
                             }
                         } catch (Throwable e) {
-                            LOG.log(Level.WARNING, "Exception while processing 
jms message in cxf. Rolling back", e);
+                            if (e instanceof Exception) {
+                                LOG.log(Level.WARNING, "Exception while 
processing jms message in cxf. Rolling back",
+                                        (Exception)e);
+                            }
                             safeRollBack(session, e);
                         }
                     }
                 } catch (Throwable e) {
-                    LOG.log(Level.WARNING, "Unexpected exception. Restarting 
session and consumer", e);
+                    if (e instanceof Exception) {
+                        LOG.log(Level.WARNING, "Unexpected exception. 
Restarting session and consumer", (Exception)e);
+                    }
                 } finally {
                     ResourceCloser.close(consumer);
                     ResourceCloser.close(session);
@@ -84,7 +89,7 @@ public class PollingMessageListenerContainer extends 
AbstractMessageListenerCont
 
         }
         
-        private void safeRollBack(Session session, Exception e) {
+        private void safeRollBack(Session session, Throwable e) {
             try {
                 if (session.getTransacted()) {
                     session.rollback();

Reply via email to