Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2FEC811BE6 for ; Thu, 27 Mar 2014 13:13:26 +0000 (UTC) Received: (qmail 28484 invoked by uid 500); 27 Mar 2014 13:13:24 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 28114 invoked by uid 500); 27 Mar 2014 13:13:16 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 28103 invoked by uid 99); 27 Mar 2014 13:13:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Mar 2014 13:13:16 +0000 Date: Thu, 27 Mar 2014 13:13:16 +0000 (UTC) From: "Andriy Redko (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-5576) Initital support for CDI integration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13949275#comment-13949275 ] Andriy Redko commented on CXF-5576: ----------------------------------- Hi Sergey, Very right, annotation @Inject, @Resource , ... lead to automatic resource injections (by CDI container). @Produces leads to custom initialization process but the resulting beans are available for injections. So for example if users do need to setup own properties on JsonProvider, it would be done with @Produces and then wire up everywhere (there are also a technique to work with unmanaged beans using Unmanaged but still CDI annotations should be present) . If there is no need to setup anything, user may either do nothing or explicitly provide instances over getSingletons / getClasses. 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)