geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <>
Subject Re: [jira] Commented: (GERONIMO-3137) Servlets must rollback uncommitted transaction when the service method exits
Date Fri, 04 May 2007 17:00:56 GMT
On May 4, 2007, at 3:00 AM, Daniel Alheiros wrote:

> Do you think it could be interesting logging this in a WARN level  
> to make
> the application developer to fix it? I believe it will only happen  
> caused by
> bad code, so...

The rule appears to be:

if servlet started a UT and it is marked rollback only,
     rollback the ut on servlet exit
else if the servlet is the original web request (not a dispatch) and  
there is an open tx
     rollback the ut on servlet exit
     leave the transaction open

The rule is a bit strange, but that is the way they seem to want it.   
Anyway, the first condition can be caused by an application exception  
where the code does ut.setRollbackOnly.  The second condition is a  
programming error and as you suggest, should be logged at WARN.


View raw message