[
https://issues.apache.org/jira/browse/CXF-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13937356#comment-13937356
]
Christian Schneider commented on CXF-5576:
------------------------------------------
Hi Sergey,
I am looking at the CXFCdiServlet (see link below). I do not understand why
this code
factory.setBus(getBus());
factory.init();
has to happen in the servlet. The only connection to the servlet is the bus.
Why shouldn´t we do this in JAXRSCdiResourceExtension. It is very well possible
that I miss the use case you are trying to solve. Of course we would have to
find a way to get the bus but if we assume the bus is defined as a CDI bean it
should be easy.
https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob;f=integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java;h=97c6e6f262e4bf04972f99e74f44e21247b95d93;hb=3cd24f083d410f2335245a377f961b48341705fa
https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob;f=integration/cdi/src/main/java/org/apache/cxf/cdi/CXFCdiServlet.java;h=2cae17dc60794e64b00dba5bb71b4dea324eae71;hb=3cd24f083d410f2335245a377f961b48341705fa
> 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)