Hi Ken,
I'm not sure whether this is possible with berkeley db, and even if it is possible I've never tried it and it will not work with the Freeze map. The map itself must be protected from concurrent access. Therefore if you had two processes altering the database concurrently it could lead to inconsistencies in the maps (consider iteration over one map, while the other map alters the map).
Quote:
|
Why can't another thread (on the same machine or a different one) create a Freeze map for the same database?
|
You can have access to the SAME map object within the same process from multple threads (as long as the map is protected - just as you expect with an STL map). But you cannot create two map objects on the same database and expected it work.
Why do you want to do this anyway? It was certainly pretty common to have a shared database prior to nice middleware like Ice so that two processes could exchange data. However, I think its much more convenient to use Ice and Freeze as its intended than to muck around with shared databases like this
Regards, Matthew