| <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <html> |
| |
| <head> |
| <title>Configuring Repositories (CDO Model Repository Documentation)</title> |
| |
| <link rel="stylesheet" href="../book.css" charset="UTF-8" type="text/css"> |
| |
| <noscript></noscript> |
| <script type="text/javascript"> |
| function windowTitle() |
| { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Configuring Repositories (CDO Model Repository Documentation)"; |
| } |
| } |
| </script> |
| |
| <link rel="stylesheet" href="../editor.css" charset="UTF-8" type="text/css"> |
| |
| <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> |
| |
| <script src="http://code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script> |
| |
| <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css"> |
| |
| <script> |
| $(function() { |
| $( ".resizable" ).resizable({ handles:"s,e,se", autoHide:true }); |
| }); |
| </script> |
| |
| <script type="text/javascript"> |
| function maximize(id) |
| { |
| e = document.getElementById('max_' + id); |
| c1 = document.getElementById('editor_content_1_' + id); |
| c2 = document.getElementById('editor_content_2_' + id); |
| pv = document.getElementById('max_pv_' + id); |
| if (e.className == 'max') |
| { |
| e.className = 'rst'; |
| e.setAttribute('title', 'Restore'); |
| c1.setAttribute('style_orig', c1.getAttribute('style')); |
| c1.setAttribute('style', 'border:2px solid #99b4d1; border-top:none;'); |
| c2.setAttribute('style', ''); |
| if (pv != null) |
| { |
| pv.setAttribute('width_orig', pv.getAttribute('width')); |
| pv.setAttribute('width', ''); |
| } |
| } |
| else |
| { |
| e.className = 'max'; |
| e.setAttribute('title', 'Maximize'); |
| c1.setAttribute('style', c1.getAttribute('style_orig')); |
| c1.setAttribute('style_orig', ''); |
| c2.setAttribute('style', 'overflow:scroll; width:100%; height:100%;'); |
| if (pv != null) |
| { |
| pv.setAttribute('width', pv.getAttribute('width_orig')); |
| pv.setAttribute('width_orig', ''); |
| } |
| } |
| } |
| </script> |
| </head> |
| |
| <body bgcolor="white" onload="windowTitle();"> |
| <!-- <div class="help_breadcrumbs breadcrumbs_top"><a href="../Overview.html" title="CDO Model Repository Documentation">CDO Model Repository Documentation</a> > <a href="index.html" title="Category in CDO Model Repository Documentation">Operator's Guide</a></div> --> |
| |
| <table border="0"> |
| <tr> |
| <td width="100%"><h1>Configuring Repositories</h1></td> |
| <td align="right" valign="middle" nowrap><a href="Doc00_OperatingServer.html" title="Backward to Operating a CDO Server"><img src="../../images/backward.png" border="0"></a> <a href="Doc02_ConfiguringAcceptors.html" title="Forward to Configuring Acceptors"><img src="../../images/forward.png" border="0"></a></td> |
| </tr> |
| </table> |
| <p class="author">Author: Eike Stepper</p> |
| <p> |
| The repositories of a CDO Server are configured in the cdo-server.xml file. Here's an example: |
| |
| |
| <div class="snippet" style="margin-left:24px;" align="left"> |
| <a name="snippet_Doc01_ConfiguringRepositories_1"></a> |
| <table border="0" cellspacing="0" cellpadding="0"> |
| <tr> |
| <td width="25px"><div style="position:relative;"><img src="../../images/editor-1.png"><img style="position:absolute; top:5px; left:5px;" src="../../images/formatter-xml.gif"></div></td> |
| <td style="background-image:url(../../images/editor-2.png); background-repeat:repeat-x;" width="1px"><font face="Segoe UI,Arial" size="-1">cdo‑server.xml</font></td> |
| <td width="1px"><img src="../../images/editor-3.png"></td> |
| <td style="background-image:url(../../images/editor-4.png); background-repeat:repeat-x;" align="right"></td> |
| <td style="background-image:url(../../images/editor-4.png); background-repeat:repeat-x;" align="center" width="16"><a href="javascript:maximize('Doc01_ConfiguringRepositories_1')" id="max_Doc01_ConfiguringRepositories_1" class="max" title="Maximize"> </a></td> |
| <td width="6px"><img src="../../images/editor-5.png"></td> |
| </tr> |
| <tr> |
| <td colspan="6" align="left" valign="top" style="border:1px solid #a0a0a0; border-top:none;" nowrap> |
| <div id="editor_content_1_Doc01_ConfiguringRepositories_1" class="ui-widget-content resizable" style="width:600px; height:300px; border:2px solid #99b4d1; border-top:none;"> |
| <div id="editor_content_2_Doc01_ConfiguringRepositories_1" style="overflow:scroll; width:100%; height:100%;"> |
| <code> |
| <font color="#0000e1"><?xml version=</font><font color="#000080">"1.0"<font color="#0000e1"> encoding=</font><font color="#000080">"UTF-8"<font color="#0000e1">?></font><font color="#000080"><br/> |
| </font><font color="#0000e1"><cdoServer></font><font color="#000080"><br/> |
| <br/> |
| </font><font color="#0000e1"><repository name=</font><font color="#000080">"repo1"<font color="#0000e1">></font><font color="#000080"><br/> |
| </font><font color="#0000e1"><property name=</font><font color="#000080">"overrideUUID"<font color="#0000e1"> value=</font><font color="#000080">""<font color="#0000e1">/></font><font color="#000080"><br/> |
| </font><font color="#0000e1"><property name=</font><font color="#000080">"supportingAudits"<font color="#0000e1"> value=</font><font color="#000080">"true"<font color="#0000e1">/></font><font color="#000080"><br/> |
| </font><font color="#0000e1"><property name=</font><font color="#000080">"supportingBranches"<font color="#0000e1"> value=</font><font color="#000080">"true"<font color="#0000e1">/></font><font color="#000080"><br/> |
| </font><font color="#0000e1"><property name=</font><font color="#000080">"ensureReferentialIntegrity"<font color="#0000e1"> value=</font><font color="#000080">"false"<font color="#0000e1">/></font><font color="#000080"><br/> |
| </font><font color="#0000e1"><property name=</font><font color="#000080">"allowInterruptRunningQueries"<font color="#0000e1"> value=</font><font color="#000080">"true"<font color="#0000e1">/></font><font color="#000080"><br/> |
| </font><font color="#0000e1"><property name=</font><font color="#000080">"idGenerationLocation"<font color="#0000e1"> value=</font><font color="#000080">"STORE"<font color="#0000e1">/></font><font color="#000080"><br/> |
| </font><font color="#0000e1"><property name=</font><font color="#000080">"serializeCommits"<font color="#0000e1"> value=</font><font color="#000080">"false"<font color="#0000e1">/></font><font color="#000080"><br/> |
| </font><font color="#0000e1"><property name=</font><font color="#000080">"optimisticLockingTimeout"<font color="#0000e1"> value=</font><font color="#000080">"10000"<font color="#0000e1">/></font><font color="#000080"><br/> |
| <br/> |
| </font><font color="#0000e1"><store type=</font><font color="#000080">"db"<font color="#0000e1">></font><font color="#000080"><br/> |
| </font><font color="#0000e1"><property name=</font><font color="#000080">"connectionKeepAlivePeriod"<font color="#0000e1"> value=</font><font color="#000080">"60"<font color="#0000e1">/></font><font color="#000080"><br/> |
| </font><font color="#0000e1"><property name=</font><font color="#000080">"readerPoolCapacity"<font color="#0000e1"> value=</font><font color="#000080">"20"<font color="#0000e1">/></font><font color="#000080"><br/> |
| </font><font color="#0000e1"><property name=</font><font color="#000080">"writerPoolCapacity"<font color="#0000e1"> value=</font><font color="#000080">"20"<font color="#0000e1">/></font><font color="#000080"><br/> |
| <br/> |
| </font><font color="#0000e1"><mappingStrategy type=</font><font color="#000080">"horizontal"<font color="#0000e1">></font><font color="#000080"><br/> |
| </font><font color="#0000e1"><property name=</font><font color="#000080">"qualifiedNames"<font color="#0000e1"> value=</font><font color="#000080">"true"<font color="#0000e1">/></font><font color="#000080"><br/> |
| </font><font color="#0000e1"></mappingStrategy></font><font color="#000080"><br/> |
| <br/> |
| </font><font color="#0000e1"><dbAdapter name=</font><font color="#000080">"h2"<font color="#0000e1">/></font><font color="#000080"><br/> |
| <br/> |
| </font><font color="#0000e1"><dataSource<br/> |
| class=</font><font color="#000080">"org.h2.jdbcx.JdbcDataSource"<font color="#0000e1"><br/> |
| URL=</font><font color="#000080">"jdbc:h2:database/repo1"<font color="#0000e1">/></font><font color="#000080"><br/> |
| </font><font color="#0000e1"></store></font><font color="#000080"><br/> |
| </font><font color="#0000e1"></repository></font><font color="#000080"><br/> |
| <br/> |
| </font><font color="#3f7f5f"><!-- other acceptors and repositories --></font><font color="#000080"><br/> |
| <br/> |
| </font><font color="#0000e1"></cdoServer></font><font color="#000080"><br/> |
| </font> </code> |
| |
| </div> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </div> |
| <p> |
| |
| <p> |
| The following sections describe the various elements and properties. |
| <p> |
| <b>Table of Contents</b> <p> |
| <table border="0"> |
| <tr><td>1 </td><td class="te" colspan="4"><a href="Doc01_ConfiguringRepositories.html#Element_repository" title="Chapter in CDO Model Repository Documentation">Element repository</a></td></tr> |
| <tr><td></td><td>1.1 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_overrideUUID" title="Chapter in CDO Model Repository Documentation">Property overrideUUID</a></td></tr> |
| <tr><td></td><td>1.2 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_supportingAudits" title="Chapter in CDO Model Repository Documentation">Property supportingAudits</a></td></tr> |
| <tr><td></td><td>1.3 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_supportingBranches" title="Chapter in CDO Model Repository Documentation">Property supportingBranches</a></td></tr> |
| <tr><td></td><td>1.4 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_supportingEcore" title="Chapter in CDO Model Repository Documentation">Property supportingEcore</a></td></tr> |
| <tr><td></td><td>1.5 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_supportingUnits" title="Chapter in CDO Model Repository Documentation">Property supportingUnits</a></td></tr> |
| <tr><td></td><td>1.6 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_checkUnitMoves" title="Chapter in CDO Model Repository Documentation">Property checkUnitMoves</a></td></tr> |
| <tr><td></td><td>1.7 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_ensureReferentialIntegrity" title="Chapter in CDO Model Repository Documentation">Property ensureReferentialIntegrity</a></td></tr> |
| <tr><td></td><td>1.8 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_serializeCommits" title="Chapter in CDO Model Repository Documentation">Property serializeCommits</a></td></tr> |
| <tr><td></td><td>1.9 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_allowInterruptRunningQueries" title="Chapter in CDO Model Repository Documentation">Property_allowInterruptRunningQueries</a></td></tr> |
| <tr><td></td><td>1.10 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_idGenerationLocation" title="Chapter in CDO Model Repository Documentation">Property idGenerationLocation</a></td></tr> |
| <tr><td>2 </td><td class="te" colspan="4"><a href="Doc01_ConfiguringRepositories.html#Element_securityManager" title="Chapter in CDO Model Repository Documentation">Element securityManager</a></td></tr> |
| <tr><td>3 </td><td class="te" colspan="4"><a href="Doc01_ConfiguringRepositories.html#Element_authenticator" title="Chapter in CDO Model Repository Documentation">Element authenticator</a></td></tr> |
| <tr><td>4 </td><td class="te" colspan="4"><a href="Doc01_ConfiguringRepositories.html#Element_initialPackage" title="Chapter in CDO Model Repository Documentation">Element initialPackage</a></td></tr> |
| <tr><td>5 </td><td class="te" colspan="4"><a href="Doc01_ConfiguringRepositories.html#Element_store" title="Chapter in CDO Model Repository Documentation">Element store</a></td></tr> |
| <tr><td></td><td>5.1 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_connectionKeepAlivePeriod" title="Chapter in CDO Model Repository Documentation">Property connectionKeepAlivePeriod</a></td></tr> |
| <tr><td></td><td>5.2 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_readerPoolCapacity" title="Chapter in CDO Model Repository Documentation">Property readerPoolCapacity</a></td></tr> |
| <tr><td></td><td>5.3 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_writerPoolCapacity" title="Chapter in CDO Model Repository Documentation">Property writerPoolCapacity</a></td></tr> |
| <tr><td></td><td>5.4 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_dropAllDataOnActivate" title="Chapter in CDO Model Repository Documentation">Property dropAllDataOnActivate</a></td></tr> |
| <tr><td>6 </td><td class="te" colspan="4"><a href="Doc01_ConfiguringRepositories.html#Element_mappingStrategy" title="Chapter in CDO Model Repository Documentation">Element mappingStrategy</a></td></tr> |
| <tr><td></td><td>6.1 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_toManyReferences" title="Chapter in CDO Model Repository Documentation">Property toManyReferences</a></td></tr> |
| <tr><td></td><td>6.2 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_maxTableNameLength" title="Chapter in CDO Model Repository Documentation">Property maxTableNameLength</a></td></tr> |
| <tr><td></td><td>6.3 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_maxFieldNameLength" title="Chapter in CDO Model Repository Documentation">Property maxFieldNameLength</a></td></tr> |
| <tr><td></td><td>6.4 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_tableNamePrefix" title="Chapter in CDO Model Repository Documentation">Property tableNamePrefix</a></td></tr> |
| <tr><td></td><td>6.5 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_qualifiedNames" title="Chapter in CDO Model Repository Documentation">Property qualifiedNames</a></td></tr> |
| <tr><td></td><td>6.6 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_forceNamesWithID" title="Chapter in CDO Model Repository Documentation">Property forceNamesWithID</a></td></tr> |
| <tr><td></td><td>6.7 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_fieldConstructionTracking" title="Chapter in CDO Model Repository Documentation">Property fieldConstructionTracking</a></td></tr> |
| <tr><td></td><td>6.8 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_objectTypeCacheSize" title="Chapter in CDO Model Repository Documentation">Property objectTypeCacheSize</a></td></tr> |
| <tr><td></td><td>6.9 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_columnTypeModifier" title="Chapter in CDO Model Repository Documentation">Property columnTypeModifier</a></td></tr> |
| <tr><td></td><td>6.10 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_forceIndexes" title="Chapter in CDO Model Repository Documentation">Property forceIndexes</a></td></tr> |
| <tr><td></td><td>6.11 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_withRanges" title="Chapter in CDO Model Repository Documentation">Property withRanges</a></td></tr> |
| <tr><td></td><td>6.12 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_copyOnBranch" title="Chapter in CDO Model Repository Documentation">Property copyOnBranch</a></td></tr> |
| <tr><td></td><td>6.13 </td><td class="te" colspan="3"><a href="Doc01_ConfiguringRepositories.html#Property_forceZeroBasedIndex" title="Chapter in CDO Model Repository Documentation">Property forceZeroBasedIndex</a></td></tr> |
| <tr><td>7 </td><td class="te" colspan="4"><a href="Doc01_ConfiguringRepositories.html#Element_dbAdapter" title="Chapter in CDO Model Repository Documentation">Element dbAdapter</a></td></tr> |
| <tr><td>8 </td><td class="te" colspan="4"><a href="Doc01_ConfiguringRepositories.html#Element_dataSource" title="Chapter in CDO Model Repository Documentation">Element dataSource</a></td></tr> |
| </table> |
| </p> |
| |
| |
| <h2><a name="Element_repository"></a>1 Element repository</h2> |
| <p> |
| Defines an <a href="../../javadoc/org/eclipse/emf/cdo/server/IRepository.html" title="Interface in org.eclipse.emf.cdo.server"><code>IRepository</code></a> instance. |
| <p> |
| The <code>name</code> attribute uniquely identifies a repository in the scope of a repository configurator. |
| <p> |
| The <code>repository</code> element can contain several property elements (see below) and must contain exactly one <a href="Doc01_ConfiguringRepositories.html#Element_store" title="Chapter in CDO Model Repository Documentation">store</a> element. |
| |
| <h3><a name="Property_overrideUUID"></a>1.1 Property overrideUUID</h3> |
| <p> |
| 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. |
| <p> |
| 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. |
| |
| <h3><a name="Property_supportingAudits"></a>1.2 Property supportingAudits</h3> |
| <p> |
| Specifies whether the repository will support audit views or not. Please note that a repository can only support audit views |
| if its <a href="Doc01_ConfiguringRepositories.html#Element_store" title="Chapter in CDO Model Repository Documentation">store</a> supports audit views, as well. |
| <p> |
| 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! |
| |
| <h3><a name="Property_supportingBranches"></a>1.3 Property supportingBranches</h3> |
| <p> |
| 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 <a href="Doc01_ConfiguringRepositories.html#Element_store" title="Chapter in CDO Model Repository Documentation">store</a> supports branches, as well. |
| <p> |
| Also note that branching support always <b>requires</b> <a href="Doc01_ConfiguringRepositories.html#Property_supportingAudits" title="Chapter in CDO Model Repository Documentation">auditing support</a>, too. |
| |
| <h3><a name="Property_supportingEcore"></a>1.4 Property supportingEcore</h3> |
| <p> |
| Specifies whether the repository will support the storage of instances of the Ecore (meta meta) model or not. |
| <p> |
| With the advent of the <a href="../users/Doc09_TechnicalBackground.html#Doc_BackgroundLegacyModels" title="Chapter in CDO Model Repository Documentation">legacy mode</a> 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. |
| <p> |
| Valid values: <code>false</code> (default) or <code>true</code>. |
| <p> |
| <b>This property is deprecated. As of 4.2 instances of Ecore are always supported (on demand).</b> |
| |
| <h3><a name="Property_supportingUnits"></a>1.5 Property supportingUnits</h3> |
| <p> |
| Specifies whether the repository will support the creation and optimized loading of <a href="../../javadoc/org/eclipse/emf/cdo/view/CDOUnit.html" title="Interface in org.eclipse.emf.cdo.view"><code>units</code></a> or not. |
| <p> |
| Unit support is only available if the configured <a href="../../javadoc/org/eclipse/emf/cdo/server/IStore.html" title="Interface in org.eclipse.emf.cdo.server"><code>store</code></a> supports units. |
| <p> |
| Valid values: <code>false</code> (default) or <code>true</code>. |
| |
| <h3><a name="Property_checkUnitMoves"></a>1.6 Property checkUnitMoves</h3> |
| <p> |
| Specifies whether the repository will apply extra validation to prevent moves of objects between <a href="../../javadoc/org/eclipse/emf/cdo/view/CDOUnit.html" title="Interface in org.eclipse.emf.cdo.view"><code>units</code></a> or not. |
| <p> |
| Valid values: <code>false</code> (default) or <code>true</code>. |
| <p><p><b>See Also:</b></p> |
| <ul> |
| <li><a href="Doc01_ConfiguringRepositories.html#Property_supportingUnits" title="Chapter in CDO Model Repository Documentation">Property supportingUnits</a></li> |
| </ul> |
| |
| |
| <h3><a name="Property_ensureReferentialIntegrity"></a>1.7 Property ensureReferentialIntegrity</h3> |
| <p> |
| Specifies whether the repository will detect and reject commits that would leave stale references in the object graph. |
| <p> |
| Valid values: <code>false</code> (default) or <code>true</code>. |
| |
| <h3><a name="Property_serializeCommits"></a>1.8 Property serializeCommits</h3> |
| <p> |
| Specifies whether the repository will serialize commit operations by utilizing a lock or not. |
| <p> |
| Some stores, such as the LissomeStore, require commit operations to be serialized. |
| <p> |
| Valid values: <code>false</code> (default) or <code>true</code>. |
| |
| <h3><a name="Property_allowInterruptRunningQueries"></a>1.9 Property_allowInterruptRunningQueries</h3> |
| <p> |
| 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 <code>false</code>. |
| <p> |
| Valid values: <code>false</code> (default) or <code>true</code>. |
| |
| <h3><a name="Property_idGenerationLocation"></a>1.10 Property idGenerationLocation</h3> |
| <p> |
| Specifies whether the repository will expect clients to generate IDs for new objects or whether it will ask the backend store to generate them. |
| <p> |
| Valid values: <code>STORE</code> (default) or <code>CLIENT</code>. |
| |
| <h2><a name="Element_securityManager"></a>2 Element securityManager</h2> |
| <p> |
| Example: <securityManager type="default" description="/security:annotation:home(/home)"/> |
| <p> |
| See also: <a href="http://wiki.eclipse.org/CDO/Security_Manager">http://wiki.eclipse.org/CDO/Security_Manager</a> |
| |
| <h2><a name="Element_authenticator"></a>3 Element authenticator</h2> |
| <p> |
| Example: <authenticator type="file" description="_database/repo1.users"/> |
| <p> |
| See also: <a href="http://bugs.eclipse.org/302775">http://bugs.eclipse.org/302775</a> |
| |
| <h2><a name="Element_initialPackage"></a>4 Element initialPackage</h2> |
| <p> |
| Example: <initialPackage nsURI="http://www.eclipse.org/emf/CDO/examples/company/1.0.0"/> |
| <p> |
| See also: <a href="http://bugs.eclipse.org/345431">http://bugs.eclipse.org/345431</a> |
| |
| <h2><a name="Element_store"></a>5 Element store</h2> |
| <p> |
| Defines an <a href="../../javadoc/org/eclipse/emf/cdo/server/IStore.html" title="Interface in org.eclipse.emf.cdo.server"><code>IStore</code></a> instance. |
| <p> |
| 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 <code>type</code> attribute value. |
| The following values are possible with the shipped distribution (subject to user-supplied extension): |
| <ul> |
| <li> <b>mem</b>: Store without real persistence. A repository with a MEMStore can function properly as long as the the server is not restarted. |
| No additional attributes are recognized. |
| <li> <b>db</b>: Store that connects via JDBC to a relational database and manages persistent revisions and models |
| through a built-in O/R mapper, see [[CDO/DB Store]]. A DBStore element can contain the following nested elements: |
| <ul> |
| <li> <a href="Doc01_ConfiguringRepositories.html#Element_mappingStrategy" title="Chapter in CDO Model Repository Documentation">Element mappingStrategy</a> |
| <li> <a href="Doc01_ConfiguringRepositories.html#Element_dbAdapter" title="Chapter in CDO Model Repository Documentation">Element dbAdapter</a> |
| <li> <a href="Doc01_ConfiguringRepositories.html#Element_dataSource" title="Chapter in CDO Model Repository Documentation">Element dataSource</a> |
| </ul> |
| <li> <b>hibernate:</b> Store that uses Teneo/Hibernate, see [[CDO/Hibernate Store]]. |
| <li> <b>objectivity:</b> Store that uses Objectivity/DB, see [[CDO/Objectivity Store]]. |
| <li> <b>mongodb:</b> Store that uses MongoDB, see [[CDO/MongoDB Store]]. |
| <li> <b>db4o:</b> Store that uses DB4O, see [[CDO/DB4O Store]]. |
| </ul> |
| |
| <h3><a name="Property_connectionKeepAlivePeriod"></a>5.1 Property connectionKeepAlivePeriod</h3> |
| <p> |
| Specifies, if the store is a DBStore, at what interval the store will issue an SQL statement to keep the connection to the database alive. |
| |
| <h3><a name="Property_readerPoolCapacity"></a>5.2 Property readerPoolCapacity</h3> |
| <p> |
| Specifies, if the store is a DBStore, the maximum number of store accessors (JDBC connections) to keep in the reader pool. |
| <p> |
| The default value is 15. |
| |
| <h3><a name="Property_writerPoolCapacity"></a>5.3 Property writerPoolCapacity</h3> |
| <p> |
| Specifies, if the store is a DBStore, the maximum number of store accessors (JDBC connections) to keep in the writer pool. |
| <p> |
| The default value is 15. |
| |
| <h3><a name="Property_dropAllDataOnActivate"></a>5.4 Property dropAllDataOnActivate</h3> |
| <p> |
| If set to <code>true</code> and the store is a DBStore, drops all database tables of the configured |
| <a href="Doc01_ConfiguringRepositories.html#Element_dataSource" title="Chapter in CDO Model Repository Documentation">schema</a> at the beginning of the store activation. |
| <p> |
| The default value is <code>false</code>. |
| |
| <h2><a name="Element_mappingStrategy"></a>6 Element mappingStrategy</h2> |
| <p> |
| This element is recognized by DBStores and defines the overall <a href="../../javadoc/org/eclipse/emf/cdo/server/db/mapping/IMappingStrategy.html" title="Interface in org.eclipse.emf.cdo.server.db.mapping"><code>mapping strategy</code></a> of the built-in O/R mapper. |
| <p> |
| The <code>type</code> attribute corresponds to the type of a mapping strategy factory that is contributed via the |
| <code>org.eclipse.emf.cdo.server.db.mappingStrategies</code> extension point. |
| The following values are possible with the shipped distribution (subject to user-supplied extension): |
| <ul> |
| <li> <b>horizontal</b>: Mapping strategy that creates one DB table per concrete model class. |
| The following nested property elements are recognized: |
| <ul> |
| <li> <a href="Doc01_ConfiguringRepositories.html#Property_toManyReferences" title="Chapter in CDO Model Repository Documentation">Property toManyReferences</a> |
| <li> <a href="Doc01_ConfiguringRepositories.html#Property_maxTableNameLength" title="Chapter in CDO Model Repository Documentation">Property maxTableNameLength</a> |
| <li> <a href="Doc01_ConfiguringRepositories.html#Property_maxFieldNameLength" title="Chapter in CDO Model Repository Documentation">Property maxFieldNameLength</a> |
| <li> <a href="Doc01_ConfiguringRepositories.html#Property_tableNamePrefix" title="Chapter in CDO Model Repository Documentation">Property tableNamePrefix</a> |
| <li> <a href="Doc01_ConfiguringRepositories.html#Property_qualifiedNames" title="Chapter in CDO Model Repository Documentation">Property qualifiedNames</a> |
| <li> <a href="Doc01_ConfiguringRepositories.html#Property_forceNamesWithID" title="Chapter in CDO Model Repository Documentation">Property forceNamesWithID</a> |
| </ul> |
| </ul> |
| |
| <h3><a name="Property_toManyReferences"></a>6.1 Property toManyReferences</h3> |
| <p> |
| Specifies how the built-in O/R mapper will handle to-many references (collections). The following values are recognized: |
| <ul> |
| <li> <b>ONE_TABLE_PER_REFERENCE</b>: Each to-many reference of the model will get its own DB table. |
| <li> <b>ONE_TABLE_PER_CLASS</b>: All to-many references of a model class will share a single DB table. |
| <li> <b>ONE_TABLE_PER_PACKAGE</b>: All to-many references of a model package will share a single DB table. |
| <li> <b>ONE_TABLE_PER_REPOSITORY</b>: All to-many references of all model classes i the repository will share a single DB table. |
| </ul> |
| |
| <h3><a name="Property_maxTableNameLength"></a>6.2 Property maxTableNameLength</h3> |
| <p> |
| Enables you to override the default value of the chosen DB adapter for the maximum length of table names. |
| |
| <h3><a name="Property_maxFieldNameLength"></a>6.3 Property maxFieldNameLength</h3> |
| <p> |
| Enables you to override the default value of the chosen DB adapter for the maximum length of column names. |
| |
| <h3><a name="Property_tableNamePrefix"></a>6.4 Property tableNamePrefix</h3> |
| <p> |
| Specifies a common fixed prefix for all table names generated by this mapping strategy. |
| |
| <h3><a name="Property_qualifiedNames"></a>6.5 Property qualifiedNames</h3> |
| <p> |
| Specifies whether generated package or class table names are qualified or not. |
| |
| <h3><a name="Property_forceNamesWithID"></a>6.6 Property forceNamesWithID</h3> |
| <p> |
| Specifies whether generated names are always suffixed with an internal ID or only in cases where the generated name absolutely needs mangling. |
| |
| <h3><a name="Property_fieldConstructionTracking"></a>6.7 Property fieldConstructionTracking</h3> |
| <p> |
| Specifies whether you want <a href="../../../org.eclipse.net4j.db.doc/javadoc/org/eclipse/net4j/db/ddl/IDBField.html" title="Interface in org.eclipse.net4j.db.ddl"><code>IDBField</code></a> construction stacktrace on schema update to have the origin of the nullable index field. |
| |
| <h3><a name="Property_objectTypeCacheSize"></a>6.8 Property objectTypeCacheSize</h3> |
| <p> |
| Specifies the size of the object type in-memory cache. Possible configuration values are: |
| <ul> |
| <li> 0 (zero): Don't use memory caching. |
| <li> >0: Use memory caching with the cache size given. |
| </ul> |
| The default is a memory cache size of 10,000,000. |
| |
| <h3><a name="Property_columnTypeModifier"></a>6.9 Property columnTypeModifier</h3> |
| <p> |
| Specifies the name of a <a href="../../javadoc/org/eclipse/emf/cdo/server/db/mapping/ColumnTypeModifier.html" title="Class in org.eclipse.emf.cdo.server.db.mapping"><code>ColumnTypeModifier</code></a>. |
| |
| <h3><a name="Property_forceIndexes"></a>6.10 Property forceIndexes</h3> |
| <p> |
| 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: |
| <ul> |
| <li> NONE (default) |
| <li> ALL (equal to ATTRIBUTE|REFERENCE) |
| <li> ATTRIBUTE |
| <li> REFERENCE (equal to CONTAINER|CONTAINMENT|XREF) |
| <li> CONTAINER |
| <li> CONTAINMENT |
| <li> XREF |
| </ul> |
| |
| <h3><a name="Property_withRanges"></a>6.11 Property withRanges</h3> |
| <p> |
| Specifies whether new <a href="../../javadoc/org/eclipse/emf/cdo/common/revision/CDORevision.html" title="Interface in org.eclipse.emf.cdo.common.revision"><code>revisions</code></a> create entire new copies of all their list <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.11/org/eclipse/emf/ecore/EStructuralFeature.html" target="_blank" title="Interface in org.eclipse.emf.ecore"><code>features</code></a> |
| or whether just the list deltas are stored. |
| <p> |
| Possible configuration values are: |
| <ul> |
| <li> <code>false</code> (store new copies of all lists of a revision; default value) |
| <li> <code>true</code> (store only list deltas/ranges of a revision) |
| </ul> |
| <p> |
| This property is only applicable to horizontal mapping strategies in <a href="Doc01_ConfiguringRepositories.html#Property_supportingAudits" title="Chapter in CDO Model Repository Documentation">auditing</a> |
| or <a href="Doc01_ConfiguringRepositories.html#Property_supportingBranches" title="Chapter in CDO Model Repository Documentation">branching</a> repositories. |
| |
| <h3><a name="Property_copyOnBranch"></a>6.12 Property copyOnBranch</h3> |
| <p> |
| Specifies whether <b>the first</b> new <a href="../../javadoc/org/eclipse/emf/cdo/common/revision/CDORevision.html" title="Interface in org.eclipse.emf.cdo.common.revision"><code>revisions</code></a> in a <a href="../../javadoc/org/eclipse/emf/cdo/common/branch/CDOBranch.html" title="Interface in org.eclipse.emf.cdo.common.branch"><code>branch</code></a> create entire new copies |
| of all their list <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.11/org/eclipse/emf/ecore/EStructuralFeature.html" target="_blank" title="Interface in org.eclipse.emf.ecore"><code>features</code></a> or whether just the list deltas (relative to the base revisions in the parent branch) are stored. |
| <p> |
| Possible configuration values are: |
| <ul> |
| <li> <code>false</code> (store only list deltas/ranges of the first revision in a branch; default value) |
| <li> <code>true</code> (store new copies of all lists of the first revision in a branch) |
| </ul> |
| <p> |
| This property is only applicable to <a href="Doc01_ConfiguringRepositories.html#Property_withRanges" title="Chapter in CDO Model Repository Documentation">range-based</a> horizontal mapping strategies in |
| <a href="Doc01_ConfiguringRepositories.html#Property_supportingBranches" title="Chapter in CDO Model Repository Documentation">branching</a> repositories. |
| |
| <h3><a name="Property_forceZeroBasedIndex"></a>6.13 Property forceZeroBasedIndex</h3> |
| <p> |
| Specifies whether element removals from the beginning of list <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.11/org/eclipse/emf/ecore/EStructuralFeature.html" target="_blank" title="Interface in org.eclipse.emf.ecore"><code>features</code></a> adjust the |
| list indexes of all following elements or whether the first element is allowed to have a non-zero list index. |
| <p> |
| Possible configuration values are: |
| <ul> |
| <li> <code>false</code> (allow non-zero list index for the first list elements; default value) |
| <li> <code>true</code> (force zero list indexes for the first list elements) |
| </ul> |
| <p> |
| This property is only applicable to <a href="Doc01_ConfiguringRepositories.html#Property_withRanges" title="Chapter in CDO Model Repository Documentation">range-based</a> horizontal mapping strategies in |
| <a href="Doc01_ConfiguringRepositories.html#Property_supportingAudits" title="Chapter in CDO Model Repository Documentation">auditing</a> or <a href="Doc01_ConfiguringRepositories.html#Property_supportingBranches" title="Chapter in CDO Model Repository Documentation">branching</a> repositories. |
| |
| <h2><a name="Element_dbAdapter"></a>7 Element dbAdapter</h2> |
| <p> |
| Defines the <a href="../../../org.eclipse.net4j.db.doc/javadoc/org/eclipse/net4j/db/IDBAdapter.html" title="Interface in org.eclipse.net4j.db"><code>IDBAdapter</code></a> instance of the store that interprets the SQL dialect of the used database. |
| <p> |
| The <code>type</code> attribute corresponds to the name of a DB adapter factory that is contributed via the |
| <code>org.eclipse.net4j.db.dbAdapters</code> extension point. No additional attributes are recognized. |
| <p> |
| The DB adapter must match the database specified in the <a href="Doc01_ConfiguringRepositories.html#Element_dataSource" title="Chapter in CDO Model Repository Documentation">dataSource</a> element. |
| |
| <h2><a name="Element_dataSource"></a>8 Element dataSource</h2> |
| <p> |
| Defines the DataSource instance of the store. |
| <p> |
| The <code>class</code> 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. |
| |
| <p align="right"> |
| <a href="Doc00_OperatingServer.html" title="Backward to Operating a CDO Server"><img src="../../images/backward.png" border="0"></a> <a href="Doc02_ConfiguringAcceptors.html" title="Forward to Configuring Acceptors"><img src="../../images/forward.png" border="0"></a></p> |
| <!-- <div class="help_breadcrumbs breadcrumbs_bottom"><a href="../Overview.html" title="CDO Model Repository Documentation">CDO Model Repository Documentation</a> > <a href="index.html" title="Category in CDO Model Repository Documentation">Operator's Guide</a></div> --> |
| |
| <div class="copyright">Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.<br>All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html</div> |
| </body> |
| </html> |