hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <>
Subject RE: RegistryShutdownListener interface
Date Wed, 04 May 2005 01:10:24 GMT

I asked for this before, I think.  What I wanted was to make a Hibernate
Session a service and have the registry actually call the close() method for
me upon thread cleanup (we should probably name the attribute
"destroy-method" rather than "shutdown-method" so folks know that it can be
called on thread cleanup as well as registry shutdown).  Now, I have to
perform a little trick like I did in the code that came with my article to
automatically close the session on thread cleanup.  I think the service
models would have to take responsibility for making sure that the
destroy-method is called at the appropriate time (registry shutdown for
pooled, singleton, and primitive and upon thread cleanup for threaded),
similar to how I did it in my custom service implementation factory.  I
would recommend creating a JIRA issue for this enhancement request and we
can discuss/vote there.  What do you think?


-----Original Message-----
From: Hensley, Richard [] 
Sent: Tuesday, May 03, 2005 6:37 PM
Subject: RegistryShutdownListener interface

Would it be possible to make the RegistryShutdownListener interface an
optional thing?

It should be possible to add a shutdown-method attribute to the construct
element of the BuilderFactory, and possible to have the
hivemind.BuilderFactory look for a shutdownService() method.

It seems that this would allow service implementations to be one step closer
to being container agnostic.

We might also want to consider using the shutdownService() method, or
something similiarly named, for when a threaded service is discarded.

I'm reusing some services that have been previously used in Spring. Spring
has a an attribute called destroy-method that is analogous to what I'm
talking about. The beans I'm reusing happen to use this feature of Spring
instead of implementing a Spring specific interface of DisposableBean. 

Fortunately, Hivemind already has the initialize-method attribute, which
these beans also make use of because there is a similar feature in Spring.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message