Просмотр исходного кода

Merge pull request #4 from citerus/bump-hibernate

Bump Hibernate from 3 to 4.
mackos 11 лет назад
Родитель
Сommit
38c005a002

+ 9
- 9
pom.xml Просмотреть файл

@@ -169,7 +169,7 @@
169 169
     <dependency>
170 170
       <groupId>org.hibernate</groupId>
171 171
       <artifactId>hibernate-core</artifactId>
172
-      <version>3.3.1.GA</version>
172
+      <version>4.3.5.Final</version>
173 173
       <!-- God, what is it with Java and logging frameworks... http://forum.hibernate.org/viewtopic.php?p=2401380 -->
174 174
       <exclusions>
175 175
         <exclusion>
@@ -178,7 +178,12 @@
178 178
         </exclusion>
179 179
       </exclusions>
180 180
     </dependency>
181
-    <dependency>
181
+      <dependency>
182
+          <groupId>commons-collections</groupId>
183
+          <artifactId>commons-collections</artifactId>
184
+          <version>3.2.1</version>
185
+      </dependency>
186
+      <dependency>
182 187
       <groupId>org.slf4j</groupId>
183 188
       <artifactId>slf4j-log4j12</artifactId>
184 189
       <version>1.5.6</version>
@@ -199,11 +204,6 @@
199 204
       <version>3.8.0.GA</version>
200 205
     </dependency>
201 206
     <dependency>
202
-      <groupId>org.hibernate</groupId>
203
-      <artifactId>hibernate-annotations</artifactId>
204
-      <version>3.4.0.GA</version>
205
-    </dependency>
206
-    <dependency>
207 207
       <groupId>commons-lang</groupId>
208 208
       <artifactId>commons-lang</artifactId>
209 209
       <version>2.3</version>
@@ -219,9 +219,9 @@
219 219
       <version>1.2.2</version>
220 220
     </dependency>
221 221
     <dependency>
222
-      <groupId>hsqldb</groupId>
222
+      <groupId>org.hsqldb</groupId>
223 223
       <artifactId>hsqldb</artifactId>
224
-      <version>1.8.0.7</version>
224
+      <version>2.3.3</version>
225 225
     </dependency>
226 226
       <dependency>
227 227
           <groupId>javax.servlet</groupId>

+ 1
- 1
src/main/java/se/citerus/dddsample/application/util/SampleDataGenerator.java Просмотреть файл

@@ -1,7 +1,7 @@
1 1
 package se.citerus.dddsample.application.util;
2 2
 
3 3
 import org.hibernate.SessionFactory;
4
-import org.hibernate.classic.Session;
4
+import org.hibernate.Session;
5 5
 import org.springframework.beans.factory.BeanFactoryUtils;
6 6
 import org.springframework.jdbc.core.JdbcTemplate;
7 7
 import org.springframework.transaction.PlatformTransactionManager;

+ 2
- 2
src/main/resources/context-infrastructure-persistence.xml Просмотреть файл

@@ -22,12 +22,12 @@
22 22
     <property name="defaultAutoCommit" value="false"/>
23 23
   </bean>
24 24
 
25
-  <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
25
+  <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
26 26
     <property name="dataSource" ref="dataSource"/>
27 27
     <property name="configLocation" value="classpath:/hibernate.cfg.xml"/>
28 28
   </bean>
29 29
 
30
-  <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
30
+  <bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager">
31 31
     <property name="sessionFactory" ref="sessionFactory"/>
32 32
   </bean>
33 33
 

+ 2
- 2
src/main/resources/context-interfaces.xml Просмотреть файл

@@ -39,7 +39,7 @@
39 39
     <!-- RMI exposed booking service facade, which operates in an open Hibernate session -->
40 40
 
41 41
 
42
-    <bean id="hibernateInterceptor" class="org.springframework.orm.hibernate3.HibernateInterceptor">
42
+    <bean id="hibernateInterceptor" class="org.springframework.orm.hibernate4.support.OpenSessionInterceptor">
43 43
         <property name="sessionFactory" ref="sessionFactory"/>
44 44
     </bean>
45 45
 
@@ -87,7 +87,7 @@
87 87
     </bean>
88 88
 
89 89
     <bean id="openSessionInViewInterceptor"
90
-          class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">
90
+          class="org.springframework.orm.hibernate4.support.OpenSessionInViewInterceptor">
91 91
         <property name="sessionFactory" ref="sessionFactory"/>
92 92
     </bean>
93 93
 

+ 1
- 1
src/main/resources/hibernate.cfg.xml Просмотреть файл

@@ -2,7 +2,7 @@
2 2
 
3 3
 <!DOCTYPE hibernate-configuration PUBLIC
4 4
         "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
5
-        "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
5
+        "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
6 6
 
7 7
 <hibernate-configuration>
8 8
 

+ 1
- 1
src/main/resources/se/citerus/dddsample/infrastructure/persistence/hibernate/Cargo.hbm.xml Просмотреть файл

@@ -2,7 +2,7 @@
2 2
 
3 3
 <!DOCTYPE hibernate-mapping PUBLIC
4 4
   "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
5
-  "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
5
+  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
6 6
 
7 7
 <hibernate-mapping default-access="field">
8 8
   <class name="se.citerus.dddsample.domain.model.cargo.Cargo" table="Cargo">

+ 1
- 1
src/main/resources/se/citerus/dddsample/infrastructure/persistence/hibernate/CarrierMovement.hbm.xml Просмотреть файл

@@ -2,7 +2,7 @@
2 2
 
3 3
 <!DOCTYPE hibernate-mapping PUBLIC
4 4
   "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
5
-  "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
5
+  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
6 6
 
7 7
 <hibernate-mapping default-access="field">
8 8
   <class name="se.citerus.dddsample.domain.model.voyage.CarrierMovement" table="CarrierMovement" mutable="false">

+ 1
- 1
src/main/resources/se/citerus/dddsample/infrastructure/persistence/hibernate/HandlingEvent.hbm.xml Просмотреть файл

@@ -2,7 +2,7 @@
2 2
 
3 3
 <!DOCTYPE hibernate-mapping PUBLIC
4 4
   "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
5
-  "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
5
+  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
6 6
 
7 7
 <hibernate-mapping default-access="field">
8 8
   <class name="se.citerus.dddsample.domain.model.handling.HandlingEvent" table="HandlingEvent">

+ 1
- 1
src/main/resources/se/citerus/dddsample/infrastructure/persistence/hibernate/Leg.hbm.xml Просмотреть файл

@@ -2,7 +2,7 @@
2 2
 
3 3
 <!DOCTYPE hibernate-mapping PUBLIC
4 4
   "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
5
-  "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
5
+  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
6 6
 
7 7
 <hibernate-mapping default-access="field">
8 8
   <class name="se.citerus.dddsample.domain.model.cargo.Leg" table="Leg" mutable="false">

+ 1
- 1
src/main/resources/se/citerus/dddsample/infrastructure/persistence/hibernate/Location.hbm.xml Просмотреть файл

@@ -2,7 +2,7 @@
2 2
 
3 3
 <!DOCTYPE hibernate-mapping PUBLIC
4 4
   "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
5
-  "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
5
+  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
6 6
 
7 7
 <hibernate-mapping default-access="field">
8 8
   <class name="se.citerus.dddsample.domain.model.location.Location" table="Location">

+ 1
- 1
src/main/resources/se/citerus/dddsample/infrastructure/persistence/hibernate/Voyage.hbm.xml Просмотреть файл

@@ -2,7 +2,7 @@
2 2
 
3 3
 <!DOCTYPE hibernate-mapping PUBLIC
4 4
   "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
5
-  "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
5
+  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
6 6
 
7 7
 <hibernate-mapping default-access="field">
8 8
   <class name="se.citerus.dddsample.domain.model.voyage.Voyage" table="Voyage">

+ 2
- 2
src/test/java/se/citerus/dddsample/infrastructure/persistence/hibernate/CargoRepositoryTest.java Просмотреть файл

@@ -1,13 +1,13 @@
1 1
 package se.citerus.dddsample.infrastructure.persistence.hibernate;
2 2
 
3 3
 import org.hibernate.SessionFactory;
4
-import org.hibernate.classic.Session;
4
+import org.hibernate.Session;
5 5
 import org.junit.Before;
6 6
 import org.junit.Test;
7 7
 import org.junit.runner.RunWith;
8 8
 import org.springframework.beans.factory.annotation.Autowired;
9 9
 import org.springframework.jdbc.core.JdbcTemplate;
10
-import org.springframework.orm.hibernate3.HibernateTransactionManager;
10
+import org.springframework.orm.hibernate4.HibernateTransactionManager;
11 11
 import org.springframework.test.context.ContextConfiguration;
12 12
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
13 13
 import org.springframework.test.context.transaction.TransactionConfiguration;

+ 1
- 1
src/test/java/se/citerus/dddsample/infrastructure/persistence/hibernate/CarrierMovementRepositoryTest.java Просмотреть файл

@@ -6,7 +6,7 @@ import org.junit.Test;
6 6
 import org.junit.runner.RunWith;
7 7
 import org.springframework.beans.factory.annotation.Autowired;
8 8
 import org.springframework.jdbc.core.JdbcTemplate;
9
-import org.springframework.orm.hibernate3.HibernateTransactionManager;
9
+import org.springframework.orm.hibernate4.HibernateTransactionManager;
10 10
 import org.springframework.test.context.ContextConfiguration;
11 11
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
12 12
 import org.springframework.test.context.transaction.TransactionConfiguration;

+ 2
- 2
src/test/java/se/citerus/dddsample/infrastructure/persistence/hibernate/HandlingEventRepositoryTest.java Просмотреть файл

@@ -1,13 +1,13 @@
1 1
 package se.citerus.dddsample.infrastructure.persistence.hibernate;
2 2
 
3 3
 import org.hibernate.SessionFactory;
4
-import org.hibernate.classic.Session;
4
+import org.hibernate.Session;
5 5
 import org.junit.Before;
6 6
 import org.junit.Test;
7 7
 import org.junit.runner.RunWith;
8 8
 import org.springframework.beans.factory.annotation.Autowired;
9 9
 import org.springframework.jdbc.core.JdbcTemplate;
10
-import org.springframework.orm.hibernate3.HibernateTransactionManager;
10
+import org.springframework.orm.hibernate4.HibernateTransactionManager;
11 11
 import org.springframework.test.context.ContextConfiguration;
12 12
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
13 13
 import org.springframework.test.context.transaction.TransactionConfiguration;

+ 1
- 1
src/test/java/se/citerus/dddsample/infrastructure/persistence/hibernate/LocationRepositoryTest.java Просмотреть файл

@@ -5,7 +5,7 @@ import org.junit.Test;
5 5
 import org.junit.runner.RunWith;
6 6
 import org.springframework.beans.factory.annotation.Autowired;
7 7
 import org.springframework.jdbc.core.JdbcTemplate;
8
-import org.springframework.orm.hibernate3.HibernateTransactionManager;
8
+import org.springframework.orm.hibernate4.HibernateTransactionManager;
9 9
 import org.springframework.test.context.ContextConfiguration;
10 10
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
11 11
 import org.springframework.test.context.transaction.TransactionConfiguration;