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 B8AEDDFA4 for ; Sun, 29 Jul 2012 16:30:48 +0000 (UTC) Received: (qmail 2628 invoked by uid 500); 29 Jul 2012 16:30:48 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 2069 invoked by uid 500); 29 Jul 2012 16:30:42 -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 2030 invoked by uid 99); 29 Jul 2012 16:30:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Jul 2012 16:30:41 +0000 X-ASF-Spam-Status: No, hits=0.9 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FSL_FREEMAIL_1,FSL_FREEMAIL_2,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of samspade79@gmail.com designates 209.85.220.173 as permitted sender) Received: from [209.85.220.173] (HELO mail-vc0-f173.google.com) (209.85.220.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Jul 2012 16:30:34 +0000 Received: by vcbfl15 with SMTP id fl15so4735315vcb.32 for ; Sun, 29 Jul 2012 09:30:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=1wg+8gfHN36FG2RrZOLPAFznASamq47kY0RvAwyhqeU=; b=RR1WE+SI/cQdvqQ44Irt7UG6lNPErTgAieMlQ1vYZYhmVyvS1/VxhmMM5qeNh+zRdn TqYLql9Qulrgq/8aMhNtEVLcFxagAS47Ddz/2azCvFceeU7giwoXK92hYuq9dkBHAhel JNDZzJD0O8Fovz2J1zsWw9AC3Al/NVgzDKOyDNuWD6H9MRS7qJl+UfszHkd9UEzJQp6Z liqFs0K/cIF2mlgtIEWkL8rULqL6O5VLdLFZVoWITG3BogrbSg3vG1q4T+Mcb18Dj7AD XRrwYesI2zTQ3krH7oglC6NRIR1/SZkOG2LcoFQkN27YjD8fj4nDWpAnBkRQq/ro4uvL hvQA== Received: by 10.221.0.78 with SMTP id nl14mr2325859vcb.21.1343579413886; Sun, 29 Jul 2012 09:30:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.24.133 with HTTP; Sun, 29 Jul 2012 09:29:53 -0700 (PDT) Reply-To: stephenksamuel@gmail.com In-Reply-To: References: <1343472146925-5716579.post@n5.nabble.com> From: "Sam (Stephen Samuel)" Date: Sun, 29 Jul 2012 17:29:53 +0100 Message-ID: Subject: Re: RouteDefinition vs Route To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 I can update camelwatch to add in extra properties, or you could update the project and do a pull request. On Sat, Jul 28, 2012 at 7:45 PM, Bob Jolliffe wrote: > Ah .. just realized that if I cast my CamelContext to a > ModelCamelContext I can do all I need to do with RouteDefinitions > (rather than Routes) > > On 28 July 2012 17:54, Bob Jolliffe wrote: >> Thanks Babak >> >> On 28 July 2012 11:42, Babak Vahdat wrote: >>> Hi >>> >>> the easiest is to check their javadoc: >>> >>> http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Route.html >>> http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/model/RouteDefinition.html >> >> Have done that ... >> >>> Another way around, in the context of the MVC pattern one could claim that >>> the RouteDefinition is 'M' (using JAXB for mapping between Java/XML) whereas >>> the Route abstraction is both the 'V' as well as 'C'. >> >> I almost get what you are saying but it doesn't quite work for me. If >> the Route is a view (which I know is a bit of a stretch) then it has >> to be a view of something. I guess I would expect to see a >> getRouteDefinition() method on the Route in that case. >> >> So my question is that starting from the Context you can get a list of >> Routes and a list of RouteDefinitions. How do these relate to one >> another? I can see that if the Route/RouteDefinitions have an id. >> then you can find one from the other through that, but the coupling is >> loose and possibly for a good reason. >> >> It seems more that a RouteDefinition is a sort of template for >> creating a Route .. probably there is something historic in this as >> the javadocs refer specifically to the element, so there is >> clearly a jaxb model type relationship. Except that the configure() >> method of RouteBuilder also creates a RouteDefinition rather than a >> Route, so RouteDefinition is a bit broader in its semantics than >> that.. >> >> Still exploring further .. thanks. >> Bob >> >>> >>> Babak >>> >>> >>> >>> -- >>> View this message in context: http://camel.465427.n5.nabble.com/RouteDefinition-vs-Route-tp5716578p5716579.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. -- -Sam