camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Łukasz Dywicki (JIRA) <j...@apache.org>
Subject [jira] [Commented] (CAMEL-5566) provide an annotation to auto-register a RouteBuilder with a CamelContext (lazily creating a new CamelContext if a different contextName is specified)
Date Thu, 07 Mar 2013 18:44:13 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-5566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13596168#comment-13596168
] 

Łukasz Dywicki commented on CAMEL-5566:
---------------------------------------

[~antonin.stefanutti] I understand your problem and indeed in this case support for multiple
context will make things easier. However it's tip of iceberg I would say - what's about beans
or bean references called from route? Our registry integration do not include @ContextName
in lookups. Same corresponds to simple language which assumes global bean registry. If @ContextName
became a regular CDI qualifier we'll get some sort of sub-registries.
The CamelContextConfig itself is rather workaround than final solution I would say.
                
> provide an annotation to auto-register a RouteBuilder with a CamelContext (lazily creating
a new CamelContext if a different contextName is specified)
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5566
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5566
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cdi
>            Reporter: james strachan
>            Assignee: james strachan
>             Fix For: 2.11.0
>
>         Attachments: CAMEL-5566.patch
>
>
> as per Romain's ideas on the dev list, it would be nice to have an annotation to make
it easy to inject a RouteBuilder instance then bind it to a CamelContext (basically creating
the CamelContext for the given context name and calling CamelContext.addRoutes(routes)).
> Previously Romain had gone with @CamelContextId though am thinking, @Named is the way
of associating an id/name with a bean and its really more about camel lifecycles, so thinking
of using @CamelStartup to make it more obvious what it does (with the contextName being an
optional parameter too; since multiple contexts within the same class loader are kinda rare
- there's no huge need for more than one CamelContext).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message