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
otherwise
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.
-dain