Recent changes to 104: cacheing uri in connectionForURI() stomps on connections changes to 104: cacheing uri in connectionForURI() stomps on connectionsenThu, 04 Aug 2005 17:54:06 -0000cacheing uri in connectionForURI() stomps on connections<div class="markdown_content"><p>If you are using SQLObject where you have one<br /> connection per thread , the cacheing of the uri in<br /> connectionForURI stomps on the connections.</p> <p>This happens for me when I am using SQLObject with<br /> CherryPy and SQLite. On each thread start up, I create<br /> a connectionHub object for that thread. If I use the<br /> connectionForURI method, the connections get stomped<br /> on, and I get tracebacks saying that the cursor is<br /> being accessed by a thread other than the one that<br /> created it. If I bypass that and use the deprecated<br /> method of creating the connection directly with<br /> SQLiteConnection(), it works fine.</p> <p>If we are going to cache the uri's (Is there a good<br /> reason to do this? Shouldn't a connection only be<br /> generated once?), we need to have a method of sending a<br /> thread id or something similar to the connectionForURI<br /> method so that it gets cached correctly.</p> <p>I would suspect that this will also cause major<br /> problems for anyone who is trying to use one connection<br /> per thread (I think you still need to do this with MySQL).</p> <p>If you have any questions, you can reach me at<br /></p> <p>You can also read the following thread for more<br /> information:<br /> <a href="" rel="nofollow"></a>_thread/thread/1e979bb1f766f0f3/8dfdba9cf489fa63#8dfdba9cf489fa63</p></div>AnonymousThu, 04 Aug 2005 17:54:06 -0000http://sourceforge.nete0300f3cc1274e97eb206ed79a8f08971f196e3e