Configuring Repositories |
The repositories of a CDO Server are configured in the cdo-server.xml file. Here's an example:
The following sections describe the various elements and properties.
Table of Contents
Defines an IRepository
instance.
The name
attribute uniquely identifies a repository in the scope of a repository configurator.
The repository
element can contain several property elements (see below) and must contain exactly one store element.
Specifies a constant UUID for the repository. If omitted the repository will be created with a random UUID. The format of an override UUID is not further specified but should respect the file naming conventions of the used operating system.
Overriding the default random UUID can be useful if you have scripts that operate on the file system folder that is created on the server for each repository and named after the repository UUID.
Specifies whether the repository will support audit views or not. Please note that a repository can only support audit views if its store supports audit views, as well.
The shipped DBStore does support audit views. Note also that it will not delete or update rows for modified objects if audits are supported. All revised state of the repository will be kept in the DB which can result in databases growing very large!
Specifies whether the repository will support the creation and usage of branches below the always existing main branch or not. Please note that a repository can only support branches if its store supports branches, as well.
Also note that branching support always requires auditing support, too.
Specifies whether the repository will support the storage of instances of the Ecore (meta meta) model or not.
With the advent of the legacy mode in CDO 3.0 you can store instances of any model in CDO repositories. Whether these models have been generated for CDO or not only influences their characteristics (scalability, performance, etc.). As a consequence you can also store instances of the Ecore (meta meta) model in CDO Repositories. Since Ecore is always registered in all package registries the legacy mode would lead to the creation of mapped tables in many types of stores, even if you never planned to store instances of Ecore.
Valid values: false
(default) or true
.
This property is deprecated. As of 4.2 instances of Ecore are always supported (on demand).
Specifies whether the repository will support the creation and optimized loading of units
or not.
Unit support is only available if the configured store
supports units.
Valid values: false
(default) or true
.
Specifies whether the repository will apply extra validation to prevent moves of objects between units
or not.
Valid values: false
(default) or true
.
See Also:
Specifies whether the repository will detect and reject commits that would leave stale references in the object graph.
Valid values: false
(default) or true
.
Specifies whether the repository will serialize commit operations by utilizing a lock or not.
Some stores, such as the LissomeStore, require commit operations to be serialized.
Valid values: false
(default) or true
.
Specifies whether the repository will cancel a scheduled query job if it is already running.
Some underlying stores (e.g. DBStore with a Derby database) might not be able to deal with this cleanly.
For such stores, this parameter can be set to false
.
Valid values: false
(default) or true
.
Specifies whether the repository will expect clients to generate IDs for new objects or whether it will ask the backend store to generate them.
Valid values: STORE
(default) or CLIENT
.
Example: <securityManager type="default" description="/security:annotation:home(/home)"/>
See also: http://wiki.eclipse.org/CDO/Security_Manager
Example: <authenticator type="file" description="_database/repo1.users"/>
See also: http://bugs.eclipse.org/302775
Example: <initialPackage nsURI="http://www.eclipse.org/emf/CDO/examples/company/1.0.0"/>
See also: http://bugs.eclipse.org/345431
Defines an IStore
instance.
The type
attribute corresponds to the type of a store factory that is contributed via the
org.eclipse.emf.cdo.server.storeFactory
extension point.
The remaining attributes depend on the specified type
attribute value.
The following values are possible with the shipped distribution (subject to user-supplied extension):
Specifies, if the store is a DBStore, the name of the DB schema to use for the repository.
If omitted the default schema name
of the repository's
DB adapter
is used as the schema name.
Specifies, if the store is a DBStore, whether to qualify table names with the schema name.
Specifies, if the store is a DBStore, whether to create the schema with the specified name at startup time, if it does not exist.
Specifies, if the store is a DBStore, at what interval in minutes the store will issue an SQL statement to keep the connection to the database alive.
Specifies, if the store is a DBStore, the number of additional attempts to connect to the DB after initial connection failure.
Specifies, if the store is a DBStore, the number of seconds to wait before additional attempts to connect to the DB after initial connection failure.
Specifies, if the store is a DBStore, the maximum number of store accessors (JDBC connections) to keep in the reader pool.
The default value is 15.
Specifies, if the store is a DBStore, the maximum number of store accessors (JDBC connections) to keep in the writer pool.
The default value is 15.
If set to true
and the store is a DBStore, drops all database tables of the configured
schema at the beginning of the store activation.
The default value is false
.
This element is recognized by DBStores and defines the overall mapping strategy
of the built-in O/R mapper.
The type
attribute corresponds to the type of a mapping strategy factory that is contributed via the
org.eclipse.emf.cdo.server.db.mappingStrategies
extension point.
The following values are possible with the shipped distribution (subject to user-supplied extension):
Specifies how the built-in O/R mapper will handle to-many references (collections). The following values are recognized:
Enables you to override the default value of the chosen DB adapter for the maximum length of table names.
Enables you to override the default value of the chosen DB adapter for the maximum length of column names.
Specifies a common fixed prefix for all table names generated by this mapping strategy.
Specifies whether generated package or class table names are qualified or not.
Specifies whether generated names are always suffixed with an internal ID or only in cases where the generated name absolutely needs mangling.
Specifies whether you want IDBField
construction stacktrace on schema update to have the origin of the nullable index field.
Specifies the size of the object type in-memory cache. Possible configuration values are:
Specifies the name of a ColumnTypeModifier
.
Specifies the type name of the factory
for a custom type mapping provider. Possible values:
factory
, which is contributed to the product group "org.eclipse.emf.cdo.server.db.typeMappingProviders".
This property is optional.
Specifies on what types of structural features additional indexes are to be created. The value is either empty or a | (pipe) separated list of the following tokens:
Specifies whether all tables for a package
are created eagerly.
Possible configuration values are:
false
(creates tables lazily, i.e., when they are actually needed for writing the first object; default value)
true
(creates tables eagerly, i.e., when a new package
is committed)
Specifies whether new revisions
create entire new copies of all their list features
or whether just the list deltas are stored.
Possible configuration values are:
false
(store new copies of all lists of a revision; default value)
true
(store only list deltas/ranges of a revision)
This property is only applicable to horizontal mapping strategies in auditing or branching repositories.
Specifies whether the first new revisions
in a branch
create entire new copies
of all their list features
or whether just the list deltas (relative to the base revisions in the parent branch) are stored.
Possible configuration values are:
false
(store only list deltas/ranges of the first revision in a branch; default value)
true
(store new copies of all lists of the first revision in a branch)
This property is only applicable to range-based horizontal mapping strategies in branching repositories.
Specifies whether element removals from the beginning of list features
adjust the
list indexes of all following elements or whether the first element is allowed to have a non-zero list index.
Possible configuration values are:
false
(allow non-zero list index for the first list elements; default value)
true
(force zero list indexes for the first list elements)
This property is only applicable to range-based horizontal mapping strategies in auditing or branching repositories.
Defines the IDBAdapter
instance of the store that interprets the SQL dialect of the used database.
The type
attribute corresponds to the name of a DB adapter factory that is contributed via the
org.eclipse.net4j.db.dbAdapters
extension point. No additional attributes are recognized.
The DB adapter must match the database specified in the dataSource element.
Defines the DataSource
instance of the store.
The class
attribute corresponds to the fully qualified name of the data source class.
Please refer to your DB manual for details about the supported data sources and their attributes.