Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

cdmlib / cdmlib-test / src / test / resources / eu / etaxonomy / cdm / hibernate.cfg.xml @ 93ad7e54

History | View | Annotate | Download (13.5 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
      <!-- Connection Pooling -->
12
<!--       <property name="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider</property> -->
13
      <property name="hibernate.connection.provider_class">org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl</property>
14
            <!--
15
          Configuring the C3P0ConnectionProvider
16
          ========================================
17
          see http://www.mchange.com/projects/c3p0/index.html#hibernate-specific
18
          and also org.springframework.orm.hibernate3.AbstractSessionFactoryBean.setDataSource(DataSource dataSource)
19

20
          IMPORTANT:
21
          Because of the constraint (1) the org.hibernate.connection.C3P0ConnectionProvider are not be used
22
          for the Cdm Library because it requires the dataSource bean in some cases.
23

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

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

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

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