You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2020/10/08 14:08:00 UTC

[jira] [Resolved] (CAMEL-15652) camel-bean - Optimize bean function in simple language add support for scope

     [ https://issues.apache.org/jira/browse/CAMEL-15652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-15652.
---------------------------------
    Resolution: Fixed

> camel-bean - Optimize bean function in simple language add support for scope
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-15652
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15652
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.6.0
>
>
> So we can avoid the bean lookup in registry for each exchange, but do eager init. If we have scope, then you can set it as scope=singleton|request|prototype.
> For example in
>             <setProperty name="user">
>                 <simple>${bean:myBean?method=getRandomUser}</simple>
>             </setProperty>
> Then we lookup the bean by name myBean for each exchange. If we have scope=singleton, we can do this eager, and also see if we can do method selection if possible - eg getRandomUser if there is only 1 method - then use that.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)