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

@Context fails to inject Application instance

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.3
    • 2.4, 2.3.4
    • JAX-RS
    • None

    Description

      Quoting JSR 311:

      "The instance of the application-supplied Application subclass can be injected into a class field or method parameter using the @Context annotation. Access to the Application subclass instance allows configuration information to be centralized in that class. Note that this cannot be injected into the Application subclass itself since this would create a circular dependency."

      JAXRSUtils.createContextValue() doesn't handle this. This bug exists in 2.3.x and HEAD.

      I'd submit a patch but I don't know where (or if) the Application class is registered after it's instantiated by CXFNonSpringJaxrsServlet.

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            bnoordhuis Ben Noordhuis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: