You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Shapira, Yoav" <Yo...@mpi.com> on 2004/03/10 17:00:36 UTC

RE: Please Comment: plan for co-ordinating sessions across mutliple contexts

Hi,
Can you make this UserDataBean work with Tomcat's SingleSignOn valve?
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html#Single%
20Sign%20On

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Justin Johnson [mailto:justinj@irisusainc.com]
>Sent: Wednesday, March 10, 2004 10:58 AM
>To: 'Tomcat Users List'
>Subject: Please Comment: plan for co-ordinating sessions across
mutliple
>contexts
>
>I have an internal website with several web applications, and thus
several
>contexts.  The user's identity is automatically provided via jCIFs
(NTLM
>authentication).  At the start of a session, a UserDataBean is created
that
>loads user preferences from a database, including the language
preference
>for the user (the site is English/Japanese bilingual).
>
>I've implemented a site-wide filter that checks for changes to
preferences
>sent as a querystring by clicking a link (e.g., clicking on the
'nihon-go'
>link in the main menu sends the URL [current path]?Language=JA).  The
>filter
>catches the change, calls the change method in the session's
UserDataBean,
>which changes the preference and updates the database.
>
>The experienced among you have already spotted the problem: with
multiple
>contexts there are multiple sessions for the user, and multiple
>UserDataBeans; changing a preference in one bean doesn't change the
>preference in another bean, which has already populated its fields from
the
>database.  Switch to Japanese in one context, and the change isn't
>reflected
>in another.
>
>What I think will work is the create a UserDataBeanEvent that is
broadcast
>on changing a preference; all the other beans listen for that event,
and on
>receiving one, check if that event was sent by a bean for the same user
as
>the receiving UserDataBean; if it was, it can update its own fields to
the
>same value (without bothering to update the database since the
broadcasting
>bean did so), and so all the UserDataBeans are co-ordinated across
multiple
>contexts.
>
>Does this seem workable?  Am I forgetting something, or am I missing
>something about performance?  Is there a lighter-weight way to
accomplish
>the same thing?
>
>Thanks,
>Justin
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org