camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Anstey" <jans...@gmail.com>
Subject Re: svn commit: r712093 - in /activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms: ./ requestor/
Date Thu, 13 Nov 2008 18:47:01 GMT
Claus,

Did you mean to deprecate RuntimeJmsException, etc in this commit? They are
still used in camel-jms. I wanted to check before removing them :)

Cheers,
Jon

On Fri, Nov 7, 2008 at 5:40 AM, <davsclaus@apache.org> wrote:

> Author: davsclaus
> Date: Fri Nov  7 01:10:18 2008
> New Revision: 712093
>
> URL: http://svn.apache.org/viewvc?rev=712093&view=rev
> Log:
> Polished code. Removed unusued imports. Fixed a few inspections reported by
> IDEA of not used code.
>
> Modified:
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/DestinationEndpoint.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsHeaderFilterStrategy.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsIOConverter.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsTemporaryQueueEndpoint.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsTemporaryTopicEndpoint.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessageJMSPropertyAccessException.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessagePropertyAccessException.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessagePropertyNamesAccessException.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/QueueBrowseStrategy.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/RuntimeJmsException.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/PersistentReplyToFutureHandler.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/PersistentReplyToRequestor.java
>
>  activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/Requestor.java
>
> Modified:
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/DestinationEndpoint.java
> URL:
> http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/DestinationEndpoint.java?rev=712093&r1=712092&r2=712093&view=diff
>
> ==============================================================================
> ---
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/DestinationEndpoint.java
> (original)
> +++
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/DestinationEndpoint.java
> Fri Nov  7 01:10:18 2008
> @@ -27,5 +27,7 @@
>  * @version $Revision$
>  */
>  public interface DestinationEndpoint {
> +
>     Destination getJmsDestination(Session session) throws JMSException;
> +
>  }
>
> Modified:
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
> URL:
> http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java?rev=712093&r1=712092&r2=712093&view=diff
>
> ==============================================================================
> ---
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
> (original)
> +++
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
> Fri Nov  7 01:10:18 2008
> @@ -20,8 +20,6 @@
>  import java.io.InputStream;
>  import java.io.Reader;
>  import java.io.Serializable;
> -import java.math.BigDecimal;
> -import java.math.BigInteger;
>  import java.nio.ByteBuffer;
>  import java.util.Date;
>  import java.util.Enumeration;
> @@ -158,6 +156,7 @@
>
>     protected byte[] createByteArrayFromBytesMessage(BytesMessage message)
> throws JMSException {
>         if (message.getBodyLength() > Integer.MAX_VALUE) {
> +            LOG.warn("Length of BytesMessage is too long: " +
> message.getBodyLength());
>             return null;
>         }
>         byte[] result = new byte[(int)message.getBodyLength()];
> @@ -264,7 +263,7 @@
>      *   <li>any primitives and their counter Objects (Integer, Double
> etc.)</li>
>      *   <li>String and any other litterals, Character, CharSequence</li>
>      *   <li>Boolean</li>
> -     *   <li>BigDecimal and BigInteger</li>
> +     *   <li>Number</li>
>      *   <li>java.util.Date</li>
>      * </ul>
>      *
> @@ -281,8 +280,6 @@
>             return headerValue;
>         } else if (headerValue instanceof Character) {
>             return headerValue.toString();
> -        } else if (headerValue instanceof BigDecimal || headerValue
> instanceof BigInteger) {
> -            return headerValue.toString();
>         } else if (headerValue instanceof CharSequence) {
>             return headerValue.toString();
>         } else if (headerValue instanceof Boolean) {
>
> Modified:
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
> URL:
> http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java?rev=712093&r1=712092&r2=712093&view=diff
>
> ==============================================================================
> ---
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
> (original)
> +++
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
> Fri Nov  7 01:10:18 2008
> @@ -451,6 +451,6 @@
>
>     public void setHeaderFilterStrategy(HeaderFilterStrategy strategy) {
>         this.headerFilterStrategy = strategy;
> -
>     }
> +
>  }
>
> 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=712093&r1=712092&r2=712093&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
> Fri Nov  7 01:10:18 2008
> @@ -51,7 +51,6 @@
>
>  import static org.apache.camel.util.ObjectHelper.removeStartingCharacters;
>
> -
>  /**
>  * @version $Revision$
>  */
> @@ -353,8 +352,7 @@
>             template.setSessionAcknowledgeMode(Session.SESSION_TRANSACTED);
>         } else {
>             // This is here for completeness, but the template should not
> get
> -            // used
> -            // for receiving messages.
> +            // used for receiving messages.
>             if (acknowledgementMode >= 0) {
>                 template.setSessionAcknowledgeMode(acknowledgementMode);
>             } else if (acknowledgementModeName != null) {
> @@ -421,8 +419,7 @@
>      * Sets the connection factory to be used for sending messages via the
>      * {@link JmsTemplate} via {@link
> #createInOnlyTemplate(JmsEndpoint,boolean, String)}
>      *
> -     * @param templateConnectionFactory the connection factory for sending
> -     *                messages
> +     * @param templateConnectionFactory the connection factory for sending
> messages
>      */
>     public void setTemplateConnectionFactory(ConnectionFactory
> templateConnectionFactory) {
>         this.templateConnectionFactory = templateConnectionFactory;
> @@ -701,8 +698,6 @@
>      * Should InOut operations (request reply) default to using transacted
> mode?
>      *
>      * By default this is false as you need to commit the outgoing request
> before you can consume the input
> -     *
> -     * @return
>      */
>     public boolean isTransactedInOut() {
>         return transactedInOut;
>
> Modified:
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java
> URL:
> http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java?rev=712093&r1=712092&r2=712093&view=diff
>
> ==============================================================================
> ---
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java
> (original)
> +++
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java
> Fri Nov  7 01:10:18 2008
> @@ -16,8 +16,6 @@
>  */
>  package org.apache.camel.component.jms;
>
> -import javax.jms.MessageListener;
> -
>  import org.apache.camel.Consumer;
>  import org.apache.camel.Processor;
>  import org.apache.camel.impl.DefaultConsumer;
>
> Modified:
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsHeaderFilterStrategy.java
> URL:
> http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsHeaderFilterStrategy.java?rev=712093&r1=712092&r2=712093&view=diff
>
> ==============================================================================
> ---
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsHeaderFilterStrategy.java
> (original)
> +++
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsHeaderFilterStrategy.java
> Fri Nov  7 01:10:18 2008
> @@ -16,7 +16,6 @@
>  */
>  package org.apache.camel.component.jms;
>
> -
>  import org.apache.camel.impl.DefaultHeaderFilterStrategy;
>  import org.apache.camel.util.ObjectHelper;
>
>
> Modified:
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsIOConverter.java
> URL:
> http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsIOConverter.java?rev=712093&r1=712092&r2=712093&view=diff
>
> ==============================================================================
> ---
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsIOConverter.java
> (original)
> +++
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsIOConverter.java
> Fri Nov  7 01:10:18 2008
> @@ -40,7 +40,6 @@
>  *
>  * @version $Revision$
>  */
> -
>  @Converter
>  public final class JmsIOConverter {
>
> @@ -49,7 +48,6 @@
>
>     @Converter
>     public static ByteBuffer toByteBuffer(final Message message, Exchange
> exchange) throws Exception {
> -
>         if (message instanceof TextMessage) {
>             final String text = ((TextMessage)message).getText();
>             return NIOConverter.toByteBuffer(text, exchange);
> @@ -98,12 +96,11 @@
>             objectOut.close();
>             return NIOConverter.toByteBuffer(bytesOut.toByteArray());
>         }
> -        return null;
>
> +        return null;
>     }
>
>     private static void writeData(DataOutputStream dataOut, Object data)
> throws Exception {
> -
>         if (data instanceof byte[]) {
>             dataOut.write((byte[])data);
>         } else if (data instanceof String) {
> @@ -125,6 +122,6 @@
>         } else if (data instanceof Boolean) {
>             dataOut.writeBoolean(((Boolean)data).booleanValue());
>         }
> -
>     }
> +
>  }
>
> Modified:
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java
> URL:
> http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java?rev=712093&r1=712092&r2=712093&view=diff
>
> ==============================================================================
> ---
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java
> (original)
> +++
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java
> Fri Nov  7 01:10:18 2008
> @@ -22,7 +22,6 @@
>
>  import org.springframework.jms.core.JmsOperations;
>  import org.springframework.jms.core.JmsTemplate;
> -import org.springframework.jms.core.JmsTemplate102;
>
>  /**
>  * @version $Revision$
> @@ -67,11 +66,8 @@
>         if (template instanceof JmsTemplate) {
>             JmsTemplate jmsTemplate = (JmsTemplate)template;
>             jmsTemplate.setReceiveTimeout(timeout);
> -        } else if (template instanceof JmsTemplate102) {
> -            JmsTemplate102 jmsTemplate102 = (JmsTemplate102)template;
> -            jmsTemplate102.setReceiveTimeout(timeout);
>         } else {
> -            throw new IllegalArgumentException("Cannot set the
> receiveTimeout property on unknown JmsOperations type: " + template);
> +            throw new IllegalArgumentException("Cannot set the
> receiveTimeout property on unknown JmsOperations type: " +
> template.getClass().getName());
>         }
>     }
>  }
>
> 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=712093&r1=712092&r2=712093&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
> Fri Nov  7 01:10:18 2008
> @@ -49,7 +49,7 @@
>  */
>  public class JmsProducer extends DefaultProducer {
>     private static final transient Log LOG =
> LogFactory.getLog(JmsProducer.class);
> -    RequestorAffinity affinity;
> +    private RequestorAffinity affinity;
>     private final JmsEndpoint endpoint;
>     private JmsOperations inOnlyTemplate;
>     private JmsOperations inOutTemplate;
> @@ -257,7 +257,7 @@
>     /**
>      * Preserved for backwards compatibility.
>      *
> -     * @deprecated
> +     * @deprecated will be removed in Camel 2.0
>      * @see #getInOnlyTemplate()
>      */
>     public JmsOperations getTemplate() {
>
> Modified:
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsTemporaryQueueEndpoint.java
> URL:
> http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsTemporaryQueueEndpoint.java?rev=712093&r1=712092&r2=712093&view=diff
>
> ==============================================================================
> ---
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsTemporaryQueueEndpoint.java
> (original)
> +++
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsTemporaryQueueEndpoint.java
> Fri Nov  7 01:10:18 2008
> @@ -21,9 +21,6 @@
>  import javax.jms.Session;
>  import javax.jms.TemporaryQueue;
>
> -import org.springframework.jms.core.JmsOperations;
> -import org.springframework.jms.core.SessionCallback;
> -
>  /**
>  * A <a href="http://activemq.apache.org/jms.html">JMS Endpoint</a>
>  * for working with a {@link TemporaryQueue}
>
> Modified:
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsTemporaryTopicEndpoint.java
> URL:
> http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsTemporaryTopicEndpoint.java?rev=712093&r1=712092&r2=712093&view=diff
>
> ==============================================================================
> ---
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsTemporaryTopicEndpoint.java
> (original)
> +++
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsTemporaryTopicEndpoint.java
> Fri Nov  7 01:10:18 2008
> @@ -21,9 +21,6 @@
>  import javax.jms.Session;
>  import javax.jms.TemporaryTopic;
>
> -import org.springframework.jms.core.JmsOperations;
> -import org.springframework.jms.core.SessionCallback;
> -
>  /**
>  * A <a href="http://activemq.apache.org/jms.html">JMS Endpoint</a>
>  * for working with a {@link TemporaryTopic}
> @@ -63,5 +60,4 @@
>         return session.createTemporaryTopic();
>     }
>
> -
>  }
> \ No newline at end of file
>
> 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=712093&r1=712092&r2=712093&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
> Fri Nov  7 01:10:18 2008
> @@ -19,6 +19,7 @@
>  import javax.jms.JMSException;
>
>  /**
> + * @deprecated will be removed in Camel 2.0.
>  * @version $Revision$
>  */
>  public class MessageJMSPropertyAccessException extends RuntimeJmsException
> {
>
> Modified:
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessagePropertyAccessException.java
> URL:
> http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessagePropertyAccessException.java?rev=712093&r1=712092&r2=712093&view=diff
>
> ==============================================================================
> ---
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessagePropertyAccessException.java
> (original)
> +++
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessagePropertyAccessException.java
> Fri Nov  7 01:10:18 2008
> @@ -19,6 +19,7 @@
>  import javax.jms.JMSException;
>
>  /**
> + * @deprecated will be removed in Camel 2.0.
>  * @version $Revision:520964 $
>  */
>  public class MessagePropertyAccessException extends RuntimeJmsException {
>
> Modified:
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessagePropertyNamesAccessException.java
> URL:
> http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessagePropertyNamesAccessException.java?rev=712093&r1=712092&r2=712093&view=diff
>
> ==============================================================================
> ---
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessagePropertyNamesAccessException.java
> (original)
> +++
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessagePropertyNamesAccessException.java
> Fri Nov  7 01:10:18 2008
> @@ -19,6 +19,7 @@
>  import javax.jms.JMSException;
>
>  /**
> + * @deprecated will be removed in Camel 2.0.
>  * @version $Revision:520964 $
>  */
>  public class MessagePropertyNamesAccessException extends
> RuntimeJmsException {
>
> Modified:
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/QueueBrowseStrategy.java
> URL:
> http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/QueueBrowseStrategy.java?rev=712093&r1=712092&r2=712093&view=diff
>
> ==============================================================================
> ---
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/QueueBrowseStrategy.java
> (original)
> +++
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/QueueBrowseStrategy.java
> Fri Nov  7 01:10:18 2008
> @@ -25,5 +25,7 @@
>  * @version $Revision$
>  */
>  public interface QueueBrowseStrategy {
> +
>     List<Exchange> browse(JmsOperations template, String queue,
> JmsQueueEndpoint endpoint);
> +
>  }
>
> Modified:
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/RuntimeJmsException.java
> URL:
> http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/RuntimeJmsException.java?rev=712093&r1=712092&r2=712093&view=diff
>
> ==============================================================================
> ---
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/RuntimeJmsException.java
> (original)
> +++
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/RuntimeJmsException.java
> Fri Nov  7 01:10:18 2008
> @@ -19,6 +19,7 @@
>  import javax.jms.JMSException;
>
>  /**
> + * @deprecated will be removed in Camel 2.0.
>  * @version $Revision:520964 $
>  */
>  public class RuntimeJmsException extends RuntimeException {
>
> Modified:
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/PersistentReplyToFutureHandler.java
> URL:
> http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/PersistentReplyToFutureHandler.java?rev=712093&r1=712092&r2=712093&view=diff
>
> ==============================================================================
> ---
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/PersistentReplyToFutureHandler.java
> (original)
> +++
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/PersistentReplyToFutureHandler.java
> Fri Nov  7 01:10:18 2008
> @@ -20,20 +20,12 @@
>  import java.util.concurrent.TimeUnit;
>  import java.util.concurrent.TimeoutException;
>
> -import javax.jms.ExceptionListener;
>  import javax.jms.Message;
> -import javax.jms.Session;
>
> -import org.apache.camel.component.jms.JmsConfiguration;
> -import org.apache.camel.component.jms.JmsProducer;
>  import
> org.apache.camel.component.jms.requestor.DeferredRequestReplyMap.DeferredMessageSentCallback;
>  import
> org.apache.camel.component.jms.requestor.PersistentReplyToRequestor.MessageSelectorComposer;
>  import org.apache.commons.logging.Log;
>  import org.apache.commons.logging.LogFactory;
> -import org.springframework.core.task.TaskExecutor;
> -import org.springframework.jms.listener.AbstractMessageListenerContainer;
> -import org.springframework.jms.listener.DefaultMessageListenerContainer;
> -import org.springframework.transaction.PlatformTransactionManager;
>
>  public class PersistentReplyToFutureHandler extends FutureHandler {
>
>
> Modified:
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/PersistentReplyToRequestor.java
> URL:
> http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/PersistentReplyToRequestor.java?rev=712093&r1=712092&r2=712093&view=diff
>
> ==============================================================================
> ---
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/PersistentReplyToRequestor.java
> (original)
> +++
> activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/requestor/PersistentReplyToRequestor.java
> Fri Nov  7 01:10:18 2008
> @@ -143,7 +143,7 @@
>         JmsConfiguration config = getConfiguration();
>         String replyToSelectorName =
> getConfiguration().getReplyToDestinationSelectorName();
>
> -        AbstractMessageListenerContainer container =
> +        DefaultMessageListenerContainer container =
>             config.isUseVersion102()
>                     ? (replyToSelectorName != null) ? new
> DefaultMessageListenerContainer102()
>                            : new CamelDefaultMessageListenerContainer102()
> @@ -171,10 +171,12 @@
>         container.setMessageListener(this);
>         container.setPubSubDomain(false);
>         container.setSubscriptionDurable(false);
> +
>         ExceptionListener exceptionListener =
> config.getExceptionListener();
>         if (exceptionListener != null) {
>             container.setExceptionListener(exceptionListener);
>         }
> +
>         container.setSessionTransacted(config.isTransacted());
>         if (config.isTransacted()) {
>
> container.setSessionAcknowledgeMode(Session.SESSION_TRANSACTED);
> @@ -185,34 +187,33 @@
>
> container.setSessionAcknowledgeModeName(config.getAcknowledgementModeName());
>             }
>         }
> -        if (container instanceof DefaultMessageListenerContainer) {
> -            DefaultMessageListenerContainer defContainer =
> (DefaultMessageListenerContainer)container;
> -            defContainer.setConcurrentConsumers(1);
> -
>  defContainer.setCacheLevel(DefaultMessageListenerContainer.CACHE_SESSION);
>
> -            if (config.getReceiveTimeout() >= 0) {
> -
>  defContainer.setReceiveTimeout(config.getReceiveTimeout());
> -            }
> -            if (config.getRecoveryInterval() >= 0) {
> -
>  defContainer.setRecoveryInterval(config.getRecoveryInterval());
> -            }
> -            TaskExecutor taskExecutor = config.getTaskExecutor();
> -            if (taskExecutor != null) {
> -                defContainer.setTaskExecutor(taskExecutor);
> -            }
> -            PlatformTransactionManager tm =
> config.getTransactionManager();
> -            if (tm != null) {
> -                defContainer.setTransactionManager(tm);
> -            } else if (config.isTransacted()) {
> -                throw new IllegalArgumentException("Property transacted is
> enabled but a transactionManager was not injected!");
> -            }
> -            if (config.getTransactionName() != null) {
> -
>  defContainer.setTransactionName(config.getTransactionName());
> -            }
> -            if (config.getTransactionTimeout() >= 0) {
> -
>  defContainer.setTransactionTimeout(config.getTransactionTimeout());
> -            }
> +        container.setConcurrentConsumers(1);
> +
>  container.setCacheLevel(DefaultMessageListenerContainer.CACHE_SESSION);
> +
> +        if (config.getReceiveTimeout() >= 0) {
> +            container.setReceiveTimeout(config.getReceiveTimeout());
> +        }
> +        if (config.getRecoveryInterval() >= 0) {
> +            container.setRecoveryInterval(config.getRecoveryInterval());
> +        }
> +        TaskExecutor taskExecutor = config.getTaskExecutor();
> +        if (taskExecutor != null) {
> +            container.setTaskExecutor(taskExecutor);
> +        }
> +        PlatformTransactionManager tm = config.getTransactionManager();
> +        if (tm != null) {
> +            container.setTransactionManager(tm);
> +        } else if (config.isTransacted()) {
> +            throw new IllegalArgumentException("Property transacted is
> enabled but a transactionManager was not injected!");
>         }
> +        if (config.getTransactionName() != null) {
> +            container.setTransactionName(config.getTransactionName());
> +        }
> +        if (config.getTransactionTimeout() >= 0) {
> +
>  container.setTransactionTimeout(config.getTransactionTimeout());
> +        }
> +
>         return container;
>     }
>
>
> 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=712093&r1=712092&r2=712093&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
> Fri Nov  7 01:10:18 2008
> @@ -146,7 +146,7 @@
>                 LOG.debug("Message correlationID: " + correlationID);
>             }
>             if (correlationID == null) {
> -                LOG.warn("Ignoring message with no correlationID! " +
> message);
> +                LOG.warn("Ignoring message with no correlationID: " +
> message);
>                 return;
>             }
>             // lets notify the monitor for this response
>
>
>


-- 
Cheers,
Jon

http://janstey.blogspot.com/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message