Re: Using the RoutesLoader

2022-04-14 Thread ski n
I checked Chirag's updated example which contains RouteConfiguration as XML and it worked. Then I wondered what's the difference between Chirag's and my approach. It turned out that the code is basically the same, but there was a difference in used dependencies. Chirag's project uses:

Re: Using the RoutesLoader

2022-04-13 Thread Chirag
while performing XML route, route needs to be explicitly associated with configuration to use it. Example on https://camel.apache.org/manual/route-configuration.html#_route_configuration_in_xml works. I think the gap is - when defining a framework based on camel - how to associate specific rou

Re: Using the RoutesLoader

2022-04-13 Thread ski n
I also created an issue for this with an example: https://issues.apache.org/jira/browse/CAMEL-17953 On Wed, Apr 13, 2022 at 9:25 AM ski n wrote: > Yes, based on the link Claus send: > > https://camel.apache.org/manual/route-configuration.html > > There is an example of how to do it in Java and

Re: Using the RoutesLoader

2022-04-13 Thread ski n
Yes, based on the link Claus send: https://camel.apache.org/manual/route-configuration.html There is an example of how to do it in Java and how to add it to the CamelContext. There is also an example of how to do it with XML: java.lang.Exception true But the

Re: Using the RoutesLoader

2022-04-12 Thread Chirag
Raymond, to summarise: You want to load route configuration using XML? ચિરાગ/चिराग/Chirag -- Sent from My Gmail Account On Tue, Apr 12, 2022 at 7:59 AM ski n wrote: > > Loading the routeconfiguration through: > > loader.loadRoutes(resource); > > also does

Re: Using the RoutesLoader

2022-04-12 Thread ski n
Loading the routeconfiguration through: loader.loadRoutes(resource); also doesn't work. Directly from Java is no problem. Is this a bug or should the XML RouteConfiguration loaded differently? Raymond On Mon, Apr 11, 2022 at 10:26 PM ski n wrote: > As a note: > > When when using the routeConf

Re: Using the RoutesLoader

2022-04-11 Thread ski n
As a note: When when using the routeConfiguration from Java and load it: public class MyJavaErrorHandler extends RouteConfigurationBuilder { @Override public void configuration() throws Exception { routeConfiguration("xmlError") .onException(Exception.class).handled(t

Re: Using the RoutesLoader

2022-04-11 Thread ski n
Yes, with the try-catch-finally clause one can have more fine-grained. However, I am not the one who writes the routes. I am only loading them. That's why I need a more generic behavior (errorHandler) with some configuration options (routeConfiguration). I assumed that the XML routeConfiguration c

Re: Using the RoutesLoader

2022-04-11 Thread Chirag
You could wrap it using try/catch. See: https://camel.apache.org/manual/try-catch-finally.html My experience with it is - it depends on the endpoint involved to throw exceptions and enter doCatch appropriately. ચિરાગ/चिराग/Chirag -- Sent from My Gmail Acc

Re: Using the RoutesLoader

2022-04-11 Thread Claus Ibsen
Hi See routes configuration https://camel.apache.org/manual/route-configuration.html On Mon, Apr 11, 2022 at 4:30 PM ski n wrote: > > I am indeed using Camel 3 (Currently 3.14.2) and using Maven. I just use > plain Java (camel core), so I have a similar setup as your example (only > I'm using Ja

Re: Using the RoutesLoader

2022-04-11 Thread ski n
I am indeed using Camel 3 (Currently 3.14.2) and using Maven. I just use plain Java (camel core), so I have a similar setup as your example (only I'm using Java, instead of the application.properties to configure the Camel context and its routes). Your example helped me to also use the Yaml dsl. I

Re: Using the RoutesLoader

2022-04-11 Thread Chirag
Hello Raymond, Are you trying to use Camel 3 ? Would you use Maven or Gradle to build? Here is an example: https://github.com/chiragsanghavi/camel-experiments/tree/main/processor if this helps. This example was built to demonstrate a bug- but if you update maven to use camel 3.1.5 - it should wo