reta edited a comment on pull request #775:
URL: https://github.com/apache/cxf/pull/775#issuecomment-817359964


   > ... @ApplicationScoped or @RequestScoped should do he same and properly 
impl get(bean)) but otherwise looks good
   
   @rmannibucau thanks a lot for the feedback, so thought but here are some 
findings, in `JAXRSCdiResourceExtension`:
   - we create `PerRequestResourceProvider` when `isCxfSingleton(beanManager, 
bean)` is `false`
   -  in turn, `isCxfSingleton` checks the scope
       ```
       boolean isCxfSingleton(final BeanManager beanManager, final Bean<?> 
bean) {
           return beanManager.isNormalScope(bean.getScope()) || 
isConsideredSingleton(bean.getScope());
       }
       ```
   - and `beanManager.isNormalScope(bean.getScope())` is `true` for all 
pre-predefined `@XxxScoped` scopes  because each of those has `@NormalScope` 
annotation as well
   
   So I introduced the custom scope to trigger the `PerRequestResourceProvider` 
 flow. What do you think, see any issues with `isCxfSingleton` implementation?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to