Hi sure I can ;-)
Spring context now with myProcessor bean <?xml version="1.0" encoding="UTF-8"?> <beans xmlns ="http://www.springframework.org/schema/beans" xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:util ="http://www.springframework.org/schema/util" xmlns:tx ="http://www.springframework.org/schema/tx" xmlns:jdbc ="http://www.springframework.org/schema/jdbc" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd" > <bean id="myProcessor" class="com.gk_software.camel.testRouteLoading.MyPrcossor"/> <camelContext id ="camel-core" xmlns ="http://camel.apache.org/schema/spring"> <route id="core-route01"> <from uri="direct:core-route01"/> <transacted/> <to uri="mock:core-route01"/> </route> </camelContext> <!-- =================================================================================================== --> <jdbc:embedded-database id="dataSource" type="HSQL"> <jdbc:script location="classpath:META-INF/database-hsqldb.ddl" /> </jdbc:embedded-database> <tx:annotation-driven /> <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" /> <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" /> <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory" /> </bean> <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="dataSource" ref ="dataSource" /> <property name="persistenceUnitName" value="MsgBus" /> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter"> <property name="generateDdl" value="false"/> <property name="showSql" value="false"/> <property name="database"> <util:constant static-field="org.springframework.orm.jpa.vendor.Database.HSQL"/> </property> </bean> </property> </bean> </beans> and loading this routes fail <?xml version="1.0" encoding="UTF-8"?> <routes xmlns="http://camel.apache.org/schema/spring"> <route id="test02-route01"> <from uri="direct:test02-route01"/> <transacted/> <to uri="mock:test02-route01"/> </route> </routes> BTW, I found one difference between your and my testing. It seems your starting camel context after adding routes -> from "LoadRouteFromXmlWithOnExceptionTest.java" InputStream is = getClass().getResourceAsStream("barOnExceptionRoute.xml"); RoutesDefinition routes = context.loadRoutesDefinition(is); context.addRouteDefinitions(routes.getRoutes()); context.start(); IMO in my cases the context is still up and running when I try to load/add routes. Not sure whether it makes a difference or not ... ----- Bernd Fischer GK Software AG [email protected] -- View this message in context: http://camel.465427.n5.nabble.com/Loading-routes-from-XML-files-with-Camel-2-4-0-tp3340082p3342468.html Sent from the Camel - Users mailing list archive at Nabble.com.
