camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xlogger <>
Subject Load Endpoints from XML file
Date Thu, 29 Oct 2015 13:09:22 GMT
I have followed this link and was able to load route from XML file without
restarting CamelContext

Here is the route XML that I have tested successfully
<routes xmlns="">
  <route id="timer-route">
    <from uri="timer://foo?fixedRate=true&amp;period=3000"/>
    <log message="timer up!!"/>

I would like to modify my route by separating the Endpoint definition into
another XML. Here is the modified XML:

<routes xmlns="">
  <endpoint id="test-timer" uri="timer://foo">
		<property key="fixedRate" value="true" />
		<property key="period" value="3000" />
  <route id="timer-route">
    <from uri="ref:test-timer" />
    <log message="timer up!!"/>

However, it failed with exception saying that the endpoint ref test-timer is
not found
Error message:
org.apache.camel.FailedToCreateRouteException: Failed to create route
timer-route: Route(timer-route)[[From[ref:test-timer]] -> [Log[timer up!!...
because of Failed to resolve endpoint: ref://test-timer due to: No bean
could be found in the registry for: test-timer of type:

Would like to know if there is correct way to load Endpoint definition in
separate XML element, or even in separate XML file. Thus we don't need to
write a long URI and able to manage it clearly in key-value pair.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message