@ski n Simply: camelContext.getRoutesLoader() -> org.apache.camel.support. PluginHelper.getRoutesLoader(camelContext)
On Tue, Aug 1, 2023 at 8:34 AM ski n <raymondmees...@gmail.com> wrote: > OK, good to know as I use this functionality also heavily. Some > questions/remarks about this: > > 1. What's the reason that it was (re)moved? Is there a new concept behind > the PluginHelper? > 2. Maybe good to add this to the migration guide ( > https://camel.apache.org/manual/camel-4-migration-guide.html). > 3. @chipu. Would be nice if you can post your new solution here? > > -- > > Raymond > > On Tue, Aug 1, 2023 at 7:56 AM Claus Ibsen <claus.ib...@gmail.com> wrote: > > > Hi > > > > You can use org.apache.camel.support.PluginHelper > > > > On Mon, Jul 31, 2023 at 11:04 PM Ricardo Garcia <thraw...@gmail.com> > > wrote: > > > > > Hi, I am migrating to camel 4, as part of a broader migration to all > > > jakarta API instead of javax API > > > In camel 3 I could load routes from multiple external xml files: > > > > > > try (DirectoryStream<Path> ds = Files.newDirectoryStream(routesDir, > > "*.xml" > > > ); > > > DefaultResourceResolvers.FileResolver resolver = new > > > DefaultResourceResolvers.FileResolver()) { > > > resolver.setCamelContext(camelContext); > > > for(Path file : ds) > > > try { > > > log.debug("Loading routes in {}", file); > > > Resource resource = resolver.resolve(file.toUri().toString()); > > > camelContext.getRoutesLoader().loadRoutes(resource); > > > } catch(Exception ex) { > > > log.error("Cannot load routes in " + file, ex); > > > } > > > } > > > But in camel 4 RC2, "getRoutesLoader()" does not exist in > > > DefaultCamelContext, nor in ExtendedCamelContext... so how should we do > > it > > > then? > > > Thanks > > > > > > -- > > > Chipu > > > > > > > > > -- > > Claus Ibsen > > ----------------- > > @davsclaus > > Camel in Action 2: https://www.manning.com/ibsen2 > > > -- Chipu