> From: Berin Loritsch > > The component has no clue when it was obtained. It shouldn't, and such > a hack would cause more issues than it would solve.
Agree - it should be done via proxies as you describe. > From: Torsten Curdt [mailto:[EMAIL PROTECTED]] > > > If the component has a short lifetime then perhaps you could use a > > timer thread (debugging only obviously) that starts screaming if a > > component is not recycled/released in less than x seconds. > > I would need to guess how long the component will be used... > That's the worst hack I could think of ;-) It is also inherently ambiguous (probably violates IOC too): /** * When it is the programmer's fault. */ class WriteFasterCodeException extends RuntimeException {...} /** * When HotSpot is to blame. (Will automatically email Sun's * development team as well.) Note that it extends Error and * thus should not be caught by the application. */ class GoFasterError extends VirtualMachineError {...} Seriously, though, it could be useful when you have a scarce resource and you think some part of the system is holding on to it a bit too long. /LS -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
