Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9B47318C85 for ; Mon, 22 Feb 2016 13:00:18 +0000 (UTC) Received: (qmail 5606 invoked by uid 500); 22 Feb 2016 12:40:43 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 5537 invoked by uid 500); 22 Feb 2016 12:40:43 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 5474 invoked by uid 99); 22 Feb 2016 12:40:43 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Feb 2016 12:40:43 +0000 Received: from mail-oi0-f53.google.com (mail-oi0-f53.google.com [209.85.218.53]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 36DC61A0178 for ; Mon, 22 Feb 2016 12:40:43 +0000 (UTC) Received: by mail-oi0-f53.google.com with SMTP id x21so53731952oix.2 for ; Mon, 22 Feb 2016 04:40:43 -0800 (PST) X-Gm-Message-State: AG10YOSP0HY5CulxMcmW6g4efu/FioJZfoov2rRuAd+hx6vBh5dUrvNh+mtSv5YLQKaVMoBoWTEPrj6QVC3mGw== X-Received: by 10.202.63.6 with SMTP id m6mr17299181oia.91.1456144842292; Mon, 22 Feb 2016 04:40:42 -0800 (PST) MIME-Version: 1.0 From: "John D. Ament" Date: Mon, 22 Feb 2016 12:40:32 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: CDI Injection support To: "users@camel.apache.org" Content-Type: multipart/alternative; boundary=001a113dd18011094d052c5b2400 --001a113dd18011094d052c5b2400 Content-Type: text/plain; charset=UTF-8 Hi all, I was looking at the changes that went into Camel 2.17 with CDI injection support. It seems that injection support doesn't work consistently when done not using an annotated member. I tried a few different ways: @Inject @Any private Instance endpointInstance; ... endpointInstance.select(MockEndpoint.class, new UriLiteral("mock:outgoing")).get() Which consistently gives back (in Weld 1.1.x, 2.x, OWB 1.2.x and OWB 1.6.x) an error that no beans are defined, even though I have that endpoint defined. Now, if I try the CDI 1.1 way of using the utility class to look up the instance, it works fine in Weld 2.x but not OWB 1.6.x. As far as I know, this setup should work in both, and since I know I use pattern in other apps I don't think its a case of a bug in the impl. I was wondering if any camel gurus could comment on it? https://github.com/johnament/camel/commit/05dd5f6f8cda541fedfc68c6f199e014defe3f09 John --001a113dd18011094d052c5b2400--