[ 
https://issues.apache.org/jira/browse/TUSCANY-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Nash closed TUSCANY-2720.
-------------------------------


> 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
>             Fix For: Java-SCA-2.0
>
>         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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to