• 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: WOLongResponesePage Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOLongResponesePage Problem


  • Subject: Re: WOLongResponesePage Problem
  • From: Patrick Middleton <email@hidden>
  • Date: Wed, 21 May 2008 11:11:20 +0100


On 21 May 2008, at 10:59, santoshg wrote:

Hi All,
          I am using WOLongResponsePage Component in my project.
          But in the run time, it is showing the error message:

Session.context() evaluates to null. You may be trying to get the context object
from an archived session object. there is no context object outside of the
request-response loop.


The component is unable to generate response.
I would like to know how to access the Session context in WOLongResponsePage performAction() method.


Please help in solving the above situation, if possible with some code snippet.

Thanks and Regards,
gsk.


You can't, and you shouldn't try.
A request is received and processed and a response is generated, and this all happens in one thread, and it needs to be quick. While this is happening you have access to the Session and the WOContext in that thread.
What you need to do is get all the properties you need from the Session or WOContext before you start the thread that does the long response thing, and store them in instance variables in your component, so that when the secondary thread is running it can use those instead.


--
Patrick Middleton
OneStep Solutions plc
351 London Road             Phone: +44 (0)1702 426400
Hadleigh                    Fax:   +44 (0)1702 556855
Essex. SS7 2BT              Email: email@hidden
England                            (MIME welcome)

_______________________________________________
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: WOLongResponesePage Problem
      • From: Lachlan Deck <email@hidden>
References: 
 >WOLongResponesePage Problem (From: santoshg <email@hidden>)

  • Prev by Date: WOLongResponesePage Problem
  • Next by Date: Re: Deployment error on start up
  • Previous by thread: WOLongResponesePage Problem
  • Next by thread: Re: WOLongResponesePage Problem
  • Index(es):
    • Date
    • Thread