[
http://issues.apache.org/jira/browse/HIVEMIND-132?page=comments#action_12313827
]
Knut Wannheden commented on HIVEMIND-132:
-----------------------------------------
Thibault,
This should work. I just tried the following which works.
public interface A {...}
public interface B extends A {...}
public class BImpl implements B {...}
public interface C {...}
public class CImpl implements C {
public void setA(A a) {...}
...
}
<module id="test" version="1.0.0">
<service-point id="B" interface="B">
<create-instance class="BImpl"/>
</service-point>
<service-point id="C" interface="C">
<invoke-factory>
<construct class="CImpl">
<set-service service-id="B" property="a"/>
</construct>
</invoke-factory>
</service-point>
</module>
Can you please show me the error message you get and the Java source + module
descriptor?
> <set-servive> and interface inheritence
> ---------------------------------------
>
> Key: HIVEMIND-132
> URL: http://issues.apache.org/jira/browse/HIVEMIND-132
> Project: HiveMind
> Type: Bug
> Components: framework
> Versions: 1.1
> Environment: Windows XP, Hivemind 1.1 beta, JDK 1.4
> Reporter: Thibault Cuvilleir
>
> Hi !
> => A is not a service interface
> Interface A { ...}
> => B is a Hivemind service interface
> interface B extends A {...}
> => BService is a service-id declared in the module desriptor. BService
> implents B
> class BServiceImpl implements B {...}
> => CService has a dependance to B, but wants to use the interface A:
> class public MyServiceImpl implements C {
> private A _otherService;
> public void setOtherService(A service) { ... }
> }
> >>>> Then <set-service service-id="BService" property="otherService> failed.
> <set-service> try to match a setter method with the exact service interface
> (B) and is unable to find a setter method with one of the extended interface
> (A).
> Best regards,
> Thibault Cuvillier
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]