source: trunk/config/dist/hibernate.cfg.xml @ 6468

Last change on this file since 6468 was 6468, checked in by Nicklas Nordborg, 7 years ago

References #1742: Upgrade to Hibernate 4.x

Updated to Hibernate 4.3.5.

  • Some 3rd-party libs has been updated/changed
  • PostgreSQLDialect has been deprecated and must be replaced with PostgreSQL9Dialect (affects base.config). Documentation need to be updated.
  • 2nd-level cache is configured differently. Hibernate will start, but I have not verified that it is actually used.
  • HibernateUtil.doJdbcWork() replaced with HibernateUtil.doWork() and HibernateUtil.doReturningWork() since Hibernate now has built-in support for return information from a work. Removed JdbcWork and lots of other changes needed because of this.
  • EntityMode parameter is no longer needed in lots of methods (I guess Hibernate has dropped support for other modes than POJO).
  • Quota.quotaValues changed from Map to Set since I could not get the map implemenation to work with Hibernate. The maxBytes property is now part of QuotaIndex.
  • Some internal Hibernate API has moved around to other packages.
  • unique-key annotations are now prefixed with the class name they appear in to avoid problems with accidentally duplicating another name (which fails in PostgreSQL since Hibernate has changed the naming strategy).


So far I have tested installation and TestAll on PostgreSQL. Need to test MySQL and updating also.

There are also some remaining calls to deprecated methods in Hibernate.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Date Id
File size: 5.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8" ?>
2<!DOCTYPE hibernate-configuration PUBLIC
3  "-//Hibernate/Hibernate Configuration DTD//EN"
4  "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
5<!--
6  $Id: hibernate.cfg.xml 6468 2014-06-10 11:27:02Z nicklas $
7
8  Copyright (C) 2006 Nicklas Nordborg
9
10  This file is part of BASE - BioArray Software Environment.
11  Available at http://base.thep.lu.se/
12
13  BASE is free software; you can redistribute it and/or
14  modify it under the terms of the GNU General Public License
15  as published by the Free Software Foundation; either version 3
16  of the License, or (at your option) any later version.
17
18  BASE is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  GNU General Public License for more details.
22
23  You should have received a copy of the GNU General Public License
24  along with BASE. If not, see <http://www.gnu.org/licenses/>.
25 
26  See http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html
27-->
28<hibernate-configuration>
29  <session-factory>
30 
31    <!-- JDBC/SQL options -->
32    <property name="jdbc.batch_size">0</property>
33    <property name="show_sql">false</property>
34    <property name="connection.release_mode">after_transaction</property>
35 
36    <!-- Connection pool options -->
37    <property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
38    <property name="c3p0.min_size">1</property>
39    <property name="c3p0.max_size">20</property>
40    <property name="c3p0.timeout">3600</property>
41   
42    <!-- Second-level cache options -->
43    <property name="cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</property>
44    <property name="cache.use_query_cache">true</property>
45    <property name="cache.use_second_level_cache">true</property>
46    <class-cache
47      class="net.sf.basedb.core.data.AnnotationTypeData"
48      usage="nonstrict-read-write"
49    />
50    <class-cache
51      class="net.sf.basedb.core.data.AnnotationTypeCategoryData"
52      usage="nonstrict-read-write"
53    />
54    <class-cache
55      class="net.sf.basedb.core.data.BioMaterialData"
56      usage="nonstrict-read-write"
57    />
58    <class-cache
59      class="net.sf.basedb.core.data.BioPlateData"
60      usage="nonstrict-read-write"
61    />
62    <class-cache
63      class="net.sf.basedb.core.data.BioPlateEventTypeData"
64      usage="nonstrict-read-write"
65    />
66    <class-cache
67      class="net.sf.basedb.core.data.BioPlateTypeData"
68      usage="nonstrict-read-write"
69    />
70    <class-cache
71      class="net.sf.basedb.core.data.DataFileTypeData"
72      usage="nonstrict-read-write"
73    />
74    <class-cache
75      class="net.sf.basedb.core.data.DirectoryData"
76      usage="nonstrict-read-write"
77    />
78    <class-cache
79      class="net.sf.basedb.core.data.ExperimentData"
80      usage="nonstrict-read-write"
81    />
82    <class-cache
83      class="net.sf.basedb.core.data.FormulaData"
84      usage="nonstrict-read-write"
85    />
86    <collection-cache
87      collection="net.sf.basedb.core.data.FormulaData.formulas"
88      usage="nonstrict-read-write"
89    />
90    <class-cache
91      class="net.sf.basedb.core.data.GroupData"
92      usage="nonstrict-read-write"
93    />
94    <class-cache
95      class="net.sf.basedb.core.data.HelpData"
96      usage="nonstrict-read-write"
97    />
98    <class-cache
99      class="net.sf.basedb.core.data.ItemSubtypeData"
100      usage="nonstrict-read-write"
101    />
102    <class-cache
103      class="net.sf.basedb.core.data.MimeTypeData"
104      usage="nonstrict-read-write"
105    />
106    <class-cache
107      class="net.sf.basedb.core.data.NewsData"
108      usage="nonstrict-read-write"
109    />
110    <class-cache
111      class="net.sf.basedb.core.data.PhysicalBioAssayData"
112      usage="nonstrict-read-write"
113    />
114    <class-cache
115      class="net.sf.basedb.core.data.PlateData"
116      usage="nonstrict-read-write"
117    />
118    <class-cache
119      class="net.sf.basedb.core.data.PlateEventTypeData"
120      usage="nonstrict-read-write"
121    />
122    <class-cache
123      class="net.sf.basedb.core.data.PlateGeometryData"
124      usage="nonstrict-read-write"
125    />
126    <class-cache
127      class="net.sf.basedb.core.data.PlateTypeData"
128      usage="nonstrict-read-write"
129    />
130    <class-cache
131      class="net.sf.basedb.core.data.PlatformData"
132      usage="nonstrict-read-write"
133    />
134    <class-cache
135      class="net.sf.basedb.core.data.PlatformVariantData"
136      usage="nonstrict-read-write"
137    />
138    <class-cache
139      class="net.sf.basedb.core.data.PluginConfigurationData"
140      usage="nonstrict-read-write"
141    />
142    <class-cache
143      class="net.sf.basedb.core.data.PluginDefinitionData"
144      usage="nonstrict-read-write"
145    />
146    <class-cache
147      class="net.sf.basedb.core.data.PluginTypeData"
148      usage="nonstrict-read-write"
149    />
150    <class-cache
151      class="net.sf.basedb.core.data.ProjectData"
152      usage="nonstrict-read-write"
153    />
154    <class-cache
155      class="net.sf.basedb.core.data.QuantityData"
156      usage="nonstrict-read-write"
157    />
158    <class-cache
159      class="net.sf.basedb.core.data.QuotaData"
160      usage="nonstrict-read-write"
161    />
162    <class-cache
163      class="net.sf.basedb.core.data.QuotaTypeData"
164      usage="nonstrict-read-write"
165    />
166    <class-cache
167      class="net.sf.basedb.core.data.RawBioAssayData"
168      usage="nonstrict-read-write"
169    />
170    <class-cache
171      class="net.sf.basedb.core.data.RoleData"
172      usage="nonstrict-read-write"
173    />
174    <class-cache
175      class="net.sf.basedb.core.data.TagData"
176      usage="nonstrict-read-write"
177    />
178    <class-cache
179      class="net.sf.basedb.core.data.UnitData"
180      usage="nonstrict-read-write"
181    />
182    <class-cache
183      class="net.sf.basedb.core.data.UnitSymbolData"
184      usage="nonstrict-read-write"
185    />
186    <class-cache
187      class="net.sf.basedb.core.data.UserData"
188      usage="nonstrict-read-write"
189    />
190    <class-cache
191      class="net.sf.basedb.core.data.ArrayDesignData"
192      usage="nonstrict-read-write"
193    />
194    <class-cache
195      class="net.sf.basedb.core.data.ArrayBatchData"
196      usage="nonstrict-read-write"
197    />
198    <class-cache
199      class="net.sf.basedb.core.data.ArraySlideData"
200      usage="nonstrict-read-write"
201    />
202  </session-factory>
203
204</hibernate-configuration>
205
Note: See TracBrowser for help on using the repository browser.