Hi Jörg,

On Mar 6, 2006, at 9:14 AM, Jörg von Frantzius wrote:

Craig L Russell schrieb:
Hi Erik,

The JDOImplHelper cannot use soft references to registered classes because it wasn't clear what would happen if the class is garbage collected and then used again. We wanted to make sure that the JDOImplHelper would always have the metadata for the class.
When a class object is garbage collected, doesn't that simply mean that it needs to be loaded again and initialized the same way it was for the first time?

There can't be any instances of that class anymore, so if anyone wants to do anything with a garbage collected class, he needs to load (and initialize) it first, registering the new class object with JDOImplHelper.

To me it seems that there would be no problem with SoftReferences or even WeakReferences here.

To me as well, but I'd like to hear from others who have deep understanding, or who can try changing the references to weak and test exhaustively. ;-)

Craig

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to