Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3838

Predefined configuration handlers executing in different order when server is restarted

XMLWordPrintable

      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.

              rhn-support-asoldano Alessio Soldano
              rhn-support-dboeren David Boeren
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: