Hi,
----- Original Message -----
From: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, December 04, 2003 2:46 PM
Subject: Re: deadlock in transaction.lock


> Hi,
>
> I think first we need a test case to reproduce your deadlock.
> Did you write such a test. If not, I will try to write such a test ASAP.
    I did not write such a test. I will try to write one and send it to you.

> OJB has junit-extension classes to enable writing of multithreaded junit
> tests (e.g. see MetadataMultithreadedTest).
    Ok, thanks. I'll take a look at them.

Thanks,
    Jair Jr

> regards,
> Armin
>
> Jair da Silva Ferreira J�nior wrote:
> > Hi,
> >
> >     The deadlock occurs when locking the objects. More specifically, in
the
> > first write-lock of the object which happens to persists it.
> >     These are my locking properties in OJB.properties:
> >
LockManagerClass=org.apache.ojb.odmg.locking.LockManagerDefaultImpl
> >         LockMapClass=org.apache.ojb.odmg.locking.InMemoryLockMapImpl
> >         LockTimeout=60000
> >         ImplicitLocking=true
> >         LockAssociations=READ
> >
> > Thanks,
> >     Jair Jr
> >
> > ----- Original Message -----
> > From: "Armin Waibel" <[EMAIL PROTECTED]>
> > To: "OJB Users List" <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 02, 2003 8:41 PM
> > Subject: Re: deadlock in transaction.lock
> >
> >
> >
> >>Hi,
> >>
> >>Jair da Silva Ferreira J�nior wrote:
> >>
> >>
> >>>Hi,
> >>>    I am using ojb1.0_rc4, ODMG api with OJB queries, mysql4 in Linux
> >
> > Red Hat 7.3 (kernel 2.4.20-20.7).
> >
> >>>    I am experiencing the following problem: when multiple threads
> >
> > (about 20) try to write lock an object, at some point, the
> > transaction.lock(object,Transaction.WRITE) method simply doesn't return
and
> > my thread never dies. This is causing my application to deadlock. I am
> > locking different objects in each thread.
> >
> >>Did the deadlock occur while locking the objects
> >>or when commit the transaction? Which lock map
> >>implementation do you use?
> >>
> >>regards,
> >>Armin
> >>
> >>
> >>>    I have tried the following <connection-pool> configurations in
> >
> > repository_database.xml with no success:
> >
> >>>        <connection-pool maxActive="50" validationQuery=""
> >
> > whenExhaustedAction="1" maxWait="4000"/>
> >
> >>>        <connection-pool maxActive="3" validationQuery=""
> >
> > whenExhaustedAction="2" maxWait="4000"/>
> >
> >>>    Do you know why this is happening? The transaction.lock(..) method
> >
> > should throw an exception if the object can't be locked, right? Any help
> > would be appreciated.
> >
> >>>Thanks,
> >>>    Jair Jr
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



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

Reply via email to