That looks good. I like it much more than my new
ThreadPoolProfilebuilder(). How does it work?
Where is executorService() registered then. In RouteBuilder?
A problem with directly starting configuring stuff is that you have to
have any attribute as a start. So besides executorService you would need
all other attributes for the threads definition.
So I would even more prefer:
from("seda:start")
.threads(threadProfile().executorService(pool).callerRunsWhenRejected(false))
.delay(1000).to("mock:result"); rather than adding a new
This would make it more clear what executorService() is about. So this
route is only a tiny bit longer but mroe readable and helps you a lot
better with the code completion as you do not spam all the thread
attributes into the RouteBuilder.
It would be great if codecompletion for
".threads("
Would show only methods like threadProfile() that return a suitable
class for the method threads(..). Is this already possible in IDEs?
Christian
Am 22.07.2011 12:32, schrieb Guillaume Nodet:
More seriously, if anything need to change (for 3.0 for example), what
about something like from("seda:start")
.threads(executorService(pool).callerRunsWhenRejected(false))
.delay(1000).to("mock:result"); rather than adding a new
ThreadPoolProfileBuilder and a call to build ?
Christian
--
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com
--
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com