Skip to content

Commit

Permalink
fixed kamelet #5849
Browse files Browse the repository at this point in the history
  • Loading branch information
JiriOndrusek committed Mar 8, 2024
1 parent 3b0cebc commit 2816632
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ CamelContextCustomizerBuildItem configureTemplates(
resource.setLocation(originalResource.getLocation());
resource.setExists(originalResource.exists());
definition.setResource(resource);
//remove references to camelContext https://github.com/apache/camel-quarkus/issues/5849
definition.setCamelContext(null);
if (definition.getRoute() != null && definition.getRoute().getOutputs() != null) {
definition.getRoute().getOutputs().forEach(o -> o.setCamelContext(null));
}
});

return new CamelContextCustomizerBuildItem(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ public void configure(CamelContext context) {
}
}
}
//return references to camelContext https://github.com/apache/camel-quarkus/issues/5849
definition.setCamelContext(context);
if (definition.getRoute() != null && definition.getRoute().getOutputs() != null) {
definition.getRoute().getOutputs().forEach(o -> o.setCamelContext(context));
}
}
context.getCamelContextExtension().getContextPlugin(Model.class).addRouteTemplateDefinitions(definitions);
} catch (Exception e) {
Expand Down

0 comments on commit 2816632

Please sign in to comment.