Donnie,

this is going to be hard to analyse as there's plenty of systems involved. Anyhow, 
before starting to dig randomly, can you please elaborate as to why 
you are using Database.ReadOnly when loading the parent object.

Werner

On Tue, 20 Jul 2004 11:41:14 -0500, Donnie Armstrong wrote:

>
>oops, my case has a typo, it is supposed to be db.remove(child). Sorry.
>
>Also, tran2 cannot see newly created child records. Another case:
>
>UserTransaction 1:
>db = jdo.getDatabase();
>ut.begin();
>parentObj = db.load(parent.class, parentKeyValue, Database.ReadOnly);
>db.create(child);
>ut.commit();
>
>UserTransaction 2:
>db = jdo.getDatabase();
>ut.begin();
>parentObj = db.load(parent.class, parentKeyValue, Database.ReadOnly);
>ut.commit();
>
>User transaction 2 does not fail, but If I obtain an iterator over the
>array of children, I notice that my newly created child is not there.
>
>
>On Tue, 2004-07-20 at 10:45, Donnie Armstrong wrote:
>> hello,
>> 
>> Using Castor CVS, Global demarcation, Oracle and JBoss 3.2.3. The JDO
>> handle is static, each transaction gets their own database handle.
>> 
>> UserTransaction 1:
>> db = jdo.getDatabase()
>> ut.begin();
>> // Load parent which automatically loads the Array of children.
>> parentObj = db.load(parent.class, parentKeyValue, Database.ReadOnly); 
>> db.update(child); // to sync the timestamps
>> db.delete(child); // remove a child
>> ut.commit();
>> 
>> UserTransaction 2:
>> db = jdo.getDatabase()
>> ut.begin();
>> // Load parent which automatically loads the Array of children.
>> parentObj = db.load(parent.class, parentKeyValue, Database.ReadOnly); 
>> 
>> Castor throws an ObjectNotFoundException ... was not found in persistent
>> storage.
>> 
>> I suspect that Castor retains the deleted object in it's cache, but why
>> does the latter operation in transaction 2 try to load the recently
>> deleted object from DB?
>> 
>> The only way I've been able to recover is to shutdown container, which
>> resets Castor cache.
>> 
>> Any help would be appreciated.
>> Donnie
>> 
>> 
>> 
>> ----------------------------------------------------------- 
>> If you wish to unsubscribe from this mailing, send mail to
>> [EMAIL PROTECTED] with a subject of:
>>         unsubscribe castor-user
>> 
>
>
>
>----------------------------------------------------------- 
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>        unsubscribe castor-user
>



----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to