-
1. Re: ESB Action transactions and synhronization questions
denix Nov 9, 2008 11:27 PM (in response to denix)ICE in docs
To implement a custom Action Processor, simply implement the
org.jboss.soa.esb.actions.ActionPipelineProcessor interface.
This interface supports implementation of stateless actions that have a managed lifecycle. A
single instance of a class implementing this interface is instantiated on a per pipeline basis (i.e.
per action configuration). This means you can cache resources needed by the action in the
initialise method, and clean them up in the destroy method.
But it means that all threads access action by turns, so it is no synchronization needed? -
2. Re: ESB Action transactions and synhronization questions
denix Nov 10, 2008 1:14 AM (in response to denix)But if action executes one by one why we need
maxThreads="5"? -
3. Re: ESB Action transactions and synhronization questions
kconner Nov 10, 2008 6:02 AM (in response to denix)It is not used in the scheduled listener case, but for all other listeners it will be.
If you use a POJO as an action then a new instance will be created for every message passing through the pipeline. This is for historical reasons.
If your action implements the ActionPipelineProcessor or ActionLifecycle interfaces then there will be a single instance created for each pipeline (incoming transport). The action must be thread safe as it is possible for multiple threads to access it concurrently. -
4. Re: ESB Action transactions and synhronization questions
denix Nov 10, 2008 8:51 PM (in response to denix)Thanks Kevin,
Okey, if action processes each time when new message arrives in new thread, why we need maxThreads="5" param? If all 5 threads busy than 6nd request will wait? Or what behavior should be? -
5. Re: ESB Action transactions and synhronization questions
kconner Nov 13, 2008 4:57 AM (in response to denix)The parameter limits the number of concurrent jobs which can be processed by the listeners, with any further jobs having to wait for an active one to finish before it can be processed.
Kev