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 PROTECTED]
England                            (MIME welcome)

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to