> > -----Original Message-----
> > From: Henning P. Schmiedehausen [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, March 19, 2003 3:58 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Any reason to keep an instance of HttpSession 
> in RunData?
> > 
> > 
> > Only problem that might crop up is, that with the current
> > model, we have a definite session start (first creation of a 
> > rundata object ensures that at least getSession(true) is 
> > called once so a session is set up. 
> > When we return req.getSession() from rundata and the user 
> > never calls data.getSession(), we might not get a session for 
> > a long time. Could this be a problem for us?
> > 
> >     Regards
> >             Henning
> 
> We could change data.setSession(...) to data.getSession().  
> It would have the same effect for us.
> 
> Even without doing this, the session validator will handle it 
> for us when it tries to see if the is a User object in the 
> session.  I am not sure that we want to depend on this 
> though...  I think just calling data.getSession during the 
> creation of the RunData is a cleaner approach to ensure that 
> we always have a session.
> 

Actually, I just noticed that almost immediately after
rundataService.getRunData() in Turbine.doGet(), there is the following
code:
if (data.getSession().isNew())

This will handle making sure that we have a session on the very first
get.


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

Reply via email to