You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/11/06 08:31:48 UTC

[01/10] camel git commit: Fixed todo

Repository: camel
Updated Branches:
  refs/heads/camel-2.16.x 5cbdace38 -> 5ca0e663c
  refs/heads/master 48f64e4a9 -> f55834e06


Fixed todo


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

Branch: refs/heads/master
Commit: ca7fe37339d436e0c69630adffb298b747d3a5af
Parents: 4b23332
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Nov 5 22:11:13 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Nov 6 08:34:25 2015 +0100

----------------------------------------------------------------------
 .../apache/camel/impl/ActiveMQUuidGenerator.java    | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ca7fe373/camel-core/src/main/java/org/apache/camel/impl/ActiveMQUuidGenerator.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ActiveMQUuidGenerator.java b/camel-core/src/main/java/org/apache/camel/impl/ActiveMQUuidGenerator.java
index 6817ad5..7a4f0d0 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ActiveMQUuidGenerator.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ActiveMQUuidGenerator.java
@@ -16,11 +16,11 @@
  */
 package org.apache.camel.impl;
 
-import java.io.IOException;
 import java.net.ServerSocket;
 import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.camel.spi.UuidGenerator;
+import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.InetAddressUtil;
 import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
@@ -94,19 +94,7 @@ public class ActiveMQUuidGenerator implements UuidGenerator {
                     Thread.currentThread().interrupt();
                 }
             } finally {
-                // some environments, such as a PaaS may not allow us to create the ServerSocket
-                if (ss != null) {
-                    try {
-                        // TODO: replace the following line with IOHelper.close(ss) when Java 6 support is dropped
-                        ss.close();
-                    } catch (IOException ioe) {
-                        if (LOG.isTraceEnabled()) {
-                            LOG.trace("Closing the server socket failed", ioe);
-                        } else {
-                            LOG.warn("Closing the server socket failed due " + ioe.getMessage() + ". This exception is ignored.");
-                        }
-                    }
-                }
+                IOHelper.close(ss);
             }
         }
 


[09/10] camel git commit: CAMEL-9286: Log component should include log formatter options in component docs.

Posted by da...@apache.org.
CAMEL-9286: Log component should include log formatter options in component docs.


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

Branch: refs/heads/camel-2.16.x
Commit: ed9c9f458ba55f689d659a6a3192bee98cba1310
Parents: 22ccfd7
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Nov 5 21:58:08 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Nov 6 08:34:48 2015 +0100

----------------------------------------------------------------------
 .../camel/component/log/LogComponent.java       |  2 +-
 .../apache/camel/component/log/LogEndpoint.java |  6 ++
 .../processor/DefaultExchangeFormatter.java     | 77 ++++++++++++++++++--
 3 files changed, 76 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ed9c9f45/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java b/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java
index 8e506a0..d524654 100644
--- a/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java
@@ -73,7 +73,7 @@ public class LogComponent extends UriEndpointComponent {
         if (localFormatter != null) {
             setProperties(localFormatter, parameters);
         } else if (localFormatter == null && exchangeFormatter != null) {
-            // do not set properties, the exchangeFormatter is explicitly set, thefore the 
+            // do not set properties, the exchangeFormatter is explicitly set, therefore the
             // user would have set its properties explicitly too
             localFormatter = exchangeFormatter;
         } else {

http://git-wip-us.apache.org/repos/asf/camel/blob/ed9c9f45/camel-core/src/main/java/org/apache/camel/component/log/LogEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/log/LogEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/log/LogEndpoint.java
index f85103e..f89faed 100644
--- a/camel-core/src/main/java/org/apache/camel/component/log/LogEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/log/LogEndpoint.java
@@ -22,11 +22,13 @@ import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.ProcessorEndpoint;
 import org.apache.camel.processor.CamelLogProcessor;
+import org.apache.camel.processor.DefaultExchangeFormatter;
 import org.apache.camel.processor.ThroughputLogger;
 import org.apache.camel.spi.ExchangeFormatter;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
 import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.CamelLogger;
 import org.apache.camel.util.ServiceHelper;
@@ -41,6 +43,7 @@ public class LogEndpoint extends ProcessorEndpoint {
     private volatile Processor logger;
     private Logger providedLogger;
     private ExchangeFormatter localFormatter;
+
     @UriPath(description = "Name of the logging category to use") @Metadata(required = "true")
     private String loggerName;
     @UriParam(defaultValue = "INFO", enums = "ERROR,WARN,INFO,DEBUG,TRACE,OFF")
@@ -55,6 +58,9 @@ public class LogEndpoint extends ProcessorEndpoint {
     private Boolean groupActiveOnly;
     @UriParam
     private Long groupDelay;
+    // we want to include the uri options of the DefaultExchangeFormatter
+    @UriParam
+    private DefaultExchangeFormatter exchangeFormatter;
 
     public LogEndpoint() {
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/ed9c9f45/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java b/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
index 138c6cf..9b61b76 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
@@ -25,6 +25,8 @@ import java.util.concurrent.Future;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.spi.ExchangeFormatter;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
 import org.apache.camel.util.MessageHelper;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.StringHelper;
@@ -32,6 +34,7 @@ import org.apache.camel.util.StringHelper;
 /**
  * Default {@link ExchangeFormatter} that have fine grained options to configure what to include in the output.
  */
+@UriParams
 public class DefaultExchangeFormatter implements ExchangeFormatter {
 
     protected static final String LS = System.getProperty("line.separator");
@@ -39,23 +42,41 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
 
     public enum OutputStyle { Default, Tab, Fixed }
 
+    @UriParam(label = "formatting")
     private boolean showExchangeId;
+    @UriParam(label = "formatting", defaultValue = "true")
     private boolean showExchangePattern = true;
+    @UriParam(label = "formatting")
     private boolean showProperties;
+    @UriParam(label = "formatting")
     private boolean showHeaders;
+    @UriParam(label = "formatting", defaultValue = "true")
     private boolean skipBodyLineSeparator = true;
-    private boolean showBodyType = true;
+    @UriParam(label = "formatting", defaultValue = "true", description = "Show the message body.")
     private boolean showBody = true;
+    @UriParam(label = "formatting", defaultValue = "true")
+    private boolean showBodyType = true;
+    @UriParam(label = "formatting")
     private boolean showOut;
+    @UriParam(label = "formatting")
     private boolean showException;
+    @UriParam(label = "formatting")
     private boolean showCaughtException;
+    @UriParam(label = "formatting")
     private boolean showStackTrace;
+    @UriParam(label = "formatting")
     private boolean showAll;
+    @UriParam(label = "formatting")
     private boolean multiline;
+    @UriParam(label = "formatting")
     private boolean showFuture;
+    @UriParam(label = "formatting")
     private boolean showStreams;
+    @UriParam(label = "formatting")
     private boolean showFiles;
+    @UriParam(label = "formatting", defaultValue = "1000")
     private int maxChars = 10000;
+    @UriParam(label = "formatting", enums = "Default,Tab,Fixed", defaultValue = "Default")
     private OutputStyle style = OutputStyle.Default;
 
     private String style(String label) {
@@ -218,6 +239,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showExchangeId;
     }
 
+    /**
+     * Show the unique exchange ID.
+     */
     public void setShowExchangeId(boolean showExchangeId) {
         this.showExchangeId = showExchangeId;
     }
@@ -226,6 +250,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showProperties;
     }
 
+    /**
+     * Show the exchange properties.
+     */
     public void setShowProperties(boolean showProperties) {
         this.showProperties = showProperties;
     }
@@ -234,6 +261,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showHeaders;
     }
 
+    /**
+     * Show the message headers.
+     */
     public void setShowHeaders(boolean showHeaders) {
         this.showHeaders = showHeaders;
     }
@@ -242,6 +272,11 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return skipBodyLineSeparator;
     }
 
+    /**
+     * Whether to skip line separators when logging the message body.
+     * This allows to log the message body in one line, setting this option to false will preserve any line separators
+     * from the body, which then will log the body as is.
+     */
     public void setSkipBodyLineSeparator(boolean skipBodyLineSeparator) {
         this.skipBodyLineSeparator = skipBodyLineSeparator;
     }
@@ -250,6 +285,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showBodyType;
     }
 
+    /**
+     * Show the body Java type.
+     */
     public void setShowBodyType(boolean showBodyType) {
         this.showBodyType = showBodyType;
     }
@@ -258,6 +296,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showBody;
     }
 
+    /*
+     * Show the message body.
+     */
     public void setShowBody(boolean showBody) {
         this.showBody = showBody;
     }
@@ -266,6 +307,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showOut;
     }
 
+    /**
+     * If the exchange has an out message, show the out message.
+     */
     public void setShowOut(boolean showOut) {
         this.showOut = showOut;
     }
@@ -274,6 +318,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showAll;
     }
 
+    /**
+     * Quick option for turning all options on. (multiline, maxChars has to be manually set if to be used)
+     */
     public void setShowAll(boolean showAll) {
         this.showAll = showAll;
     }
@@ -282,6 +329,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showException;
     }
 
+    /**
+     * If the exchange has an exception, show the exception message (no stacktrace)
+     */
     public void setShowException(boolean showException) {
         this.showException = showException;
     }
@@ -290,6 +340,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showStackTrace;
     }
 
+    /**
+     * Show the stack trace, if an exchange has an exception. Only effective if one of showAll, showException or showCaughtException are enabled.
+     */
     public void setShowStackTrace(boolean showStackTrace) {
         this.showStackTrace = showStackTrace;
     }
@@ -298,6 +351,11 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showCaughtException;
     }
 
+    /**
+     * f the exchange has a caught exception, show the exception message (no stack trace).
+     * A caught exception is stored as a property on the exchange (using the key {@link org.apache.camel.Exchange#EXCEPTION_CAUGHT}
+     * and for instance a doCatch can catch exceptions.
+     */
     public void setShowCaughtException(boolean showCaughtException) {
         this.showCaughtException = showCaughtException;
     }
@@ -310,6 +368,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return maxChars;
     }
 
+    /**
+     * Limits the number of characters logged per line.
+     */
     public void setMaxChars(int maxChars) {
         this.maxChars = maxChars;
     }
@@ -327,8 +388,6 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
 
     /**
      * If enabled Camel will on Future objects wait for it to complete to obtain the payload to be logged.
-     * <p/>
-     * Is default disabled.
      */
     public void setShowFuture(boolean showFuture) {
         this.showFuture = showFuture;
@@ -338,6 +397,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showExchangePattern;
     }
 
+    /**
+     * Shows the Message Exchange Pattern (or MEP for short).
+     */
     public void setShowExchangePattern(boolean showExchangePattern) {
         this.showExchangePattern = showExchangePattern;
     }
@@ -347,9 +409,10 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
     }
 
     /**
-     * If enabled Camel will output stream objects
-     * <p/>
-     * Is default disabled.
+     * Whether Camel should show stream bodies or not (eg such as java.io.InputStream).
+     * Beware if you enable this option then you may not be able later to access the message body
+     * as the stream have already been read by this logger.
+     * To remedy this you will have to use Stream Caching.
      */
     public void setShowStreams(boolean showStreams) {
         this.showStreams = showStreams;
@@ -361,8 +424,6 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
 
     /**
      * If enabled Camel will output files
-     * <p/>
-     * Is default disabled.
      */
     public void setShowFiles(boolean showFiles) {
         this.showFiles = showFiles;


[10/10] camel git commit: CAMEL-9286: Log component should include log formatter options in component docs.

Posted by da...@apache.org.
CAMEL-9286: Log component should include log formatter options in component docs.


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

Branch: refs/heads/camel-2.16.x
Commit: 5ca0e663c7e52fd10585e19c7770b67d13cfe4b4
Parents: ed9c9f4
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Nov 5 22:08:01 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Nov 6 08:34:48 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/processor/DefaultExchangeFormatter.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0e663/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java b/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
index 9b61b76..a6d08fb 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
@@ -74,7 +74,7 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
     private boolean showStreams;
     @UriParam(label = "formatting")
     private boolean showFiles;
-    @UriParam(label = "formatting", defaultValue = "1000")
+    @UriParam(label = "formatting", defaultValue = "10000")
     private int maxChars = 10000;
     @UriParam(label = "formatting", enums = "Default,Tab,Fixed", defaultValue = "Default")
     private OutputStyle style = OutputStyle.Default;


[03/10] camel git commit: CAMEL-9286: Log component should include log formatter options in component docs.

Posted by da...@apache.org.
CAMEL-9286: Log component should include log formatter options in component docs.


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

Branch: refs/heads/master
Commit: 23618a1860d72411a8a83f3186b9263846ed14c5
Parents: 48f64e4
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Nov 5 21:58:08 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Nov 6 08:34:25 2015 +0100

----------------------------------------------------------------------
 .../camel/component/log/LogComponent.java       |  2 +-
 .../apache/camel/component/log/LogEndpoint.java |  6 ++
 .../processor/DefaultExchangeFormatter.java     | 77 ++++++++++++++++++--
 3 files changed, 76 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/23618a18/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java b/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java
index 8e506a0..d524654 100644
--- a/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java
@@ -73,7 +73,7 @@ public class LogComponent extends UriEndpointComponent {
         if (localFormatter != null) {
             setProperties(localFormatter, parameters);
         } else if (localFormatter == null && exchangeFormatter != null) {
-            // do not set properties, the exchangeFormatter is explicitly set, thefore the 
+            // do not set properties, the exchangeFormatter is explicitly set, therefore the
             // user would have set its properties explicitly too
             localFormatter = exchangeFormatter;
         } else {

http://git-wip-us.apache.org/repos/asf/camel/blob/23618a18/camel-core/src/main/java/org/apache/camel/component/log/LogEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/log/LogEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/log/LogEndpoint.java
index f85103e..f89faed 100644
--- a/camel-core/src/main/java/org/apache/camel/component/log/LogEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/log/LogEndpoint.java
@@ -22,11 +22,13 @@ import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.ProcessorEndpoint;
 import org.apache.camel.processor.CamelLogProcessor;
+import org.apache.camel.processor.DefaultExchangeFormatter;
 import org.apache.camel.processor.ThroughputLogger;
 import org.apache.camel.spi.ExchangeFormatter;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
 import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.CamelLogger;
 import org.apache.camel.util.ServiceHelper;
@@ -41,6 +43,7 @@ public class LogEndpoint extends ProcessorEndpoint {
     private volatile Processor logger;
     private Logger providedLogger;
     private ExchangeFormatter localFormatter;
+
     @UriPath(description = "Name of the logging category to use") @Metadata(required = "true")
     private String loggerName;
     @UriParam(defaultValue = "INFO", enums = "ERROR,WARN,INFO,DEBUG,TRACE,OFF")
@@ -55,6 +58,9 @@ public class LogEndpoint extends ProcessorEndpoint {
     private Boolean groupActiveOnly;
     @UriParam
     private Long groupDelay;
+    // we want to include the uri options of the DefaultExchangeFormatter
+    @UriParam
+    private DefaultExchangeFormatter exchangeFormatter;
 
     public LogEndpoint() {
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/23618a18/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java b/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
index 138c6cf..9b61b76 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
@@ -25,6 +25,8 @@ import java.util.concurrent.Future;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.spi.ExchangeFormatter;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
 import org.apache.camel.util.MessageHelper;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.StringHelper;
@@ -32,6 +34,7 @@ import org.apache.camel.util.StringHelper;
 /**
  * Default {@link ExchangeFormatter} that have fine grained options to configure what to include in the output.
  */
+@UriParams
 public class DefaultExchangeFormatter implements ExchangeFormatter {
 
     protected static final String LS = System.getProperty("line.separator");
@@ -39,23 +42,41 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
 
     public enum OutputStyle { Default, Tab, Fixed }
 
+    @UriParam(label = "formatting")
     private boolean showExchangeId;
+    @UriParam(label = "formatting", defaultValue = "true")
     private boolean showExchangePattern = true;
+    @UriParam(label = "formatting")
     private boolean showProperties;
+    @UriParam(label = "formatting")
     private boolean showHeaders;
+    @UriParam(label = "formatting", defaultValue = "true")
     private boolean skipBodyLineSeparator = true;
-    private boolean showBodyType = true;
+    @UriParam(label = "formatting", defaultValue = "true", description = "Show the message body.")
     private boolean showBody = true;
+    @UriParam(label = "formatting", defaultValue = "true")
+    private boolean showBodyType = true;
+    @UriParam(label = "formatting")
     private boolean showOut;
+    @UriParam(label = "formatting")
     private boolean showException;
+    @UriParam(label = "formatting")
     private boolean showCaughtException;
+    @UriParam(label = "formatting")
     private boolean showStackTrace;
+    @UriParam(label = "formatting")
     private boolean showAll;
+    @UriParam(label = "formatting")
     private boolean multiline;
+    @UriParam(label = "formatting")
     private boolean showFuture;
+    @UriParam(label = "formatting")
     private boolean showStreams;
+    @UriParam(label = "formatting")
     private boolean showFiles;
+    @UriParam(label = "formatting", defaultValue = "1000")
     private int maxChars = 10000;
+    @UriParam(label = "formatting", enums = "Default,Tab,Fixed", defaultValue = "Default")
     private OutputStyle style = OutputStyle.Default;
 
     private String style(String label) {
@@ -218,6 +239,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showExchangeId;
     }
 
+    /**
+     * Show the unique exchange ID.
+     */
     public void setShowExchangeId(boolean showExchangeId) {
         this.showExchangeId = showExchangeId;
     }
@@ -226,6 +250,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showProperties;
     }
 
+    /**
+     * Show the exchange properties.
+     */
     public void setShowProperties(boolean showProperties) {
         this.showProperties = showProperties;
     }
@@ -234,6 +261,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showHeaders;
     }
 
+    /**
+     * Show the message headers.
+     */
     public void setShowHeaders(boolean showHeaders) {
         this.showHeaders = showHeaders;
     }
@@ -242,6 +272,11 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return skipBodyLineSeparator;
     }
 
+    /**
+     * Whether to skip line separators when logging the message body.
+     * This allows to log the message body in one line, setting this option to false will preserve any line separators
+     * from the body, which then will log the body as is.
+     */
     public void setSkipBodyLineSeparator(boolean skipBodyLineSeparator) {
         this.skipBodyLineSeparator = skipBodyLineSeparator;
     }
@@ -250,6 +285,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showBodyType;
     }
 
+    /**
+     * Show the body Java type.
+     */
     public void setShowBodyType(boolean showBodyType) {
         this.showBodyType = showBodyType;
     }
@@ -258,6 +296,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showBody;
     }
 
+    /*
+     * Show the message body.
+     */
     public void setShowBody(boolean showBody) {
         this.showBody = showBody;
     }
@@ -266,6 +307,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showOut;
     }
 
+    /**
+     * If the exchange has an out message, show the out message.
+     */
     public void setShowOut(boolean showOut) {
         this.showOut = showOut;
     }
@@ -274,6 +318,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showAll;
     }
 
+    /**
+     * Quick option for turning all options on. (multiline, maxChars has to be manually set if to be used)
+     */
     public void setShowAll(boolean showAll) {
         this.showAll = showAll;
     }
@@ -282,6 +329,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showException;
     }
 
+    /**
+     * If the exchange has an exception, show the exception message (no stacktrace)
+     */
     public void setShowException(boolean showException) {
         this.showException = showException;
     }
@@ -290,6 +340,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showStackTrace;
     }
 
+    /**
+     * Show the stack trace, if an exchange has an exception. Only effective if one of showAll, showException or showCaughtException are enabled.
+     */
     public void setShowStackTrace(boolean showStackTrace) {
         this.showStackTrace = showStackTrace;
     }
@@ -298,6 +351,11 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showCaughtException;
     }
 
+    /**
+     * f the exchange has a caught exception, show the exception message (no stack trace).
+     * A caught exception is stored as a property on the exchange (using the key {@link org.apache.camel.Exchange#EXCEPTION_CAUGHT}
+     * and for instance a doCatch can catch exceptions.
+     */
     public void setShowCaughtException(boolean showCaughtException) {
         this.showCaughtException = showCaughtException;
     }
@@ -310,6 +368,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return maxChars;
     }
 
+    /**
+     * Limits the number of characters logged per line.
+     */
     public void setMaxChars(int maxChars) {
         this.maxChars = maxChars;
     }
@@ -327,8 +388,6 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
 
     /**
      * If enabled Camel will on Future objects wait for it to complete to obtain the payload to be logged.
-     * <p/>
-     * Is default disabled.
      */
     public void setShowFuture(boolean showFuture) {
         this.showFuture = showFuture;
@@ -338,6 +397,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         return showExchangePattern;
     }
 
+    /**
+     * Shows the Message Exchange Pattern (or MEP for short).
+     */
     public void setShowExchangePattern(boolean showExchangePattern) {
         this.showExchangePattern = showExchangePattern;
     }
@@ -347,9 +409,10 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
     }
 
     /**
-     * If enabled Camel will output stream objects
-     * <p/>
-     * Is default disabled.
+     * Whether Camel should show stream bodies or not (eg such as java.io.InputStream).
+     * Beware if you enable this option then you may not be able later to access the message body
+     * as the stream have already been read by this logger.
+     * To remedy this you will have to use Stream Caching.
      */
     public void setShowStreams(boolean showStreams) {
         this.showStreams = showStreams;
@@ -361,8 +424,6 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
 
     /**
      * If enabled Camel will output files
-     * <p/>
-     * Is default disabled.
      */
     public void setShowFiles(boolean showFiles) {
         this.showFiles = showFiles;


[04/10] camel git commit: Adding test about rest-dsl issue

Posted by da...@apache.org.
Adding test about rest-dsl issue


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

Branch: refs/heads/master
Commit: 8b963ae7c2971659339932a599f8476de0f72fe6
Parents: 4f19124
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Nov 5 22:29:33 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Nov 6 08:34:26 2015 +0100

----------------------------------------------------------------------
 .../component/rest/FromRestGetPolicyTest.java   | 71 ++++++++++++++++++++
 1 file changed, 71 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8b963ae7/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetPolicyTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetPolicyTest.java b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetPolicyTest.java
new file mode 100644
index 0000000..29630b0
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetPolicyTest.java
@@ -0,0 +1,71 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.rest;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.impl.JndiRegistry;
+import org.apache.camel.model.ProcessorDefinition;
+import org.apache.camel.spi.Policy;
+import org.apache.camel.spi.RouteContext;
+
+public class FromRestGetPolicyTest extends ContextTestSupport {
+
+    @Override
+    protected JndiRegistry createRegistry() throws Exception {
+        JndiRegistry jndi = super.createRegistry();
+        jndi.bind("dummy-rest", new DummyRestConsumerFactory());
+        return jndi;
+    }
+
+    public void testFromRestModel() throws Exception {
+        assertEquals(1, context.getRoutes().size());
+
+        assertEquals(1, context.getRestDefinitions().size());
+
+        getMockEndpoint("mock:hello").expectedMessageCount(1);
+        template.sendBody("seda:get-say-hello", null);
+        assertMockEndpointsSatisfied();
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                restConfiguration().host("localhost");
+
+                rest("/say/hello")
+                        .get().route().policy(new MyDummyPolicy()).to("mock:hello");
+            }
+        };
+    }
+
+    private class MyDummyPolicy implements Policy {
+
+        @Override
+        public void beforeWrap(RouteContext routeContext, ProcessorDefinition<?> definition) {
+            // noop
+        }
+
+        @Override
+        public Processor wrap(RouteContext routeContext, Processor processor) {
+            return processor;
+        }
+    }
+}


[05/10] camel git commit: Some todos that are no longer relevant

Posted by da...@apache.org.
Some todos that are no longer relevant


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

Branch: refs/heads/master
Commit: 4f1912444283a8c95b602ecf0f3cfc2cb183083b
Parents: ca7fe37
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Nov 5 22:19:40 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Nov 6 08:34:26 2015 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/spi/ThreadPoolProfile.java      | 2 +-
 .../java/org/apache/camel/impl/CustomProducerServicePoolTest.java  | 1 -
 .../camel/impl/DefaultCamelContextEndpointCacheLimitTest.java      | 1 -
 .../apache/camel/impl/DefaultCamelContextEndpointCacheTest.java    | 1 -
 4 files changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/4f191244/camel-core/src/main/java/org/apache/camel/spi/ThreadPoolProfile.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/ThreadPoolProfile.java b/camel-core/src/main/java/org/apache/camel/spi/ThreadPoolProfile.java
index f104f16..429af5b 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/ThreadPoolProfile.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/ThreadPoolProfile.java
@@ -31,7 +31,7 @@ import org.apache.camel.ThreadPoolRejectedPolicy;
  */
 public class ThreadPoolProfile implements Serializable, Cloneable {
 
-    // TODO: Camel 2.9/3.0 consider moving to org.apache.camel
+    // TODO: Camel 3.0 consider moving to org.apache.camel
 
     private static final long serialVersionUID = 1L;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/4f191244/camel-core/src/test/java/org/apache/camel/impl/CustomProducerServicePoolTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/impl/CustomProducerServicePoolTest.java b/camel-core/src/test/java/org/apache/camel/impl/CustomProducerServicePoolTest.java
index 0824c2b..21c8b49 100644
--- a/camel-core/src/test/java/org/apache/camel/impl/CustomProducerServicePoolTest.java
+++ b/camel-core/src/test/java/org/apache/camel/impl/CustomProducerServicePoolTest.java
@@ -40,7 +40,6 @@ public class CustomProducerServicePoolTest extends ContextTestSupport {
     private static final class MyEndpoint extends DefaultEndpoint {
 
         private MyEndpoint(String endpointUri, CamelContext camelContext) {
-            // FIXME: another endpoint that works without a Component
             setCamelContext(camelContext);
             setEndpointUri(endpointUri);
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/4f191244/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheLimitTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheLimitTest.java b/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheLimitTest.java
index f87dfe6..71d4d69 100644
--- a/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheLimitTest.java
+++ b/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheLimitTest.java
@@ -38,7 +38,6 @@ public class DefaultCamelContextEndpointCacheLimitTest extends ContextTestSuppor
         for (int i = 0; i < 78; i++) {
             String uri = "my:endpoint?id=" + i;
             DefaultEndpoint e = new DefaultEndpoint() {
-                // FIXME: another endpoint that works without a Component
                 public Producer createProducer() throws Exception {
                     return null;
                 }

http://git-wip-us.apache.org/repos/asf/camel/blob/4f191244/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheTest.java b/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheTest.java
index 0bcd6e2..7312d0e 100644
--- a/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheTest.java
+++ b/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheTest.java
@@ -36,7 +36,6 @@ public class DefaultCamelContextEndpointCacheTest extends ContextTestSupport {
         for (int i = 0; i < 1003; i++) {
             String uri = "my:endpoint?id=" + i;
             DefaultEndpoint e = new DefaultEndpoint() {
-                // FIXME: another endpoint that works without a Component
                 public Producer createProducer() throws Exception {
                     return null;
                 }


[02/10] camel git commit: CAMEL-9286: Log component should include log formatter options in component docs.

Posted by da...@apache.org.
CAMEL-9286: Log component should include log formatter options in component docs.


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

Branch: refs/heads/master
Commit: 4b233327b012051525c7e794901ab83938ca4b66
Parents: 23618a1
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Nov 5 22:08:01 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Nov 6 08:34:25 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/processor/DefaultExchangeFormatter.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/4b233327/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java b/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
index 9b61b76..a6d08fb 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
@@ -74,7 +74,7 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
     private boolean showStreams;
     @UriParam(label = "formatting")
     private boolean showFiles;
-    @UriParam(label = "formatting", defaultValue = "1000")
+    @UriParam(label = "formatting", defaultValue = "10000")
     private int maxChars = 10000;
     @UriParam(label = "formatting", enums = "Default,Tab,Fixed", defaultValue = "Default")
     private OutputStyle style = OutputStyle.Default;


[07/10] camel git commit: Remove double logging as the context logs also its starting

Posted by da...@apache.org.
Remove double logging as the context logs also its starting


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

Branch: refs/heads/master
Commit: f55834e06b14ff290f690229dc1dbd59ecaabc3f
Parents: 72376e2
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Nov 5 22:40:38 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Nov 6 08:34:27 2015 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/main/MainSupport.java      | 7 -------
 1 file changed, 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f55834e0/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/main/MainSupport.java b/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
index eb151ec..0f85a71 100644
--- a/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
+++ b/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
@@ -311,18 +311,11 @@ public abstract class MainSupport extends ServiceSupport {
     }
 
     protected void doStop() throws Exception {
-        if (!isStopped()) {
-            LOG.info("Apache Camel " + getVersion() + " stopping");
-        }
         // call completed to properly stop as we count down the waiting latch
         completed();
     }
 
     protected void doStart() throws Exception {
-        if (!isStarted()) {
-            // only log if we are not already started as camel-spring-boot etc. has a different start ordering
-            LOG.info("Apache Camel " + getVersion() + " starting");
-        }
     }
 
     protected void waitUntilCompleted() {


[08/10] camel git commit: Improved the cdi archetype to let the bean be looked up by name

Posted by da...@apache.org.
Improved the cdi archetype to let the bean be looked up by name


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

Branch: refs/heads/camel-2.16.x
Commit: 22ccfd7416be48332b1ed7d41c7480b922d1a59a
Parents: 5cbdace
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Nov 5 22:30:29 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Nov 6 08:34:47 2015 +0100

----------------------------------------------------------------------
 .../resources/archetype-resources/src/main/java/MyRoutes.java   | 5 +----
 .../resources/archetype-resources/src/main/java/SomeBean.java   | 2 ++
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/22ccfd74/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/MyRoutes.java
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/MyRoutes.java b/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/MyRoutes.java
index 7943215..7624d7d 100644
--- a/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/MyRoutes.java
+++ b/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/MyRoutes.java
@@ -37,15 +37,12 @@ public class MyRoutes extends RouteBuilder {
     @Uri("log:output")
     private Endpoint resultEndpoint;
 
-    @Inject
-    private SomeBean someBean;
-
     @Override
     public void configure() throws Exception {
         // you can configure the route rule with Java DSL here
 
         from(inputEndpoint)
-            .bean(someBean)
+            .beanRef("counterBean")
             .to(resultEndpoint);
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/22ccfd74/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/SomeBean.java
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/SomeBean.java b/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/SomeBean.java
index 2908edf..c3ca29a 100644
--- a/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/SomeBean.java
+++ b/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/SomeBean.java
@@ -16,9 +16,11 @@
 ## ------------------------------------------------------------------------
 package ${package};
 
+import javax.inject.Named;
 import javax.inject.Singleton;
 
 @Singleton
+@Named("counterBean")
 public class SomeBean {
 
     private int counter;


[06/10] camel git commit: Improved the cdi archetype to let the bean be looked up by name

Posted by da...@apache.org.
Improved the cdi archetype to let the bean be looked up by name


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

Branch: refs/heads/master
Commit: 72376e2fef5d349ac3ae1aabf3d3c223115efcb5
Parents: 8b963ae
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Nov 5 22:30:29 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Nov 6 08:34:26 2015 +0100

----------------------------------------------------------------------
 .../resources/archetype-resources/src/main/java/MyRoutes.java   | 5 +----
 .../resources/archetype-resources/src/main/java/SomeBean.java   | 2 ++
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/72376e2f/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/MyRoutes.java
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/MyRoutes.java b/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/MyRoutes.java
index 7943215..7624d7d 100644
--- a/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/MyRoutes.java
+++ b/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/MyRoutes.java
@@ -37,15 +37,12 @@ public class MyRoutes extends RouteBuilder {
     @Uri("log:output")
     private Endpoint resultEndpoint;
 
-    @Inject
-    private SomeBean someBean;
-
     @Override
     public void configure() throws Exception {
         // you can configure the route rule with Java DSL here
 
         from(inputEndpoint)
-            .bean(someBean)
+            .beanRef("counterBean")
             .to(resultEndpoint);
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/72376e2f/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/SomeBean.java
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/SomeBean.java b/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/SomeBean.java
index 2908edf..c3ca29a 100644
--- a/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/SomeBean.java
+++ b/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/SomeBean.java
@@ -16,9 +16,11 @@
 ## ------------------------------------------------------------------------
 package ${package};
 
+import javax.inject.Named;
 import javax.inject.Singleton;
 
 @Singleton
+@Named("counterBean")
 public class SomeBean {
 
     private int counter;