Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

taxeditor / eu.etaxonomy.taxeditor.cdmlib / src / main / resources / eu / etaxonomy / cdm / mappings / hibernate.cfg.xml @ cfb2c8db

History | View | Annotate | Download (13.1 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
<hibernate-configuration>
7
    <session-factory>
8

    
9
      <property name="connection.release_mode">after_transaction</property>
10
      
11
      <property name="hibernate.implicit_naming_strategy">org.hibernate.boot.model.naming.ImplicitNamingStrategyComponentPathImpl</property>
12
      
13

    
14
      <!-- Connection Pooling -->
15
<!--       <property name="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider</property> -->
16
      <!-- <property name="hibernate.connection.provider_class">org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl</property>
17
           -->
18
              <property name="hibernate.connection.provider_class">eu.etaxonomy.taxeditor.remoting.cache.CdmModelCacherConnectionProvider</property>
19
           
20
             <!--
21
          Configuring the C3P0ConnectionProvider
22
          ========================================
23
          see http://www.mchange.com/projects/c3p0/index.html#hibernate-specific
24
          and also org.springframework.orm.hibernate3.AbstractSessionFactoryBean.setDataSource(DataSource dataSource)
25

26
          IMPORTANT:
27
          Because of the constraint (1) the org.hibernate.connection.C3P0ConnectionProvider are not be used
28
          for the Cdm Library because it requires the dataSource bean in some cases.
29

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

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

51
            hibernate.c3p0.acquire_increment
52
                        hibernate.c3p0.idle_test_period
53
                        hibernate.c3p0.timeout
54
                        hibernate.c3p0.max_size
55
                        hibernate.c3p0.max_statements
56
                        hibernate.c3p0.min_size
57
                        hibernate.c3p0.validate
58
      -->
59
      <mapping package="eu.etaxonomy.cdm.model.common"/>
60
      <!-- Annotation Package -->
61
      <mapping class="eu.etaxonomy.cdm.model.agent.Address"/>
62
      <mapping class="eu.etaxonomy.cdm.model.agent.AgentBase"/>
63
      <mapping class="eu.etaxonomy.cdm.model.agent.Contact"/>
64
      <mapping class="eu.etaxonomy.cdm.model.agent.Institution"/>
65
      <mapping class="eu.etaxonomy.cdm.model.agent.InstitutionalMembership"/>
66
      <mapping class="eu.etaxonomy.cdm.model.agent.Person"/>
67
      <mapping class="eu.etaxonomy.cdm.model.agent.Team"/>
68
      <mapping class="eu.etaxonomy.cdm.model.agent.TeamOrPersonBase"/>
69
      <!-- Common Package -->
70
      <mapping class="eu.etaxonomy.cdm.model.common.Annotation"/>
71
      <mapping class="eu.etaxonomy.cdm.model.common.AnnotationType"/>
72
      <mapping class="eu.etaxonomy.cdm.model.common.Credit"/>
73
      <mapping class="eu.etaxonomy.cdm.model.common.DefinedTerm"/>
74
      <mapping class="eu.etaxonomy.cdm.model.common.DefinedTermBase"/>
75
      <mapping class="eu.etaxonomy.cdm.model.common.Extension"/>
76
      <mapping class="eu.etaxonomy.cdm.model.common.ExtensionType"/>
77
      <mapping class="eu.etaxonomy.cdm.model.common.IdentifiableSource"/>
78
      <mapping class="eu.etaxonomy.cdm.model.common.Identifier"/>
79
      <mapping class="eu.etaxonomy.cdm.model.common.IntextReference"/>
80
      <mapping class="eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl"/>
81
      <mapping class="eu.etaxonomy.cdm.model.common.Group"/>
82
      <mapping class="eu.etaxonomy.cdm.model.common.Language"/>
83
      <mapping class="eu.etaxonomy.cdm.model.common.LanguageString"/>
84
      <mapping class="eu.etaxonomy.cdm.model.common.LSID"/>
85
      <mapping class="eu.etaxonomy.cdm.model.common.LSIDAuthority"/>
86
      <mapping class="eu.etaxonomy.cdm.model.common.Marker"/>
87
      <mapping class="eu.etaxonomy.cdm.model.common.MarkerType"/>
88
      <mapping class="eu.etaxonomy.cdm.model.common.OrderedTerm"/>
89
      <mapping class="eu.etaxonomy.cdm.model.common.OrderedTermBase"/>
90
      <mapping class="eu.etaxonomy.cdm.model.common.OrderedTermVocabulary"/>
91
      <mapping class="eu.etaxonomy.cdm.model.common.OriginalSourceBase"/>
92
      <mapping class="eu.etaxonomy.cdm.model.common.RelationshipTermBase"/>
93
      <mapping class="eu.etaxonomy.cdm.model.common.Representation"/>
94
      <mapping class="eu.etaxonomy.cdm.model.common.TermVocabulary"/>
95
      <mapping class="eu.etaxonomy.cdm.model.common.User"/>
96
      <!-- Description Package -->
97
      <mapping class="eu.etaxonomy.cdm.model.description.CategoricalData"/>
98
      <mapping class="eu.etaxonomy.cdm.model.description.CommonTaxonName"/>
99
      <mapping class="eu.etaxonomy.cdm.model.description.DescriptionBase"/>
100
      <mapping class="eu.etaxonomy.cdm.model.description.DescriptionElementBase"/>
101
      <mapping class="eu.etaxonomy.cdm.model.description.DescriptionElementSource"/>
102
      <mapping class="eu.etaxonomy.cdm.model.description.Distribution"/>
103
      <mapping class="eu.etaxonomy.cdm.model.description.Feature"/>
104
      <mapping class="eu.etaxonomy.cdm.model.description.FeatureNode"/>
105
      <mapping class="eu.etaxonomy.cdm.model.description.FeatureTree"/>
106
      <mapping class="eu.etaxonomy.cdm.model.description.KeyStatement"/>
107
      <mapping class="eu.etaxonomy.cdm.model.description.MediaKey"/>
108
      <mapping class="eu.etaxonomy.cdm.model.description.IndividualsAssociation"/>
109
      <mapping class="eu.etaxonomy.cdm.model.description.MeasurementUnit"/>
110
      <mapping class="eu.etaxonomy.cdm.model.description.MultiAccessKey"/>
111
      <mapping class="eu.etaxonomy.cdm.model.description.PolytomousKey"/>
112
      <mapping class="eu.etaxonomy.cdm.model.description.PolytomousKeyNode"/>
113
      <mapping class="eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm"/>
114
      <mapping class="eu.etaxonomy.cdm.model.description.QuantitativeData"/>
115
      <mapping class="eu.etaxonomy.cdm.model.description.SpecimenDescription"/>
116
      <mapping class="eu.etaxonomy.cdm.model.description.State"/>
117
      <mapping class="eu.etaxonomy.cdm.model.description.StateData"/>
118
      <mapping class="eu.etaxonomy.cdm.model.description.StatisticalMeasure"/>
119
      <mapping class="eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue"/>
120
      <mapping class="eu.etaxonomy.cdm.model.description.TaxonDescription"/>
121
      <mapping class="eu.etaxonomy.cdm.model.description.TaxonInteraction"/>
122
      <mapping class="eu.etaxonomy.cdm.model.description.TaxonNameDescription"/>
123
      <mapping class="eu.etaxonomy.cdm.model.description.TextData"/>
124
      <mapping class="eu.etaxonomy.cdm.model.description.TextFormat"/>
125
      <mapping class="eu.etaxonomy.cdm.model.description.WorkingSet"/>
126
      <!-- Location Package -->
127
      <mapping class="eu.etaxonomy.cdm.model.location.NamedArea"/>
128
      <mapping class="eu.etaxonomy.cdm.model.location.NamedAreaLevel"/>
129
      <mapping class="eu.etaxonomy.cdm.model.location.NamedAreaType"/>
130
      <mapping class="eu.etaxonomy.cdm.model.location.ReferenceSystem"/>
131
      <mapping class="eu.etaxonomy.cdm.model.location.Point"/>
132
      <mapping class="eu.etaxonomy.cdm.model.location.Country"/>
133
      <!-- Media Package -->
134
      <mapping class="eu.etaxonomy.cdm.model.media.AudioFile"/>
135
      <mapping class="eu.etaxonomy.cdm.model.media.ImageFile"/>
136
      <mapping class="eu.etaxonomy.cdm.model.media.Media"/>
137
      <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentation"/>
138
      <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentationPart"/>
139
      <mapping class="eu.etaxonomy.cdm.model.media.MovieFile"/>
140
      <mapping class="eu.etaxonomy.cdm.model.media.Rights"/>
141
      <mapping class="eu.etaxonomy.cdm.model.media.RightsType"/>
142
      <!-- Meta Data Package -->
143
      <mapping class="eu.etaxonomy.cdm.model.metadata.CdmMetaData"/>
144
      <mapping class="eu.etaxonomy.cdm.model.metadata.CdmPreference"/>
145
      <!-- Molecular Package -->
146
      <mapping class="eu.etaxonomy.cdm.model.molecular.PhylogeneticTree"/>
147
      <mapping class="eu.etaxonomy.cdm.model.molecular.DnaQuality"/>
148
      <mapping class="eu.etaxonomy.cdm.model.molecular.DnaSample"/>
149
      <mapping class="eu.etaxonomy.cdm.model.molecular.Amplification"/>
150
      <mapping class="eu.etaxonomy.cdm.model.molecular.AmplificationResult"/>
151
      <mapping class="eu.etaxonomy.cdm.model.molecular.Primer"/>
152
      <mapping class="eu.etaxonomy.cdm.model.molecular.Sequence"/>
153
      <mapping class="eu.etaxonomy.cdm.model.molecular.SequenceString"/>
154
      <mapping class="eu.etaxonomy.cdm.model.molecular.SingleRead"/>
155
      <mapping class="eu.etaxonomy.cdm.model.molecular.SingleReadAlignment"/>
156
      <mapping class="eu.etaxonomy.cdm.model.molecular.Cloning"/>
157
      <!-- Name Package -->
158
      <mapping class="eu.etaxonomy.cdm.model.name.BacterialName"/>
159
      <mapping class="eu.etaxonomy.cdm.model.name.BotanicalName"/>
160
      <mapping class="eu.etaxonomy.cdm.model.name.CultivarPlantName"/>
161
      <mapping class="eu.etaxonomy.cdm.model.name.HomotypicalGroup"/>
162
      <mapping class="eu.etaxonomy.cdm.model.name.HybridRelationship"/>
163
      <mapping class="eu.etaxonomy.cdm.model.name.HybridRelationshipType"/>
164
      <mapping class="eu.etaxonomy.cdm.model.name.NameRelationship"/>
165
      <mapping class="eu.etaxonomy.cdm.model.name.NameRelationshipType"/>
166
      <mapping class="eu.etaxonomy.cdm.model.name.NameTypeDesignation"/>
167
      <mapping class="eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus"/>
168
      <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalCode"/>
169
      <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalStatus"/>
170
      <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalStatusType"/>
171
      <mapping class="eu.etaxonomy.cdm.model.name.NonViralName"/>
172
      <mapping class="eu.etaxonomy.cdm.model.name.Rank"/>
173
      <mapping class="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation"/>
174
      <mapping class="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus"/>
175
      <mapping class="eu.etaxonomy.cdm.model.name.TaxonNameBase"/>
176
      <mapping class="eu.etaxonomy.cdm.model.name.TypeDesignationBase"/>
177
      <mapping class="eu.etaxonomy.cdm.model.name.ViralName"/>
178
      <mapping class="eu.etaxonomy.cdm.model.name.ZoologicalName"/>
179
      <!-- Occurrence Package -->
180
      <mapping class="eu.etaxonomy.cdm.model.occurrence.Collection"/>
181
      <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivationEvent"/>
182
      <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivationEventType"/>
183
      <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivedUnit"/>
184
      <mapping class="eu.etaxonomy.cdm.model.occurrence.MaterialOrMethodEvent"/>
185
      <mapping class="eu.etaxonomy.cdm.model.occurrence.MediaSpecimen"/>
186
      <mapping class="eu.etaxonomy.cdm.model.occurrence.DeterminationEvent"/>
187
      <mapping class="eu.etaxonomy.cdm.model.occurrence.FieldUnit"/>
188
      <mapping class="eu.etaxonomy.cdm.model.occurrence.GatheringEvent"/>
189
      <mapping class="eu.etaxonomy.cdm.model.occurrence.PreservationMethod"/>
190
      <mapping class="eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase"/>
191
      <!-- Reference Package -->
192
      <mapping class="eu.etaxonomy.cdm.model.reference.Reference"/>
193

    
194
      <!-- Taxon Package -->
195
      <mapping class="eu.etaxonomy.cdm.model.taxon.Synonym"/>
196
      <mapping class="eu.etaxonomy.cdm.model.taxon.SynonymType"/>
197
      <mapping class="eu.etaxonomy.cdm.model.taxon.Taxon"/>
198
      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonBase"/>
199
      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNode"/>
200
      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNodeAgentRelation"/>
201
      <mapping class="eu.etaxonomy.cdm.model.taxon.Classification"/>
202
      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationship"/>
203
      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType"/>
204
      
205
      <!-- Validation Package -->
206
      <mapping class="eu.etaxonomy.cdm.model.validation.EntityValidation"/>
207
      <mapping class="eu.etaxonomy.cdm.model.validation.EntityConstraintViolation"/>
208
      
209
      <!-- View Package -->
210
      <mapping class="eu.etaxonomy.cdm.model.view.AuditEvent"/>
211
      
212

    
213

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