Re: WOA, Building a Login form
Re: WOA, Building a Login form
- Subject: Re: WOA, Building a Login form
- From: Sacha Mallais <email@hidden>
- Date: Sun, 3 Apr 2005 15:15:26 -0700
On Apr 3, 2005, at 2:58 pm, Drew Thoeni wrote:
I have an object in the session called currentUser. I set this to the
user fetched from the database (see snipit below). On logout, I
nullify that object. Again, there may be a better way.
This is pretty much the way that everyone does it, though often people
will terminate() the session on logout...
And, I have an outstanding question to myself whether this is just
making a reference, or really copying the data.
session.currentUser = tempUser;
_All_ object assignment is done by reference in Java (there is no way
to assign an object by value in Java, AFAIK). You need to call clone()
to actually copy the data (and usually the cloned class will have to
provide an implementation of clone).
sacha
--
Sacha Michel Mallais - 400 lb. chimp
Global Village Consulting Inc.: http://www.global-village.net/
Choke on that, causality! -- the Professor, "Futurama"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden