import eu.etaxonomy.cdm.database.CdmDataSource;
/**
- * This is a very preliminary class to get the model cache running. Need to better understand how
+ * This is a very preliminary class to get the model cache running. Need to better understand how
* the datasource works with hibernate service registry before implementing the correct way.
* Or use a running source.
- *
- * When changing this class please also adapt https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/TaxonomicEditorDevelopersGuide#Model-Change-Actions
- *
+ *
+ * When changing this class please also adapt https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/TaxonomicEditorDevelopersGuide#Model-Change-Actions
+ *
* @author a.mueller
*
*/
}
private DataSource getDataSourcePreliminary() {
- String database = "xyz";
+ String database = "modelCacher";
String path = "C:\\Users\\a.mueller\\.cdmLibrary\\writableResources\\h2\\LocalH2_" + database;
String username = "sa";
CdmDataSource dataSource = CdmDataSource.NewH2EmbeddedInstance("cdmTest", username, "", path);
return dataSource;
}
-
-
+
+
}
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
+<!-- This is a copy of cdmlib-persistence/src/main/resources/eu/etaxonomy/cdm/hibernate/hibernate.cfg.xml. If the former changes in the mapping part *this* file needs to be changed accordingly.
+Difference are to be found in
+ * <property name="hibernate.implicit_naming_strategy"> which is missing in the original file
+ * <property name="hibernate.connection.provider_class" which has a differen value in the original file
+-->
+
<hibernate-configuration>
<session-factory>
<mapping class="eu.etaxonomy.cdm.model.location.Country"/>
<!-- Media Package -->
<mapping class="eu.etaxonomy.cdm.model.media.AudioFile"/>
+ <mapping class="eu.etaxonomy.cdm.model.media.ExternalLink"/>
<mapping class="eu.etaxonomy.cdm.model.media.ImageFile"/>
<mapping class="eu.etaxonomy.cdm.model.media.Media"/>
<mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentation"/>