Hi Klaus,<br><br>I have just committed <a href="http://bknr.net/trac/changeset/2600">http://bknr.net/trac/changeset/2600</a> which adds multiple store support through the WITH-TRANSACTION macro. You need to use the :MAKE-DEFAULT NIL as initarg when making a store instance to prevent setting the *STORE* special variable. WITH-STORE must then be used to select a store to work with:<br>
<br>DATASTORE> (defvar *state* 0)<br>*STATE*<br>DATASTORE> (defvar store1 (make-instance 'store :directory "/tmp/store1/" :make-default nil))<br>STORE1<br>DATASTORE> (defvar store2 (make-instance 'store :directory "/tmp/store2/" :make-default nil))<br>
STORE2<br>DATASTORE> (deftransaction foo (value) (setf *state* value))<br>FOO<br>DATASTORE> (with-store (store1) (foo 1))<br>1<br>DATASTORE> (with-store (store2) (foo 2))<br>2<br>DATASTORE> (with-store (store1) (restore) *state*)<br>
reading store random state<br>restoring #<STORE DIR: "/tmp/store1/"><br>loading transaction log /tmp/store1/current/transaction-log<br>1<br>DATASTORE> (with-store (store2) (restore) *state*)<br>reading store random state<br>
restoring #<STORE DIR: "/tmp/store2/"><br>loading transaction log /tmp/store2/current/transaction-log<br>2<br>DATASTORE><br><br>Let me know if that suits and works for you.<br><br>-Hans<br><br>