[hibernate-dev] Storing values at the session level
steve at hibernate.org
Tue Mar 11 11:46:54 EDT 2014
On Mon, Mar 10, 2014 at 7:29 AM, Emmanuel Bernard <emmanuel at hibernate.org>wrote:
> Either this or have on the session owner contract a generic facility to
> store session specific data that OGM could extend.
> I think Steve has been reluctant of such contract in the past. We could re
> discuss the pluses and minuses.
> Another alternative is to use transactions as the payload transport. But
> the synchronization concept does not let you lookup for data outside the
> before and after tx events.
For years, JBoss had a TransactionLocal class. Modeled on the JDK
ThreadLocal class. Sounds like that's maybe what you are describing? Not
saying its right or wrong way to achieve what you suggest, just pointing
out that your concerns about data access have been addressed before
More information about the hibernate-dev