• 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: restore an existing session w/ a DA
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: restore an existing session w/ a DA


  • Subject: Re: restore an existing session w/ a DA
  • From: Galen Rhodes <email@hidden>
  • Date: Tue, 12 Jul 2005 08:38:54 -0400

I don't know if this is what you're trying to accomplish, but I would just use the WOSID parameter and then call the session() method. "WOSID" is a recognized parameter by WebObjects. If the session with that ID exists then it's returned by the session() method and if it's not then a new one is created.

For example, you would create a DA URL like so:

http://.../wa/verify?wosid=<sessionID>&k=<randomNumber>

Then your DA would look like so:

public WOActionResults verifyAction() {
    Session session = (Session)session();

    /* Do any processing on the session here. */
}

See if that works for you.


On Jul 11, 2005, at 5:07 PM, Chuck Hill wrote:

Don't do this. Write to the DB. At best you will have two different sessions checked out for the same request. I don't think that will have happy results for your application.

Chuck


On Jul 11, 2005, at 1:59 PM, Nathan Dumar wrote:


I think that WOSessionStore.checkOutSessionWithID() is the method that I need to use, but I could be wrong.

If it is, then I need help understanding the second argument, "WORequest aRequest."

I'm making a method where I verify that an email address exists and is correct before I continue with a registration process. In the email, I'd like to have a link that runs a direct action which includes the current session ID and a random number to match. For example:

http:// ... /verify?s=<sessionID>&k=<randomNumber>

Typically, the DA would create a new session, but I would like it to use the session ID from the URL, so that I have the same randomNumber in memory and don't need to insert/fetch from the db. (This gives my users a 2 hour time limit before session timeout, but I'm okay with that.) I know how to get values from the URL ... what I can't figure out is how to use an existing session instead of making a new one. This is where I think I need WOSessionStore.checkOutSessionWithID().

How can I do this?

(I'm assuming, perhaps wrongly, that restoration of the session will result in the page the user was just in, as if it was always there, including values in the variables just as they were.)

Thanks for any help or direction,
Nathan

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden



--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40thissmallworld.com


This email sent to email@hidden


_______________________________________________ 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
  • Follow-Ups:
    • Re: restore an existing session w/ a DA
      • From: Nathan Dumar <email@hidden>
References: 
 >restore an existing session w/ a DA (From: Nathan Dumar <email@hidden>)
 >Re: restore an existing session w/ a DA (From: Chuck Hill <email@hidden>)

  • Prev by Date: JSModalWindow
  • Next by Date: Anyone have a clue why my JavaMonitor terminated?
  • Previous by thread: Re: restore an existing session w/ a DA
  • Next by thread: Re: restore an existing session w/ a DA
  • Index(es):
    • Date
    • Thread