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

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

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.1.12, 3.2.0
    • JAX-RS
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: