Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

cdmlib / cdmlib-cache / src / main / resources / eu / etaxonomy / cdm / mappings / hibernate.cfg.xml @ 93ad7e54

History | View | Annotate | Download (14.3 KB)

1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE hibernate-configuration PUBLIC
3
 "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
4
 "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
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
 
12
<hibernate-configuration>
13
    <session-factory>
14

    
15
      <property name="connection.release_mode">after_transaction</property>
16

    
17
      <property name="hibernate.implicit_naming_strategy">org.hibernate.boot.model.naming.ImplicitNamingStrategyComponentPathImpl</property>
18
      <!-- NOTE: if integrated in spring this is handled there (see persistence.xml) -->
19
 
20
      <!-- Connection Pooling -->
21
<!--       <property name="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider</property> -->
22
<!--       <property name="hibernate.connection.provider_class">org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl</property> -->
23
          <property name="hibernate.connection.provider_class">eu.etaxonomy.cdm.cache.CdmModelCacherConnectionProvider</property>
24
           
25
            <!--
26
          Configuring the C3P0ConnectionProvider
27
          ========================================
28
          see http://www.mchange.com/projects/c3p0/index.html#hibernate-specific
29
          and also org.springframework.orm.hibernate3.AbstractSessionFactoryBean.setDataSource(DataSource dataSource)
30

31
          IMPORTANT:
32
          Because of the constraint (1) the org.hibernate.connection.C3P0ConnectionProvider are not be used
33
          for the Cdm Library because it requires the dataSource bean in some cases.
34

35
          (1)
36
          Do NOT specify the dataSource in the sessionFactory for example in the
37
          org.springframework.orm.hibernate3.LocalSessionFactoryBean
38
          !!!==> If *dataSource* is set, this will override corresponding settings in Hibernate properties.!!!
39
                          If this is set, the Hibernate settings should not define a connection provider to
40
                      avoid meaningless double configuration.
41
          (2)
42
          Hibernate uses the hibernate.c3p0.max_size property to determine if c3p0
43
          is beeing used.  Therefore the max_size property MUST be set. - maybe not need in hibernate 3.4 +
44

45
          (3) If you are using Hibernate's C3P0ConnectionProvider you must set the following properties
46
          in your hibernate configuration, using hibernate-specific configuration keys.
47
          All other properties must be defined as usual in a c3p0.properties file.
48
          This is confusing, and will hopefully be simplified some time in the future, but for now...
49
          
50
          DOCUMENTATION UPDATE (2015-05-22):
51
          Hibernate's C3P0ConnectionProvider renames 7 c3p0 configuration properties, which, 
52
          if set in your hibernate configuration, will override any configuration you may have set 
53
          in a c3p0.properties file.
54
          TODO: are points (2) and (3) still valid? I don't think so! (AK)
55

56
            hibernate.c3p0.acquire_increment
57
                        hibernate.c3p0.idle_test_period
58
                        hibernate.c3p0.timeout
59
                        hibernate.c3p0.max_size
60
                        hibernate.c3p0.max_statements
61
                        hibernate.c3p0.min_size
62
                        hibernate.c3p0.validate
63
      -->
64
      <mapping package="eu.etaxonomy.cdm.model.common"/>
65
      
66
      <!-- Agent Package -->
67
      <mapping class="eu.etaxonomy.cdm.model.agent.Address"/>
68
      <mapping class="eu.etaxonomy.cdm.model.agent.AgentBase"/>
69
      <mapping class="eu.etaxonomy.cdm.model.agent.Contact"/>
70
      <mapping class="eu.etaxonomy.cdm.model.agent.Institution"/>
71
      <mapping class="eu.etaxonomy.cdm.model.agent.InstitutionalMembership"/>
72
      <mapping class="eu.etaxonomy.cdm.model.agent.Person"/>
73
      <mapping class="eu.etaxonomy.cdm.model.agent.Team"/>
74
      <mapping class="eu.etaxonomy.cdm.model.agent.TeamOrPersonBase"/>
75
      
76
      <!-- Common Package -->
77
      <mapping class="eu.etaxonomy.cdm.model.common.Annotation"/>
78
      <mapping class="eu.etaxonomy.cdm.model.common.AnnotationType"/>
79
      <mapping class="eu.etaxonomy.cdm.model.common.Credit"/>
80
      <mapping class="eu.etaxonomy.cdm.model.common.CdmLinkBase"/>
81
      <mapping class="eu.etaxonomy.cdm.model.common.Extension"/>
82
      <mapping class="eu.etaxonomy.cdm.model.common.ExtensionType"/>
83
      <mapping class="eu.etaxonomy.cdm.model.common.IdentifiableSource"/>
84
      <mapping class="eu.etaxonomy.cdm.model.common.Identifier"/>
85
      <mapping class="eu.etaxonomy.cdm.model.common.IntextReference"/>
86
      <mapping class="eu.etaxonomy.cdm.model.common.Language"/>
87
      <mapping class="eu.etaxonomy.cdm.model.common.LanguageString"/>
88
      <mapping class="eu.etaxonomy.cdm.model.common.LSID"/>
89
      <mapping class="eu.etaxonomy.cdm.model.common.LSIDAuthority"/>
90
      <mapping class="eu.etaxonomy.cdm.model.common.Marker"/>
91
      <mapping class="eu.etaxonomy.cdm.model.common.MarkerType"/>
92
      <mapping class="eu.etaxonomy.cdm.model.common.RelationshipTermBase"/>
93
      
94
      <!-- Description Package -->
95
      <mapping class="eu.etaxonomy.cdm.model.description.CategoricalData"/>
96
      <mapping class="eu.etaxonomy.cdm.model.description.CommonTaxonName"/>
97
      <mapping class="eu.etaxonomy.cdm.model.description.DescriptionBase"/>
98
      <mapping class="eu.etaxonomy.cdm.model.description.DescriptionElementBase"/>
99
      <mapping class="eu.etaxonomy.cdm.model.description.DescriptionElementSource"/>
100
      <mapping class="eu.etaxonomy.cdm.model.description.Distribution"/>
101
      <mapping class="eu.etaxonomy.cdm.model.description.Feature"/>
102
      <mapping class="eu.etaxonomy.cdm.model.description.FeatureState"/>
103
      <mapping class="eu.etaxonomy.cdm.model.description.Character"/>
104
      <mapping class="eu.etaxonomy.cdm.model.description.KeyStatement"/>
105
      <mapping class="eu.etaxonomy.cdm.model.description.MediaKey"/>
106
      <mapping class="eu.etaxonomy.cdm.model.description.IndividualsAssociation"/>
107
      <mapping class="eu.etaxonomy.cdm.model.description.MeasurementUnit"/>
108
      <mapping class="eu.etaxonomy.cdm.model.description.MultiAccessKey"/>
109
      <mapping class="eu.etaxonomy.cdm.model.description.PolytomousKey"/>
110
      <mapping class="eu.etaxonomy.cdm.model.description.PolytomousKeyNode"/>
111
      <mapping class="eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm"/>
112
      <mapping class="eu.etaxonomy.cdm.model.description.QuantitativeData"/>
113
      <mapping class="eu.etaxonomy.cdm.model.description.SpecimenDescription"/>
114
      <mapping class="eu.etaxonomy.cdm.model.description.State"/>
115
      <mapping class="eu.etaxonomy.cdm.model.description.StateData"/>
116
      <mapping class="eu.etaxonomy.cdm.model.description.StatisticalMeasure"/>
117
      <mapping class="eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue"/>
118
      <mapping class="eu.etaxonomy.cdm.model.description.TaxonDescription"/>
119
      <mapping class="eu.etaxonomy.cdm.model.description.TaxonInteraction"/>
120
      <mapping class="eu.etaxonomy.cdm.model.description.TaxonNameDescription"/>
121
      <mapping class="eu.etaxonomy.cdm.model.description.TextData"/>
122
      <mapping class="eu.etaxonomy.cdm.model.description.TextFormat"/>
123
      <mapping class="eu.etaxonomy.cdm.model.description.DescriptiveDataSet"/>
124
      
125
      <!-- Location Package -->
126
      <mapping class="eu.etaxonomy.cdm.model.location.NamedArea"/>
127
      <mapping class="eu.etaxonomy.cdm.model.location.NamedAreaLevel"/>
128
      <mapping class="eu.etaxonomy.cdm.model.location.NamedAreaType"/>
129
      <mapping class="eu.etaxonomy.cdm.model.location.ReferenceSystem"/>
130
      <mapping class="eu.etaxonomy.cdm.model.location.Point"/>
131
      <mapping class="eu.etaxonomy.cdm.model.location.Country"/>
132
      
133
      <!-- Media Package -->
134
      <mapping class="eu.etaxonomy.cdm.model.media.AudioFile"/>
135
      <mapping class="eu.etaxonomy.cdm.model.media.ExternalLink"/>
136
      <mapping class="eu.etaxonomy.cdm.model.media.ImageFile"/>
137
      <mapping class="eu.etaxonomy.cdm.model.media.Media"/>
138
      <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentation"/>
139
      <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentationPart"/>
140
      <mapping class="eu.etaxonomy.cdm.model.media.MovieFile"/>
141
      <mapping class="eu.etaxonomy.cdm.model.media.Rights"/>
142
      <mapping class="eu.etaxonomy.cdm.model.media.RightsType"/>
143
      
144
      <!-- Meta Data Package -->
145
      <mapping class="eu.etaxonomy.cdm.model.metadata.CdmMetaData"/>
146
      <mapping class="eu.etaxonomy.cdm.model.metadata.CdmPreference"/>
147
      
148
      <!-- Molecular Package -->
149
      <mapping class="eu.etaxonomy.cdm.model.molecular.PhylogeneticTree"/>
150
      <mapping class="eu.etaxonomy.cdm.model.molecular.DnaQuality"/>
151
      <mapping class="eu.etaxonomy.cdm.model.molecular.DnaSample"/>
152
      <mapping class="eu.etaxonomy.cdm.model.molecular.Amplification"/>
153
      <mapping class="eu.etaxonomy.cdm.model.molecular.AmplificationResult"/>
154
      <mapping class="eu.etaxonomy.cdm.model.molecular.Primer"/>
155
      <mapping class="eu.etaxonomy.cdm.model.molecular.Sequence"/>
156
      <mapping class="eu.etaxonomy.cdm.model.molecular.SequenceString"/>
157
      <mapping class="eu.etaxonomy.cdm.model.molecular.SingleRead"/>
158
      <mapping class="eu.etaxonomy.cdm.model.molecular.SingleReadAlignment"/>
159
      <mapping class="eu.etaxonomy.cdm.model.molecular.Cloning"/>
160
      
161
      <!-- Name Package -->
162
      <mapping class="eu.etaxonomy.cdm.model.name.HomotypicalGroup"/>
163
      <mapping class="eu.etaxonomy.cdm.model.name.HybridRelationship"/>
164
      <mapping class="eu.etaxonomy.cdm.model.name.HybridRelationshipType"/>
165
      <mapping class="eu.etaxonomy.cdm.model.name.NameRelationship"/>
166
      <mapping class="eu.etaxonomy.cdm.model.name.NameRelationshipType"/>
167
      <mapping class="eu.etaxonomy.cdm.model.name.NameTypeDesignation"/>
168
      <mapping class="eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus"/>
169
      <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalCode"/>
170
      <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalStatus"/>
171
      <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalStatusType"/>
172
      <mapping class="eu.etaxonomy.cdm.model.name.Rank"/>
173
      <mapping class="eu.etaxonomy.cdm.model.name.Registration"/>
174
      <mapping class="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation"/>
175
      <mapping class="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus"/>
176
      <mapping class="eu.etaxonomy.cdm.model.name.TaxonName"/>
177
      <mapping class="eu.etaxonomy.cdm.model.name.TextualTypeDesignation"/>
178
      <mapping class="eu.etaxonomy.cdm.model.name.TypeDesignationBase"/>
179
      
180
      <!-- Occurrence Package -->
181
      <mapping class="eu.etaxonomy.cdm.model.occurrence.Collection"/>
182
      <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivationEvent"/>
183
      <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivationEventType"/>
184
      <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivedUnit"/>
185
      <mapping class="eu.etaxonomy.cdm.model.occurrence.MaterialOrMethodEvent"/>
186
      <mapping class="eu.etaxonomy.cdm.model.occurrence.MediaSpecimen"/>
187
      <mapping class="eu.etaxonomy.cdm.model.occurrence.DeterminationEvent"/>
188
      <mapping class="eu.etaxonomy.cdm.model.occurrence.FieldUnit"/>
189
      <mapping class="eu.etaxonomy.cdm.model.occurrence.GatheringEvent"/>
190
      <mapping class="eu.etaxonomy.cdm.model.occurrence.PreservationMethod"/>
191
      <mapping class="eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase"/>
192
            
193
      <!-- Permission Package -->
194
      <mapping class="eu.etaxonomy.cdm.model.permission.AuthorityBase"/>
195
      <mapping class="eu.etaxonomy.cdm.model.permission.CdmAuthority"/>
196
      <mapping class="eu.etaxonomy.cdm.model.permission.GrantedAuthorityImpl"/>
197
      <mapping class="eu.etaxonomy.cdm.model.permission.Group"/>
198
      <mapping class="eu.etaxonomy.cdm.model.permission.Role"/>
199
      <mapping class="eu.etaxonomy.cdm.model.permission.User"/>
200
      
201
      <!-- Reference Package -->
202
      <mapping class="eu.etaxonomy.cdm.model.reference.Reference"/>
203
      <mapping class="eu.etaxonomy.cdm.model.reference.OriginalSourceBase"/>
204
      <mapping class="eu.etaxonomy.cdm.model.reference.CdmLinkSource"/>
205
      
206
      <!-- Taxon Package -->
207
      <mapping class="eu.etaxonomy.cdm.model.taxon.Synonym"/>
208
      <mapping class="eu.etaxonomy.cdm.model.taxon.SynonymType"/>
209
      <mapping class="eu.etaxonomy.cdm.model.taxon.Taxon"/>
210
      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonBase"/>
211
      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNode"/>
212
      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNodeAgentRelation"/>
213
      <mapping class="eu.etaxonomy.cdm.model.taxon.Classification"/>
214
      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationship"/>
215
      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType"/>
216
      
217
      <!-- Term Package -->
218
      <mapping class="eu.etaxonomy.cdm.model.term.DefinedTerm"/>
219
      <mapping class="eu.etaxonomy.cdm.model.term.DefinedTermBase"/>
220
      <mapping class="eu.etaxonomy.cdm.model.term.OrderedTerm"/>
221
      <mapping class="eu.etaxonomy.cdm.model.term.OrderedTermBase"/>
222
      <mapping class="eu.etaxonomy.cdm.model.term.OrderedTermVocabulary"/>
223
      <mapping class="eu.etaxonomy.cdm.model.term.Representation"/>
224
      <mapping class="eu.etaxonomy.cdm.model.term.TermRelationshipType"/>
225
      <mapping class="eu.etaxonomy.cdm.model.term.TermTree"/>
226
      <mapping class="eu.etaxonomy.cdm.model.term.TermGraph"/>
227
      <mapping class="eu.etaxonomy.cdm.model.term.TermNode"/>
228
      <mapping class="eu.etaxonomy.cdm.model.term.TermRelation"/>
229
      <mapping class="eu.etaxonomy.cdm.model.term.TermVocabulary"/>
230
      
231
      <!-- Validation Package -->
232
      <mapping class="eu.etaxonomy.cdm.model.validation.EntityValidation"/>
233
      <mapping class="eu.etaxonomy.cdm.model.validation.EntityConstraintViolation"/>
234
      
235
      <!-- View Package -->
236
      <mapping class="eu.etaxonomy.cdm.model.view.AuditEvent"/>
237
      
238
      <!-- for filling caches -->
239
      <!-- since hibernate 4 listeners are not handled via hibernate.cfg.xml anymore -->
240
      <!--  http://stackoverflow.com/questions/8616146/eventlisteners-using-hibernate-4-0-with-spring-3-1-0-release
241
            https://community.jboss.org/wiki/HibernateCoreMigrationGuide40 -->
242

    
243
    </session-factory>
244
</hibernate-configuration>
Add picture from clipboard (Maximum size: 40 MB)