svn commit: r711586 - in /activemq/camel/trunk/components/camel-jms/src: main/java/org/apache/camel/component/jms/ test/java/org/apache/camel/component/jms/ test/java/org/apache/camel/component/jms/bind/ test/java/org/apache/camel/component/jms/issues/

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r711586 - in /activemq/camel/trunk/components/camel-jms/src: main/java/org/apache/camel/component/jms/ test/java/org/apache/camel/component/jms/ test/java/org/apache/camel/component/jms/bind/ test/java/org/apache/camel/component/jms/issues/

davsclaus-2
Author: davsclaus
Date: Wed Nov  5 07:19:17 2008
New Revision: 711586

URL: http://svn.apache.org/viewvc?rev=711586&view=rev
Log:
CAMEL-502: Removed spring-jms code that was marked as @deprecated in Spring. Also removed some methods marked as @deprecated in Camel. Do NOT backport this to Camel 1.x branch.

Modified:
    activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/ConsumerType.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/JmsProducer.java
    activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsHeaderFilteringTest.java
    activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/TransactedJmsRouteTest.java
    activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/bind/JmsMessageBindTest.java
    activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/LarsIssueTest.java

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/ConsumerType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/ConsumerType.java?rev=711586&r1=711585&r2=711586&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/ConsumerType.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/ConsumerType.java Wed Nov  5 07:19:17 2008
@@ -20,5 +20,5 @@
  * @version $Revision$
  */
 public enum ConsumerType {
-    Simple, Default, ServerSessionPool
+    Simple, Default
 }

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=711586&r1=711585&r2=711586&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 Wed Nov  5 07:19:17 2008
@@ -37,7 +37,6 @@
 import org.springframework.core.task.TaskExecutor;
 import org.springframework.jms.connection.JmsTransactionManager;
 import org.springframework.jms.core.JmsOperations;
-import org.springframework.jms.listener.serversession.ServerSessionFactory;
 import org.springframework.jms.support.converter.MessageConverter;
 import org.springframework.jms.support.destination.DestinationResolver;
 import org.springframework.transaction.PlatformTransactionManager;
@@ -270,10 +269,6 @@
         getConfiguration().setRecoveryInterval(recoveryInterval);
     }
 
-    public void setServerSessionFactory(ServerSessionFactory serverSessionFactory) {
-        getConfiguration().setServerSessionFactory(serverSessionFactory);
-    }
-
     public void setSubscriptionDurable(boolean subscriptionDurable) {
         getConfiguration().setSubscriptionDurable(subscriptionDurable);
     }

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=711586&r1=711585&r2=711586&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 Wed Nov  5 07:19:17 2008
@@ -43,9 +43,6 @@
 import org.springframework.jms.listener.DefaultMessageListenerContainer102;
 import org.springframework.jms.listener.SimpleMessageListenerContainer;
 import org.springframework.jms.listener.SimpleMessageListenerContainer102;
-import org.springframework.jms.listener.serversession.ServerSessionFactory;
-import org.springframework.jms.listener.serversession.ServerSessionMessageListenerContainer;
-import org.springframework.jms.listener.serversession.ServerSessionMessageListenerContainer102;
 import org.springframework.jms.support.JmsUtils;
 import org.springframework.jms.support.converter.MessageConverter;
 import org.springframework.jms.support.destination.DestinationResolver;
@@ -94,7 +91,6 @@
     private boolean pubSubNoLocal;
     private int concurrentConsumers = 1;
     private int maxMessagesPerTask = 1;
-    private ServerSessionFactory serverSessionFactory;
     private int cacheLevel = -1;
     private String cacheLevelName;
     private long recoveryInterval = -1;
@@ -537,14 +533,6 @@
         this.maxMessagesPerTask = maxMessagesPerTask;
     }
 
-    public ServerSessionFactory getServerSessionFactory() {
-        return serverSessionFactory;
-    }
-
-    public void setServerSessionFactory(ServerSessionFactory serverSessionFactory) {
-        this.serverSessionFactory = serverSessionFactory;
-    }
-
     public int getCacheLevel() {
         return cacheLevel;
     }
@@ -928,15 +916,6 @@
             if (transactionTimeout >= 0) {
                 listenerContainer.setTransactionTimeout(transactionTimeout);
             }
-        } else if (container instanceof ServerSessionMessageListenerContainer) {
-            // this includes ServerSessionMessageListenerContainer102
-            ServerSessionMessageListenerContainer listenerContainer = (ServerSessionMessageListenerContainer)container;
-            if (maxMessagesPerTask >= 0) {
-                listenerContainer.setMaxMessagesPerTask(maxMessagesPerTask);
-            }
-            if (serverSessionFactory != null) {
-                listenerContainer.setServerSessionFactory(serverSessionFactory);
-            }
         } else if (container instanceof SimpleMessageListenerContainer) {
             // this includes SimpleMessageListenerContainer102
             SimpleMessageListenerContainer listenerContainer = (SimpleMessageListenerContainer)container;
@@ -974,10 +953,6 @@
         case Simple:
             return isUseVersion102()
                 ? new SimpleMessageListenerContainer102() : new SimpleMessageListenerContainer();
-        case ServerSessionPool:
-            return isUseVersion102()
-                ? new ServerSessionMessageListenerContainer102()
-                : new ServerSessionMessageListenerContainer();
         case Default:
             return isUseVersion102()
                 ? new DefaultMessageListenerContainer102() : new DefaultMessageListenerContainer();

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=711586&r1=711585&r2=711586&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 Wed Nov  5 07:19:17 2008
@@ -84,7 +84,7 @@
     }
 
     public long getRequestTimeout() {
-        return endpoint.getRequestTimeout();
+        return endpoint.getConfiguration().getRequestTimeout();
     }
 
     protected void doStart() throws Exception {
@@ -177,8 +177,8 @@
 
                     FutureTask future = null;
                     future = (!msgIdAsCorrId)
-                        ? requestor.getReceiveFuture(message.getJMSCorrelationID(), endpoint
-                            .getRequestTimeout()) : requestor.getReceiveFuture(callback);
+                        ? requestor.getReceiveFuture(message.getJMSCorrelationID(), endpoint.getConfiguration().getRequestTimeout())
+                            : requestor.getReceiveFuture(callback);
 
                     futureHolder.set(future);
 

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsHeaderFilteringTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsHeaderFilteringTest.java?rev=711586&r1=711585&r2=711586&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsHeaderFilteringTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsHeaderFilteringTest.java Wed Nov  5 07:19:17 2008
@@ -92,7 +92,7 @@
         return new RouteBuilder() {
             public void configure() throws Exception {
 
-                exception(AssertionFailedError.class).maximumRedeliveries(1).to(assertionReceiver);
+                onException(AssertionFailedError.class).maximumRedeliveries(1).to(assertionReceiver);
 
                 from(testQueueEndpointA).process(new OutHeaderChecker()).to(testQueueEndpointB);
                 from(testQueueEndpointB).process(new InHeaderChecker());

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=711586&r1=711585&r2=711586&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 Wed Nov  5 07:19:17 2008
@@ -105,10 +105,10 @@
                 // within the failed transaction.
                 inheritErrorHandler(false);
                 // Used to validate messages are sent to the target.
-                from("activemq:queue:mock.a").trace().to("mock:a");
-                from("activemq:queue:mock.b").trace().to("mock:b");
-                from("activemq:queue:mock.c").trace().to("mock:c");
-                from("activemq:queue:mock.d").trace().to("mock:d");
+                from("activemq:queue:mock.a").to("mock:a");
+                from("activemq:queue:mock.b").to("mock:b");
+                from("activemq:queue:mock.c").to("mock:c");
+                from("activemq:queue:mock.d").to("mock:d");
 
                 // Receive from a and send to target in 1 tx.
                 from("activemq:queue:a").to("activemq:queue:mock.a");

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=711586&r1=711585&r2=711586&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 Wed Nov  5 07:19:17 2008
@@ -34,7 +34,7 @@
         template.sendBodyAndHeader("activemq:Test.BindingQueue", "SomeBody", "foo", "bar");
 
         // lets wait for the method to be invoked
-        assertMockEndpointsSatisifed();
+        assertMockEndpointsSatisfied();
 
         // now lets test that the bean is correct
         MyBean bean = getMandatoryBean(MyBean.class, "myBean");

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=711586&r1=711585&r2=711586&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 Wed Nov  5 07:19:17 2008
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.jms.issues;
 
-
 import javax.jms.ConnectionFactory;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
@@ -31,7 +30,6 @@
 
 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
@@ -41,7 +39,6 @@
 public class LarsIssueTest  extends ContextTestSupport {
     private static final transient Log LOG = LogFactory.getLog(LarsIssueTest.class);
 
-
     public void testSendSomeMessages() throws Exception {
         MockEndpoint endpoint = getMockEndpoint("mock:results");
         String body1 = "Hello world!";
@@ -51,7 +48,7 @@
         template.sendBody("activemq:queue:foo.bar", body1);
         template.sendBody("activemq:queue:foo.bar", body2);
 
-        assertMockEndpointsSatisifed();
+        assertMockEndpointsSatisfied();
     }
 
     protected CamelContext createCamelContext() throws Exception {
@@ -74,8 +71,8 @@
 
                 // lets enable CACHE_CONSUMER so that the consumer stays around in JMX
                 // as the default due to the spring bug means we keep creating & closing consumers
-                from("activemq:queue:foo.bar?cacheLevelName=CACHE_CONSUMER").
-                        trace("DEBUG").process(myProcessor)
+                from("activemq:queue:foo.bar?cacheLevelName=CACHE_CONSUMER")
+                        .process(myProcessor)
                         .to("mock:results");
             }
         };