Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-3893

[Migration guide] missing info how to migrate valves which are part of deployment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 7.0.0.GA
    • 7.0.0.ER6
    • Documentation, Migration
    • None

      The migration guide should also contain information how to migrate valves defined at application level => in jboss-web.xml.

      Motivation: Customer has defined some valve only in jboss-web.xml as he wants the valve only to apply to the deployment. It should be documented how such valves can be migrated.

      Note some valves migration can be done by changing the valve to http-handler in jboss-web.xml and pointing to equivalent handler. Still there are some valves which requires specialized config setting and can't be set directly this way. See limitation for handlers setting as part of http-handler element description located in the jboss-web_10_0.xsd schema:

      Defines a web container HTTPHandler. The module element allows specifying from which module in the application server the specified class will be loaded. A handler is used to intercept the request that will be processed by the servlet. It is invoked as part of a chain, before the invocation of the webapp's filter chain.

      The class specified can either be a HttpHandler that has a constructor that takes the next HttpHandler, or can be a HandlerWrapper that produces the next handler.

      E.g. io.undertow.servlet.handlers.CrawlerSessionManagerHandler can't be set directly as it requires in constructor setting also CrawlerSessionManagerConfig.

      Also some valves such as RewriteValve is in Undertow replaced by using predicate handlers. Using predicates in jboss-web.xml doesn't seem to be possible. sdouglas1@redhat.com please correct me, if I am mistaken.

      To make handler applicable only to requests targeting single deployment in EAP 7, it can be either done by <http-handler> in jboss-web.xml (not applicable to every handler as stated above) or by defining the handler/filter in server configuration and limiting it via predicates to requests pointing to the deployment.

      Please consult with sdouglas1@redhat.com all possible options and document the steps how to migrate such valves.

            sgilda_jira Sande Gilda (Inactive)
            rhatlapa@redhat.com Radim Hatlapatka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: