Removed ehcache jms replication test due ehcache upgrade no longer providing jms out of the box in main module.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8feaa4e7 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8feaa4e7 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8feaa4e7 Branch: refs/heads/master Commit: 8feaa4e78ae263e880c4009f2c123f59c0026d86 Parents: cb6ccac Author: Claus Ibsen <davscl...@apache.org> Authored: Wed Jul 10 11:48:59 2013 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Wed Jul 10 11:48:59 2013 +0200 ---------------------------------------------------------------------- .../cache/replication/CacheReplicationTest.java | 75 ------------- .../replication/TestingCacheManagerFactory.java | 84 --------------- .../replication/WrappedJMSCacheLoader.java | 106 ------------------- .../cache/replication/JMSReplicationCache1.xml | 75 ------------- .../cache/replication/JMSReplicationCache2.xml | 75 ------------- .../cache/replication/JMSReplicationCache3.xml | 75 ------------- .../replication/JMSReplicationCamelContext.xml | 100 ----------------- .../osgi/cache/replication/ehcache_jms_test.xml | 44 -------- 8 files changed, 634 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/8feaa4e7/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/CacheReplicationTest.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/CacheReplicationTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/CacheReplicationTest.java deleted file mode 100644 index a1bfaf3..0000000 --- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/CacheReplicationTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (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 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.itest.osgi.cache.replication; - -import org.apache.camel.itest.osgi.OSGiIntegrationSpringTestSupport; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; - -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.Configuration; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext; - -import static org.ops4j.pax.exam.CoreOptions.scanFeatures; -import static org.ops4j.pax.exam.OptionUtils.combine; - -@RunWith(JUnit4TestRunner.class) -@Ignore("Fix me") -public class CacheReplicationTest extends OSGiIntegrationSpringTestSupport { - - @Override - protected OsgiBundleXmlApplicationContext createApplicationContext() { - return new OsgiBundleXmlApplicationContext(new String[]{ - "org/apache/camel/itest/osgi/cache/replication/JMSReplicationCamelContext.xml"}); - } - - @Test - public void testCache() throws Exception { - getMockEndpoint("mock:result1").expectedBodiesReceived("Am I replicated?"); - getMockEndpoint("mock:result2").expectedBodiesReceived("Am I replicated?"); - - // do some routes to let everything be initialized - template.sendBody("direct:getRoute1", "Let initialize the route"); - template.sendBody("direct:getRoute2", "Let initialize the route"); - template.sendBody("direct:addRoute", "Am I replicated?"); - - // give some time to make replication - Thread.sleep(300); - - template.sendBody("direct:getRoute1", "Will I get replicated cache"); - template.sendBody("direct:getRoute2", "Will I get replicated cache"); - - assertMockEndpointsSatisfied(); - } - - @Configuration - public static Option[] configure() throws Exception { - Option[] options = combine( - // Default karaf environment - getDefaultCamelKarafOptions(), - // using the features to install the camel components - loadCamelFeatures("jetty", "camel-jms", "camel-cache"), - - // using the features to install AMQ - scanFeatures("mvn:org.apache.activemq/activemq-karaf/5.5.0/xml/features", - "activemq")); - - return options; - } -} http://git-wip-us.apache.org/repos/asf/camel/blob/8feaa4e7/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/TestingCacheManagerFactory.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/TestingCacheManagerFactory.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/TestingCacheManagerFactory.java deleted file mode 100644 index b010f56..0000000 --- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/TestingCacheManagerFactory.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (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 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.itest.osgi.cache.replication; - -import java.io.InputStream; - -import javax.jms.Queue; -import javax.jms.QueueConnection; -import javax.jms.Topic; -import javax.jms.TopicConnection; - -import net.sf.ehcache.CacheManager; -import net.sf.ehcache.distribution.jms.AcknowledgementMode; -import net.sf.ehcache.distribution.jms.JMSCacheManagerPeerProvider; - -import org.apache.camel.component.cache.CacheManagerFactory; - -public class TestingCacheManagerFactory extends CacheManagerFactory { - private String xmlName; - - //Only for testing purpose, normally not needed - private CacheManager cacheManager; - - private Topic replicationTopic; - - private Queue getQueue; - - private TopicConnection replicationTopicConnection; - - private QueueConnection getQueueConnection; - - public TestingCacheManagerFactory(String xmlName, - TopicConnection replicationTopicConnection, Topic replicationTopic, - QueueConnection getQueueConnection, Queue getQueue) { - this.xmlName = xmlName; - this.replicationTopicConnection = replicationTopicConnection; - this.replicationTopic = replicationTopic; - this.getQueue = getQueue; - this.getQueueConnection = getQueueConnection; - } - - @Override - protected synchronized CacheManager createCacheManagerInstance() { - //Singleton- only for testing purpose, normally not needed - if (cacheManager == null) { - cacheManager = new WrappedCacheManager(getClass().getResourceAsStream(xmlName)); - } - - return cacheManager; - } - - public CacheManager getCacheManager() { - return cacheManager; - } - - public class WrappedCacheManager extends CacheManager { - public WrappedCacheManager(InputStream xmlConfig) { - super(xmlConfig); - JMSCacheManagerPeerProvider jmsCMPP = new JMSCacheManagerPeerProvider(this, - replicationTopicConnection, - replicationTopic, - getQueueConnection, - getQueue, - AcknowledgementMode.AUTO_ACKNOWLEDGE, - true); - cacheManagerPeerProviders.put(jmsCMPP.getScheme(), jmsCMPP); - jmsCMPP.init(); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/8feaa4e7/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/WrappedJMSCacheLoader.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/WrappedJMSCacheLoader.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/WrappedJMSCacheLoader.java deleted file mode 100644 index ebef96b..0000000 --- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/WrappedJMSCacheLoader.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (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 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.itest.osgi.cache.replication; - -import java.util.Collection; -import java.util.Map; - -import javax.jms.Queue; -import javax.jms.QueueConnection; - -import net.sf.ehcache.CacheException; -import net.sf.ehcache.Ehcache; -import net.sf.ehcache.Status; -import net.sf.ehcache.distribution.jms.AcknowledgementMode; -import net.sf.ehcache.distribution.jms.JMSCacheLoader; -import net.sf.ehcache.loader.CacheLoader; - -import org.apache.camel.component.cache.CacheLoaderWrapper; - -public class WrappedJMSCacheLoader implements CacheLoaderWrapper { - - private JMSCacheLoader jmsCacheLoader; - private String defaultLoaderArgument = ""; - private QueueConnection getQueueConnection; - private Queue getQueue; - private AcknowledgementMode acknowledgementMode; - private int timeoutMillis; - - public WrappedJMSCacheLoader(QueueConnection getQueueConnection, - Queue getQueue, AcknowledgementMode acknowledgementMode, - int timeoutMillis) { - this.getQueueConnection = getQueueConnection; - this.getQueue = getQueue; - this.acknowledgementMode = acknowledgementMode; - this.timeoutMillis = timeoutMillis; - } - - @Override - public CacheLoader clone(Ehcache arg0) throws CloneNotSupportedException { - return jmsCacheLoader.clone(arg0); - } - - @Override - public void dispose() throws CacheException { - jmsCacheLoader.dispose(); - } - - @Override - public String getName() { - return jmsCacheLoader.getName(); - } - - @Override - public Status getStatus() { - return jmsCacheLoader.getStatus(); - } - - @Override - public void init() { - jmsCacheLoader.init(); - } - - @Override - public Object load(Object arg0) throws CacheException { - return jmsCacheLoader.load(arg0); - } - - @Override - public Object load(Object arg0, Object arg1) { - return jmsCacheLoader.load(arg0, arg1); - } - - @SuppressWarnings("rawtypes") - @Override - public Map loadAll(Collection arg0) { - return jmsCacheLoader.loadAll(arg0); - } - - @SuppressWarnings("rawtypes") - @Override - public Map loadAll(Collection arg0, Object arg1) { - return jmsCacheLoader.loadAll(arg0, arg1); - } - - @Override - public void init(Ehcache cache) { - jmsCacheLoader = new JMSCacheLoader(cache, defaultLoaderArgument, - getQueueConnection, getQueue, acknowledgementMode, - timeoutMillis); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/8feaa4e7/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCache1.xml ---------------------------------------------------------------------- diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCache1.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCache1.xml deleted file mode 100644 index de1bfd8..0000000 --- a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCache1.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. - The ASF licenses this file to You under the Apache License, Version 2.0 - (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 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:camel="http://camel.apache.org/schema/spring" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - <bean id="queueConnection1" factory-bean="amqCF" factory-method="createQueueConnection" class="javax.jms.QueueConnection" /> - <bean id="topicConnection1" factory-bean="amqCF" factory-method="createTopicConnection" class="javax.jms.TopicConnection" /> - <bean id="queue1" class="org.apache.activemq.command.ActiveMQQueue"> - <constructor-arg ref="getQueue" /> - </bean> - <bean id="topic1" class="org.apache.activemq.command.ActiveMQTopic"> - <constructor-arg ref="getTopic" /> - </bean> - - <bean id="jmsListener1" class="net.sf.ehcache.distribution.jms.JMSCacheReplicator"> - <constructor-arg index="0" value="true" /> - <constructor-arg index="1" value="true" /> - <constructor-arg index="2" value="true" /> - <constructor-arg index="3" value="true" /> - <constructor-arg index="4" value="false" /> - <constructor-arg index="5" value="0" /> - </bean> - - <bean id="jmsLoader1" class="org.apache.camel.itest.osgi.cache.replication.WrappedJMSCacheLoader"> - <constructor-arg index="0" ref="queueConnection1" /> - <constructor-arg index="1" ref="queue1" /> - <constructor-arg index="2" value="AUTO_ACKNOWLEDGE" /> - <constructor-arg index="3" value="30000" /> - </bean> - - <bean id="cacheManagerFactory1" class="org.apache.camel.itest.osgi.cache.replication.TestingCacheManagerFactory"> - <constructor-arg index="0" value="ehcache_jms_test.xml" /> - <constructor-arg index="1" ref="topicConnection1" /> - <constructor-arg index="2" ref="topic1" /> - <constructor-arg index="3" ref="queueConnection1" /> - <constructor-arg index="4" ref="queue1" /> - </bean> - - <bean id="eventListenerRegistry1" class="org.apache.camel.component.cache.CacheEventListenerRegistry"> - <constructor-arg> - <list> - <ref bean="jmsListener1" /> - </list> - </constructor-arg> - </bean> - - <bean id="cacheLoaderRegistry1" class="org.apache.camel.component.cache.CacheLoaderRegistry"> - <constructor-arg> - <list> - <ref bean="jmsLoader1"/> - </list> - </constructor-arg> - </bean> - -</beans> http://git-wip-us.apache.org/repos/asf/camel/blob/8feaa4e7/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCache2.xml ---------------------------------------------------------------------- diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCache2.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCache2.xml deleted file mode 100644 index 3a7bbd1..0000000 --- a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCache2.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. - The ASF licenses this file to You under the Apache License, Version 2.0 - (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 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:camel="http://camel.apache.org/schema/spring" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - <bean id="queueConnection2" factory-bean="amqCF" factory-method="createQueueConnection" class="javax.jms.QueueConnection" /> - <bean id="topicConnection2" factory-bean="amqCF" factory-method="createTopicConnection" class="javax.jms.TopicConnection" /> - <bean id="queue2" class="org.apache.activemq.command.ActiveMQQueue"> - <constructor-arg ref="getQueue" /> - </bean> - <bean id="topic2" class="org.apache.activemq.command.ActiveMQTopic"> - <constructor-arg ref="getTopic" /> - </bean> - - <bean id="jmsListener2" class="net.sf.ehcache.distribution.jms.JMSCacheReplicator"> - <constructor-arg index="0" value="true" /> - <constructor-arg index="1" value="true" /> - <constructor-arg index="2" value="true" /> - <constructor-arg index="3" value="true" /> - <constructor-arg index="4" value="false" /> - <constructor-arg index="5" value="0" /> - </bean> - - <bean id="jmsLoader2" class="org.apache.camel.itest.osgi.cache.replication.WrappedJMSCacheLoader"> - <constructor-arg index="0" ref="queueConnection2" /> - <constructor-arg index="1" ref="queue2" /> - <constructor-arg index="2" value="AUTO_ACKNOWLEDGE" /> - <constructor-arg index="3" value="30000" /> - </bean> - - <bean id="cacheManagerFactory2" class="org.apache.camel.itest.osgi.cache.replication.TestingCacheManagerFactory"> - <constructor-arg index="0" value="ehcache_jms_test.xml" /> - <constructor-arg index="1" ref="topicConnection2" /> - <constructor-arg index="2" ref="topic2" /> - <constructor-arg index="3" ref="queueConnection2" /> - <constructor-arg index="4" ref="queue2" /> - </bean> - - <bean id="eventListenerRegistry2" class="org.apache.camel.component.cache.CacheEventListenerRegistry"> - <constructor-arg> - <list> - <ref bean="jmsListener2" /> - </list> - </constructor-arg> - </bean> - - <bean id="cacheLoaderRegistry2" class="org.apache.camel.component.cache.CacheLoaderRegistry"> - <constructor-arg> - <list> - <ref bean="jmsLoader2"/> - </list> - </constructor-arg> - </bean> - -</beans> http://git-wip-us.apache.org/repos/asf/camel/blob/8feaa4e7/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCache3.xml ---------------------------------------------------------------------- diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCache3.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCache3.xml deleted file mode 100644 index 78a7318..0000000 --- a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCache3.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. - The ASF licenses this file to You under the Apache License, Version 2.0 - (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 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:camel="http://camel.apache.org/schema/spring" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - <bean id="queueConnection3" factory-bean="amqCF" factory-method="createQueueConnection" class="javax.jms.QueueConnection" /> - <bean id="topicConnection3" factory-bean="amqCF" factory-method="createTopicConnection" class="javax.jms.TopicConnection" /> - <bean id="queue3" class="org.apache.activemq.command.ActiveMQQueue"> - <constructor-arg ref="getQueue" /> - </bean> - <bean id="topic3" class="org.apache.activemq.command.ActiveMQTopic"> - <constructor-arg ref="getTopic" /> - </bean> - - <bean id="jmsListener3" class="net.sf.ehcache.distribution.jms.JMSCacheReplicator"> - <constructor-arg index="0" value="true" /> - <constructor-arg index="1" value="true" /> - <constructor-arg index="2" value="true" /> - <constructor-arg index="3" value="true" /> - <constructor-arg index="4" value="false" /> - <constructor-arg index="5" value="0" /> - </bean> - - <bean id="jmsLoader3" class="org.apache.camel.itest.osgi.cache.replication.WrappedJMSCacheLoader"> - <constructor-arg index="0" ref="queueConnection3" /> - <constructor-arg index="1" ref="queue3" /> - <constructor-arg index="2" value="AUTO_ACKNOWLEDGE" /> - <constructor-arg index="3" value="30000" /> - </bean> - - <bean id="cacheManagerFactory3" class="org.apache.camel.itest.osgi.cache.replication.TestingCacheManagerFactory"> - <constructor-arg index="0" value="ehcache_jms_test.xml" /> - <constructor-arg index="1" ref="topicConnection3" /> - <constructor-arg index="2" ref="topic3" /> - <constructor-arg index="3" ref="queueConnection3" /> - <constructor-arg index="4" ref="queue3" /> - </bean> - - <bean id="eventListenerRegistry3" class="org.apache.camel.component.cache.CacheEventListenerRegistry"> - <constructor-arg> - <list> - <ref bean="jmsListener3" /> - </list> - </constructor-arg> - </bean> - - <bean id="cacheLoaderRegistry3" class="org.apache.camel.component.cache.CacheLoaderRegistry"> - <constructor-arg> - <list> - <ref bean="jmsLoader3"/> - </list> - </constructor-arg> - </bean> - -</beans> http://git-wip-us.apache.org/repos/asf/camel/blob/8feaa4e7/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCamelContext.xml ---------------------------------------------------------------------- diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCamelContext.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCamelContext.xml deleted file mode 100644 index 06f7244..0000000 --- a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/JMSReplicationCamelContext.xml +++ /dev/null @@ -1,100 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. - The ASF licenses this file to You under the Apache License, Version 2.0 - (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 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:camel="http://camel.apache.org/schema/spring" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - <bean id="getQueue" class="java.lang.String"> - <constructor-arg value="replicationGetQueue" /> - </bean> - - <bean id="getTopic" class="java.lang.String"> - <constructor-arg value="replicationTopic" /> - </bean> - - <import resource="JMSReplicationCache1.xml"/> - <import resource="JMSReplicationCache2.xml"/> - <import resource="JMSReplicationCache3.xml"/> - - <camelContext xmlns="http://camel.apache.org/schema/spring"> - <camel:endpoint id="fooCache1" uri="cache:foo?cacheManagerFactory=#cacheManagerFactory1&eventListenerRegistry=#eventListenerRegistry1&cacheLoaderRegistry=#cacheLoaderRegistry1"/> - <camel:endpoint id="fooCache2" uri="cache:foo?cacheManagerFactory=#cacheManagerFactory2&eventListenerRegistry=#eventListenerRegistry2&cacheLoaderRegistry=#cacheLoaderRegistry2"/> - <camel:endpoint id="fooCache3" uri="cache:foo?cacheManagerFactory=#cacheManagerFactory3&eventListenerRegistry=#eventListenerRegistry3&cacheLoaderRegistry=#cacheLoaderRegistry3"/> - - <camel:route> - <camel:from uri="direct:addRoute"/> - <camel:setHeader headerName="CamelCacheOperation"> - <camel:constant>CamelCacheAdd</camel:constant> - </camel:setHeader> - <camel:setHeader headerName="CamelCacheKey"> - <camel:constant>foo</camel:constant> - </camel:setHeader> - <camel:to ref="fooCache1"/> - </camel:route> - - <camel:route> - <camel:from uri="direct:getRoute1"/> - <camel:setHeader headerName="CamelCacheOperation"> - <camel:constant>CamelCacheGet</camel:constant> - </camel:setHeader> - <camel:setHeader headerName="CamelCacheKey"> - <camel:constant>foo</camel:constant> - </camel:setHeader> - <camel:to ref="fooCache2"/> - <camel:choice> - <camel:when> - <camel:simple>${in.header.CamelCacheElementWasFound} != null</camel:simple> - <camel:to uri="mock:result1" /> - </camel:when> - </camel:choice> - </camel:route> - - <camel:route> - <camel:from uri="direct:getRoute2"/> - <camel:setHeader headerName="CamelCacheOperation"> - <camel:constant>CamelCacheGet</camel:constant> - </camel:setHeader> - <camel:setHeader headerName="CamelCacheKey"> - <camel:constant>foo</camel:constant> - </camel:setHeader> - <camel:to ref="fooCache3"/> - <camel:choice> - <camel:when> - <camel:simple>${in.header.CamelCacheElementWasFound} != null</camel:simple> - <camel:to uri="mock:result2" /> - </camel:when> - </camel:choice> - </camel:route> - - </camelContext> - - <bean id="amqCF" class="org.apache.activemq.ActiveMQConnectionFactory"> - <property name="brokerURL" value="vm://localhost?broker.persistent=false"/> - </bean> - - <bean id="activemq" class="org.apache.camel.component.jms.JmsComponent"> - <property name="connectionFactory"> - <ref bean="amqCF"/> - </property> - </bean> - -</beans> http://git-wip-us.apache.org/repos/asf/camel/blob/8feaa4e7/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/ehcache_jms_test.xml ---------------------------------------------------------------------- diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/ehcache_jms_test.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/ehcache_jms_test.xml deleted file mode 100644 index a1543bd..0000000 --- a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cache/replication/ehcache_jms_test.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. - The ASF licenses this file to You under the Apache License, Version 2.0 - (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 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="ehcache.xsd" > - - <diskStore path="java.io.tmpdir"/> - - <cacheManagerEventListenerFactory class="" properties=""/> - - <!-- - Mandatory Default Cache configuration. These settings will be applied to caches - created programmtically using CacheManager.add(String cacheName). - - The defaultCache has an implicit name "default" which is a reserved cache name. - --> - <defaultCache - maxElementsInMemory="10000" - eternal="false" - timeToIdleSeconds="120" - timeToLiveSeconds="120" - overflowToDisk="true" - diskSpoolBufferSizeMB="30" - maxElementsOnDisk="10000000" - diskPersistent="false" - diskExpiryThreadIntervalSeconds="120" - memoryStoreEvictionPolicy="LRU" - /> - -</ehcache>