On 4/19/06, <b class="gmail_sendername">Robert L. Read</b> <<a href="mailto:read@robertlread.net">read@robertlread.net</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;">    I am a little surprised by your use of clsql:start-transaction; the normal idiom for<br>
this is:<br>
<br>
       (with-transaction (:store-controller *store-controller*)<br>
         (loop for obj in objs<br>
               for key in keys<br>
               do (setf (get-value key bt) obj))))<br>
  (this is an example for testcollections.lisp)<br>
<br>
Are you saying in your email that you could not use this way of doing things?  The <br>
with-transaction macro should be indpendent of the type of the store-controller.</div></blockquote><div><br>And indeed it is independent, but calls to ele:start-transaction, ele:commit-transaction and ele:abort-transaction are throwing an error for me and their code seems to be BDB specific. I would like to use with-transacton, yet it aborts the transaction on "any non-local exit", while i want to rollback only when some error occurs. TBNL redirect code does (throw 'tbnl:tbnl-handler-done), aborting transaction on each redirect. As in web applications (save-data-to-database) (redirect-to-avoid-double-post) is a very common pattern, i was getting my data reverted every time. So i am doing manual commits/rollbacks, depending on whether the request processing code raised an error or not. 
<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="direction: ltr;"><span class="q">
You wrote:<br>
<tt>As sqlite requires each thread to have it's own connection by throwing</tt><br>
<tt>an error if one thread tries to reuse a connection created by another</tt><br>
<tt>thread at least on Ubuntu Dapper. Google says that it depends on a</tt><br>
<tt>compile time flag for libsqlite3.</tt><br>
<br></span></div><div style="direction: ltr;">
The current Elephant code has no notion of this, and I'm pretty sure it will hand the same connection<br>
to several threads.  Obviously, you could solve this problem by using mutexes to make sure that<br>
only one thread accesses the controller, but that might be quite unpleasant for you code.</div></blockquote><div><br>At the moment i am doing exactly this - making sure that only one thread is working with elephant at the same time, though it is more of a workaround than a solution. 
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="direction: ltr;">
If these comments can help you provide anymore information about what your possible solutions<br>
are, please reply so I can think about it before I begin debugging it tonight or tomorrow.</div></blockquote><div><br>You can find more info about the issue with sqlite here:<br><br>    <a href="http://projects.edgewall.com/trac/ticket/2196">
http://projects.edgewall.com/trac/ticket/2196</a><br><br>hope that helps.<br><br>--<br>Ignas Mikalajūnas<br></div><br></div>