Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0B7FD200BA3 for ; Thu, 20 Oct 2016 20:02:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0A696160AE0; Thu, 20 Oct 2016 18:02:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7B4F7160ACC for ; Thu, 20 Oct 2016 20:02:46 +0200 (CEST) Received: (qmail 27212 invoked by uid 500); 20 Oct 2016 18:02:45 -0000 Mailing-List: contact dev-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 dev@cxf.apache.org Received: (qmail 27197 invoked by uid 99); 20 Oct 2016 18:02:45 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Oct 2016 18:02:45 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2C5AFE008F; Thu, 20 Oct 2016 18:02:45 +0000 (UTC) From: johnament To: dev@cxf.apache.org Reply-To: dev@cxf.apache.org References: In-Reply-To: Subject: [GitHub] cxf pull request #181: ensuring CDI Bean are always the CDI context ones Content-Type: text/plain Message-Id: <20161020180245.2C5AFE008F@git1-us-west.apache.org> Date: Thu, 20 Oct 2016 18:02:45 +0000 (UTC) archived-at: Thu, 20 Oct 2016 18:02:47 -0000 Github user johnament commented on a diff in the pull request: https://github.com/apache/cxf/pull/181#discussion_r84342026 --- Diff: integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java --- @@ -74,16 +74,16 @@ featureBeans.add((Bean< ? extends Feature >)event.getBean()); } else if (CdiBusBean.CXF.equals(event.getBean().getName()) && Bus.class.isAssignableFrom(event.getBean().getBeanClass())) { - busBean = event.getBean(); + hasBus = true; } } public void load(@Observes final AfterDeploymentValidation event, final BeanManager beanManager) { + // no need of creational context, it only works for app scoped instances anyway + final Bean busBean = beanManager.resolve(beanManager.getBeans(CdiBusBean.CXF)); bus = (Bus)beanManager.getReference( --- End diff -- For the case of what we're using, collecting beans vs getting all beans will be a little different. Specifically for `serviceBeans` there is no marker interface for JAX-RS resources, and provider beans have the same requirement - they're discovered via Object with a non-qualifier annotation. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---