Skip to content

Commit

Permalink
Polished
Browse files Browse the repository at this point in the history
  • Loading branch information
davsclaus committed Sep 29, 2023
1 parent cea2ee0 commit 96381e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,16 @@ protected void bindBean(CamelContext camelContext, RegistryBeanDefinition def, S
beansToDestroy.put(name, new KeyValueHolder<>(target, def.getDestroyMethod()));
}

addBeanToCamelModel(camelContext, name, def);
}

protected void addBeanToCamelModel(CamelContext camelContext, String name, RegistryBeanDefinition def) {
// register bean in model
Model model = camelContext.getCamelContextExtension().getContextPlugin(Model.class);
model.addRegistryBean(def);
if (model != null) {
LOG.debug("Adding OSGi <blueprint> XML bean: {} to DSL model", name);
model.addRegistryBean(def);
}
}

protected void destroyBean(String name, boolean remove) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ private void addBeanToCamelModel(CamelContext camelContext, String name, BeanDef
}
rrd.setType(def.getBeanClassName());
rrd.setName(name);
LOG.debug("Adding Spring <beans> XML bean: {} to DSL model", name);
model.addRegistryBean(rrd);

// factory bean/method
Expand Down

0 comments on commit 96381e5

Please sign in to comment.