|javax.persistence.lock.timeout is beeing ignored... [message #548793]
||Fri, 23 July 2010 05:45
| moritz du
Registered: February 2010
at the moment a try to write code for editing database-entries using pessimistic locking.|
my first test code looks like this:
Map<String,Object> props = new HashMap<String, Object>();
this code works fine, but to test the timeout i get a manuell lock on the same row via commandline before executing the java code:
select * ...for update;
the problem is, the javacode ignores the 3s timeout and doesn't throw a lock timeout exception but instead a PessimisticLockException after 60s. So how to get timeout to work?
meanwhile i tried to set the timeout in persistence.xml (em.getProperties shows it) but no success - the timeout is still ignored.
[Updated on: Fri, 23 July 2010 06:17]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02622 seconds