I think howard is talking about the RegistryShutdownListener interface in this case ... It would definately be good to replace this with reflection (the fewer ties to hivemind interfaces the better) ...

Johan

On Tue, 15 Mar 2005 07:57:48 -0500, James Carman <[EMAIL PROTECTED]> wrote:

Wouldn't it have to do it on thread cleanup?

-----Original Message-----
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 7:55 AM
To: [email protected]
Subject: Fwd: Destroy method...


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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-- you too?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to