OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sca-assembly-editors message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [ASSEMBLY-136] Promoting a reference with multiplicity 1..n andtargetsshould default to 0..n - New thoughts



Folks,

Reading Simon Nash's proposal for Assembly-136 gave me a lot of pause for thought.

Not only is his proposal complex, but so is the existing part of the Assembly spec which it is modifying.  Why all the complexity?

We're talking about Section 4.3 - (Component) References here, and I think that a lot of the complexity concerns the @nonOverridable attribute.

My first thought is:  "why the hell do we need the @nonOverridable attribute?"
- if the component and the composite reference are in the same composite, then surely there is no need to mark the component reference in
a way that means "don't promote me" - the developer of the composite can do that for themselves - it's their composite, for heavens sake !!


OK, now I can hear a small voice far off....
"what about team development, where the component is in one composite that is included into a (much bigger) composite? - then there might
be 2 or more developers and it is important to have the ability to mark things this way to aid communication"

OK, I was never convinced by this, but I'll play along for the moment.

So, why doesn't @nonOverridable mean "you can't (ever) promote this component reference"??  That has a nice simple clear meaning.
No messy long explanations and worrying about multiplicities, etc etc.  I could just about vote for something like that.


Another tale I once remember hearing:
"I would like my reference to be promoted, but I would like it that there is a default service provided within the composite for the case where the
component using the composite as an implementation

Why not a simple @defaultService="xxxx" on the composite referencefor this capability??


PROPOSAL (to Resolve Assembly-136)

1) Remove the @nonOverridable attribute from Component References (section 3.4)

2) Add an @defaultService attribute to Composite References (section 5.2)

(add following line 1466)


@defaultService : anyURI (0..1).  A target service URI. The value of the target service URI of the @defaultService attribute  of a composite reference
MUST be a valid service URI of one of the components contained within the same composite as the composite reference. [ASM500xx]  When
@defaultService is specified, the multiplicity of the composite reference MUST be either 0..1 or 0..n.  [ASM500xx]

When the composite containing
a composite reference with @defaultService set is used as the implementation of a (higher level) component, if the configuration of the component
does not provide a target service for the reference corresponding to the composite reference, then the service identified by @defaultService is used
as the target for all of the references promoted by the composite reference.

When the composite containing
a composite reference with @defaultService set is used as the implementation of a (higher level) component, if the configuration of the component
provides one or more target services for the reference corresponding to the composite reference, then the service identified by @defaultService is ignored
and all of the references promoted by the composite reference are wired to the targets configured by the higher level component.


3) Deal with the multiplicity of a composite reference (the original topic of this issue) by replacing the definition of @multiplicity in section 5.2
as follows:

multiplicity : (0..1)  - Defines the number of wires that can connect the reference to target services.  When present, the multiplicity can have one of the following values

o        0..1 – zero or one wire can have the reference as a source
o        1..1 – one wire can have the reference as a source
o        0..n - zero or more wires can have the reference as a source
o        1..n – one or more wires can have the reference as a source

The default value for the @multiplicity attribute is as follows:
1) If the composite reference promotes a single component reference, the default
multiplicity of the composite reference is the multiplicity of the promoted component reference.

2) If the composite reference promotes multiple component references with the same multiplicity, the default multiplicity
of the composite reference is the multiplicity of the promoted component references.

3) If the composite reference promotes multiple component references with different multiplicity values, there is no default
value for the @multiplicity attribute of the composite reference and a value for @multiplicity MUST be specified. [ASM600xx]

4) Where all the promoted component reference multiplicities are 1..n, but each of the promoted component references are
also wired to at least one target service within the composite, the default multiplicity of the composite reference is 0..n


The value specified for the @multiplicity attribute of a composite reference MUST be compatible with the multiplicity
specified on each of the promoted component references, i.e. the multiplicity has to be equal or further restrict.
So multiplicity 0..1 can be used where the promoted component reference has multiplicity 0..n, multiplicity 1..1 can be
used where the promoted component reference has multiplicity 0..n or 1..n and multiplicity 1..n can be used where the
promoted component reference has multiplicity 0..n., However, a composite reference of multiplicity 0..n or 1..n cannot
be used to promote a component reference of multiplicity 0..1 or 1..1 respectively. [ASM60011]

----------------------------------------------------------------------------------------------

That's my proposal.

If you REALLY REALLY can't do without the @nonOverridable attribute, I might just be persuaded to accept a new version
of it along these lines:

nonOverridable : boolean (0..1) - a boolean value, "false" by default, which indicates whether this component reference can
be promoted by a composite reference.  A component reference with @nonOverridable="true" MUST NOT be promoted by a
composite reference. [ASM500xx]

(This would completely replace the material about @nonOverridable in section 4.3)



Yours,  Mike.

Strategist - Emerging Technologies, SCA & SDO.
Co Chair OASIS SCA Assembly TC.
IBM Hursley Park, Mail Point 146, Winchester, SO21 2JN, Great Britain.
Phone & FAX: +44-1962-818014    Mobile: +44-7802-467431  
Email:  mike_edwards@uk.ibm.com





Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU








[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]