Hi Nicky,

In your use case, it looks like you want to write a processor that
attaches a resource to the exchange that should not be closed by the
time the process() call finishes.. It should get closed when the
exchange completes.  Is this correct?

Regards,
Hiram

On 10/1/07, Nicky Sandhu <[EMAIL PROTECTED]> wrote:
>
> Hi folks,
>  I see a number of commits based on async callback discussion
> (http://www.nabble.com/Asynchronous-Exchange-Processing-t4313758s22882.html).
> I am wondering if it applies to this usecase as well.
>  For stream oriented or cursor oriented message bodies it is necessary to
> have a callback so that cleanup such as closing out the
> stream/resource/cursor can be done...else there would be leaks.
>  So if a process does something like
>  process(new Processor(){...
>     ResourceStream stream;
>     process(Exchange ex){
>       setBody(stream = new ResourceStream());
>       .....
>     }
>     onComplete(){
>        closeStream();
>     }
>     onFailure(){
>        closeStream();
>     }
> });
>
>   Any chance this kinda support is going to be able to make it to 1.2
> release ?
> --
> View this message in context: 
> http://www.nabble.com/Callback-on-Exchange-for-closing-out-streams%2C-result-set-cursors-tf4549498s22882.html#a12982891
> Sent from the Camel - Development mailing list archive at Nabble.com.
>
>


-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Reply via email to