You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/02/04 13:00:25 UTC

[camel] branch master updated: Fixed CS for Camel-ActiveMQ

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 26b06ce  Fixed CS for Camel-ActiveMQ
26b06ce is described below

commit 26b06cef231270ba5dcb898636d8018f79082c11
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Feb 4 13:59:58 2019 +0100

    Fixed CS for Camel-ActiveMQ
---
 .../component/activemq/ActiveMQComponent.java      | 87 ++++++++++----------
 .../component/activemq/ActiveMQConfiguration.java  | 65 +++++++--------
 .../camel/component/activemq/ActiveMQEndpoint.java |  7 +-
 .../camel/component/activemq/CamelConnection.java  |  3 +-
 .../component/activemq/CamelConnectionFactory.java |  7 +-
 .../camel/component/activemq/CamelDestination.java | 12 +--
 .../component/activemq/CamelEndpointLoader.java    | 25 +++---
 .../component/activemq/CamelMessageConsumer.java   |  2 -
 .../component/activemq/CamelMessageProducer.java   |  8 +-
 .../camel/component/activemq/CamelQueue.java       |  3 +-
 .../component/activemq/CamelQueueReceiver.java     | 10 +--
 .../camel/component/activemq/CamelQueueSender.java | 30 +++----
 .../camel/component/activemq/CamelTopic.java       |  5 +-
 .../component/activemq/CamelTopicPublisher.java    | 93 ++++++++++++----------
 .../component/activemq/CamelTopicSubscriber.java   | 20 +++--
 .../OriginalDestinationPropagateStrategy.java      |  4 +-
 .../activemq/converter/ActiveMQConverter.java      | 14 ++--
 .../converter/ActiveMQMessageConverter.java        | 24 +++---
 .../camel-activemq/src/test/data/message1.xml      |  6 +-
 .../camel/component/activemq/AMQ2240Test.java      | 25 +++---
 .../camel/component/activemq/AMQ2611Test.java      | 15 ++--
 ...tiveMQComponentFactoryUserNamePasswordTest.java |  4 +-
 .../ActiveMQComponentUserNamePasswordTest.java     |  4 +-
 .../component/activemq/ActiveMQConfigureTest.java  | 15 ++--
 .../activemq/ActiveMQJmsHeaderRouteForceTest.java  | 11 ++-
 .../activemq/ActiveMQJmsHeaderRouteTest.java       |  5 +-
 .../activemq/ActiveMQOriginalDestinationTest.java  | 15 ++--
 .../ActiveMQReplyToHeaderUsingConverterTest.java   | 10 +--
 .../component/activemq/ActiveMQRouteTest.java      | 15 ++--
 .../activemq/AdvisoryConsumerExample.java          | 11 ++-
 .../activemq/AutoExposeQueuesInCamelTest.java      | 34 +++-----
 .../activemq/BrokerPreShutdownHookTest.java        |  2 -
 .../CamelDestinationExclusiveConsumerTest.java     |  3 +-
 .../activemq/CamelEmbeddedBrokerTestSupport.java   | 16 ++--
 .../activemq/CamelJmsRequestReplyNobTest.java      | 33 ++++----
 .../camel/component/activemq/CamelJmsTest.java     |  8 +-
 .../activemq/CamelVMTransportRoutingTest.java      | 51 ++++++------
 .../activemq/ComplexRequestReplyTest.java          | 51 ++++++------
 .../apache/camel/component/activemq/DlqTest.java   |  8 +-
 ...nvokeRequestReplyUsingJmsReplyToHeaderTest.java |  9 ++-
 .../apache/camel/component/activemq/JmsBridge.java | 36 +++++----
 .../activemq/JmsConsumeSendTransacted.java         |  4 +-
 .../component/activemq/JmsJdbcXARollbackTest.java  | 40 ++++------
 .../camel/component/activemq/JmsJdbcXATest.java    | 66 +++++++--------
 .../activemq/JmsSimpleRequestReplyTest.java        |  5 +-
 .../component/activemq/ObjectMessageTest.java      | 10 ++-
 .../component/activemq/SetGroupIdProcessor.java    |  5 +-
 .../camel/component/activemq/SetHeaderTest.java    |  9 +--
 .../component/activemq/TransactedConsumeTest.java  | 30 +++----
 .../converter/InvokeJmsMessageListenerTest.java    |  5 +-
 .../converter/InvokeMessageListenerTest.java       |  9 +--
 .../src/test/resources/log4j.properties            |  6 +-
 .../ActiveMQComponentFactoryUserNamePassword.xml   |  4 +-
 .../activemq/ActiveMQComponentUserNamePassword.xml |  4 +-
 .../activemq/BrowseQueuesInUFace-context.xml       |  4 +-
 ...melDestinationExclusiveConsumerTest-context.xml |  4 +-
 .../component/activemq/SetHeaderTest-context.xml   |  4 +-
 .../org/apache/camel/component/activemq/dlq.xml    |  4 +-
 .../component/activemq/jms-object-message.xml      |  4 +-
 .../apache/camel/component/activemq/jmsBridge.xml  | 10 ++-
 .../activemq/jmsConsumeSendTransacted.xml          | 10 ++-
 .../apache/camel/component/activemq/jmsXajdbc.xml  | 10 ++-
 .../camel/component/activemq/jmsXajdbcRollback.xml | 10 ++-
 .../camel/component/activemq/requestReply.xml      |  4 +-
 .../org/apache/camel/component/activemq/spring.xml |  4 +-
 .../camel/component/activemq/transactedconsume.xml |  6 +-
 .../springboot/ActiveMQComponentConfiguration.java |  2 +-
 67 files changed, 536 insertions(+), 543 deletions(-)

diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQComponent.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQComponent.java
index 147e140..98756f2 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQComponent.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQComponent.java
@@ -38,23 +38,34 @@ import org.springframework.jms.connection.SingleConnectionFactory;
 import org.springframework.jms.core.JmsTemplate;
 
 /**
- * The <a href="http://activemq.apache.org/camel/activemq.html">ActiveMQ Component</a>
+ * The <a href="http://activemq.apache.org/camel/activemq.html">ActiveMQ
+ * Component</a>
  */
 @Component("activemq")
 public class ActiveMQComponent extends JmsComponent {
-    private final CopyOnWriteArrayList<SingleConnectionFactory> singleConnectionFactoryList =
-            new CopyOnWriteArrayList<SingleConnectionFactory>();
-    private final CopyOnWriteArrayList<Service> pooledConnectionFactoryServiceList =
-            new CopyOnWriteArrayList<Service>();
     private static final transient Logger LOG = LoggerFactory.getLogger(ActiveMQComponent.class);
+    DestinationSource source;
     private boolean exposeAllQueues;
     private CamelEndpointLoader endpointLoader;
-
     private EnhancedConnection connection;
-    DestinationSource source;
+    private final CopyOnWriteArrayList<SingleConnectionFactory> singleConnectionFactoryList = new CopyOnWriteArrayList<SingleConnectionFactory>();
+    private final CopyOnWriteArrayList<Service> pooledConnectionFactoryServiceList = new CopyOnWriteArrayList<Service>();
+    
+    public ActiveMQComponent() {
+    }
+    
+    public ActiveMQComponent(CamelContext context) {
+        super(context);
+    }
+
+    public ActiveMQComponent(ActiveMQConfiguration configuration) {
+        super();
+        setConfiguration(configuration);
+    }
 
     /**
-     * Creates an <a href="http://camel.apache.org/activemq.html">ActiveMQ Component</a>
+     * Creates an <a href="http://camel.apache.org/activemq.html">ActiveMQ
+     * Component</a>
      *
      * @return the created component
      */
@@ -63,8 +74,10 @@ public class ActiveMQComponent extends JmsComponent {
     }
 
     /**
-     * Creates an <a href="http://camel.apache.org/activemq.html">ActiveMQ Component</a>
-     * connecting to the given <a href="http://activemq.apache.org/configuring-transports.html">broker URL</a>
+     * Creates an <a href="http://camel.apache.org/activemq.html">ActiveMQ
+     * Component</a> connecting to the given
+     * <a href="http://activemq.apache.org/configuring-transports.html">broker
+     * URL</a>
      *
      * @param brokerURL the URL to connect to
      * @return the created component
@@ -72,28 +85,16 @@ public class ActiveMQComponent extends JmsComponent {
     public static ActiveMQComponent activeMQComponent(String brokerURL) {
         ActiveMQComponent answer = new ActiveMQComponent();
         if (answer.getConfiguration() instanceof ActiveMQConfiguration) {
-            ((ActiveMQConfiguration) answer.getConfiguration())
-                    .setBrokerURL(brokerURL);
+            ((ActiveMQConfiguration)answer.getConfiguration()).setBrokerURL(brokerURL);
         }
 
         return answer;
     }
 
-    public ActiveMQComponent() {
-    }
-
-    public ActiveMQComponent(CamelContext context) {
-        super(context);
-    }
-
-    public ActiveMQComponent(ActiveMQConfiguration configuration) {
-        super();
-        setConfiguration(configuration);
-    }
-
     /**
      * Sets the broker URL to use to connect to ActiveMQ using the
-     * <a href="http://activemq.apache.org/configuring-transports.html">ActiveMQ URI format</a>
+     * <a href="http://activemq.apache.org/configuring-transports.html">ActiveMQ
+     * URI format</a>
      */
     public void setBrokerURL(String brokerURL) {
         if (getConfiguration() instanceof ActiveMQConfiguration) {
@@ -115,20 +116,23 @@ public class ActiveMQComponent extends JmsComponent {
     }
 
     /**
-     * If enabled this will cause all Queues in the ActiveMQ broker to be eagerly populated into the CamelContext
-     * so that they can be easily browsed by any Camel tooling. This option is disabled by default.
+     * If enabled this will cause all Queues in the ActiveMQ broker to be
+     * eagerly populated into the CamelContext so that they can be easily
+     * browsed by any Camel tooling. This option is disabled by default.
      */
     public void setExposeAllQueues(boolean exposeAllQueues) {
         this.exposeAllQueues = exposeAllQueues;
     }
 
     /**
-     * Enables or disables whether a PooledConnectionFactory will be used so that when
-     * messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather
-     * than the default with the Spring {@link JmsTemplate} which will create a new connection, session, producer
-     * for each message then close them all down again.
+     * Enables or disables whether a PooledConnectionFactory will be used so
+     * that when messages are sent to ActiveMQ from outside of a message
+     * consuming thread, pooling will be used rather than the default with the
+     * Spring {@link JmsTemplate} which will create a new connection, session,
+     * producer for each message then close them all down again.
      * <p/>
-     * The default value is true. Note that this requires an extra dependency on commons-pool2.
+     * The default value is true. Note that this requires an extra dependency on
+     * commons-pool2.
      */
     public void setUsePooledConnection(boolean usePooledConnection) {
         if (getConfiguration() instanceof ActiveMQConfiguration) {
@@ -137,10 +141,11 @@ public class ActiveMQComponent extends JmsComponent {
     }
 
     /**
-     * Enables or disables whether a Spring {@link SingleConnectionFactory} will be used so that when
-     * messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather
-     * than the default with the Spring {@link JmsTemplate} which will create a new connection, session, producer
-     * for each message then close them all down again.
+     * Enables or disables whether a Spring {@link SingleConnectionFactory} will
+     * be used so that when messages are sent to ActiveMQ from outside of a
+     * message consuming thread, pooling will be used rather than the default
+     * with the Spring {@link JmsTemplate} which will create a new connection,
+     * session, producer for each message then close them all down again.
      * <p/>
      * The default value is false and a pooled connection is used by default.
      */
@@ -172,7 +177,8 @@ public class ActiveMQComponent extends JmsComponent {
             throw ObjectHelper.wrapRuntimeCamelException(e);
         }
 
-        // if we have destination options then append them to the destination name
+        // if we have destination options then append them to the destination
+        // name
         if (ObjectHelper.isNotEmpty(query)) {
             return path + "?" + query;
         } else {
@@ -190,7 +196,8 @@ public class ActiveMQComponent extends JmsComponent {
             endpointLoader.afterPropertiesSet();
         }
 
-        // use OriginalDestinationPropagateStrategy by default if no custom stategy has been set
+        // use OriginalDestinationPropagateStrategy by default if no custom
+        // stategy has been set
         if (getMessageCreatedStrategy() == null) {
             setMessageCreatedStrategy(new OriginalDestinationPropagateStrategy());
         }
@@ -202,7 +209,7 @@ public class ActiveMQComponent extends JmsComponent {
                 if (connection == null) {
                     Connection value = getConfiguration().getConnectionFactory().createConnection();
                     if (value instanceof EnhancedConnection) {
-                        connection = (EnhancedConnection) value;
+                        connection = (EnhancedConnection)value;
                     } else {
                         throw new IllegalArgumentException("Created JMS Connection is not an EnhancedConnection: " + value);
                     }
@@ -242,7 +249,7 @@ public class ActiveMQComponent extends JmsComponent {
     @Override
     public void setConfiguration(JmsConfiguration configuration) {
         if (configuration instanceof ActiveMQConfiguration) {
-            ((ActiveMQConfiguration) configuration).setActiveMQComponent(this);
+            ((ActiveMQConfiguration)configuration).setActiveMQComponent(this);
         }
         super.setConfiguration(configuration);
     }
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQConfiguration.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQConfiguration.java
index 0c7c77c..67aee7b 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQConfiguration.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.activemq;
 
 import java.lang.reflect.Constructor;
+
 import javax.jms.ConnectionFactory;
 
 import org.apache.activemq.Service;
@@ -33,7 +34,7 @@ import org.springframework.transaction.PlatformTransactionManager;
 public class ActiveMQConfiguration extends JmsConfiguration {
     private ActiveMQComponent activeMQComponent;
     private String brokerURL = ActiveMQConnectionFactory.DEFAULT_BROKER_URL;
-    private boolean useSingleConnection = false;
+    private boolean useSingleConnection;
     private boolean usePooledConnection = true;
     private boolean trustAllPackages;
 
@@ -46,7 +47,8 @@ public class ActiveMQConfiguration extends JmsConfiguration {
 
     /**
      * Sets the broker URL to use to connect to ActiveMQ using the
-     * <a href="http://activemq.apache.org/configuring-transports.html">ActiveMQ URI format</a>
+     * <a href="http://activemq.apache.org/configuring-transports.html">ActiveMQ
+     * URI format</a>
      *
      * @param brokerURL the URL of the broker.
      */
@@ -77,10 +79,11 @@ public class ActiveMQConfiguration extends JmsConfiguration {
     }
 
     /**
-     * Enables or disables whether a Spring {@link SingleConnectionFactory} will be used so that when
-     * messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather
-     * than the default with the Spring {@link JmsTemplate} which will create a new connection, session, producer
-     * for each message then close them all down again.
+     * Enables or disables whether a Spring {@link SingleConnectionFactory} will
+     * be used so that when messages are sent to ActiveMQ from outside of a
+     * message consuming thread, pooling will be used rather than the default
+     * with the Spring {@link JmsTemplate} which will create a new connection,
+     * session, producer for each message then close them all down again.
      * <p/>
      * The default value is false and a pooled connection is used by default.
      */
@@ -93,12 +96,14 @@ public class ActiveMQConfiguration extends JmsConfiguration {
     }
 
     /**
-     * Enables or disables whether a PooledConnectionFactory will be used so that when
-     * messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather
-     * than the default with the Spring {@link JmsTemplate} which will create a new connection, session, producer
-     * for each message then close them all down again.
+     * Enables or disables whether a PooledConnectionFactory will be used so
+     * that when messages are sent to ActiveMQ from outside of a message
+     * consuming thread, pooling will be used rather than the default with the
+     * Spring {@link JmsTemplate} which will create a new connection, session,
+     * producer for each message then close them all down again.
      * <p/>
-     * The default value is true. Note that this requires an extra dependency on commons-pool2.
+     * The default value is true. Note that this requires an extra dependency on
+     * commons-pool2.
      */
     public void setUsePooledConnection(boolean usePooledConnection) {
         this.usePooledConnection = usePooledConnection;
@@ -109,12 +114,13 @@ public class ActiveMQConfiguration extends JmsConfiguration {
     }
 
     /**
-     * ObjectMessage objects depend on Java serialization of marshal/unmarshal object payload.
-     * This process is generally considered unsafe as malicious payload can exploit the host system.
-     * That's why starting with versions 5.12.2 and 5.13.0, ActiveMQ enforces users to explicitly whitelist packages
-     * that can be exchanged using ObjectMessages.
-     * <br/>
-     * This option can be set to <tt>true</tt> to trust all packages (eg whitelist is *).
+     * ObjectMessage objects depend on Java serialization of marshal/unmarshal
+     * object payload. This process is generally considered unsafe as malicious
+     * payload can exploit the host system. That's why starting with versions
+     * 5.12.2 and 5.13.0, ActiveMQ enforces users to explicitly whitelist
+     * packages that can be exchanged using ObjectMessages. <br/>
+     * This option can be set to <tt>true</tt> to trust all packages (eg
+     * whitelist is *).
      * <p/>
      * See more details at: http://activemq.apache.org/objectmessage.html
      */
@@ -123,7 +129,8 @@ public class ActiveMQConfiguration extends JmsConfiguration {
     }
 
     /**
-     * Factory method to create a default transaction manager if one is not specified
+     * Factory method to create a default transaction manager if one is not
+     * specified
      */
     @Override
     protected PlatformTransactionManager createTransactionManager() {
@@ -156,28 +163,26 @@ public class ActiveMQConfiguration extends JmsConfiguration {
                 activeMQComponent.addSingleConnectionFactory(scf);
             }
             return scf;
-        }
-        else if (isUsePooledConnection()) {
+        } else if (isUsePooledConnection()) {
             ConnectionFactory pcf = createPooledConnectionFactory(answer);
             if (activeMQComponent != null) {
-                activeMQComponent.addPooledConnectionFactoryService((Service) pcf);
+                activeMQComponent.addPooledConnectionFactoryService((Service)pcf);
             }
             return pcf;
-        }
-        else {
+        } else {
             return answer;
         }
     }
 
     protected ConnectionFactory createPooledConnectionFactory(ActiveMQConnectionFactory connectionFactory) {
-        // lets not use classes directly to avoid a runtime dependency on commons-pool2
+        // lets not use classes directly to avoid a runtime dependency on
+        // commons-pool2
         // for folks not using this option
         try {
             Class type = loadClass("org.apache.activemq.pool.PooledConnectionFactory", getClass().getClassLoader());
             Constructor constructor = type.getConstructor(org.apache.activemq.ActiveMQConnectionFactory.class);
-            return (ConnectionFactory) constructor.newInstance(connectionFactory);
-        }
-        catch (Exception e) {
+            return (ConnectionFactory)constructor.newInstance(connectionFactory);
+        } catch (Exception e) {
             throw new RuntimeException("Failed to instantiate PooledConnectionFactory: " + e, e);
         }
     }
@@ -187,12 +192,10 @@ public class ActiveMQConfiguration extends JmsConfiguration {
         if (contextClassLoader != null) {
             try {
                 return contextClassLoader.loadClass(name);
-            }
-            catch (ClassNotFoundException e) {
+            } catch (ClassNotFoundException e) {
                 try {
                     return loader.loadClass(name);
-                }
-                catch (ClassNotFoundException e1) {
+                } catch (ClassNotFoundException e1) {
                     throw e1;
                 }
             }
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQEndpoint.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQEndpoint.java
index 7cbece9..39839bb 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQEndpoint.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQEndpoint.java
@@ -21,13 +21,12 @@ import org.apache.camel.component.jms.JmsEndpoint;
 import org.apache.camel.spi.UriEndpoint;
 
 /**
- * The activemq component allows messages to be sent to (or consumed from) Apache ActiveMQ.
- *
- * This component extends the Camel JMS component.
+ * The activemq component allows messages to be sent to (or consumed from)
+ * Apache ActiveMQ. This component extends the Camel JMS component.
  */
 @UriEndpoint(scheme = "activemq", title = "ActiveMQ", syntax = "activemq:destinationType:destinationName", consumerClass = JmsConsumer.class, label = "messaging")
 public class ActiveMQEndpoint extends JmsEndpoint {
 
     // needed for component documentation
 
-}
\ No newline at end of file
+}
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelConnection.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelConnection.java
index 7dc9f4e..8febe77 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelConnection.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelConnection.java
@@ -30,8 +30,7 @@ public class CamelConnection extends ActiveMQConnection implements CamelContextA
 
     private CamelContext camelContext;
 
-    protected CamelConnection(Transport transport, IdGenerator clientIdGenerator,
-                              IdGenerator connectionIdGenerator, JMSStatsImpl factoryStats) throws Exception {
+    protected CamelConnection(Transport transport, IdGenerator clientIdGenerator, IdGenerator connectionIdGenerator, JMSStatsImpl factoryStats) throws Exception {
         super(transport, clientIdGenerator, connectionIdGenerator, factoryStats);
     }
 
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelConnectionFactory.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelConnectionFactory.java
index 9b3f7dd..d522b77 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelConnectionFactory.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelConnectionFactory.java
@@ -24,9 +24,8 @@ import org.apache.camel.CamelContextAware;
 
 /**
  * A JMS ConnectionFactory which resolves non-JMS destinations or instances of
- * {@link CamelDestination} to use the {@link CamelContext} to perform smart routing etc
- *
- * 
+ * {@link CamelDestination} to use the {@link CamelContext} to perform smart
+ * routing etc
  */
 public class CamelConnectionFactory extends ActiveMQConnectionFactory implements CamelContextAware {
     private CamelContext camelContext;
@@ -43,7 +42,7 @@ public class CamelConnectionFactory extends ActiveMQConnectionFactory implements
     }
 
     // Implementation methods
-    //-----------------------------------------------------------------------
+    // -----------------------------------------------------------------------
     protected CamelConnection createActiveMQConnection(Transport transport, JMSStatsImpl stats) throws Exception {
         CamelConnection connection = new CamelConnection(transport, getClientIdGenerator(), getConnectionIdGenerator(), stats);
         CamelContext context = getCamelContext();
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelDestination.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelDestination.java
index 31dff1c..b636fad 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelDestination.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelDestination.java
@@ -40,7 +40,7 @@ public class CamelDestination implements CustomDestination, CamelContextAware {
     private String uri;
     private Endpoint endpoint;
     private CamelContext camelContext;
-    // add in dummy endpoint pending camel release with 
+    // add in dummy endpoint pending camel release with
     // https://issues.apache.org/activemq/browse/CAMEL-1982
     private JmsBinding binding = new JmsBinding(new JmsEndpoint());
 
@@ -56,7 +56,7 @@ public class CamelDestination implements CustomDestination, CamelContextAware {
     }
 
     // CustomDestination interface
-    //-----------------------------------------------------------------------
+    // -----------------------------------------------------------------------
     public MessageConsumer createConsumer(ActiveMQSession session, String messageSelector) {
         return createConsumer(session, messageSelector, false);
     }
@@ -78,7 +78,7 @@ public class CamelDestination implements CustomDestination, CamelContextAware {
     }
 
     // Producers
-    //-----------------------------------------------------------------------
+    // -----------------------------------------------------------------------
     public MessageProducer createProducer(ActiveMQSession session) throws JMSException {
         return new CamelMessageProducer(this, resolveEndpoint(session), session);
     }
@@ -92,7 +92,7 @@ public class CamelDestination implements CustomDestination, CamelContextAware {
     }
 
     // Properties
-    //-----------------------------------------------------------------------
+    // -----------------------------------------------------------------------
 
     public String getUri() {
         return uri;
@@ -127,7 +127,7 @@ public class CamelDestination implements CustomDestination, CamelContextAware {
     }
 
     // Implementation methods
-    //-----------------------------------------------------------------------
+    // -----------------------------------------------------------------------
 
     /**
      * Resolves the Camel Endpoint for this destination
@@ -150,7 +150,7 @@ public class CamelDestination implements CustomDestination, CamelContextAware {
         if (answer == null) {
             ActiveMQConnection connection = session.getConnection();
             if (connection instanceof CamelConnection) {
-                CamelConnection camelConnection = (CamelConnection) connection;
+                CamelConnection camelConnection = (CamelConnection)connection;
                 answer = camelConnection.getCamelContext();
             }
         }
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelEndpointLoader.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelEndpointLoader.java
index 1c8373a..60c94ae 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelEndpointLoader.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelEndpointLoader.java
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -36,15 +35,16 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * A helper bean which populates a {@link CamelContext} with ActiveMQ Queue endpoints
+ * A helper bean which populates a {@link CamelContext} with ActiveMQ Queue
+ * endpoints
  *
  * @org.apache.xbean.XBean
  */
 public class CamelEndpointLoader implements CamelContextAware {
     private static final transient Logger LOG = LoggerFactory.getLogger(CamelEndpointLoader.class);
+    DestinationSource source;
     private CamelContext camelContext;
     private ActiveMQComponent component;
-    DestinationSource source;
 
     public CamelEndpointLoader() {
     }
@@ -55,11 +55,9 @@ public class CamelEndpointLoader implements CamelContextAware {
     }
 
     /**
-     * JSR-250 callback wrapper; converts checked exceptions to runtime exceptions
-     *
-     * delegates to afterPropertiesSet, done to prevent backwards incompatible signature change
-     *
-     * fix: AMQ-4676
+     * JSR-250 callback wrapper; converts checked exceptions to runtime
+     * exceptions delegates to afterPropertiesSet, done to prevent backwards
+     * incompatible signature change fix: AMQ-4676
      */
     @PostConstruct
     private void postConstruct() {
@@ -71,7 +69,6 @@ public class CamelEndpointLoader implements CamelContextAware {
     }
 
     /**
-     *
      * @throws Exception
      * @org.apache.xbean.InitMethod
      */
@@ -83,14 +80,14 @@ public class CamelEndpointLoader implements CamelContextAware {
                     try {
                         ActiveMQDestination destination = event.getDestination();
                         if (destination instanceof ActiveMQQueue) {
-                            ActiveMQQueue queue = (ActiveMQQueue) destination;
+                            ActiveMQQueue queue = (ActiveMQQueue)destination;
                             if (event.isAddOperation()) {
                                 addQueue(queue);
                             } else {
                                 removeQueue(queue);
                             }
                         } else if (destination instanceof ActiveMQTopic) {
-                            ActiveMQTopic topic = (ActiveMQTopic) destination;
+                            ActiveMQTopic topic = (ActiveMQTopic)destination;
                             if (event.isAddOperation()) {
                                 addTopic(topic);
                             } else {
@@ -116,7 +113,7 @@ public class CamelEndpointLoader implements CamelContextAware {
     }
 
     // Properties
-    //-------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
     @Override
     public CamelContext getCamelContext() {
         return camelContext;
@@ -139,7 +136,7 @@ public class CamelEndpointLoader implements CamelContextAware {
     }
 
     // Implementation methods
-    //-------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
 
     protected void addQueue(ActiveMQQueue queue) throws Exception {
         String queueUri = getQueueUri(queue);
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelMessageConsumer.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelMessageConsumer.java
index ae3b2aa..db5a284 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelMessageConsumer.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelMessageConsumer.java
@@ -33,8 +33,6 @@ import org.apache.camel.Processor;
 /**
  * A JMS {@link javax.jms.MessageConsumer} which consumes message exchanges from
  * a Camel {@link Endpoint}
- * 
- * 
  */
 public class CamelMessageConsumer implements MessageConsumer {
     private final CamelDestination destination;
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelMessageProducer.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelMessageProducer.java
index 166fa0f..7e0e178 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelMessageProducer.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelMessageProducer.java
@@ -34,11 +34,9 @@ import org.apache.camel.util.ObjectHelper;
 /**
  * A JMS {@link javax.jms.MessageProducer} which sends message exchanges to a
  * Camel {@link Endpoint}
- * 
- * 
  */
 public class CamelMessageProducer extends ActiveMQMessageProducerSupport {
-    
+
     protected Producer producer;
 
     private final CamelDestination destination;
@@ -88,8 +86,8 @@ public class CamelMessageProducer extends ActiveMQMessageProducerSupport {
             throw new IllegalArgumentException("Invalid destination setting: " + destination + " when expected: " + this.destination);
         }
         try {
-			Exchange exchange = endpoint.createExchange(ExchangePattern.InOnly);
-			exchange.setIn(new JmsMessage(exchange, message, null, camelDestination.getBinding()));
+            Exchange exchange = endpoint.createExchange(ExchangePattern.InOnly);
+            exchange.setIn(new JmsMessage(exchange, message, null, camelDestination.getBinding()));
             producer.process(exchange);
         } catch (JMSException e) {
             throw e;
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelQueue.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelQueue.java
index beb6ff2..10e0550 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelQueue.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelQueue.java
@@ -25,8 +25,6 @@ import org.apache.activemq.ActiveMQSession;
 
 /**
  * A JMS {@link Queue} object which refers to a Camel endpoint
- *
- * 
  */
 public class CamelQueue extends CamelDestination implements Queue {
 
@@ -41,6 +39,7 @@ public class CamelQueue extends CamelDestination implements Queue {
     public QueueSender createSender(ActiveMQSession session) throws JMSException {
         return new CamelQueueSender(this, resolveEndpoint(session), session);
     }
+
     public QueueReceiver createReceiver(ActiveMQSession session, String messageSelector) {
         return new CamelQueueReceiver(this, resolveEndpoint(session), session, messageSelector);
     }
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelQueueReceiver.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelQueueReceiver.java
index cb2fbc3..be5ed30 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelQueueReceiver.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelQueueReceiver.java
@@ -26,8 +26,6 @@ import org.apache.camel.Endpoint;
 /**
  * A JMS {@link javax.jms.QueueReceiver} which consumes message exchanges from a
  * Camel {@link org.apache.camel.Endpoint}
- *
- * 
  */
 public class CamelQueueReceiver extends CamelMessageConsumer implements QueueReceiver {
 
@@ -39,12 +37,12 @@ public class CamelQueueReceiver extends CamelMessageConsumer implements QueueRec
      * Gets the <CODE>Queue</CODE> associated with this queue receiver.
      *
      * @return this receiver's <CODE>Queue</CODE>
-     * @throws JMSException if the JMS provider fails to get the queue for this queue
-     *                      receiver due to some internal error.
+     * @throws JMSException if the JMS provider fails to get the queue for this
+     *             queue receiver due to some internal error.
      */
 
     public Queue getQueue() throws JMSException {
         checkClosed();
-        return (Queue) super.getDestination();
+        return (Queue)super.getDestination();
     }
-}
\ No newline at end of file
+}
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelQueueSender.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelQueueSender.java
index 55a664d..bca09cb 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelQueueSender.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelQueueSender.java
@@ -27,8 +27,6 @@ import org.apache.camel.Endpoint;
 /**
  * A JMS {@link javax.jms.QueueSender} which sends message exchanges to a Camel
  * {@link org.apache.camel.Endpoint}
- * 
- * 
  */
 public class CamelQueueSender extends CamelMessageProducer implements QueueSender {
 
@@ -41,7 +39,7 @@ public class CamelQueueSender extends CamelMessageProducer implements QueueSende
      * 
      * @return this sender's queue
      * @throws JMSException if the JMS provider fails to get the queue for this
-     *                 <CODE>QueueSender</CODE> due to some internal error.
+     *             <CODE>QueueSender</CODE> due to some internal error.
      */
 
     public Queue getQueue() throws JMSException {
@@ -50,16 +48,18 @@ public class CamelQueueSender extends CamelMessageProducer implements QueueSende
 
     /**
      * Sends a message to a queue for an unidentified message producer. Uses the
-     * <CODE>QueueSender</CODE>'s default delivery mode, priority, and time
-     * to live. <p/> <p/> Typically, a message producer is assigned a queue at
-     * creation time; however, the JMS API also supports unidentified message
-     * producers, which require that the queue be supplied every time a message
-     * is sent.
+     * <CODE>QueueSender</CODE>'s default delivery mode, priority, and time to
+     * live.
+     * <p/>
+     * <p/>
+     * Typically, a message producer is assigned a queue at creation time;
+     * however, the JMS API also supports unidentified message producers, which
+     * require that the queue be supplied every time a message is sent.
      * 
      * @param queue the queue to send this message to
      * @param message the message to send
      * @throws JMSException if the JMS provider fails to send the message due to
-     *                 some internal error.
+     *             some internal error.
      * @see javax.jms.MessageProducer#getDeliveryMode()
      * @see javax.jms.MessageProducer#getTimeToLive()
      * @see javax.jms.MessageProducer#getPriority()
@@ -71,10 +71,12 @@ public class CamelQueueSender extends CamelMessageProducer implements QueueSende
 
     /**
      * Sends a message to a queue for an unidentified message producer,
-     * specifying delivery mode, priority and time to live. <p/> <p/> Typically,
-     * a message producer is assigned a queue at creation time; however, the JMS
-     * API also supports unidentified message producers, which require that the
-     * queue be supplied every time a message is sent.
+     * specifying delivery mode, priority and time to live.
+     * <p/>
+     * <p/>
+     * Typically, a message producer is assigned a queue at creation time;
+     * however, the JMS API also supports unidentified message producers, which
+     * require that the queue be supplied every time a message is sent.
      * 
      * @param queue the queue to send this message to
      * @param message the message to send
@@ -82,7 +84,7 @@ public class CamelQueueSender extends CamelMessageProducer implements QueueSende
      * @param priority the priority for this message
      * @param timeToLive the message's lifetime (in milliseconds)
      * @throws JMSException if the JMS provider fails to send the message due to
-     *                 some internal error.
+     *             some internal error.
      */
 
     public void send(Queue queue, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelTopic.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelTopic.java
index 984ed94..a7c54c1 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelTopic.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelTopic.java
@@ -25,8 +25,6 @@ import org.apache.activemq.ActiveMQSession;
 
 /**
  * A JMS {@link javax.jms.Topic} object which refers to a Camel endpoint
- *
- * 
  */
 public class CamelTopic extends CamelDestination implements Topic {
 
@@ -46,5 +44,4 @@ public class CamelTopic extends CamelDestination implements Topic {
         return new CamelTopicSubscriber(this, resolveEndpoint(session), session, name, messageSelector, noLocal);
     }
 
-
-}
\ No newline at end of file
+}
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelTopicPublisher.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelTopicPublisher.java
index 0f63c57..2ac4f54 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelTopicPublisher.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelTopicPublisher.java
@@ -27,8 +27,6 @@ import org.apache.camel.Endpoint;
 /**
  * A JMS {@link javax.jms.TopicPublisher} which sends message exchanges to a
  * Camel {@link Endpoint}
- *
- * 
  */
 public class CamelTopicPublisher extends CamelMessageProducer implements TopicPublisher {
 
@@ -36,17 +34,16 @@ public class CamelTopicPublisher extends CamelMessageProducer implements TopicPu
         super(destination, endpoint, session);
     }
 
-
     /**
      * Gets the topic associated with this <CODE>TopicPublisher</CODE>.
      *
      * @return this publisher's topic
      * @throws JMSException if the JMS provider fails to get the topic for this
-     *                      <CODE>TopicPublisher</CODE> due to some internal error.
+     *             <CODE>TopicPublisher</CODE> due to some internal error.
      */
 
     public Topic getTopic() throws JMSException {
-        return (Topic) super.getDestination();
+        return (Topic)super.getDestination();
     }
 
     /**
@@ -54,14 +51,17 @@ public class CamelTopicPublisher extends CamelMessageProducer implements TopicPu
      * default delivery mode, priority, and time to live.
      *
      * @param message the message to publish
-     * @throws JMSException                if the JMS provider fails to publish the message due to
-     *                                     some internal error.
-     * @throws javax.jms.MessageFormatException      if an invalid message is specified.
-     * @throws javax.jms.InvalidDestinationException if a client uses this method with a <CODE>TopicPublisher
+     * @throws JMSException if the JMS provider fails to publish the message due
+     *             to some internal error.
+     * @throws javax.jms.MessageFormatException if an invalid message is
+     *             specified.
+     * @throws javax.jms.InvalidDestinationException if a client uses this
+     *             method with a <CODE>TopicPublisher
      *                                     </CODE> with an invalid topic.
-     * @throws java.lang.UnsupportedOperationException
-     *                                     if a client uses this method with a <CODE>TopicPublisher
-     *                                     </CODE> that did not specify a topic at creation time.
+     * @throws java.lang.UnsupportedOperationException if a client uses this
+     *             method with a <CODE>TopicPublisher
+     *                                     </CODE> that did not specify a topic
+     *             at creation time.
      * @see javax.jms.MessageProducer#getDeliveryMode()
      * @see javax.jms.MessageProducer#getTimeToLive()
      * @see javax.jms.MessageProducer#getPriority()
@@ -72,44 +72,48 @@ public class CamelTopicPublisher extends CamelMessageProducer implements TopicPu
     }
 
     /**
-     * Publishes a message to the topic, specifying delivery mode, priority,
-     * and time to live.
+     * Publishes a message to the topic, specifying delivery mode, priority, and
+     * time to live.
      *
-     * @param message      the message to publish
+     * @param message the message to publish
      * @param deliveryMode the delivery mode to use
-     * @param priority     the priority for this message
-     * @param timeToLive   the message's lifetime (in milliseconds)
-     * @throws JMSException                if the JMS provider fails to publish the message due to
-     *                                     some internal error.
-     * @throws javax.jms.MessageFormatException      if an invalid message is specified.
-     * @throws javax.jms.InvalidDestinationException if a client uses this method with a <CODE>TopicPublisher
+     * @param priority the priority for this message
+     * @param timeToLive the message's lifetime (in milliseconds)
+     * @throws JMSException if the JMS provider fails to publish the message due
+     *             to some internal error.
+     * @throws javax.jms.MessageFormatException if an invalid message is
+     *             specified.
+     * @throws javax.jms.InvalidDestinationException if a client uses this
+     *             method with a <CODE>TopicPublisher
      *                                     </CODE> with an invalid topic.
-     * @throws java.lang.UnsupportedOperationException
-     *                                     if a client uses this method with a <CODE>TopicPublisher
-     *                                     </CODE> that did not specify a topic at creation time.
+     * @throws java.lang.UnsupportedOperationException if a client uses this
+     *             method with a <CODE>TopicPublisher
+     *                                     </CODE> that did not specify a topic
+     *             at creation time.
      */
 
-    public void publish(Message message, int deliveryMode, int priority,
-                        long timeToLive) throws JMSException {
+    public void publish(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
         super.send(message, deliveryMode, priority, timeToLive);
     }
 
     /**
-     * Publishes a message to a topic for an unidentified message producer.
-     * Uses the <CODE>TopicPublisher</CODE>'s default delivery mode,
-     * priority, and time to live.
+     * Publishes a message to a topic for an unidentified message producer. Uses
+     * the <CODE>TopicPublisher</CODE>'s default delivery mode, priority, and
+     * time to live.
      * <p/>
      * <P>
      * Typically, a message producer is assigned a topic at creation time;
      * however, the JMS API also supports unidentified message producers, which
      * require that the topic be supplied every time a message is published.
      *
-     * @param topic   the topic to publish this message to
+     * @param topic the topic to publish this message to
      * @param message the message to publish
-     * @throws JMSException                if the JMS provider fails to publish the message due to
-     *                                     some internal error.
-     * @throws javax.jms.MessageFormatException      if an invalid message is specified.
-     * @throws javax.jms.InvalidDestinationException if a client uses this method with an invalid topic.
+     * @throws JMSException if the JMS provider fails to publish the message due
+     *             to some internal error.
+     * @throws javax.jms.MessageFormatException if an invalid message is
+     *             specified.
+     * @throws javax.jms.InvalidDestinationException if a client uses this
+     *             method with an invalid topic.
      * @see javax.jms.MessageProducer#getDeliveryMode()
      * @see javax.jms.MessageProducer#getTimeToLive()
      * @see javax.jms.MessageProducer#getPriority()
@@ -128,19 +132,20 @@ public class CamelTopicPublisher extends CamelMessageProducer implements TopicPu
      * however, the JMS API also supports unidentified message producers, which
      * require that the topic be supplied every time a message is published.
      *
-     * @param topic        the topic to publish this message to
-     * @param message      the message to publish
+     * @param topic the topic to publish this message to
+     * @param message the message to publish
      * @param deliveryMode the delivery mode to use
-     * @param priority     the priority for this message
-     * @param timeToLive   the message's lifetime (in milliseconds)
-     * @throws JMSException                if the JMS provider fails to publish the message due to
-     *                                     some internal error.
-     * @throws javax.jms.MessageFormatException      if an invalid message is specified.
-     * @throws javax.jms.InvalidDestinationException if a client uses this method with an invalid topic.
+     * @param priority the priority for this message
+     * @param timeToLive the message's lifetime (in milliseconds)
+     * @throws JMSException if the JMS provider fails to publish the message due
+     *             to some internal error.
+     * @throws javax.jms.MessageFormatException if an invalid message is
+     *             specified.
+     * @throws javax.jms.InvalidDestinationException if a client uses this
+     *             method with an invalid topic.
      */
 
-    public void publish(Topic topic, Message message, int deliveryMode,
-                        int priority, long timeToLive) throws JMSException {
+    public void publish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
         super.send(topic, message, deliveryMode, priority, timeToLive);
     }
 }
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelTopicSubscriber.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelTopicSubscriber.java
index d157386..9533c26 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelTopicSubscriber.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/CamelTopicSubscriber.java
@@ -24,10 +24,8 @@ import org.apache.activemq.ActiveMQSession;
 import org.apache.camel.Endpoint;
 
 /**
- * A JMS {@link javax.jms.TopicSubscriber} which consumes message exchanges from a
- * Camel {@link Endpoint}
- *
- * 
+ * A JMS {@link javax.jms.TopicSubscriber} which consumes message exchanges from
+ * a Camel {@link Endpoint}
  */
 public class CamelTopicSubscriber extends CamelMessageConsumer implements TopicSubscriber {
 
@@ -39,23 +37,23 @@ public class CamelTopicSubscriber extends CamelMessageConsumer implements TopicS
      * Gets the <CODE>Topic</CODE> associated with this subscriber.
      *
      * @return this subscriber's <CODE>Topic</CODE>
-     * @throws javax.jms.JMSException if the JMS provider fails to get the topic for this topic
-     *                                subscriber due to some internal error.
+     * @throws javax.jms.JMSException if the JMS provider fails to get the topic
+     *             for this topic subscriber due to some internal error.
      */
 
     public Topic getTopic() throws JMSException {
         checkClosed();
-        return (Topic) super.getDestination();
+        return (Topic)super.getDestination();
     }
 
     /**
-     * Gets the <CODE>NoLocal</CODE> attribute for this subscriber. The
-     * default value for this attribute is false.
+     * Gets the <CODE>NoLocal</CODE> attribute for this subscriber. The default
+     * value for this attribute is false.
      *
      * @return true if locally published messages are being inhibited
      * @throws JMSException if the JMS provider fails to get the <CODE>NoLocal
-     *                      </CODE> attribute for this topic subscriber due to some
-     *                      internal error.
+     *                      </CODE> attribute for this topic subscriber due to
+     *             some internal error.
      */
 
     public boolean getNoLocal() throws JMSException {
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/OriginalDestinationPropagateStrategy.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/OriginalDestinationPropagateStrategy.java
index 4e0deba..6060ac7 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/OriginalDestinationPropagateStrategy.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/OriginalDestinationPropagateStrategy.java
@@ -41,12 +41,12 @@ public class OriginalDestinationPropagateStrategy implements MessageCreatedStrat
             JmsMessage msg = exchange.getIn(JmsMessage.class);
             Message jms = msg.getJmsMessage();
             if (jms != null && jms instanceof ActiveMQMessage && message instanceof ActiveMQMessage) {
-                ActiveMQMessage amq = (ActiveMQMessage) jms;
+                ActiveMQMessage amq = (ActiveMQMessage)jms;
                 if (amq.getOriginalDestination() == null) {
                     ActiveMQDestination from = amq.getDestination();
                     if (from != null) {
                         LOG.trace("Setting OriginalDestination: {} on {}", from, message);
-                        ((ActiveMQMessage) message).setOriginalDestination(from);
+                        ((ActiveMQMessage)message).setOriginalDestination(from);
                     }
                 }
             }
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/converter/ActiveMQConverter.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/converter/ActiveMQConverter.java
index aad96d4..81f89a2 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/converter/ActiveMQConverter.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/converter/ActiveMQConverter.java
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -27,15 +26,16 @@ import org.apache.camel.Converter;
 public class ActiveMQConverter {
     /**
      * Converts a URL in ActiveMQ syntax to a destination such as to support
-     * "queue://foo.bar" or 'topic://bar.whatnot". Things default to queues if no scheme.
-     *
-     * This allows ActiveMQ destinations to be passed around as Strings and converted back again.
+     * "queue://foo.bar" or 'topic://bar.whatnot". Things default to queues if
+     * no scheme. This allows ActiveMQ destinations to be passed around as
+     * Strings and converted back again.
      *
-     * @param name is the name of the queue or the full URI using prefixes queue:// or topic://
+     * @param name is the name of the queue or the full URI using prefixes
+     *            queue:// or topic://
      * @return the ActiveMQ destination
      */
     @Converter
-    public static ActiveMQDestination toDestination(String name) {
+    public ActiveMQDestination toDestination(String name) {
         return ActiveMQDestination.createDestination(name, ActiveMQDestination.QUEUE_TYPE);
     }
 
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/converter/ActiveMQMessageConverter.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/converter/ActiveMQMessageConverter.java
index 3190562..8f14823 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/converter/ActiveMQMessageConverter.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/converter/ActiveMQMessageConverter.java
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -20,8 +19,8 @@ package org.apache.camel.component.activemq.converter;
 import java.io.Serializable;
 
 import javax.jms.JMSException;
-import javax.jms.MessageListener;
 import javax.jms.Message;
+import javax.jms.MessageListener;
 
 import org.apache.activemq.command.ActiveMQMessage;
 import org.apache.activemq.command.ActiveMQObjectMessage;
@@ -51,13 +50,14 @@ public class ActiveMQMessageConverter {
     }
 
     /**
-     * Allows a JMS {@link MessageListener} to be converted to a Camel {@link Processor}
-     * so that we can provide better
-     * <a href="">Bean Integration</a> so that we can use any JMS MessageListener in
-     * in Camel as a bean
+     * Allows a JMS {@link MessageListener} to be converted to a Camel
+     * {@link Processor} so that we can provide better <a href="">Bean
+     * Integration</a> so that we can use any JMS MessageListener in in Camel as
+     * a bean
+     * 
      * @param listener the JMS message listener
      * @return a newly created Camel Processor which when invoked will invoke
-     * {@link MessageListener#onMessage(Message)}
+     *         {@link MessageListener#onMessage(Message)}
      */
     @Converter
     public Processor toProcessor(final MessageListener listener) {
@@ -78,11 +78,11 @@ public class ActiveMQMessageConverter {
         Object body = exchange.getIn().getBody();
         if (body instanceof String) {
             ActiveMQTextMessage answer = new ActiveMQTextMessage();
-            answer.setText((String) body);
+            answer.setText((String)body);
             return answer;
         } else if (body instanceof Serializable) {
             ActiveMQObjectMessage answer = new ActiveMQObjectMessage();
-            answer.setObject((Serializable) body);
+            answer.setObject((Serializable)body);
             return answer;
         } else {
             return new ActiveMQMessage();
@@ -91,7 +91,7 @@ public class ActiveMQMessageConverter {
     }
 
     // Properties
-    //-------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
     public JmsBinding getBinding() {
         return binding;
     }
@@ -99,4 +99,4 @@ public class ActiveMQMessageConverter {
     public void setBinding(JmsBinding binding) {
         this.binding = binding;
     }
-}
\ No newline at end of file
+}
diff --git a/components/camel-activemq/src/test/data/message1.xml b/components/camel-activemq/src/test/data/message1.xml
index d6a4645..a845407 100644
--- a/components/camel-activemq/src/test/data/message1.xml
+++ b/components/camel-activemq/src/test/data/message1.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+
     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.
@@ -7,16 +8,17 @@
     (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
+         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.
+
 -->
 <person user="james">
   <firstName>James</firstName>
   <lastName>Strachan</lastName>
   <city>London</city>
-</person>
\ No newline at end of file
+</person>
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AMQ2240Test.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AMQ2240Test.java
index a782b42..450ce9c 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AMQ2240Test.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AMQ2240Test.java
@@ -6,7 +6,7 @@
  * (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
+ *      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,
@@ -16,12 +16,9 @@
  */
 package org.apache.camel.component.activemq;
 
-import static org.junit.Assert.fail;
-
 import org.apache.camel.CamelContext;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.activemq.ActiveMQComponent;
 import org.apache.camel.component.activemq.AMQ2611Test.Consumer;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.junit.After;
@@ -29,11 +26,13 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.junit.Assert.fail;
+
 public class AMQ2240Test {
 
     private static final Logger LOG = LoggerFactory.getLogger(AMQ2240Test.class);
 
-    private CamelContext camelContext = null;
+    private CamelContext camelContext;
 
     @After
     public void destroyCamelContext() throws Exception {
@@ -46,12 +45,9 @@ public class AMQ2240Test {
     @Test
     public void testBadVMTransportOptionsJMSPrefix() throws Exception {
 
-        try{
-            final String vmUri = "vm://localhost?" +
-                "jms.redeliveryPolicy.maximumRedeliveries=0&" +
-                "jms.redeliveryPolicy.initialRedeliveryDelay=500&" +
-                "jms.useAsyncSend=false&jms.sendTimeout=ABC&" +
-                "jms.maxXXXXReconnectAttempts=1&jms.timeout=3000";
+        try {
+            final String vmUri = "vm://localhost?" + "jms.redeliveryPolicy.maximumRedeliveries=0&" + "jms.redeliveryPolicy.initialRedeliveryDelay=500&"
+                                 + "jms.useAsyncSend=false&jms.sendTimeout=ABC&" + "jms.maxXXXXReconnectAttempts=1&jms.timeout=3000";
 
             LOG.info("creating context with bad URI: " + vmUri);
             ActiveMQComponent amq = ActiveMQComponent.activeMQComponent(vmUri);
@@ -59,7 +55,7 @@ public class AMQ2240Test {
             amq.getConfiguration().getConnectionFactory();
 
             fail("Should have received an exception from the bad URI.");
-        } catch(Exception e) {
+        } catch (Exception e) {
             // Expected
         }
     }
@@ -68,8 +64,7 @@ public class AMQ2240Test {
     public void testBadVMTransportOptionsBrokerPrefix() throws Exception {
         try {
 
-            final String vmUri = "vm://localhost?" +
-                "broker.XXX=foo&broker.persistent=XXX&broker.useJmx=false";
+            final String vmUri = "vm://localhost?" + "broker.XXX=foo&broker.persistent=XXX&broker.useJmx=false";
 
             LOG.info("creating context with bad URI: " + vmUri);
             ActiveMQComponent amq = ActiveMQComponent.activeMQComponent(vmUri);
@@ -89,7 +84,7 @@ public class AMQ2240Test {
             producerTemplate.sendBody(queueEndpointName, "message");
 
             fail("Should have received an exception from the bad URI.");
-        } catch(Exception e) {
+        } catch (Exception e) {
             // Expected
         }
     }
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AMQ2611Test.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AMQ2611Test.java
index ff2f591..7dcdb4f 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AMQ2611Test.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AMQ2611Test.java
@@ -23,7 +23,6 @@ import org.apache.camel.Body;
 import org.apache.camel.CamelContext;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.activemq.ActiveMQComponent;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -32,9 +31,9 @@ public class AMQ2611Test extends TestCase {
 
     private static final String BROKER_URL = "tcp://localhost:61616";
     private static final String QUEUE_NAME = "test.queue";
-    private static final Logger log = LoggerFactory.getLogger(AMQ2611Test.class);
-    private BrokerService brokerService = null;
-    private CamelContext camelContext = null;
+    private static final Logger LOG = LoggerFactory.getLogger(AMQ2611Test.class);
+    private BrokerService brokerService;
+    private CamelContext camelContext;
 
     private void createBroker() throws Exception {
         brokerService = new BrokerService();
@@ -44,12 +43,12 @@ public class AMQ2611Test extends TestCase {
 
     public static class Consumer {
         public void consume(@Body String message) {
-            log.info("consume message = " + message);
+            LOG.info("consume message = " + message);
         }
     }
 
     private void createCamelContext() throws Exception {
-        log.info("creating context and sending message");
+        LOG.info("creating context and sending message");
         camelContext = new DefaultCamelContext();
         camelContext.addComponent("activemq", ActiveMQComponent.activeMQComponent(BROKER_URL));
         final String queueEndpointName = "activemq:queue" + QUEUE_NAME;
@@ -65,7 +64,7 @@ public class AMQ2611Test extends TestCase {
     }
 
     private void destroyCamelContext() throws Exception {
-        log.info("destroying context");
+        LOG.info("destroying context");
         camelContext.stop();
         camelContext = null;
     }
@@ -82,7 +81,7 @@ public class AMQ2611Test extends TestCase {
                 assertEquals(0, brokerService.getConnectorByName(BROKER_URL).getConnections().size());
             }
         } catch (Exception e) {
-            log.warn("run", e);
+            LOG.warn("run", e);
         }
     }
 }
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQComponentFactoryUserNamePasswordTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQComponentFactoryUserNamePasswordTest.java
index 5f8f606..59eaaae 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQComponentFactoryUserNamePasswordTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQComponentFactoryUserNamePasswordTest.java
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.component.activemq;
 
-import org.apache.camel.component.activemq.ActiveMQComponent;
-import org.apache.camel.component.activemq.ActiveMQConfiguration;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
 import org.junit.Test;
 import org.springframework.context.support.AbstractApplicationContext;
@@ -35,7 +33,7 @@ public class ActiveMQComponentFactoryUserNamePasswordTest extends CamelSpringTes
         ActiveMQComponent comp = context.getComponent("activemq", ActiveMQComponent.class);
         assertNotNull(comp);
 
-        ActiveMQConfiguration config = (ActiveMQConfiguration) comp.getConfiguration();
+        ActiveMQConfiguration config = (ActiveMQConfiguration)comp.getConfiguration();
         assertNotNull(config);
         assertEquals("admin2", config.getUserName());
         assertEquals("secret2", config.getPassword());
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQComponentUserNamePasswordTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQComponentUserNamePasswordTest.java
index cfcc10c..de61d1b 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQComponentUserNamePasswordTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQComponentUserNamePasswordTest.java
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.component.activemq;
 
-import org.apache.camel.component.activemq.ActiveMQComponent;
-import org.apache.camel.component.activemq.ActiveMQConfiguration;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
 import org.junit.Test;
 import org.springframework.context.support.AbstractApplicationContext;
@@ -35,7 +33,7 @@ public class ActiveMQComponentUserNamePasswordTest extends CamelSpringTestSuppor
         ActiveMQComponent comp = context.getComponent("activemq", ActiveMQComponent.class);
         assertNotNull(comp);
 
-        ActiveMQConfiguration config = (ActiveMQConfiguration) comp.getConfiguration();
+        ActiveMQConfiguration config = (ActiveMQConfiguration)comp.getConfiguration();
         assertNotNull(config);
         assertEquals("admin", config.getUserName());
         assertEquals("secret", config.getPassword());
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQConfigureTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQConfigureTest.java
index 114a816..ef6a896 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQConfigureTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQConfigureTest.java
@@ -16,10 +16,9 @@
  */
 package org.apache.camel.component.activemq;
 
-import org.apache.activemq.spring.ActiveMQConnectionFactory;
 import org.apache.activemq.pool.PooledConnectionFactory;
+import org.apache.activemq.spring.ActiveMQConnectionFactory;
 import org.apache.camel.Endpoint;
-import org.apache.camel.component.activemq.ActiveMQConfiguration;
 import org.apache.camel.component.jms.JmsConfiguration;
 import org.apache.camel.component.jms.JmsConsumer;
 import org.apache.camel.component.jms.JmsEndpoint;
@@ -27,9 +26,9 @@ import org.apache.camel.component.jms.JmsProducer;
 import org.apache.camel.support.processor.CamelLogProcessor;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
+import org.springframework.jms.connection.SingleConnectionFactory;
 import org.springframework.jms.core.JmsTemplate;
 import org.springframework.jms.listener.AbstractMessageListenerContainer;
-import org.springframework.jms.connection.SingleConnectionFactory;
 
 /**
  * 
@@ -39,7 +38,7 @@ public class ActiveMQConfigureTest extends CamelTestSupport {
     @Test
     public void testJmsTemplateUsesPoolingConnectionFactory() throws Exception {
         JmsEndpoint endpoint = resolveMandatoryEndpoint("activemq:test.foo");
-        JmsProducer producer = (JmsProducer) endpoint.createProducer();
+        JmsProducer producer = (JmsProducer)endpoint.createProducer();
 
         JmsTemplate template = assertIsInstanceOf(JmsTemplate.class, producer.getInOutTemplate());
         assertEquals("pubSubDomain", false, template.isPubSubDomain());
@@ -49,7 +48,7 @@ public class ActiveMQConfigureTest extends CamelTestSupport {
     @Test
     public void testJmsTemplateUsesSingleConnectionFactory() throws Exception {
         JmsEndpoint endpoint = resolveMandatoryEndpoint("activemq:test.foo?useSingleConnection=true");
-        JmsProducer producer = (JmsProducer) endpoint.createProducer();
+        JmsProducer producer = (JmsProducer)endpoint.createProducer();
 
         JmsTemplate template = assertIsInstanceOf(JmsTemplate.class, producer.getInOutTemplate());
         assertEquals("pubSubDomain", false, template.isPubSubDomain());
@@ -61,7 +60,7 @@ public class ActiveMQConfigureTest extends CamelTestSupport {
     public void testSessionTransactedWithoutTransactionManager() throws Exception {
         JmsEndpoint endpoint = resolveMandatoryEndpoint("activemq:test.foo?transacted=true&lazyCreateTransactionManager=false");
         JmsConfiguration configuration = endpoint.getConfiguration();
-        
+
         assertIsInstanceOf(ActiveMQConfiguration.class, configuration);
 
         assertTrue("The JMS sessions are not transacted!", endpoint.isTransacted());
@@ -74,7 +73,7 @@ public class ActiveMQConfigureTest extends CamelTestSupport {
     @Test
     public void testJmsTemplateDoesNotUsePoolingConnectionFactory() throws Exception {
         JmsEndpoint endpoint = resolveMandatoryEndpoint("activemq:test.foo?usePooledConnection=false");
-        JmsProducer producer = (JmsProducer) endpoint.createProducer();
+        JmsProducer producer = (JmsProducer)endpoint.createProducer();
 
         JmsTemplate template = assertIsInstanceOf(JmsTemplate.class, producer.getInOutTemplate());
         assertEquals("pubSubDomain", false, template.isPubSubDomain());
@@ -96,4 +95,4 @@ public class ActiveMQConfigureTest extends CamelTestSupport {
         Endpoint endpoint = super.resolveMandatoryEndpoint(uri);
         return assertIsInstanceOf(JmsEndpoint.class, endpoint);
     }
-}
\ No newline at end of file
+}
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQJmsHeaderRouteForceTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQJmsHeaderRouteForceTest.java
index 297681e..99682b4 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQJmsHeaderRouteForceTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQJmsHeaderRouteForceTest.java
@@ -29,7 +29,8 @@ public class ActiveMQJmsHeaderRouteForceTest extends ActiveMQJmsHeaderRouteTest
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                // do not map jms message as we want to tamper with the JMS message directly, and not use the Camel API for that
+                // do not map jms message as we want to tamper with the JMS
+                // message directly, and not use the Camel API for that
                 from("activemq:test.a?mapJmsMessage=false").process(new Processor() {
                     public void process(Exchange exchange) throws Exception {
                         // lets set the custom JMS headers using the JMS API
@@ -37,9 +38,11 @@ public class ActiveMQJmsHeaderRouteForceTest extends ActiveMQJmsHeaderRouteTest
 
                         jmsMessage.getJmsMessage().setJMSReplyTo(replyQueue);
                         jmsMessage.getJmsMessage().setJMSCorrelationID(correlationID);
-                        jmsMessage.getJmsMessage().setJMSType(messageType);                    }
-                // force sending the incoming JMS Message, as we want to tamper with the JMS API directly
-                // instead of using the Camel API for setting JMS headers.
+                        jmsMessage.getJmsMessage().setJMSType(messageType);
+                    }
+                    // force sending the incoming JMS Message, as we want to
+                    // tamper with the JMS API directly
+                    // instead of using the Camel API for setting JMS headers.
                 }).to("activemq:test.b?preserveMessageQos=true&forceSendOriginalMessage=true");
 
                 from("activemq:test.b").to("mock:result");
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQJmsHeaderRouteTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQJmsHeaderRouteTest.java
index bc4dfb5..dfe8499 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQJmsHeaderRouteTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQJmsHeaderRouteTest.java
@@ -16,10 +16,9 @@
  */
 package org.apache.camel.component.activemq;
 
-import static org.apache.camel.component.activemq.ActiveMQComponent.activeMQComponent;
-
 import java.util.Date;
 import java.util.List;
+
 import javax.jms.Destination;
 
 import org.apache.activemq.command.ActiveMQQueue;
@@ -34,6 +33,8 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.apache.camel.component.activemq.ActiveMQComponent.activeMQComponent;
+
 /**
  * 
  */
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQOriginalDestinationTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQOriginalDestinationTest.java
index 18a1ec4..cc95672 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQOriginalDestinationTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQOriginalDestinationTest.java
@@ -5,9 +5,9 @@
  * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
+ *      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.
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.component.activemq;
 
-import static org.apache.camel.component.activemq.ActiveMQComponent.activeMQComponent;
-
 import javax.jms.Message;
 
 import org.apache.activemq.command.ActiveMQDestination;
@@ -30,6 +28,9 @@ import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
 
+import static org.apache.camel.component.activemq.ActiveMQComponent.activeMQComponent;
+
+
 public class ActiveMQOriginalDestinationTest extends CamelTestSupport {
 
     @Test
@@ -66,9 +67,7 @@ public class ActiveMQOriginalDestinationTest extends CamelTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("activemq:queue:foo")
-                        .to("activemq:queue:bar")
-                        .to("mock:result");
+                from("activemq:queue:foo").to("activemq:queue:bar").to("mock:result");
             }
         };
     }
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQReplyToHeaderUsingConverterTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQReplyToHeaderUsingConverterTest.java
index 70003ba..88fc360 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQReplyToHeaderUsingConverterTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQReplyToHeaderUsingConverterTest.java
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.component.activemq;
 
-import static org.apache.camel.component.activemq.ActiveMQComponent.activeMQComponent;
-
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -37,6 +35,8 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.apache.camel.component.activemq.ActiveMQComponent.activeMQComponent;
+
 /**
  * 
  */
@@ -47,18 +47,18 @@ public class ActiveMQReplyToHeaderUsingConverterTest extends CamelTestSupport {
     protected String correlationID = "ABC-123";
     protected String groupID = "GROUP-XYZ";
     protected String messageType = getClass().getName();
-    protected boolean useReplyToHeader = false;
+    protected boolean useReplyToHeader;
 
     @Test
     public void testSendingAMessageFromCamelSetsCustomJmsHeaders() throws Exception {
         MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
-
+        ActiveMQConverter conv = new ActiveMQConverter();
         resultEndpoint.expectedBodiesReceived(expectedBody);
         AssertionClause firstMessage = resultEndpoint.message(0);
         firstMessage.header("cheese").isEqualTo(123);
         firstMessage.header("JMSCorrelationID").isEqualTo(correlationID);
         if (useReplyToHeader) {
-            firstMessage.header("JMSReplyTo").isEqualTo(ActiveMQConverter.toDestination(replyQueueName));
+            firstMessage.header("JMSReplyTo").isEqualTo(conv.toDestination(replyQueueName));
         }
         firstMessage.header("JMSType").isEqualTo(messageType);
         firstMessage.header("JMSXGroupID").isEqualTo(groupID);
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQRouteTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQRouteTest.java
index 734a9fe..815aff0 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQRouteTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQRouteTest.java
@@ -16,11 +16,8 @@
  */
 package org.apache.camel.component.activemq;
 
-import static org.apache.camel.component.activemq.ActiveMQComponent.activeMQComponent;
-
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
-
 import org.apache.camel.component.jms.JmsEndpoint;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
@@ -28,11 +25,13 @@ import org.junit.Before;
 import org.junit.Test;
 import org.springframework.jms.connection.JmsTransactionManager;
 
+import static org.apache.camel.component.activemq.ActiveMQComponent.activeMQComponent;
+
 /**
  *
  */
 public class ActiveMQRouteTest extends CamelTestSupport {
-    private static final String EXPECTED_BODY = "Hello there!"; 
+    private static final String EXPECTED_BODY = "Hello there!";
     protected MockEndpoint resultEndpoint;
     protected String startEndpointUri = "activemq:queue:test.a";
 
@@ -54,7 +53,7 @@ public class ActiveMQRouteTest extends CamelTestSupport {
     public void setUp() throws Exception {
         super.setUp();
 
-        resultEndpoint = (MockEndpoint) context.getEndpoint("mock:result");
+        resultEndpoint = (MockEndpoint)context.getEndpoint("mock:result");
     }
 
     protected CamelContext createCamelContext() throws Exception {
@@ -73,15 +72,15 @@ public class ActiveMQRouteTest extends CamelTestSupport {
                 from(startEndpointUri).to("activemq:queue:test.b");
                 from("activemq:queue:test.b").to("mock:result");
 
-                JmsEndpoint endpoint1 = (JmsEndpoint) endpoint("activemq:topic:quote.IONA");
+                JmsEndpoint endpoint1 = (JmsEndpoint)endpoint("activemq:topic:quote.IONA");
                 endpoint1.getConfiguration().setTransactionManager(new JmsTransactionManager());
                 endpoint1.getConfiguration().setTransacted(true);
                 from(endpoint1).to("mock:transactedClient");
 
-                JmsEndpoint endpoint2 = (JmsEndpoint) endpoint("activemq:topic:quote.IONA");
+                JmsEndpoint endpoint2 = (JmsEndpoint)endpoint("activemq:topic:quote.IONA");
                 endpoint2.getConfiguration().setTransacted(false);
                 from(endpoint2).to("mock:nonTrasnactedClient");
             }
         };
     }
-}
\ No newline at end of file
+}
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AdvisoryConsumerExample.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AdvisoryConsumerExample.java
index 4feeb29..94c79b8 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AdvisoryConsumerExample.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AdvisoryConsumerExample.java
@@ -16,13 +16,12 @@
  */
 package org.apache.camel.component.activemq;
 
-
 import org.apache.activemq.command.ActiveMQMessage;
 import org.apache.activemq.command.DataStructure;
 import org.apache.activemq.command.DestinationInfo;
 import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
 import org.apache.camel.Message;
+import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.jms.JmsMessage;
 import org.apache.camel.test.junit4.CamelTestSupport;
@@ -51,13 +50,13 @@ public class AdvisoryConsumerExample extends CamelTestSupport {
                     public void process(Exchange exchange) throws Exception {
                         Message in = exchange.getIn();
                         if (in instanceof JmsMessage) {
-                            JmsMessage jmsMessage = (JmsMessage) in;
+                            JmsMessage jmsMessage = (JmsMessage)in;
                             javax.jms.Message value = jmsMessage.getJmsMessage();
                             if (value instanceof ActiveMQMessage) {
-                                ActiveMQMessage activeMQMessage = (ActiveMQMessage) value;
+                                ActiveMQMessage activeMQMessage = (ActiveMQMessage)value;
                                 DataStructure structure = activeMQMessage.getDataStructure();
                                 if (structure instanceof DestinationInfo) {
-                                    DestinationInfo destinationInfo = (DestinationInfo) structure;
+                                    DestinationInfo destinationInfo = (DestinationInfo)structure;
                                     System.out.println("Received: " + destinationInfo);
                                 }
                             }
@@ -67,4 +66,4 @@ public class AdvisoryConsumerExample extends CamelTestSupport {
             }
         };
     }
-}
\ No newline at end of file
+}
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AutoExposeQueuesInCamelTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AutoExposeQueuesInCamelTest.java
index 25f38ba..1fba172 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AutoExposeQueuesInCamelTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AutoExposeQueuesInCamelTest.java
@@ -16,6 +16,10 @@
  */
 package org.apache.camel.component.activemq;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
 import org.apache.activemq.EmbeddedBrokerTestSupport;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.command.ActiveMQDestination;
@@ -23,25 +27,14 @@ import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTopic;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
-import org.apache.camel.component.activemq.ActiveMQComponent;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.spi.BrowsableEndpoint;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-
 /**
- * Shows that we can see the queues inside ActiveMQ via Camel
- * by enabling the {@link ActiveMQComponent#setExposeAllQueues(boolean)} flag
- *
- * 
+ * Shows that we can see the queues inside ActiveMQ via Camel by enabling the
+ * {@link ActiveMQComponent#setExposeAllQueues(boolean)} flag
  */
 public class AutoExposeQueuesInCamelTest extends EmbeddedBrokerTestSupport {
     private static final transient Logger LOG = LoggerFactory.getLogger(AutoExposeQueuesInCamelTest.class);
@@ -58,13 +51,14 @@ public class AutoExposeQueuesInCamelTest extends EmbeddedBrokerTestSupport {
         broker.getAdminView().addQueue("runtime");
 
         Thread.sleep(1000);
-        // Changed from using CamelContextHelper.getSingletonEndpoints here because JMS Endpoints in Camel
+        // Changed from using CamelContextHelper.getSingletonEndpoints here
+        // because JMS Endpoints in Camel
         // are always non-singleton
         List<BrowsableEndpoint> endpoints = getEndpoints(camelContext, BrowsableEndpoint.class);
         for (BrowsableEndpoint endpoint : endpoints) {
             LOG.debug("Endpoint: " + endpoint);
         }
-        assertEquals("Should have found an endpoint: "+ endpoints, 2, endpoints.size());
+        assertEquals("Should have found an endpoint: " + endpoints, 2, endpoints.size());
     }
 
     public <T> List<T> getEndpoints(CamelContext camelContext, Class<T> type) {
@@ -77,8 +71,8 @@ public class AutoExposeQueuesInCamelTest extends EmbeddedBrokerTestSupport {
             }
         }
         return answer;
-    }    
-    
+    }
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();
@@ -98,14 +92,10 @@ public class AutoExposeQueuesInCamelTest extends EmbeddedBrokerTestSupport {
         super.tearDown();
     }
 
-
     @Override
     protected BrokerService createBroker() throws Exception {
         BrokerService broker = super.createBroker();
-        broker.setDestinations(new ActiveMQDestination[]{
-                sampleQueue,
-                sampleTopic
-        });
+        broker.setDestinations(new ActiveMQDestination[] {sampleQueue, sampleTopic});
         return broker;
     }
 
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/BrokerPreShutdownHookTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/BrokerPreShutdownHookTest.java
index 88b1e60..f1e27c9 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/BrokerPreShutdownHookTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/BrokerPreShutdownHookTest.java
@@ -21,8 +21,6 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.activemq.ActiveMQComponent;
-import org.apache.camel.component.activemq.CamelShutdownHook;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.junit.Test;
 
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelDestinationExclusiveConsumerTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelDestinationExclusiveConsumerTest.java
index efc738e..563663c 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelDestinationExclusiveConsumerTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelDestinationExclusiveConsumerTest.java
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelEmbeddedBrokerTestSupport.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelEmbeddedBrokerTestSupport.java
index 04ee9b8..a4efebb 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelEmbeddedBrokerTestSupport.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelEmbeddedBrokerTestSupport.java
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -29,11 +28,9 @@ import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.support.jndi.JndiContext;
 
-
 /**
  * A helper class for test cases which use an embedded broker and use Camel to
  * do the routing
- *
  */
 public abstract class CamelEmbeddedBrokerTestSupport extends EmbeddedBrokerTestSupport {
     protected CamelContext camelContext;
@@ -67,7 +64,7 @@ public abstract class CamelEmbeddedBrokerTestSupport extends EmbeddedBrokerTestS
         return new DefaultCamelContext(createJndiContext());
     }
 
-    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @SuppressWarnings({"unchecked", "rawtypes"})
     protected Context createJndiContext() throws Exception {
         return new JndiContext(new Hashtable());
     }
@@ -78,8 +75,7 @@ public abstract class CamelEmbeddedBrokerTestSupport extends EmbeddedBrokerTestS
     /**
      * Resolves a mandatory endpoint for the given URI or an exception is thrown
      *
-     * @param uri
-     *            the Camel <a href="">URI</a> to use to create or resolve an
+     * @param uri the Camel <a href="">URI</a> to use to create or resolve an
      *            endpoint
      * @return the endpoint
      */
@@ -91,8 +87,7 @@ public abstract class CamelEmbeddedBrokerTestSupport extends EmbeddedBrokerTestS
      * Resolves a mandatory endpoint for the given URI and expected type or an
      * exception is thrown
      *
-     * @param uri
-     *            the Camel <a href="">URI</a> to use to create or resolve an
+     * @param uri the Camel <a href="">URI</a> to use to create or resolve an
      *            endpoint
      * @return the endpoint
      */
@@ -126,8 +121,7 @@ public abstract class CamelEmbeddedBrokerTestSupport extends EmbeddedBrokerTestS
      * Resolves the mandatory Mock endpoint using a URI of the form
      * <code>mock:someName</code>
      *
-     * @param uri
-     *            the URI which typically starts with "mock:" and has some name
+     * @param uri the URI which typically starts with "mock:" and has some name
      * @return the mandatory mock endpoint or an exception is thrown if it could
      *         not be resolved
      */
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelJmsRequestReplyNobTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelJmsRequestReplyNobTest.java
index 5e15844..0b581ae 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelJmsRequestReplyNobTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelJmsRequestReplyNobTest.java
@@ -16,6 +16,18 @@
  */
 package org.apache.camel.component.activemq;
 
+import java.net.URI;
+import java.util.Arrays;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQQueue;
@@ -27,21 +39,13 @@ import org.slf4j.LoggerFactory;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import java.net.URI;
-import java.util.Arrays;
-
 public class CamelJmsRequestReplyNobTest extends CamelSpringTestSupport {
-    
+
     private static final Logger LOG = LoggerFactory.getLogger(CamelJmsRequestReplyNobTest.class);
 
+    BrokerService consumerBroker;
+    BrokerService producerBroker;
+
     @Test
     public void testRoundTrip() throws Exception {
         Destination destination = getMandatoryBean(Destination.class, "consumeFrom");
@@ -86,18 +90,17 @@ public class CamelJmsRequestReplyNobTest extends CamelSpringTestSupport {
         return brokerService;
     }
 
-    BrokerService producerBroker, consumerBroker;
     @SuppressWarnings("unchecked")
     @Override
     protected AbstractXmlApplicationContext createApplicationContext() {
         try {
             consumerBroker = createBroker("CON");
-            producerBroker  = createBroker("PRO");
+            producerBroker = createBroker("PRO");
             DiscoveryNetworkConnector discoveryNetworkConnector = new DiscoveryNetworkConnector();
             discoveryNetworkConnector.setUri(new URI("static:" + consumerBroker.getTransportConnectorByScheme("tcp").getPublishableConnectString()));
             discoveryNetworkConnector.setDuplex(true);
             discoveryNetworkConnector.setNetworkTTL(2);
-            discoveryNetworkConnector.setDynamicallyIncludedDestinations(Arrays.asList(new ActiveMQDestination[]{new ActiveMQQueue("service1")}));
+            discoveryNetworkConnector.setDynamicallyIncludedDestinations(Arrays.asList(new ActiveMQDestination[] {new ActiveMQQueue("service1")}));
             discoveryNetworkConnector.setDestinationFilter("ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic,ActiveMQ.Advisory.Consumer.Queue.>");
             producerBroker.addNetworkConnector(discoveryNetworkConnector);
             consumerBroker.start();
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelJmsTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelJmsTest.java
index f380ab3..cd3ca32 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelJmsTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelJmsTest.java
@@ -26,8 +26,8 @@ import javax.jms.ObjectMessage;
 import javax.jms.Session;
 import javax.jms.TextMessage;
 
-import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
 import org.junit.Test;
 import org.slf4j.Logger;
@@ -38,9 +38,9 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
  * 
  */
 public class CamelJmsTest extends CamelSpringTestSupport {
-    
+
     private static final Logger LOG = LoggerFactory.getLogger(CamelJmsTest.class);
-    
+
     protected String expectedBody = "<hello>world!</hello>";
 
     @Test
@@ -75,7 +75,7 @@ public class CamelJmsTest extends CamelSpringTestSupport {
         ConnectionFactory factory = getMandatoryBean(ConnectionFactory.class, "connectionFactory");
         ProducerTemplate template = getMandatoryBean(ProducerTemplate.class, "camelTemplate");
         assertNotNull("template is valid", template);
-        
+
         Connection connection = factory.createConnection();
         connection.start();
         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelVMTransportRoutingTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelVMTransportRoutingTest.java
index 62b2e80..fa221f0 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelVMTransportRoutingTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/CamelVMTransportRoutingTest.java
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -32,7 +31,6 @@ import org.apache.activemq.broker.TransportConnector;
 import org.apache.activemq.util.ThreadTracker;
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.activemq.ActiveMQComponent;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.junit.Assert;
 import org.slf4j.Logger;
@@ -41,48 +39,48 @@ import org.slf4j.LoggerFactory;
 // see: https://issues.apache.org/activemq/browse/AMQ-2966
 public class CamelVMTransportRoutingTest extends TestCase {
 
-    private static final Logger log = LoggerFactory.getLogger(CamelVMTransportRoutingTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(CamelVMTransportRoutingTest.class);
 
-    private BrokerService broker = null;
-    private TransportConnector connector = null;
-    private CamelContext camelContext = null;
+    private BrokerService broker;
+    private TransportConnector connector;
+    private CamelContext camelContext;
 
     private Connection senderConnection;
     private Connection receiverConnection1;
     private Connection receiverConnection2;
 
-    private final String MSG_STRING = "MESSAGE-TEXT";
-    private final String SENDER_TOPIC = "A";
-    private final String RECEIVER_TOPIC = "B";
+    private final String msgString = "MESSAGE-TEXT";
+    private final String senderTopic = "A";
+    private final String receiverTopic = "B";
 
     @SuppressWarnings("unused")
     public void testSendReceiveWithCamelRouteIntercepting() throws Exception {
 
-        final int MSG_COUNT = 1000;
+        final int msgCount = 1000;
 
         Session sendSession = senderConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         Session receiverSession1 = receiverConnection1.createSession(false, Session.AUTO_ACKNOWLEDGE);
         Session receiverSession2 = receiverConnection2.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
-        Destination sendTo = sendSession.createTopic(SENDER_TOPIC);
-        Destination receiveFrom = receiverSession1.createTopic(RECEIVER_TOPIC);
+        Destination sendTo = sendSession.createTopic(senderTopic);
+        Destination receiveFrom = receiverSession1.createTopic(receiverTopic);
 
-        TextMessage message = sendSession.createTextMessage(MSG_STRING);
+        TextMessage message = sendSession.createTextMessage(msgString);
 
         MessageConsumer receiver1 = receiverSession1.createConsumer(receiveFrom);
         MessageConsumer receiver2 = receiverSession2.createConsumer(receiveFrom);
 
         MessageProducer sender = sendSession.createProducer(sendTo);
-        for( int i = 0; i < MSG_COUNT; ++i ) {
+        for (int i = 0; i < msgCount; ++i) {
             sender.send(message);
         }
 
-        for( int i = 0; i < MSG_COUNT; ++i ) {
+        for (int i = 0; i < msgCount; ++i) {
 
-            log.debug("Attempting Received for Message #" + i);
-            TextMessage received1 = (TextMessage) receiver1.receive(5000);
+            LOG.debug("Attempting Received for Message #" + i);
+            TextMessage received1 = (TextMessage)receiver1.receive(5000);
             Assert.assertNotNull(received1);
-            Assert.assertEquals(MSG_STRING, received1.getText());
+            Assert.assertEquals(msgString, received1.getText());
         }
     }
 
@@ -119,15 +117,15 @@ public class CamelVMTransportRoutingTest extends TestCase {
     @Override
     public void tearDown() throws Exception {
 
-        if( senderConnection != null ) {
+        if (senderConnection != null) {
             senderConnection.close();
         }
 
-        if( receiverConnection1 != null ) {
+        if (receiverConnection1 != null) {
             receiverConnection1.close();
         }
 
-        if( receiverConnection2 != null ) {
+        if (receiverConnection2 != null) {
             receiverConnection2.close();
         }
 
@@ -139,13 +137,12 @@ public class CamelVMTransportRoutingTest extends TestCase {
 
     private void createCamelContext() throws Exception {
 
-        final String fromEndpoint = "activemq:topic:" + SENDER_TOPIC;
-        final String toEndpoint = "activemq:topic:" + RECEIVER_TOPIC;
+        final String fromEndpoint = "activemq:topic:" + senderTopic;
+        final String toEndpoint = "activemq:topic:" + receiverTopic;
 
-        log.info("creating context and sending message");
+        LOG.info("creating context and sending message");
         camelContext = new DefaultCamelContext();
-        camelContext.addComponent("activemq",
-                ActiveMQComponent.activeMQComponent("vm://localhost?create=false&waitForStart=10000"));
+        camelContext.addComponent("activemq", ActiveMQComponent.activeMQComponent("vm://localhost?create=false&waitForStart=10000"));
         camelContext.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ComplexRequestReplyTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ComplexRequestReplyTest.java
index 02a4fcd..87a1f11 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ComplexRequestReplyTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ComplexRequestReplyTest.java
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.component.activemq;
 
-import static org.junit.Assert.assertNotNull;
-
 import java.util.concurrent.TimeUnit;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
@@ -26,7 +24,6 @@ import org.apache.activemq.pool.PooledConnectionFactory;
 import org.apache.camel.CamelContext;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.activemq.ActiveMQComponent;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.junit.After;
 import org.junit.Before;
@@ -34,25 +31,27 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.junit.Assert.assertNotNull;
+
 public class ComplexRequestReplyTest {
 
     private static final Logger LOG = LoggerFactory.getLogger(ComplexRequestReplyTest.class);
 
-    private BrokerService brokerA = null;
-    private BrokerService brokerB = null;
-    private CamelContext senderContext = null;
-    private CamelContext brokerAContext = null;
-    private CamelContext brokerBContext = null;
-
-    private final String fromEndpoint = "direct:test";
-    private final String toEndpoint = "activemq:queue:send";
-    private final String brokerEndpoint = "activemq:send";
-
+    private BrokerService brokerA;
+    private BrokerService brokerB;
+    private CamelContext senderContext;
+    private CamelContext brokerAContext;
+    private CamelContext brokerBContext;
+    
     private String brokerAUri;
     private String brokerBUri;
 
     private String connectionUri;
 
+    private final String fromEndpoint = "direct:test";
+    private final String toEndpoint = "activemq:queue:send";
+    private final String brokerEndpoint = "activemq:send";
+
     @Before
     public void setUp() throws Exception {
 
@@ -69,11 +68,13 @@ public class ComplexRequestReplyTest {
     public void tearDown() throws Exception {
         try {
             shutdownBrokerA();
-        } catch (Exception ex) {}
+        } catch (Exception ex) {
+        }
 
         try {
             shutdownBrokerB();
-        } catch (Exception e) {}
+        } catch (Exception e) {
+        }
     }
 
     @Test
@@ -81,29 +82,30 @@ public class ComplexRequestReplyTest {
 
         ProducerTemplate requester = senderContext.createProducerTemplate();
         LOG.info("*** Sending Request 1");
-        String response = (String) requester.requestBody(fromEndpoint, "This is a request");
+        String response = (String)requester.requestBody(fromEndpoint, "This is a request");
         assertNotNull(response != null);
         LOG.info("Got response: " + response);
 
         /**
-         * You actually don't need to restart the broker, just wait long enough and the next
-         * next send will take out a closed connection and reconnect, and if you happen to hit
-         * the broker you weren't on last time, then you will see the failure.
+         * You actually don't need to restart the broker, just wait long enough
+         * and the next next send will take out a closed connection and
+         * reconnect, and if you happen to hit the broker you weren't on last
+         * time, then you will see the failure.
          */
 
         TimeUnit.SECONDS.sleep(20);
 
         /**
-         * I restart the broker after the wait that exceeds the idle timeout value of the
-         * PooledConnectionFactory to show that it doesn't matter now as the older connection
-         * has already been closed.
+         * I restart the broker after the wait that exceeds the idle timeout
+         * value of the PooledConnectionFactory to show that it doesn't matter
+         * now as the older connection has already been closed.
          */
         LOG.info("Restarting Broker A now.");
         shutdownBrokerA();
         createBrokerA();
 
         LOG.info("*** Sending Request 2");
-        response = (String) requester.requestBody(fromEndpoint, "This is a request");
+        response = (String)requester.requestBody(fromEndpoint, "This is a request");
         assertNotNull(response != null);
         LOG.info("Got response: " + response);
     }
@@ -182,8 +184,7 @@ public class ComplexRequestReplyTest {
     private CamelContext createBrokerCamelContext(String brokerName) throws Exception {
 
         CamelContext camelContext = new DefaultCamelContext();
-        camelContext.addComponent("activemq",
-                ActiveMQComponent.activeMQComponent("vm://"+brokerName+"?create=false&waitForStart=10000"));
+        camelContext.addComponent("activemq", ActiveMQComponent.activeMQComponent("vm://" + brokerName + "?create=false&waitForStart=10000"));
         camelContext.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/DlqTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/DlqTest.java
index b08e230..df48fcc 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/DlqTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/DlqTest.java
@@ -20,11 +20,11 @@ import javax.jms.Connection;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TextMessage;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.util.Wait;
-
 import org.apache.camel.test.spring.CamelSpringTestSupport;
 import org.junit.Test;
 import org.slf4j.Logger;
@@ -34,7 +34,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class DlqTest extends CamelSpringTestSupport {
     private static final Logger LOG = LoggerFactory.getLogger(DlqTest.class);
-    BrokerService broker = null;
+    BrokerService broker;
     int messageCount;
 
     @Test
@@ -90,9 +90,9 @@ public class DlqTest extends CamelSpringTestSupport {
     }
 
     public static class CanError {
-        public String  enrich(String body) throws Exception {
+        public String enrich(String body) throws Exception {
             LOG.info("Got body: " + body);
             throw new RuntimeException("won't enrich today!");
         }
     }
-}
\ No newline at end of file
+}
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/InvokeRequestReplyUsingJmsReplyToHeaderTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/InvokeRequestReplyUsingJmsReplyToHeaderTest.java
index 3a4576c..959795c 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/InvokeRequestReplyUsingJmsReplyToHeaderTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/InvokeRequestReplyUsingJmsReplyToHeaderTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.activemq;
 
 import java.util.HashMap;
 import java.util.Map;
+
 import javax.jms.Destination;
 
 import org.apache.camel.CamelContext;
@@ -73,7 +74,7 @@ public class InvokeRequestReplyUsingJmsReplyToHeaderTest extends CamelTestSuppor
 
         assertMessageHeader(in, "JMSCorrelationID", correlationID);
 
-        Map<String,Object> receivedHeaders = myBean.getHeaders();
+        Map<String, Object> receivedHeaders = myBean.getHeaders();
         assertThat(receivedHeaders, hasKey("JMSReplyTo"));
         assertThat(receivedHeaders, hasEntry("JMSXGroupID", groupID));
         assertThat(receivedHeaders, hasEntry("JMSCorrelationID", correlationID));
@@ -103,15 +104,15 @@ public class InvokeRequestReplyUsingJmsReplyToHeaderTest extends CamelTestSuppor
     }
 
     protected static class MyServer {
-        private Map<String,Object> headers;
+        private Map<String, Object> headers;
 
-        public String process(@Headers Map<String,Object> headers, String body) {
+        public String process(@Headers Map<String, Object> headers, String body) {
             this.headers = headers;
             LOG.info("process() invoked with headers: " + headers);
             return "Hello " + body;
         }
 
-        public Map<String,Object> getHeaders() {
+        public Map<String, Object> getHeaders() {
             return headers;
         }
     }
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsBridge.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsBridge.java
index e22bd69..2b36fcd 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsBridge.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsBridge.java
@@ -5,9 +5,9 @@
  * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
+ *
+ *      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.
@@ -16,8 +16,22 @@
  */
 package org.apache.camel.component.activemq;
 
+import java.util.concurrent.atomic.AtomicInteger;
+
+import javax.jms.Connection;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.*;
+import org.apache.activemq.broker.BrokerPlugin;
+import org.apache.activemq.broker.BrokerPluginSupport;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.ConnectionContext;
+import org.apache.activemq.broker.ProducerBrokerExchange;
+import org.apache.activemq.broker.TransportConnector;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ConnectionInfo;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
@@ -27,16 +41,12 @@ import org.slf4j.LoggerFactory;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-import javax.jms.*;
-import javax.jms.Connection;
-import java.util.concurrent.atomic.AtomicInteger;
-
 public class JmsBridge extends CamelSpringTestSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(JmsBridge.class);
 
-    BrokerService brokerSub = null;
-    BrokerService brokerPub = null;
+    BrokerService brokerSub;
+    BrokerService brokerPub;
 
     int messageCount;
     final int backLog = 50;
@@ -44,7 +54,6 @@ public class JmsBridge extends CamelSpringTestSupport {
     AtomicInteger sendCount = new AtomicInteger();
     AtomicInteger connectionCount = new AtomicInteger();
 
-
     @Test
     public void testBridgeWorks() throws Exception {
         sendJMSMessageToKickOffRoute();
@@ -108,7 +117,7 @@ public class JmsBridge extends CamelSpringTestSupport {
 
         try {
             brokerSub = createBroker("sub", 61617, true);
-            brokerSub.setPlugins(new BrokerPlugin[]{new BrokerPluginSupport() {
+            brokerSub.setPlugins(new BrokerPlugin[] {new BrokerPluginSupport() {
                 @Override
                 public void send(ProducerBrokerExchange producerExchange, org.apache.activemq.command.Message messageSend) throws Exception {
                     if (sendCount.incrementAndGet() <= errorLimit) {
@@ -119,7 +128,7 @@ public class JmsBridge extends CamelSpringTestSupport {
 
                 @Override
                 public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-                    if (((TransportConnector) context.getConnector()).getConnectUri().getScheme().equals("tcp") && connectionCount.incrementAndGet() <= errorLimit) {
+                    if (((TransportConnector)context.getConnector()).getConnectUri().getScheme().equals("tcp") && connectionCount.incrementAndGet() <= errorLimit) {
                         throw new SecurityException("You need to try connect " + errorLimit + " times!");
                     }
                     super.addConnection(context, info);
@@ -130,7 +139,6 @@ public class JmsBridge extends CamelSpringTestSupport {
             brokerPub = createBroker("pub", 61616, true);
             brokerPub.start();
 
-
         } catch (Exception e) {
             throw new RuntimeException("Failed to start broker", e);
         }
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsConsumeSendTransacted.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsConsumeSendTransacted.java
index 35f0059..46e8642 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsConsumeSendTransacted.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsConsumeSendTransacted.java
@@ -22,6 +22,7 @@ import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TextMessage;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.command.ActiveMQQueue;
@@ -31,10 +32,9 @@ import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class JmsConsumeSendTransacted extends CamelSpringTestSupport {
-    BrokerService broker = null;
+    BrokerService broker;
     int messageCount;
 
-
     @Test
     public void testTransactedRoute() throws Exception {
         sendJMSMessageToKickOffRoute();
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsJdbcXARollbackTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsJdbcXARollbackTest.java
index befef57..59cd1d7 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsJdbcXARollbackTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsJdbcXARollbackTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.activemq;
 
 import java.sql.ResultSet;
 import java.sql.SQLException;
+
 import javax.jms.Connection;
 import javax.jms.Message;
 import javax.jms.MessageConsumer;
@@ -26,6 +27,7 @@ import javax.jms.Session;
 import javax.jms.TextMessage;
 import javax.sql.DataSource;
 import javax.transaction.TransactionManager;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.region.policy.SharedDeadLetterStrategy;
@@ -42,21 +44,17 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.transaction.jta.JtaTransactionManager;
 
 /**
- *  shows rollback and redelivery dlq respected with external tm
+ * shows rollback and redelivery dlq respected with external tm
  */
 public class JmsJdbcXARollbackTest extends CamelSpringTestSupport {
+    static TransactionManager[] transactionManager = new TransactionManager[1];
     private static final Logger LOG = LoggerFactory.getLogger(JmsJdbcXARollbackTest.class);
-    BrokerService broker = null;
+    BrokerService broker;
     int messageCount;
 
     public java.sql.Connection initDb() throws Exception {
-        String createStatement =
-                "CREATE TABLE SCP_INPUT_MESSAGES (" +
-                        "id int NOT NULL GENERATED ALWAYS AS IDENTITY, " +
-                        "messageId varchar(96) NOT NULL, " +
-                        "messageCorrelationId varchar(96) NOT NULL, " +
-                        "messageContent varchar(2048) NOT NULL, " +
-                        "PRIMARY KEY (id) )";
+        String createStatement = "CREATE TABLE SCP_INPUT_MESSAGES (" + "id int NOT NULL GENERATED ALWAYS AS IDENTITY, " + "messageId varchar(96) NOT NULL, "
+                                 + "messageCorrelationId varchar(96) NOT NULL, " + "messageContent varchar(2048) NOT NULL, " + "PRIMARY KEY (id) )";
 
         java.sql.Connection conn = getJDBCConnection();
         try {
@@ -84,10 +82,7 @@ public class JmsJdbcXARollbackTest extends CamelSpringTestSupport {
         ResultSet resultSet = jdbcConn.createStatement().executeQuery("SELECT * FROM SCP_INPUT_MESSAGES");
         while (resultSet.next()) {
             count++;
-            log.info("message - seq:" + resultSet.getInt(1)
-                    + ", id: " + resultSet.getString(2)
-                    + ", corr: " + resultSet.getString(3)
-                    + ", content: " + resultSet.getString(4));
+            log.info("message - seq:" + resultSet.getInt(1) + ", id: " + resultSet.getString(2) + ", corr: " + resultSet.getString(3) + ", content: " + resultSet.getString(4));
         }
         return count;
     }
@@ -124,7 +119,6 @@ public class JmsJdbcXARollbackTest extends CamelSpringTestSupport {
         return message != null;
     }
 
-    static TransactionManager[] transactionManager = new TransactionManager[1];
     private void initTMRef() {
         transactionManager[0] = getMandatoryBean(JtaTransactionManager.class, "jtaTransactionManager").getTransactionManager();
 
@@ -172,14 +166,14 @@ public class JmsJdbcXARollbackTest extends CamelSpringTestSupport {
     }
 
     public static class MarkRollbackOnly {
-            public String enrich(Exchange exchange) throws Exception {
-                LOG.info("Got exchange: " + exchange);
-                LOG.info("Got message: " + ((JmsMessage)exchange.getIn()).getJmsMessage());
-
-                LOG.info("Current tx: " + transactionManager[0].getTransaction());
-                LOG.info("Marking rollback only...");
-                transactionManager[0].getTransaction().setRollbackOnly();
-                return "Some Text";
-            }
+        public String enrich(Exchange exchange) throws Exception {
+            LOG.info("Got exchange: " + exchange);
+            LOG.info("Got message: " + ((JmsMessage)exchange.getIn()).getJmsMessage());
+
+            LOG.info("Current tx: " + transactionManager[0].getTransaction());
+            LOG.info("Marking rollback only...");
+            transactionManager[0].getTransaction().setRollbackOnly();
+            return "Some Text";
         }
+    }
 }
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsJdbcXATest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsJdbcXATest.java
index 990ed53..dc5ef52 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsJdbcXATest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsJdbcXATest.java
@@ -24,8 +24,8 @@ import javax.jms.Connection;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TextMessage;
-
 import javax.sql.DataSource;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerPlugin;
 import org.apache.activemq.broker.BrokerPluginSupport;
@@ -42,21 +42,16 @@ import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 /**
- *  shows broker 'once only delivery' and recovery with XA
+ * shows broker 'once only delivery' and recovery with XA
  */
 public class JmsJdbcXATest extends CamelSpringTestSupport {
     private static final Logger LOG = LoggerFactory.getLogger(JmsJdbcXATest.class);
-    BrokerService broker = null;
+    BrokerService broker;
     int messageCount;
 
     public java.sql.Connection initDb() throws Exception {
-        String createStatement =
-                "CREATE TABLE SCP_INPUT_MESSAGES (" +
-                        "id int NOT NULL GENERATED ALWAYS AS IDENTITY, " +
-                        "messageId varchar(96) NOT NULL, " +
-                        "messageCorrelationId varchar(96) NOT NULL, " +
-                        "messageContent varchar(2048) NOT NULL, " +
-                        "PRIMARY KEY (id) )";
+        String createStatement = "CREATE TABLE SCP_INPUT_MESSAGES (" + "id int NOT NULL GENERATED ALWAYS AS IDENTITY, " + "messageId varchar(96) NOT NULL, "
+                                 + "messageCorrelationId varchar(96) NOT NULL, " + "messageContent varchar(2048) NOT NULL, " + "PRIMARY KEY (id) )";
 
         java.sql.Connection conn = getJDBCConnection();
         try {
@@ -84,10 +79,7 @@ public class JmsJdbcXATest extends CamelSpringTestSupport {
         ResultSet resultSet = jdbcConn.createStatement().executeQuery("SELECT * FROM SCP_INPUT_MESSAGES");
         while (resultSet.next()) {
             count++;
-            log.info("message - seq:" + resultSet.getInt(1)
-                    + ", id: " + resultSet.getString(2)
-                    + ", corr: " + resultSet.getString(3)
-                    + ", content: " + resultSet.getString(4));
+            log.info("message - seq:" + resultSet.getInt(1) + ", id: " + resultSet.getString(2) + ", corr: " + resultSet.getString(3) + ", content: " + resultSet.getString(4));
         }
         return count;
     }
@@ -108,7 +100,8 @@ public class JmsJdbcXATest extends CamelSpringTestSupport {
         broker.waitUntilStarted();
         assertEquals("pending transactions", 1, broker.getBroker().getPreparedTransactions(null).length);
 
-        // TM stays actively committing first message ack which won't get redelivered - xa once only delivery
+        // TM stays actively committing first message ack which won't get
+        // redelivered - xa once only delivery
         LOG.info("waiting for recovery to complete");
         assertTrue("recovery complete in time", Wait.waitFor(new Wait.Condition() {
             @Override
@@ -173,32 +166,29 @@ public class JmsJdbcXATest extends CamelSpringTestSupport {
         // make broker available to recovery processing on app context start
         try {
             broker = createBroker(true);
-            broker.setPlugins(new BrokerPlugin[]{
-                new BrokerPluginSupport() {
-                    @Override
-                    public void commitTransaction(ConnectionContext context,
-                                                  TransactionId xid, boolean onePhase) throws Exception {
-                        if (onePhase) {
-                            super.commitTransaction(context, xid, onePhase);
-                        } else {
-                            // die before doing the commit
-                            // so commit will hang as if reply is lost
-                            context.setDontSendReponse(true);
-                            Executors.newSingleThreadExecutor().execute(new Runnable() {
-                                @Override
-                                public void run() {
-                                    LOG.info("Stopping broker post commit...");
-                                    try {
-                                        broker.stop();
-                                    } catch (Exception e) {
-                                        e.printStackTrace();
-                                    }
+            broker.setPlugins(new BrokerPlugin[] {new BrokerPluginSupport() {
+                @Override
+                public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception {
+                    if (onePhase) {
+                        super.commitTransaction(context, xid, onePhase);
+                    } else {
+                        // die before doing the commit
+                        // so commit will hang as if reply is lost
+                        context.setDontSendReponse(true);
+                        Executors.newSingleThreadExecutor().execute(new Runnable() {
+                            @Override
+                            public void run() {
+                                LOG.info("Stopping broker post commit...");
+                                try {
+                                    broker.stop();
+                                } catch (Exception e) {
+                                    e.printStackTrace();
                                 }
-                            });
-                        }
+                            }
+                        });
                     }
                 }
-            });
+            }});
             broker.start();
         } catch (Exception e) {
             throw new RuntimeException("Failed to start broker", e);
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsSimpleRequestReplyTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsSimpleRequestReplyTest.java
index e9fc1bc..7a10fac 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsSimpleRequestReplyTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/JmsSimpleRequestReplyTest.java
@@ -27,6 +27,7 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
+
 import static org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknowledge;
 
 /**
@@ -42,7 +43,7 @@ public class JmsSimpleRequestReplyTest extends CamelTestSupport {
         result.expectedMessageCount(1);
 
         template.requestBody("activemq:queue:hello", "Hello World");
-        
+
         result.assertIsSatisfied();
     }
 
@@ -66,7 +67,7 @@ public class JmsSimpleRequestReplyTest extends CamelTestSupport {
         pooled.setMaxConnections(8);
         return pooled;
     }
-    
+
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ObjectMessageTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ObjectMessageTest.java
index 9b88838..43df897 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ObjectMessageTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ObjectMessageTest.java
@@ -16,6 +16,11 @@
  */
 package org.apache.camel.component.activemq;
 
+import javax.jms.Connection;
+import javax.jms.MessageProducer;
+import javax.jms.ObjectMessage;
+import javax.jms.Session;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.camel.Exchange;
 import org.apache.camel.component.jms.JmsBinding;
@@ -27,9 +32,6 @@ import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
 import org.junit.Test;
 import org.springframework.context.support.AbstractApplicationContext;
 
-import javax.jms.*;
-import java.util.concurrent.TimeUnit;
-
 public class ObjectMessageTest extends CamelSpringTestSupport {
 
     @Test
@@ -71,7 +73,7 @@ public class ObjectMessageTest extends CamelSpringTestSupport {
         Exchange exchange = result.getReceivedExchanges().get(0);
         // This should be a JMS Exchange
         assertNotNull(ExchangeHelper.getBinding(exchange, JmsBinding.class));
-        JmsMessage in = (JmsMessage) exchange.getIn();
+        JmsMessage in = (JmsMessage)exchange.getIn();
         assertNotNull(in);
         assertIsInstanceOf(ObjectMessage.class, in.getJmsMessage());
 
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/SetGroupIdProcessor.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/SetGroupIdProcessor.java
index 11d791c..3008592 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/SetGroupIdProcessor.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/SetGroupIdProcessor.java
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -18,8 +17,8 @@
 package org.apache.camel.component.activemq;
 
 import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
 import org.apache.camel.Message;
+import org.apache.camel.Processor;
 
 /**
  * 
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/SetHeaderTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/SetHeaderTest.java
index f687008..c6659b9 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/SetHeaderTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/SetHeaderTest.java
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -19,17 +18,17 @@ package org.apache.camel.component.activemq;
 
 import java.util.List;
 
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.EndpointInject;
 import org.apache.camel.CamelContext;
+import org.apache.camel.EndpointInject;
 import org.apache.camel.Exchange;
+import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.util.ObjectHelper;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.test.context.ContextConfiguration;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 /**
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/TransactedConsumeTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/TransactedConsumeTest.java
index c764cc7..90c0c23 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/TransactedConsumeTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/TransactedConsumeTest.java
@@ -17,10 +17,12 @@
 package org.apache.camel.component.activemq;
 
 import java.util.concurrent.atomic.AtomicLong;
+
 import javax.jms.Connection;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TextMessage;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.region.policy.PolicyEntry;
@@ -40,8 +42,10 @@ import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class TransactedConsumeTest extends CamelSpringTestSupport {
+    static AtomicLong firstConsumed = new AtomicLong();
+    static AtomicLong consumed = new AtomicLong();
     private static final Logger LOG = LoggerFactory.getLogger(TransactedConsumeTest.class);
-    BrokerService broker = null;
+    BrokerService broker;
     int messageCount = 100000;
 
     @Test
@@ -66,7 +70,7 @@ public class TransactedConsumeTest extends CamelSpringTestSupport {
         connection.start();
         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         MessageProducer producer = session.createProducer(new ActiveMQQueue("scp_transacted"));
-        for (int i=0; i<messageCount;i++) {
+        for (int i = 0; i < messageCount; i++) {
             TextMessage message = session.createTextMessage("Some Text, messageCount:" + i);
             message.setJMSCorrelationID("pleaseCorrelate");
             producer.send(message);
@@ -87,11 +91,10 @@ public class TransactedConsumeTest extends CamelSpringTestSupport {
 
         brokerService.setAdvisorySupport(false);
         brokerService.setDataDirectory("target/data");
-        //AMQPersistenceAdapter amq = new AMQPersistenceAdapter();
-        //amq.setDirectory(new File("target/data"));
-        //brokerService.setPersistenceAdapter(amq);
-        KahaDBPersistenceAdapter kahaDBPersistenceAdapter = (KahaDBPersistenceAdapter)
-                brokerService.getPersistenceAdapter();
+        // AMQPersistenceAdapter amq = new AMQPersistenceAdapter();
+        // amq.setDirectory(new File("target/data"));
+        // brokerService.setPersistenceAdapter(amq);
+        KahaDBPersistenceAdapter kahaDBPersistenceAdapter = (KahaDBPersistenceAdapter)brokerService.getPersistenceAdapter();
         kahaDBPersistenceAdapter.setEnableJournalDiskSyncs(false);
         brokerService.addConnector("tcp://localhost:61616");
         return brokerService;
@@ -119,22 +122,19 @@ public class TransactedConsumeTest extends CamelSpringTestSupport {
         return new ClassPathXmlApplicationContext("org/apache/camel/component/activemq/transactedconsume.xml");
     }
 
-    static AtomicLong firstConsumed = new AtomicLong();
-    static AtomicLong consumed = new AtomicLong();
-
-    static class ConnectionLog implements Processor  {
+    static class ConnectionLog implements Processor {
 
         @Override
         public void process(Exchange exchange) throws Exception {
             if (consumed.getAndIncrement() == 0) {
                 firstConsumed.set(System.currentTimeMillis());
             }
-            ActiveMQTextMessage m = (ActiveMQTextMessage) ((JmsMessage)exchange.getIn()).getJmsMessage();
-            //Thread.currentThread().sleep(500);
-            if (consumed.get() %500 == 0) {
+            ActiveMQTextMessage m = (ActiveMQTextMessage)((JmsMessage)exchange.getIn()).getJmsMessage();
+            // Thread.currentThread().sleep(500);
+            if (consumed.get() % 500 == 0) {
                 LOG.info("received on " + m.getConnection().toString());
             }
         }
     }
 
-}
\ No newline at end of file
+}
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/converter/InvokeJmsMessageListenerTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/converter/InvokeJmsMessageListenerTest.java
index 407b4d1..c64b535 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/converter/InvokeJmsMessageListenerTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/converter/InvokeJmsMessageListenerTest.java
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,8 +16,8 @@
  */
 package org.apache.camel.component.activemq.converter;
 
-import javax.jms.MessageListener;
 import javax.jms.Message;
+import javax.jms.MessageListener;
 import javax.jms.TextMessage;
 
 import org.apache.camel.builder.RouteBuilder;
diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/converter/InvokeMessageListenerTest.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/converter/InvokeMessageListenerTest.java
index 1b8af56..2bf2375 100644
--- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/converter/InvokeMessageListenerTest.java
+++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/converter/InvokeMessageListenerTest.java
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.component.activemq.converter;
 
-import static org.apache.camel.component.activemq.ActiveMQComponent.activeMQComponent;
-
 import java.util.List;
 
 import javax.jms.Message;
@@ -30,6 +28,8 @@ import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
 
+import static org.apache.camel.component.activemq.ActiveMQComponent.activeMQComponent;
+
 /**
  * 
  */
@@ -58,8 +58,7 @@ public class InvokeMessageListenerTest extends CamelTestSupport {
 
     protected CamelContext createCamelContext() throws Exception {
         CamelContext camelContext = super.createCamelContext();
-        camelContext.addComponent("activemq",
-                activeMQComponent("vm://localhost?broker.persistent=false"));
+        camelContext.addComponent("activemq", activeMQComponent("vm://localhost?broker.persistent=false"));
         return camelContext;
     }
 
@@ -70,4 +69,4 @@ public class InvokeMessageListenerTest extends CamelTestSupport {
             }
         };
     }
-}
\ No newline at end of file
+}
diff --git a/components/camel-activemq/src/test/resources/log4j.properties b/components/camel-activemq/src/test/resources/log4j.properties
index bb20bc5..840bb66 100644
--- a/components/camel-activemq/src/test/resources/log4j.properties
+++ b/components/camel-activemq/src/test/resources/log4j.properties
@@ -5,9 +5,9 @@
 ## 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
-## 
+##
+##      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.
diff --git a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/ActiveMQComponentFactoryUserNamePassword.xml b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/ActiveMQComponentFactoryUserNamePassword.xml
index 6e47aef..38ea7d9 100644
--- a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/ActiveMQComponentFactoryUserNamePassword.xml
+++ b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/ActiveMQComponentFactoryUserNamePassword.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+
     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.
@@ -7,13 +8,14 @@
     (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
+         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.
+
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/ActiveMQComponentUserNamePassword.xml b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/ActiveMQComponentUserNamePassword.xml
index 117aac8..6babd45 100644
--- a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/ActiveMQComponentUserNamePassword.xml
+++ b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/ActiveMQComponentUserNamePassword.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+
     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.
@@ -7,13 +8,14 @@
     (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
+         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.
+
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/BrowseQueuesInUFace-context.xml b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/BrowseQueuesInUFace-context.xml
index e1ca78e..02ebfe9 100644
--- a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/BrowseQueuesInUFace-context.xml
+++ b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/BrowseQueuesInUFace-context.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+
     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.
@@ -7,13 +8,14 @@
     (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
+         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.
+
 -->
 <!-- START SNIPPET: example -->
 <beans xmlns="http://www.springframework.org/schema/beans"
diff --git a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/CamelDestinationExclusiveConsumerTest-context.xml b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/CamelDestinationExclusiveConsumerTest-context.xml
index 3ae5db2..1bf7e7c 100644
--- a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/CamelDestinationExclusiveConsumerTest-context.xml
+++ b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/CamelDestinationExclusiveConsumerTest-context.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+
     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.
@@ -7,13 +8,14 @@
     (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
+         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.
+
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/SetHeaderTest-context.xml b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/SetHeaderTest-context.xml
index b2120fd..a5e2736 100644
--- a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/SetHeaderTest-context.xml
+++ b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/SetHeaderTest-context.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+
     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.
@@ -7,13 +8,14 @@
     (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
+         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.
+
 -->
 <!-- START SNIPPET: example -->
 <beans xmlns="http://www.springframework.org/schema/beans"
diff --git a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/dlq.xml b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/dlq.xml
index 42a6144..727cc72 100644
--- a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/dlq.xml
+++ b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/dlq.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+
     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.
@@ -7,13 +8,14 @@
     (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
+         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.
+
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jms-object-message.xml b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jms-object-message.xml
index a72297e..67cac5e 100644
--- a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jms-object-message.xml
+++ b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jms-object-message.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+
     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.
@@ -7,13 +8,14 @@
     (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
+         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.
+
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsBridge.xml b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsBridge.xml
index 423e8d7..86ce260 100644
--- a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsBridge.xml
+++ b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsBridge.xml
@@ -1,20 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
+
     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
-   
+
+         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.
--->
 
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:context="http://www.springframework.org/schema/context"
diff --git a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsConsumeSendTransacted.xml b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsConsumeSendTransacted.xml
index fc5ccab..5513ff6 100644
--- a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsConsumeSendTransacted.xml
+++ b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsConsumeSendTransacted.xml
@@ -1,20 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
+
     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
-   
+
+         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.
--->
 
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:context="http://www.springframework.org/schema/context"
diff --git a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsXajdbc.xml b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsXajdbc.xml
index 80ebaa9..e16a984 100644
--- a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsXajdbc.xml
+++ b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsXajdbc.xml
@@ -1,20 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
+
     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
-   
+
+         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.
--->
 
+-->
 <!-- START SNIPPET: jms_jdbc_xa -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsXajdbcRollback.xml b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsXajdbcRollback.xml
index f92a568..f70bc0a 100644
--- a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsXajdbcRollback.xml
+++ b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/jmsXajdbcRollback.xml
@@ -1,20 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
+
     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
-   
+
+         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.
--->
 
+-->
 <!-- START SNIPPET: jms_jdbc_xa -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/requestReply.xml b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/requestReply.xml
index 083899a..40f4e5b 100644
--- a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/requestReply.xml
+++ b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/requestReply.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+
     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.
@@ -7,13 +8,14 @@
     (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
+         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.
+
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:spring="http://camel.apache.org/schema/spring"
diff --git a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/spring.xml b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/spring.xml
index cc6007f..2c83301 100644
--- a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/spring.xml
+++ b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/spring.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+
     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.
@@ -7,13 +8,14 @@
     (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
+         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.
+
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/transactedconsume.xml b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/transactedconsume.xml
index f4d5a8d..288b118 100644
--- a/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/transactedconsume.xml
+++ b/components/camel-activemq/src/test/resources/org/apache/camel/component/activemq/transactedconsume.xml
@@ -1,4 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
+
     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.
@@ -6,15 +8,15 @@
     (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
+         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.
--->
 
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:context="http://www.springframework.org/schema/context"
diff --git a/platforms/spring-boot/components-starter/camel-activemq-starter/src/main/java/org/apache/camel/component/activemq/springboot/ActiveMQComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-activemq-starter/src/main/java/org/apache/camel/component/activemq/springboot/ActiveMQComponentConfiguration.java
index b33ef17..3e9649f 100644
--- a/platforms/spring-boot/components-starter/camel-activemq-starter/src/main/java/org/apache/camel/component/activemq/springboot/ActiveMQComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-activemq-starter/src/main/java/org/apache/camel/component/activemq/springboot/ActiveMQComponentConfiguration.java
@@ -26,7 +26,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
  * The activemq component allows messages to be sent to (or consumed from)
- * Apache ActiveMQ.
+ * Apache ActiveMQ. This component extends the Camel JMS component.
  * 
  * Generated by camel-package-maven-plugin - do not edit this file!
  */