camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAMEL-3563) CamelContext should act like a Component (i.e. a TypeConverter of CamelContext -> CamelContextComponent)
Date Fri, 21 Jan 2011 10:55:47 GMT

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

Christian Schneider commented on CAMEL-3563:
--------------------------------------------

As it is not yet clear how to solve this I propose to move this issue to Camel 2.7.0. 

> CamelContext should act like a Component (i.e. a TypeConverter of CamelContext ->
CamelContextComponent)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3563
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3563
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: james strachan
>             Fix For: 2.6.0
>
>
> Imagine you have a camelContext.xml for production use (e.g. you're creating an OSGi
bundle with a camelContext.xml) but you want to create an integration test case that tests
out your route.
> So you want to create a new Camel XML file, testCamel.xml which includes the camelContext.xml
and interacts with it. You now have 2 camelContexts. The test route needs to be able to refer
to any endpoints inside the other camelContext.xml.
> CamelContext has an ID (by default camelContext IIRC).
> so if we have 
> camelContext.xml
> {code}
> <camelContext id="prod" ...>
>   <route> 
>     <from uri="direct:foo">
>      ...
> {code}
> testCamelContext.xml
> {code}
> <camelContext id="test" ...>
>   <route> 
>     <from uri="direct:start">
>     <to uri="prod:direct:foo"/>
>    </route>
>   <route> 
>     <from uri="prod:seda:bar">
>     <to uri="mock:results"/>
>    </route>
> {code}
> i.e. in the test case we are routing from our local CamelContext into the production
camel context's "direct:start" endpoint and consuming from its "seda:bar" endpoint.
> i.e. we use "prod" as a name, look it up in the IoC context (just like any other Component),
but if its a CamelContext we (via TypeConverters) turn it into a Component that resolves the
rest of the name

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message