You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2008/03/25 08:49:26 UTC

svn commit: r640731 [3/4] - in /activemq/camel/trunk/components: camel-amqp/src/main/java/org/apache/camel/component/amqp/ camel-amqp/src/test/java/org/apache/camel/component/amqp/ camel-ftp/src/main/java/org/apache/camel/component/file/remote/ camel-f...

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java Tue Mar 25 00:49:12 2008
@@ -58,7 +58,7 @@
     private ConnectionFactory templateConnectionFactory;
     private ConnectionFactory listenerConnectionFactory;
     private int acknowledgementMode = -1;
-    private String acknowledgementModeName = null;
+    private String acknowledgementModeName;
     // Used to configure the spring Container
     private ExceptionListener exceptionListener;
     private ConsumerType consumerType = ConsumerType.Default;
@@ -110,20 +110,20 @@
      */
     public JmsConfiguration copy() {
         try {
-            return (JmsConfiguration) clone();
-        }
-        catch (CloneNotSupportedException e) {
+            return (JmsConfiguration)clone();
+        } catch (CloneNotSupportedException e) {
             throw new RuntimeCamelException(e);
         }
     }
 
     /**
-     * Creates a JmsOperations object used for request/response using a request timeout value
+     * Creates a JmsOperations object used for request/response using a request
+     * timeout value
      */
     public JmsOperations createInOutTemplate(boolean pubSubDomain, String destination, long requestTimeout) {
         JmsOperations answer = createInOnlyTemplate(pubSubDomain, destination);
         if (answer instanceof JmsTemplate && requestTimeout > 0) {
-            JmsTemplate jmsTemplate = (JmsTemplate) answer;
+            JmsTemplate jmsTemplate = (JmsTemplate)answer;
             jmsTemplate.setExplicitQosEnabled(true);
             jmsTemplate.setTimeToLive(requestTimeout);
         }
@@ -138,8 +138,9 @@
 
         ConnectionFactory factory = getTemplateConnectionFactory();
 
-        // I whish the spring templates had built in support for preserving the message
-        // qos when doing a send. :(  
+        // I whish the spring templates had built in support for preserving the
+        // message
+        // qos when doing a send. :(
         JmsTemplate template = useVersion102 ? new JmsTemplate102(factory, pubSubDomain) {
             /**
              * Override so we can support preserving the Qos settings that have
@@ -158,13 +159,13 @@
                         }
                     }
                     if (isPubSubDomain()) {
-                        ((TopicPublisher) producer).publish(message, message.getJMSDeliveryMode(), message.getJMSPriority(), ttl);
-                    }
-                    else {
-                        ((QueueSender) producer).send(message, message.getJMSDeliveryMode(), message.getJMSPriority(), ttl);
+                        ((TopicPublisher)producer).publish(message, message.getJMSDeliveryMode(), message
+                            .getJMSPriority(), ttl);
+                    } else {
+                        ((QueueSender)producer).send(message, message.getJMSDeliveryMode(), message
+                            .getJMSPriority(), ttl);
                     }
-                }
-                else {
+                } else {
                     super.doSend(producer, message);
                 }
             }
@@ -186,8 +187,7 @@
                         }
                     }
                     producer.send(message, message.getJMSDeliveryMode(), message.getJMSPriority(), ttl);
-                }
-                else {
+                } else {
                     super.doSend(producer, message);
                 }
             }
@@ -220,14 +220,13 @@
         template.setSessionTransacted(transacted);
         if (transacted) {
             template.setSessionAcknowledgeMode(Session.SESSION_TRANSACTED);
-        }
-        else {
-            // This is here for completeness, but the template should not get used
+        } else {
+            // This is here for completeness, but the template should not get
+            // used
             // for receiving messages.
             if (acknowledgementMode >= 0) {
                 template.setSessionAcknowledgeMode(acknowledgementMode);
-            }
-            else if (acknowledgementModeName != null) {
+            } else if (acknowledgementModeName != null) {
                 template.setSessionAcknowledgeModeName(acknowledgementModeName);
             }
         }
@@ -240,7 +239,8 @@
         return container;
     }
 
-    protected void configureMessageListenerContainer(AbstractMessageListenerContainer container, JmsEndpoint endpoint) {
+    protected void configureMessageListenerContainer(AbstractMessageListenerContainer container,
+                                                     JmsEndpoint endpoint) {
         container.setConnectionFactory(getListenerConnectionFactory());
         if (destinationResolver != null) {
             container.setDestinationResolver(destinationResolver);
@@ -272,30 +272,26 @@
         container.setSessionTransacted(transacted);
         if (transacted) {
             container.setSessionAcknowledgeMode(Session.SESSION_TRANSACTED);
-        }
-        else {
+        } else {
             if (acknowledgementMode >= 0) {
                 container.setSessionAcknowledgeMode(acknowledgementMode);
-            }
-            else if (acknowledgementModeName != null) {
+            } else if (acknowledgementModeName != null) {
                 container.setSessionAcknowledgeModeName(acknowledgementModeName);
             }
         }
 
         if (container instanceof DefaultMessageListenerContainer) {
             // this includes DefaultMessageListenerContainer102
-            DefaultMessageListenerContainer listenerContainer = (DefaultMessageListenerContainer) container;
+            DefaultMessageListenerContainer listenerContainer = (DefaultMessageListenerContainer)container;
             if (concurrentConsumers >= 0) {
                 listenerContainer.setConcurrentConsumers(concurrentConsumers);
             }
 
             if (cacheLevel >= 0) {
                 listenerContainer.setCacheLevel(cacheLevel);
-            }
-            else if (cacheLevelName != null) {
+            } else if (cacheLevelName != null) {
                 listenerContainer.setCacheLevelName(cacheLevelName);
-            }
-            else {
+            } else {
                 listenerContainer.setCacheLevel(defaultCacheLevel(endpoint));
             }
 
@@ -320,9 +316,9 @@
             }
             if (transactionManager != null) {
                 listenerContainer.setTransactionManager(transactionManager);
-            }
-            else if (transacted) {
-                throw new IllegalArgumentException("Property transacted is enabled but a transactionManager was not injected!");
+            } else if (transacted) {
+                throw new IllegalArgumentException(
+                                                   "Property transacted is enabled but a transactionManager was not injected!");
             }
             if (transactionName != null) {
                 listenerContainer.setTransactionName(transactionName);
@@ -330,20 +326,18 @@
             if (transactionTimeout >= 0) {
                 listenerContainer.setTransactionTimeout(transactionTimeout);
             }
-        }
-        else if (container instanceof ServerSessionMessageListenerContainer) {
+        } else if (container instanceof ServerSessionMessageListenerContainer) {
             // this includes ServerSessionMessageListenerContainer102
-            ServerSessionMessageListenerContainer listenerContainer = (ServerSessionMessageListenerContainer) container;
+            ServerSessionMessageListenerContainer listenerContainer = (ServerSessionMessageListenerContainer)container;
             if (maxMessagesPerTask >= 0) {
                 listenerContainer.setMaxMessagesPerTask(maxMessagesPerTask);
             }
             if (serverSessionFactory != null) {
                 listenerContainer.setServerSessionFactory(serverSessionFactory);
             }
-        }
-        else if (container instanceof SimpleMessageListenerContainer) {
+        } else if (container instanceof SimpleMessageListenerContainer) {
             // this includes SimpleMessageListenerContainer102
-            SimpleMessageListenerContainer listenerContainer = (SimpleMessageListenerContainer) container;
+            SimpleMessageListenerContainer listenerContainer = (SimpleMessageListenerContainer)container;
             if (concurrentConsumers >= 0) {
                 listenerContainer.setConcurrentConsumers(concurrentConsumers);
             }
@@ -396,7 +390,7 @@
      * {@link #createMessageListenerContainer(JmsEndpoint)}
      *
      * @param listenerConnectionFactory the connection factory to use for
-     *                                  consuming messages
+     *                consuming messages
      */
     public void setListenerConnectionFactory(ConnectionFactory listenerConnectionFactory) {
         this.listenerConnectionFactory = listenerConnectionFactory;
@@ -414,7 +408,7 @@
      * {@link JmsTemplate} via {@link #createInOnlyTemplate(boolean, String)}
      *
      * @param templateConnectionFactory the connection factory for sending
-     *                                  messages
+     *                messages
      */
     public void setTemplateConnectionFactory(ConnectionFactory templateConnectionFactory) {
         this.templateConnectionFactory = templateConnectionFactory;
@@ -691,12 +685,13 @@
     }
 
     /**
-     * Enables eager loading of JMS properties as soon as a message is loaded which generally
-     * is inefficient as the JMS properties may not be required but sometimes can catch early any
-     * issues with the underlying JMS provider and the use of JMS properties
+     * Enables eager loading of JMS properties as soon as a message is loaded
+     * which generally is inefficient as the JMS properties may not be required
+     * but sometimes can catch early any issues with the underlying JMS provider
+     * and the use of JMS properties
      *
-     * @param eagerLoadingOfProperties whether or not to enable eager loading of JMS properties
-     * on inbound messages
+     * @param eagerLoadingOfProperties whether or not to enable eager loading of
+     *                JMS properties on inbound messages
      */
     public void setEagerLoadingOfProperties(boolean eagerLoadingOfProperties) {
         this.eagerLoadingOfProperties = eagerLoadingOfProperties;
@@ -707,10 +702,11 @@
     }
 
     /**
-     * Disables the use of the JMSReplyTo header for consumers so that inbound messages are treated as InOnly
-     * rather than InOut requests.
+     * Disables the use of the JMSReplyTo header for consumers so that inbound
+     * messages are treated as InOnly rather than InOut requests.
      *
-     * @param disableReplyTo whether or not to disable the use of JMSReplyTo header indicating an InOut
+     * @param disableReplyTo whether or not to disable the use of JMSReplyTo
+     *                header indicating an InOut
      */
     public void setDisableReplyTo(boolean disableReplyTo) {
         this.disableReplyTo = disableReplyTo;
@@ -721,27 +717,30 @@
     protected AbstractMessageListenerContainer chooseMessageListenerContainerImplementation() {
         // TODO we could allow a spring container to auto-inject these objects?
         switch (consumerType) {
-            case Simple:
-                return isUseVersion102() ? new SimpleMessageListenerContainer102() : new SimpleMessageListenerContainer();
-            case ServerSessionPool:
-                return isUseVersion102() ? new ServerSessionMessageListenerContainer102() : new ServerSessionMessageListenerContainer();
-            case Default:
-                return isUseVersion102() ? new DefaultMessageListenerContainer102() : new DefaultMessageListenerContainer();
-            default:
-                throw new IllegalArgumentException("Unknown consumer type: " + consumerType);
+        case Simple:
+            return isUseVersion102()
+                ? new SimpleMessageListenerContainer102() : new SimpleMessageListenerContainer();
+        case ServerSessionPool:
+            return isUseVersion102()
+                ? new ServerSessionMessageListenerContainer102()
+                : new ServerSessionMessageListenerContainer();
+        case Default:
+            return isUseVersion102()
+                ? new DefaultMessageListenerContainer102() : new DefaultMessageListenerContainer();
+        default:
+            throw new IllegalArgumentException("Unknown consumer type: " + consumerType);
         }
     }
 
-
     /**
-     * Defaults the JMS cache level if none is explicitly specified.
-     *
-     * Note that due to this
-     * <a href="http://opensource.atlassian.com/projects/spring/browse/SPR-3890">Spring Bug</a>
-     * we cannot use CACHE_CONSUMER by default (which we should do as its most efficient)
-     * unless the spring version is 2.5.1 or later.
-     * Instead we use CACHE_CONNECTION - part from for non-durable topics which must use
-     * CACHE_CONSUMER to avoid missing messages (due to the consumer being created and destroyed per message).
+     * Defaults the JMS cache level if none is explicitly specified. Note that
+     * due to this <a
+     * href="http://opensource.atlassian.com/projects/spring/browse/SPR-3890">Spring
+     * Bug</a> we cannot use CACHE_CONSUMER by default (which we should do as
+     * its most efficient) unless the spring version is 2.5.1 or later. Instead
+     * we use CACHE_CONNECTION - part from for non-durable topics which must use
+     * CACHE_CONSUMER to avoid missing messages (due to the consumer being
+     * created and destroyed per message).
      *
      * @return
      * @param endpoint
@@ -750,16 +749,16 @@
         // if we are on a new enough spring version we can assume CACHE_CONSUMER
         if (PackageHelper.isValidVersion("org.springframework.jms", 2.51D)) {
             return DefaultMessageListenerContainer.CACHE_CONSUMER;
-        }
-        else {
+        } else {
             if (endpoint.isPubSubDomain() && !isSubscriptionDurable()) {
                 // we must cache the consumer or we will miss messages
                 // see https://issues.apache.org/activemq/browse/CAMEL-253
                 return DefaultMessageListenerContainer.CACHE_CONSUMER;
-            }
-            else {
-                // to enable consuming and sending with a single JMS session (to avoid XA) we can only use CACHE_CONNECTION
-                // due to this bug : http://opensource.atlassian.com/projects/spring/browse/SPR-3890
+            } else {
+                // to enable consuming and sending with a single JMS session (to
+                // avoid XA) we can only use CACHE_CONNECTION
+                // due to this bug :
+                // http://opensource.atlassian.com/projects/spring/browse/SPR-3890
                 return DefaultMessageListenerContainer.CACHE_CONNECTION;
             }
         }
@@ -796,8 +795,8 @@
 
     /**
      * Set to true if you want to send message using the QoS settings specified
-     * on the message.  Normally the QoS settings used are the one configured
-     * on this Object.
+     * on the message. Normally the QoS settings used are the one configured on
+     * this Object.
      *
      * @param preserveMessageQos
      */
@@ -826,8 +825,8 @@
     }
 
     /**
-     * Sets the frequency that the requestMap for InOut exchanges is purged
-     * for timed out message exchanges
+     * Sets the frequency that the requestMap for InOut exchanges is purged for
+     * timed out message exchanges
      *
      * @param requestMapPurgePollTimeMillis
      */

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsExchange.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsExchange.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsExchange.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsExchange.java Tue Mar 25 00:49:12 2008
@@ -16,12 +16,12 @@
  */
 package org.apache.camel.component.jms;
 
+import javax.jms.Message;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.impl.DefaultExchange;
-
-import javax.jms.Message;
 
 /**
  * Represents an {@ilnk Exchange} for working with JMS messages while exposing the inbound and outbound JMS {@link Message}

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java Tue Mar 25 00:49:12 2008
@@ -33,7 +33,7 @@
 
 /**
  * Represents a {@link org.apache.camel.Message} for working with JMS
- * 
+ *
  * @version $Revision:520964 $
  */
 public class JmsMessage extends DefaultMessage {
@@ -64,7 +64,7 @@
 
     /**
      * Returns the underlying JMS message
-     * 
+     *
      * @return the underlying JMS message
      */
     public Message getJmsMessage() {
@@ -75,10 +75,9 @@
         if (binding == null) {
             Exchange exchange = getExchange();
             if (exchange instanceof JmsExchange) {
-                JmsExchange jmsExchange = (JmsExchange) exchange;
+                JmsExchange jmsExchange = (JmsExchange)exchange;
                 return jmsExchange.getBinding();
-            }
-            else {
+            } else {
                 return new JmsBinding();
             }
         }
@@ -102,7 +101,7 @@
 
     public Object getHeader(String name) {
         Object answer = null;
-        
+
         // we will exclude using JMS-prefixed headers here to avoid strangeness with some JMS providers
         // e.g. ActiveMQ returns the String not the Destination type for "JMSReplyTo"!
         if (jmsMessage != null && !name.startsWith("JMS")) {
@@ -150,8 +149,7 @@
                 // TODO this works around a bug in the ActiveMQ property handling
                 map.put("JMSXGroupID", jmsMessage.getStringProperty("JMSXGroupID"));
 
-            }
-            catch (JMSException e) {
+            } catch (JMSException e) {
                 throw new MessageJMSPropertyAccessException(e);
             }
 

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java Tue Mar 25 00:49:12 2008
@@ -60,8 +60,7 @@
             Requestor requestor;
             try {
                 requestor = endpoint.getRequestor();
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                 throw new RuntimeExchangeException(e, exchange);
             }
 
@@ -93,24 +92,20 @@
             try {
                 Message message;
                 if (requestTimeout < 0) {
-                    message = (Message) future.get();
-                }
-                else {
-                    message = (Message) future.get(requestTimeout, TimeUnit.MILLISECONDS);
+                    message = (Message)future.get();
+                } else {
+                    message = (Message)future.get(requestTimeout, TimeUnit.MILLISECONDS);
                 }
                 if (message != null) {
                     exchange.setOut(new JmsMessage(message, endpoint.getBinding()));
-                }
-                else {
+                } else {
                     // lets set a timed out exception
                     exchange.setException(new ExchangeTimedOutException(exchange, requestTimeout));
                 }
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                 exchange.setException(e);
             }
-        }
-        else {
+        } else {
             getInOnlyTemplate().send(endpoint.getDestination(), new MessageCreator() {
                 public Message createMessage(Session session) throws JMSException {
                     Message message = endpoint.getBinding().makeJmsMessage(exchange, in, session);
@@ -125,7 +120,7 @@
 
     /**
      * Preserved for backwards compatibility.
-     * 
+     *
      * @deprecated
      * @see #getInOnlyTemplate()
      */

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsQueueEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsQueueEndpoint.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsQueueEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsQueueEndpoint.java Tue Mar 25 00:49:12 2008
@@ -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,
@@ -39,7 +38,8 @@
 public class JmsQueueEndpoint extends JmsEndpoint implements BrowsableEndpoint<JmsExchange> {
     private int maximumBrowseSize = -1;
 
-    public JmsQueueEndpoint(String uri, JmsComponent component, String destination, JmsConfiguration configuration) {
+    public JmsQueueEndpoint(String uri, JmsComponent component, String destination,
+                            JmsConfiguration configuration) {
         super(uri, component, destination, false, configuration);
     }
 
@@ -48,7 +48,8 @@
     }
 
     /**
-     * If a number is set > 0 then this limits the number of messages that are returned when browsing the queue
+     * If a number is set > 0 then this limits the number of messages that are
+     * returned when browsing the queue
      */
     public void setMaximumBrowseSize(int maximumBrowseSize) {
         this.maximumBrowseSize = maximumBrowseSize;
@@ -58,13 +59,14 @@
         String queue = getDestination();
         JmsOperations template = getConfiguration().createInOnlyTemplate(false, queue);
 
-        // TODO not the best implementation in the world as we have to browse the entire queue, which could be massive
+        // TODO not the best implementation in the world as we have to browse
+        // the entire queue, which could be massive
         final List<Exchange> answer = new ArrayList<Exchange>();
         template.browse(queue, new BrowserCallback() {
             public Object doInJms(Session session, QueueBrowser browser) throws JMSException {
                 Enumeration iter = browser.getEnumeration();
                 while (iter.hasMoreElements()) {
-                    Message message = (Message) iter.nextElement();
+                    Message message = (Message)iter.nextElement();
                     JmsExchange exchange = createExchange(message);
                     answer.add(exchange);
                 }

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessageJMSPropertyAccessException.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessageJMSPropertyAccessException.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessageJMSPropertyAccessException.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessageJMSPropertyAccessException.java Tue Mar 25 00:49:12 2008
@@ -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,

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/FailedToProcessResponse.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/FailedToProcessResponse.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/FailedToProcessResponse.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/FailedToProcessResponse.java Tue Mar 25 00:49:12 2008
@@ -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,
@@ -24,20 +23,20 @@
 
 /**
  * An exception thrown if a response message from an InOut could not be processed
- * 
+ *
  * @version $Revision$
  */
 public class FailedToProcessResponse extends RuntimeCamelException {
     private final Message response;
 
     public FailedToProcessResponse(Message response, JMSException e) {
-        super("Failed to process response: "+ e + ". Message: " + response, e);
+        super("Failed to process response: " + e + ". Message: " + response, e);
         this.response = response;
     }
 
     /**
      * The response message which caused the exception
-     * 
+     *
      * @return
      */
     public Message getResponse() {

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/FutureHandler.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/FutureHandler.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/FutureHandler.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/FutureHandler.java Tue Mar 25 00:49:12 2008
@@ -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,

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/ReplyHandler.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/ReplyHandler.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/ReplyHandler.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/ReplyHandler.java Tue Mar 25 00:49:12 2008
@@ -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,

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/Requestor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/Requestor.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/Requestor.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/Requestor.java Tue Mar 25 00:49:12 2008
@@ -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,
@@ -28,10 +27,10 @@
 import javax.jms.Session;
 import javax.jms.TemporaryQueue;
 
+import org.apache.camel.component.jms.JmsConfiguration;
 import org.apache.camel.impl.ServiceSupport;
 import org.apache.camel.util.DefaultTimeoutMap;
 import org.apache.camel.util.TimeoutMap;
-import org.apache.camel.component.jms.JmsConfiguration;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.core.task.TaskExecutor;
@@ -86,17 +85,16 @@
             // lets notify the monitor for this response
             Object handler = requestMap.get(correlationID);
             if (handler == null) {
-                LOG.warn("Response received for unknown correlationID: " + correlationID + " request: " + message);
-            }
-            else if (handler instanceof ReplyHandler) {
-                ReplyHandler replyHandler = (ReplyHandler) handler;
+                LOG.warn("Response received for unknown correlationID: " + correlationID + " request: "
+                         + message);
+            } else if (handler instanceof ReplyHandler) {
+                ReplyHandler replyHandler = (ReplyHandler)handler;
                 boolean complete = replyHandler.handle(message);
                 if (complete) {
                     requestMap.remove(correlationID);
                 }
             }
-        }
-        catch (JMSException e) {
+        } catch (JMSException e) {
             throw new FailedToProcessResponse(message, e);
         }
     }
@@ -136,12 +134,13 @@
     }
 
     protected AbstractMessageListenerContainer createListenerContainer() {
-        SimpleMessageListenerContainer answer = configuration.isUseVersion102() ?
-            new SimpleMessageListenerContainer102() : new SimpleMessageListenerContainer();
+        SimpleMessageListenerContainer answer = configuration.isUseVersion102()
+            ? new SimpleMessageListenerContainer102() : new SimpleMessageListenerContainer();
         answer.setDestinationName("temporary");
         answer.setDestinationResolver(new DestinationResolver() {
 
-            public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain) throws JMSException {
+            public Destination resolveDestinationName(Session session, String destinationName,
+                                                      boolean pubSubDomain) throws JMSException {
                 TemporaryQueue queue = session.createTemporaryQueue();
                 replyTo = queue;
                 return queue;

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/AggregratedJmsRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/AggregratedJmsRouteTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/AggregratedJmsRouteTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/AggregratedJmsRouteTest.java Tue Mar 25 00:49:12 2008
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.jms;
 
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
 
 import javax.jms.ConnectionFactory;
 
@@ -30,6 +29,7 @@
 import org.apache.camel.processor.aggregate.AggregationStrategy;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
 
 public class AggregratedJmsRouteTest extends ContextTestSupport {
 
@@ -37,7 +37,7 @@
     private String startEndpointUri = "jms:queue:test.a";
 
     /*
-     * negative recieve wait timeout for jms is blocking so timeout during processing does not hang 
+     * negative recieve wait timeout for jms is blocking so timeout during processing does not hang
      */
     public void testJmsBatchTimeoutExpiryWithAggregrationDelay() throws Exception {
         MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
@@ -78,7 +78,8 @@
                             fail("aggregration delay sleep inturrepted");
                         }
                         return newExchange;
-                    }}).to("mock:result");
+                    }
+                }).to("mock:result");
             }
         };
     }

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/BrowsableQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/BrowsableQueueTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/BrowsableQueueTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/BrowsableQueueTest.java Tue Mar 25 00:49:12 2008
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.jms;
 
+
 import java.util.List;
 
 import javax.jms.ConnectionFactory;
@@ -24,14 +25,14 @@
 import org.apache.camel.CamelContext;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
-import org.apache.camel.util.CamelContextHelper;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
+
+
 /**
  * @version $Revision$
  */
@@ -42,7 +43,7 @@
     protected String componentName = "activemq";
     protected String startEndpointUri;
     protected int counter;
-    protected Object[] expectedBodies = { "body1", "body2" };
+    protected Object[] expectedBodies = {"body1", "body2"};
 
     public void testSendMessagesThenBrowseQueue() throws Exception {
         // send some messages
@@ -59,8 +60,8 @@
         int index = -1;
         for (Exchange exchange : list) {
             String actual = exchange.getIn().getBody(String.class);
-            LOG.debug("Received body: "+ actual);
-            
+            LOG.debug("Received body: " + actual);
+
             Object expected = expectedBodies[++index];
             assertEquals("Body: " + index, expected, actual);
         }

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/ConsumeJmsBytesMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/ConsumeJmsBytesMessageTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/ConsumeJmsBytesMessageTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/ConsumeJmsBytesMessageTest.java Tue Mar 25 00:49:12 2008
@@ -16,14 +16,12 @@
  */
 package org.apache.camel.component.jms;
 
+
 import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
 
 import javax.jms.BytesMessage;
 import javax.jms.ConnectionFactory;
 import javax.jms.JMSException;
-import javax.jms.MapMessage;
 import javax.jms.Message;
 import javax.jms.Session;
 
@@ -32,11 +30,13 @@
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.springframework.jms.core.JmsTemplate;
 import org.springframework.jms.core.MessageCreator;
 
+import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
+
+
 /**
  * @version $Revision$
  */
@@ -87,7 +87,7 @@
         assertEquals("Wrong payload lentght", 3, bytes.length);
     }
 
-    
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/ConsumeJmsMapMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/ConsumeJmsMapMessageTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/ConsumeJmsMapMessageTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/ConsumeJmsMapMessageTest.java Tue Mar 25 00:49:12 2008
@@ -30,10 +30,10 @@
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.springframework.jms.core.JmsTemplate;
 import org.springframework.jms.core.MessageCreator;
+import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
 
 /**
  * @version $Revision$
@@ -76,17 +76,17 @@
     public void testSendMapMessage() throws Exception {
 
         endpoint.expectedMessageCount(1);
-        
+
         Map<String, String> map = new HashMap<String, String>();
         map.put("foo", "abc");
         map.put("bar", "xyz");
-        
+
         template.sendBody("direct:test", map);
-        
+
         endpoint.assertIsSatisfied();
         assertCorrectMapReceived();
     }
-    
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsEndpointConfigurationTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsEndpointConfigurationTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsEndpointConfigurationTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsEndpointConfigurationTest.java Tue Mar 25 00:49:12 2008
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.jms;
 
+
 import javax.jms.ConnectionFactory;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
@@ -23,9 +24,11 @@
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
 import org.springframework.jms.listener.AbstractMessageListenerContainer;
 import org.springframework.jms.listener.DefaultMessageListenerContainer;
+import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
+
+
 
 /**
  * @version $Revision$

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSelectorTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSelectorTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSelectorTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSelectorTest.java Tue Mar 25 00:49:12 2008
@@ -16,15 +16,17 @@
  */
 package org.apache.camel.component.jms;
 
+
 import javax.jms.ConnectionFactory;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.camel.CamelContext;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentTransacted;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.springframework.jms.listener.DefaultMessageListenerContainer;
+
+import static org.apache.camel.component.jms.JmsComponent.jmsComponentTransacted;
+
 
 /**
  * @version $Revision$

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransactedRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransactedRouteTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransactedRouteTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransactedRouteTest.java Tue Mar 25 00:49:12 2008
@@ -22,9 +22,9 @@
 import org.apache.camel.CamelContext;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentTransacted;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.springframework.jms.listener.DefaultMessageListenerContainer;
+import static org.apache.camel.component.jms.JmsComponent.jmsComponentTransacted;
+
 
 /**
  * @version $Revision$

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/TransactedJmsRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/TransactedJmsRouteTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/TransactedJmsRouteTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/TransactedJmsRouteTest.java Tue Mar 25 00:49:12 2008
@@ -48,12 +48,13 @@
 public class TransactedJmsRouteTest extends ContextTestSupport {
 
     private static final transient Log LOG = LogFactory.getLog(TransactedJmsRouteTest.class);
+    protected int assertTimeoutSeconds = 10;
     private MockEndpoint mockEndpointA;
     private MockEndpoint mockEndpointB;
     private ClassPathXmlApplicationContext spring;
     private MockEndpoint mockEndpointC;
     private MockEndpoint mockEndpointD;
-    protected int assertTimeoutSeconds = 10;
+
 
     @Override
     protected RouteBuilder createRouteBuilder() {
@@ -209,7 +210,7 @@
 
     /**
      * This test seems to be fail every other run.
-     * 
+     *
      * @throws Exception
      */
     public void disabledtestSenarioF() throws Exception {
@@ -236,7 +237,8 @@
         assertIsSatisfied(mockEndpointA);
     }
 
-    public void TODO_testSenarioB() throws Exception {
+    //TODO should fix this test
+    public void xtestSenarioB() throws Exception {
         String expected = getName() + ": " + System.currentTimeMillis();
         mockEndpointA.expectedMessageCount(0);
         mockEndpointB.expectedMinimumMessageCount(2); // May be more since

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/bind/JmsMessageBindTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/bind/JmsMessageBindTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/bind/JmsMessageBindTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/bind/JmsMessageBindTest.java Tue Mar 25 00:49:12 2008
@@ -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,8 +18,8 @@
 
 import java.util.Map;
 
-import org.apache.camel.spring.SpringTestSupport;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringTestSupport;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 /**

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/bind/MyBean.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/bind/MyBean.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/bind/MyBean.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/bind/MyBean.java Tue Mar 25 00:49:12 2008
@@ -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,

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/MyRegistry.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/MyRegistry.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/MyRegistry.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/MyRegistry.java Tue Mar 25 00:49:12 2008
@@ -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,21 +16,21 @@
  */
 package org.apache.camel.component.jms.discovery;
 
-import java.util.Map;
 import java.util.HashMap;
+import java.util.Map;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 /**
  * A simple POJO showing how to create a simple registry
- * 
+ *
  * @version $Revision$
  */
 public class MyRegistry {
     private static final transient Log LOG = LogFactory.getLog(MyRegistry.class);
 
-    private Map<String,Map> services = new HashMap<String, Map>();
+    private Map<String, Map> services = new HashMap<String, Map>();
 
     public void onEvent(Map heartbeat) {
         String key = (String) heartbeat.get("name");

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/MyService.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/MyService.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/MyService.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/MyService.java Tue Mar 25 00:49:12 2008
@@ -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,

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsIssue170Test.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsIssue170Test.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsIssue170Test.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsIssue170Test.java Tue Mar 25 00:49:12 2008
@@ -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,13 +16,15 @@
  */
 package org.apache.camel.component.jms.issues;
 
+
 import javax.jms.ConnectionFactory;
 
-import org.apache.camel.issues.Issue170Test;
-import org.apache.camel.builder.RouteBuilder;
+import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.issues.Issue170Test;
 import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
-import org.apache.activemq.ActiveMQConnectionFactory;
+
 
 /**
  * @version $Revision$

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/LarsIssueTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/LarsIssueTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/LarsIssueTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/LarsIssueTest.java Tue Mar 25 00:49:12 2008
@@ -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,6 +16,7 @@
  */
 package org.apache.camel.component.jms.issues;
 
+
 import javax.jms.ConnectionFactory;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
@@ -25,10 +25,12 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
+import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
+
 
 /**
  * Lets test that a number of headers MQSeries doesn't like to be sent are excluded when

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/MQSeriesHeaderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/MQSeriesHeaderTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/MQSeriesHeaderTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/MQSeriesHeaderTest.java Tue Mar 25 00:49:12 2008
@@ -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,6 +16,7 @@
  */
 package org.apache.camel.component.jms.issues;
 
+
 import java.util.HashMap;
 import java.util.Map;
 
@@ -28,13 +28,15 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.builder.RouteBuilder;
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
 import org.apache.camel.component.mock.MockEndpoint;
 
+import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
+
+
 /**
  * Lets test that a number of headers MQSeries doesn't like to be sent are excluded when
  * forwarding a JMS message from one destination to another
- * 
+ *
  * @version $Revision$
  */
 public class MQSeriesHeaderTest extends ContextTestSupport {

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/remoting/JmsRemotingTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/remoting/JmsRemotingTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/remoting/JmsRemotingTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/remoting/JmsRemotingTest.java Tue Mar 25 00:49:12 2008
@@ -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,

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AbstractTransactionTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AbstractTransactionTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AbstractTransactionTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AbstractTransactionTest.java Tue Mar 25 00:49:12 2008
@@ -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,6 @@
  */
 package org.apache.camel.component.jms.tx;
 
-import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
-
 import org.apache.camel.CamelContext;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Processor;
@@ -30,73 +27,81 @@
 import org.apache.camel.processor.Pipeline;
 import org.apache.log4j.Logger;
 
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+
 /**
  * Test case derived from:
- *      http://activemq.apache.org/camel/transactional-client.html
- *  and
- *      Martin Krasser's sample: http://www.nabble.com/JMS-Transactions---How-To-td15168958s22882.html#a15198803
+ * http://activemq.apache.org/camel/transactional-client.html and Martin
+ * Krasser's sample:
+ * http://www.nabble.com/JMS-Transactions---How-To-td15168958s22882.html#a15198803
  *
  * @author Kevin Ross
- *
  */
 public abstract class AbstractTransactionTest extends ContextTestSupport {
 
-    private Logger log = Logger.getLogger( getClass() );
-
     // keep a ref to easily check the count at the end.
-    //    private ConditionalExceptionProcessor conditionalExceptionProcessor;
+    // private ConditionalExceptionProcessor conditionalExceptionProcessor;
 
-    //    Policy required = new SpringTransactionPolicy( bean( TransactionTemplate.class, "PROPAGATION_REQUIRED" ) );
-    //    Policy notSupported = new SpringTransactionPolicy( bean( TransactionTemplate.class, "PROPAGATION_NOT_SUPPORTED" ) );
-    //    Policy requireNew = new SpringTransactionPolicy( bean( TransactionTemplate.class, "PROPAGATION_REQUIRES_NEW" ) );
+    // Policy required = new SpringTransactionPolicy( bean(
+    // TransactionTemplate.class, "PROPAGATION_REQUIRED" ) );
+    // Policy notSupported = new SpringTransactionPolicy( bean(
+    // TransactionTemplate.class, "PROPAGATION_NOT_SUPPORTED" ) );
+    // Policy requireNew = new SpringTransactionPolicy( bean(
+    // TransactionTemplate.class, "PROPAGATION_REQUIRES_NEW" ) );
 
     @Override
     protected void setUp() throws Exception {
 
         super.setUp();
-        //        setConditionalExceptionProcessor( new ConditionalExceptionProcessor() );
+        // setConditionalExceptionProcessor( new ConditionalExceptionProcessor()
+        // );
     }
 
     protected void tearDown() throws Exception {
 
         super.tearDown();
-        setCamelContextService( null );
+        setCamelContextService(null);
         context = null;
         template = null;
-        //        setConditionalExceptionProcessor( null );
+        // setConditionalExceptionProcessor( null );
     }
 
     protected CamelContext createCamelContext() throws Exception {
 
-        return createSpringCamelContext( this, "org/apache/camel/component/jms/tx/JavaDSLTransactionTest.xml" );
+        return createSpringCamelContext(this, "org/apache/camel/component/jms/tx/JavaDSLTransactionTest.xml");
     }
 
     protected void assertResult() throws InterruptedException {
 
-        template.sendBody( "activemq:queue:foo", "blah" );
-        Thread.sleep( 3000L );
-        assertTrue( "Expected only 2 calls to process() (1 failure, 1 success) but encountered " + getConditionalExceptionProcessor().getCount() + ".", getConditionalExceptionProcessor().getCount() <= 2 );
+        template.sendBody("activemq:queue:foo", "blah");
+        Thread.sleep(3000L);
+        assertTrue("Expected only 2 calls to process() (1 failure, 1 success) but encountered "
+                   + getConditionalExceptionProcessor().getCount() + "."
+                   , getConditionalExceptionProcessor().getCount() <= 2);
     }
 
     protected ConditionalExceptionProcessor getConditionalExceptionProcessor() {
 
-        Route route = context.getRoutes().get( 0 );
-        assertNotNull( route );
-        return getConditionalExceptionProcessor( route );
+        Route route = context.getRoutes().get(0);
+        assertNotNull(route);
+        return getConditionalExceptionProcessor(route);
     }
 
     /**
      * By default routes should be wrapped in the {@link DeadLetterChannel} so
      * lets unwrap that and return the actual processor
      */
-    protected ConditionalExceptionProcessor getConditionalExceptionProcessor( Route route ) {
+    protected ConditionalExceptionProcessor getConditionalExceptionProcessor(Route route) {
 
         //
-        // the following is very specific (and brittle) and is not generally useful outside these transaction tests (nor intended to be).
+        // the following is very specific (and brittle) and is not generally
+        // useful outside these transaction tests (nor intended to be).
         //
-        EventDrivenConsumerRoute consumerRoute = assertIsInstanceOf( EventDrivenConsumerRoute.class, route );
-        Processor processor = findProcessorByClass( consumerRoute.getProcessor(), ConditionalExceptionProcessor.class );
-        return assertIsInstanceOf( ConditionalExceptionProcessor.class, processor );
+        EventDrivenConsumerRoute consumerRoute = assertIsInstanceOf(EventDrivenConsumerRoute.class, route);
+        Processor processor = findProcessorByClass(consumerRoute.getProcessor(),
+                                                   ConditionalExceptionProcessor.class);
+        return assertIsInstanceOf(ConditionalExceptionProcessor.class, processor);
     }
 
     /**
@@ -106,46 +111,43 @@
      * @param findClass
      * @return
      */
-    protected Processor findProcessorByClass( Processor processor, Class findClass ) {
+    protected Processor findProcessorByClass(Processor processor, Class findClass) {
 
         while (true) {
 
-            processor = unwrapDeadLetter( processor );
+            processor = unwrapDeadLetter(processor);
 
             if (processor instanceof DelegateAsyncProcessor) {
-                processor = ( (DelegateAsyncProcessor) processor ).getProcessor();
-            }
-            else if (processor instanceof DelegateProcessor) {
+                processor = ((DelegateAsyncProcessor)processor).getProcessor();
+            } else if (processor instanceof DelegateProcessor) {
 
                 // TransactionInterceptor is a DelegateProcessor
-                processor = ( (DelegateProcessor) processor ).getProcessor();
-            }
-            else if (processor instanceof Pipeline) {
+                processor = ((DelegateProcessor)processor).getProcessor();
+            } else if (processor instanceof Pipeline) {
 
-                for (Processor p : ( (Pipeline) processor ).getProcessors()) {
+                for (Processor p : ((Pipeline)processor).getProcessors()) {
 
-                    p = findProcessorByClass( p, findClass );
-                    if (p != null && p.getClass().isAssignableFrom( findClass )) {
+                    p = findProcessorByClass(p, findClass);
+                    if (p != null && p.getClass().isAssignableFrom(findClass)) {
 
                         processor = p;
                         return processor;
                     }
                 }
-            }
-            else {
+            } else {
 
                 return processor;
             }
         }
     }
 
-    private Processor unwrapDeadLetter( Processor processor ) {
+    private Processor unwrapDeadLetter(Processor processor) {
 
         if (processor instanceof DeadLetterChannel) {
 
-            processor = ( (DeadLetterChannel) processor ).getOutput();
+            processor = ((DeadLetterChannel)processor).getOutput();
         }
 
         return processor;
     }
-}
\ No newline at end of file
+}

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/ConditionalExceptionProcessor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/ConditionalExceptionProcessor.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/ConditionalExceptionProcessor.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/ConditionalExceptionProcessor.java Tue Mar 25 00:49:12 2008
@@ -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,
@@ -28,24 +27,31 @@
  */
 public class ConditionalExceptionProcessor implements Processor {
 
-    private Logger log = Logger.getLogger( getClass() );
-    private int count = 0;
+    private Logger log = Logger.getLogger(getClass());
+    private int count;
 
-    public void process( Exchange exchange ) throws Exception {
+    public void process(Exchange exchange) throws Exception {
 
-        setCount( getCount() + 1 );
+        setCount(getCount() + 1);
 
-        AbstractTransactionTest.assertTrue( "Expected only 2 calls to process() but encountered " + getCount() + ".  There should be 1 for intentionally triggered rollback, and 1 for the redelivery.", getCount() <= 2 );
+        AbstractTransactionTest
+            .assertTrue(
+                        "Expected only 2 calls to process() but encountered "
+                            + getCount()
+                            + ".  There should be 1 for intentionally triggered rollback, and 1 for the redelivery.",
+                        getCount() <= 2);
 
         // should be printed 2 times due to one re-delivery after one failure
-        log.info( "Exchange[" + getCount() + "][" + ( ( getCount() <= 1 ) ? "Should rollback" : "Should succeed" ) + "] = " + exchange );
+        log.info("Exchange[" + getCount() + "][" + ((getCount() <= 1) ? "Should rollback" : "Should succeed")
+                 + "] = " + exchange);
 
         // force rollback on the second attempt
-        if (getCount() <= 1)
-            throw new Exception( "Rollback should be intentionally triggered: count[" + getCount() + "]." );
+        if (getCount() <= 1) {
+            throw new Exception("Rollback should be intentionally triggered: count[" + getCount() + "].");
+        }
     }
 
-    private void setCount( int count ) {
+    private void setCount(int count) {
 
         this.count = count;
     }
@@ -54,4 +60,4 @@
 
         return count;
     }
-}
\ No newline at end of file
+}

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/QueueToProcessorTransactionTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/QueueToProcessorTransactionTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/QueueToProcessorTransactionTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/QueueToProcessorTransactionTest.java Tue Mar 25 00:49:12 2008
@@ -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,
@@ -35,21 +34,21 @@
  */
 public class QueueToProcessorTransactionTest extends AbstractTransactionTest {
 
-    private Logger log = Logger.getLogger( getClass() );
+    private Logger log = Logger.getLogger(getClass());
 
     public void testRollbackUsingXmlQueueToProcessor() throws Exception {
 
         // configure routes and add to camel context
-        context.addRoutes( new SpringRouteBuilder() {
+        context.addRoutes(new SpringRouteBuilder() {
 
             @Override
             public void configure() throws Exception {
 
-                Policy required = bean( SpringTransactionPolicy.class, "PROPAGATION_REQUIRED_POLICY" );
-                from( "activemq:queue:foo" ).policy( required ).process( new ConditionalExceptionProcessor() );
+                Policy required = bean(SpringTransactionPolicy.class, "PROPAGATION_REQUIRED_POLICY");
+                from("activemq:queue:foo").policy(required).process(new ConditionalExceptionProcessor());
             }
-        } );
+        });
 
         assertResult();
     }
-}
\ No newline at end of file
+}

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/QueueToQueueTransactionTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/QueueToQueueTransactionTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/QueueToQueueTransactionTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/QueueToQueueTransactionTest.java Tue Mar 25 00:49:12 2008
@@ -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,
@@ -24,32 +23,33 @@
 
 /**
  * Test case derived from:
- *      http://activemq.apache.org/camel/transactional-client.html
- *  and
- *      Martin Krasser's sample: http://www.nabble.com/JMS-Transactions---How-To-td15168958s22882.html#a15198803
- *
- * NOTE: had to split into separate test classes as I was unable to fully tear down and isolate the test cases, I'm not sure why, but as soon as we know the Transaction classes can be joined into one.
+ * http://activemq.apache.org/camel/transactional-client.html and Martin
+ * Krasser's sample:
+ * http://www.nabble.com/JMS-Transactions---How-To-td15168958s22882.html#a15198803
+ * NOTE: had to split into separate test classes as I was unable to fully tear
+ * down and isolate the test cases, I'm not sure why, but as soon as we know the
+ * Transaction classes can be joined into one.
  *
  * @author Kevin Ross
- *
  */
 public class QueueToQueueTransactionTest extends AbstractTransactionTest {
 
-    private Logger log = Logger.getLogger( getClass() );
+    private Logger log = Logger.getLogger(getClass());
 
     public void testRollbackUsingXmlQueueToQueue() throws Exception {
 
         // configure routes and add to camel context
-        context.addRoutes( new SpringRouteBuilder() {
+        context.addRoutes(new SpringRouteBuilder() {
 
             @Override
             public void configure() throws Exception {
 
-                Policy required = bean( SpringTransactionPolicy.class, "PROPAGATION_REQUIRED_POLICY" );
-                from( "activemq:queue:foo" ).policy( required ).process( new ConditionalExceptionProcessor() ).to( "activemq:queue:bar" );
+                Policy required = bean(SpringTransactionPolicy.class, "PROPAGATION_REQUIRED_POLICY");
+                from("activemq:queue:foo").policy(required).process(new ConditionalExceptionProcessor())
+                    .to("activemq:queue:bar");
             }
-        } );
+        });
 
         assertResult();
     }
-}
\ No newline at end of file
+}

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/XMLQueueToProcessorTransactionTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/XMLQueueToProcessorTransactionTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/XMLQueueToProcessorTransactionTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/XMLQueueToProcessorTransactionTest.java Tue Mar 25 00:49:12 2008
@@ -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,34 +16,37 @@
  */
 package org.apache.camel.component.jms.tx;
 
-import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
 
 import org.apache.camel.CamelContext;
 import org.apache.log4j.Logger;
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
 
 /**
  * Test case derived from:
- *      http://activemq.apache.org/camel/transactional-client.html
- *  and
- *      Martin Krasser's sample: http://www.nabble.com/JMS-Transactions---How-To-td15168958s22882.html#a15198803
- *
- * NOTE: had to split into separate test classes as I was unable to fully tear down and isolate the test cases, I'm not sure why, but as soon as we know the Transaction classes can be joined into one.
+ * http://activemq.apache.org/camel/transactional-client.html and Martin
+ * Krasser's sample:
+ * http://www.nabble.com/JMS-Transactions---How-To-td15168958s22882.html#a15198803
+ * NOTE: had to split into separate test classes as I was unable to fully tear
+ * down and isolate the test cases, I'm not sure why, but as soon as we know the
+ * Transaction classes can be joined into one.
  *
  * @author Kevin Ross
- *
  */
 public class XMLQueueToProcessorTransactionTest extends AbstractTransactionTest {
 
-    private Logger log = Logger.getLogger( getClass() );
+    private Logger log = Logger.getLogger(getClass());
 
     protected CamelContext createCamelContext() throws Exception {
 
-        return createSpringCamelContext( this, "org/apache/camel/component/jms/tx/XMLQueueToProcessorTransactionTest.xml" );
+        return createSpringCamelContext(this,
+                                        "org/apache/camel/component/jms/tx/XMLQueueToProcessorTransactionTest.xml");
     }
 
     public void testRollbackUsingXmlQueueToQueue() throws Exception {
 
-        // routes should have been configured via xml and added to the camel context
+        // routes should have been configured via xml and added to the camel
+        // context
         assertResult();
     }
-}
\ No newline at end of file
+}

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/XMLQueueToQueueTransactionTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/XMLQueueToQueueTransactionTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/XMLQueueToQueueTransactionTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/XMLQueueToQueueTransactionTest.java Tue Mar 25 00:49:12 2008
@@ -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,34 +16,36 @@
  */
 package org.apache.camel.component.jms.tx;
 
-import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
-
 import org.apache.camel.CamelContext;
 import org.apache.log4j.Logger;
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
 
 /**
  * Test case derived from:
- *      http://activemq.apache.org/camel/transactional-client.html
- *  and
- *      Martin Krasser's sample: http://www.nabble.com/JMS-Transactions---How-To-td15168958s22882.html#a15198803
- *
- * NOTE: had to split into separate test classes as I was unable to fully tear down and isolate the test cases, I'm not sure why, but as soon as we know the Transaction classes can be joined into one.
+ * http://activemq.apache.org/camel/transactional-client.html and Martin
+ * Krasser's sample:
+ * http://www.nabble.com/JMS-Transactions---How-To-td15168958s22882.html#a15198803
+ * NOTE: had to split into separate test classes as I was unable to fully tear
+ * down and isolate the test cases, I'm not sure why, but as soon as we know the
+ * Transaction classes can be joined into one.
  *
  * @author Kevin Ross
- *
  */
 public class XMLQueueToQueueTransactionTest extends AbstractTransactionTest {
 
-    private Logger log = Logger.getLogger( getClass() );
+    private Logger log = Logger.getLogger(getClass());
 
     protected CamelContext createCamelContext() throws Exception {
 
-        return createSpringCamelContext( this, "org/apache/camel/component/jms/tx/XMLQueueToQueueTransactionTest.xml" );
+        return createSpringCamelContext(this,
+                                        "org/apache/camel/component/jms/tx/XMLQueueToQueueTransactionTest.xml");
     }
 
     public void testRollbackUsingXmlQueueToQueue() throws Exception {
 
-        // routes should have been configured via xml and added to the camel context
+        // routes should have been configured via xml and added to the camel
+        // context
         assertResult();
     }
-}
\ No newline at end of file
+}

Modified: activemq/camel/trunk/components/camel-josql/src/main/java/org/apache/camel/builder/sql/SQL.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-josql/src/main/java/org/apache/camel/builder/sql/SQL.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-josql/src/main/java/org/apache/camel/builder/sql/SQL.java (original)
+++ activemq/camel/trunk/components/camel-josql/src/main/java/org/apache/camel/builder/sql/SQL.java Tue Mar 25 00:49:12 2008
@@ -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,13 +16,13 @@
  */
 package org.apache.camel.builder.sql;
 
-import org.apache.camel.language.LanguageAnnotation;
-
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.camel.language.LanguageAnnotation;
+
 /**
  * An annotation for injection of SQL expressions into method parameters, fields or properties
  *
@@ -33,5 +32,5 @@
 @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
 @LanguageAnnotation(language = "sql")
 public @interface SQL {
-    public abstract String value();
+    String value();
 }

Modified: activemq/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaIdempotentConsumerTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaIdempotentConsumerTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaIdempotentConsumerTest.java (original)
+++ activemq/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaIdempotentConsumerTest.java Tue Mar 25 00:49:12 2008
@@ -66,7 +66,7 @@
         };
         // END SNIPPET: idempotent
     }
-    
+
     protected void cleanupRepository() {
         jpaTemplate = (JpaTemplate)applicationContext.getBean("jpaTemplate", JpaTemplate.class);
 
@@ -77,8 +77,8 @@
         transactionTemplate.execute(new TransactionCallback() {
             public Object doInTransaction(TransactionStatus arg0) {
                 List list = jpaTemplate.find(SELECT_ALL_STRING, PROCESSOR_NAME);
-                for (Object item: list) {
-                	jpaTemplate.remove(item);
+                for (Object item : list) {
+                    jpaTemplate.remove(item);
                 }
                 jpaTemplate.flush();
                 return Boolean.TRUE;