From dev-return-6092-apmail-activemq-dev-archive=activemq.apache.org@activemq.apache.org Wed Apr 04 14:44:48 2007 Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 98902 invoked from network); 4 Apr 2007 14:44:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Apr 2007 14:44:48 -0000 Received: (qmail 66363 invoked by uid 500); 4 Apr 2007 14:44:54 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 66342 invoked by uid 500); 4 Apr 2007 14:44:54 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 66333 invoked by uid 99); 4 Apr 2007 14:44:54 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2007 07:44:54 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of james.strachan@gmail.com designates 66.249.82.224 as permitted sender) Received: from [66.249.82.224] (HELO wx-out-0506.google.com) (66.249.82.224) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2007 07:44:45 -0700 Received: by wx-out-0506.google.com with SMTP id h29so223944wxd for ; Wed, 04 Apr 2007 07:44:25 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=adbhzJogixz0JLrzHvYqv/Pkc2WcwsFoFSolAHbHFID1mQUd4na5xntjmAq3IaLFPHHKxpSb9n5v0YQPkT1kgg3Rxsd2OcLK0/PL3u0jUnbWkIP1mHfJVAIhzyjpnyK+S39MTfHB9FuewOqIqTEADfAIyzkBCa4Q5c3kj/VUWCo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=gUxGmbb1UB+7KqIwsyq+cUpuImpRipEzLwfmorQ73CzKQ0NOpJAdnXhQHE02QaWGWCOPDnJ1sCBv+AM/3gE7X/1zPlUjngwOdT+UrzBU5NaXmrQRyWtcU75EaG6IfgfMWDd0VshI+o+htmU2Szpopjas4RFXJsTfxq0TyN4gWs8= Received: by 10.90.31.19 with SMTP id e19mr465816age.1175697864872; Wed, 04 Apr 2007 07:44:24 -0700 (PDT) Received: by 10.90.51.6 with HTTP; Wed, 4 Apr 2007 07:44:24 -0700 (PDT) Message-ID: Date: Wed, 4 Apr 2007 15:44:24 +0100 From: "James Strachan" To: dev@activemq.apache.org Subject: [Camel] simplified discovery of Component/Endpoints available MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org I found the old implementation of EndpointResolver a bit smelly; so I've tried to clean it up to make it easier for folks to write new components. The basic idea is * folks should generally only need to write a Component & Endpoint implementation; no other classes needed other than maybe Producer/Consumer * components can create new endpoints via the resolveEndpoint(uri) method; the can just derive from DefaultComponent and get most of the URI magic for free; just overloading the actual factory method to create an Endpoint * adding a file in META-INF/services/org/apache/came/component/${scheme} can plugin auto-discovered components * users can explicitly instantiate, configure & register components to the CamelContext; or via the Injector the CamelContext can auto-inject them with their required dependencies. (e.g. folks could have a single DataSource or ConnectionFactory in a spring context which could be auto-injected etc) I've written a little bit of documentation for component developers here... http://cwiki.apache.org/CAMEL/writing-components.html I've just committed the above changes. Thoughts? -- James ------- http://radio.weblogs.com/0112098/