camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r779966 - in /camel/trunk/components/camel-jms/src: main/java/org/apache/camel/component/jms/EndpointMessageListener.java main/java/org/apache/camel/component/jms/JmsBinding.java test/resources/log4j.properties
Date Fri, 29 May 2009 13:32:35 GMT
Author: davsclaus
Date: Fri May 29 13:32:34 2009
New Revision: 779966

URL: http://svn.apache.org/viewvc?rev=779966&view=rev
Log:
Added trace logging to JMS consumer to log enter/exit to help identify when a listener do
not complete. Fintuned loging a bit to not spam at DEBUG level.

Modified:
    camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/EndpointMessageListener.java
    camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
    camel/trunk/components/camel-jms/src/test/resources/log4j.properties

Modified: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/EndpointMessageListener.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/EndpointMessageListener.java?rev=779966&r1=779965&r2=779966&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/EndpointMessageListener.java
(original)
+++ camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/EndpointMessageListener.java
Fri May 29 13:32:34 2009
@@ -60,6 +60,8 @@
     }
 
     public void onMessage(final Message message) {
+        LOG.trace("onMessage START");
+
         if (LOG.isDebugEnabled()) {
             LOG.debug(endpoint + " consumer receiving JMS message: " + message);
         }
@@ -73,7 +75,13 @@
             }
 
             // process the exchange
+            if (LOG.isTraceEnabled()) {
+                LOG.trace("onMessage.process START");
+            }
             processor.process(exchange);
+            if (LOG.isTraceEnabled()) {
+                LOG.trace("onMessage.process END");
+            }
 
             // get the correct jms message to send as reply
             JmsMessage body = null;
@@ -105,7 +113,9 @@
 
             // send the reply if we got a response and the exchange is out capable
             if (rce == null && sendReply && !disableReplyTo && exchange.getPattern().isOutCapable())
{
+                LOG.trace("onMessage.sendReply START");
                 sendReply(replyDestination, message, exchange, body, cause);
+                LOG.trace("onMessage.sendReply END");
             }
 
         } catch (Exception e) {
@@ -114,8 +124,13 @@
 
         if (rce != null) {
             getExceptionHandler().handleException(rce);
+            if (LOG.isTraceEnabled()) {
+                LOG.trace("onMessage END throwing exception: " + rce.getMessage());
+            }
             throw rce;
         }
+
+        LOG.trace("onMessage END");
     }
 
     public JmsExchange createExchange(Message message, Destination replyDestination) {

Modified: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java?rev=779966&r1=779965&r2=779966&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
(original)
+++ camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
Fri May 29 13:32:34 2009
@@ -270,7 +270,8 @@
                 // JMSDeliveryMode, JMSDestination, JMSExpiration, JMSPriorit
                 // The following are set on the underlying JMS provider:
                 // JMSMessageID, JMSTimestamp, JMSRedelivered
-                LOG.debug("Ignoring JMS header: " + headerName + " with value: " + headerValue);
+                // log at trace level to not spam log
+                LOG.trace("Ignoring JMS header: " + headerName + " with value: " + headerValue);
             }
         } else if (shouldOutputHeader(in, headerName, headerValue, exchange)) {
             // only primitive headers and strings is allowed as properties

Modified: camel/trunk/components/camel-jms/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/resources/log4j.properties?rev=779966&r1=779965&r2=779966&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/resources/log4j.properties (original)
+++ camel/trunk/components/camel-jms/src/test/resources/log4j.properties Fri May 29 13:32:34
2009
@@ -33,5 +33,5 @@
 log4j.appender.out.append=true
 
 #log4j.logger.org.apache.activemq.spring=WARN
-#log4j.logger.org.apache.camel.component.jms=DEBUG
+#log4j.logger.org.apache.camel.component.jms=TRACE
 #log4j.logger.org.apache.camel=DEBUG
\ No newline at end of file



Mime
View raw message