You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by dk...@apache.org on 2011/12/02 18:03:50 UTC

svn commit: r1209585 [4/22] - in /camel/trunk: ./ apache-camel/ buildingtools/ camel-core/ camel-core/src/main/java/org/apache/camel/ camel-core/src/main/java/org/apache/camel/api/management/ camel-core/src/main/java/org/apache/camel/builder/ camel-cor...

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ThreadPoolFactory.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ThreadPoolFactory.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ThreadPoolFactory.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ThreadPoolFactory.java Fri Dec  2 17:03:07 2011
@@ -1,57 +1,57 @@
-/**
- * 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.spi;
-
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ThreadFactory;
-
-/**
- * Creates ExecutorService and ScheduledExecutorService objects that work with a thread pool for a given ThreadPoolProfile and ThreadFactory.
- * 
- * This interface allows to customize the creation of these objects to adapt camel for application servers and other environments where thread pools
- * should not be created with the jdk methods
- */
-public interface ThreadPoolFactory {
-    /**
-     * Creates a new cached thread pool
-     * <p/>
-     * The cached thread pool is a term from the JDK from the method {@link java.util.concurrent.Executors#newCachedThreadPool()}.
-     * Typically it will have no size limit (this is why it is handled separately
-     *
-     * @param threadFactory factory for creating threads
-     * @return the created thread pool
-     */
-    ExecutorService newCachedThreadPool(ThreadFactory threadFactory);
-    
-    /**
-     * Create a thread pool using the given thread pool profile
-     * 
-     * @param profile parameters of the thread pool
-     * @param threadFactory factory for creating threads
-     * @return the created thread pool
-     */
-    ExecutorService newThreadPool(ThreadPoolProfile profile, ThreadFactory threadFactory);
-    
-    /**
-     * Create a scheduled thread pool using the given thread pool profile
-     * @param profile parameters of the thread pool
-     * @param threadFactory factory for creating threads
-     * @return the created thread pool
-     */
-    ScheduledExecutorService newScheduledThreadPool(ThreadPoolProfile profile, ThreadFactory threadFactory);
+/**
+ * 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.spi;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ThreadFactory;
+
+/**
+ * Creates ExecutorService and ScheduledExecutorService objects that work with a thread pool for a given ThreadPoolProfile and ThreadFactory.
+ * 
+ * This interface allows to customize the creation of these objects to adapt camel for application servers and other environments where thread pools
+ * should not be created with the jdk methods
+ */
+public interface ThreadPoolFactory {
+    /**
+     * Creates a new cached thread pool
+     * <p/>
+     * The cached thread pool is a term from the JDK from the method {@link java.util.concurrent.Executors#newCachedThreadPool()}.
+     * Typically it will have no size limit (this is why it is handled separately
+     *
+     * @param threadFactory factory for creating threads
+     * @return the created thread pool
+     */
+    ExecutorService newCachedThreadPool(ThreadFactory threadFactory);
+    
+    /**
+     * Create a thread pool using the given thread pool profile
+     * 
+     * @param profile parameters of the thread pool
+     * @param threadFactory factory for creating threads
+     * @return the created thread pool
+     */
+    ExecutorService newThreadPool(ThreadPoolProfile profile, ThreadFactory threadFactory);
+    
+    /**
+     * Create a scheduled thread pool using the given thread pool profile
+     * @param profile parameters of the thread pool
+     * @param threadFactory factory for creating threads
+     * @return the created thread pool
+     */
+    ScheduledExecutorService newScheduledThreadPool(ThreadPoolProfile profile, ThreadFactory threadFactory);
 }
\ No newline at end of file

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ThreadPoolFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/support/ChildServiceSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/support/ChildServiceSupport.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/support/ChildServiceSupport.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/support/ChildServiceSupport.java Fri Dec  2 17:03:07 2011
@@ -1,137 +1,137 @@
-/**
- * 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.support;
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import org.apache.camel.util.ServiceHelper;
-
-public abstract class ChildServiceSupport extends ServiceSupport {
-    private Set<Object> childServices;
-    
-    public void start() throws Exception {
-        start(true);
-    }
-
-    public void start(boolean startChildren) throws Exception {
-        if (!started.get()) {
-            if (starting.compareAndSet(false, true)) {
-                boolean childrenStarted = false;
-                Exception ex = null;
-                try {
-                    if (childServices != null && startChildren) {
-                        ServiceHelper.startServices(childServices);
-                    }
-                    childrenStarted = true;
-                    doStart();
-                } catch (Exception e) {
-                    ex = e;
-                } finally {
-                    if (ex != null) {
-                        try {
-                            stop(childrenStarted);
-                        } catch (Exception e) {
-                            // Ignore exceptions as we want to show the original exception
-                        }
-                        throw ex;
-                    } else {
-                        started.set(true);
-                        starting.set(false);
-                        stopping.set(false);
-                        stopped.set(false);
-                        suspending.set(false);
-                        suspended.set(false);
-                        shutdown.set(false);
-                        shuttingdown.set(false);
-                    }
-                }
-            }
-        }
-    }
-    
-    private void stop(boolean childrenStarted) throws Exception {
-        if (stopping.compareAndSet(false, true)) {
-            try {
-                try {
-                    starting.set(false);
-                    suspending.set(false);
-                    if (childrenStarted) {
-                        doStop();
-                    }
-                } finally {
-                    started.set(false);
-                    suspended.set(false);
-                    if (childServices != null) {
-                        ServiceHelper.stopServices(childServices);
-                    }
-                }
-            } finally {
-                stopped.set(true);
-                stopping.set(false);
-                starting.set(false);
-                started.set(false);
-                suspending.set(false);
-                suspended.set(false);
-                shutdown.set(false);
-                shuttingdown.set(false);
-            }
-        }
-    }
-
-    public void stop() throws Exception {
-        if (!stopped.get()) {
-            stop(true);
-        }
-    }
-    
-    public void shutdown() throws Exception {
-        // ensure we are stopped first
-        stop();
-
-        if (shuttingdown.compareAndSet(false, true)) {
-            try {
-                try {
-                    doShutdown();
-                } finally {
-                    if (childServices != null) {
-                        ServiceHelper.stopAndShutdownServices(childServices);
-                    }
-                }
-            } finally {
-                // shutdown is also stopped so only set shutdown flags
-                shutdown.set(true);
-                shuttingdown.set(false);
-            }
-        }
-    }
-    
-    @SuppressWarnings("unchecked")
-    protected void addChildService(Object childService) {
-        synchronized (this) {
-            if (childServices == null) {
-                childServices = new LinkedHashSet();
-            }
-        }
-        childServices.add(childService);
-    }
-
-    protected boolean removeChildService(Object childService) {
-        return childServices != null && childServices.remove(childService);
-    }
-
-}
+/**
+ * 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.support;
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import org.apache.camel.util.ServiceHelper;
+
+public abstract class ChildServiceSupport extends ServiceSupport {
+    private Set<Object> childServices;
+    
+    public void start() throws Exception {
+        start(true);
+    }
+
+    public void start(boolean startChildren) throws Exception {
+        if (!started.get()) {
+            if (starting.compareAndSet(false, true)) {
+                boolean childrenStarted = false;
+                Exception ex = null;
+                try {
+                    if (childServices != null && startChildren) {
+                        ServiceHelper.startServices(childServices);
+                    }
+                    childrenStarted = true;
+                    doStart();
+                } catch (Exception e) {
+                    ex = e;
+                } finally {
+                    if (ex != null) {
+                        try {
+                            stop(childrenStarted);
+                        } catch (Exception e) {
+                            // Ignore exceptions as we want to show the original exception
+                        }
+                        throw ex;
+                    } else {
+                        started.set(true);
+                        starting.set(false);
+                        stopping.set(false);
+                        stopped.set(false);
+                        suspending.set(false);
+                        suspended.set(false);
+                        shutdown.set(false);
+                        shuttingdown.set(false);
+                    }
+                }
+            }
+        }
+    }
+    
+    private void stop(boolean childrenStarted) throws Exception {
+        if (stopping.compareAndSet(false, true)) {
+            try {
+                try {
+                    starting.set(false);
+                    suspending.set(false);
+                    if (childrenStarted) {
+                        doStop();
+                    }
+                } finally {
+                    started.set(false);
+                    suspended.set(false);
+                    if (childServices != null) {
+                        ServiceHelper.stopServices(childServices);
+                    }
+                }
+            } finally {
+                stopped.set(true);
+                stopping.set(false);
+                starting.set(false);
+                started.set(false);
+                suspending.set(false);
+                suspended.set(false);
+                shutdown.set(false);
+                shuttingdown.set(false);
+            }
+        }
+    }
+
+    public void stop() throws Exception {
+        if (!stopped.get()) {
+            stop(true);
+        }
+    }
+    
+    public void shutdown() throws Exception {
+        // ensure we are stopped first
+        stop();
+
+        if (shuttingdown.compareAndSet(false, true)) {
+            try {
+                try {
+                    doShutdown();
+                } finally {
+                    if (childServices != null) {
+                        ServiceHelper.stopAndShutdownServices(childServices);
+                    }
+                }
+            } finally {
+                // shutdown is also stopped so only set shutdown flags
+                shutdown.set(true);
+                shuttingdown.set(false);
+            }
+        }
+    }
+    
+    @SuppressWarnings("unchecked")
+    protected void addChildService(Object childService) {
+        synchronized (this) {
+            if (childServices == null) {
+                childServices = new LinkedHashSet();
+            }
+        }
+        childServices.add(childService);
+    }
+
+    protected boolean removeChildService(Object childService) {
+        return childServices != null && childServices.remove(childService);
+    }
+
+}

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/support/ChildServiceSupport.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/support/TimerListenerManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/support/TokenPairExpressionIterator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/support/TokenXMLPairExpressionIterator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/util/AsyncProcessorConverterHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/AsyncProcessorConverterHelper.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/AsyncProcessorConverterHelper.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/AsyncProcessorConverterHelper.java Fri Dec  2 17:03:07 2011
@@ -1,124 +1,124 @@
-/**
- * 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.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.camel.AsyncCallback;
-import org.apache.camel.AsyncProcessor;
-import org.apache.camel.DelegateProcessor;
-import org.apache.camel.Exchange;
-import org.apache.camel.Navigate;
-import org.apache.camel.Processor;
-import org.apache.camel.Service;
-
-/**
- * A simple converter that can convert any {@link Processor} to an {@link AsyncProcessor}.
- * Processing will still occur synchronously but it will provide the required
- * notifications that the caller expects.
- *
- * @version 
- */
-public final class AsyncProcessorConverterHelper {
-    
-    private AsyncProcessorConverterHelper() {
-        // Helper class
-    }
-
-    /**
-     * Creates a {@link AsyncProcessor} that delegates to the given processor.
-     * It is important that this implements {@link DelegateProcessor}
-     */
-    private static final class ProcessorToAsyncProcessorBridge implements DelegateProcessor, AsyncProcessor, Navigate<Processor>, Service {
-        protected Processor processor;
-
-        private ProcessorToAsyncProcessorBridge(Processor processor) {
-            this.processor = processor;
-        }
-
-        public boolean process(Exchange exchange, AsyncCallback callback) {
-            if (processor == null) {
-                // no processor then we are done
-                callback.done(true);
-                return true;
-            }
-            try {
-                processor.process(exchange);
-            } catch (Throwable e) {
-                // must catch throwable so we catch all
-                exchange.setException(e);
-            } finally {
-                // we are bridging a sync processor as async so callback with true
-                callback.done(true);
-            }
-            return true;
-        }
-
-        @Override
-        public String toString() {
-            if (processor != null) {
-                return processor.toString();
-            } else {
-                return "Processor is null";
-            }
-        }
-        
-        public void process(Exchange exchange) throws Exception {
-            processNext(exchange);
-        }
-
-        protected void processNext(Exchange exchange) throws Exception {
-            if (processor != null) {
-                processor.process(exchange);
-            }
-        }
-
-        public void start() throws Exception {
-            ServiceHelper.startServices(processor);
-        }
-
-        public void stop() throws Exception {
-            ServiceHelper.stopServices(processor);
-        }
-
-        public boolean hasNext() {
-            return processor != null;
-        }
-
-        public List<Processor> next() {
-            if (!hasNext()) {
-                return null;
-            }
-            List<Processor> answer = new ArrayList<Processor>(1);
-            answer.add(processor);
-            return answer;
-        }
-
-        @Override
-        public Processor getProcessor() {
-            return processor;
-        }
-    }
-
-    public static AsyncProcessor convert(Processor value) {
-        if (value instanceof AsyncProcessor) {
-            return (AsyncProcessor)value;
-        }
-        return new ProcessorToAsyncProcessorBridge(value);
-    }
-}
+/**
+ * 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.util;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.camel.AsyncCallback;
+import org.apache.camel.AsyncProcessor;
+import org.apache.camel.DelegateProcessor;
+import org.apache.camel.Exchange;
+import org.apache.camel.Navigate;
+import org.apache.camel.Processor;
+import org.apache.camel.Service;
+
+/**
+ * A simple converter that can convert any {@link Processor} to an {@link AsyncProcessor}.
+ * Processing will still occur synchronously but it will provide the required
+ * notifications that the caller expects.
+ *
+ * @version 
+ */
+public final class AsyncProcessorConverterHelper {
+    
+    private AsyncProcessorConverterHelper() {
+        // Helper class
+    }
+
+    /**
+     * Creates a {@link AsyncProcessor} that delegates to the given processor.
+     * It is important that this implements {@link DelegateProcessor}
+     */
+    private static final class ProcessorToAsyncProcessorBridge implements DelegateProcessor, AsyncProcessor, Navigate<Processor>, Service {
+        protected Processor processor;
+
+        private ProcessorToAsyncProcessorBridge(Processor processor) {
+            this.processor = processor;
+        }
+
+        public boolean process(Exchange exchange, AsyncCallback callback) {
+            if (processor == null) {
+                // no processor then we are done
+                callback.done(true);
+                return true;
+            }
+            try {
+                processor.process(exchange);
+            } catch (Throwable e) {
+                // must catch throwable so we catch all
+                exchange.setException(e);
+            } finally {
+                // we are bridging a sync processor as async so callback with true
+                callback.done(true);
+            }
+            return true;
+        }
+
+        @Override
+        public String toString() {
+            if (processor != null) {
+                return processor.toString();
+            } else {
+                return "Processor is null";
+            }
+        }
+        
+        public void process(Exchange exchange) throws Exception {
+            processNext(exchange);
+        }
+
+        protected void processNext(Exchange exchange) throws Exception {
+            if (processor != null) {
+                processor.process(exchange);
+            }
+        }
+
+        public void start() throws Exception {
+            ServiceHelper.startServices(processor);
+        }
+
+        public void stop() throws Exception {
+            ServiceHelper.stopServices(processor);
+        }
+
+        public boolean hasNext() {
+            return processor != null;
+        }
+
+        public List<Processor> next() {
+            if (!hasNext()) {
+                return null;
+            }
+            List<Processor> answer = new ArrayList<Processor>(1);
+            answer.add(processor);
+            return answer;
+        }
+
+        @Override
+        public Processor getProcessor() {
+            return processor;
+        }
+    }
+
+    public static AsyncProcessor convert(Processor value) {
+        if (value instanceof AsyncProcessor) {
+            return (AsyncProcessor)value;
+        }
+        return new ProcessorToAsyncProcessorBridge(value);
+    }
+}

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/util/AsyncProcessorConverterHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelLogger.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelLogger.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelLogger.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelLogger.java Fri Dec  2 17:03:07 2011
@@ -1,239 +1,239 @@
-/**
- * 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.util;
-
-import org.apache.camel.LoggingLevel;
-import org.apache.camel.Processor;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.Marker;
-import org.slf4j.MarkerFactory;
-
-/**
- * A {@link Processor} which just logs to a {@link CamelLogger} object which can be used
- * as an exception handler instead of using a dead letter queue.
- * <p/>
- * The name <tt>CamelLogger</tt> has been chosen to avoid any name clash with log kits
- * which has a <tt>Logger</tt> class.
- *
- * @version 
- */
-public class CamelLogger {
-    private Logger log;
-    private LoggingLevel level;
-    private Marker marker;
-
-    public CamelLogger() {
-        this(LoggerFactory.getLogger(CamelLogger.class));
-    }
-
-    public CamelLogger(Logger log) {
-        this(log, LoggingLevel.INFO);
-    }
-
-    public CamelLogger(Logger log, LoggingLevel level) {
-        this(log, level, null);
-    }
-
-    public CamelLogger(Logger log, LoggingLevel level, String marker) {
-        this.log = log;
-        setLevel(level);
-        setMarker(marker);
-    }
-
-    public CamelLogger(String logName) {
-        this(LoggerFactory.getLogger(logName));
-    }
-
-    public CamelLogger(String logName, LoggingLevel level) {
-        this(logName, level, null);
-    }
-
-    public CamelLogger(String logName, LoggingLevel level, String marker) {
-        this(LoggerFactory.getLogger(logName), level, marker);
-    }
-
-    @Override
-    public String toString() {
-        return "Logger[" + log + "]";
-    }
-
-    public void log(String message, LoggingLevel loggingLevel) {
-        LoggingLevel oldLogLevel = getLevel();
-        setLevel(loggingLevel);
-        log(message);
-        setLevel(oldLogLevel);
-    }
-    
-    public void log(String message) {
-        if (shouldLog(log, level)) {
-            log(log, level, marker, message);
-        }
-    }
-
-    public void log(String message, Throwable exception, LoggingLevel loggingLevel) {
-        log(log, loggingLevel, marker, message, exception);
-    }   
-    
-    public void log(String message, Throwable exception) {
-        if (shouldLog(log, level)) {
-            log(log, level, marker, message, exception);
-        }
-    }
-
-    public Logger getLog() {
-        return log;
-    }
-
-    public void setLog(Logger log) {
-        this.log = log;
-    }
-
-    public LoggingLevel getLevel() {
-        return level;
-    }
-
-    public void setLevel(LoggingLevel level) {
-        if (level == null) {
-            throw new IllegalArgumentException("Log level may not be null");
-        }
-
-        this.level = level;
-    }
-
-    public void setLogName(String logName) {
-        this.log = LoggerFactory.getLogger(logName);
-    }
-
-    public void setMarker(Marker marker) {
-        this.marker = marker;
-    }
-
-    public void setMarker(String marker) {
-        if (ObjectHelper.isNotEmpty(marker)) {
-            this.marker = MarkerFactory.getMarker(marker);
-        } else {
-            this.marker = null;
-        }
-    }
-
-    public static void log(Logger log, LoggingLevel level, String message) {
-        switch (level) {
-        case DEBUG:
-            log.debug(message);
-            break;
-        case ERROR:
-            log.error(message);
-            break;
-        case INFO:
-            log.info(message);
-            break;
-        case TRACE:
-            log.trace(message);
-            break;
-        case WARN:
-            log.warn(message);
-            break;
-        default:
-        }
-    }
-
-    public static void log(Logger log, LoggingLevel level, Marker marker, String message) {
-        switch (level) {
-        case DEBUG:
-            log.debug(marker, message);
-            break;
-        case ERROR:
-            log.error(marker, message);
-            break;
-        case INFO:
-            log.info(marker, message);
-            break;
-        case TRACE:
-            log.trace(marker, message);
-            break;
-        case WARN:
-            log.warn(marker, message);
-            break;
-        default:
-        }
-    }
-
-    public static void log(Logger log, LoggingLevel level, String message, Throwable th) {
-        switch (level) {
-        case DEBUG:
-            log.debug(message, th);
-            break;
-        case ERROR:
-            log.error(message, th);
-            break;
-        case INFO:
-            log.info(message, th);
-            break;
-        case TRACE:
-            log.trace(message, th);
-            break;
-        case WARN:
-            log.warn(message, th);
-            break;
-        default:
-        }
-    }
-
-    public static void log(Logger log, LoggingLevel level, Marker marker, String message, Throwable th) {
-        switch (level) {
-        case DEBUG:
-            log.debug(marker, message, th);
-            break;
-        case ERROR:
-            log.error(marker, message, th);
-            break;
-        case INFO:
-            log.info(marker, message, th);
-            break;
-        case TRACE:
-            log.trace(marker, message, th);
-            break;
-        case WARN:
-            log.warn(marker, message, th);
-            break;
-        default:
-        }
-    }
-
-    public boolean shouldLog() {
-        return CamelLogger.shouldLog(log, level);
-    }
-
-    public static boolean shouldLog(Logger log, LoggingLevel level) {
-        switch (level) {
-        case DEBUG:
-            return log.isDebugEnabled(); 
-        case ERROR:
-            return log.isErrorEnabled(); 
-        case INFO:
-            return log.isInfoEnabled(); 
-        case TRACE:
-            return log.isTraceEnabled(); 
-        case WARN:
-            return log.isWarnEnabled(); 
-        default:
-        }
-        return false;
-    }
-}
+/**
+ * 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.util;
+
+import org.apache.camel.LoggingLevel;
+import org.apache.camel.Processor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Marker;
+import org.slf4j.MarkerFactory;
+
+/**
+ * A {@link Processor} which just logs to a {@link CamelLogger} object which can be used
+ * as an exception handler instead of using a dead letter queue.
+ * <p/>
+ * The name <tt>CamelLogger</tt> has been chosen to avoid any name clash with log kits
+ * which has a <tt>Logger</tt> class.
+ *
+ * @version 
+ */
+public class CamelLogger {
+    private Logger log;
+    private LoggingLevel level;
+    private Marker marker;
+
+    public CamelLogger() {
+        this(LoggerFactory.getLogger(CamelLogger.class));
+    }
+
+    public CamelLogger(Logger log) {
+        this(log, LoggingLevel.INFO);
+    }
+
+    public CamelLogger(Logger log, LoggingLevel level) {
+        this(log, level, null);
+    }
+
+    public CamelLogger(Logger log, LoggingLevel level, String marker) {
+        this.log = log;
+        setLevel(level);
+        setMarker(marker);
+    }
+
+    public CamelLogger(String logName) {
+        this(LoggerFactory.getLogger(logName));
+    }
+
+    public CamelLogger(String logName, LoggingLevel level) {
+        this(logName, level, null);
+    }
+
+    public CamelLogger(String logName, LoggingLevel level, String marker) {
+        this(LoggerFactory.getLogger(logName), level, marker);
+    }
+
+    @Override
+    public String toString() {
+        return "Logger[" + log + "]";
+    }
+
+    public void log(String message, LoggingLevel loggingLevel) {
+        LoggingLevel oldLogLevel = getLevel();
+        setLevel(loggingLevel);
+        log(message);
+        setLevel(oldLogLevel);
+    }
+    
+    public void log(String message) {
+        if (shouldLog(log, level)) {
+            log(log, level, marker, message);
+        }
+    }
+
+    public void log(String message, Throwable exception, LoggingLevel loggingLevel) {
+        log(log, loggingLevel, marker, message, exception);
+    }   
+    
+    public void log(String message, Throwable exception) {
+        if (shouldLog(log, level)) {
+            log(log, level, marker, message, exception);
+        }
+    }
+
+    public Logger getLog() {
+        return log;
+    }
+
+    public void setLog(Logger log) {
+        this.log = log;
+    }
+
+    public LoggingLevel getLevel() {
+        return level;
+    }
+
+    public void setLevel(LoggingLevel level) {
+        if (level == null) {
+            throw new IllegalArgumentException("Log level may not be null");
+        }
+
+        this.level = level;
+    }
+
+    public void setLogName(String logName) {
+        this.log = LoggerFactory.getLogger(logName);
+    }
+
+    public void setMarker(Marker marker) {
+        this.marker = marker;
+    }
+
+    public void setMarker(String marker) {
+        if (ObjectHelper.isNotEmpty(marker)) {
+            this.marker = MarkerFactory.getMarker(marker);
+        } else {
+            this.marker = null;
+        }
+    }
+
+    public static void log(Logger log, LoggingLevel level, String message) {
+        switch (level) {
+        case DEBUG:
+            log.debug(message);
+            break;
+        case ERROR:
+            log.error(message);
+            break;
+        case INFO:
+            log.info(message);
+            break;
+        case TRACE:
+            log.trace(message);
+            break;
+        case WARN:
+            log.warn(message);
+            break;
+        default:
+        }
+    }
+
+    public static void log(Logger log, LoggingLevel level, Marker marker, String message) {
+        switch (level) {
+        case DEBUG:
+            log.debug(marker, message);
+            break;
+        case ERROR:
+            log.error(marker, message);
+            break;
+        case INFO:
+            log.info(marker, message);
+            break;
+        case TRACE:
+            log.trace(marker, message);
+            break;
+        case WARN:
+            log.warn(marker, message);
+            break;
+        default:
+        }
+    }
+
+    public static void log(Logger log, LoggingLevel level, String message, Throwable th) {
+        switch (level) {
+        case DEBUG:
+            log.debug(message, th);
+            break;
+        case ERROR:
+            log.error(message, th);
+            break;
+        case INFO:
+            log.info(message, th);
+            break;
+        case TRACE:
+            log.trace(message, th);
+            break;
+        case WARN:
+            log.warn(message, th);
+            break;
+        default:
+        }
+    }
+
+    public static void log(Logger log, LoggingLevel level, Marker marker, String message, Throwable th) {
+        switch (level) {
+        case DEBUG:
+            log.debug(marker, message, th);
+            break;
+        case ERROR:
+            log.error(marker, message, th);
+            break;
+        case INFO:
+            log.info(marker, message, th);
+            break;
+        case TRACE:
+            log.trace(marker, message, th);
+            break;
+        case WARN:
+            log.warn(marker, message, th);
+            break;
+        default:
+        }
+    }
+
+    public boolean shouldLog() {
+        return CamelLogger.shouldLog(log, level);
+    }
+
+    public static boolean shouldLog(Logger log, LoggingLevel level) {
+        switch (level) {
+        case DEBUG:
+            return log.isDebugEnabled(); 
+        case ERROR:
+            return log.isErrorEnabled(); 
+        case INFO:
+            return log.isInfoEnabled(); 
+        case TRACE:
+            return log.isTraceEnabled(); 
+        case WARN:
+            return log.isWarnEnabled(); 
+        default:
+        }
+        return false;
+    }
+}

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelLogger.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/util/CastUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExpressionToPredicateAdapter.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExpressionToPredicateAdapter.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExpressionToPredicateAdapter.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExpressionToPredicateAdapter.java Fri Dec  2 17:03:07 2011
@@ -1,51 +1,51 @@
-/**
- * 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.util;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Expression;
-import org.apache.camel.Predicate;
-
-public final class ExpressionToPredicateAdapter implements Predicate {
-    private final Expression expression;
-
-    public ExpressionToPredicateAdapter(Expression expression) {
-        this.expression = expression;
-    }
-
-    public boolean matches(Exchange exchange) {
-        if (expression instanceof Predicate) {
-            return ((Predicate) expression).matches(exchange);
-        } else {
-            Object value = expression.evaluate(exchange, Object.class);
-            return ObjectHelper.evaluateValuePredicate(value);
-        }
-    }
-
-    @Override
-    public String toString() {
-        return expression.toString();
-    }
-
-    /**
-     * Converts the given expression into an {@link Predicate}
-     */
-    public static Predicate toPredicate(final Expression expression) {
-        return new ExpressionToPredicateAdapter(expression);
-    }
-    
+/**
+ * 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.util;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Expression;
+import org.apache.camel.Predicate;
+
+public final class ExpressionToPredicateAdapter implements Predicate {
+    private final Expression expression;
+
+    public ExpressionToPredicateAdapter(Expression expression) {
+        this.expression = expression;
+    }
+
+    public boolean matches(Exchange exchange) {
+        if (expression instanceof Predicate) {
+            return ((Predicate) expression).matches(exchange);
+        } else {
+            Object value = expression.evaluate(exchange, Object.class);
+            return ObjectHelper.evaluateValuePredicate(value);
+        }
+    }
+
+    @Override
+    public String toString() {
+        return expression.toString();
+    }
+
+    /**
+     * Converts the given expression into an {@link Predicate}
+     */
+    public static Predicate toPredicate(final Expression expression) {
+        return new ExpressionToPredicateAdapter(expression);
+    }
+    
 }
\ No newline at end of file

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExpressionToPredicateAdapter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/util/InetAddressUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/util/ResourceHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/util/UnitOfWorkHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/util/concurrent/CamelThreadFactory.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/concurrent/CamelThreadFactory.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/concurrent/CamelThreadFactory.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/concurrent/CamelThreadFactory.java Fri Dec  2 17:03:07 2011
@@ -1,52 +1,52 @@
-/**
- * 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.util.concurrent;
-
-import java.util.concurrent.ThreadFactory;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Thread factory which creates threads supporting a naming pattern.
- */
-public final class CamelThreadFactory implements ThreadFactory {
-    private static final Logger LOG = LoggerFactory.getLogger(CamelThreadFactory.class);
-
-    private final String pattern;
-    private final String name;
-    private final boolean daemon;
-
-    public CamelThreadFactory(String pattern, String name, boolean daemon) {
-        this.pattern = pattern;
-        this.name = name;
-        this.daemon = daemon;
-    }
-
-    public Thread newThread(Runnable runnable) {
-        String threadName = ThreadHelper.resolveThreadName(pattern, name);
-        Thread answer = new Thread(runnable, threadName);
-        answer.setDaemon(daemon);
-
-        LOG.trace("Created thread[{}]: {}", name, answer);
-        return answer;
-    }
-
-    public String toString() {
-        return "CamelThreadFactory[" + name + "]";
-    }
+/**
+ * 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.util.concurrent;
+
+import java.util.concurrent.ThreadFactory;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Thread factory which creates threads supporting a naming pattern.
+ */
+public final class CamelThreadFactory implements ThreadFactory {
+    private static final Logger LOG = LoggerFactory.getLogger(CamelThreadFactory.class);
+
+    private final String pattern;
+    private final String name;
+    private final boolean daemon;
+
+    public CamelThreadFactory(String pattern, String name, boolean daemon) {
+        this.pattern = pattern;
+        this.name = name;
+        this.daemon = daemon;
+    }
+
+    public Thread newThread(Runnable runnable) {
+        String threadName = ThreadHelper.resolveThreadName(pattern, name);
+        Thread answer = new Thread(runnable, threadName);
+        answer.setDaemon(daemon);
+
+        LOG.trace("Created thread[{}]: {}", name, answer);
+        return answer;
+    }
+
+    public String toString() {
+        return "CamelThreadFactory[" + name + "]";
+    }
 }
\ No newline at end of file

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/util/concurrent/CamelThreadFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/util/concurrent/SynchronousExecutorService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/util/concurrent/ThreadHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/concurrent/ThreadHelper.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/concurrent/ThreadHelper.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/concurrent/ThreadHelper.java Fri Dec  2 17:03:07 2011
@@ -1,73 +1,73 @@
-/**
- * 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.util.concurrent;
-
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.camel.util.ObjectHelper;
-
-/**
- * Various helper method for thread naming.
- */
-public final class ThreadHelper {
-    public static final String DEFAULT_PATTERN = "Camel Thread ${counter} - ${name}";
-    
-    private static AtomicLong threadCounter = new AtomicLong();
-    
-    private ThreadHelper() {
-    }
-    
-    private static long nextThreadCounter() {
-        return threadCounter.getAndIncrement();
-    }
-
-    /**
-     * Creates a new thread name with the given pattern
-     *
-     * @param pattern the pattern
-     * @param name    the name
-     * @return the thread name, which is unique
-     */
-    public static String resolveThreadName(String pattern, String name) {
-        if (pattern == null) {
-            pattern = DEFAULT_PATTERN;
-        }
-
-        // the name could potential have a $ sign we want to keep
-        if (name.indexOf("$") > -1) {
-            name = name.replaceAll("\\$", "CAMEL_REPLACE_ME");
-        }
-
-        // we support ${longName} and ${name} as name placeholders
-        String longName = name;
-        String shortName = name.contains("?") ? ObjectHelper.before(name, "?") : name;
-
-        String answer = pattern.replaceFirst("\\$\\{counter\\}", "" + nextThreadCounter());
-        answer = answer.replaceFirst("\\$\\{longName\\}", longName);
-        answer = answer.replaceFirst("\\$\\{name\\}", shortName);
-        if (answer.indexOf("$") > -1 || answer.indexOf("${") > -1 || answer.indexOf("}") > -1) {
-            throw new IllegalArgumentException("Pattern is invalid: " + pattern);
-        }
-
-        if (answer.indexOf("CAMEL_REPLACE_ME") > -1) {
-            answer = answer.replaceAll("CAMEL_REPLACE_ME", "\\$");
-        }
-
-        return answer;
-    }
-
-}
+/**
+ * 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.util.concurrent;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.apache.camel.util.ObjectHelper;
+
+/**
+ * Various helper method for thread naming.
+ */
+public final class ThreadHelper {
+    public static final String DEFAULT_PATTERN = "Camel Thread ${counter} - ${name}";
+    
+    private static AtomicLong threadCounter = new AtomicLong();
+    
+    private ThreadHelper() {
+    }
+    
+    private static long nextThreadCounter() {
+        return threadCounter.getAndIncrement();
+    }
+
+    /**
+     * Creates a new thread name with the given pattern
+     *
+     * @param pattern the pattern
+     * @param name    the name
+     * @return the thread name, which is unique
+     */
+    public static String resolveThreadName(String pattern, String name) {
+        if (pattern == null) {
+            pattern = DEFAULT_PATTERN;
+        }
+
+        // the name could potential have a $ sign we want to keep
+        if (name.indexOf("$") > -1) {
+            name = name.replaceAll("\\$", "CAMEL_REPLACE_ME");
+        }
+
+        // we support ${longName} and ${name} as name placeholders
+        String longName = name;
+        String shortName = name.contains("?") ? ObjectHelper.before(name, "?") : name;
+
+        String answer = pattern.replaceFirst("\\$\\{counter\\}", "" + nextThreadCounter());
+        answer = answer.replaceFirst("\\$\\{longName\\}", longName);
+        answer = answer.replaceFirst("\\$\\{name\\}", shortName);
+        if (answer.indexOf("$") > -1 || answer.indexOf("${") > -1 || answer.indexOf("}") > -1) {
+            throw new IllegalArgumentException("Pattern is invalid: " + pattern);
+        }
+
+        if (answer.indexOf("CAMEL_REPLACE_ME") > -1) {
+            answer = answer.replaceAll("CAMEL_REPLACE_ME", "\\$");
+        }
+
+        return answer;
+    }
+
+}

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/util/concurrent/ThreadHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupportJmxCleanup.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupportNodeIdFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/UnitOfWorkSyncProcessTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ProxyBuilderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathMockTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathNestedNamespaceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTransformRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTransformTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XsltTestErrorListenerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanConcurrentTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanInvokeSimpleOgnlToStringMethodTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanInvokeToStringMethodTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodNameHeaderIssueTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanOverloadedMethodFQNTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanOverloadedMethodParameterValueTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanOverloadedMethodTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterInvalidValueTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterNoBeanBindingTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueOgnlTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueOverloadedTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanPerformanceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanPrivateClassWithInterfaceMethodTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnNullTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithAnnotationInheritedTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/FileBeanParameterBindingTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/MyApplicationException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/MyService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/MyServiceProxyTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/MyStaticClass.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/ProxyReturnFutureExceptionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/ProxyReturnFutureListTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/ProxyReturnFutureTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/RouteMethodCallStaticTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/issues/PrivateClasses.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/pojomessage/Person.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/pojomessage/Person.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/pojomessage/Person.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/pojomessage/Person.java Fri Dec  2 17:03:07 2011
@@ -1,33 +1,33 @@
-/**
- * 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.bean.pojomessage;
-
-public class Person {
-    String name;
-
-    public Person() {
-    }
-
-    public Person(String name) {
-        this.name = name;
-    }
-
-    public String getName() {
-        return name;
-    }
-
+/**
+ * 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.bean.pojomessage;
+
+public class Person {
+    String name;
+
+    public Person() {
+    }
+
+    public Person(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
 }
\ No newline at end of file

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/pojomessage/Person.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/pojomessage/PojoProxyHelperOneWayTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/pojomessage/PojoProxyHelperOneWayTest.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/pojomessage/PojoProxyHelperOneWayTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/pojomessage/PojoProxyHelperOneWayTest.java Fri Dec  2 17:03:07 2011
@@ -1,73 +1,73 @@
-/**
- * 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.bean.pojomessage;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.Assert;
-
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Endpoint;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.bean.PojoProxyHelper;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.junit.Test;
-
-public class PojoProxyHelperOneWayTest extends ContextTestSupport {
-
-    PersonReceiver receiver = new PersonReceiver();
-    
-    @Test
-    public void testOneWay() throws Exception {
-        Endpoint personEndpoint = context.getEndpoint("direct:person");
-        MockEndpoint result = (MockEndpoint)context.getEndpoint("mock:result");
-        Person person = new Person("Chris");
-        result.expectedBodiesReceived(person);
-        PersonHandler sender = PojoProxyHelper.createProxy(personEndpoint, PersonHandler.class);
-        
-        sender.onPerson(person);
-        
-        result.assertIsSatisfied();
-        Assert.assertEquals(1, receiver.receivedPersons.size());
-        Assert.assertEquals(person.getName(), receiver.receivedPersons.get(0).getName());
-    }
-    
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            
-            @Override
-            public void configure() throws Exception {
-                from("direct:person").to("mock:result").bean(receiver);
-            }
-        };
-    }
-    
-    public final class PersonReceiver implements PersonHandler {
-        public List<Person> receivedPersons = new ArrayList<Person>();
-
-        @Override
-        public void onPerson(Person person) {
-            receivedPersons.add(person);
-        }
-    }
-
-    public interface PersonHandler {
-        void onPerson(Person person);
-    }
-}
+/**
+ * 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.bean.pojomessage;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Assert;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Endpoint;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.bean.PojoProxyHelper;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Test;
+
+public class PojoProxyHelperOneWayTest extends ContextTestSupport {
+
+    PersonReceiver receiver = new PersonReceiver();
+    
+    @Test
+    public void testOneWay() throws Exception {
+        Endpoint personEndpoint = context.getEndpoint("direct:person");
+        MockEndpoint result = (MockEndpoint)context.getEndpoint("mock:result");
+        Person person = new Person("Chris");
+        result.expectedBodiesReceived(person);
+        PersonHandler sender = PojoProxyHelper.createProxy(personEndpoint, PersonHandler.class);
+        
+        sender.onPerson(person);
+        
+        result.assertIsSatisfied();
+        Assert.assertEquals(1, receiver.receivedPersons.size());
+        Assert.assertEquals(person.getName(), receiver.receivedPersons.get(0).getName());
+    }
+    
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            
+            @Override
+            public void configure() throws Exception {
+                from("direct:person").to("mock:result").bean(receiver);
+            }
+        };
+    }
+    
+    public final class PersonReceiver implements PersonHandler {
+        public List<Person> receivedPersons = new ArrayList<Person>();
+
+        @Override
+        public void onPerson(Person person) {
+            receivedPersons.add(person);
+        }
+    }
+
+    public interface PersonHandler {
+        void onPerson(Person person);
+    }
+}

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/pojomessage/PojoProxyHelperOneWayTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/pojomessage/PojoProxyHelperRequestReplyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/pojomessage/PojoProxyHelperRequestReplyTest.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/pojomessage/PojoProxyHelperRequestReplyTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/pojomessage/PojoProxyHelperRequestReplyTest.java Fri Dec  2 17:03:07 2011
@@ -1,61 +1,61 @@
-/**
- * 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.bean.pojomessage;
-
-import junit.framework.Assert;
-
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Endpoint;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.bean.PojoProxyHelper;
-import org.junit.Test;
-
-public class PojoProxyHelperRequestReplyTest extends ContextTestSupport {
-
-    PersonReceiver receiver = new PersonReceiver();
-    
-    @Test
-    public void testRequestReply() throws Exception {
-        Endpoint personEndpoint = context.getEndpoint("direct:person");
-        Person person = new Person("Chris");
-        PersonHandler sender = PojoProxyHelper.createProxy(personEndpoint, PersonHandler.class);
-        
-        Person resultPerson = sender.onPerson(person);
-        Assert.assertEquals(person.getName() + "1", resultPerson.getName());
-    }
-    
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            public void configure() throws Exception {
-                from("direct:person").bean(receiver);
-            }
-        };
-    }
-    
-    public final class PersonReceiver implements PersonHandler {
-        @Override
-        public Person onPerson(Person person) {
-            return new Person(person.getName() + "1");
-        }
-    }
-
-    public interface PersonHandler {
-        Person onPerson(Person person);
-    }
-
-}
+/**
+ * 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.bean.pojomessage;
+
+import junit.framework.Assert;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Endpoint;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.bean.PojoProxyHelper;
+import org.junit.Test;
+
+public class PojoProxyHelperRequestReplyTest extends ContextTestSupport {
+
+    PersonReceiver receiver = new PersonReceiver();
+    
+    @Test
+    public void testRequestReply() throws Exception {
+        Endpoint personEndpoint = context.getEndpoint("direct:person");
+        Person person = new Person("Chris");
+        PersonHandler sender = PojoProxyHelper.createProxy(personEndpoint, PersonHandler.class);
+        
+        Person resultPerson = sender.onPerson(person);
+        Assert.assertEquals(person.getName() + "1", resultPerson.getName());
+    }
+    
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            public void configure() throws Exception {
+                from("direct:person").bean(receiver);
+            }
+        };
+    }
+    
+    public final class PersonReceiver implements PersonHandler {
+        @Override
+        public Person onPerson(Person person) {
+            return new Person(person.getName() + "1");
+        }
+    }
+
+    public interface PersonHandler {
+        Person onPerson(Person person);
+    }
+
+}

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/pojomessage/PojoProxyHelperRequestReplyTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileAbsolutePathIssueTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileBrowsableEndpointTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentWriteAppendSameFileTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeRunLoggingLevelTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeWithDollarInPathTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java Fri Dec  2 17:03:07 2011
@@ -1,59 +1,59 @@
-/**
- * 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.file;
-
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-
-/**
- * Unit test for consuming from an absolute path at root
- */
-public class FileConsumerAbsoluteRootPathDefaultMoveTest extends ContextTestSupport {
-
-    // run this test manually
-
-    private String base = "/tmp/mytemp";
-
-    public void testDummy() {
-        // noop
-    }
-
-    public void xxxTestConsumeFromAbsolutePath() throws Exception {
-        deleteDirectory(base);
-
-        context.startRoute("foo");
-
-        MockEndpoint mock = getMockEndpoint("mock:report");
-        mock.expectedBodiesReceived("Hello Paris");
-        mock.expectedFileExists(base + "/.camel/paris.txt");
-
-        template.sendBodyAndHeader("file:" + base, "Hello Paris", Exchange.FILE_NAME, "paris.txt");
-
-        mock.assertIsSatisfied();
-    }
-
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            public void configure() throws Exception {
-                from("file:" + base).routeId("foo").noAutoStartup()
-                    .convertBodyTo(String.class).to("mock:report");
-            }
-        };
-    }
+/**
+ * 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.file;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+
+/**
+ * Unit test for consuming from an absolute path at root
+ */
+public class FileConsumerAbsoluteRootPathDefaultMoveTest extends ContextTestSupport {
+
+    // run this test manually
+
+    private String base = "/tmp/mytemp";
+
+    public void testDummy() {
+        // noop
+    }
+
+    public void xxxTestConsumeFromAbsolutePath() throws Exception {
+        deleteDirectory(base);
+
+        context.startRoute("foo");
+
+        MockEndpoint mock = getMockEndpoint("mock:report");
+        mock.expectedBodiesReceived("Hello Paris");
+        mock.expectedFileExists(base + "/.camel/paris.txt");
+
+        template.sendBodyAndHeader("file:" + base, "Hello Paris", Exchange.FILE_NAME, "paris.txt");
+
+        mock.assertIsSatisfied();
+    }
+
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            public void configure() throws Exception {
+                from("file:" + base).routeId("foo").noAutoStartup()
+                    .convertBodyTo(String.class).to("mock:report");
+            }
+        };
+    }
 }
\ No newline at end of file

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdleMessageTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveDeleteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerTemplateTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilePollingConsumerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRecursiveDepthTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNamePrefixTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameSimplePrefixTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameSuffixTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDualDoneFileNameTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerPreMoveDoneFileNameTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerShouldSkipDoneFilePrefixTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerShouldSkipDoneFileSuffixTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerShouldSkipDoneFileTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FromFileMoveDoneCustomHeaderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/NewFileConsumerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
------------------------------------------------------------------------------
    svn:eol-style = native