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 B20746711 for ; Thu, 26 May 2011 16:07:09 +0000 (UTC) Received: (qmail 27380 invoked by uid 500); 26 May 2011 16:07:09 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 27335 invoked by uid 500); 26 May 2011 16:07:09 -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 27326 invoked by uid 99); 26 May 2011 16:07:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 May 2011 16:07:09 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cmoulliard@gmail.com designates 209.85.210.45 as permitted sender) Received: from [209.85.210.45] (HELO mail-pz0-f45.google.com) (209.85.210.45) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 May 2011 16:07:04 +0000 Received: by pzk30 with SMTP id 30so441038pzk.32 for ; Thu, 26 May 2011 09:06:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=pzr4JZrNuoy6ybwEJyQbnGfSesAPTicHj7p6cq8elHA=; b=DkjH3yLBXhadcYIkQbGXtUhFas5CMYyuQy16ddfC+QkchnH7Yah5+GWy+T1th68dF7 nsYLLr1H4Ed1xGIG7Os00mtdhu4gHm3eGRBqprKAKvAFBz7F8AQGSsrAYjW3uJyOdwbA OXYagumZ7+daZBokJy3EEKcMM9rkwmkHnB98o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=BRDi3RG3ZylBw0yfGFdJ3e+yODU36py0XqNH8emryxGR7BKgqoZUfQfouPpyClCRb7 Vtxp4rBU0NAHczzYelX/jn2/XKHbK7YKNOnr3fwVoTA1n4jqODKQwlLq/kB8HqRs8PPT NgK1jYDGfTb6mp4+h3d+7FrqY/04pkogVwaSs= MIME-Version: 1.0 Received: by 10.142.250.42 with SMTP id x42mr204111wfh.95.1306426002813; Thu, 26 May 2011 09:06:42 -0700 (PDT) Received: by 10.142.255.21 with HTTP; Thu, 26 May 2011 09:06:42 -0700 (PDT) In-Reply-To: <1306425199397-4429064.post@n5.nabble.com> References: <1306421070131-4428835.post@n5.nabble.com> <1306422650281-4428921.post@n5.nabble.com> <1306425199397-4429064.post@n5.nabble.com> Date: Thu, 26 May 2011 18:06:42 +0200 Message-ID: Subject: Re: loadRoutesDefinition and jaxb.index From: Charles Moulliard To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Have you tried to create the process like that from(queue) .process(new Processor() { public void process(Exchange e) throws Exception { String xml = (String) e.getIn().getBody(); InputStream is = e.getContext().getTypeConverter().mandatoryConvertTo(InputStream.class, xml); RoutesDefinition def = e.getContext().loadRoutesDefinition(is); e.getContext().addRouteDefinitions(def.getRoutes()); } }); Regards, Charles Moulliard Sr. Principal Solution Architect - FuseSource Apache Committer Blog : http://cmoulliard.blogspot.com Twitter : http://twitter.com/cmoulliard Linkedin : http://www.linkedin.com/in/charlesmoulliard Skype: cmoulliard On Thu, May 26, 2011 at 5:53 PM, virgile.devaux@atosorigin.com wrote: > > Charles Moulliard wrote: >> >> How have created your camelContext ? >> > > The first route reads form a activemq queue. It receives the xml file and > create a processor giving him the message and its camelcontext. > So i do not need to create another camelcontext: > > DynamicRouteHandler dynamicRouteHandler=new > DynamicRouteHandler(this.getContext(), configProp); > from(queue).process(dynamicRouteHandler); > > Hope i'm clear enough. > Thanks for your time. > > -- > View this message in context: http://camel.465427.n5.nabble.com/loadRoutesDefinition-and-jaxb-index-tp4428835p4429064.html > Sent from the Camel - Users mailing list archive at Nabble.com. >