I have a stateful session bean that will deadlock relatively easily. I'd like very 
much to be able to detect deadlock situations and restart offending transactions.

My beans has CMT, and org.jboss.ejb.plugins.TxInterceptorCMT successfully detects 
deadlocks, throws an ApplicationDeadlockException, and re-tries the transaction. 
Unfortunately, org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor is higher in 
the interceptor stack, and has already caught the ApplicationDeadlockException, and, 
as it is a subclass of java.rmi.RemoteException, has discarded the offending session 
bean instance. Thus when TxInterceptorCMT re-tries the transaction, the offending 
session bean instance is no longer available, and a  java.rmi.NoSuchObjectException is 
thrown and propagated to the client.

The result is my client gets a NoSuchObjectException (with no chained exceptions) and 
has no way of determining whether this was due to a deadlock (in which case it can 
automatically create a new session bean instance, and re-try the transaction) or some 
other exceptional error.

Is there any way to "save" a stateful session bean instance from being discarded when 
a deadlock is detected by JBoss? If not, is there any way to prevent TxInterceptorCMT 
from re-trying transactions that have deadlocked, without recompiling TxInterceptorCMT 
or setting TxInterceptorCMT.MAX_RETRIES from custom Java code? Should I use BMT 
instead?

I'm using JBoss 3.2.3. Any help will be much appreciated.

Damian

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3833835#3833835

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3833835


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to