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 0A7BBDB44 for ; Thu, 5 Jul 2012 06:15:56 +0000 (UTC) Received: (qmail 71959 invoked by uid 500); 5 Jul 2012 06:15:21 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 71923 invoked by uid 500); 5 Jul 2012 06:15:20 -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 71875 invoked by uid 99); 5 Jul 2012 06:15:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jul 2012 06:15:19 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.139.236.26 is neither permitted nor denied by domain of cmoulliard@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jul 2012 06:15:14 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1SmfL3-0003oU-3d for dev@camel.apache.org; Wed, 04 Jul 2012 23:14:53 -0700 Date: Wed, 4 Jul 2012 23:14:53 -0700 (PDT) From: Charles Moulliard To: dev@camel.apache.org Message-ID: <1341468893106-5715512.post@n5.nabble.com> In-Reply-To: References: Subject: Re: camel cdi extension MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Romain, This is really interesting what you have have developed. I don't really like how you add RouteBuilder in the create method (class CamelContextBean) and I would prefer that the user can provide this information like we do in a more Camel traditional way. By the way, I suggest that in the CamelContextBean class (method create) we use CdiCamelContext as it implements Camel Registry to do CDI bean lookup in the registry. @Inject @CamelContextId("context1") private CamelContext ctx1; ctx1.addRoutes(new MyRouteBuilder()) Remark : camel-cdi (2.10) allows already to do this ;-) @Inject protected CdiCamelContext camelCtx; @Inject protected org.fusesource.example.cdi.camel.SimpleCamelRoute simpleRoute; ... simpleRoute.setTimerUri("timer://simple?fixedRate=true&period=10s"); // Add Camel Route camelCtx.addRoutes(simpleRoute); So what could be the benefit to use this CDI extension ? I will have a look on that today. Regards, Charles ----- Apache Committer / Sr. Pr. Consultant at FuseSource.com Email: [hidden email] Twitter : @cmoulliard, @fusenews Blog : http://cmoulliard.blogspot.com -- View this message in context: http://camel.465427.n5.nabble.com/camel-cdi-extension-tp5715506p5715512.html Sent from the Camel Development mailing list archive at Nabble.com.