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. 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.

Jim

Reply via email to