Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D7D9C1729E for ; Wed, 29 Oct 2014 10:00:53 +0000 (UTC) Received: (qmail 11975 invoked by uid 500); 29 Oct 2014 10:00:53 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 11931 invoked by uid 500); 29 Oct 2014 10:00:53 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 11902 invoked by uid 99); 29 Oct 2014 10:00:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2014 10:00:53 +0000 X-ASF-Spam-Status: No, hits=-2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tdiesler@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2014 10:00:26 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9TA0Nw0007214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 29 Oct 2014 06:00:23 -0400 Received: from [10.36.4.90] (vpn1-4-90.ams2.redhat.com [10.36.4.90]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9TA0K6n024280 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 29 Oct 2014 06:00:22 -0400 From: Thomas Diesler Content-Type: multipart/alternative; boundary="Apple-Mail=_3AD039CC-4F18-4A53-9103-D77BBF4C7877" Date: Wed, 29 Oct 2014 11:00:19 +0100 Subject: [CAMEL-7969] Container sees Context prematurely (with default name) To: dev@camel.apache.org Message-Id: Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_3AD039CC-4F18-4A53-9103-D77BBF4C7877 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Folks, for the WildFly/Camel = integration I=E2=80=99= m looking for the general notion of a CamelContextRegistry. This would = be an SPI extension point that allows retrieval of a registered = CamelContext identified by some id. Ideally, the registry would contain = all CamelContexts regardless what API (i.e. spring, cdi, dsl) is used. = Instances of (or extending) DefaultCamelContext should be registered = automatically. There is already a starting point for that - the Container = . It has however a number of issues = (CAMEL-7968 = CAMEL-7969 ) One of my key questions would be about the identity of a CamelContext. = The closest I could find is the (mutable) =E2=80=99name=E2=80=99 = property. Because of its mutability and possible unavailability after = construction time, it is not a good identity. As a result, 3rd party = code is being called with a partially constructed CamelContext without = defined name property. Uniqueness of CamelContext name is also an issue, = because not enforced. I=E2=80=99d like to propose to make the CamelContext name immutable. It = can probably still be initialed lazy, but only once. For compatibility = reasons it could write a warning in the 2.x series and be properly = enforced in 3.x. The existing extensions (i.e. spring, cdi, osgi) could = properly construct the DefaultCamelContext with a given name.=20 Calls to the Container API would need to get fixed such that 3rd party = only sees fully constructed instances. If this is not possible to do in = a compatible way, one could deprecate the Container API and make a = CamelContextRegistry part of camel-core. 3rd party would then be = registering listeners with the registry, instead of providing a = singleton Container as it is now. What do you think? cheers =E2=80=94thomas= --Apple-Mail=_3AD039CC-4F18-4A53-9103-D77BBF4C7877--