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

Andrig Miller anmiller at redhat.com
Tue Oct 18 13:36:47 EDT 2011


----- Original Message -----

> From: "Remy Maucherat" <rmaucher at redhat.com>
> To: jboss-as7-dev at lists.jboss.org
> Sent: Tuesday, October 18, 2011 11:31:04 AM
> Subject: Re: [jboss-as7-dev] Better handling of transaction leaks?

> On Tue, 2011-10-18 at 21:28 +0530, Jaikiran Pai wrote:
> > 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?

> JPA has automatic tracking of this sort of things using a valve (and
> added only when needed).

> For the insignificant amount of people that will do manual
> transactions
> and can't be bothered to code properly, everyone gets to pay the cost
> of
> transaction tracking for all requests to the web container, so I am
> against this feature.

+1000! 

> I remember being flamed pretty badly for daring disabling this "nice"
> valve by default in AS 6 :) Hopefully it will go better this time.

> --
> Remy Maucherat <rmaucher at redhat.com>
> Red Hat Inc

> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-as7-dev/attachments/20111018/0730aa01/attachment.html 


More information about the jboss-as7-dev mailing list