|
I guess it would make sense if the
startup/shutdown logic really needs to happen when the HiveMind registry is
started/shutdown. However, in a web application, it might be better to
use a ServletContextListener if you’re looking for *application* startup/shutdown hooks. Just
a thought. You might also want to mark your service as private, but since
the service interface is empty, there’s probably no need to. An
outside user can’t really do anything with it anyway if it has no methods.
From: Spencer
Crissman [mailto:[EMAIL PROTECTED] I'm using 1.1. That's a good pointer about the
automatic registration. On 11/7/05, James Carman <[EMAIL PROTECTED]>
wrote: No problem! What
version of HiveMind are you using? If you're using 1.1, you don't have to
manually register your implementation object as a shutdown listener They
will be registered for you automatically (http://issues.apache.org/jira/browse/HIVEMIND-103)
if the implementation class implements RegistryShutdownListener. Also, what purpose would
an empty service interface serve? Are you just trying to perform some
operations upon registry shutdown? I'm just trying to figure out what a
use case would be for that scenario. Of course, you could just be playing
around with HiveMind's features too! :-) Anyway, glad we could
help. Enjoy! From: Spencer
Crissman [mailto:[EMAIL PROTECTED]]
Thank you! This was very helpful. Creating an empty
interface ICleaner and having Cleaner implement it resulting in the expected
behavior (single constructed and shutdown message). On 11/7/05, James
Carman < [EMAIL PROTECTED]> wrote: This happens because the
actual proxy object is an instance of a subclass of Cleaner. You are not
proxying via an interface, so HiveMind is generating a subclass to do the
proxying. From: Spencer
Crissman [mailto:[EMAIL PROTECTED]]
I have a Tapestry application in which I am attempting
to use hivemind for some startup and shutdown handling. Basically
starting some services when loaded, and then cleaning up after them when the
application is undeployed or shutdown. |
- Multiple Instances of Singleton Constructed? Spencer Crissman
- RE: Multiple Instances of Singleton Constructed? James Carman
- Re: Multiple Instances of Singleton Constructed? Spencer Crissman
- RE: Multiple Instances of Singleton Construc... James Carman
- Re: Multiple Instances of Singleton Cons... Spencer Crissman
- RE: Multiple Instances of Singleton... James Carman
- Re: Multiple Instances of Singl... Spencer Crissman
