Hello,
I was able to change our code to have the handlers called by the Apache
server (PerlResponseHandler, PerlChildInitHandler,
PerlChildExitHandler). What I don't understand, is in which scope/object
I store the reference to the BerkeleyDB in the init handler? And of
course, how I access this scope/object in the ResponseHandler?
A nice usage of the handler stuff can be found in the Apache::DBI module.
Greetings,
Nils
Perrin Harkins schrieb:
If this is read/write, you need to use the BerkeleyDB::Env stuff. If
you google a little you should find some examples. I know I've put a
few here and on perlmonks.org.
I can imagine how to tie on startup, but how to trigger the code for
untie at shutdown? Is untie needed at all with berkeleyDB?
Yes, do the untie to flush buffers to disk. The appropriate place to
do this is the PerlChildInitHandler and PerlChildExitHandler. Do not
try to open it in the parent process.
- Perrin