AW: [OJB-developers] ObjectCache and IdentityFactory]
Brought to you by:
thma
From: Mahler T. <tho...@it...> - 2002-03-26 12:46:42
|
Hi Joachim, <snip pool refactoring ideas> I > think a unified > Pool utility class would be A Good Thing. I definitely agree! 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. This could > be done in a single thread, even when you got 15 pools (which > would not be > so easy, when using 15 different implementations). Of course > this generic > pool would have to scale up and down (i.e. be able to act as a really > simple pool with no gc-tricks as well as a gc-enabled pool with > configurable lru-list and so on ...). What do you think of that? > 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! cu, Thomas |