[
https://issues.apache.org/jira/browse/TUSCANY-2766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dan Becker resolved TUSCANY-2766.
---------------------------------
Resolution: Invalid
Hello Shu Chao Wan,
You've cited the correct conformance item and provided a very good test case.
However, I think there are multiple interpretations of the meaning of
"Compatible means that the component reference interface is the same or is a
strict subset of the composite reference interface."
One meaning of compatible is that all methods in the component reference
interface (in your example CService) are the same or a subset of the composite
reference interface (in your example CSuperService). Your example shows this
and the 2 methods of CService interface are contained as a subset of the 3
methods of CSuperService.
Another meaning of compatible is that the interface of the component reference
interface implements a subset of the interfaces that the composite reference
interface implements. In other words, is component interface assignable from
composite interface? Do they have a super/derived interface defined in the
object hierarchy? The Tuscany implementation uses this later meaning.
Since your example has no assignable relationship between the two interfaces,
they are not compatible. (Otherwise SCA implementation would have to introspect
interface methods and compare sets which might take a while. AssignableFrom
testing is quicker.) You may retry your example by providing object oriented
hierarchy of CSuperService and CService to test this.
(If you do not like this explanation, you may reopen, and we can raise the
issue on the developer list.)
> Warning message conflicts with conformance item ASM60008
> ---------------------------------------------------------
>
> Key: TUSCANY-2766
> URL: https://issues.apache.org/jira/browse/TUSCANY-2766
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Assembly Model
> Affects Versions: Java-SCA-1.3
> Reporter: Shu Chao Wan
> Attachments: ASM60008.patch
>
>
> I'm testing conformance item ASM60008, and found something strange.
> In ASM60008, it says that "The interfaces of the component references
> promoted by a composite reference MUST be the same, or if the composite
> reference itself declares an interface then all the component reference
> interfaces must be compatible with the composite reference interface.
> Compatible means that the component reference interface is the same or is a
> strict subset of the composite reference interface."
> In order to verify this statement, I wrote a composite file like that
> <composite>...
> <service name="AService" promote="AComponent"/>
> <component name="AComponent">
> <implementation.java
>
> class="org.apache.tuscany.sca.vtest.assembly.composite.impl.AServiceImpl" />
> <reference name="b"/>
> <reference name="c">
> <interface.java
> interface="org.apache.tuscany.sca.vtest.assembly.composite.CService" />
> </reference>
> </component>
> <reference name="c" promote="AComponent/c">
> <interface.java
> interface="org.apache.tuscany.sca.vtest.assembly.composite.CSuperService" />
> </reference>
> <reference name="b" promote="AComponent/b"/>
> <service>
> </composite>
> Here, the interface CSuperService is super set of interface CService, that is
> to say, interface CSuperServicecontains more methods than interface CService
> does.
> But when I load this composite file, I got warning message:
> Jan 12, 2009 11:27:27 AM
> org.apache.tuscany.sca.assembly.builder.impl.CompositePromotionBuilderImpl
> WARNING: Interface of composite reference AComponent/c must be compatible
> with the interface declared by promoted component reference.
> Jan 12, 2009 11:27:27 AM
> org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceWireBuilderImpl
> WARNING: Incompatible interfaces on component reference and target: Composite
> = {http://assembly-tests}Assembly-sub-reference-interface-outer-Composite
> Reference = c Service = CComponent
> It seems that this warning message conflicts with this conformance item,
> which causes that service can not be invoked correctly in the following test.
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.