Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 59153 invoked from network); 15 May 2009 12:56:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 May 2009 12:56:46 -0000 Received: (qmail 32510 invoked by uid 500); 15 May 2009 12:56:46 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 32473 invoked by uid 500); 15 May 2009 12:56:46 -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 32463 invoked by uid 99); 15 May 2009 12:56:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2009 12:56:46 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2009 12:56:37 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1M4wxU-0002xp-El for users@camel.apache.org; Fri, 15 May 2009 05:56:16 -0700 Message-ID: <23559311.post@talk.nabble.com> Date: Fri, 15 May 2009 05:56:16 -0700 (PDT) From: uprooter To: users@camel.apache.org Subject: DSL Strings pitfalls, how to avoid them? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: uprooter@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org Hello all. My first camel ride was really fun, keep up the good work. I'm concerned about DSL strings. Specifying strings as methods/beans/pojos is something I'd like to avoid from two reasons: Let's say I have something like this in my code: from("jms").unmarshal(jaxb).choice().when().method("MyBean","isCommand") 1. Usually, when I rename "MyBean" in standard java code, my IDE takes care to scan all my project, sometimes even dependency projects. and do the refactor. In java DSL it does not happen, since it's just a string. 2. Moreover, When I accidentally specify a wrong string instead of "MyBean" or "isCommand" everything compiles just fine but at runtime errors will occur at unpredictable manner, This kind of error can easily get into production environment in projects that lacks organized testing habits. The first doubt is something I can live with, but the second is a problematic issue. Fix me if I'm wrong. Or if there is any solution to this. Thanks -- View this message in context: http://www.nabble.com/DSL-Strings-pitfalls%2C-how-to-avoid-them--tp23559311p23559311.html Sent from the Camel - Users mailing list archive at Nabble.com.