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

[cdi] wrong org.apache.cxf.cdi.CdiResourceProvider#isSingleton implementation

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.12, 3.2.0
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      org.apache.cxf.cdi.CdiResourceProvider#isSingleton returns "is not request scoped" but cdi will issue a contextual proxy for @RequestScoped instances so a @RequestScoped instance is a singleton.

      The implementation should be !beanManager.isNormalScope(bean.getScope()). If a normal scope (@ApplicationScoped, @RequestScoped...) then the context is managed outside the proxy and the proxy is a singleton.

        Attachments

          Activity

            People

            • Assignee:
              reta Andriy Redko
              Reporter:
              romain.manni-bucau Romain Manni-Bucau
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: