|
[Webware-checkins] r7193 - in Webware/trunk/WebKit: . Docs
From: <updates@we...> - 2008-01-27 10:26
|
Author: chrisz Date: Sun Jan 27 03:26:47 2008 New Revision: 7193 Modified: Webware/trunk/WebKit/Docs/RelNotes-X.Y.phtml Webware/trunk/WebKit/Transaction.py Log: Do not call session.sleep/awake for nested transactions (as suggested by Ben Parker). Modified: Webware/trunk/WebKit/Docs/RelNotes-X.Y.phtml ============================================================================== --- Webware/trunk/WebKit/Docs/RelNotes-X.Y.phtml (original) +++ Webware/trunk/WebKit/Docs/RelNotes-X.Y.phtml Sun Jan 27 03:26:47 2008 @@ -47,7 +47,9 @@ <a name="Bugfixes"></a><h2>Bugfixes</h2> <ul> - <li>...</li> + <li>In the case of nested transactions (when you use forwarding), + the session is now only awakened and put to sleep once by the outmost + transaction (as suggested by Ben Parker).</li> </ul> <% footer() %> Modified: Webware/trunk/WebKit/Transaction.py ============================================================================== --- Webware/trunk/WebKit/Transaction.py (original) +++ Webware/trunk/WebKit/Transaction.py Sun Jan 27 03:26:47 2008 @@ -34,6 +34,7 @@ self._session = None self._servlet = None self._error = None + self._nested = 0 _attrNames = 'application request response session servlet' \ ' errorOccurred error'.split() @@ -130,9 +131,10 @@ in the future if any use was demonstrated for it. """ - if self._session: + if not self._nested and self._session: self._session.awake(self) self._servlet.awake(self) + self._nested += 1 def respond(self): if self._session: @@ -146,8 +148,9 @@ (which is typical for shutdown/cleanup methods). """ + self._nested -= 1 self._servlet.sleep(self) - if self._session: + if not self._nested and self._session: self._session.sleep(self) self._application.sessions().storeSession(self._session) |
| Thread | Author | Date |
|---|---|---|
| [Webware-checkins] r7193 - in Webware/trunk/WebKit: . Docs | <updates@we...> |