Has anyone found the list() method of Query to block?
I run my application on the server (JBoss) and the following query will block after it has been called a few times:
Code:
@NamedQuery(name = "User.findByUsername", query = "FROM User u where _username = :userName"),
....
query.list()
I can't see any database locks and the CPU doesn't max out. When I turn on SQL logging, I don't even see the generated SQL for this query when it blocks.
However, when I run my application on my local Tomcat instance (connecting to exactly the same database), everything is fine.
Any ideas?