-->

Do I have to re-apply db4o configuration settings

2019-07-29 06:53发布

问题:

I'm in the process of evaluating db4o and I have a pretty simple question. Does the db4o configuration settings (e.g. Transparent Activation) and indexes need to be setup each time the application runs and/or the database is loaded, or can all this be setup at the time the database is created?

For reference - I'm building an Android application and the database is going to be prebuilt on the desktop and shipped with the app.

回答1:

just as an FYI, there is an exception .. indexes once created are saved and will be used regardless of their specification at OpenFile/Connection time.

Best, Robert



回答2:

After more digging in the documentation for db4o I found my answer :)

"Configuration settings are not stored in db4o database files. Accordingly the same configuration has to be submitted every time an ObjectContainer/ObjectServer is opened. For using db4o in client/server mode it is recommended to use the same configuration on the server and on the client. To set this up nicely it makes sense to create one application class with one method that creates an appropriate configuration and to deploy this class both to the server and to all clients."



标签: db4o