-
1. Re: ESB threading model
tomeicher Nov 17, 2009 1:16 PM (in response to jbossesbdev)Hi,
all AbstractActionPipelineProcessors must be "reentrant" in the way that
multiple message on the same service go through the same instance of
the processor.
However, if you have an AbstractActionPipelineProcessors used in two
different services, that will be two different instances.
That's why it's ok to store the ConfigTree as a member variable, but not
any information related to a specific message being processed.
Right?
Cheers, Tom. -
2. Re: ESB threading model
kconner Dec 2, 2009 5:53 AM (in response to jbossesbdev)There are two 'types' of instantiation for the processors, depending on how they are written.
The original pipeline code in the ESB created a new instance of each action per message and invoked the process methods via reflection. In order to speed this up, while supporting existing pipelines, we added new interfaces (ActionLifecycle and its sub-interfaces) which are only instantiated once per pipeline.
The actions implementing the new interfaces need to be thread safe, as they will be invoked concurrently.