Re: [OJB-developers] ObjectCache and IdentityFactory]
Brought to you by:
thma
From: <Joa...@tp...> - 2002-03-26 13:05:58
|
> We could even >> create a pseudo-gc thread that throws away empty Soft/WeakReferences >> perodically. > > There is one argument against threading: You should not use Threads > in J2EE controlled environments. Hm, I didn't know this, but it can definitely be made to work without threads as well. A common strategy would be doing the cleanup in the accessors (as you suggested). Do you know why you have to avoid threads? Is this true even in "not-quite-J2EE" ( = plain tomcat for servlets/jsp)? [snip] > > Making it configurable is a good idea. We can have different > behaviour for different environemnts (e.g. singlevm mode, C/S mode, > running within a J2EE app server ...) > > I like your suggestion very much. We need exactly this kind of > refactorings to improve the overall code quality! hm ... my TODO list is growing ;-) well, actually I like doing this kind of stuff every now and then (everyone who did such a beast once probably understands, why I don't like to do it all the time ;-). > cu, > > Thomas regards Joachim |