On Mon, May 16, 2011 at 11:12 AM, Simon Laws <simonsl...@googlemail.com> wrote:
> ...snip
>>
>> It looks like this fits very weel in the concept of JAX-RS 
>> resource/sub-resource
>> http://incubator.apache.org/wink/1.1.1/html/JAX-RS%20Resources,%20HTTP%20Methods,%20and%20Paths.html
>>
>> The idea is that you define a top level resource, that "handles" the
>> "domain" path, then it could redirect the "domain/composite" path to a
>> different component.
>>
>> Please let me know if this helps, if you want I can build an example
>> in the node-manager module.
>>
>>
>> --
>> Luciano Resende
>> http://people.apache.org/~lresende
>> http://twitter.com/lresende1975
>> http://lresende.blogspot.com/
>>
>
> That does sound like the right sort of thing however it's still not
> clear how the second component is configured from an SCA point of
> view, e,g,
>
> http://localhost/sca/domain/{domainid} -> ComponentA  - binding url =
> "http://localhost/sca/domain/";
> http://localhost/sca/domain/{domainid}/composite -> ComponentB -
> binding url = "http://localhost/sca/domain/";
>
> So both SCA components have the same binding url because the next path
> element is variable. Are there some smarts in the rest binding
> implementation that allow this to happen? I haven't actually tried it
> but I will when I get five minutes.
>
> Simon
> --
> Apache Tuscany committer: tuscany.apache.org
> Co-author of a book about Tuscany and SCA: tuscanyinaction.com
>

Re-reading this I wasn't very clear. I appreciate that within the Java
implementation you could have multiple Java classes and use the
sub-resource pattern you pointed at to direct requests accordingly.
What I was wondering though was whether the Tuscany REST binding had
any ability to do a similar job of partitioning a URL across multiple
components.

Simon

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Reply via email to