[hibernate-dev] new proposal for tx timeout handling using transaction DISASSOCIATING event notification...

Steve Ebersole steve at hibernate.org
Fri Aug 7 14:41:55 EDT 2015


Yeah, which is great when you can rely on impl-specific apis.

I'll consider this, but its not super high on my priority list.  I guess we
could implement some kind of way for the JtaPlatform to indicate the "type
of timeout tracking" to do and develop a new NarayanaJtaPltaform that does
this.


On Fri, Aug 7, 2015 at 11:30 AM Scott Marlow <smarlow at redhat.com> wrote:

> https://github.com/wildfly/wildfly/pull/7909 uses the Narayana
> org.jboss.tm.listener.TransactionListenerRegistry to be notified when
> the transaction is associated/deassociated with the JTA transaction.
>
> I think that Hibernate ORM could do something similar with the
> org.jboss.tm.listener.TransactionListenerRegistry to protect against
> clearing the persistence context from a non-application thread, while
> the application thread may be actively using the persistence context.
>
> I think this approach is simpler than the thread id tracking.
>
> On 03/10/2015 01:51 PM, Scott Marlow wrote:
> >>
> >> So what is this buying us?
> >>
> >
> > The current Hibernate ORM thread id checking, does not properly handle
> > the case when the application thread changes between calls to the
> > Hibernate session.  The new approach does handle the application thread
> > changing between session invocations and also covers a few other cases
> > as well (like clearing the persistence context after the application may
> > of added another entity after the background thread rolled back the
> > transaction).
> > _______________________________________________
> > hibernate-dev mailing list
> > hibernate-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >
>


More information about the hibernate-dev mailing list