Re: Sessionless Direct Actions
Re: Sessionless Direct Actions
- Subject: Re: Sessionless Direct Actions
- From: Jonathan Rochkind <email@hidden>
- Date: Mon, 02 Jun 2003 11:58:08 -0500
At 12:28 PM 6/2/2003 -0400, james o wrote:
>Beware of these dynamic elements too, they require state to be stored
on the server and so will create a session:
is there a list of dynamic elements to avoid?
Not really, unfortunately. But as a general rule, avoid any 'action'
binding, including on a WOForm or WOSubmitButton.
Beyond that, it's probably best to use one of the method previously
mentioned in this thread to actively suppress the creation of a session,
and output a stack trace when someone tries to create one, so you can try
to track down what component is doing it.
You can also pay attention to the URLs generated from your clicks. If it is
a '/wo/' type URL, or if it's a direct action URL with a
'?wosid=aa90fd87a90df8' at the end, then you know a session has been
created. Assuming none of your Java code calls session(), the question
then is which component is causing the session to be created, so you can
avoid that component (or, often, just use a different binding, usually a
more inconvenient one---the convenience provided by session-based
component-actions is actually quite large).
--Jonathan
>I would like to add just one thing. Sessions are not bad in themselves
and can bring quite a bit of speed improvement to a DirectAction
application by >caching the objects an cutting the number of fetches
you need at each request.
what i have is an xml news feed that calls and fetches the same data
over and over. the news might change once or twice daily. my session
count continues to grow until the app crashes/freezes. i've added
additional instances which helped. i was thinking if i stopped
creating new sessions the direct actions
>My ContentContext allows fetch spec caching sans sessions:
>
<http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/wonder/Wonder/ Experimental/
WOWebLog/ContentContext/>
thanks, caching the fetchspec looks great!
thanks everyone for the input,
./james
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.