Bugs item #634286, was opened at 2002-11-06 07:43 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=634286&group_id=22866
Category: JBossServer Group: None Status: Open Resolution: None Priority: 5 Submitted By: Ole Husgaard (sparre) Assigned to: Nobody/Anonymous (nobody) Summary: Bug in the transactional locking code Initial Comment: I discovered this using Branch_3_2, but I think this bug is present in all branches. With multiple clients using UserTransaction, and the queued pessimistic locking strategy, I see the following problem in the locking code: Client1: ut.begin() This calls the server, and returns the TPC for tx1 to the client. Client1: obj.invoke() This invokes a non-readonly method on an entity bean. In the server thread1 is selected for doing the work. In the bean lock, the holding transaction is set to tx1, and the holding thread is set to thread1. After doing the invocation, thread1 is put back into the RMI thread pool. Client2: ut.begin() This calls the server, and returns the TPC for tx2 to the client. Client2: obj.invoke() This invokes the same bean as Client1 just invoked. In the server thread1 is selected (reused from the RMI pool) for doing the work. When invoking the locking code, thread1 should wait until the transaction tx1 started by Client1 is committed. However, that does not happen. In org.jboss.ejb.plugins.lock.BeanLockSupport.deadlockDetection(), it is detected that the calling thread equals the holding thread, and an ApplicationDeadlockException is thrown. I'm not sure that I completely understand this locking code, so I'd rather not fix this myself. However, it looks to me like the BeanLockSupport.holdingThread instance variable should be cleared before the transaction is committed. But simply clearing holdingThread in the endInvocation() method may cause problems with reentrant calls. Best Regards, Ole Husgaard. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=634286&group_id=22866 ------------------------------------------------------- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
