You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Shu Chao Wan (JIRA)" <de...@tuscany.apache.org> on 2009/01/15 15:36:59 UTC

[jira] Updated: (TUSCANY-2770) Missing warning message when verifying connformance item 50011

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

Shu Chao Wan updated TUSCANY-2770:
----------------------------------

    Attachment: ASM50011.patch

> Missing warning message when verifying connformance item 50011
> --------------------------------------------------------------
>
>                 Key: TUSCANY-2770
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2770
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-1.3
>            Reporter: Shu Chao Wan
>            Priority: Minor
>         Attachments: ASM50011.patch
>
>
> I have a question about conformance item 50011 and hope some one could help me.
>  
> Conformance item 50011 tells something about some constraints about interface of <component>'s <reference>.  And here is the detailed description:
>  "A reference has zero or one interface, which describes the operations required by the reference. The interface is described by an interface element which is a child element of the reference element. If no interface is specified, then the interface specified for the reference in the componentType of the implementation is in effect. If an interface is declared for a component reference it MUST provide a compatible superset of the interface declared for the equivalent reference in the componentType of the implementation, i.e. provide the same operations or a superset of the operations defined by the implementation for the reference. "
> In my opinion, I think it is to say that interface declared for a component reference must have equal or more operations than its implementation acturally need. So I write a composite file wire.composite and testcase to verify it.
>  
> -----------------------------
> wire.composite
> -----------------------------
> <composite>...
>    <component name="FComponent">
>      <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.FServiceImpl"/>
>      <reference name="d">
>         <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.DSubService" />
>      </reference>
>      <reference name="c">
>          <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CSubService" />
>      </reference>
>   </component>
>    <component name="CComponent">
>         <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/>
>         <service name="CService"> 
>             <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService"/>
>         </service>     
>     </component>
>     <component name="DComponent">
>         <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.DServiceImpl"/>
>         <service name="DService"> 
>             <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.DService" />
>         </service>        
>     </component>    
>     <wire source="FComponent/d" target="DComponent" />
>     <wire source="FComponent/c" target="CComponent" />
> </composite>
>  
> ---------------------------
> FServiceImpl.java
> ---------------------------
> @Service(FService.class)
> public class FServiceImpl implements FService {
>     @Reference
>     protected CService c;
>     
>     @Reference
>     protected DService d;
> }
>  
> Here, CSubService and DSubService are sub sets of CService and DService respectively.
>  
> When loading this composite file, I haven't got any error message or even warning message, which supposed to appear. 
> And when I switch the CSubService to  CSuperService and DSubService to DSuperService (CSuperService and DSuperService are super sets of CService and DService respectively), I got warning message this time.
> WARNING: Component reference interface incompatible with reference interface: Component = FComponent Reference = d
> WARNING: Component reference interface incompatible with reference interface: Component = FComponent Reference = c
>  
> It seems that it works just on the opposite to the specification. Is there anything wrong with it? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.