You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by mail4tester <ma...@gmail.com> on 2010/09/09 15:28:43 UTC

Deadlock situation when commting a transaction

Hi there ,

I have situation when playing the OpenJPA queries.
I tried to do this in main () method...
> Open Transaction T1
> Query (em.find()) Entity E1
> Change the entity value.

> Open Transaction T2
> Query the (same) Entity E1
> Change the entity value

> Commit transaction T1 (<--Hangs here)
> Commit transaction T2

I just could figure out why @ > Commit transaction T1 , that it hangs
forever !!! 
Are there any reasons ??
Is it a bug in OpenJPA , if it hangs ?

-- 
View this message in context: http://openjpa.208410.n2.nabble.com/Deadlock-situation-when-commting-a-transaction-tp5514428p5514428.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Deadlock situation when commting a transaction

Posted by Rick Curtis <cu...@gmail.com>.
What version of OpenJPA are you using? Are you using pessimistic locking (If
you're not sure what I'm talking about, can you post the contents of your
persistence.xml file)? Can you post a small unit test that demonstrates the
problem?

Thanks,
Rick

On Thu, Sep 9, 2010 at 8:28 AM, mail4tester <ma...@gmail.com> wrote:

>
> Hi there ,
>
> I have situation when playing the OpenJPA queries.
> I tried to do this in main () method...
> > Open Transaction T1
> > Query (em.find()) Entity E1
> > Change the entity value.
>
> > Open Transaction T2
> > Query the (same) Entity E1
> > Change the entity value
>
> > Commit transaction T1 (<--Hangs here)
> > Commit transaction T2
>
> I just could figure out why @ > Commit transaction T1 , that it hangs
> forever !!!
> Are there any reasons ??
> Is it a bug in OpenJPA , if it hangs ?