users@glassfish.java.net

Re: Problem EJB Timer Service: A lock could not be obtained within the time

From: <glassfish_at_javadesktop.org>
Date: Thu, 20 Nov 2008 01:56:46 PST

More information about how to diagnose a deadlock situation in Derby / Java DB.
http://wiki.apache.org/db-derby/LockDebugging
http://db.apache.org/derby/docs/dev/devguide/cdevconcepts50894.html

Note that lock ordering as part of the application is important (e.g. locking in same order) and that a table being accessed without an index could lead to a Table-level lock, affecting the lock granularity quite significantly and the risk of deadlocks as part of the applications. It seemed like some index might have been missing for some of the columns being searched as part of some queries.

Hegalor, if you still have the deadlock trace (in derby.log), I'd be more than happy to look at it if you want.
[Message sent by forum member 'forsini' (forsini)]

http://forums.java.net/jive/thread.jspa?messageID=317803