Frank,

As stated in another email, the cache uses weak references.  This means
that if you create the object, release your reference (At this point is
it fair game for garbage collection).  Then subsequently load the
object, OJB will check the cache and if not present will load from the
DB and create a new object with the same OID (and obviously data
values).  I am not an expert, but I believe it's always a good idea to
overload .equals on your business objects anyways for comparison in your
applications.

Wally Gelhar

-----Original Message-----
From: David Corbin [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 10, 2002 5:51 AM
To: OJB Users List
Subject: Re: Caching question


Frank Renaers wrote:

>Hi,
>
>The object will be loaded from the cache.
>So it will exact the same.
>
>Greetings,
>  
>
So, if I'm not getting that behavior, I probabl don't have the default 
cacheing enabled?

>Frank
>
>-----Original Message-----
>From: David Corbin [mailto:[EMAIL PROTECTED]]
>Sent: maandag 9 september 2002 20:55
>To: OJB Users List
>Subject: Caching question
>
>
>I believe I have the default caching implementation active.  If I 
>create
>and object, and write it out, and then load the object by refering to 
>it's OID, should I get the EXACT same Java object, or a new object with

>the same data values?
>
>Thanks
>David
>
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
>  
>




--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to