Hi Raymond, Jim,
Comments in line.
Ignacio
----- Original Message -----
From: "Jim Marino" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, August 21, 2006 8:22 PM
Subject: Re: Service, Reference and Binding models
On Aug 21, 2006, at 4:21 PM, Raymond Feng wrote:
Hi,
I think the SPI models for SCDL service/reference/binding are now
becoming out of sync with the SCA spec. The introduction of
BindlessServiceDefinition (I view it as a service with NullBinding) also
worries me.
We discussed this with Ignacio and part of the issue depends on how you
look at it: a composite service viewed from the outside is part of the
component type for the composite impl. Ignacio, do you want to elaborate?
Ok, so it seems like Raymond is trying to collapse all three service
definition classes (ServiceDefinition, BoundServiceDefinition and
BindlessServiceDefinition) into ServiceDefinition, and also both reference
definition classes (ReferenceDefinition and BoundReferenceDefinition) into
ReferenceDefinition. Raymond, let me know if this is not what you mean. I am
not sure why you say they are becoming out of sync. Having separate classes
allows making a distinction between the cases we care about at run time: a
represenation of a service/reference for a component type, for a composite
with a binding, and for a composite without a binding. Notice that a
BindlessReferenceDefinition can be optimized away and so it has been. So the
classification in the model is deliberate rather than out of sync. Now, it
could be argued that having a separate class for each case can become
unwieldy. On the other hand, having a single class requires the code to make
and enforce the distinction and could potentially lead to errors, say, if a
binding is there that is not supposed to be. In the end, the distinction
needs to be made in order for the code to handle the cases, and it becomes a
matter of which choice we feel works better at making the distinction.
Here's the SCDL syntax extracted from the SCA spec 0.96 draft.
<service name="xs:NCName" multiplicity="0..1 or 1..1 or 0..n or 1..n"?>*
<interface/>
<binding uri="xs:anyURI"?/>*
<reference>wire-target-URI</reference>+
</service>
<reference name="xs:NCName" override="sca:OverrideOptions"?
multiplicity="0..1 or 1..1 or 0..n or 1..n"?>*
<interface/>
<binding uri="xs:anyURI"?/>*
</reference>
I plan to some changes to the models to reflect the spec as attached
below. With the updated model, the BindingBuilder could simply deal with
the binding contained by either the ServiceDefinition or
ReferenceDefinition.
What do you guys think?
Raymond, can you summarize the changes you are proposing?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]