camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Asynchronous Exchange Processing
Date Tue, 28 Aug 2007 16:13:24 GMT
BTW am thinking - this patch doesn't affect too much yet - mostly the
seda & file components along with the Pipeline - so how about we
commit it; then we can experiment with different ways to improve it as
we also try fix CAMEL-123?



On 8/28/07, James Strachan <james.strachan@gmail.com> wrote:
> On 8/28/07, Hiram Chirino <hiram@hiramchirino.com> wrote:
> > Got those test failures fixed now..  Here is a better version of the patch.
>
> Great stuff!
>
> I've been thinking we need a way to register onComplete / onFail
> hooks. (Rather like TransactionSynchronization in Spring)...
> http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/transaction/support/TransactionSynchronization.html
>
> So allowing something like
>
> exchange.getTransaction().addSynchronization(new Synchronization() {
>   pubic void onCommit() {
>      //  remove the file...
>   }
>
>   public void onRollback() {
>      ///
>   }
> }
>
> https://issues.apache.org/activemq/browse/CAMEL-123
>
> If we had some kinda Transaction object, which was propogated across
> any copied exchanges (e.g. a new exchange for each async operation or
> when using multicast etc), then we'd have a place we could register
> these kinds of onCommit/onRollback handlers. Then each component in
> the pipeline - whether file or ftp or whatever, could add their own
> onCommit/onRollback handlers etc.
>
> If we had this single Transaction object which is properly propogated,
> maybe that could also take over some of the work doing the tracking of
> the number of async steps per transaction as well as being the
> AsyncCallback - to contain the count down latch and so forth. So
> moving some of the code from Pipeline into this single place, this
> Transaction object - which hopefully could make it a bit easier to
> handle async processors in some of the other processors with minimal
> code etc.
>
> Am just wondering if we can minimise the amount of work required in
> the pipeline/processor code to support async handling.
>
> James
> -------
> http://macstrac.blogspot.com/
>


-- 
James
-------
http://macstrac.blogspot.com/

Mime
View raw message