You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "Thibault Cuvilleir (JIRA)" <hi...@jakarta.apache.org> on 2005/06/16 15:31:03 UTC
[jira] Created: (HIVEMIND-132) and interface inheritence
<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: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
[jira] Commented: (HIVEMIND-132) and interface inheritence
Posted by "Knut Wannheden (JIRA)" <hi...@jakarta.apache.org>.
[ 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: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
[jira] Commented: (HIVEMIND-132) and interface inheritence
Posted by "Howard M. Lewis Ship (JIRA)" <hi...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/HIVEMIND-132?page=comments#action_12313829 ]
Howard M. Lewis Ship commented on HIVEMIND-132:
-----------------------------------------------
This would be difficult to to using the current system, which is very loath to instantiate even the service interface (if this was not so, then Spring would become a required dependency when using hivemind-lib, for example). It also adds a lot of ambiguities ... do you mean exact match or best match? What is a best match?
> <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: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org