openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: @Version for sqlserver "timpstamp" datatype
Date Fri, 15 Apr 2011 19:02:37 GMT
Hi Chintan,

Serializable will obtain more locks than Repeatable Read. You probably want
to use Read Committed as the default isolation level. Read Committed is the
default level per the JPA specification.

If you'd like more information there are a lot of good primers on isolation
levels on the Internet, here's one from the derby
documentation<http://db.apache.org/derby/manuals/develop/develop71.html>
.

hope this helps
-mike

On Fri, Apr 15, 2011 at 10:56 AM, chintan4181 <chintan4181@gmail.com> wrote:

> Hi Mike,
>
> Currenty Isolation level in Websphere is 4- Repetable Read. Tried with
> Serializable (8), but it did not work.
>
> I am trying to simulate the scenario using SOAP UI tool. Multiple threads
> are starting parrellaly to update same record. So here i found two
> behaviours
> If i dont use em.lock(entity, LOCKModeType.OTIMISTIC) (which is deafult),
> all threads are updating reocords. No exception is thrown.
>
> If i use em.lock(entity, LockModeType.OPTIMISTIC_FORCE_INCREMENT), i am
> getting lock time out error.
>
> which level of isolation will help me to solve this issue?
>
> Thanks
> Chintan
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/Version-for-sqlserver-timpstamp-datatype-tp6267241p6276784.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message