The full service name is xxx.services.Counter since
you defined id="xxx.services" .
Try : registry.getService( "xxx.services.Counter", Counter.class );
Achim
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]