hivemind-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <ja...@carmanconsulting.com>
Subject Destroy method...
Date Sat, 12 Mar 2005 13:52:18 GMT
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: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Mime
View raw message