re: Assigning a Session to a Custom WORequestHandler
re: Assigning a Session to a Custom WORequestHandler
- Subject: re: Assigning a Session to a Custom WORequestHandler
- From: Jonathan Miller <email@hidden>
- Date: Wed, 12 Sep 2007 12:06:03 -1000
Indeed, the piece of the code that was presented is just that a portion.
What I'm trying to accomplish is the following (keep in mind I need
to deploy using SSDD on *nix so that's why I'm not using Wonder ;) )
1. A WOForm containing a WOFileUpload is submitted to a custom
request handler
2. The custom request handler keeps track of the progress of the upload
3. When the form is submitted a JavaScript is started that
asynchronously communicates to the application server and finds the
progress of the upload.
4. The JS then reports the progress to the user.
5. When the upload is finished the user is redirected to a completion
page.
So far everything works EXCEPT the session is lost on step 5. A
simple WOComponent Action on that page returns the "session has
expired" page.
I agree with you in the API is misleading - At this point I feel
pretty lost.
I've factored out the component to it's own project if anyone is
interested in having a look.
Thanks in advance.
Jon
Message: 5
Date: Wed, 12 Sep 2007 16:43:55 -0400
From: Mike Schrag <email@hidden>
Subject: Re: Assigning a Session to a Custom WORequestHandler
To: "WebObjects (Group)" <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset="us-ascii"
I don't know what exactly you're trying to do, but it looks pretty
suspicious. For one thing, if you call restoreSessionWithID, you
MUST return it to the session store with a saveSession call or you're
going to just deadlock on the second request for the session.
Personally, I think these API's are named wrong -- they should be
checkout and checkin, or even lock/unlock -- something that implies
more explicitly the behavior that you are in store for. It's so
important, it should be in a try/finally block. Like chuck said, you
should really look at one of the examples in Wonder. In eclipse,
just cmd-shift-t *RequestHandler with the Wonder sources in your
workspace. I'm also curious why you're implementing a custom request
handler just to call a specific component vs just using DA's or even
just the component request handler, but I suspect we're only seeing a
small part of things in your example blocks of code.
ms
_______________________________________________
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