<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial; font-size: 12pt; color: #000000'>I want to make sure that whatever is done with this stuff, is that it is configurable in such a way that it can be removed for our benchmarking purposes, and performance tuning in general.<br><br>Even a lightweight check will add overhead that we cannot afford if we are to be competitive with IBM and Oracle on SPECjEnterprise2010. Besides, this is a debugging exercise, not something that should ever really be on in a production environment, in my opinion.<br><br>Andy<br><br><hr id="zwchr"><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Jaikiran Pai" <jpai@redhat.com><br><b>To: </b>jboss-as7-dev@lists.jboss.org<br><b>Sent: </b>Tuesday, October 18, 2011 11:42:30 PM<br><b>Subject: </b>Re: [jboss-as7-dev] Better handling of transaction leaks?<br><br>Just to be clear, I wasn't in favour of introducing that entire <br>CachedConnectionValve (which definitely is quite heavy). That link was <br>more of a reference to show how it was handled in previous versions.<br><br>Like you say, it should be easy to check the tx status with a simple check.<br><br>-Jaikiran<br><br>On Wednesday 19 October 2011 12:09 AM, Jason T. Greene wrote:<br>> On 10/18/11 12:31 PM, Remy Maucherat wrote:<br>>> On Tue, 2011-10-18 at 21:28 +0530, Jaikiran Pai wrote:<br>>>> While looking into a test failure I noticed that currently user<br>>>> applications can end up leaking transactions (associated with the<br>>>> invocation thread):<br>>>><br>>>> Servlet {<br>>>><br>>>> doGet() {<br>>>> UserTransaction.begin();<br>>>> doSomeOp();<br>>>> fail();<br>>>> // no tx rollback/commit<br>>>> }<br>>>> }<br>>>><br>>>> Subsequent transactions on that thread can lead to failures and other<br>>>> sorts of issues. Looking back at previous versions of AS, we had a valve<br>>>> http://anonsvn.jboss.org/repos/jbossas/trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/jca/CachedConnectionValve.java<br>>>> which used to cleanup (and log an error) about the leaking transactions.<br>>>><br>>>> Do we want something similar for AS7? Also, are there other "entry<br>>>> points" (like servlets for web requests) where such leaks can happen and<br>>>> needs to be taken care off?<br>>><br>>> JPA has automatic tracking of this sort of things using a valve (and<br>>> added only when needed).<br>>><br>>> For the insignificant amount of people that will do manual transactions<br>>> and can't be bothered to code properly, everyone gets to pay the cost of<br>>> transaction tracking for all requests to the web container, so I am<br>>> against this feature.<br>>><br>>> I remember being flamed pretty badly for daring disabling this "nice"<br>>> valve by default in AS 6 :) Hopefully it will go better this time.<br>>><br>><br>> I'll support you (I'd rather have the perf by default). It seems like it<br>> should be possible to come up with a fast solution though, instead of<br>> using the slow CCV. For example its pretty cheap to check the UT<br>> threadlocal and see if the status is still active (hence a leak).<br>><br><br>_______________________________________________<br>jboss-as7-dev mailing list<br>jboss-as7-dev@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/jboss-as7-dev<br></blockquote><br></div></body></html>