Author: davsclaus Date: Sat Feb 5 13:51:49 2011 New Revision: 1067441 URL: http://svn.apache.org/viewvc?rev=1067441&view=rev Log: CAMEL-3604: Upgrade to Spring 3 as minimum.
Removed: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsHelper.java camel/trunk/platforms/karaf/features/src/main/resources/features-spring2.xml camel/trunk/tests/camel-itest-spring-2.0/ camel/trunk/tests/camel-itest-spring-2.5/ Modified: camel/trunk/camel-core/pom.xml camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsQueueEndpoint.java camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/PersistentQueueReplyManager.java camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsComponentTest.java camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsEndpointConfigurationTest.java camel/trunk/components/camel-spring-ws/pom.xml camel/trunk/components/camel-spring/pom.xml camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java camel/trunk/components/camel-web/pom.xml camel/trunk/parent/pom.xml camel/trunk/platforms/karaf/features/pom.xml camel/trunk/tests/pom.xml Modified: camel/trunk/camel-core/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/pom.xml?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/camel-core/pom.xml (original) +++ camel/trunk/camel-core/pom.xml Sat Feb 5 13:51:49 2011 @@ -43,9 +43,9 @@ javax.xml.bind.annotation;resolution:=optional, javax.xml.bind.annotation.adapters;resolution:=optional, javax.xml.stream;resolution:=optional, - org.springframework.jmx.export.annotation;resolution:=optional;version="[2.5,4)", - org.springframework.jmx.export.assembler;resolution:=optional;version="[2.5,4)", - org.springframework.jmx.export.metadata;resolution:=optional;version="[2.5,4)", + org.springframework.jmx.export.annotation;resolution:=optional;version="[3,4)", + org.springframework.jmx.export.assembler;resolution:=optional;version="[3,4)", + org.springframework.jmx.export.metadata;resolution:=optional;version="[3,4)", * </camel.osgi.import> <camel.osgi.dynamic> Modified: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java (original) +++ camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java Sat Feb 5 13:51:49 2011 @@ -27,7 +27,6 @@ import org.apache.camel.impl.DefaultComp import org.apache.camel.spi.HeaderFilterStrategy; import org.apache.camel.spi.HeaderFilterStrategyAware; import org.apache.camel.util.CastUtils; -import org.apache.camel.util.ObjectHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeansException; @@ -51,12 +50,10 @@ import static org.apache.camel.util.Obje public class JmsComponent extends DefaultComponent implements ApplicationContextAware, HeaderFilterStrategyAware { private static final transient Logger LOG = LoggerFactory.getLogger(JmsComponent.class); - private static final String DEFAULT_QUEUE_BROWSE_STRATEGY = "org.apache.camel.component.jms.DefaultQueueBrowseStrategy"; private static final String KEY_FORMAT_STRATEGY_PARAM = "jmsKeyFormatStrategy"; private JmsConfiguration configuration; private ApplicationContext applicationContext; private QueueBrowseStrategy queueBrowseStrategy; - private boolean attemptedToCreateQueueBrowserStrategy; private HeaderFilterStrategy headerFilterStrategy = new JmsHeaderFilterStrategy(); public JmsComponent() { @@ -199,10 +196,6 @@ public class JmsComponent extends Defaul getConfiguration().setConnectionFactory(connectionFactory); } - public void setConsumerType(ConsumerType consumerType) { - getConfiguration().setConsumerType(consumerType); - } - public void setDeliveryPersistent(boolean deliveryPersistent) { getConfiguration().setDeliveryPersistent(deliveryPersistent); } @@ -284,10 +277,6 @@ public class JmsComponent extends Defaul getConfiguration().setTaskExecutor(taskExecutor); } - public void setTaskExecutorSpring2(Object taskExecutor) { - getConfiguration().setTaskExecutorSpring2(taskExecutor); - } - public void setTimeToLive(long timeToLive) { getConfiguration().setTimeToLive(timeToLive); } @@ -338,15 +327,7 @@ public class JmsComponent extends Defaul public QueueBrowseStrategy getQueueBrowseStrategy() { if (queueBrowseStrategy == null) { - if (!attemptedToCreateQueueBrowserStrategy) { - attemptedToCreateQueueBrowserStrategy = true; - try { - queueBrowseStrategy = tryCreateDefaultQueueBrowseStrategy(getCamelContext()); - } catch (Throwable e) { - LOG.warn("Could not instantiate the QueueBrowseStrategy are you using Spring 2.0.x" - + " by any chance? Error: " + e, e); - } - } + queueBrowseStrategy = new DefaultQueueBrowseStrategy(); } return queueBrowseStrategy; } @@ -470,30 +451,4 @@ public class JmsComponent extends Defaul return new JmsConfiguration(); } - /** - * Attempts to instantiate the default {@link QueueBrowseStrategy} which - * should work fine if Spring 2.5.x or later is on the classpath but this - * will fail if 2.0.x are on the classpath. We can continue to operate on - * this version we just cannot support the browseable queues supported by - * {@link JmsQueueEndpoint} - * - * @return the queue browse strategy or null if it cannot be supported - */ - protected static QueueBrowseStrategy tryCreateDefaultQueueBrowseStrategy(CamelContext context) { - // lets try instantiate the default implementation - // use the class loading this class from camel-jms to work in OSGi environments as the camel-jms - // should import the spring-jms jars. - if (JmsHelper.isSpring20x(context)) { - // not possible with spring 2.0.x - return null; - } else { - // lets try instantiate the default implementation - Class<?> type = context.getClassResolver().resolveClass(DEFAULT_QUEUE_BROWSE_STRATEGY, JmsComponent.class.getClassLoader()); - if (type != null) { - return ObjectHelper.newInstance(type, QueueBrowseStrategy.class); - } else { - return null; - } - } - } } Modified: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java (original) +++ camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java Sat Feb 5 13:51:49 2011 @@ -25,9 +25,7 @@ import javax.jms.MessageProducer; import javax.jms.Session; import org.apache.camel.RuntimeCamelException; -import org.apache.camel.util.IntrospectionSupport; import org.apache.camel.util.ObjectHelper; -import org.apache.camel.util.PackageHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.task.TaskExecutor; @@ -68,7 +66,6 @@ public class JmsConfiguration implements private String acknowledgementModeName; // Used to configure the spring Container private ExceptionListener exceptionListener; - private ConsumerType consumerType = ConsumerType.Default; private boolean autoStartup = true; private boolean acceptMessagesWhileStopping; private String clientId; @@ -76,8 +73,6 @@ public class JmsConfiguration implements private boolean subscriptionDurable; private boolean exposeListenerSession = true; private TaskExecutor taskExecutor; - // TODO: remove in Camel 3.0 when Spring 3.0+ is required - private Object taskExecutorSpring2; private boolean pubSubNoLocal; private int concurrentConsumers = 1; private int maxMessagesPerTask = -1; @@ -493,14 +488,6 @@ public class JmsConfiguration implements this.taskExecutor = taskExecutor; } - public Object getTaskExecutorSpring2() { - return taskExecutorSpring2; - } - - public void setTaskExecutorSpring2(Object taskExecutorSpring2) { - this.taskExecutorSpring2 = taskExecutorSpring2; - } - public boolean isPubSubNoLocal() { return pubSubNoLocal; } @@ -675,14 +662,6 @@ public class JmsConfiguration implements configuredQoS(); } - public ConsumerType getConsumerType() { - return consumerType; - } - - public void setConsumerType(ConsumerType consumerType) { - this.consumerType = consumerType; - } - public int getAcknowledgementMode() { return acknowledgementMode; } @@ -917,9 +896,6 @@ public class JmsConfiguration implements } if (taskExecutor != null) { listenerContainer.setTaskExecutor(taskExecutor); - } else if (taskExecutorSpring2 != null) { - // use reflection to invoke to support spring 2 when JAR is compiled with Spring 3.0 - IntrospectionSupport.setProperty(listenerContainer, "taskExecutor", endpoint.getTaskExecutorSpring2()); } } else if (container instanceof SimpleMessageListenerContainer) { // this includes SimpleMessageListenerContainer102 @@ -930,9 +906,6 @@ public class JmsConfiguration implements listenerContainer.setPubSubNoLocal(pubSubNoLocal); if (taskExecutor != null) { listenerContainer.setTaskExecutor(taskExecutor); - } else if (taskExecutorSpring2 != null) { - // use reflection to invoke to support spring 2 when JAR is compiled with Spring 3.0 - IntrospectionSupport.setProperty(listenerContainer, "taskExecutor", endpoint.getTaskExecutorSpring2()); } } } @@ -960,48 +933,19 @@ public class JmsConfiguration implements } public AbstractMessageListenerContainer chooseMessageListenerContainerImplementation(JmsEndpoint endpoint) { - switch (consumerType) { - case Simple: - // TODO: simple is @deprecated and should be removed in Camel 2.7 when we upgrade to Spring 3 - return new SimpleMessageListenerContainer(); - case Default: - return new JmsMessageListenerContainer(endpoint); - default: - throw new IllegalArgumentException("Unknown consumer type: " + consumerType); - } + return new JmsMessageListenerContainer(endpoint); } /** - * 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. + * <p/> + * Will by default use <tt>CACHE_CONSUMER</tt> which is the most efficient. * * @param endpoint the endpoint * @return the cache level */ protected int defaultCacheLevel(JmsEndpoint endpoint) { - // TODO: upgrade to Spring 3 - // 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 { - 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 - return DefaultMessageListenerContainer.CACHE_CONNECTION; - } - } + return DefaultMessageListenerContainer.CACHE_CONSUMER; } /** Modified: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java (original) +++ camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java Sat Feb 5 13:51:49 2011 @@ -440,10 +440,6 @@ public class JmsEndpoint extends Default return getConfiguration().getConnectionFactory(); } - public ConsumerType getConsumerType() { - return getConfiguration().getConsumerType(); - } - public DestinationResolver getDestinationResolver() { return getConfiguration().getDestinationResolver(); } @@ -522,10 +518,6 @@ public class JmsEndpoint extends Default return getConfiguration().getTaskExecutor(); } - public Object getTaskExecutorSpring2() { - return getConfiguration().getTaskExecutorSpring2(); - } - public ConnectionFactory getTemplateConnectionFactory() { return getConfiguration().getTemplateConnectionFactory(); } @@ -683,10 +675,6 @@ public class JmsEndpoint extends Default getConfiguration().setConnectionFactory(connectionFactory); } - public void setConsumerType(ConsumerType consumerType) { - getConfiguration().setConsumerType(consumerType); - } - @ManagedAttribute public void setDeliveryPersistent(boolean deliveryPersistent) { getConfiguration().setDeliveryPersistent(deliveryPersistent); @@ -824,10 +812,6 @@ public class JmsEndpoint extends Default getConfiguration().setTaskExecutor(taskExecutor); } - public void setTaskExecutorSpring2(Object taskExecutor) { - getConfiguration().setTaskExecutorSpring2(taskExecutor); - } - public void setTemplateConnectionFactory(ConnectionFactory templateConnectionFactory) { getConfiguration().setTemplateConnectionFactory(templateConnectionFactory); } Modified: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java (original) +++ camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java Sat Feb 5 13:51:49 2011 @@ -29,13 +29,11 @@ import org.springframework.jms.core.JmsT public class JmsPollingConsumer extends PollingConsumerSupport { private JmsOperations template; private JmsEndpoint jmsEndpoint; - private final boolean spring20x; public JmsPollingConsumer(JmsEndpoint endpoint, JmsOperations template) { super(endpoint); this.jmsEndpoint = endpoint; this.template = template; - this.spring20x = JmsHelper.isSpring20x(endpoint != null ? endpoint.getCamelContext() : null); } @Override @@ -44,28 +42,11 @@ public class JmsPollingConsumer extends } public Exchange receiveNoWait() { - // spring have changed the semantic of the receive timeout mode - // so we need to determine if running spring 2.0.x or 2.5.x or newer - if (spring20x) { - // spring 2.0.x - return receive(0L); - } else { - // spring 2.5.x - // no wait using -1L does not work properly so wait at most 1 millis to simulate no wait - return receive(1); - } + return receive(1); } public Exchange receive() { - // spring have changed the semantic of the receive timeout mode - // so we need to determine if running spring 2.0.x or 2.5.x or newer - if (spring20x) { - // spring 2.0.x - return receive(-1L); - } else { - // spring 2.5.x - return receive(0L); - } + return receive(0L); } public Exchange receive(long timeout) { Modified: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsQueueEndpoint.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsQueueEndpoint.java?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsQueueEndpoint.java (original) +++ camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsQueueEndpoint.java Sat Feb 5 13:51:49 2011 @@ -23,8 +23,6 @@ import javax.jms.Queue; import org.apache.camel.Exchange; import org.apache.camel.spi.BrowsableEndpoint; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.jms.core.JmsOperations; import org.springframework.jmx.export.annotation.ManagedAttribute; import org.springframework.jmx.export.annotation.ManagedOperation; @@ -37,8 +35,6 @@ import org.springframework.jmx.export.an */ @ManagedResource(description = "Managed JMS Queue Endpoint") public class JmsQueueEndpoint extends JmsEndpoint implements BrowsableEndpoint { - private static final transient Logger LOG = LoggerFactory.getLogger(JmsQueueEndpoint.class); - private int maximumBrowseSize = -1; private final QueueBrowseStrategy queueBrowseStrategy; @@ -115,17 +111,7 @@ public class JmsQueueEndpoint extends Jm } protected QueueBrowseStrategy createQueueBrowseStrategy() { - QueueBrowseStrategy answer = null; - try { - answer = JmsComponent.tryCreateDefaultQueueBrowseStrategy(getCamelContext()); - } catch (Throwable e) { - LOG.debug("Caught exception trying to create default QueueBrowseStrategy. " - + "This could be due to spring 2.0.x on classpath? Cause: " + e, e); - } - if (answer == null) { - LOG.warn("Cannot browse queues as no QueueBrowseStrategy specified. Are you using Spring 2.0.x by any chance? If you upgrade to 2.5.x or later then queue browsing is supported"); - } - return answer; + return new DefaultQueueBrowseStrategy(); } } Modified: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/PersistentQueueReplyManager.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/PersistentQueueReplyManager.java?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/PersistentQueueReplyManager.java (original) +++ camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/PersistentQueueReplyManager.java Sat Feb 5 13:51:49 2011 @@ -206,9 +206,6 @@ public class PersistentQueueReplyManager } if (endpoint.getTaskExecutor() != null) { answer.setTaskExecutor(endpoint.getTaskExecutor()); - } else if (endpoint.getTaskExecutorSpring2() != null) { - // use reflection to invoke to support spring 2 when JAR is compiled with Spring 3.0 - IntrospectionSupport.setProperty(answer, "taskExecutor", endpoint.getTaskExecutorSpring2()); } return answer; Modified: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java (original) +++ camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java Sat Feb 5 13:51:49 2011 @@ -122,9 +122,6 @@ public class TemporaryQueueReplyManager } if (endpoint.getTaskExecutor() != null) { answer.setTaskExecutor(endpoint.getTaskExecutor()); - } else if (endpoint.getTaskExecutorSpring2() != null) { - // use reflection to invoke to support spring 2 when JAR is compiled with Spring 3.0 - IntrospectionSupport.setProperty(answer, "taskExecutor", endpoint.getTaskExecutorSpring2()); } return answer; Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsComponentTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsComponentTest.java?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsComponentTest.java (original) +++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsComponentTest.java Sat Feb 5 13:51:49 2011 @@ -45,7 +45,6 @@ public class JmsComponentTest extends Ca assertEquals(1, endpoint.getCacheLevel()); assertEquals("foo", endpoint.getClientId()); assertEquals(2, endpoint.getConcurrentConsumers()); - assertEquals(ConsumerType.Simple, endpoint.getConsumerType()); assertEquals(true, endpoint.isDeliveryPersistent()); assertEquals(true, endpoint.isExplicitQosEnabled()); assertEquals(20, endpoint.getIdleTaskExecutionLimit()); @@ -72,7 +71,6 @@ public class JmsComponentTest extends Ca comp.setCacheLevel(1); comp.setClientId("foo"); comp.setConcurrentConsumers(2); - comp.setConsumerType(ConsumerType.Simple); comp.setDeliveryPersistent(true); comp.setExplicitQosEnabled(true); comp.setIdleTaskExecutionLimit(20); Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsEndpointConfigurationTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsEndpointConfigurationTest.java?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsEndpointConfigurationTest.java (original) +++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsEndpointConfigurationTest.java Sat Feb 5 13:51:49 2011 @@ -169,7 +169,6 @@ public class JmsEndpointConfigurationTes public void testIdleTaskExecutionLimit() throws Exception { JmsEndpoint endpoint = (JmsEndpoint) resolveMandatoryEndpoint("jms:queue:Foo?idleTaskExecutionLimit=50"); assertEquals(50, endpoint.getIdleTaskExecutionLimit()); - assertEquals(ConsumerType.Default, endpoint.getConsumerType()); assertEquals(true, endpoint.isAutoStartup()); } @@ -196,7 +195,6 @@ public class JmsEndpointConfigurationTes assertEquals(null, endpoint.getClientId()); assertNotNull(endpoint.getConnectionFactory()); assertEquals(1, endpoint.getConcurrentConsumers()); - assertEquals(ConsumerType.Default, endpoint.getConsumerType()); assertNull(endpoint.getDestination()); assertEquals("Foo", endpoint.getDestinationName()); assertNull(endpoint.getDestinationResolver()); @@ -278,9 +276,6 @@ public class JmsEndpointConfigurationTes endpoint.setConcurrentConsumers(5); assertEquals(5, endpoint.getConcurrentConsumers()); - endpoint.setConsumerType(ConsumerType.Default); - assertEquals(ConsumerType.Default, endpoint.getConsumerType()); - endpoint.setDeliveryPersistent(true); assertEquals(true, endpoint.isDeliveryPersistent()); Modified: camel/trunk/components/camel-spring-ws/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-ws/pom.xml?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/components/camel-spring-ws/pom.xml (original) +++ camel/trunk/components/camel-spring-ws/pom.xml Sat Feb 5 13:51:49 2011 @@ -50,13 +50,6 @@ <groupId>org.springframework.ws</groupId> <artifactId>spring-ws-core</artifactId> <version>${spring-ws-version}</version> - <!-- spring-webmvc is only used by Spring 2.5 --> - <exclusions> - <exclusion> - <groupId>org.springframework</groupId> - <artifactId>spring-webmvc</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> <groupId>org.springframework.ws</groupId> @@ -117,18 +110,4 @@ </dependencies> - <profiles> - <profile> - <id>spring-2.x</id> - <dependencies> - <!-- need spring-webmvc when using Spring 2.x --> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-webmvc</artifactId> - <version>${spring-version}</version> - </dependency> - </dependencies> - </profile> - </profiles> - </project> Modified: camel/trunk/components/camel-spring/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/pom.xml?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/components/camel-spring/pom.xml (original) +++ camel/trunk/components/camel-spring/pom.xml Sat Feb 5 13:51:49 2011 @@ -44,7 +44,7 @@ org.osgi.framework;version="[1.3,2)", org.osgi.service.event;resolution:=optional, org.springframework.osgi.*;version="[1.2,2)", - org.springframework.*;version="[2.5,4)", + org.springframework.*;version="[3,4)", * </camel.osgi.import> <camel.osgi.export> @@ -526,7 +526,7 @@ <packages>org.apache.camel.spring.spi</packages> </group> <group> - <title>Spring 2.x Namespace Handling Code</title> + <title>Spring Namespace Handling Code</title> <packages>org.apache.camel.spring.handler</packages> </group> <group> Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java (original) +++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java Sat Feb 5 13:51:49 2011 @@ -365,7 +365,7 @@ public class CamelNamespaceHandler exten try { BeanDefinition definition = parserContext.getRegistry().getBeanDefinition(routeBuilderName); Method getDependsOn = definition.getClass().getMethod("getDependsOn", new Class[]{}); - String[] dependsOn = (String[])getDependsOn.invoke(definition, new Object[]{}); + String[] dependsOn = (String[])getDependsOn.invoke(definition); if (dependsOn == null || dependsOn.length == 0) { dependsOn = new String[]{contextId}; } else { Modified: camel/trunk/components/camel-web/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/pom.xml?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/components/camel-web/pom.xml (original) +++ camel/trunk/components/camel-web/pom.xml Sat Feb 5 13:51:49 2011 @@ -624,15 +624,15 @@ org.w3c.dom;resolution:=optional, org.xml.sax;resolution:=optional, org.xml.sax.helpers;resolution:=optional, - org.springframework.aop.support;version="[2.5.6, 4.0.0)", - org.springframework.context;version="[2.5.6, 4.0.0)", - org.springframework.util;version="[2.5.6, 4.0.0)", - org.springframework.beans.factory;version="[2.5.6, 4.0.0)", - org.springframework.beans.factory.config;version="[2.5.6, 4.0.0)", - org.springframework.beans.factory.xml;version="[2.5.6, 4.0.0)", - org.springframework.jmx.export.metadata;version="[2.5.6, 4.0.0)", - org.springframework.web.context;version="[2.5.6, 4.0.0)", - org.springframework.web.context.support;version="[2.5.6, 4.0.0)", + org.springframework.aop.support;version="[3, 4)", + org.springframework.context;version="[3, 4)", + org.springframework.util;version="[3, 4)", + org.springframework.beans.factory;version="[3, 4)", + org.springframework.beans.factory.config;version="[3, 4)", + org.springframework.beans.factory.xml;version="[3, 4)", + org.springframework.jmx.export.metadata;version="[3, 4)", + org.springframework.web.context;version="[3, 4)", + org.springframework.web.context.support;version="[3, 4)", org.springframework.osgi.web.context.support;version="[1.0, 2.0)" </osgi.import.pkg> <osgi.classpath> Modified: camel/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/parent/pom.xml (original) +++ camel/trunk/parent/pom.xml Sat Feb 5 13:51:49 2011 @@ -1614,21 +1614,6 @@ </build> </profile> <profile> - <id>spring-2.x</id> - <properties> - <spring-version>2.5.6</spring-version> - <!-- spring 2.5.x is only compatible with junit 4.4 or lower - see SPR-5145 --> - <junit-version>4.4</junit-version> - </properties> - </profile> - <profile> - <id>cxf-2.2.x</id> - <properties> - <!-- NOTE you can't compile camel-cxf with cxf 2.2.x since camel 2.6.0, but the compiled jar can be used with cxf 2.2.x --> - <cxf-version>2.2.11</cxf-version> - </properties> - </profile> - <profile> <id>on-sunjdk</id> <activation> <property> Modified: camel/trunk/platforms/karaf/features/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/platforms/karaf/features/pom.xml?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/platforms/karaf/features/pom.xml (original) +++ camel/trunk/platforms/karaf/features/pom.xml Sat Feb 5 13:51:49 2011 @@ -115,7 +115,6 @@ <servlet-api-2.5-version>1.1.2</servlet-api-2.5-version> <serp-bundle-version>1.13.1_2</serp-bundle-version> <smack-bundle-version>3.1.0_1</smack-bundle-version> - <spring-version>2.5.6.SEC01</spring-version> <spring3-version>3.0.5.RELEASE</spring3-version> <spring-osgi-version>1.2.0</spring-osgi-version> <spring-castor-bundle-version>1.2.0</spring-castor-bundle-version> @@ -211,11 +210,6 @@ <type>xml</type> <classifier>features</classifier> </artifact> - <artifact> - <file>target/classes/features-spring2.xml</file> - <type>xml</type> - <classifier>features-spring2</classifier> - </artifact> </artifacts> </configuration> </execution> @@ -224,44 +218,4 @@ </plugins> </build> - <profiles> - <profile> - <id>spring-2.x</id> - <properties> - <features.file>features-spring2.xml</features.file> - </properties> - </profile> - <profile> - <id>validate</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.karaf.tooling</groupId> - <artifactId>features-maven-plugin</artifactId> - <version>${features-maven-plugin-version}</version> - <configuration> - <file>${project.build.directory}/classes/${features.file}</file> - <karafConfig>${project.build.directory}/classes/config.properties</karafConfig> - </configuration> - <executions> - <execution> - <id>validate</id> - <phase>process-resources</phase> - <goals> - <goal>validate</goal> - </goals> - </execution> - </executions> - <dependencies> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-simple</artifactId> - <version>1.4.3</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - </profile> - </profiles> </project> Modified: camel/trunk/tests/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/tests/pom.xml?rev=1067441&r1=1067440&r2=1067441&view=diff ============================================================================== --- camel/trunk/tests/pom.xml (original) +++ camel/trunk/tests/pom.xml Sat Feb 5 13:51:49 2011 @@ -35,8 +35,6 @@ <module>test-bundles</module> <module>camel-itest-standalone</module> <module>camel-itest</module> - <module>camel-itest-spring-2.0</module> - <module>camel-itest-spring-2.5</module> <module>camel-partial-classpath-test</module> <module>camel-itest-osgi</module> </modules>