You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by lasitha <la...@gmail.com> on 2007/09/18 16:55:09 UTC

T5: tapestry-hibernate commits even after an exception

Hello again.

While debugging some hibernate exceptions, i've noticed the
HibernateSessionManager commits the current transaction even when an
exception occurs in the current request.

Seems like it should be rolling back instead.  Am i missing something?

The HibernateSessionManager registers with the ThreadCleanupHub to
commit its transaction, so it's not in the immediate call stack that a
regular exception would occur in.  Is there some service it can use to
figure out whether an exception occurred in the current thread/request
?

An alternative might be to use a contribution to the
RequestHandlerPipeline to do the commit / rollback / cleanup (instead
of listening for thread cleanup).  This is how i've seen the OSIV
pattern implemented in other places (eg spring), typically with a
filter.

Thoughts?

Cheers,
lasitha.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org