openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chandra Sarath <cthe...@yahoo.com>
Subject OpenJpa, and DB2 shared lock
Date Wed, 22 Apr 2009 09:22:36 GMT

Hi,

We use OpenJpa, DB2 and Websphere 6.1. We have created a Datasource in
Websphere console that connects DB2 using a non-xa driver.

We were testing our application about how it rolls back the data when there
is a shared lock in a table. we have following scenarios. We have also set a
Timeout of 30 seconds in Datasource/connection properties.

  1. Insert a record in a read only (Shared lock).
  2. Update a record in read only table (Shared lock).

  For Scenario 1, after 30 seconds application times out and gives us proper
error. But for scenario 2, it goes in infinite
  loop and tries to update Database for every 30 secs, and it never stops
trying to.

  Is there any extra property that we need to set in Jpa level or Datasource
level so application can timeout after 30 seconds?

  we use entityManager.persist() for inserts and entityManager.merge() for
updates. Can someone help us on this?

Thank you!
Chandra
-- 
View this message in context: http://n2.nabble.com/OpenJpa%2C-and-DB2-shared-lock-tp2675084p2675084.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message