db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: classes registered in JDOImplHelper unloaded
Date Mon, 06 Mar 2006 17:30:55 GMT
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:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message