Commit Graph

142 Commits

Author SHA1 Message Date
Juergen Hoeller
e118086bd1 Annotation post-processors clear old InjectionMetadata registrations on refresh
Issue: SPR-12526
(cherry picked from commit 809ee0d)
2014-12-29 18:56:44 +01:00
Juergen Hoeller
dc15070877 Consistent bridge method handling in annotation post-processors
Issue: SPR-12495
2014-12-22 16:42:47 +01:00
Juergen Hoeller
d97add075a Consistent bridge method handling in annotation post-processors
Issue: SPR-12495
(cherry picked from commit 03d4e1b)
2014-12-07 23:24:02 +01:00
Juergen Hoeller
f691618967 Polishing 2014-11-01 13:00:54 +01:00
Juergen Hoeller
4729483804 HibernateJpaSessionFactoryBean is compatible with Hibernate 4.3 as well now
Issue: SPR-12401
(cherry picked from commit bf5739c)
2014-11-01 12:59:15 +01:00
Juergen Hoeller
d3ec48f490 PersistenceAnnotationBeanPostProcessor correctly detects JPA 2.1 synchronization attribute
Issue: SPR-12396
(cherry picked from commit a181b40)
2014-11-01 12:58:38 +01:00
Juergen Hoeller
15c8987cc4 Polishing 2014-10-22 01:10:01 +02:00
Juergen Hoeller
578c3dd853 Polishing
(cherry picked from commit d6be433)
2014-10-07 00:53:01 +02:00
Juergen Hoeller
9758bc7833 Consistent reset of resource holders on doBegin failure
Issue: SPR-12280
(cherry picked from commit e58b33a)
2014-10-07 00:06:49 +02:00
Juergen Hoeller
c74bad6e07 Remove outdated references to ContextLoaderServlet
Issue: SPR-7725
(cherry picked from commit 69998e3)
2014-10-01 01:14:57 +02:00
Juergen Hoeller
29abca5399 Explicit exclusion of bridge methods in annotation post-processors (for Java 8 compatibility)
Issue: SPR-12187
(cherry picked from commit f4219ca)
2014-09-19 00:11:44 +02:00
Juergen Hoeller
8fb7b694dd PersistenceAnnotationBeanPostProcessor defensively handles BeanDefinition access for extended EntityManagers
Issue: SPR-8834
(cherry picked from commit 592e344)
2014-08-22 00:01:39 +02:00
Juergen Hoeller
e2d71a8ccd Polishing 2014-08-11 15:45:54 +02:00
Juergen Hoeller
77406eded8 Refined DefaultJpaDialect's InvalidIsolationLevelException message
Issue: SPR-8325
(cherry picked from commit af13310)
2014-07-03 22:34:14 +02:00
Juergen Hoeller
c16032b98a Consistent declaration of private static final logger variables
Issue: SPR-11905
(cherry picked from commit 18131bf)
2014-07-01 12:09:29 +02:00
Juergen Hoeller
9f967b1d81 SharedEntityManagerCreator immediately throws TransactionRequiredException on persist, merge, remove etc (as required by JPA spec)
Issue: SPR-11923
(cherry picked from commit 045d735)
2014-07-01 11:59:11 +02:00
Juergen Hoeller
f94ded830d Consistent use of ClassUtils.forName instead of class.getClassLoader().loadClass
Issue: SPR-11780
(cherry picked from commit 551950c)
2014-05-15 14:40:15 +02:00
Stephane Nicoll
4cd818b9e4 Harmonize log configuration
Prior to this commit, the codebase was using a mix of log4j.xml
and log4j.properties for test-related logging configuration. This
can be an issue as log4j takes the xml variant first when looking
for a default bootstrap configuration.

In practice, some modules declaring the properties variant were
taking the xml variant configuration from another module.

The general structure of the configuration has also been
harmonized to provide a standard console output as well as an
easy way to enable trace logs for the current module.
2014-03-20 09:43:29 -07:00
Juergen Hoeller
a8577da30c DeferredQueryInvocationHandler explicitly closes its EntityManager on garbage collection
Includes javadoc revision covering all supported EntityManager types as of JPA 2.1.

Issue: SPR-11451
2014-03-17 13:53:38 +01:00
Sam Brannen
c335e99e3f Remove trailing whitespace from source code 2014-02-08 17:30:39 +01:00
Juergen Hoeller
99f9dce14a Fixed all List return types to ? instead of Object, restoring backwards compatibility with existing Spring 3.2.x based code and allowing easier casts to other element types
Also declaring findByExample generically based on the given example object's type.

Issue: SPR-11402
2014-02-07 17:39:55 +01:00
Juergen Hoeller
2410e29dda Introduced OpenSessionInterceptor as a streamlined alternative to HibernateInterceptor
Issue: SPR-9028
2014-02-06 22:13:52 +01:00
Sam Brannen
63e023173b Polish Hibernate support and tests
- Fix Javadoc in HibernateTemplate so that it compiles in Eclipse.
 - Suppress generics warnings in HibernateTemplateTests.
 - Remove unnecessary deprecation warning suppression in constructor for
   LocalSessionFactoryBuilder.
2014-01-28 15:41:42 +01:00
Juergen Hoeller
500d0da67d Polishing 2014-01-27 22:41:35 +01:00
Juergen Hoeller
bf9702294d Polishing
Issue: SPR-11291
2014-01-27 21:38:20 +01:00
Juergen Hoeller
79e17dbfa0 Introduced HibernateTemplate for Hibernate 4 as a migration helper
Note that this variant of HibernateTemplate is stripped down in terms of Session management options and just provides a current-session style with a fallback to a temporary session-per-operation.  Furthermore, in the latter fallback mode, only read operations are supported, just like with a JPA EntityManager.

Issue: SPR-11291
2014-01-27 21:37:52 +01:00
Juergen Hoeller
56b7d7a94a Consistently declare @SuppressWarnings("serial") instead of dummy serialVersionUID 2014-01-26 00:11:11 +01:00
Juergen Hoeller
42db41e007 Polishing 2014-01-23 20:59:53 +01:00
Sam Brannen
227320dc81 Suppress warnings in HibernateTransactionManagerTests 2014-01-22 20:53:55 +01:00
Juergen Hoeller
4ae893e110 DefaultPersistenceUnitManager detects META-INF/orm.xml for scanned default unit
Note: A default orm.xml file is only being used when not co-located with a persistence.xml file, since we assume it is intended for use with that persistence.xml file only then.

Issue: SPR-11234
Issue: SPR-11260
2014-01-21 15:04:36 +01:00
Juergen Hoeller
88730bdaa5 Added info-level logging for default unit detection
Issue: SPR-11333
2014-01-20 21:48:20 +01:00
Juergen Hoeller
547646de6d Polishing 2014-01-13 22:25:34 +01:00
Juergen Hoeller
b1460742c3 InjectionMetadata caching per bean name needs to refresh when bean class changes
Issue: SPR-11246
2013-12-19 23:49:31 +01:00
Juergen Hoeller
479d073f1b Adapted orm.hibernate4 and HibernateJpaVendorAdapter to avoid deprecation warnings on Hibernate 4.3 final
Issue: SPR-11240
2013-12-17 16:46:58 +01:00
Juergen Hoeller
92816492ed Established well-defined registration order for Hibernate package scanning
Issue: SPR-7742
2013-12-10 16:47:17 +01:00
Phillip Webb
043a41e382 Consistent whitespace after imports
Update code to have a consistent number of new-line characters after
import statements.
2013-11-26 15:14:43 -08:00
Phillip Webb
59002f2456 Fix remaining compiler warnings
Fix remaining Java compiler warnings, mainly around missing
generics or deprecated code.

Also add the `-Werror` compiler option to ensure that any future
warnings will fail the build.

Issue: SPR-11064
2013-11-25 12:52:42 -08:00
Phillip Webb
d9c4470461 Upgrade to HSQLDB 2.3.1
Replace `hsqldb:hsqldb:1.8.0.10` with `org.hsqldb:hsqldb:2.3.1` and
fix breaking tests.

Issue: SPR-10947
2013-11-21 15:48:17 -08:00
Rossen Stoyanchev
5d8fac86d7 Add timeout async request handling to OSIV components
This change adds async web request timeout handling to OSIV filters
and interceptors to ensure the session or entity manager is released.

Issue: SPR-10874
2013-10-30 22:54:21 -04:00
Juergen Hoeller
4675bc4e0c Cache InjectionMetadata per bean name instead of per Class, if possible
Issue: SPR-11027
2013-10-26 14:03:11 +02:00
Juergen Hoeller
393cfcff40 Cache InjectionMetadata per bean name instead of per Class
Issue: SPR-11027
2013-10-26 02:21:38 +02:00
Juergen Hoeller
da0128f120 Javadoc cleanup for Hibernate 3.6+ 2013-08-20 19:16:44 +02:00
Juergen Hoeller
a65bc3851b Introduced local support for Hibernate 3.6 and 4.x exception translation to HibernateJpaDialect
Since Hibernate 3.6 and 4.x differ in exception handling now, this change makes HibernateJpaDialect independent from orm.hibernate3 now and avoids introducing a conditional dependency on orm.hibernate4.

Issue: SPR-10815
2013-08-20 19:10:39 +02:00
Juergen Hoeller
3b211335c7 Explicit support for Hibernate 3.6's QueryTimeoutException, PessimisticLockException and OptimisticLockException
Issue: SPR-10815
2013-08-20 19:05:23 +02:00
Juergen Hoeller
f3b223034d Explicit support for JPA 2.0's QueryTimeoutException, LockTimeoutException and PessimisticLockException
Issue: SPR-10815
2013-08-20 19:02:02 +02:00
Juergen Hoeller
219eeb2369 Added JPA 2.0 compliant "sharedCacheMode" and "validationMode" properties to DefaultPersistenceUnitManager and LocalContainerEntityManagerFactoryBean
Issue: SPR-10764
2013-08-02 17:43:34 +02:00
Juergen Hoeller
a841923f12 Scan for JPA 2.1 Converter annotation as well
Issue: SPR-10799
2013-08-02 11:08:30 +02:00
Juergen Hoeller
85c9ed005d Fixed misunderstanding with respect to excludeUnlistedClasses default in JPA 2.0
Issue: SPR-10767
(cherry picked from commit d0948f1)
2013-08-01 00:20:21 +02:00
Juergen Hoeller
2e4eb9fc10 Resource-based PlatformTransactionManager implementations defensively catch Throwable in doBegin in order to reliably close resource in case of OutOfMemoryError
Issue: SPR-10755
2013-07-24 15:29:10 +02:00
Nick Williams
7ad540d97b Parse JPA <exclude-unlisted-classes> correctly
Fix PersistenceUnitReader to correctly read <exclude-unlisted-classes>
in both JPA 1.0 and 2.0 persistence.xml files.

Prior to this commit PersistenceUnitReader would set the value of
excludeUnlistedClasses to true when a <exclude-unlisted-classes> element
was present, regardless of its value.

The following rules are now used when parsing:

- If the <exclude-unlisted-classes> element is missing the appropriate
  default value is set (based on the JPA version).

- If an empty <exclude-unlisted-classes/> element is found the
  excludeUnlistedClasses property is set to true.

- Otherwise the value of the <exclude-unlisted-classes> element is used
  to set the excludeUnlistedClasses property.

Issue: SPR-10767
2013-07-22 12:25:40 -07:00