Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "CDO Server Configuration"
(→Element acceptor) |
|||
Line 4: | Line 4: | ||
This section shows an example XML configuration file for the CDO server. It must be located in the folder that you declared via system property <code>net4j.config</code>. The subsequent section explains the used [[#Element cdoServer|XML Elements]]. You can also click directly on the links in the XML file to navigate to the respective descriptions. | This section shows an example XML configuration file for the CDO server. It must be located in the folder that you declared via system property <code>net4j.config</code>. The subsequent section explains the used [[#Element cdoServer|XML Elements]]. You can also click directly on the links in the XML file to navigate to the respective descriptions. | ||
− | + | <?xml version="1.0" encoding="UTF-8"?> | |
− | + | <[[#Element cdoServer|'''cdoServer''']]> | |
− | + | ||
− | + | <[[#Element acceptor|'''acceptor''']] type="tcp" listenAddr="0.0.0.0" port="2036"> | |
− | + | <font color="green">''<!--''</font> | |
− | + | <font color="green">''<[[#Element negotiator |negotiator]] type="challenge" description="/temp/users.db"/> ''</font> | |
− | + | <font color="green">''-->''</font> | |
− | + | </'''acceptor'''> | |
− | + | ||
− | + | <[[#Element repository|'''repository''']] name="repo1"> | |
− | + | <'''property''' name="[[#Property overrideUUID|overrideUUID]]" value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/> | |
− | + | <'''property''' name="[[#Property supportingAudits|supportingAudits]]" value="true"/> | |
− | + | <'''property''' name="[[#Property verifyingRevisions|verifyingRevisions]]" value="false"/> | |
− | + | <'''property''' name="[[#Property rememberingKnownTypes|rememberingKnownTypes]]" value="false"/> | |
− | + | <'''property''' name="[[#Property currentLRUCapacity|currentLRUCapacity]]" value="10000"/> | |
− | + | <'''property''' name="[[#Property revisedLRUCapacity|revisedLRUCapacity]]" value="100"/> | |
− | + | ||
− | + | <[[#Element store|'''store''']] type="db"> | |
− | + | <font color="green">''<!-- type: horizontal | vertical | <any user-contributed type>-->''</font> | |
− | + | <[[#Element mappingStrategy|'''mappingStrategy''']] type="horizontal"> | |
− | + | <font color="green">''<!-- ONE_TABLE_PER_REFERENCE | ONE_TABLE_PER_CLASS | ONE_TABLE_PER_PACKAGE | ONE_TABLE_PER_REPOSITORY | LIKE_ATTRIBUTES -->''</font> | |
− | + | <'''property''' name="[[#Property toManyReferences|toManyReferences]]" value="ONE_TABLE_PER_REFERENCE"/> | |
− | + | ||
− | + | <font color="green">''<!-- LIKE_ATTRIBUTES | LIKE_TO_MANY_REFERENCES-->''</font> | |
− | + | <'''property''' name="[[#Property toOneReferences|toOneReferences]]" value="LIKE_ATTRIBUTES"/> | |
− | + | ||
− | + | <font color="green">''<!-- MODEL | STRATEGY-->''</font> | |
− | + | <'''property''' name="[[#Property mappingPrecedence|mappingPrecedence]]" value="MODEL"/> | |
− | + | </'''mappingStrategy'''> | |
− | + | ||
− | + | <font color="green">''<!--<dbAdapter name="derby"/>''</font> | |
− | + | <font color="green">''<dataSource''</font> | |
− | + | <font color="green">''driverClass="org.apache.derby.jdbc.EmbeddedDataSource"''</font> | |
− | + | <font color="green">''databaseName="/temp/cdodb1"''</font> | |
− | + | <font color="green">''createDatabase="create"/>-->''</font> | |
− | + | ||
− | + | <[[#Element dbAdapter|'''dbAdapter''']] name="derby"/> | |
− | + | <[[#Element dataSource|'''dataSource''']] | |
− | + | driverClass="org.apache.derby.jdbc.ClientDataSource" | |
− | + | databaseName="cdodb1" | |
− | + | createDatabase="create"/> | |
− | + | ||
− | + | <font color="green">''<!--<dbAdapter name="hsqldb"/>''</font> | |
− | + | <font color="green">''<dataSource''</font> | |
− | + | <font color="green">''driverClass="org.eclipse.net4j.db.hsqldb.HSQLDBDataSource"''</font> | |
− | + | <font color="green">''database="jdbc:hsqldb:mem:cdodb1"''</font> | |
− | + | <font color="green">''user="sa"/>-->''</font> | |
− | + | ||
− | + | <font color="green">''<!--<dbAdapter name="mysql"/>''</font> | |
− | + | <font color="green">''<dataSource''</font> | |
− | + | <font color="green">''driverClass="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"''</font> | |
− | + | <font color="green">''url="jdbc:mysql://localhost/cdodb1"''</font> | |
− | + | <font color="green">''user="sa"/>-->''</font> | |
− | + | </'''store'''> | |
− | + | </'''repository'''> | |
− | + | ||
− | + | </'''cdoServer'''> | |
− | + | ||
− | + | ||
− | + | ||
<br> | <br> | ||
Line 71: | Line 68: | ||
===Element acceptor=== | ===Element acceptor=== | ||
− | Defines an [http://download.eclipse.org/modeling/emft/net4j/javadoc/0.8.0/org/eclipse/net4j/IAcceptor.html|<code>IAcceptor</code>] instance. Please refer to the [[Net4j]] documentation for details about acceptors and connectors. The <code>type</code> attribute corresponds to the type of an acceptor factory that is contributed via the <code>org.eclipse.net4j.util.factories</code> extension point with a product group of <code>org.eclipse.net4j.acceptors</code>. The remaining attributes depend on the specified type attribute value. The following values are possible with the shipped distribution (subject to user supplied extension): | + | Defines an [http://download.eclipse.org/modeling/emft/net4j/javadoc/0.8.0/org/eclipse/net4j/IAcceptor.html|<code>IAcceptor</code>] instance. Please refer to the [[Net4j]] documentation for details about acceptors and connectors. |
+ | |||
+ | The <code>type</code> attribute corresponds to the type of an acceptor factory that is contributed via the <code>org.eclipse.net4j.util.factories</code> extension point with a product group of <code>org.eclipse.net4j.acceptors</code>. The remaining attributes depend on the specified type attribute value. The following values are possible with the shipped distribution (subject to user supplied extension): | ||
* '''tcp:''' Acceptor for fast, new I/O based socket connections. The following additional attributes are recognized: | * '''tcp:''' Acceptor for fast, new I/O based socket connections. The following additional attributes are recognized: | ||
Line 84: | Line 83: | ||
====Element negotiator==== | ====Element negotiator==== | ||
− | Defines an [http://download.eclipse.org/modeling/emft/net4j/javadoc/0.8.0/org/eclipse/net4j/util/security/INegotiator.html|<code>INegotiator</code>] instance to be used by the connectors created by an acceptor (defined by the enclosing [[#Element acceptor|acceptor]] element). Please refer to the [[Net4j]] documentation for details about negotiators and the pluggable security concept that can be used for authentication and authorization. The <code>type</code> attribute corresponds to the type of a negotiator factory that is contributed via the <code>org.eclipse.net4j.util.factories</code> extension point with a product group of <code>org.eclipse.net4j.negotiators</code>. The remaining attributes depend on the specified type attribute value. The following values are possible with the shipped distribution (subject to user supplied extension): | + | Defines an [http://download.eclipse.org/modeling/emft/net4j/javadoc/0.8.0/org/eclipse/net4j/util/security/INegotiator.html|<code>INegotiator</code>] instance to be used by the connectors created by an acceptor (defined by the enclosing [[#Element acceptor|acceptor]] element). Please refer to the [[Net4j]] documentation for details about negotiators and the pluggable security concept that can be used for authentication and authorization. |
+ | |||
+ | The <code>type</code> attribute corresponds to the type of a negotiator factory that is contributed via the <code>org.eclipse.net4j.util.factories</code> extension point with a product group of <code>org.eclipse.net4j.negotiators</code>. The remaining attributes depend on the specified type attribute value. The following values are possible with the shipped distribution (subject to user supplied extension): | ||
* '''challenge:''' Negotiator for simple yet effective and cryptographically secure challenge/response based negotiations. The following additional attributes are recognized: | * '''challenge:''' Negotiator for simple yet effective and cryptographically secure challenge/response based negotiations. The following additional attributes are recognized: | ||
** '''description:''' The absolute path to a file in the local file system that contains the credentials of the users in the form <code>userid: password</code>. | ** '''description:''' The absolute path to a file in the local file system that contains the credentials of the users in the form <code>userid: password</code>. | ||
Line 90: | Line 91: | ||
===Element repository=== | ===Element repository=== | ||
+ | Defines an [http://download.eclipse.org/modeling/emft/cdo/javadoc/0.8.0/org/eclipse/emf/cdo/server/IRepository.html|<code>IRepository</code>] instance. Please refer to [[CDO Server]] for details about repositories and sessions. | ||
+ | |||
+ | The <code>name</code> attribute uniquely identifies a repository in the scope of a repository configurator. | ||
+ | |||
+ | The repository element can contain zero or one property elements (see below) and must contain exactly one [[#Element store|store]] element. | ||
<br> | <br> | ||
Line 111: | Line 117: | ||
===Element store=== | ===Element store=== | ||
+ | Defines an [http://download.eclipse.org/modeling/emft/cdo/javadoc/0.8.0/org/eclipse/emf/cdo/server/IStore.html|<code>IStore</code>] instance. Please refer to [[CDO Storage Framework]] for details about stores, store readers and store writers. | ||
+ | |||
+ | The <code>type</code> attribute corresponds to the type of a store factory that is contributed via the <code>org.eclipse.emf.cdo.server.storeFactory</code> 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): | ||
+ | * '''noop:''' Store that does nothing. A repository with a noop store can function properly as long as the the server is not restarted and the internal caches do not run full so that revisions get evicted and discarded. No additional attributes are recognized. | ||
+ | * '''db:''' Store that connects via JDBC to a relational database and manages persistent revisions and models through a built-in O/R mapper. The following additional attributes are recognized: | ||
+ | ** '''description:''' The absolute path to a file in the local file system that contains the credentials of the users in the form <code>userid: password</code>. | ||
+ | |||
+ | The store element can contain zero or one property elements (see below) and must contain exactly one [[#Element store|store]] element. | ||
<br> | <br> | ||
Revision as of 09:50, 14 November 2007
Contents
Example XML
This section shows an example XML configuration file for the CDO server. It must be located in the folder that you declared via system property net4j.config
. The subsequent section explains the used XML Elements. You can also click directly on the links in the XML file to navigate to the respective descriptions.
<?xml version="1.0" encoding="UTF-8"?> <cdoServer>
<acceptor type="tcp" listenAddr="0.0.0.0" port="2036"> <!-- <negotiator type="challenge" description="/temp/users.db"/> --> </acceptor> <repository name="repo1"> <property name="overrideUUID" value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/> <property name="supportingAudits" value="true"/> <property name="verifyingRevisions" value="false"/> <property name="rememberingKnownTypes" value="false"/> <property name="currentLRUCapacity" value="10000"/> <property name="revisedLRUCapacity" value="100"/> <store type="db"> <!-- type: horizontal | vertical | <any user-contributed type>--> <mappingStrategy type="horizontal"> <!-- ONE_TABLE_PER_REFERENCE | ONE_TABLE_PER_CLASS | ONE_TABLE_PER_PACKAGE | ONE_TABLE_PER_REPOSITORY | LIKE_ATTRIBUTES --> <property name="toManyReferences" value="ONE_TABLE_PER_REFERENCE"/> <!-- LIKE_ATTRIBUTES | LIKE_TO_MANY_REFERENCES--> <property name="toOneReferences" value="LIKE_ATTRIBUTES"/> <!-- MODEL | STRATEGY--> <property name="mappingPrecedence" value="MODEL"/> </mappingStrategy> <!--<dbAdapter name="derby"/> <dataSource driverClass="org.apache.derby.jdbc.EmbeddedDataSource" databaseName="/temp/cdodb1" createDatabase="create"/>--> <dbAdapter name="derby"/> <dataSource driverClass="org.apache.derby.jdbc.ClientDataSource" databaseName="cdodb1" createDatabase="create"/> <!--<dbAdapter name="hsqldb"/> <dataSource driverClass="org.eclipse.net4j.db.hsqldb.HSQLDBDataSource" database="jdbc:hsqldb:mem:cdodb1" user="sa"/>--> <!--<dbAdapter name="mysql"/> <dataSource driverClass="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" url="jdbc:mysql://localhost/cdodb1" user="sa"/>--> </store> </repository> </cdoServer>
Element cdoServer
The root element of the cdo-server.xml
file. It can contain zero, one or several acceptor elements and zero, one or several repository elements.
Element acceptor
Defines an IAcceptor
instance. Please refer to the Net4j documentation for details about acceptors and connectors.
The type
attribute corresponds to the type of an acceptor factory that is contributed via the org.eclipse.net4j.util.factories
extension point with a product group of org.eclipse.net4j.acceptors
. The remaining attributes depend on the specified type attribute value. The following values are possible with the shipped distribution (subject to user supplied extension):
- tcp: Acceptor for fast, new I/O based socket connections. The following additional attributes are recognized:
- listenAddr: The network address the server socket shall be bound to. A value of
"0.0.0.0"
is the default (whole attribute can be omitted) and tells the socket to listen on all available addresses. - port: The network port the server socket shall be bound to. A value of
"2036"
is the default (whole attribute can be omitted).
- listenAddr: The network address the server socket shall be bound to. A value of
- jvm: Acceptor for JVM internal (non-socket based ) connections. Currently not supported by the
Net4Configurator
.
The acceptor element can contain zero or one negotiator element(s).
Please note that the acceptor element is likely to be moved to a separate Net4j configuration file in the future.
Element negotiator
Defines an INegotiator
instance to be used by the connectors created by an acceptor (defined by the enclosing acceptor element). Please refer to the Net4j documentation for details about negotiators and the pluggable security concept that can be used for authentication and authorization.
The type
attribute corresponds to the type of a negotiator factory that is contributed via the org.eclipse.net4j.util.factories
extension point with a product group of org.eclipse.net4j.negotiators
. The remaining attributes depend on the specified type attribute value. The following values are possible with the shipped distribution (subject to user supplied extension):
- challenge: Negotiator for simple yet effective and cryptographically secure challenge/response based negotiations. The following additional attributes are recognized:
- description: The absolute path to a file in the local file system that contains the credentials of the users in the form
userid: password
.
- description: The absolute path to a file in the local file system that contains the credentials of the users in the form
Element repository
Defines an IRepository
instance. Please refer to CDO Server for details about repositories and sessions.
The name
attribute uniquely identifies a repository in the scope of a repository configurator.
The repository element can contain zero or one property elements (see below) and must contain exactly one store element.
Property overrideUUID
Property supportingAudits
Property verifyingRevisions
Property rememberingKnownTypes
Property currentLRUCapacity
Property revisedLRUCapacity
Element store
Defines an IStore
instance. Please refer to CDO Storage Framework for details about stores, store readers and store writers.
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):
- noop: Store that does nothing. A repository with a noop store can function properly as long as the the server is not restarted and the internal caches do not run full so that revisions get evicted and discarded. No additional attributes are recognized.
- db: Store that connects via JDBC to a relational database and manages persistent revisions and models through a built-in O/R mapper. The following additional attributes are recognized:
- description: The absolute path to a file in the local file system that contains the credentials of the users in the form
userid: password
.
- description: The absolute path to a file in the local file system that contains the credentials of the users in the form
The store element can contain zero or one property elements (see below) and must contain exactly one store element.
Element invalidationStrategy
Element mappingStrategy
Property toManyReferences
Property toOneReferences
Property mappingPrecedence
Element dbAdapter
Element dataSource