camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Commented: (CAMEL-1899) camel-spring - Should auto register a ProducerTemplate and ConsumerTemplate
Date Tue, 11 Aug 2009 06:16:35 GMT


Claus Ibsen commented on CAMEL-1899:

That allows you to use a route as
    <camelContext id="camel" xmlns="">
            <from uri="file://acme/inbox"/>
            <to uri="file://acme/outbox"/>

And then in your unit test classes to define 

    private ProducerTemplate template;

And you are all set

> camel-spring - Should auto register a ProducerTemplate and ConsumerTemplate
> ---------------------------------------------------------------------------
>                 Key: CAMEL-1899
>                 URL:
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-spring
>    Affects Versions: 2.0-M3
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.0.0
> When using camel in XML and you want to unit test or get hold of a producer template
using IoC you need to declare it in the Spring XML file and define an id to it such as below
> {code}
>     <camelContext id="camel" xmlns="">
>         <template id="template"/>
>         <route>
>             <from uri="file://acme/inbox"/>
>             <to uri="file://acme/outbox"/>
>         </route>
>     </camelContext>
> {code}
> I think we should default define a bean with the id
> - template = producer template (often named like this, so instead of naming it producerTemplate)
> - consumerTemplate = consumer template
> However if there is a <template> tag defined it should not auto register a bean

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

View raw message