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 Wed, 29 Aug 2007 08:12:02 GMT
Incidentally as a first stab at tackling CAMEL-123
https://issues.apache.org/activemq/browse/CAMEL-123

I've added a UnitOfWork object on an Exchange that can be used to
register onComplete/onFailure hooks when processing of a message
exchange has been completed. Its not yet wired into the sync/async
changes Hiram made though but gives an idea of what I was wondering
about.

If you take a look at the DefaultUnitOfWork.addAsyncStep() - I was
kinda wondering if we could use the UnitOfWork object as a factory of
AsyncCallback objects when working with async stuff; so that by
default when all the async callbacks complete, the UnitOfWork's
Synchronization handlers could be invoked (e.g. the onComplete /
onFailure handlers). Then my next thought was could we move a bit more
of the code from the changes to Pipeline out into the UnitOfWork
class; still a bit embyonic my thoughts though - its complex stuff
this sync v async v transactions stuff :)

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

Mime
View raw message