You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Ku Jun Guo (JIRA)" <de...@tuscany.apache.org> on 2008/12/05 07:04:46 UTC
[jira] Updated: (TUSCANY-2720) The Multiplicity attribute of
reference failed to work as expected
[ https://issues.apache.org/jira/browse/TUSCANY-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ku Jun Guo updated TUSCANY-2720:
--------------------------------
Attachment: TUSCANY-2720.zip
My test classes and composite file.
> The Multiplicity attribute of reference failed to work as expected
> ------------------------------------------------------------------
>
> Key: TUSCANY-2720
> URL: https://issues.apache.org/jira/browse/TUSCANY-2720
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Assembly Model
> Reporter: Ku Jun Guo
> Attachments: TUSCANY-2720.zip
>
>
> As the OASIS and OSOA specification said, if multiplicity is specified "1..1", the target number should be one.
> But when I tested the following case, it passed.
> For the OASIS spec,
> "A reference with multiplicity 0..1 or 1..1 MUST NOT have more that one target service defined. [ASM50019]"
> My composite file likes this:
> <reference name="bService" target="ServiceComponent/MyService ServiceComponent2/MyService" multiplicity="1..1">
> </reference>
> My client class likes this:
> @Reference
> protected MyService[] bService ;
> void test() {
> ...
> for (MyService s: bService) {dosomething()}
> ...
> }
> I only found one warning message: "WARNING: Too many targets on reference: bService"
> I think it should be a runtime error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.