Explanation attempt inline.

Regards,
Michael Bartmann

Jim Crossley wrote:
I have an MDB with the following pseudocode in its onMessage method:

public void onMessage(Message msg)
{
  // Entity bean = home.create(...)
  // bean.setX(...)
this starts a tx1 and locks the instance bean.
  // bean.setY(...)
this suspends the tx1 on bean temporarily,
and starts a tx2, which tries to obtain the lock on the bean,
which it will never get, because tx1 is not commited or rollbacked
yet.
We had this problem under 2.4.4 w/o deadlock detection. Problem:
even the tx timeout didn't work in this case; the server locked forever... :-(
}

Each of the three methods, create, setX, and setY have a trans-attribute
of "RequiresNew". With only one client posting a message, a "deadlock
detected" exception is thrown when setX is invoked. How can deadlock
occur when only one thread is active

Thanks,
Jim




-------------------------------------------------------
This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ad.doubleclick.net/clk;4729346;7592162;s?http://www.sun.com/javavote
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



-------------------------------------------------------
This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0003en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to