7 May 17:11
Re: Access Context from current thread
From: Alejandro Revilla <apr@...>
Subject: Re: Access Context from current thread
Newsgroups: gmane.comp.java.jpos.devel
Date: 2008-05-07 15:11:11 GMT
Subject: Re: Access Context from current thread
Newsgroups: gmane.comp.java.jpos.devel
Date: 2008-05-07 15:11:11 GMT
> > Is there anyway to access the transaction manager Context from the > currently running thread? The reason I am asking is hibernate has a > plug-able CurrentSessionContext. If the Context could be plucked from > the thread then you could grab a hibernate Session out of the context > to enable long running transactions. I can see this being useful in > ways other than with just hibernate. > We currently store the Hibernate session in the Context. I guess you could store the Context in a ThreadLocal variable, but you could be in trouble if you either PAUSE or RETRY the transaction. ------------------------------------
RSS Feed