[
https://issues.apache.org/jira/browse/CAMEL-15607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17205337#comment-17205337
]
Claus Ibsen commented on CAMEL-15607:
-------------------------------------
This code should not only be done once during initial resolve
// as first iteration, check if there is a language instance for
the given name
// bound to the registry
answer =
ResolverHelper.lookupLanguageInRegistryWithFallback(getCamelContextReference(),
language);
if (answer != null) {
Language old = languages.put(language, answer);
// if the language has already been loaded, thus it is already
registered
// in the local language cache, we can return it as it has
already been
// initialized and configured
if (old == answer) {
return answer;
}
We should not lookup in registry each time. A language is not a prototype
scoped resource. Its some old cruft from spring xml <bean> for custom languages
where you can define it as prototype. But we dont want this kind of weird
feature.
> camel-core - When resolving language then only resolve via registry once
> ------------------------------------------------------------------------
>
> Key: CAMEL-15607
> URL: https://issues.apache.org/jira/browse/CAMEL-15607
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 3.6.0
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)