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 C56906E06 for ; Thu, 26 May 2011 12:14:22 +0000 (UTC) Received: (qmail 98870 invoked by uid 500); 26 May 2011 12:14:22 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 98846 invoked by uid 500); 26 May 2011 12:14:22 -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 98838 invoked by uid 99); 26 May 2011 12:14:22 -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 12:14:22 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of james.strachan@gmail.com designates 209.85.161.173 as permitted sender) Received: from [209.85.161.173] (HELO mail-gx0-f173.google.com) (209.85.161.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 May 2011 12:14:16 +0000 Received: by gxk26 with SMTP id 26so359668gxk.32 for ; Thu, 26 May 2011 05:13:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:content-type; bh=zdxrbPqF/EfZyQz+YFdnkx2/edkwSEv0OJL7nv/xMoI=; b=YnjKGvlCxYQD16JMY6LqCPP1v8kivcFtYPJFL+i/4BvocE4m7ntOvyHuXWUNGOZ5jo pIz4bwffp8HKdCDedqY4ttOkgcoVCi8Tobz3bSvoP95gxPYhOJ7F+/dqzLIArMiyte8y ljIlH+OgzJ6jMBCTCjE0w7UAbIhxY6z+QbLDg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=d8xyLJqX/vOYeDdgfxjd1TzqWht8o3CSz0lFhegVO9pTV4YRXUnyZ7HQOrDoWoz2VQ iypeWeVw/sH+coHEwSeMFxQHY8NVDiSiclUsD3nu2EQ0qpG8fDT8rOFJxAIBJLz19n3W MXjFjXY0TRx6CmhgX7IDZsdFYY2bsKUH2fPik= Received: by 10.100.237.13 with SMTP id k13mr562842anh.54.1306412035122; Thu, 26 May 2011 05:13:55 -0700 (PDT) MIME-Version: 1.0 Sender: james.strachan@gmail.com Received: by 10.100.209.15 with HTTP; Thu, 26 May 2011 05:13:35 -0700 (PDT) In-Reply-To: <4DDE4044.5030309@spudsoft.co.uk> References: <1306336438485-4425611.post@n5.nabble.com> <4DDE2050.8000308@spudsoft.co.uk> <4DDE4044.5030309@spudsoft.co.uk> From: James Strachan Date: Thu, 26 May 2011 13:13:35 +0100 X-Google-Sender-Auth: bqoyEdaZBzjmXshWIgYCp2szCko Message-ID: Subject: Re: Camel Web Console Questions To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On 26 May 2011 12:57, Jim Talbut wrote: > On 26/05/2011 11:51, James Strachan wrote: >> >> Also we don't need to rewrite camel-web just to provide support for >> multiple contexts; all thats really required is one or two resource >> beans using the OSGi or JMX API to discover the contexts and a >> template page or two and multiple contexts could be supported very >> easily. One of the big reasons I chose JAXRS is its trivial to extend >> a web application in a highly modular way; so folks can easily drop in >> different UIs if they want. Plus its easy to put different facades on >> top of the camel-web; e.g. you could just interact with its REST API >> and put any UI you like on top of it. > > James, > > The complexity here is that we have two choices for the API: > 1. My preferred option is to change all the existing REST URLs so that they > have the camel context name first. Yeah. How about /camel/{contextId}/routes/{routeId} I picked /camel as the root URI for all contexts so that we can then mix this web app with other web apps showing other things without clashing. > Hence this "http://localhost:9080/camelweb/routes/route2" becomes this > "http://localhost:9080/camelweb/contexts/169-camel-7/routes/route2" > This is obviously a breaking change for any existing REST clients and > affects the existing templates too (just in that some of the stuff displayed > by default is not valid without a context). > 2. The alternative, which is less code and less breaking, is to have a > concept of the current default came context. > That would leave all the existing REST URLs alone, but would be stateful and > thus yucky. > Unless someone shouts I'm going to do the first, but it's a bigger change. > Still not too big, I'd have done it by now if my disc heads hadn't nose > dived into the platter and camel trunk had fewer build/test breaks. It shouldn't break terribly much to be honest; the templates are associated with the resource bean types, not their URIs so you can usually refactor the URI templates and move or add resource beans to different places in the URI space without too much problem (unless folks have written their own REST clients that is). We just have to double check the links in the HTML are OK - but typically we try to use relative URIs so hopefully not too many of those will break. -- James ------- FuseSource Email: james@fusesource.com Web: http://fusesource.com Twitter: jstrachan, fusenews Blog: http://macstrac.blogspot.com/ Open Source Integration and Messaging