Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15652

camel-bean - Optimize bean function in simple language add support for scope

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.6.0
    • camel-core
    • None
    • Unknown

    Description

      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.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: