Author: davsclaus Date: Thu Jan 20 16:39:08 2011 New Revision: 1061381 URL: http://svn.apache.org/viewvc?rev=1061381&view=rev Log: CAMEL-3566: Reverted the new option. Change the WARN to DEBUG logging level. The behavior is documented at the camel website.
Modified: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteWithInOnlyAndMultipleAcksTest.java Modified: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java?rev=1061381&r1=1061380&r2=1061381&view=diff ============================================================================== --- camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java (original) +++ camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java Thu Jan 20 16:39:08 2011 @@ -108,7 +108,6 @@ public class JmsConfiguration implements private int transactionTimeout = -1; private boolean preserveMessageQos; private boolean disableReplyTo; - private boolean logWarnWhenReplyToIsDiscarded = true; private boolean eagerLoadingOfProperties; // Always make a JMS message copy when it's passed to Producer private boolean alwaysCopyMessage; @@ -1090,14 +1089,6 @@ public class JmsConfiguration implements this.replyToDestination = normalizeDestinationName(replyToDestination); } - public boolean isLogWarnWhenReplyToIsDiscarded() { - return logWarnWhenReplyToIsDiscarded; - } - - public void setLogWarnWhenReplyToIsDiscarded(boolean logWarnWhenReplyToIsDiscarded) { - this.logWarnWhenReplyToIsDiscarded = logWarnWhenReplyToIsDiscarded; - } - public String getReplyToDestinationSelectorName() { return replyToDestinationSelectorName; } Modified: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java?rev=1061381&r1=1061380&r2=1061381&view=diff ============================================================================== --- camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java (original) +++ camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java Thu Jan 20 16:39:08 2011 @@ -495,11 +495,6 @@ public class JmsEndpoint extends Default } @ManagedAttribute - public boolean isLogWarnWhenReplyToIsDiscarded() { - return getConfiguration().isLogWarnWhenReplyToIsDiscarded(); - } - - @ManagedAttribute public String getReplyToDestinationSelectorName() { return getConfiguration().getReplyToDestinationSelectorName(); } @@ -792,11 +787,6 @@ public class JmsEndpoint extends Default } @ManagedAttribute - public void setLogWarnWhenReplyToIsDiscarded(boolean logWarnWhenReplyToIsDiscarded) { - getConfiguration().setLogWarnWhenReplyToIsDiscarded(logWarnWhenReplyToIsDiscarded); - } - - @ManagedAttribute public void setReplyToDeliveryPersistent(boolean replyToDeliveryPersistent) { getConfiguration().setReplyToDeliveryPersistent(replyToDeliveryPersistent); } Modified: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java?rev=1061381&r1=1061380&r2=1061381&view=diff ============================================================================== --- camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java (original) +++ camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java Thu Jan 20 16:39:08 2011 @@ -250,13 +250,11 @@ public class JmsProducer extends Default // the consumer of this message should not return a reply so we remove it // unless we use preserveMessageQos=true to tell that we still want to use JMSReplyTo if (jmsReplyTo != null && !(endpoint.isPreserveMessageQos() || endpoint.isExplicitQosEnabled())) { - // log a warn if enabled otherwise a debug level - String msg = "Disabling JMSReplyTo: " + jmsReplyTo + " for destination: " + to - + ". Use preserveMessageQos=true to force Camel to keep the JMSReplyTo on endpoint: " + endpoint; - if (endpoint.isLogWarnWhenReplyToIsDiscarded()) { - LOG.warn(msg); - } else { - LOG.debug(msg); + // log at debug what we are doing, as higher level may cause noise in production logs + // this behavior is also documented at the camel website + if (LOG.isDebugEnabled()) { + LOG.debug("Disabling JMSReplyTo: " + jmsReplyTo + " for destination: " + to + + ". Use preserveMessageQos=true to force Camel to keep the JMSReplyTo on endpoint: " + endpoint); } jmsReplyTo = null; } Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteWithInOnlyAndMultipleAcksTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteWithInOnlyAndMultipleAcksTest.java?rev=1061381&r1=1061380&r2=1061381&view=diff ============================================================================== --- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteWithInOnlyAndMultipleAcksTest.java (original) +++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteWithInOnlyAndMultipleAcksTest.java Thu Jan 20 16:39:08 2011 @@ -78,8 +78,7 @@ public class JmsRouteWithInOnlyAndMultip // the original order request initiator from("amq:queue:inbox") .to("mock:inbox") - // we dont care about the WARN log so we disable that - .inOnly("amq:topic:orderServiceNotification?logWarnWhenReplyToIsDiscarded=false") + .inOnly("amq:topic:orderServiceNotification") .beanRef("orderService", "handleOrder"); // this route collects an order request notification