hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksej <alek...@ivs.lt>
Subject Re: Using hivemind in servlets and pointing modules locations in general
Date Fri, 29 Jul 2005 10:18:07 GMT
Aleksej wrote:

> Hi!
> I have such problem:
> In web-application I use HiveMindFilter as showen in hivemind 
> documentation.
> there is xxx.services and xxx.servives.impl packages, where first 
> contains interfaces
> and second implementations. In web.inf i have such entry:
> ----------
> <filter>
>   <filter-name>HiveMindFilter</filter-name>
>   <filter-class>org.apache.hivemind.servlet.HiveMindFilter</filter-class>
> </filter>
> <servlet>
>   <servlet-name>App</servlet-name>
>   <servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
> </servlet>
> <filter-mapping>
>   <filter-name>HiveMindFilter</filter-name>
>   <servlet-name>App</servlet-name>
> </filter-mapping>   ----------
> in WEB-INF there is hivemodule.xml file which looks like that:
> ----------
> <?xml version="1.0"?>
> <module id="xxx.services" version="1.0.0" package="xxx.services">
>    <service-point id="Counter" interface="Counter">
>        <create-instance class="impl.CounterImpl" />
>    </service-point>
> </module>
> ----------
> there is xxx.services.Couner.java and 
> xxx.services.impl.CounterImpl.java files
> and my code looks like:
> ----------
> Registry registry= RegistryBuilder.constructDefaultRegistry();
> Counter test= (Counter) registry.getService( "Counter", Counter.class );
> ----------
>
> but I got such exceptions:
> org.apache.hivemind.impl.RegistryInfrastructureImpl.getServicePoint(RegistryInfrastructureImpl.java:177)

> org.apache.hivemind.impl.RegistryInfrastructureImpl.getService(RegistryInfrastructureImpl.java:203)

>
> org.apache.hivemind.impl.RegistryImpl.getService(RegistryImpl.java:68)
>
> I think I miss something but really can't understand what.
> Documentaion claims that filter will inicialize registry using 
> WEB-INF/hivemodule.xml
> but I am not sure about it. Maybe module description is incorrect? I 
> am stuck...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>
>
>
Oh, by the way, excepiton message is:
Service point Counter does not exist :)

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Mime
View raw message