Red Hat JBoss SOA Platform (SOA-P)
Red Hat JBoss Fuse Service Works (FSW)
- Are ESB action classes in the Action Processing Pipeline thread-safe? That is to say, are action classes singular (like the servlet model) or are they pooled (like the ejb model). It is very critical because the former means that the developer must code the actions in a thread-safe manner.
- Is a new instance of my Action class created for each call?
It depends on how the action class is written. If the class extends one of the provided interfaces (
ActionPipelineProcessor) then there is a single instance that has to be thread safe. If these interfaces are not implemented , directly or indirectly, then the pipeline will create a new instance for every message passing through. Using the
@Processannotation to create your action will also result in a single instance which must be thread safe.
Red Hat JBoss Fuse Service Works(
ESB), the situation is similar. Bean instances(
@Servicefor example) are application-scoped and therefore it is not safe to use the instance variables in them.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.