Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

  • business interface class name
  • component reference (componentURI, reference binding type, reference binding URI, callback binding type, callback binding URI)
  • conversation id
  • callback id

Serialization of a CallableReference

The target attribute of a <reference> is list of relative URIs (componentName/serviceName). The URI is only resolvable in the context of the containing composite.

Let's assume we have the following composition:

composite1 --- component1 (implementation.composite) --- component11#reference1
                                                                                  --- component12#service1

And component11#reference1 is declared as follows:

Panel

<reference name="reference1" target="component12/service1">
    <binding.sca/>
    <binding.x/>
</reference>

When we create a CallableReference for "component12/service1", I think we need to capture the URI of the containing component as well.

The base URI is "component1/component11" (the URI of the component that declares the reference) and the relative URI is "component12/service1". The resolved URI could be "sca:/component1/component12#service1". The reason I use "#" instead of "/" for the service is to avoid the ambigulity when the relative URI is "component12" if "service1" is the only available service.

The serialized CallableReference can look like:

Panel

<reference xmlns:t="http://tuscany.apache.org/xmlns/sca" t:conversationID="conversation_001" t:callbackID="callback_001">
    <interface.java interface="<businessInterfaceClassName>"/>
    <binding.choice uri="sca:/component1/component12#service1"/>
        <binding.sca/>
        <binding.x/>
    </binding.choice>
</reference>

I'm thinking of using <binding.choice> as an internal binding that encapsulates a list of candidate bindings which later on can be matched against the service.

Panel

<reference name="$internal$.callableReference" target="component12/service1"

    xmlns:t="http://tuscany.apache.org/xmlns/sca"
    t:parentURI="component1"
    t:conversationID="conversation_001"
    t:callbackID="callback_001">
    <interface.java interface="<businessInterfaceClassName>"/>
    <binding.sca/>
    <binding.x/>
    <callback>
        ...
    </callback>
</reference>

Resolve a CallableReference/ServiceReference to live model objects for local optimizations:

...