hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Barran <>
Subject Hivemind Service Wiring Issue.
Date Wed, 08 Feb 2006 17:40:40 GMT
I have created a set of services that depend on each other.
ServiceA depends on ServiceB which depends on ServiceC

If I write a unit test that builds the HiveMind registry.
I can get out ServiceC and test it, works OK

If I get ServiceB and test it works OK.

If I get ServiceA and test it, fails because
ServiceB has no reference to ServiceC.

I guess this is something to do with proxies ?

When I get ServiceB from the registry a proxy is created for ServiceC
and when I use the service it is instanciated.

However when I get ServiceA from the registry a Singlton proxy is 
created for ServiceB but I see no such message about autowiring a Single 
ton proxy for ServiceC. When the code tries to access ServiceC I get a 
NullPointerException. Any ideas.

<?xml version="1.0" encoding="UTF-8"?>
<module id="myModule"  version="1.0.0">
     <service-point id="ServiceC" interface="">
     <create-instance class="" />
   <interceptor service-id="hivemind.LoggingInterceptor"/>

    <service-point id="ServiceB" interface="">
     <invoke-factory service-id="hivemind.BuilderFactory">
     <construct class="" autowire-services="true" />
   <interceptor service-id="hivemind.LoggingInterceptor"/>

   <service-point id="ServiceA" interface="" >
     <invoke-factory service-id="hivemind.BuilderFactory">
       <construct class="" autowire-services="true">
        <set property="country" value="GB" />
        <set property="company" value="COMPANY" />
        <set property="url" value="" />
        <set property="script" value="/foo/bar.jsp" />
     <interceptor service-id="hivemind.LoggingInterceptor"/>

Dr Chris Barran
Senior Systems Developer
Internet Technologies Team
The University of Sheffield
Tel: +44 114 2221193

View raw message