hivemind-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Howard Lewis Ship <>
Subject Fwd: Destroy method...
Date Tue, 15 Mar 2005 12:54:36 GMT
BuilderFactory could do this.

It could register an object with the ShutdownEventCoordinator that
turns around an invokes a method ont eh implementation, via
reflection.  This would be the counter-part to the initializeService()
method call.

On Sat, 12 Mar 2005 08:52:18 -0500, James Carman
<> wrote:
> All,
> What would you guys say is the best way to support a "destroy" method in
> HiveMind?  I find myself creating services which wrap other objects (like a
> JDBC connections or Hibernate sessions) just so that I can call a destroy
> (or close in this case) method on the instance when the service is discarded
> (my wrapper class implements Discardable).  I'm trying to come up with a way
> that I can indicate to HiveMind that a method is to be called when an
> implementation object is either discarded or cleaned up upon registry
> shutdown.  That way I don't think I'll need to create these "wrapper"
> services.  I'm sure it'd have to have something to do with the service
> model, since that's what decides when implementation objects are discarded.
> But, how would we pass a parameter that's intended for the service model
> itself and not the implementation factory?  In the two specific examples I
> mention here, I'd probably have to create a custom implementation factory
> and I could register a ThreadCleanupListener which would do this, but I'm
> talking about in the general case for objects that I could create using
> BuilderFactory.  Any thoughts?
> James
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.

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

View raw message