> -----Original Message-----
> From: Henning P. Schmiedehausen [mailto:[EMAIL PROTECTED] 
> Sent: Friday, March 21, 2003 4:43 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [RFC] changes to the pull service
> 
> 
> "Quinton McCombs" <[EMAIL PROTECTED]> writes:
> 
> >I have noticed that a NullpointerException is being through in 
> >TurbinePullService.populateWithSessionTools().  This happens 
> when the 
> >first request for the session is the login action (or the logout 
> >action).  It is because the method does not expect the user 
> object to 
> >be null.  Since the session validator has not run yet, the user is 
> >null.
> 
> This first happened after your change. Before that, 
> populateWithSessionTools would have checked, whether the 
> current user is the anonymous user and if yes, would add 
> tools to the user.
> 
> >There is also the issue of session scope tools being lost when the 
> >login action is executed (TTWS22).
> 
> >Here is what I came up with to address these two issues.
> 
> >populateWithSessionTools() will only process session and authorized 
> >scope tools.  These tools will be stored in the session 
> instead of the 
> >user.  The synchronized block will use the session instead 
> of the user 
> >object.  Note:  I am not sure if this needs to be synchronized.  We 
> >should not have a case where multiple threads modifing the same 
> >session.
> 
> I think, the correct solution would be, to pull the session 
> tools away from the user object. Adding a "temp storage" 
> object to the session context should be fine.

I will go ahead and check in the code then.  Take a look at how I am
storing the data.  I was going to attach a pacth to my message but the
patch made it difficult to see where the changes really were...

> But see no difference between Session and Global tools after 
> that change.

For global tools, there is only one instance created and must be thread
safe.  For session tools, there is on per session and does not need to
be thread safe.

Session and authorized are perfect for maintaining state related data
for the user.

Global would be more for utility type tools.
 
>       Regards
>               Henning
> 
> -- 
> Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
> [EMAIL PROTECTED]        +49 9131 50 654 0   http://www.intermeta.de/
> 
> Java, perl, Solaris, Linux, xSP Consulting, Web Services 
> freelance consultant -- Jakarta Turbine Development  -- hero for hire
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


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

Reply via email to