You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by "Miller, Michael P" <Mi...@mantech-ist.com> on 2005/04/21 19:04:45 UTC
sharedFlow confusion
Documentation states this about sharedFlows:
If you need an attribute to be available across all the page flows in a
web application's
user (browser) session, such as a user's unique session key, you can use
shared flow.
I'm a little confused about these sharedFlows. Specifically, if you
wanted to keep a
particular webapp users information in a sharedFlow controller that
would imply
that each session gets its own instance of that controller, but I do not
think it works
that way, does it ? In a Struts app I once worked on, we passed an
Object back and forth in
the "session", that contained user ID information etc. that was used by
each action class
to know what user he was dealing with. Can a sharedFlow be used for
this ?
Each user session does not get its own instances of the regular
Controller classes, right ?
Thanks,
Mike
Re: sharedFlow confusion
Posted by Richard Feit <ri...@bea.com>.
Good questions -- we need to augment the documentation. The most
important point is that each user session *does* get its own shared flow
and page flow instances. Neither are ever shared across users. Shared
flows are especially nice when you'd like to have a shared action
(shared across many page flows, not across user sessions) that
references some shared state. Does that answer your question?
Rich
Miller, Michael P wrote:
>Documentation states this about sharedFlows:
>
>If you need an attribute to be available across all the page flows in a
>web application's
>
>user (browser) session, such as a user's unique session key, you can use
>shared flow.
>
>
>
>I'm a little confused about these sharedFlows. Specifically, if you
>wanted to keep a
>
>particular webapp users information in a sharedFlow controller that
>would imply
>
>that each session gets its own instance of that controller, but I do not
>think it works
>
>that way, does it ? In a Struts app I once worked on, we passed an
>Object back and forth in
>
>the "session", that contained user ID information etc. that was used by
>each action class
>
>to know what user he was dealing with. Can a sharedFlow be used for
>this ?
>
>Each user session does not get its own instances of the regular
>Controller classes, right ?
>
>
>
>Thanks,
>
>Mike
>
>
>
>
>
>