Service ids in HiveMind are qualified by the id of the declaring
module. So your code should read:
getService("mymodule.Streams", SessionProcessor.class);
--knut
On Tue, 9 Nov 2004 01:18:53 +0300, Igor A. Deruga <[EMAIL PROTECTED]> wrote:
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]