camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: requestBodyAndHeader and HEADER_CLOSE_SESSION_WHEN_COMPLETE
Date Fri, 15 Jan 2010 13:45:11 GMT
On Fri, Jan 15, 2010 at 2:41 PM, huntc <huntc@mac.com> wrote:
>
> Hi there,
>
> Is the following code valid... my goal is to ensure that the MINA connection
> I'm using is closed upon having received a reply:
>
>  Object replyMessage = producerTemplate
>      .requestBodyAndHeader(
>          smsSenderEndpoint,
>          requestMessage,
>          MinaConsumer.HEADER_CLOSE_SESSION_WHEN_COMPLETE,
>          true);
>
> The doco. implies that the above header value is useful in server style
> scenarios hence my question around using a consuming template call.
>
> I'd like to confirm whether it is necessary for me to specify this header in
> the context of using a template; particularly if the same template is
> invoked again to send another message very soon after receiving a reply to
> the previous one.
>

Yes you need to pass in this header every time you want to session closed.


> Thanks.
>
> Kind regards,
> Christopher
> --
> View this message in context: http://old.nabble.com/requestBodyAndHeader-and-HEADER_CLOSE_SESSION_WHEN_COMPLETE-tp27175565p27175565.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message