[ 
https://issues.apache.org/jira/browse/CXF-6694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15033478#comment-15033478
 ] 

Sergey Beryozkin commented on CXF-6694:
---------------------------------------

This is related to this JAX-RS spec text: "Provider classes that are 
instantiated by the JAX-RS runtime and MUST have a public constructor for which 
the JAX-RS runtime *can provide all parameter values*. Note that a zero 
argument constructor is permissible under this rule.". But perhaps that can be 
relaxed for singletons instantiated by Spring if a non-default constructor has 
no @Context parameters

> SpringResourceFactory does not work with constructor-autowired beans
> --------------------------------------------------------------------
>
>                 Key: CXF-6694
>                 URL: https://issues.apache.org/jira/browse/CXF-6694
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.1.4
>            Reporter: Vladimir Kulev
>              Labels: spring
>
> When used with constructor-autowired bean, it fails with "Resource class ... 
> has no valid constructor" exception. We don't need constructor at all when we 
> already have a singleton instance from Spring.
> Also it looks like {{isSingleton()}} is called for the first time before 
> correct value is calculated a few lines below: {{isSingleton = 
> ac.isSingleton(beanId)}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to