On Tue, 2003-06-03 at 16:01, T.J. Jankun-Kelly wrote:
> Greetings all.
> I have four questions that I thought I'd bundle all together instead of
> sending individually. Your help on any or all of them is appreciated.
> All questions are for Webware 0.8
> Question 1: New Sessions
> In the middle of a transaction, I occasionally have the need to force a
> new session to be created to replace the current session. Invalidating
> the session and then calling session again does not work since it always
> returns the (invalidated) session. Neither does setting the current
> session to None (via Transaction.setSession) and then requesting a new
> session (similar problem). Any suggestions?
Perhaps you could just delete the contents of the session:
sess = self.session()
for key in sess.values().keys():
> Question 2: Long Tasks
> Someone has probably asked this one before, but I could not find an
> answer (see question 4). Occasionally, I perform a long operation on the
> app server. If I wait around for the response, the HTML page returns
> "timeout" or "client reset by peer" messages. What is the Webware-ish
> approach to solving this problem?
I believe you'll be okay if you give the client a little something, like
you start sending them the page. You can do that, I believe, like:
> Question 3: Threading
> I have not found a good description of how Webware uses its various
> threads. My main question is this: I have on part of code that has have
> only one thread in it at a time (i.e., if two clients connect to the app
> server, only one can be using this object at a time). Again, what is the
> Webware-ish approach to this?
Use thread locks, like:
specialAppLock = threading.Lock()
The lock is just a module global.
> Question 4: Searching
> This is not a Webware question per se, more of one on the mailing list.
> I cannot find the search functionality for the webware-discuss mailing
> list from the SF page. I think some of my questions may have been
> addressed before, so searching would be preferred. Can someone point me
> to this?
I'm having this problem with other SF projects too. If we had access to
the mbox we could at least roll our own. Does anyone know where SF
might be squirreling away the mbox these days? (they've had it