;[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 10:41 AM
Subject: RE: Are httpSessions thread safe?
> I guess creating Hibernate Sessions and Destroying them on every request
> isn't as bad as I imagine it is?
>
> I figured creating the session when the user showed up
rform just
fine.
-Max
- Original Message -
From: "David Erickson" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 9:26 AM
Subject: Re: Are httpSessions thread safe?
this isn't quite worth the effort? No one else seems to
mind :)
-Joe
> -Original Message-
> From: David Erickson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 18, 2003 12:27 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: Are httpSessions
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&msgId=149353
From: "David Erickson" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
<[EMAIL PROTECTED]>,<[EMAIL PROT
destroyed.
-David
- Original Message -
From: "Joe Hertz" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 10:20 AM
Subject: RE: Are httpSessions thread safe?
> I saw these. I just ha
. And
Kris's test shows it probably wouldn't do what you expect it to anyway.
-Max
- Original Message -
From: "Kris Schneider" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 8:32 AM
Subject: Re:
hreadLocal into a httpSession I suspect would be funny
to watch.
> -Original Message-
> From: Kris Schneider [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 18, 2003 11:45 AM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: Are httpSessions thread safe
>
Sent: Thursday, December 18, 2003 1:09 AM
Subject: RE: Are httpSessions thread safe?
> The sessions essentially just a sort of Map. Access to it may be
threadsafe,
> but the stuff thats in it is another matter entirely. Multiple requests
> associated with the same session will execute s
this type of condition I
> suppose.
>
> -J
>
> > -Original Message-
> > From: Kris Schneider [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, December 18, 2003 11:12 AM
> > To: Struts Users Mailing List
> > Subject: RE: Are httpSessions thread safe?
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
bly
okay. A token could effectively prevent this type of condition I
suppose.
-J
> -Original Message-
> From: Kris Schneider [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 18, 2003 11:12 AM
> To: Struts Users Mailing List
> Subject: RE: Are httpSessions thread safe?
>
&
sers Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, December 18, 2003 8:11 AM
> Subject: RE: Are httpSessions thread safe?
>
>
> > Synchronizing on the session object may cause you all sorts of grief...or
> it may
> > not. It all depends on your container
List" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 8:11 AM
Subject: RE: Are httpSessions thread safe?
> Synchronizing on the session object may cause you all sorts of grief...or
it may
> not. It all depends on your container. The spec makes no guarantees about
the
&
Synchronizing on the session object may cause you all sorts of grief...or it may
not. It all depends on your container. The spec makes no guarantees about the
identity of the object returned by methods like PageContext.getSession or
HttpServletRequest.getSession. For example, here's a test JSP:
<%
Two threads can access and use the same object from the session at the same
time. Struts does not prevent this from occurring.
It is something to worry about unless you want to be woken up with bug
reports in the middle of the night. :-)
-Max
- Original Message -
From: "Joe Hertz" <[EMA
At 4:09 PM +0800 12/18/03, Andrew Hill wrote:
The sessions essentially just a sort of Map. Access to it may be threadsafe,
but the stuff thats in it is another matter entirely. Multiple requests
associated with the same session will execute simultaneously.
There's nothing in the specs that guarante
If Hibernate sessions are not thread-safe by design, then stuffing one in a web
app session and wrapping it with your own synchronization doesn't seem like the
right approach. I've never actually used Hibernate, so I could be way off base,
but it sounds more like a job for a filter. The filter woul
The sessions essentially just a sort of Map. Access to it may be threadsafe,
but the stuff thats in it is another matter entirely. Multiple requests
associated with the same session will execute simultaneously.
If you have >1 threads playing with the same unsafe object (which you just
happened to
18 matches
Mail list logo