On Thu, May 12, 2011 at 5:13 PM, Simon Laws <simonsl...@googlemail.com> wrote:
> I think having a web page to access the domain is a great idea. I'd
> like to see a more comprehensive URL space support in the future. For
> example, this is what came to mind when I actually sat down and put
> pen to paper.
>
> http://somehost:someport/sca/
>   {domainname}/                -> get the service document, i.e.
> links the following collections
>        contribution/           -> get a list of installed
> contributions (atom/rss?)
>            {contributionURI}/  -> get the contribution archive (or its URL?)
>               relative/uri/of/artifact -> get the artifact (see section 
> 10.4.1)
>               ?artifact=artifact identifier -> get the artifact
> (identifier here could be, e.g. namespace item)
>             composite/         -> list of all composites in the
> contribution (includes deployment time composites)
>        composite/              -> get a list of available composites
> (atom/rss?)
>            spec/               -> get the domain composite as per the
> spec with includes for deployed composites
>            exploded/           -> get the exploded domain composite as XML
>            {compositeQName}   -> get the .composite file regardless
> of whether deployed or not. Could get the GSoC picture here
>            ?element=xpath      -> get that part of the domain
> composite as XML using XPath as per policy attachment
>        node/                   -> get the list of running nodes in
> the domain (atom/rss?)
>            {node name}         -> get the XML configuration for the named node
>        endpoint/               -> get the list of all active
> endpoints (atom/rss?)
>            {endpointURI}      -> get the XML representation of the
> named endpoint
>        policy/                 -> TBD
>
> I don't really know if that's the optimal design, is complete or if
> all of these would be useful as I haven't actually tried it yet. I
> started playing in my sandbox and I'll stay there for the time being
> as I see that it's been  suggested that GSoC pick up node-manager and
> I don't want to trample on that.
>
> My real objective for thinking these thoughts was to find out if I
> could extract this info from the domain registry. Even in simple
> testing it's encouraging to see endpoints, composites etc. coming and
> going as nodes are started and stopped.
>
> I note that a node activator extension has been added. What's the
> objective of that? I'm starting to think that it will be useful to
> have node information shared in the registry. It looks like this
> activator is an in-JVM thing though?
>
> Simon
>
> --
> Apache Tuscany committer: tuscany.apache.org
> Co-author of a book about Tuscany and SCA: tuscanyinaction.com
>

A newby jax-rs question related to this. With the Tuscany jax-rs
integration how can I get two components to be part of the same URL
space when there is a variable part in the URL, for example, the
domain example from my previous post. Let's say I want my URL to be

http://localhost:8080/sca/domain/{domainname}/XYZ

where XYX could be contribution, composite etc. In this case if I want
a domain component mapped to
http://localhost:8080/sca/domain/{domainname} and a composite
component mapped to
http://localhost:8080/sca/domain/{domainname}/composite is that
possible. Or would I have to do
http://localhost:8080/sca/domain/{domainname} and
http://localhost:8080/sca/domain/composite/{domainname} which doesn't
seem right.

This is where I ended up with me .composite.

    <component name="Domain">
        <implementation.java class="org.apache.tuscany.sca.domain.DomainImpl"/>
        <service name="Domain">
            <tuscany:binding.rest uri="/sca/domain">
                <tuscany:operationSelector.jaxrs/>
            </tuscany:binding.rest>
        </service>
    </component>

<!--
 don't know how to map multiple components to a variable root
    <component name="Composite">
        <implementation.java
class="org.apache.tuscany.sca.domain.CompositeImpl"/>
        <service name="Composite">
            <tuscany:binding.rest uri="/sca/domain">
                <tuscany:operationSelector.jaxrs/>
            </tuscany:binding.rest>
        </service>
    </component>
-->

I can of course make it work using a single component, which is where
I started, but I wanted to learn more about the jax-rs integration.

Regards

Simon

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

Reply via email to