• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WOA, Building a Login form
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >WOA, Building a Login form (From: Amedeo Mantica <email@hidden>)
 >Re: WOA, Building a Login form (From: Drew Thoeni <email@hidden>)
 >Re: WOA, Building a Login form (From: Amedeo Mantica <email@hidden>)
 >Re: WOA, Building a Login form (From: Drew Thoeni <email@hidden>)

  • Prev by Date: Re: WOA, Building a Login form
  • Next by Date: Re: Timestamps awry with daylight savings time
  • Previous by thread: Re: WOA, Building a Login form
  • Next by thread: Re: WOA, Building a Login form
  • Index(es):
    • Date
    • Thread