|
From: James E. <jam...@gm...> - 2005-04-01 12:16:28
|
What about an implementation that would 'do what is best'. Save to
the session if it already exists, serialize to the request if not.
Then have a custom tag to spit out the flow info in the form. The tag
would pull the serialized flow info from the request (if it exists)
and add a new hidden input field for it (_flowInstance or
something)...otherwise if a session exists and the info is on the
session it would spit out what is expected now (the _* hidden fields).
At the beginning of a request, it would look to see if the serialized
param (_flowInstance) is on the request first...if so, deserialize.
If not, see if a session exists and pull from the session using _*
params.
If you have a truly complex object graph, set a 'requiresSession'
boolean to true (defaults to false)...although I would think it best
to try and keep it as simple as possible when going in the session.
With this approach your not doing more than you need (when a session
does exist), and (as a bonus) you can have flows that are used by
non-session visitors and with-session users, and the impl would 'do
what is best' in both situations.
James
On Apr 1, 2005 3:00 AM, Rob Harrop <ro...@ca...> wrote:
> What about scoping - how will this be handled by the storage interface?
>
> Rob
>
> Keith Donald wrote:
>
> >Yes, so a HttpSessionFlowExecutionStorage would use the HttpSession, a
> >HttpRequestFlowExecutionStorage would use the request, for example. The
> >latter would also have to know how to reconstruct the FlowExecution soley
> >from the request parameters, while the former would just pull an existing
> >instance from the HttpSession given the flowExecutionId in the input Event.
> >
> >Keith
> >
> >-----Original Message-----
> >From: spr...@li...
> >[mailto:spr...@li...] On Behalf Of
> >Seth Ladd
> >Sent: Thursday, March 31, 2005 7:56 PM
> >To: spr...@li...
> >Subject: Re: [Springframework-developer] SWF - Creating HTTP sessions -
> >Feedback needed
> >
> >On Thu, 31 Mar 2005 19:46:42 -0500, Keith Donald <ke...@in...>
> >wrote:
> >
> >
> >>Seth,
> >>
> >>Excellent idea.
> >>
> >>If we extract an interface from the HttpServletExecutionManager, we get
> >>something like:
> >>
> >>public interface FlowExecutionStorage {
> >> public FlowExecution loadFrom(Event inputEvent);
> >> public void saveOrUpdate(FlowExecution flowExecution);
> >> public void remove(FlowExecution flowExecution);
> >>}
> >>
> >>Or something like that. Erwin what do you think? Need to think about it
> >>more. I imagine here the FlowExecutionStack would have to be
> >>
> >>
> >reconstructed
> >
> >
> >>from the Event parameters, for example: http request parameters, in an
> >>
> >>
> >http
> >
> >
> >>servlet environment. It also has to be rehydrated with services on
> >>deserialization as well, including the FlowLocator and its
> >>FlowExecutionListenerList.
> >>
> >>
> >
> >
> >Keith,
> >
> >Just so I'm clear... this isn't to replace the concept and purpose of
> >the HttpSession? This is just to provide a way to get the state info
> >of the flow into the request to avoid the need for session creation?
> >
> >Thanks!
> >Seth
> >
> >
> >-------------------------------------------------------
> >This SF.net email is sponsored by Demarc:
> >A global provider of Threat Management Solutions.
> >Download our HomeAdmin security software for free today!
> >http://www.demarc.com/info/Sentarus/hamr30
> >_______________________________________________
> >Springframework-developer mailing list
> >Spr...@li...
> >https://lists.sourceforge.net/lists/listinfo/springframework-developer
> >
> >
> >
> >-------------------------------------------------------
> >This SF.net email is sponsored by Demarc:
> >A global provider of Threat Management Solutions.
> >Download our HomeAdmin security software for free today!
> >http://www.demarc.com/info/Sentarus/hamr30
> >_______________________________________________
> >Springframework-developer mailing list
> >Spr...@li...
> >https://lists.sourceforge.net/lists/listinfo/springframework-developer
> >
> >
> >
> >
>
> -------------------------------------------------------
> This SF.net email is sponsored by Demarc:
> A global provider of Threat Management Solutions.
> Download our HomeAdmin security software for free today!
> http://www.demarc.com/info/Sentarus/hamr30
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
|