Project

General

Profile

« Previous | Next » 

Revision 7bae9703

Added by Andreas Müller over 6 years ago

minor changes for CdmModelCacher

View differences:

cdmlib-cache/src/main/java/eu/etaxonomy/cdm/cache/CdmModelCacherConnectionProvider.java
7 7
import eu.etaxonomy.cdm.database.CdmDataSource;
8 8

  
9 9
/**
10
 * This is a very preliminary class to get the model cache running. Need to better understand how 
10
 * This is a very preliminary class to get the model cache running. Need to better understand how
11 11
 * the datasource works with hibernate service registry before implementing the correct way.
12 12

  
13 13
 * Or use a running source.
14
 * 
15
 * When changing this class please also adapt https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/TaxonomicEditorDevelopersGuide#Model-Change-Actions 
16
 * 
14
 *
15
 * When changing this class please also adapt https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/TaxonomicEditorDevelopersGuide#Model-Change-Actions
16
 *
17 17
 * @author a.mueller
18 18
 *
19 19
 */
......
26 26
	}
27 27

  
28 28
	private DataSource getDataSourcePreliminary() {
29
		String database = "xyz";
29
		String database = "modelCacher";
30 30
		String path = "C:\\Users\\a.mueller\\.cdmLibrary\\writableResources\\h2\\LocalH2_" + database;
31 31
        String username = "sa";
32 32
        CdmDataSource dataSource = CdmDataSource.NewH2EmbeddedInstance("cdmTest", username, "", path);
33 33
        return dataSource;
34 34
	}
35
	
36
	
35

  
36

  
37 37

  
38 38
}
cdmlib-cache/src/main/resources/eu/etaxonomy/cdm/mappings/hibernate.cfg.xml
3 3
 "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
4 4
 "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
5 5

  
6
<!-- 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.
7
Difference are to be found in 
8
 * <property name="hibernate.implicit_naming_strategy">   which is missing in the original file
9
 * <property name="hibernate.connection.provider_class" which has a differen value in the original file
10
-->
11
 
6 12
<hibernate-configuration>
7 13
    <session-factory>
8 14

  
......
132 138
      <mapping class="eu.etaxonomy.cdm.model.location.Country"/>
133 139
      <!-- Media Package -->
134 140
      <mapping class="eu.etaxonomy.cdm.model.media.AudioFile"/>
141
      <mapping class="eu.etaxonomy.cdm.model.media.ExternalLink"/>
135 142
      <mapping class="eu.etaxonomy.cdm.model.media.ImageFile"/>
136 143
      <mapping class="eu.etaxonomy.cdm.model.media.Media"/>
137 144
      <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentation"/>

Also available in: Unified diff