cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject cxf git commit: Fix compile failures
Date Fri, 24 Mar 2017 16:37:02 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes ca87eda64 -> be269a8f7


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/be269a8f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/be269a8f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/be269a8f

Branch: refs/heads/3.1.x-fixes
Commit: be269a8f7b9409792963dee097da76cb5fdd5757
Parents: ca87eda
Author: Daniel Kulp <dkulp@apache.org>
Authored: Fri Mar 24 12:36:48 2017 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Mar 24 12:36:48 2017 -0400

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/be269a8f/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 8b904e2..36352bf 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,12 +72,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);
@@ -86,7 +91,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();


Mime
View raw message