Commit Graph

148 Commits

Author SHA1 Message Date
Juergen Hoeller
0cf4a2626b same-named unit from persistence.xml overrides in case of conflict with default unit
Issue: SPR-9741
2012-09-06 19:22:50 +02:00
Juergen Hoeller
efabc6bf18 added "jtaTransactionManager" property to Hibernate 4 LocalSessionFactoryBean/Builder
Issue: SPR-9480
2012-07-06 22:48:42 +02:00
Juergen Hoeller
1bd260adaf polishing 2012-02-11 19:15:38 +01:00
Juergen Hoeller
2a0714b41c converted EmptyResultDataAccessException preserves JPA NoResultException as root cause (SPR-9041) 2012-02-08 12:23:15 +01:00
Juergen Hoeller
62e5b9da04 LocalContainerEntityManagerFactoryBean's "persistenceUnitName" applies to "packagesToScan" as well; DefaultPersistenceUnitManager uses containing jar as persistence unit root URL for default unit (SPR-8832) 2012-02-07 20:59:48 +01:00
Juergen Hoeller
4a63a5b3ba fixed "configTimeRegionFactoryHolder" reset 2012-01-15 20:07:49 +01:00
Juergen Hoeller
56d0e67581 added "getConfiguration" accessor to Hibernate 4 LocalSessionFactoryBean (SPR-8961) 2012-01-15 20:07:49 +01:00
Juergen Hoeller
affa733927 Hibernate exception translation covers NonUniqueObjectException to DuplicateKeyException case (SPR-8996) 2012-01-05 17:38:00 +01:00
Chris Beams
41c405998e Convert CRLF=>LF on files missed earlier
Complete pass with `dos2unix` found additional files missed on earlier
related commit.

Issue: SPR-5608
2011-12-22 14:06:44 +01:00
Juergen Hoeller
103c648a92 added protected "isPersistenceUnitOverrideAllowed()" method to DefaultPersistenceUnitManager (SPR-8925) 2011-12-22 13:31:08 +01:00
Juergen Hoeller
07ddedd7bf Hibernate synchronization properly unbinds Session even in case of afterCompletion exception (SPR-8757) 2011-12-22 13:31:08 +01:00
Juergen Hoeller
09ac195f0c do not insist on a "dataSource" reference being set (SPR-8924) 2011-12-22 13:31:08 +01:00
Juergen Hoeller
391434e089 officially deprecated TopLinkJpaDialect in favor of EclipseLink and Spring's EclipseLinkJpaDialect; updated supported version ranges for EclipseLink and OpenJPA 2011-12-22 13:31:07 +01:00
Juergen Hoeller
392247d674 Hibernate 4 LocalSessionFactoryBean implements PersistenceExceptionTranslator interface as well (SPR-8952); consistent extending of HibernateExceptionTranslator for Hibernate 3 as well as Hibernate 4 2011-12-22 13:26:45 +01:00
Juergen Hoeller
eb31528979 added "entityInterceptor" property to Hibernate 4 LocalSessionFactoryBean (SPR-8940) 2011-12-22 13:23:56 +01:00
Juergen Hoeller
e0231438cd fixed "packagesToScan" to avoid additional provider scan (SPR-8936) 2011-12-22 13:19:18 +01:00
Chris Beams
88913f2b23 Convert CRLF (dos) to LF (unix)
Prior to this change, roughly 5% (~300 out of 6000+) of files under the
source tree had CRLF line endings as opposed to the majority which have
LF endings.

This change normalizes these files to LF for consistency going forward.

Command used:

$ git ls-files | xargs file | grep CRLF | cut -d":" -f1 | xargs dos2unix

Issue: SPR-5608
2011-12-21 14:52:47 +01:00
Juergen Hoeller
2fa9ef9f5a do not reset Session itself on "clear()" in order to properly interact with Open Session in View (SPR-8909) 2011-12-12 15:53:18 +00:00
Juergen Hoeller
439b7750d4 fixed "hibernateManagedSession" mode to actually work against Hibernate 4.0 (SPR-8776) 2011-12-11 12:51:57 +00:00
Juergen Hoeller
d050a472a2 added "mappingResources" property to LocalContainerEntityManagerFactoryBean (pointing to orm.xml; SPR-8440) 2011-12-06 18:18:57 +00:00
Juergen Hoeller
27471e0555 added support for JPA 2.1 unwrap method on EntityManagerFactory interface 2011-12-05 21:34:44 +00:00
Juergen Hoeller
2cb287a01b JPA EntityManagerFactoryUtils silently ignores IllegalArgumentExceptions from setHint calls (SPR-7947) 2011-11-28 20:54:37 +00:00
Juergen Hoeller
e6272312a8 allow "packagesToScan" to be optional on LocalSessionFactoryBean (SPR-8812) 2011-11-28 20:48:21 +00:00
Juergen Hoeller
e7d1b5e0ee JDO PersistenceManager synchronization performs close attempt after completion (if necessary; SPR-8846) 2011-11-28 19:38:28 +00:00
Juergen Hoeller
93db3df35b added "namingStrategy" property to Hibernate 4 LocalSessionFactoryBean variant (SPR-8864) 2011-11-28 00:04:55 +00:00
Juergen Hoeller
f50f3d2405 HibernateJpaDialect does NOT expose underlying Session for underlying SessionFactory anymore (SPR-8771) 2011-11-27 23:50:37 +00:00
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
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
4c49cc73b2 avoid NPE in case of no "hibernateProperties" specified 2011-10-11 01:10:07 +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 9e8259198f07e495fd32359c0e0c197bb79a2ca0.

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 2d26c4992e6c7689f67a8e8410ca7d65909b8d01.
2011-10-09 07:55:38 +00:00
Chris Beams
0d43023571 Revert "All SFBuilder setters return 'this' & use varargs"
This reverts commit 0e2ce565c9ef64d97299836a3b979b2cf85de759.
2011-10-09 07:55:33 +00:00
Chris Beams
1a8531b401 Revert "Automatically close SessionFactory objects"
This reverts commit bb4f48dcb3123cfde7b2203aa07517077c3c4261.

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

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

Issue: SPR-8492
2011-10-09 07:55:14 +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