users@glassfish.java.net

Re: TopLink thread deadlock re UserTransaction.commit() in message-driven

From: <glassfish_at_javadesktop.org>
Date: Thu, 01 Nov 2007 09:43:31 PST

Hi Tom,

There's good news and bad news.

The good news is that we've been running for 7 days straight now and the problem has
not reoccurred in the same scenario that it had before. That part appears to have been
corrected so thanks for the fix! :-)

The bad news is that another scenario seems to consistently result in the same
blocked message-driven bean in the onMessage() method. The threads hang after a call
to ConcurrencyManager.acquireReadLock() somewhere in the UserTransaction.commit().
I've attached a thread dump of the application server when there were four
ScheduledRequestWrite message-driven bean threads that never completed resulting
in four unacknowledged messages in the queue.

This only difference in this scenario from the other is that the entities being persisted by
the ScheduledRequestWrite message-driven bean might be more complicated in nature,
so the JPA merge logic might be traversing more referenced entities. I'll have to do some
more testing to find out.
[Message sent by forum member 'skalynuk' (skalynuk)]

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