7 May 17:11
Re: Access Context from current thread
> > 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