db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kasper, Kay" <kay.kas...@ckc.de>
Subject locking problem when selecting data
Date Thu, 07 Jun 2007 14:57:04 GMT

i have a problem with the locking of a row. the situation:

Derby ( and running as server with two separatly running
client-applications (ij and own application).

Within my application i create a row in the database and commit.
With ij i change the row (only the one column for versioning, not primary
key) in the database and commit.
Within my application i try to update the row with the old version info, the
row is not found and updated. No commit/rollback yet.
Within my application i try to read the row without version condition, only
by primary key and not for update.

Then i get an SQLException (row could not be locked), saying, that not lock
could be set within the definied time.

I ran my application in debug mode to do the ij task between my own

There was another posting at 04/18/2007 "commit then read immediately" which
sounds very simular.

I'm not using any caching in my application.

On other databases like Orcale and hqsl i don't have that problem. Whats
wrong with the row locking? Why does a normal select try to set a lock?

Thanks for your help.


ckc ag
Industriestr. 10
38110 Braunschweig

Telefon 05307 / 80 20 0
Telefax 05307 / 80 20 444

Amtsgericht Braunschweig
HRB 5405

H.-G. Christian Krentel

Dr. Heinz-Werner Weinrich
Hans Bodenstein
Dr. Rita Schulz

View raw message