Yeah just done it when you no longer use it, eg after the producer, eg
after 4.

On Wed, Sep 11, 2013 at 12:42 PM, mamouros <[email protected]> wrote:
> I am using a consumer Template to get an exchange and then pass it on to a
> producer Template.
> As I saw from the docs for receive() "Important: See doneUoW(Exchange)" I
> went and checked doneUoW().
> Haven't though fully understand yet if I should call
> consumer.doneUoW(exchange); and where? Will it be after line 1, 3 or 4?
> Should I call it after line 6 too?
> Do I need to call consumer.stop() at any point?
>
>
> 1  exchange = consumer.receive("smpp://" + username + "@" + destination +
> ":" + port + "?password=" + password , timeoutInMillis);
> 2  if(exchange != null) {
> 3      exchange = producer.send("bean:SmsReceiver?method=retrievePdus" ,
> exchange);
> 4      producer.send("sql:update sms set status=:#sms_status,
> sent=:#CamelSmppDoneDate, error_code=:#CamelSmppError where
> sent_id=:#CamelSmppId?dataSource=dataSource" , exchange);
> 5  } else {
> 6      System.out.println("nullExchange");
> 7  }
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/How-and-where-should-I-use-doneUoW-for-a-consumer-template-tp5739119.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to