I can't say for certain, since I've never tested it. I think it would be okay to read/write an object that "belongs" to a different thread, much the same way it's possible in Cayenne despite a clear ownership by a thread, so long as commit()s are synchronized so they do not conflict with a read/write.
-----Original Message----- From: Michael Gentry [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 12, 2008 2:36 PM To: [email protected] Subject: Re: The most important interfaces of Cayenne Thanks, Scott. I didn't get very deep into Hibernate and that was a common issue I saw at the time. Just curious, can you leave the session open at all times in a multithreaded web application? What happens if you leave it open and the user doesn't come back? On Wed, Nov 12, 2008 at 2:24 PM, Scott Anderson <[EMAIL PROTECTED]> wrote: > Minor nit-pick, Michael: there's nothing in Hibernate preventing you > from leaving a session open at all times, treating the session as a > context, so your assertion that it is less intuitive for that reason is, > perhaps, unfair. Of course, Hibernate is indeed less intuitive, but not > for that reason. :) >
