Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

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

    
185
      <!-- Taxon Package -->
186
      <mapping class="eu.etaxonomy.cdm.model.taxon.Synonym"/>
187
      <mapping class="eu.etaxonomy.cdm.model.taxon.SynonymType"/>
188
      <mapping class="eu.etaxonomy.cdm.model.taxon.Taxon"/>
189
      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonBase"/>
190
      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNode"/>
191
      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNodeAgentRelation"/>
192
      <mapping class="eu.etaxonomy.cdm.model.taxon.Classification"/>
193
      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationship"/>
194
      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType"/>
195
      
196
      <!-- Validation Package -->
197
      <mapping class="eu.etaxonomy.cdm.model.validation.EntityValidation"/>
198
      <mapping class="eu.etaxonomy.cdm.model.validation.EntityConstraintViolation"/>
199
      
200
      <!-- View Package -->
201
      <mapping class="eu.etaxonomy.cdm.model.view.AuditEvent"/>
202
      
203
      <!-- for filling caches -->
204
      <!-- since hibernate 4 listeners are not handled via hibernate.cfg.xml anymore -->
205
      <!--  http://stackoverflow.com/questions/8616146/eventlisteners-using-hibernate-4-0-with-spring-3-1-0-release
206
            https://community.jboss.org/wiki/HibernateCoreMigrationGuide40 -->
207

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