You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2007/06/29 13:09:44 UTC
svn commit: r551851 - in /activemq/camel/trunk/components/camel-jbi/src:
main/java/org/apache/camel/component/jbi/
test/java/org/apache/camel/component/jbi/ test/resources/
test/resources/org/apache/camel/component/jbi/su2-src/
test/resources/org/apach...
Author: jstrachan
Date: Fri Jun 29 04:09:41 2007
New Revision: 551851
URL: http://svn.apache.org/viewvc?view=rev&rev=551851
Log:
added better integration tests creating JBI endpoints within the camel routing and testing that they work when deployed within a JBI ServiceUnit; including being deployed and undeployed a few times etc
Added:
activemq/camel/trunk/components/camel-jbi/src/test/java/org/apache/camel/component/jbi/CamelJbiEndpointIntegrationTest.java (with props)
activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su2-src/
activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su2-src/camel-context.xml (contents, props changed)
- copied, changed from r551231, activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su1-src/camel-context.xml
activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su3-src/
activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su3-src/camel-context.xml (with props)
Modified:
activemq/camel/trunk/components/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelJbiComponent.java
activemq/camel/trunk/components/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelSpringDeployer.java
activemq/camel/trunk/components/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiEndpoint.java
activemq/camel/trunk/components/camel-jbi/src/test/java/org/apache/camel/component/jbi/IntegrationTest.java
activemq/camel/trunk/components/camel-jbi/src/test/resources/log4j.properties
Modified: activemq/camel/trunk/components/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelJbiComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelJbiComponent.java?view=diff&rev=551851&r1=551850&r2=551851
==============================================================================
--- activemq/camel/trunk/components/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelJbiComponent.java (original)
+++ activemq/camel/trunk/components/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelJbiComponent.java Fri Jun 29 04:09:41 2007
@@ -21,6 +21,7 @@
import org.apache.servicemix.common.BaseServiceUnitManager;
import org.apache.servicemix.common.DefaultComponent;
import org.apache.servicemix.common.Deployer;
+import org.apache.servicemix.id.IdGenerator;
import org.apache.servicemix.jbi.resolver.URIResolver;
import org.apache.servicemix.jbi.util.IntrospectionSupport;
import org.apache.servicemix.jbi.util.URISupport;
@@ -44,10 +45,12 @@
private JbiBinding binding;
private CamelContext camelContext;
private ScheduledExecutorService executorService;
+ private IdGenerator idGenerator;
+ protected CamelSpringDeployer deployer;
/* (non-Javadoc)
- * @see org.servicemix.common.BaseComponent#createServiceUnitManager()
- */
+ * @see org.servicemix.common.BaseComponent#createServiceUnitManager()
+ */
public BaseServiceUnitManager createServiceUnitManager() {
Deployer[] deployers = new Deployer[]{new CamelSpringDeployer(this)};
return new BaseServiceUnitManager(this, deployers);
@@ -59,12 +62,7 @@
*/
@Override
protected List<CamelJbiEndpoint> getConfiguredEndpoints() {
- // TODO need to register to the context for new endpoints...
List<CamelJbiEndpoint> answer = new ArrayList<CamelJbiEndpoint>();
-// Collection<Endpoint> endpoints = camelContext.getEndpoints();
-// for (Endpoint endpoint : endpoints) {
-// answer.add(createJbiEndpoint(endpoint));
-// }
return answer;
}
@@ -126,7 +124,6 @@
public Endpoint<Exchange> createEndpoint(String uri) {
if (uri.startsWith("jbi:")) {
uri = uri.substring("jbi:".length());
-
return new JbiEndpoint(this, uri);
}
return null;
@@ -148,31 +145,68 @@
}
/**
- * Returns a JBI endpoint created for the given Camel endpoint
+ * Activating a JBI endpoint created by a camel consumer.
+ *
+ * @returns a JBI endpoint created for the given Camel endpoint
*/
public CamelJbiEndpoint activateJbiEndpoint(Endpoint camelEndpoint, Processor processor) throws Exception {
CamelJbiEndpoint jbiEndpoint = createJbiEndpointFromCamel(camelEndpoint, processor);
// the following method will activate the new dynamic JBI endpoint
- addEndpoint(jbiEndpoint);
+ if (deployer != null) {
+ // lets add this to the current service unit being deployed
+ deployer.addService(jbiEndpoint);
+ }
+ else {
+ addEndpoint(jbiEndpoint);
+ }
return jbiEndpoint;
}
+ public void deactivateJbiEndpoint(CamelJbiEndpoint jbiEndpoint) throws Exception {
+ // this will be done by the ServiceUnit
+ //jbiEndpoint.deactivate();
+ }
+
protected CamelJbiEndpoint createJbiEndpointFromCamel(Endpoint camelEndpoint, Processor processor) {
CamelJbiEndpoint jbiEndpoint;
String endpointUri = camelEndpoint.getEndpointUri();
- if (endpointUri.startsWith("endpoint:")) {
- // lets decode "service:serviceNamespace:serviceName:endpointName
- String uri = endpointUri.substring("endpoint:".length());
- String[] parts = new String[0];
- try {
- parts = URIResolver.split3(uri);
+ if (camelEndpoint instanceof JbiEndpoint) {
+ QName service = null;
+ String endpoint = null;
+ if (endpointUri.startsWith("name:")) {
+ endpoint = endpointUri.substring("endpoint:".length());
+ service = CamelJbiEndpoint.SERVICE_NAME;
+ }
+ else if (endpointUri.startsWith("endpoint:")) {
+ String uri = endpointUri.substring("endpoint:".length());
+ // lets decode "serviceNamespace sep serviceName sep endpointName
+ String[] parts;
+ try {
+ parts = URIResolver.split3(uri);
+ }
+ catch (IllegalArgumentException e) {
+ throw new IllegalArgumentException("Expected syntax jbi:endpoint:[serviceNamespace][sep][serviceName][sep][endpointName] where sep = '/' or ':' depending on the serviceNamespace, but was given: " + endpointUri + ". Cause: " + e, e);
+ }
+ service = new QName(parts[0], parts[1]);
+ endpoint = parts[2];
}
- catch (IllegalArgumentException e) {
- throw new IllegalArgumentException("Expected syntax endpoint:[serviceNamespace]:[serviceName]:[endpointName] but was given: " + endpointUri + ". Cause: " + e, e);
+ else if (endpointUri.startsWith("service:")) {
+ String uri = endpointUri.substring("service:".length());
+ // lets decode "serviceNamespace sep serviceName
+ String[] parts;
+ try {
+ parts = URIResolver.split2(uri);
+ }
+ catch (IllegalArgumentException e) {
+ throw new IllegalArgumentException("Expected syntax jbi:endpoint:[serviceNamespace][sep][serviceName] where sep = '/' or ':' depending on the serviceNamespace, but was given: " + endpointUri + ". Cause: " + e, e);
+ }
+ service = new QName(parts[0], parts[1]);
+ endpoint = createEndpointName();
+ }
+ else {
+ throw new IllegalArgumentException("Expected syntax jbi:endpoint:[serviceNamespace][sep][serviceName][sep][endpointName] or jbi:service:[serviceNamespace][sep][serviceName or jbi:name:[endpointName] but was given: " + endpointUri);
}
- QName service = new QName(parts[0], parts[1]);
- String endpoint = parts[2];
jbiEndpoint = new CamelJbiEndpoint(getServiceUnit(), service, endpoint, camelEndpoint, getBinding(), processor);
}
else {
@@ -181,6 +215,13 @@
return jbiEndpoint;
}
+ protected String createEndpointName() {
+ if (idGenerator == null) {
+ idGenerator = new IdGenerator("camel");
+ }
+ return idGenerator.generateSanitizedId();
+ }
+
/**
* Returns a JBI endpoint created for the given Camel endpoint
*/
@@ -202,14 +243,14 @@
/**
* Should we expose the Camel JBI onto the NMR.
- *
+ * <p/>
* We may wish to add some policy stuff etc.
*
* @param endpoint the camel endpoint
* @return true if the endpoint should be exposed in the NMR
*/
public boolean isEndpointExposedOnNmr(Endpoint endpoint) {
- // by default lets not expose JBI endpoints since we already auto-expose them
+ // TODO we should only expose consuming endpoints
return !(endpoint instanceof JbiEndpoint);
}
}
Modified: activemq/camel/trunk/components/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelSpringDeployer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelSpringDeployer.java?view=diff&rev=551851&r1=551850&r2=551851
==============================================================================
--- activemq/camel/trunk/components/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelSpringDeployer.java (original)
+++ activemq/camel/trunk/components/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelSpringDeployer.java Fri Jun 29 04:09:41 2007
@@ -20,11 +20,16 @@
import org.apache.camel.Endpoint;
import org.apache.camel.spring.SpringCamelContext;
import org.apache.servicemix.common.xbean.AbstractXBeanDeployer;
+import org.apache.servicemix.common.ServiceUnit;
import org.apache.xbean.kernel.Kernel;
import org.apache.xbean.server.spring.loader.PureSpringLoader;
import org.apache.xbean.server.spring.loader.SpringLoader;
import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.context.support.FileSystemXmlApplicationContext;
+import org.springframework.context.support.GenericApplicationContext;
+import javax.jbi.management.DeploymentException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -35,8 +40,14 @@
* @version $Revision: 1.1 $
*/
public class CamelSpringDeployer extends AbstractXBeanDeployer {
- private PureSpringLoader springLoader = new PureSpringLoader();
private final CamelJbiComponent component;
+ private PureSpringLoader springLoader = new PureSpringLoader() {
+ @Override
+ protected AbstractXmlApplicationContext createXmlApplicationContext(String configLocation) {
+ return new FileSystemXmlApplicationContext(new String[]{configLocation}, false, createParentApplicationContext());
+ }
+ };
+ private List<CamelJbiEndpoint> activatedEndpoints = new ArrayList<CamelJbiEndpoint>();
public CamelSpringDeployer(CamelJbiComponent component) {
super(component);
@@ -47,10 +58,26 @@
return "camel-context";
}
+ /* (non-Javadoc)
+ * @see org.apache.servicemix.common.Deployer#deploy(java.lang.String, java.lang.String)
+ */
+ @Override
+ public ServiceUnit deploy(String serviceUnitName, String serviceUnitRootPath) throws DeploymentException {
+ // lets register the deployer so that any endpoints activated are added to this SU
+ component.deployer = this;
+ ServiceUnit serviceUnit = super.deploy(serviceUnitName, serviceUnitRootPath);
+ return serviceUnit;
+ }
+
+ public void addService(CamelJbiEndpoint endpoint) {
+ activatedEndpoints.add(endpoint);
+ }
+
protected List getServices(Kernel kernel) {
try {
- List services = new ArrayList();
-
+ List<CamelJbiEndpoint> services = new ArrayList<CamelJbiEndpoint>(activatedEndpoints);
+ activatedEndpoints.clear();
+
ApplicationContext applicationContext = springLoader.getApplicationContext();
SpringCamelContext camelContext = SpringCamelContext.springCamelContext(applicationContext);
@@ -72,4 +99,18 @@
protected SpringLoader createSpringLoader() {
return springLoader;
}
+
+ /**
+ * Returns the parent application context which can be used to auto-wire any JBI based components
+ * using the jbi prefix
+ */
+ protected ApplicationContext createParentApplicationContext() {
+ GenericApplicationContext answer = new GenericApplicationContext();
+ answer.getBeanFactory().registerSingleton("jbi", component);
+ answer.start();
+ answer.refresh();
+ return answer;
+ }
+
+
}
Modified: activemq/camel/trunk/components/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiEndpoint.java?view=diff&rev=551851&r1=551850&r2=551851
==============================================================================
--- activemq/camel/trunk/components/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiEndpoint.java Fri Jun 29 04:09:41 2007
@@ -43,10 +43,10 @@
public Producer<Exchange> createProducer() throws Exception {
return new DefaultProducer<Exchange>(this) {
- public void process(Exchange exchange) throws Exception {
- toJbiProcessor.process(exchange);
- }
- };
+ public void process(Exchange exchange) throws Exception {
+ toJbiProcessor.process(exchange);
+ }
+ };
}
public Consumer<Exchange> createConsumer(final Processor processor) throws Exception {
@@ -61,11 +61,9 @@
@Override
protected void doStop() throws Exception {
-/*
if (jbiEndpoint != null) {
- jbiEndpoint.deactivate();
+ jbiComponent.deactivateJbiEndpoint(jbiEndpoint);
}
-*/
super.doStop();
}
};
@@ -79,9 +77,8 @@
public JbiBinding getBinding() {
return jbiComponent.getBinding();
}
-
- public boolean isSingleton() {
- return true;
- }
+ public boolean isSingleton() {
+ return true;
+ }
}
Added: activemq/camel/trunk/components/camel-jbi/src/test/java/org/apache/camel/component/jbi/CamelJbiEndpointIntegrationTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jbi/src/test/java/org/apache/camel/component/jbi/CamelJbiEndpointIntegrationTest.java?view=auto&rev=551851
==============================================================================
--- activemq/camel/trunk/components/camel-jbi/src/test/java/org/apache/camel/component/jbi/CamelJbiEndpointIntegrationTest.java (added)
+++ activemq/camel/trunk/components/camel-jbi/src/test/java/org/apache/camel/component/jbi/CamelJbiEndpointIntegrationTest.java Fri Jun 29 04:09:41 2007
@@ -0,0 +1,42 @@
+/**
+ *
+ * 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.component.jbi;
+
+import org.apache.servicemix.client.ServiceMixClient;
+
+import javax.jbi.messaging.MessageExchange;
+import javax.xml.namespace.QName;
+
+/**
+ * @version $Revision: 1.1 $
+ */
+public class CamelJbiEndpointIntegrationTest extends IntegrationTest {
+ /*
+ * @see TestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception {
+ suName = "su2";
+ super.setUp();
+ }
+
+ protected void configureExchange(ServiceMixClient client, MessageExchange exchange) {
+ QName serviceQName = new QName("http://foo.bar.org", "myService");
+ exchange.setService(serviceQName);
+ }
+}
Propchange: activemq/camel/trunk/components/camel-jbi/src/test/java/org/apache/camel/component/jbi/CamelJbiEndpointIntegrationTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: activemq/camel/trunk/components/camel-jbi/src/test/java/org/apache/camel/component/jbi/IntegrationTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jbi/src/test/java/org/apache/camel/component/jbi/IntegrationTest.java?view=diff&rev=551851&r1=551850&r2=551851
==============================================================================
--- activemq/camel/trunk/components/camel-jbi/src/test/java/org/apache/camel/component/jbi/IntegrationTest.java (original)
+++ activemq/camel/trunk/components/camel-jbi/src/test/java/org/apache/camel/component/jbi/IntegrationTest.java Fri Jun 29 04:09:41 2007
@@ -18,26 +18,76 @@
package org.apache.camel.component.jbi;
import junit.framework.TestCase;
-import org.apache.servicemix.jbi.container.JBIContainer;
-import org.apache.servicemix.client.ServiceMixClient;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.servicemix.client.DefaultServiceMixClient;
+import org.apache.servicemix.client.ServiceMixClient;
+import org.apache.servicemix.jbi.container.JBIContainer;
import javax.jbi.messaging.InOut;
+import javax.jbi.messaging.MessageExchange;
import javax.jbi.messaging.MessagingException;
import javax.jbi.servicedesc.ServiceEndpoint;
-import javax.xml.namespace.QName;
import java.io.File;
-import java.net.URL;
import java.net.URI;
+import java.net.URL;
/**
* @version $Revision: 1.1 $
*/
public class IntegrationTest extends TestCase {
+ private static final transient Log log = LogFactory.getLog(IntegrationTest.class);
+ protected String suName = "su1";
protected JBIContainer container = new JBIContainer();
-
private File tempRootDir;
+ public void testComponentInstallation() throws Exception {
+ String serviceUnitConfiguration = suName + "-src/camel-context.xml";
+
+ CamelJbiComponent component = new CamelJbiComponent();
+ container.activateComponent(component, "#ServiceMixComponent#");
+ URL url = getClass().getResource(serviceUnitConfiguration);
+ File path = new File(new URI(url.toString()));
+ path = path.getParentFile();
+ ServiceMixClient client = new DefaultServiceMixClient(container);
+
+ try {
+ for (int i = 0; i < 2; i++) {
+ log.info("Loop counter: " + i);
+
+ // Deploy and start su
+ component.getServiceUnitManager().deploy(suName, path.getAbsolutePath());
+ component.getServiceUnitManager().init(suName, path.getAbsolutePath());
+ component.getServiceUnitManager().start(suName);
+
+ // Send message
+ MessageExchange exchange = createExchange(client);
+ configureExchange(client, exchange);
+ client.send(exchange);
+
+ // Stop and undeploy
+ component.getServiceUnitManager().stop(suName);
+ component.getServiceUnitManager().shutDown(suName);
+ component.getServiceUnitManager().undeploy(suName, path.getAbsolutePath());
+
+ // Send message
+ exchange = createExchange(client);
+ try {
+ configureExchange(client, exchange);
+ client.send(exchange);
+ fail("Should have failed to send to a no longer deployed component");
+ }
+ catch (Throwable e) {
+ log.debug("Caught expected exception as the component is undeployed: " + e, e);
+ }
+ }
+ }
+ catch (Exception e) {
+ log.error("Caught: " + e, e);
+ throw e;
+ }
+ }
+
/*
* @see TestCase#setUp()
*/
@@ -62,57 +112,25 @@
container.start();
}
- public void testComponentInstallation() throws Exception {
- CamelJbiComponent component = new CamelJbiComponent();
- container.activateComponent(component, "#ServiceMixComponent#");
- URL url = getClass().getResource("su1-src/camel-context.xml");
- File path = new File(new URI(url.toString()));
- path = path.getParentFile();
- ServiceMixClient client = new DefaultServiceMixClient(container);
-
- for (int i = 0; i < 2; i++) {
- // Deploy and start su
- component.getServiceUnitManager().deploy("su1", path.getAbsolutePath());
- component.getServiceUnitManager().init("su1", path.getAbsolutePath());
- component.getServiceUnitManager().start("su1");
-
- // Send message
- InOut inout = client.createInOutExchange();
- ServiceEndpoint endpoint = client.getContext().getEndpoint(CamelJbiEndpoint.SERVICE_NAME, "queue:a");
-
- //QName serviceQName = new QName("http://servicemix.apache.org/demo/", "chained");
- //QName serviceQName = new QName("queue:a", "endpoint");
- //inout.setService(serviceQName);
- inout.setEndpoint(endpoint);
- client.send(inout);
-
- // Stop and undeploy
- component.getServiceUnitManager().stop("su1");
- component.getServiceUnitManager().shutDown("su1");
- component.getServiceUnitManager().undeploy("su1", path.getAbsolutePath());
-
- // Send message
- inout = client.createInOutExchange();
- //inout.setService(serviceQName);
- inout.setEndpoint(endpoint);
- try {
- client.send(inout);
- } catch (MessagingException e) {
- // Ok, the lw component is undeployed
- }
-
- }
- }
-
/*
- * @see TestCase#tearDown()
- */
-
+ * @see TestCase#tearDown()
+ */
protected void tearDown() throws Exception {
super.tearDown();
container.stop();
container.shutDown();
deleteDir(tempRootDir);
+ }
+
+ protected InOut createExchange(ServiceMixClient client) throws MessagingException {
+ InOut exchange = client.createInOutExchange();
+ return exchange;
+ }
+
+ protected void configureExchange(ServiceMixClient client, MessageExchange exchange) {
+ ServiceEndpoint endpoint = client.getContext().getEndpoint(CamelJbiEndpoint.SERVICE_NAME, "queue:a");
+ assertNotNull("Should have a Camel endpoint exposed in JBI!", endpoint);
+ exchange.setEndpoint(endpoint);
}
public static boolean deleteDir(File dir) {
Modified: activemq/camel/trunk/components/camel-jbi/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jbi/src/test/resources/log4j.properties?view=diff&rev=551851&r1=551850&r2=551851
==============================================================================
--- activemq/camel/trunk/components/camel-jbi/src/test/resources/log4j.properties (original)
+++ activemq/camel/trunk/components/camel-jbi/src/test/resources/log4j.properties Fri Jun 29 04:09:41 2007
@@ -27,6 +27,7 @@
log4j.logger.org.apache.activemq=INFO
log4j.logger.org.apache.activemq.spring=WARN
+#log4j.logger.org.apache.camel=DEBUG
#log4j.logger.org.apache.servicemix=DEBUG
# CONSOLE appender
Copied: activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su2-src/camel-context.xml (from r551231, activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su1-src/camel-context.xml)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su2-src/camel-context.xml?view=diff&rev=551851&p1=activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su1-src/camel-context.xml&r1=551231&p2=activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su2-src/camel-context.xml&r2=551851
==============================================================================
--- activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su1-src/camel-context.xml (original)
+++ activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su2-src/camel-context.xml Fri Jun 29 04:09:41 2007
@@ -30,7 +30,7 @@
-->
<camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
- <from uri="queue:a"/>
+ <from uri="jbi:endpoint:http://foo.bar.org/myService/myEndpointName"/>
<to uri="queue:b"/>
</route>
</camelContext>
Propchange: activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su2-src/camel-context.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su3-src/camel-context.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su3-src/camel-context.xml?view=auto&rev=551851
==============================================================================
--- activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su3-src/camel-context.xml (added)
+++ activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su3-src/camel-context.xml Fri Jun 29 04:09:41 2007
@@ -0,0 +1,39 @@
+<?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.
+
+-->
+<!-- START SNIPPET: camel -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
+ ">
+
+ <!--
+ from("queue:a").to("queue:b");
+ -->
+ <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
+ <route>
+ <from uri="jbi:name:cheese"/>
+ <to uri="queue:b"/>
+ </route>
+ </camelContext>
+
+</beans>
+<!-- END SNIPPET: camel -->
Propchange: activemq/camel/trunk/components/camel-jbi/src/test/resources/org/apache/camel/component/jbi/su3-src/camel-context.xml
------------------------------------------------------------------------------
svn:eol-style = native