lloyd wrote:
> Ben Parker wrote:
> > Contexts are really thin in Webware/WebKit right now. I mean
> really thin.
> > The only time they've come into play for me is acting as a
> container for how
> > WebKit instantiates servlets. Unless you do a lot of
> intra-context servlet
> > inheriting, you've probably never had occasion to read that code.
> >
> > It's kind of woeful that contexts don't "wrap" a
> mini-application better to
> > allow for more configurability. The stickler for me is having to use the
> > same Session class across all contexts.
>
> do you mean having a single session across contexts?  if so, thanks for
> reminding me of this, since it's a perfect example of the separation i'm
> referring to.
>

As of Webware 0.8.1 the Session class used by all contexts is still the one
defined in WebKit (Session.py). All contexts use the same session class, and
if the browsing user moves between contexts, the same session object is
used.

If you use a MixIn to combine a custom session class with the default one,
all Contexts are affected. You may think that mixing-in a custom session
inside a Context's __init__ file will affect only that context, but it
don't. :)

> if contexts are "applications", as i understand them to be, shouldn't
> they maintain separate state in sessions?
>
> or maybe there is a preferred way to achieve this that i'm not aware of?
>

Webware developers tend to think of separate contexts as separate
applications, but they are definitely not. Once you understand the
relationship, you can hand-wave it and go about building your app, most
likely ignoring contexts entirely aside from the one you set up to contain
the servlets.

Don't get me wrong though, I'm not particularly pushing for contexts to
change. It's just one of these issues that comes up on the list from time to
time. To be honest, the decision between running several AppServers with one
Application each (as we do now) or several Applications under one AppServer
(each with it's own Context and configurable Session class) is really a "six
of one, 1/2 dozen of the other" situation for me.




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to