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

Andriy Redko edited comment on CXF-5576 at 3/23/14 9:49 PM:
------------------------------------------------------------

Hi Sergey,

It is also possible, I thought about something like Spring-alike configuration 
(but it might be difficult to implement). More easily we could think about the 
@Produces approach:
{noformat}
@Produces @Inject JAXRSServerFactoryBean createServer( Bus bus, Application 
application ) {
    JAXRSServerFactoryBean factory = 
RuntimeDelegate.getInstance().createEndpoint( application, 
JAXRSServerFactoryBean.class );  
    factory.setBus( bus );
    factory.setServiceBeans( ... );
    factory.setInInterceptors( ...  );
    factory.setOutInterceptors( ... );
    factory.setProviders( ... );
    return factory;
}
{noformat}

What do you think?

Thanks.
Andriy


was (Author: reta):
Hi Sergey,

It is also possible, I thought about something like Spring-alike configuration 
(but it might be difficult to implement). More easily we could think about the 
@Produces approach:
{noformat}
@Produces @Inject JAXRSServerFactoryBean createServer( Bus bus, Application 
application ) {
    JAXRSServerFactoryBean factory = 
RuntimeDelegate.getInstance().createEndpoint( application, 
JAXRSServerFactoryBean.class );  
    factory.setServiceBeans( ... );
    factory.setInInterceptors( ...  );
    factory.setOutInterceptors( ... );
    factory.setProviders( ... );
    return factory;
}
{noformat}

What do you think?

Thanks.
Andriy

> Initital support for CDI integration
> ------------------------------------
>
>                 Key: CXF-5576
>                 URL: https://issues.apache.org/jira/browse/CXF-5576
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 3.0.0
>            Reporter: Andriy Redko
>            Assignee: Andriy Redko
>              Labels: cdi
>         Attachments: weld-one-jar.zip, weld-one-war.zip
>
>
> A per section 10.2.3 Context and Dependency Injection (CDI) of JAX-RS 2.0 
> specification, in a product that supports CDI, the implementations MUST 
> support the use of CDI-style Beans as root resource classes, providers and 
> Application subclasses. Providers and Application subclasses MUST be 
> singletons or use application scope.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to