[Building Sakai] Access to HTTP Session Data

Charles Severance csev at umich.edu
Fri Jan 3 17:22:11 PST 2014


On Jan 3, 2014, at 6:55 AM, Mark J. Norton <markjnorton at earthlink.net> wrote:
> CONTAINER_SESSION = 0;    // don't do anything.
> SAKAI_SESSION = 1;             // use the sakai wide session.
> CONTEXT_SESSION = 2;       // use the context session.
> TOOL_SESSION = 3;              // use the tool session, in any, else context.
> Looking at the web.xml file for the Portal, I note that the "http.session" init parameter is not specified, thus defaulting to TOOL_SESSION.
> 
> My question is this.  If I add an init-param XML block to specify  the HTTP Session at SAKIA_SESSION, for example, will it screw up all of Sakai?  For example:
> <init-param>
>             <param-name>http.session</param-name>
>             <param-value>1</param-value>
> </init-param>
> My concern is that by shifting the HTTP Session into the Sakai Session (or Servlet Context, etc), that it would be missing in the Tool Session, where tools expect it to be.  I'm willing to just try this and see what happens, but I though it would be useful to give someone the chance to say, "Don't do that!  Are you crazy!?!".

My feeling is "Don't do this, are you crazy?"  Everything in Sakai is written to expect "Tool Scoped" sessions.  Changing it in the portal would be too broad of a change.   The *only* reason that I can even vaguely remember in having this parameter was in case we had some old legacy Servlet we would have this value in the web.xml for a single servlet.

My guess is that you could change it and perhaps nothing would break right away in simple testing - but if tools ended up with a single commingled session they might start tromping on each other's data.   Also the "Tool Reset" for a single tool might reset all tools.

I am not 100% sure - this is just my gut reaction.

/Chuck

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20140103/65682f7f/attachment.html 


More information about the sakai-dev mailing list