On Thursday, May 26, 2011, Samuel Cox <[email protected]> wrote:
> Hi,
>
> I've created a black-box request/response facade around a Camel route.  Think:
>
> class BlackBox {
>   function process(request: Request): Response
> }
>
> This thing lives in a spring environment and is getting the
> CamelContext injected.  For each blackBox call, I use the context to:
>
> 1. Lookup an endpoint
> 2. Create producer from endpoint
> 3. Start producer
> 4. Create InOut Exchange
> 5. Process
> 6. Stop producer
>
> My question is this.  Would it be better if a ProducerTemplate is injected?

Often yes as it requires less code lines.


>
> Thanks.
>

-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to