From 6aa0e62597a152bd9086c16d69a604cb6bc6d934 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 1 Apr 2010 11:37:35 +0000 Subject: [PATCH] compatibility with Hibernate 3.5 final --- .../resources/changelog.txt | 11 +++++----- .../HibernateTransactionManagerTests.java | 20 +++++++++---------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/build-spring-framework/resources/changelog.txt b/build-spring-framework/resources/changelog.txt index a27151a8e4..09f0273376 100644 --- a/build-spring-framework/resources/changelog.txt +++ b/build-spring-framework/resources/changelog.txt @@ -3,16 +3,17 @@ SPRING FRAMEWORK CHANGELOG http://www.springsource.org -Changes in version 3.0.2 (2010-03-31) +Changes in version 3.0.2 (2010-04-01) ------------------------------------- * fixed cross-module version ranges in OSGi manifests * fixed contents of org.springframework.web.struts jar * upgraded to Hibernate Validator 4.0.2 and Jackson 1.4.2 * restored compatibility with Servlet 2.4 containers on all VMs -* compatibility with OpenJPA 2.0 (support for persistence.xml versioning) -* compatibility with Hessian 4.0 in terms of exception propagation -* compatibility with JasperReports 3.x in terms of resource management +* compatibility with Hibernate 3.5 final (native and also as a JPA 2.0 provider) +* compatibility with OpenJPA 2.0 (support for JPA 2.0 persistence.xml versioning) +* compatibility with Hessian 4.0 (in terms of exception propagation) +* compatibility with JasperReports 3.x (in terms of resource management) * PropertyEditor lookup fallback works on Google App Engine as well (e.g. for form tags) * fixed TypeDescriptor/MethodParameter toString for all cases in debug log messages * widened AbstractFactoryBean's "getObjectType" signature to return any Class as well @@ -36,7 +37,7 @@ Changes in version 3.0.2 (2010-03-31) * DispatcherPortlet passes handler instance into HandlerExceptionResolver for action exception * DispatcherPortlet applies preHandleRender callbacks in case of action exception as well * UrlPathHelper cuts off trailing servlet-path slashes for root mappings (on WebSphere) -* introduced support for HttpEntity wrapper, containing headers in addition to body value +* introduced support for HttpEntity and ResponseEntity wrappers, adding context to body values * fixed DataBinder's conversion error handling for direct field access with ConversionService * @InitBinder methods support all applicable Spring 3.0 parameter annotations as well * @ExceptionHandler methods consistently receive original exception as thrown by user methods diff --git a/org.springframework.orm/src/test/java/org/springframework/orm/hibernate3/HibernateTransactionManagerTests.java b/org.springframework.orm/src/test/java/org/springframework/orm/hibernate3/HibernateTransactionManagerTests.java index 994995b19b..81a4bf6ea4 100644 --- a/org.springframework.orm/src/test/java/org/springframework/orm/hibernate3/HibernateTransactionManagerTests.java +++ b/org.springframework.orm/src/test/java/org/springframework/orm/hibernate3/HibernateTransactionManagerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,6 @@ import java.sql.Savepoint; import java.util.ArrayList; import java.util.List; import java.util.Properties; - import javax.sql.DataSource; import junit.framework.TestCase; @@ -123,7 +122,7 @@ public class HibernateTransactionManagerTests extends TestCase { } }; lsfb.afterPropertiesSet(); - final SessionFactory sfProxy = (SessionFactory) lsfb.getObject(); + final SessionFactory sfProxy = lsfb.getObject(); HibernateTransactionManager tm = new HibernateTransactionManager(); tm.setJdbcExceptionTranslator(new SQLStateSQLExceptionTranslator()); @@ -345,7 +344,7 @@ public class HibernateTransactionManagerTests extends TestCase { } }; lsfb.afterPropertiesSet(); - final SessionFactory sfProxy = (SessionFactory) lsfb.getObject(); + final SessionFactory sfProxy = lsfb.getObject(); HibernateTransactionManager tm = new HibernateTransactionManager(); tm.setJdbcExceptionTranslator(new SQLStateSQLExceptionTranslator()); @@ -422,7 +421,7 @@ public class HibernateTransactionManagerTests extends TestCase { } }; lsfb.afterPropertiesSet(); - final SessionFactory sfProxy = (SessionFactory) lsfb.getObject(); + final SessionFactory sfProxy = lsfb.getObject(); PlatformTransactionManager tm = new HibernateTransactionManager(sfProxy); final TransactionTemplate tt = new TransactionTemplate(tm); @@ -776,7 +775,7 @@ public class HibernateTransactionManagerTests extends TestCase { } }; lsfb.afterPropertiesSet(); - final SessionFactory sfProxy = (SessionFactory) lsfb.getObject(); + final SessionFactory sfProxy = lsfb.getObject(); PlatformTransactionManager tm = new HibernateTransactionManager(sfProxy); TransactionTemplate tt = new TransactionTemplate(tm); @@ -860,7 +859,7 @@ public class HibernateTransactionManagerTests extends TestCase { } }; lsfb.afterPropertiesSet(); - final SessionFactory sfProxy = (SessionFactory) lsfb.getObject(); + final SessionFactory sfProxy = lsfb.getObject(); PlatformTransactionManager tm = new HibernateTransactionManager(sfProxy); TransactionTemplate tt = new TransactionTemplate(tm); @@ -1657,7 +1656,7 @@ public class HibernateTransactionManagerTests extends TestCase { props.setProperty("hibernate.cache.provider_class", NoCacheProvider.class.getName()); lsfb.setHibernateProperties(props); lsfb.afterPropertiesSet(); - final SessionFactory sf = (SessionFactory) lsfb.getObject(); + final SessionFactory sf = lsfb.getObject(); HibernateTransactionManager tm = new HibernateTransactionManager(); tm.setSessionFactory(sf); @@ -1698,7 +1697,7 @@ public class HibernateTransactionManagerTests extends TestCase { props.setProperty("hibernate.cache.provider_class", NoCacheProvider.class.getName()); lsfb.setHibernateProperties(props); lsfb.afterPropertiesSet(); - final SessionFactory sf = (SessionFactory) lsfb.getObject(); + final SessionFactory sf = lsfb.getObject(); HibernateTransactionManager tm = new HibernateTransactionManager(); tm.setSessionFactory(sf); @@ -1751,9 +1750,10 @@ public class HibernateTransactionManagerTests extends TestCase { Properties props = new Properties(); props.setProperty("hibernate.dialect", HSQLDialect.class.getName()); props.setProperty("hibernate.cache.provider_class", NoCacheProvider.class.getName()); + props.setProperty("hibernate.temp.use_jdbc_metadata_defaults", "false"); lsfb.setHibernateProperties(props); lsfb.afterPropertiesSet(); - final SessionFactory sf = (SessionFactory) lsfb.getObject(); + final SessionFactory sf = lsfb.getObject(); HibernateTransactionManager tm = new HibernateTransactionManager(); tm.setSessionFactory(sf);