Re: [spr32061] Problem with Allegroserve+Allegrocache

John Foderaro <[email protected]> Wed, 6 Sep 2006 21:36:14 -0700
Newsgroups gmane.lisp.allegro
Message-ID <[email protected]>
It *should* be the case that specifying the database like
this is sufficient

 (db.ac:retrieve-from-index 'dbs::user 'dbs::username username :db $users)


However to be safe it's better to do this:

(let ((*allegrocache* $users))
   (db.ac:retrieve-from-index 'dbs::user 'dbs::username username))

This establishes the current database for all functions
that retrieve-from-index might call.   
(If this fixes it let me know as special binding, while good style,
should not be necessary in this case).


Stepping back I'm concerned that you're potentially
using a single database connection in more than one thread
(since AllegroServe is multithreaded).   This can lead
to problems.

In the more recent AllegroCache distributions  you'll
find a find called doc/acweb.pdf that goes into detail
on how to use AllegroCache and AllegroServe together
and not run into problems with multiple threads.

The latest distributions of AllegroCache can be found here:

http://www.franz.com/products/allegrocache/download/dist/download