Some of our developers are reporting deadlock in our application which seemed to be related to derby. Sure enough, it just happened to me. It turns out that calling Connection.prepareStatement() simultaneously from two separate threads (and using two different connection objects) is resulting in deadlock. This is a pretty severe problem, as it brings our application to a halt (or prevents it from shutting down).
I found and commented on the following JIRA entry which is identical to what we are seeing. Is this being actively looked at?