11. Configurationdb4o provides a wide range of configuration methods to request special behaviour. For a complete list of all available methods see the API documentation for the com.db4o.config package. Some hints around using configuration calls: 11.1. ScopeConfiguration calls can be issued to a global VM-wide configuration context with
and to an open IObjectContainer/IObjectServer with
When an IObjectContainer/IObjectServer is opened, the global configuration context is cloned and copied into the newly opened IObjectContainer/IObjectServer. Subsequent calls against the global context with Db4oFactory.Configure() have no effect on open IObjectContainers/IObjectServers. 11.2. Calling MethodsMany configuration methods have to be called before an IObjectContainer/IObjectServer is opened and will be ignored if they are called against open IObjectContainers/IObjectServers. Some examples:
Configurations that influence the database file format will have to take place, before a database is created, before the first #OpenXXX() call. Some examples:
Configuration settings are not stored in db4o database files. Accordingly all configuration methods have to be called every time before an IObjectContainer/IObjectServer is opened. For using db4o in client/server mode it is recommended to use the same global 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 does all the db4o configuration and to deploy this class both to the server and to all clients. -- generated by Doctor courtesy of db4objects Inc. |