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 1B1C9E842 for ; Thu, 14 Feb 2013 12:39:19 +0000 (UTC) Received: (qmail 81708 invoked by uid 500); 14 Feb 2013 12:39:18 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 81562 invoked by uid 500); 14 Feb 2013 12:39:18 -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 81542 invoked by uid 99); 14 Feb 2013 12:39:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2013 12:39:17 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.210.179] (HELO mail-ia0-f179.google.com) (209.85.210.179) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2013 12:39:12 +0000 Received: by mail-ia0-f179.google.com with SMTP id x24so2202726iak.24 for ; Thu, 14 Feb 2013 04:38:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cranton.com; s=google; h=mime-version:x-received:x-originating-ip:date:message-id:subject :from:to:content-type; bh=BF42NTGgjoF6MNoOxQlHWHLhRIZAD6caxFIgA8PozCo=; b=CQ9nzBJRBQxjGXaxMVskkMOenBnIMLO+35+5SB3rm7nxlUsXUPHYIngZ5zs0Ro2vfO Z1DKiECpM8mBq4e4Ym5O33wqvc9CgiWHEc153jW5VuWzVQZiShclz5tet/yPhRXW2FBF cFBbpNdttDUp1QEQBCZc42HRf/n0UMODEGjyE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:x-originating-ip:date:message-id:subject :from:to:content-type:x-gm-message-state; bh=BF42NTGgjoF6MNoOxQlHWHLhRIZAD6caxFIgA8PozCo=; b=OJNog2vPLjR/9WGOs5gGKqQWoNOaImcEr7UNW9/kEQaLRPhFsxx6R8x5azqvx0rpd2 3NQHEf1yli4w7KeUIfuZrm5sUq2znGdiVRbVu0krVFHw8tspAbD1aYfeLBy8IqQp4k3V MMXMoJSrKBxeddO0IlBe39xT5nlQTC8ENgaWymwePfoMi3YyqHFeUirCAK03ga+opvHL UIF6+EZ9aKbpVtXGa9GZwPwvSCrzQuk2ksIDj4Vj0jmhUmLcs/qIt9wH2fhAzRs+bl7g Sr70Z4/krtBKgQlt5BUEEhwxmJoxKFO/1b4/KmOkYvo3jueEOEGT+Y5v3+AqL1C3eL2C iDRA== MIME-Version: 1.0 X-Received: by 10.42.133.133 with SMTP id h5mr2262795ict.45.1360845531563; Thu, 14 Feb 2013 04:38:51 -0800 (PST) Received: by 10.64.24.148 with HTTP; Thu, 14 Feb 2013 04:38:51 -0800 (PST) X-Originating-IP: [24.128.50.227] Date: Thu, 14 Feb 2013 07:38:51 -0500 Message-ID: Subject: URI references to Objects in the Registry From: Scott Cranton To: users@camel.apache.org Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmh7OJEXLE9zhohTTmw1YrI+gwEl9wz81x6EfD5KCgUUh0HU7Pzu7x9c3k3Gjo6Gx6qwXmS X-Virus-Checked: Checked by ClamAV on apache.org I've just noticed the reference syntax that some components use, but its not clear to me exactly how it works, and more importantly how new components are supposed to use it correctly... I don't see any documentation on it, and I've only found some mentions of it in the JIRA where it was created and in the camel code itself. Sorry if I missed an earlier thread on this, but I couldn't find it... It looks like Camel will resolve "#name" values for endpoint uri properties to the a Registry id instance. The above syntax will set the Component's configuration, internally resolving "#bar" to the bean instance from the Camel Registry... setObjectProperty(some.java.clazz value) I'm also seeing some cases where it looks like there is magic if you suffix a property name with "Ref" that will do the same thing... I assume its the same base Component and Endpoint code that's resolving this, but I can't find it (yet)... The confusing bit is that some Processors and Component doc use different conventions... It looks like an effort was made to normalize this convention around version 2.2 or 2.3 timeframe, hence some of the inconsistencies... My question is what is the current "best practice" and/or what would we like the convention, both in code and in doc, for version 3 BTW: I like the reference syntax, but it did take me a bit to figure out "is this a Spring thing" or "Camel magic", and "is it just '#name' that is magic and/or is suffixing with Ref magic", etc. Thanks, Scott