]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-3251: Added deployment and undeployment of the Nuxeo database configuration...
authorAron Roberts <aron@socrates.berkeley.edu>
Wed, 15 Dec 2010 00:33:28 +0000 (00:33 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Wed, 15 Dec 2010 00:33:28 +0000 (00:33 +0000)
3rdparty/nuxeo/build.xml
3rdparty/nuxeo/nuxeo-database-templates/build.xml [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/config/default-repository-config.xml [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/config/default-repository-config.xml.orig [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/config/sql.properties [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/datasources/default-repository-ds.xml [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/datasources/default-repository-ds.xml.orig [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/datasources/unified-nuxeo-ds.xml [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/nuxeo.defaults [new file with mode: 0644]
build.properties

index 625438c272aa851f9ad8a65ff55fbee1e92636d3..694736bdd1136394864bd5d54d09a8658a6fe181 100644 (file)
             </fileset>\r
         </copy>\r
         <ant antfile="nuxeo-platform-collectionspace/build.xml" target="deploy" inheritall="false"/>\r
+        <ant antfile="nuxeo-database-templates/build.xml" target="deploy" inheritall="false"/>\r
     </target>\r
 \r
     <target name="undeploy"\r
     description="undeploy nuxeo client libs from ${jboss.server.cspace}">\r
         <delete dir="${jboss.server.cspace}/nuxeo-client"/>\r
         <ant antfile="nuxeo-platform-collectionspace/build.xml" target="undeploy" inheritall="false"/>\r
+        <ant antfile="nuxeo-database-templates/build.xml" target="undeploy" inheritall="false"/>\r
     </target>\r
 \r
     <target name="dist"\r
diff --git a/3rdparty/nuxeo/nuxeo-database-templates/build.xml b/3rdparty/nuxeo/nuxeo-database-templates/build.xml
new file mode 100644 (file)
index 0000000..a74a536
--- /dev/null
@@ -0,0 +1,31 @@
+<project name="nuxeo-database-templates" default="package" basedir=".">
+    <description>
+       Deploys per-database templates used by Nuxeo.  Among other things, 
+       these templates designate the fields in database tables to be
+       defined as CLOB types, capable of holding large amounts of text.
+    </description>
+    <!-- set global properties for this build -->
+    <property name="services.trunk" value="../../.."/>
+    <!-- environment should be declared before reading build.properties -->
+    <property environment="env" />
+    <property file="${services.trunk}/build.properties" />
+
+    <target name="init">
+    <!-- Create the time stamp -->
+        <tstamp/>
+    </target>
+
+    <target name="deploy"
+       description="deploys nuxeo database template folder for the ${db} database to ${jboss.deploy.nuxeo.templates}">
+        <mkdir dir="${jboss.deploy.nuxeo.templates}/collectionspace_${db}"/>
+        <copy todir="${jboss.deploy.nuxeo.templates}/collectionspace_${db}">
+            <fileset dir="${basedir}/${db}/collectionspace_${db}"/>
+        </copy>
+    </target>
+
+    <target name="undeploy"
+    description="undeploys nuxeo database template folder for the ${db} database from ${jboss.deploy.nuxeo.templates}">
+        <delete dir="${jboss.deploy.nuxeo.templates}/collectionspace_${db}"/>
+    </target>
+
+</project>
diff --git a/3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/config/default-repository-config.xml b/3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/config/default-repository-config.xml
new file mode 100644 (file)
index 0000000..0589203
--- /dev/null
@@ -0,0 +1,344 @@
+<?xml version="1.0"?>
+<component name="default-repository-config">
+  <extension target="org.nuxeo.ecm.core.repository.RepositoryService"
+    point="repository">
+    <repository name="default"
+      factory="org.nuxeo.ecm.core.storage.sql.coremodel.SQLRepositoryFactory">
+      <repository name="default">
+        <schema>
+          <field type="largetext">note</field>
+          <field type="largetext">webp:content</field>
+          <field type="largetext">webc:welcomeText</field>
+          <field type="largetext">comment:comment</field>
+          <field type="largetext">post</field>
+          <field type="largetext">mail:mail</field>
+          
+          <!-- Text fields that may possibly not require largetext -->
+          <!-- designation and might need further review are marked as follows: -->
+          <!-- * -->
+          
+          <!-- =========================================================== -->
+          <!-- Acquisition fields -->
+          <!-- =========================================================== -->
+          
+          <field type="largetext">acquisitions_common:acquisitionNote</field>
+          <field type="largetext">acquisitions_common:acquisitionProvisos</field>
+          <field type="largetext">acquisitions_common:acquisitionReason</field>
+          
+          <!-- Add in 1.1 per CSPACE-2769 -->
+          <!-- field type="largetext">acquisitions_common:creditLine</field -->
+          
+
+          <!-- =========================================================== -->
+          <!-- CollectionObject / Cataloging fields -->
+          <!-- =========================================================== -->
+          
+          <!-- Object Identification Information -->
+          <!-- ================================= -->
+          
+          <!-- FIXME: Will become group repeatable in 1.1 -->
+          <field type="largetext">collectionobjects_common:otherNumber</field> <!-- * -->
+          <!-- End of group repeatable -->
+
+          <!-- FIXME: multivalued field - need to verify schema and field name -->
+          <field type="largetext">collectionobjects_common:briefDescriptions</field>
+          
+          <!-- FIXME: multivalued field - need to verify schema and field name -->
+          <field type="largetext">collectionobjects_common:comments</field>
+          
+          <field type="largetext">collectionobjects_common:distinguishingFeatures</field>
+          
+          <!-- FIXME: group repeatable - need to verify schema and field name -->
+          <field type="largetext">collectionobjects_common:objectNameNote</field>
+
+          <!-- FIXME: Will become group repeatable in 1.1 -->
+          <field type="largetext">collectionobjects_common:title</field>
+          <field type="largetext">collectionobjects_common:titleTranslation</field>
+                   
+          <!-- Object Description Information -->
+          <!-- ============================== -->
+
+          <!-- FIXME: Need to check each field from this point and below -->
+          <!-- to anticipate group repeatability changes coming in 1.1, -->
+          <!-- as we may need to change schema and field names when that occurs. -->
+          
+          <field type="largetext">collectionobjects_common:ageQualifier</field>
+          <field type="largetext">collectionobjects_common:color</field>
+          <field type="largetext">collectionobjects_common:contentDescription</field>
+          <field type="largetext">collectionobjects_common:contentNote</field>
+          <field type="largetext">collectionobjects_common:contentObject</field>
+          <field type="largetext">collectionobjects_common:copyNumber</field> <!-- * -->
+          <field type="largetext">collectionobjects_common:editionNumber</field> <!-- * -->
+          
+           <!-- FIXME: Will become group repeatable in 1.1 -->
+          <field type="largetext">collectionobjects_common:inscriptionContent</field>
+          <field type="largetext">collectionobjects_common:inscriptionContentInterpretation</field>
+          <field type="largetext">collectionobjects_common:inscriptionContentTranslation</field>
+          <field type="largetext">collectionobjects_common:inscriptionContentTransliteration</field>
+          
+          <!-- FIXME: Will become group repeatable in 1.1 -->
+          <field type="largetext">collectionobjects_common:inscriptionDescriptionInterpretation</field>
+          
+          <!-- FIXME: Will become group repeatable in 1.1 -->
+          <field type="largetext">collectionobjects_common:materialComponentNote</field>
+          <field type="largetext">collectionobjects_common:materialName</field>  <!-- * -->
+          
+          <!-- FIXME: multivalued field - need to verify schema and field name -->
+          <field type="largetext">collectionobjects_common:physicalDescription</field>
+          
+          <!-- FIXME: Will become part of a group repeatable in 1.1 -->
+          <field type="largetext">collectionobjects_common:objectComponentInformation</field>
+
+          <!-- Object Production Information -->
+          <!-- ============================= -->
+          
+          <field type="largetext">collectionobjects_common:objectProductionNote</field>
+          
+          <!-- FIXME: multivalued field - need to verify schema and field name -->
+          <field type="largetext">collectionobjects_common:objectProductionReason</field>
+
+          <!-- Object History and Association Information -->
+          <!-- ========================================== -->
+          
+          <!-- FIXME: Will become part of a group repeatable in 1.1 -->
+          <field type="largetext">collectionobjects_common:assocActivityNote</field>
+          
+          <field type="largetext">collectionobjects_common:assocConceptNote</field>
+          <field type="largetext">collectionobjects_common:assocCulturalContextNote</field>
+          <field type="largetext">collectionobjects_common:assocDateNote</field>
+          <field type="largetext">collectionobjects_common:assocEventNote</field>
+          <field type="largetext">collectionobjects_common:assocObject</field>
+          <field type="largetext">collectionobjects_common:assocOrganizationNote</field>
+          <field type="largetext">collectionobjects_common:assocPeopleNote</field>
+          <field type="largetext">collectionobjects_common:assocPersonNote</field>
+          <field type="largetext">collectionobjects_common:assocPlaceNote</field>
+          
+          <field type="largetext">collectionobjects_common:objectHistoryNote</field>
+          <field type="largetext">collectionobjects_common:ownershipExchangeNote</field>
+          <field type="largetext">collectionobjects_common:usageNote</field>
+
+           <!-- Object Owner's Contribution Information -->
+           <!-- ======================================= -->  
+                
+          <field type="largetext">collectionobjects_common:ownersPersonalExperience</field>
+          <field type="largetext">collectionobjects_common:ownersPersonalResponse</field>
+          
+          <!-- FIXME: multivalued field - need to verify schema and field name -->
+          <field type="largetext">collectionobjects_common:ownersReference</field>
+          
+          <field type="largetext">collectionobjects_common:ownersContributionNote</field>
+         
+          <!-- Object Viewer's Contribution Information -->
+          <!-- ======================================== -->          
+          
+          <field type="largetext">collectionobjects_common:viewersRole</field>
+          <field type="largetext">collectionobjects_common:viewersPersonalExperience</field>
+          <field type="largetext">collectionobjects_common:viewersPersonalResponse</field>
+          
+          <!-- FIXME: multivalued field - need to verify schema and field name -->
+          <field type="largetext">collectionobjects_common:viewersReference</field>
+          
+          <field type="largetext">collectionobjects_common:viewersContributionNote</field>
+
+          <!-- Reference Information -->
+          <!-- ===================== -->
+          
+          <field type="largetext">collectionobjects_common:catalogNumber</field> <!-- * -->
+         
+          <!-- Object Collection Information -->
+          <!-- ============================= -->      
+
+          <field type="largetext">collectionobjects_common:fieldCollectionNote</field>
+          <field type="largetext">collectionobjects_common:fieldCollectionNumber</field> <!-- * -->
+          
+          <!--
+              Additional non-text fields configured as 'largetext' to
+              avoid the following error when Nuxeo is configured to use MySQL:
+              
+              com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException.
+              message: Row size too large. The maximum row size for the
+              used table type, not counting BLOBs, is 65535.
+              
+              Some of the fields below may be repeatable or in
+              repeatable groups, and the schema and field names
+              below might thus require verification to match actual values.
+          -->
+  
+          <field type="largetext">collectionobjects_common:objectNumber</field>
+          <field type="largetext">collectionobjects_common:otherNumber</field>
+          <field type="largetext">collectionobjects_common:otherNumberType</field>
+          <field type="largetext">collectionobjects_common:numberOfObjects</field>
+          <field type="largetext">collectionobjects_common:collection</field>
+          <field type="largetext">collectionobjects_common:titleTranslationLanguage</field>
+          <field type="largetext">collectionobjects_common:titleType</field>
+          <field type="largetext">collectionobjects_common:recordStatus</field>
+          <field type="largetext">collectionobjects_common:age</field>
+          <field type="largetext">collectionobjects_common:ageQualifier</field>
+          <field type="largetext">collectionobjects_common:ageUnit</field>
+      
+          <field type="largetext">collectionobjects_common:contentDate</field>
+          <field type="largetext">collectionobjects_common:contentEventName</field>
+          <field type="largetext">collectionobjects_common:contentEventNameType</field>
+          <field type="largetext">collectionobjects_common:contentLanguages</field>
+          <field type="largetext">collectionobjects_common:contentObjectType</field>
+          <field type="largetext">collectionobjects_common:contentOrganizations</field>
+          <field type="largetext">collectionobjects_common:contentOther</field>
+          <field type="largetext">collectionobjects_common:contentOtherType</field>
+          
+          <field type="largetext">collectionobjects_common:dimensionSummary</field>
+          <!-- These fields may be removed altogether when App/UI is using repeatable dimensions group -->
+          <field type="largetext">collectionobjects_common:dimension</field>
+          <field type="largetext">collectionobjects_common:dimensionMeasuredPart</field>
+          <field type="largetext">collectionobjects_common:dimensionMeasurementUnit</field>
+          <field type="largetext">collectionobjects_common:dimensionValue</field>
+          <field type="largetext">collectionobjects_common:dimensionValueDate</field>
+          <field type="largetext">collectionobjects_common:dimensionValueQualifier</field>
+          
+          <field type="largetext">collectionobjects_common:editionNumber</field>
+
+          <field type="largetext">collectionobjects_common:inscriptionContentInscriber</field>
+          <field type="largetext">collectionobjects_common:inscriptionContentDate</field>
+          <field type="largetext">collectionobjects_common:inscriptionContentLanguage</field>
+          <field type="largetext">collectionobjects_common:inscriptionContentMethod</field>
+          <field type="largetext">collectionobjects_common:inscriptionContentPosition</field>
+          <field type="largetext">collectionobjects_common:inscriptionContentScript</field>
+          <field type="largetext">collectionobjects_common:inscriptionContentType</field>
+
+          <field type="largetext">collectionobjects_common:inscriptionDescription</field>
+          <field type="largetext">collectionobjects_common:inscriptionDescriptionInscriber</field>
+          <field type="largetext">collectionobjects_common:inscriptionDescriptionDate</field>
+          <field type="largetext">collectionobjects_common:inscriptionDescriptionMethod</field>
+          <field type="largetext">collectionobjects_common:inscriptionDescriptionPosition</field>
+          <field type="largetext">collectionobjects_common:inscriptionDescriptionType</field>
+
+          <field type="largetext">collectionobjects_common:objectStatus</field>
+          <field type="largetext">collectionobjects_common:phase</field>
+          <field type="largetext">collectionobjects_common:sex</field>
+          <field type="largetext">collectionobjects_common:assocObjectType</field>
+          <field type="largetext">collectionobjects_common:ownershipAccess</field>
+          <field type="largetext">collectionobjects_common:ownershipCategory</field>
+          <field type="largetext">collectionobjects_common:ownershipDates</field>
+          <field type="largetext">collectionobjects_common:ownershipExchangeMethod</field>
+          <field type="largetext">collectionobjects_common:ownershipExchangePriceCurrency</field>
+          <field type="largetext">collectionobjects_common:ownershipExchangePriceValue</field>
+          <field type="largetext">collectionobjects_common:ownershipPlace</field>
+          <field type="largetext">collectionobjects_common:usage</field>
+          <field type="largetext">collectionobjects_common:fieldCollectionNumber</field>
+          <field type="largetext">collectionobjects_common:fieldCollectionMethod</field>
+          <field type="largetext">collectionobjects_common:fieldCollectionPlace</field>
+        
+          <!-- This sample set of date field can be removed when Cataloging -->
+          <!-- records are using structured date fields -->
+          <field type="largetext">collectionobjects_common:dateAssociation</field>
+          <field type="largetext">collectionobjects_common:dateEarliestSingle</field>
+          <field type="largetext">collectionobjects_common:dateEarliestSingleCertainty</field>
+          <field type="largetext">collectionobjects_common:dateEarliestSingleQualifier</field>
+          <field type="largetext">collectionobjects_common:dateLatest</field>
+          <field type="largetext">collectionobjects_common:dateLatestCertainty</field>
+          <field type="largetext">collectionobjects_common:dateLatestQualifier</field>
+          <field type="largetext">collectionobjects_common:datePeriod</field>
+          <field type="largetext">collectionobjects_common:dateText</field>
+
+
+          <!-- =========================================================== -->
+          <!-- Contact fields -->
+          <!-- =========================================================== -->
+          <field type="largetext">contacts_common:addressPlace</field>
+          
+
+          <!-- =========================================================== -->
+          <!-- Intake fields -->
+          <!-- =========================================================== -->
+          
+          <field type="largetext">intakes_common:entryNote</field>
+          <field type="largetext">intakes_common:packingNote</field>
+          <field type="largetext">intakes_common:fieldCollectionNote</field>
+          <field type="largetext">intakes_common:insuranceNote</field>
+          <field type="largetext">intakes_common:conditionCheckNote</field>
+          
+          <!-- FIXME: multivalued fields - need to verify schema and field name -->
+          <field type="largetext">intakes_common:conditionCheckReasons</field>
+          <field type="largetext">intakes_common:currentLocationNote</field>
+
+
+          <!-- =========================================================== -->
+          <!-- Loan In fields -->
+          <!-- =========================================================== -->
+          
+          <field type="largetext">loansin_common:loanInConditions</field>
+          <field type="largetext">loansin_common:loanInNote</field>
+          <!-- =========================================================== -->
+          <!-- Loan Out fields -->
+          <!-- =========================================================== -->
+          
+          <field type="largetext">loansout_common:specialConditionsOfLoan</field>
+          <field type="largetext">loansout_common:loanOutNote</field>      
+          <!-- =========================================================== -->
+          <!-- Movement fields -->
+          <!-- =========================================================== -->
+          
+          <field type="largetext">movements_common:currentLocationNote</field>
+          <field type="largetext">movements_common:movementNote</field>
+          
+                   
+          <!-- =========================================================== -->
+          <!-- Object Exit fields -->
+          <!-- =========================================================== -->
+          
+          <!-- Note: schema name 'objectexit_common' is currently -->
+          <!-- intentionally singular -->
+
+          <field type="largetext">objectexit_common:exitNote</field>
+          <field type="largetext">objectexit_common:packingNote</field>
+
+
+          <!-- =========================================================== -->
+          <!-- Organization fields -->
+          <!-- =========================================================== -->
+          
+          <field type="largetext">organizations_common:shortName</field>
+          <field type="largetext">organizations_common:longName</field>
+          <field type="largetext">organizations_common:nameAdditions</field>
+          
+          <!-- FIXME: multivalued field - need to verify schema and field name -->
+          <field type="largetext">organizations_common:historyNotes</field>
+
+
+          <!-- =========================================================== -->
+          <!-- Person fields -->
+          <!-- =========================================================== -->
+          <field type="largetext">persons_common:bioNote</field>
+          <field type="largetext">persons_common:nameNote</field>
+
+
+          <!-- =========================================================== -->
+          <!-- Storage Location fields -->
+          <!-- =========================================================== -->
+          <field type="largetext">locations_common:displayName</field>
+          <field type="largetext">locations_common:name</field>
+          <field type="largetext">locations_common:securityNote</field>
+          <field type="largetext">locations_common:accessNote</field>
+         
+        </schema>
+        <indexing>
+          <fulltext>
+            <index name="default">
+              <!-- all props implied -->
+            </index>
+            <index name="title">
+              <field>dc:title</field>
+            </index>
+            <index name="description">
+              <field>dc:description</field>
+            </index>
+          </fulltext>
+        </indexing>
+      </repository>
+    </repository>
+  </extension>
+</component>
diff --git a/3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/config/default-repository-config.xml.orig b/3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/config/default-repository-config.xml.orig
new file mode 100644 (file)
index 0000000..6f18473
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<component name="default-repository-config">
+  <extension target="org.nuxeo.ecm.core.repository.RepositoryService"
+    point="repository">
+    <repository name="default"
+      factory="org.nuxeo.ecm.core.storage.sql.coremodel.SQLRepositoryFactory">
+      <repository name="default">
+        <schema>
+          <field type="largetext">note</field>
+          <field type="largetext">webp:content</field>
+          <field type="largetext">webc:welcomeText</field>
+          <field type="largetext">comment:comment</field>
+          <field type="largetext">post</field>
+          <field type="largetext">mail:mail</field>
+        </schema>
+        <indexing>
+          <fulltext>
+            <index name="default">
+              <!-- all props implied -->
+            </index>
+            <index name="title">
+              <field>dc:title</field>
+            </index>
+            <index name="description">
+              <field>dc:description</field>
+            </index>
+          </fulltext>
+        </indexing>
+      </repository>
+    </repository>
+  </extension>
+</component>
diff --git a/3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/config/sql.properties b/3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/config/sql.properties
new file mode 100644 (file)
index 0000000..426f693
--- /dev/null
@@ -0,0 +1,3 @@
+# Jena database type and transaction mode
+org.nuxeo.ecm.sql.jena.databaseType=MySQL
+org.nuxeo.ecm.sql.jena.databaseTransactionEnabled=true
diff --git a/3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/datasources/default-repository-ds.xml b/3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/datasources/default-repository-ds.xml
new file mode 100644 (file)
index 0000000..3a01540
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<connection-factories>
+  <tx-connection-factory>
+    <jndi-name>NXRepository/default</jndi-name>
+    <xa-transaction/>
+    <track-connection-by-tx/>
+    <adapter-display-name>Nuxeo SQL Repository DataSource</adapter-display-name>
+    <rar-name>nuxeo.ear#nuxeo-core-storage-sql-ra-1.6.2.rar</rar-name>
+    <connection-definition>org.nuxeo.ecm.core.storage.sql.Repository</connection-definition>
+    <config-property name="name">default</config-property>
+    <max-pool-size>${nuxeo.vcs.max-pool-size}</max-pool-size>
+    
+    <config-property name="xaDataSource" type="java.lang.String">com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</config-property>
+    <config-property name="property" type="java.lang.String">URL=jdbc:mysql://${nuxeo.db.host}:${nuxeo.db.port}/${nuxeo.db.name}?relaxAutoCommit=true</config-property>
+    <!-- 
+    <config-property name="property" type="java.lang.String">ServerName=${nuxeo.db.host}</config-property>
+    <config-property name="property" type="java.lang.String">PortNumber/Integer=${nuxeo.db.port}</config-property>
+    <config-property name="property" type="java.lang.String">DatabaseName=${nuxeo.db.name}</config-property>
+     -->
+    <config-property name="property" type="java.lang.String">User=${nuxeo.db.user}</config-property>
+    <config-property name="property" type="java.lang.String">Password=${nuxeo.db.password}</config-property>
+  </tx-connection-factory>
+</connection-factories>
diff --git a/3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/datasources/default-repository-ds.xml.orig b/3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/datasources/default-repository-ds.xml.orig
new file mode 100644 (file)
index 0000000..3a01540
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<connection-factories>
+  <tx-connection-factory>
+    <jndi-name>NXRepository/default</jndi-name>
+    <xa-transaction/>
+    <track-connection-by-tx/>
+    <adapter-display-name>Nuxeo SQL Repository DataSource</adapter-display-name>
+    <rar-name>nuxeo.ear#nuxeo-core-storage-sql-ra-1.6.2.rar</rar-name>
+    <connection-definition>org.nuxeo.ecm.core.storage.sql.Repository</connection-definition>
+    <config-property name="name">default</config-property>
+    <max-pool-size>${nuxeo.vcs.max-pool-size}</max-pool-size>
+    
+    <config-property name="xaDataSource" type="java.lang.String">com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</config-property>
+    <config-property name="property" type="java.lang.String">URL=jdbc:mysql://${nuxeo.db.host}:${nuxeo.db.port}/${nuxeo.db.name}?relaxAutoCommit=true</config-property>
+    <!-- 
+    <config-property name="property" type="java.lang.String">ServerName=${nuxeo.db.host}</config-property>
+    <config-property name="property" type="java.lang.String">PortNumber/Integer=${nuxeo.db.port}</config-property>
+    <config-property name="property" type="java.lang.String">DatabaseName=${nuxeo.db.name}</config-property>
+     -->
+    <config-property name="property" type="java.lang.String">User=${nuxeo.db.user}</config-property>
+    <config-property name="property" type="java.lang.String">Password=${nuxeo.db.password}</config-property>
+  </tx-connection-factory>
+</connection-factories>
diff --git a/3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/datasources/unified-nuxeo-ds.xml b/3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/datasources/unified-nuxeo-ds.xml
new file mode 100644 (file)
index 0000000..e6c5564
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<datasources>
+  <local-tx-datasource>
+    <jndi-name>NuxeoDS</jndi-name>
+    <connection-url>jdbc:mysql://${nuxeo.db.host}:${nuxeo.db.port}/${nuxeo.db.name}?relaxAutoCommit=true</connection-url>
+    <driver-class>com.mysql.jdbc.Driver</driver-class>
+    <user-name>${nuxeo.db.user}</user-name>
+    <password>${nuxeo.db.password}</password>
+    <min-pool-size>${nuxeo.db.min-pool-size}</min-pool-size>
+    <max-pool-size>${nuxeo.db.max-pool-size}</max-pool-size>
+  </local-tx-datasource>
+</datasources>
diff --git a/3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/nuxeo.defaults b/3rdparty/nuxeo/nuxeo-database-templates/mysql/collectionspace_mysql/nuxeo.defaults
new file mode 100644 (file)
index 0000000..1c06cff
--- /dev/null
@@ -0,0 +1,9 @@
+## DO NOT EDIT THIS FILE, USE nuxeo.conf  ##
+nuxeo.template.includes=common
+
+nuxeo.db.host=localhost
+nuxeo.db.port=3306
+nuxeo.db.name=nuxeo
+nuxeo.db.user=nuxeo
+nuxeo.db.password=password
+nuxeo.db.min-pool-size=5
index a3e413b445e9282bea9b4e87c03aee41eda83526..98a7352f22e7d422628959d8bbd7cadf4d66a7ff 100644 (file)
@@ -12,6 +12,7 @@ nuxeo.release=5.3.2
 nuxeo.ear=nuxeo.ear\r
 nuxeo.system=${nuxeo.ear}/system\r
 nuxeo.plugins=${nuxeo.ear}/plugins\r
+nuxeo.templates=templates\r
 \r
 #distribution\r
 dist=dist\r
@@ -20,7 +21,6 @@ dist.nuxeo=${dist}/nuxeo
 dist.installer=${dist}/installer\r
 dist.installer.services=${dist.installer}/services\r
 \r
-\r
 #dist cspace domain\r
 dist.domain.cspace=${domain.cspace}\r
 dist.server.cspace=${dist.cspace}/server/${jboss.domain.cspace}\r
@@ -58,6 +58,9 @@ jboss.lib.nuxeo=${jboss.server.nuxeo}/lib
 jboss.deploy.nuxeo.system=${jboss.deploy.nuxeo}/${nuxeo.system}\r
 jboss.deploy.nuxeo.plugins=${jboss.deploy.nuxeo}/${nuxeo.plugins}\r
 \r
+#nuxeo database templates\r
+jboss.deploy.nuxeo.templates=${jboss.home}/${nuxeo.templates}\r
+\r
 #database\r
 db=mysql\r
 db.script.dir=${basedir}/src/main/resources/db/${db}\r
@@ -69,3 +72,4 @@ db.driver.jar=${jboss.lib.cspace}/mysql-connector-java-5.1.7-bin.jar
 db.jdbc.url=jdbc:${db}://${db.host}:${db.port}/cspace\r
 db.jdbc.driver.class=com.mysql.jdbc.Driver\r
 db.dialect=org.hibernate.dialect.MySQLDialect\r
+\r