hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor A. Deruga" <ingva...@hotbox.ru>
Subject getService doesn't work
Date Mon, 08 Nov 2004 22:18:53 GMT
Ok, here's the problem:
(this descriptions is a good test of my English)

I have some roles (e.g. Streams, Message, Chat, etc) that all extend class 
SessionProcessor. I want to get the role's instance by its name:

	processor = (SessionProcessor) m_registry.getService("Streams", 
		SessionProcessor.class);

For this purpose I'm writing into my hivemodule.xml:

	<service-point id="Streams" interface="src.server.api.SessionProcessor">
		<create-instance class="src.server.roles.impl.StreamsImpl"/>
		<interceptor service-id="hivemind.LoggingInterceptor"/>
	</service-point>

And this thing gives me an error!!! It says: "Service point Streams does not 
exist". There is a method getService with single parameter, but it doesn't 
fit my needs. It works fine with one role, but when I add one more role, it 
won't work: I'll have two service-points with 
interface="src.server.api.SessionProcessor". 

What's the big difference between those two implementations  of the method 
"getSerivce"?

Sincerely
	Igor

P.S.: another variant of this question: give me the example environment where 
getService(String, Class) would work (I mean the one with two parameters).

---------------------------------------------------------------------
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