Quick question about Webware
Paul Boddie
paul at boddie.net
Wed Apr 24 11:42:08 EDT 2002
"Thomas Weholt" <thomas at gatsoft.no> wrote in message news:<yUvx8.30$RNd.170832384 at news.telia.no>...
> When you create a servlet using WebWare is it loaded on each request or is a
> instance kept in memory?
That's "Webware for Python", by the way. ;-)
As far as I know, several threads are instantiated on startup and when
a "request path" is resolved inside one of those threads, the servlet
factory creates a servlet instance which I would hope would stick
around after the request has been processed. Having said that, I
wasn't sure whether this was implemented within the framework itself,
and when I wrote my own servlet factory once, I decided to implement
"instance caching" within that factory.
I don't know whether other servlet factories implement caching
themselves, although a quick glance at the PythonServletFactory class
indicates that some kind of cache is in use.
> I mean, what if the servlet uses some module or piece of code that takes a
> while to load, how is this solved in WebWare?
Per-servlet-factory-instance (ie. per-thread) caches seem to be used.
One of the Webware mailing lists (webware-discuss, perhaps) might be a
better place to ask these kinds of questions, though.
Paul
More information about the Python-list
mailing list