separate files are the Spring DSL
I have an XML file with the following route: (I have tested it and it works fine) ${header.CamelFileName} regex '^.*xml$' ${header.CamelFileName} regex '^.*(csv|csl)$' Now I want to define the route in a separate XML file using routeContext and access it in the main xml file using routeContextRef. I havee created the route as http://camel.apache.org/schema/spring";> ${header.CamelFileName} regex '^.*xml$' ${header.CamelFileName} regex '^.*(csv|csl)$' If I save it as ftpToJms.xml then how can I refer to it using routeContextRef? I did follwoing but it is failing: http://camel.apache.org/schema/spring";> -- View this message in context: http://camel.465427.n5.nabble.com/separate-files-are-the-Spring-DSL-tp4903855p4903855.html Sent from the Camel Development mailing list archive at Nabble.com.
Re: separate files are the Spring DSL
Thank you for the reply. I folllowed FAQ given at http://camel.apache.org/how-do-i-import-routes-from-other-xml-files.html Here is the route that I want to import: 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.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd "> http://camel.apache.org/schema/spring";> ${header.CamelFileName} regex '^.*xml$' ${header.CamelFileName} regex '^.*(csv|csl)$' and here is the XML file where I want to import the above route: 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.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd "> http://camel.apache.org/schema/spring";> I am getting following error: (please tell me what is going wrong) karaf@root> Exception in thread "SpringOsgiExtenderThread-21" java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'r efresh' before accessing beans via the ApplicationContext at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.close(DependencyWaiterApplicatio nContextExecutor.java:345) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.fail(DependencyWaiterApplication ContextExecutor.java:401) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplica tionContextExecutor.java:287) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicat ionContextExecutor.java:175) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext. java:175) at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:718) at java.lang.Thread.run(Thread.java:662) -- View this message in context: http://camel.465427.n5.nabble.com/separate-files-are-the-Spring-DSL-tp4903855p4905181.html Sent from the Camel Development mailing list archive at Nabble.com.
reading Message for content based routing
Suppose I have following two messages: Message 1: Message 2: I want to route message to queue "application A" or to queue "application B" based on the application value in the message. How can I get to the application value in the message? Thank you -- View this message in context: http://camel.465427.n5.nabble.com/reading-Message-for-content-based-routing-tp4907281p4907281.html Sent from the Camel Development mailing list archive at Nabble.com.