[jboss-as7-dev] Better handling of transaction leaks?

Jaikiran Pai jpai at redhat.com
Tue Oct 18 11:58:18 EDT 2011


While looking into a test failure I noticed that currently user 
applications can end up leaking transactions (associated with the 
invocation thread):

Servlet {

    doGet() {
      UserTransaction.begin();
      doSomeOp();
      fail();
      // no tx rollback/commit
    }
}

Subsequent transactions on that thread can lead to failures and other 
sorts of issues. Looking back at previous versions of AS, we had a valve 
http://anonsvn.jboss.org/repos/jbossas/trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/jca/CachedConnectionValve.java 
which used to cleanup (and log an error) about the leaking transactions.

Do we want something similar for AS7? Also, are there other "entry 
points" (like servlets for web requests) where such leaks can happen and 
needs to be taken care off?

-Jaikiran



More information about the jboss-as7-dev mailing list