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

Christian Schneider edited comment on CXF-5576 at 2/23/14 9:52 PM:
-------------------------------------------------------------------

Hi Andriy,

this might help if you did not yet find it. 
https://docs.jboss.org/weld/reference/latest/en-US/html/extend.html
It describes how portable extensions work. If I understood correctly then with 
that approach we would not detect that a CDI container is running. Instead we 
let the container detect our extension and delegate the work to us. So if there 
is no container the extension simply stays passive.

Forgot one thing. Of course the approach where we stay passive only works in 
case we publish an endpoint purely based on annotations or if we inject a 
service client into a CDI bean. If we want to react on the user calling jaxrs 
apis to e.g access a service then we have to detect the container like you 
mentioned. 


was (Author: [email protected]):
Hi Andriy,

this might help if you did not yet find it. 
https://docs.jboss.org/weld/reference/latest/en-US/html/extend.html
It describes how portable extensions work. If I understood correctly then with 
that approach we would not detect that a CDI container is running. Instead we 
let the container detect our extension and delegate the work to us. So if there 
is no container the extension simply stays passive.

> 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
>
> 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.1.5#6160)

Reply via email to