Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6292

Init parameters on OSGi service are not picked up

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7.15
    • 2.7.16
    • JAX-RS, Transports
    • None
    • Unknown

    Description

      File: https://github.com/apache/cxf/blob/cxf-2.7.15/rt/transports/http/src/main/resources/OSGI-INF/blueprint/osgiservlet.xml

      I assume that the properties set on the service are init-params to org.apache.cxf.transport.servlet.ServletController. Some frameworks, pax-web-extender-whiteboard in my case, require one of the following for init parameters

      1. init-params are prefixed with init. OR
      2. There's a property init-prefix on the service specifying the prefix. This property may be blank

      With the service as it stands no parameters are set on the servlet by pax-web-extender-whiteboard. They are skipped at this if-statement: https://github.com/ops4j/org.ops4j.pax.web/blob/master/pax-web-extender-whiteboard/src/main/java/org/ops4j/pax/web/extender/whiteboard/internal/tracker/ServletTracker.java#L180-L182

      This makes it impossible to secure the servlet.

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            jgogstad Jostein Gogstad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: