Bruce,
Maybe there's no need to post the code.
Let me explain the scenario.
1. I have several threads that add items to, let's say, product (1-to-M) and
update the last update date on the product.
I've solved this problem by marking the items collection in products mapping
with dirty="ignore" and marking the lastUpdate field in products as
dirty="ignore". Also, I load product with Database.Exclusive when inserting new
item. This is OK for my scenario, and it works now.
2. Several thread are trying to register/unregister (each different) user to
services (many-to-many). I've marked the user collection in services as
dirty="ignore" and in this case I still have a deadlock sometimes, but Castor
detects it successfully.
This seems good for now...
Regards,
Emir
----- Original Message -----
From: Bruce Snyder <[EMAIL PROTECTED]>
Date: Saturday, February 26, 2005 4:58 pm
Subject: Re: [castor-user] [JDO] Waiting for object...
>
> On Sat, 26 Feb 2005 11:18:20 +0100, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
>
> > I have problems with this waiting thing.
> > This object is loaded by 2 transactions.
> > One of them is trying to change the object, and there are 2
> situations:> 1. This transactions wait eternally for the object
> and everything hangs literally forever.
> > 2. If both transacations try to change the object Castor detects
> deadlock and rollbacks both transactions. Shouldn't one of them be
> allowed to commit?
> >
> > The access is shared (default) to this class' objects.
> >
> > Regards,
> > Emir
> >
> >
> > ----- Original Message -----
> > Od: [EMAIL PROTECTED]
> > Datum: Srijeda, Februar 23, 2005 10:17 am
> > Predmet: [castor-user] [JDO] Waiting for object...
> >
> > >
> > > Hi,
> > > In my code I'm trying to load an object and here's what I receive:
> > >
> > >
> > > 23 Feb 2005 10:18:45.906 [DEBUG] [Thread-0]
> > > [org.exolab.castor.persist.ObjectLock] - Waiting on
> > > xx.xx.xx.xx.Channel/2/2 R/- by
> > > [EMAIL PROTECTED] Feb
> > > 2005 10:18:55.906 [DEBUG] [Thread-0]
> > > [org.exolab.castor.persist.ObjectLock] - Waiting on
> > > xx.xx.xx.xx.Channel/2/2/2/2 R/- by
> > > [EMAIL PROTECTED]
> > > After these two lines, my app hangs.
>
> Emir,
>
> It appears that shared locking may not work for your situation and you
> may need to upgrade the lock temporarily to alleviate the contention.
> Please post the code from your app that's causing this.
>
> Bruce
> --
> perl -e 'print unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-
> N>61E<D\!G;6%I;\"YC;VT*");'
> The Castor Project
> http://www.castor.org/
>
> Apache Geronimo
> http://geronimo.apache.org/
>
>
>
> -----------------------------------------------------------
> 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