• 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
generating response in different thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

generating response in different thread


  • Subject: generating response in different thread
  • From: Christian Pekeler <email@hidden>
  • Date: Thu, 25 May 2006 09:47:13 -0600

I have a bunch of pages that can take a long time to generate. I'd like to show a WOLongResponsePage in the interim. The typical way of using WOLongResponsePage is to run the business logic or whatever is taking a long time in a different thread (kicked off by WOLongResponsePage.performAction()), and once done, generate the final page with the result of that expensive computation (with WOLongResponsePage.pageForResult(Object)).

Unfortunately, the pages I have to deal with can't be used with this pattern. They're slow because they contain thousands of bindings which each are partly responsible for the slowness. Getting all the values upfront at once would require me to rewrite the pages - something I don't have time for.

So what I'd like to do instead is (simplified):
  WOLongResponsePage.performAction() {
      slowPage.generateResponse();

I think I've figured out how to do WOLongResponsePage.pageForResult (the slow pages are basically display-only). My problem is calling generateResponse() from a new thread. Some bindings on the slow pages are hooked up to the session, and to objects in the session's defaultEditingContext causing all sort of issues that I'm having troubles tracking down. So, has anyone ever done this sort of thing and could give me any advice?


Thanks, Christian

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: generating response in different thread
      • From: Christian Pekeler <email@hidden>
    • Re: generating response in different thread
      • From: Gennady Kushnir <email@hidden>
    • Re: generating response in different thread
      • From: Shehryar Khan <email@hidden>
    • Re: generating response in different thread
      • From: Paul Suh <email@hidden>
  • Prev by Date: Re: Another take on a NY WebObjects Users Group
  • Next by Date: Re: Alternative to Cookie during a Session Timeout
  • Previous by thread: Using Project Wonder frameworks in standalone war for jboss deployment
  • Next by thread: Re: generating response in different thread
  • Index(es):
    • Date
    • Thread