You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by CarpathianAnonymous <an...@yahoo.com> on 2012/06/04 15:27:02 UTC

Threads blocked in Unsafe.park

Hello

I want the following problem:

While using OpenJPA with <property name="openjpa.Multithreaded"
value="true"/> i found myself having some threads waiting in "Unsafe.park"
state (see picture below). The blocking appears to happend on commit.

I'm using an EntityManager which does not allow any transaction.begin()
between a transaction.begin() & transaction.commit(). Also there is no
exception thrown.




http://openjpa.208410.n2.nabble.com/file/n7580200/blocking_commit_stack.png 

--
View this message in context: http://openjpa.208410.n2.nabble.com/Threads-blocked-in-Unsafe-park-tp7580200.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Threads blocked in Unsafe.park

Posted by Rick Curtis <cu...@gmail.com>.
I'd advise against using openjpa.Multithreaded... there are a number of
known issues with the implementation of this property. You'll be much
happier in the long run if you stick to not sharing EntityManagers /
Entities across threads.

Thanks,
Rick

On Mon, Jun 4, 2012 at 8:27 AM, CarpathianAnonymous <
andreibratu2004@yahoo.com> wrote:

> Hello
>
> I want the following problem:
>
> While using OpenJPA with <property name="openjpa.Multithreaded"
> value="true"/> i found myself having some threads waiting in "Unsafe.park"
> state (see picture below). The blocking appears to happend on commit.
>
> I'm using an EntityManager which does not allow any transaction.begin()
> between a transaction.begin() & transaction.commit(). Also there is no
> exception thrown.
>
>
>
>
> http://openjpa.208410.n2.nabble.com/file/n7580200/blocking_commit_stack.png
>



-- 
*Rick Curtis*