Bill Burke wrote:
I do call System.gc() but not in a separate thread, and not every second.
That just defeats the purpose.

Bill

Perhaps, you already realized it, but it seems to me that using references will not let you implement a ctx pool. I've modified your test program to trigger gc in a separate thread, now you'll see all references appearing on the queue but they are all useless, they all return null in get(), so you can't revive the object.

Have you thought of abandoning pooling, garbage collection has gotten a lot better these days (though it should be worse for long-lived objects that make it to the old generation)?
--
-------------------------------------------------------------------------
Anatoly Akkerman
Computer Science Dept.
Courant Institute of Mathematical Sciences, NYU
715 Broadway, #719 Tel: 212 998-3493
New York, NY 10003 Fax: 212 995-4123
-------------------------------------------------------------------------




-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to