« Return to Thread: retrieving two different objects from session (should be the same)

Re: retrieving two different objects from session (should be thesame)

by Christopher Schultz-2 :: Rate this Message:

Reply to Author | View in Thread

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

Caldarale, Charles R wrote:
| Are you properly synchronizing accesses to the session for concurrent
| requests?

Silly question.... how do you do this?

The result of HttpServletRequest.getSession gives you a SessionFacade
which is not guaranteed to be the same as the one given to another
thread accessing the same session (right?). You could synchronize using
an object stored /in/ the session, but then you have to worry about that
object being replaced, etc.

AFAICT, there is no reliable way to synchronize access to the session
other than what the container is already required to provide.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgjD0QACgkQ9CaO5/Lv0PBDbwCfVU8ZRJXVbQzUsLOVbVfz5CrW
usMAoLl5GH9TP3Qs1u/a9cNfOC4OJi7o
=1EnL
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: retrieving two different objects from session (should be the same)

LightInTheBox - Buy quality products at wholesale price