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

Redefine order of jaxws handlers

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • jbossws-1.2.1
    • None
    • jbossws-native
    • None

      http://www.javaworld.com/javaworld/jw-02-2007/jw-02-handler.html?page=3

      Execution sequence of handlers

      In a handler-chain descriptor, there may be multiple chains, and in each of them, logical handlers may coexist with protocol handlers. The question is, in what sequence are handlers of different kinds, and in different chains, executed? Since the execution order of handlers may affect logics implemented in them, and their collaboration, developers must understand the answer to this question.

      Here is the behavior defined in the JAX-WS specification and as implemented in the reference implementation:

      • Whether there are multiple handler chains or just one, all logical handlers are executed before protocol handlers on an outbound message, and all protocol handlers are executed before logical handlers on an inbound message.
      • The reordering process in the first rule honors the relative positions of protocol handlers or logical handlers configured inside any handler chain on an outbound message; for an inbound message, the order is reversed.
      • If multiple handler chains are configured, handlers (of the same kind) from chains in the front of the descriptor apply before handlers from those in the back on an outbound message, and handlers (of the same kind) from chains in the back of the descriptor apply before handlers from chains in the front on an inbound message.

      As a result of this, the server side handler definition must be read from bottom to top for the inbound message.

            tdiesler@redhat.com Thomas Diesler
            tdiesler@redhat.com Thomas Diesler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: