At 8:22 AM -0800 12/18/03, Max Cooper wrote:
Even though you got a few different objects with those calls, they all
represent the same conceptual "session" underneath. The concept of a session
would be worthless otherwise. In other words, if you stash a reference to
some object in the session, you will be able to get a reference to that same
object from any of the session objects returned by those calls (even though
the object representing the session itself may be different from call to
call).

Sure, but Kris is right -- that doesn't mean that you are correctly synchronizing access to the session -- object locks are based on object identity, not the conceptual identity of something they contain.


Thanks to Kris for pointing that out -- I'd say that furthers the rationale for using your own objects to encapsulate the session "environment" in your application.

If you moved my code block into a PlugIn or other expert who was responsible for instantiating and retrieving the shells, then you could just synchronize the access methods on the expert. You might still run into issues if you were running in a clustered environment -- I don't have much experience in that kind of deployment.

Joe

--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "We want beef in dessert if we can get it there."
-- Betty Hogan, Director of New Product Development, National Cattlemen's Beef Association



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to