Apache Mod-Python - Re: [Mod_python Wiki] Update of "Session use with classes" by MartinStoufer

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > December 2006 > Re: [Mod_python Wiki] Update of "Session use with classes" by MartinStoufer





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: [Mod_python Wiki] Update of "Session use with classes" by MartinStoufer
Jim Gallacher

2006-12-01, 7:13 pm

Apache Wiki wrote:
> Dear Wiki user,
>
> You have subscribed to a wiki page or wiki category on "Mod_python Wiki" for change notification.
>
> The following page has been changed by MartinStoufer:
> http://wiki.apache.org/mod_python/S...se_with_classes
>
> The comment on the change is:
> A good start.
>
> ------------------------------------------------------------------------------
>
> Once you understand this framework, you can then add your own content.
>
> - First, lets augment a directory element in the ''httpd.conf'' to enable session support.
> + First, lets augment a directory element in the ''httpd.conf'' to enable both the Publisher model and session support.


> + PythonOption session MemorySession


I'm not sure about the most elegant way to handle this in the wiki, but
we likely need to make the reader aware of differences between
mod_python versions.

Using this "PythonOption session" as an example, we actually have 3
different cases:

Version 3.1.4
"PythonOption session" is not used. When calling Session.Session(req)
you get the default session type for your platform: DbmSession with the
prefork-mpm and worker-mpm, MemorySession with the winnt-mpm.


Version 3.2
"PythonOption session" was introduced to allow the default session type
to be overridden at run time.

Version 3.3 (real soon now)
We started using PythonOption much more heavily in 3.2 to control the
run time configuration of mod_python. It quickly became apparent that
the potential for key conflicts with user code was rather high, so for
3.3 we adopted a new PythonOption namespace. Thus "PythonOption session"
has been deprecated in favour of "PythonOption
mod_python.session.session_type".

So my question is "How do we handle this in general?". At the very least
any of the Wiki authors should note which version of mod_python they
used when creating their examples.

Jim



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com