Commit Graph

192 Commits

Author SHA1 Message Date
Rossen Stoyanchev 63e235f215 SPR-8750 Refine 'Content-Type' update in MockHttpServletRequest/Response.
The initial solution kept these three in full sync at all times:
contentType field, characterEncoding field, 'Content-Type' header.
That is correct behavior, however it breaks existing tests that rely
on contentType and characterEncoding being equal to exactly what 
they were set to.

For example, consider:
response.setContentType("text/plain");
response.setCharacterEncoding("UTF-8");

Ideally both contentType and the 'Content-Type' header would now be
"text/plain;charset=UTF-8". However, existing tests would expect 
that contentType is equal to "text/plain".

To avoid breaking existing tests, contentType and characterEncoding
will continue to be equal to exactly what they were set to while
the 'Content-Type' header will always include both the content 
type and the charset.

The only exception to this rule is when a 'Content-Type' header
is set explicitly, the contentType and characterEncoding fields will 
be updated accordingly, possibly overriding the existing values.
2011-11-17 15:07:15 +00:00
Rossen Stoyanchev 7918810366 SPR-8750 Update MockHttpServletRequest/Response handling of contentType.
The Content-Type header and the contentType field in HttpServletRequest/Response
are now always in sync. When a header is added the contentType field is updated
as well and vice versa. 

Similarly when the Content-Type header or the contentType field includes a charset 
field, the character encoding is updated and vice versa.
2011-11-16 23:28:48 +00:00
Juergen Hoeller 0dfb617d8a refer to correct openSession() method for Hibernate 4.0 (SPR-8776) 2011-10-20 10:23:49 +00:00
Chris Beams 5360bd899d Fix warnings and polish LocalSessionFactoryBuilder 2011-10-13 03:56:51 +00:00
Juergen Hoeller 12c1f47733 extended LocalSessionFactoryBean options for Hibernate 4; factored out LocalSessionFactoryBuilder 2011-10-11 22:05:19 +00:00
Juergen Hoeller ba2c8fc592 deprecated JdoTemplate and co in favor of native PersistenceManager usage 2011-10-11 16:48:08 +00:00
Juergen Hoeller feed594ba4 deprecated JpaTemplate and co in favor of native EntityManager usage 2011-10-11 16:24:32 +00:00
Chris Beams 9be6ddc946 Include Hibernate 4.x in Eclipse classpath 2011-10-11 05:31:31 +00:00
Juergen Hoeller cfb380d653 fixed unbind failure through appropriate guard 2011-10-11 02:08:26 +00:00
Juergen Hoeller d54922642c made compilation work with Hibernate 4.0 next to Hibernate 3.x 2011-10-11 01:53:43 +00:00
Juergen Hoeller 3032b214c6 avoid hard JPA 2.0 dependency 2011-10-11 01:31:22 +00:00
Juergen Hoeller 6aaf7fefde removed Hibernate EntityManager 4.0 dependency since it is not needed for compilation and not for standard runs of the test suite either 2011-10-11 01:22:20 +00:00
Juergen Hoeller 4c49cc73b2 avoid NPE in case of no "hibernateProperties" specified 2011-10-11 01:10:07 +00:00
Juergen Hoeller e1a6bb2d2e committed initial Hibernate 4.0 support 2011-10-11 01:08:41 +00:00
Juergen Hoeller 339c57e41a polishing 2011-10-11 01:00:31 +00:00
Juergen Hoeller 37c601c8dd HibernateJpaDialect exposes underlying Session for underlying SessionFactory 2011-10-11 00:58:47 +00:00
Juergen Hoeller 0ff83606df committed initial Hibernate 4.0 support 2011-10-11 00:53:01 +00:00
Chris Beams 3bb01ee68b Revert "Introduce (Annotation)SessionFactoryBuilder types"
This commit and the several before it back out the
SessionFactoryBuilder and AnnotationSessionFactoryBuilder types
recently introduced in 3.1 M2. This is in light of the impending
release of Hibernate 4.0 GA and our own support for it the new
org.springframework.orm.hibernate4 package (not yet committed).

This new package will have a similar, but far simpler, arrangement of
a single LocalSessionFactoryBuilder and LocalSessionFactoryBean pair.
Hibernate 3.x support will remain largely as-is, however the
HibernateTransactionManager introduced with SPR-8076 will remain.

This reverts commit 9e8259198f.

Issue: SPR-8066, SPR-7936, SPR-8076, SPR-8098, SPR-8096, SPR-7387
2011-10-09 07:55:52 +00:00
Chris Beams 25796448f6 Revert "removed double javadoc"
This reverts commit 2d26c4992e.
2011-10-09 07:55:38 +00:00
Chris Beams 0d43023571 Revert "All SFBuilder setters return 'this' & use varargs"
This reverts commit 0e2ce565c9.
2011-10-09 07:55:33 +00:00
Chris Beams 1a8531b401 Revert "Automatically close SessionFactory objects"
This reverts commit bb4f48dcb3.

Issue: SPR-8114
2011-10-09 07:55:28 +00:00
Chris Beams b82d5ae8da Revert "Implement SessionFactoryImplementor in SF proxies"
This reverts commit 08ccd19c76.

Issue: SPR-8469
2011-10-09 07:55:21 +00:00
Chris Beams 363e08df22 Revert "Auto-unwrap SessionFactoryBuilder-created proxies"
This reverts commit 7903d6489f.

Issue: SPR-8492
2011-10-09 07:55:14 +00:00
Chris Beams 8759b20e46 Include javax.jdo 3.x in spring-orm template.mf
Prior to this change, spring-orm/template.mf was exclusive of javax.jdo
3.0.0. Now, after local testing against the newly-released jdo-api 3.0
jar, the template has been updated to allow for use in OSGi containers.
Note that actually updating build dependency descriptors to JDO 3.0 such
that the framework is continually tested against this version is covered
by a separate issue (SPR-8668).

Issue: SPR-8667, SPR-8655
2011-09-04 01:06:35 +00:00
Sam Brannen 1de71c6e37 [SPR-8222] Upgraded to JUnit 4.9. 2011-08-30 13:16:12 +00:00
Juergen Hoeller ef04ccca17 allow for Hibernate 4.0 2011-08-18 23:14:42 +00:00
Sam Brannen 87dad65ff0 [SPR-8622] Upgraded to JUnit 4.8.2 2011-08-18 16:06:31 +00:00
Juergen Hoeller 49e61d2680 overridden @PersistenceContext annotations on subclass methods are being processed correctly (SPR-8594) 2011-08-12 13:54:17 +00:00
Chris Beams 9f4a46e24c Auto-unwrap SessionFactoryBuilder-created proxies
SessionFactory proxies created by (Annotation)SessionFactoryBuilder now
implement InfrastructureProxy to ensure they are automatically unwrapped
for transaction resource management purposes.

Issue: SPR-8492
2011-07-30 18:05:34 +00:00
Juergen Hoeller 8bae96bdd7 fixed HibernateMultiEntityManagerFactoryIntegrationTests failure 2011-07-26 00:59:41 +00:00
Juergen Hoeller d8f29cb746 polishing 2011-07-26 00:46:39 +00:00
Juergen Hoeller 83df082930 moved OpenSessionInViewTests back to orm module 2011-07-26 00:46:07 +00:00
Juergen Hoeller 6ad8a4a79a fixed OpenEntityManagerInViewTests through the addition of a local copy of our Servlet API mocks; restoredOpenPersistenceManagerInViewTests 2011-07-26 00:38:05 +00:00
Juergen Hoeller c31b17fef2 JpaTransactionManager etc can find EntityManagerFactory by "persistenceUnitName" property now, falling back to retrieval of a unique EntityManagerFactory bean by type (analogous to @PersistenceUnit / @PersistenceContext) 2011-07-25 12:28:16 +00:00
Juergen Hoeller 637ce0f01c removed double javadoc 2011-07-25 12:27:30 +00:00
Juergen Hoeller aeacf9278f JpaTransactionManager etc can find EntityManagerFactory by "persistenceUnitName" property now, falling back to retrieval of a unique EntityManagerFactory bean by type (analogous to @PersistenceUnit / @PersistenceContext) 2011-07-25 12:26:27 +00:00
Juergen Hoeller 676ab5f0b1 restored OpenEntityManagerInViewTests 2011-07-25 12:15:33 +00:00
Juergen Hoeller 1b26b4744f fixed ignored test 2011-07-21 10:34:32 +00:00
Chris Beams 4f89459c3d Polish whitespace on JpaTransactionManager 2011-07-18 21:23:43 +00:00
Juergen Hoeller 65ad44dadc polishing 2011-07-18 20:50:35 +00:00
Juergen Hoeller 81a27ce484 an EntityManagerFactoryBean is only deserializable through a SerializedEntityManagerFactoryBeanReference 2011-07-11 13:50:34 +00:00
Chris Beams 5aa24af126 Implement SessionFactoryImplementor in SF proxies
SessionFactoryBuilderSupport implementations create DisposableBean
proxies for SessionFactory objects created using #buildSessionFactory.

Prior to this change, these proxies create problems when working agaist
SessionFactoryUtils.getDataSource(SessionFactory), because this method
expects the given SessionFactory to implement Hibernate's
SessionFactoryImplementor interface (which the stock SessionFactoryImpl
does).

With this change, the DisposableBean proxies created by SFBuilders
now also implement SessionFactoryImplementor to satisfy this and
probably other such cases.

Issue: SPR-8469
2011-07-07 19:42:07 +00:00
Juergen Hoeller 889f8886f6 support for Hibernate 4.0 as a JPA provider 2011-06-14 22:45:29 +00:00
Juergen Hoeller 695f1613b2 refined EntityManagerFactory proxy exception (SPR-4383) 2011-06-14 15:02:40 +00:00
Juergen Hoeller c60511bf04 shortened build properties "org.junit.version" to "junit.version" and "org.testng.version" to "testng.version"; reverted SLF4J version back to 1.5.3 (for Hibernate 3.3.1 compatibility) 2011-06-09 09:58:15 +00:00
Juergen Hoeller 9f3026a4e6 prefer use of varargs over arrays in bean property setters (for programmatic consumption) 2011-06-09 09:15:11 +00:00
Juergen Hoeller fc11102e34 updated dependencies 2011-06-08 22:51:21 +00:00
Juergen Hoeller df460f4486 added "packagesToScan" feature to LocalContainerEntityManagerFactoryBean (avoiding persistence.xml) 2011-06-07 16:56:47 +00:00
Juergen Hoeller a966cba97f fixed JPA 2.0 timeout hints to correctly specify milliseconds (SPR-8086) 2011-05-29 20:52:03 +00:00
Chris Beams f30b7e3125 Fix generics and serialization warnings 2011-05-06 19:00:14 +00:00