[Webware-discuss] Re: [ZODB-Dev] Webkit Threading and ZODB 3.3a2: problems on Windows

Matt Feifarek matt at dalchemy.com
Thu Feb 19 14:10:19 EST 2004


On Thu, Feb 19, 2004 at 01:48:48PM -0500, Shane Hathaway wrote:
| 
| It sounds like a servlet can re-awaken in a different thread from the one
| in which it was put to sleep.  If that happens, changes made before
| sleeping get registered with a different transaction than the transaction
| being committed.  The new transaction is unaware of the change.  Later, 
| you might accidentally commit or abort the original transaction.  What a 
| mess!

I don't believe that this is the case. I think that a servlet instance
stays in a thread, and is destroyed if the AppServer needs the thread
for another servlet.

| If the above guess is correct, you would benefit from the experimental
| support for binding transactions to connections (like Kapil mentioned.)  
| Your servlets span threads; therefore, transactions should be bound to
| connections rather than threads.

This may still be worth exploring, however. Thanks.



More information about the ZODB-Dev mailing list