on 8/10/2000 9:01 AM, "Rafal Krzewski" <[EMAIL PROTECTED]> wrote:
> Good! That's what setTemp()/getTemp() methods were meant to be used. The
> objects
> you put there will automaticly go away at the end of procesing the request.
wrong! no they don't! :-)
> If you need some object to live as long as a specific user is logged into your
> system use HttpSession: data.getSession().setAttribute(String name, Object
> value)
> (see Servlets JavaDocs from Tomcat for details)
> If you want some object to be permanently associated with a specific user,
> use data.getUser().setPerm()/getPerm(). This requires your user to have a
> valid account in
> the system because this object would be serialized and stored in
> Visitor.OBJECTDATA
> field in the database when the session goes away.
> These mechanisms can save you LOTS of database queries!
data.getUser() is a wrapper around
User user = data.getSession().getAttribute("turbine.user")
Since the User object is stored in the session...
data.getUser().get/setTemp() are also stored in the session.
The point of doing this is to provide an abstracted interface to HttpSession
that is specific in context to a User object. This way, you have control
over what goes into the session by simply being able to create your own
implementation of the User object.
-jon
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]