camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r633576 - in /activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms: JmsBinding.java JmsProducer.java
Date Tue, 04 Mar 2008 18:23:32 GMT
Author: jstrachan
Date: Tue Mar  4 10:23:21 2008
New Revision: 633576

URL: http://svn.apache.org/viewvc?rev=633576&view=rev
Log:
made the camel-jms module backwards compatible with older versions so older ActiveMQ releases
work nicely without change on newer Camel distros

Modified:
    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/JmsProducer.java

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=633576&r1=633575&r2=633576&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
Tue Mar  4 10:23:21 2008
@@ -106,6 +106,17 @@
      * @return a newly created JMS Message instance containing the
      * @throws JMSException if the message could not be created
      */
+    public Message makeJmsMessage(Exchange exchange, Session session) throws JMSException
{
+        return makeJmsMessage(exchange, exchange.getIn(), session);
+    }
+
+    /**
+     * Creates a JMS message from the Camel exchange and message
+     *
+     * @param session the JMS session used to create the message
+     * @return a newly created JMS Message instance containing the
+     * @throws JMSException if the message could not be created
+     */
     public Message makeJmsMessage(Exchange exchange, org.apache.camel.Message camelMessage,
Session session) throws JMSException {
         Message answer = null;
         if (camelMessage instanceof JmsMessage) {
@@ -119,6 +130,13 @@
         return answer;
     }
 
+    /**
+     * Appends the JMS headers from the Camel {@link JmsMessage}
+     */
+    public void appendJmsProperties(Message jmsMessage, Exchange exchange) throws JMSException
{
+        appendJmsProperties(jmsMessage, exchange, exchange.getIn());
+    }
+    
     /**
      * Appends the JMS headers from the Camel {@link JmsMessage}
      */

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=633576&r1=633575&r2=633576&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  4 10:23:21 2008
@@ -123,6 +123,16 @@
         }
     }
 
+    /**
+     * Preserved for backwards compatibility.
+     * 
+     * @deprecated
+     * @see #getInOnlyTemplate()
+     */
+    public JmsOperations getTemplate() {
+        return getInOnlyTemplate();
+    }
+
     public JmsOperations getInOnlyTemplate() {
         if (inOnlyTemplate == null) {
             inOnlyTemplate = endpoint.createInOnlyTemplate();



Mime
View raw message