cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <>
Subject [jira] [Commented] (CXF-6694) SpringResourceFactory does not work with constructor-autowired beans
Date Tue, 01 Dec 2015 21:38:11 GMT


Sergey Beryozkin commented on CXF-6694:

I've thought a bit more about it, see this factory is really useful if prototype or per-request
scope beans need to be supported, it does not add anything really if it is a singleton (well,
a minor simplification in that one can use bean id attributes only instead of declaring jaxrs:serviceBeans).

So if you have a singleton, then why don't refer to such a singleton from jaxrs:serviceBeans
directly ?.  

> SpringResourceFactory does not work with constructor-autowired beans
> --------------------------------------------------------------------
>                 Key: CXF-6694
>                 URL:
>             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

View raw message