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

Support for marking a CamelProxy as a primary or non-primary spring bean

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 2.8.0
    • Future
    • camel-spring
    • N/A

    • Moderate

    Description

      It would be very handy if a camelProxy bean (which is also a spring bean) could be defined as primary (see http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/htmlsingle/spring-framework-reference.html, search for @Primary).

      I have a content based route, which delegates to some other beans depending on argument values to the proxy. All three beans implement the same interface. So if I could just mark the proxy as primary that bean would be preferred.

      Other usecases where you would like it not to be primary probably exist as well.

      I suggest adding an optional boolean attribute "primary" which is by default true.

      Attachments

        1. SomeIface.java
          0.0 kB
          David J. M. Karlsen
        2. SomeImpl.java
          0.1 kB
          David J. M. Karlsen
        3. TestCase.java
          0.6 kB
          David J. M. Karlsen
        4. test-context.xml
          0.7 kB
          David J. M. Karlsen

        Activity

          People

            davsclaus Claus Ibsen
            davidkarlsen@gmail.com David J. M. Karlsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: