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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to