You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Dmitry Kozakov <di...@java.crimea.com> on 2005/06/17 11:56:06 UTC
Registry shutdown
Hi All
During startup HiveMind do all job for constructing and composing
services. But does it make any cleanup actions before shutdown?
(In source I see that it makes only shutdown notification).
Example: I wrote 2 services one of the them is a listener for events
from other. When HimeMind startup it adds service as a listener
for other automatically but during shutdown it does not remove this
listener.
<service-point id="Service1" interface="example1.IService1">
<invoke-factory>
<construct class="example1.Service1"
autowire-services="false"/>
</invoke-factory>
</service-point>
<service-point id="Service2" interface="example1.IService2">
<invoke-factory>
<construct class="example1.Service2" autowire-services="false">
<event-listener service-id="Service1"/>
</construct>
</invoke-factory>
</service-point>
<contribution configuration-id="hivemind.EagerLoad">
<load service-id="Service1" />
<load service-id="Service2" />
</contribution>
I understand that I can do in other way
<service-point id="Service1" interface="example1.IService1">
<invoke-factory>
<construct class="example1.Service1"
autowire-services="false"/>
</invoke-factory>
</service-point>
<service-point id="Service2" interface="example1.IService2">
<invoke-factory>
<construct class="example1.Service2" autowire-services="false">
<set-service property="service1" service-id="Service1"/>
</construct>
</invoke-factory>
</service-point>
<contribution configuration-id="hivemind.EagerLoad">
<load service-id="Service1" />
<load service-id="Service2" />
</contribution>
and in the initializeService() of the Service2 add it as listener of the
Service1 manually
and on the shutdown event remove it. But in this case I must specify
methods addListener and removeListener as a part of the API
Thanks
--
Best Regards,
Dmitry
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org