]
Alessio Soldano updated JBWS-3838:
----------------------------------
Fix Version/s: jbossws-cxf-5.0.0.Beta2
(was: jbossws-cxf-5.0)
Predefined configuration handlers executing in different order when
server is restarted
---------------------------------------------------------------------------------------
Key: JBWS-3838
URL:
https://issues.jboss.org/browse/JBWS-3838
Project: JBoss Web Services
Issue Type: Bug
Components: jbossws-cxf
Affects Versions: jbossws-cxf-4.3
Reporter: david.boeren
Assignee: Alessio Soldano
Fix For: jbossws-cxf-4.3.2, jbossws-cxf-5.0.0.Beta2
Handler order can change after a reboot, which causes problems when one handler depends
on the action of another.
* Description of the problem
The flow is basically the following:
1) the container model is parsed; it can include jaxws configs, which are composed
of jaxws handler chains, which in turn has one or multiple jaxws handlers
2) we have add operations for each jaxws handler and jaxws handler
chain. Each of them starts a service, which builds up the corresponding
metadata to be later used by jbossws; proper dependencies are set
between those services, so that for instance the service for a handler
chain waits for all its handlers' services.
3) when the service for the handler chain runs, it gets the info from
the handler services and them in the chain metadata. This is where I get
unpredictable ordering, as the handler services are run in parallel
* Solution
The idea is that we need to derive the handlers' order from the add operation steps,
which are executed in the same order they're created in the parser.
Brian also suggests to use the OperationContext.attach(...) API to pass data between
handler invocations within an overall operation execution. All ws subsystem ops during
boot are executed as steps within an overall operation. The API works like the attachment
stuff that's used a lot in DeploymentUnitProcessors.