Commit Graph

229 Commits

Author SHA1 Message Date
Juergen Hoeller 192462902e Consistent support for Java 8 default methods (in interfaces implemented by user classes)
Covers ReflectionUtils.doWithMethods as well as affected annotation post-processors.
Includes an extension of MethodMetadata for the detection of @Bean default methods.

Issue: SPR-12822
Issue: SPR-10919
2015-03-19 16:50:15 +01:00
Sam Brannen ce68c4dccb Polish Javadoc in MutablePersistenceUnitInfo
- Using Javadoc syntax for code formatting instead of JIRA's.
2015-03-17 23:10:56 +01:00
Juergen Hoeller 4f1d9fddc8 Explicit documentation on MutablePersistenceUnitInfo's addManagedPackage
Issue: SPR-12821
2015-03-17 21:28:19 +01:00
Juergen Hoeller 8a5e47a043 Explicit note on change of read-only handling in 4.1
Issue: SPR-8959
(cherry picked from commit 0280a2a)
2015-03-11 22:09:38 +01:00
Juergen Hoeller 809ee0d350 Annotation post-processors clear old InjectionMetadata registrations on refresh
Issue: SPR-12526
2014-12-23 14:02:00 +01:00
Sebastien Deleuze 4308a0404c Refine EclipseLink SQL logging
Issue: SPR-12528
2014-12-15 11:30:36 +01:00
Sam Brannen 33fca4e7ae Fix and polish Javadoc for JpaTransactionManager 2014-12-08 17:21:59 +01:00
Juergen Hoeller 03d4e1bc22 Consistent bridge method handling in annotation post-processors
Issue: SPR-12490
Issue: SPR-12495
2014-12-07 20:51:35 +01:00
Juergen Hoeller afc77ff525 AnnotationBeanPostProcessors defensively catch and translate NoClassDefFoundErrors from class introspection
Issue: SPR-12461
2014-11-22 21:34:59 +01:00
Juergen Hoeller bf5739c56b HibernateJpaSessionFactoryBean is compatible with Hibernate 4.3 as well now
Issue: SPR-12401
2014-10-31 15:07:21 +01:00
Juergen Hoeller e9f53c6ddf Polishing
Issue: SPR-12396
2014-10-30 15:17:51 +01:00
Juergen Hoeller a181b40e39 PersistenceAnnotationBeanPostProcessor correctly detects JPA 2.1 synchronization attribute
Issue: SPR-12396
2014-10-30 15:15:34 +01:00
Juergen Hoeller 1146d5ba1d Polishing 2014-10-29 22:44:59 +01:00
Juergen Hoeller 33d85d2a13 EclipseLinkJpaDialect preserves lazy retrieval of UnitOfWork as far as possible
Issue: SPR-12319
2014-10-28 16:39:19 +01:00
Juergen Hoeller 1ad7a03357 Polishing 2014-10-21 18:49:03 +02:00
Juergen Hoeller e4753c9f8b EclipseLinkJpaDialect's getJdbcConnection uses a lazy ConnectionHandle (allowing for deferred internal transaction begin)
Issue: SPR-7753
2014-10-21 18:48:52 +02:00
Juergen Hoeller 8325b10080 Consistent formatting of license headers, package javadocs, and import declarations 2014-10-21 01:44:07 +02:00
Juergen Hoeller bd5383e4f9 OpenJpaDialect passes custom isolation level on to OpenJPA's JDBCFetchPlan configuration
Issue: SPR-12319
2014-10-16 17:24:58 +02:00
Juergen Hoeller de11cd8791 EclipseLinkJpaDialect passes custom isolation level on to EclipseLink's DatabaseLogin configuration
Issue: SPR-12319
2014-10-14 14:33:09 +02:00
Juergen Hoeller d6be433501 Polishing 2014-10-07 00:43:33 +02:00
Juergen Hoeller e58b33a593 Consistent reset of resource holders on doBegin failure
Issue: SPR-12280
2014-10-06 20:31:45 +02:00
Juergen Hoeller 69998e3d50 Remove outdated references to ContextLoaderServlet
Issue: SPR-7725
(cherry picked from commit b45d08f)
2014-10-01 01:02:56 +02:00
Juergen Hoeller 62340d6ccf Only release rolled-back database savepoints during managed nested transaction
Issue: SPR-12228
2014-09-22 17:29:10 +02:00
Juergen Hoeller f4219ca06b Consistent exclusion of bridge methods in annotation post-processors (for Java 8 compatibility)
Issue: SPR-12187
2014-09-18 23:45:42 +02:00
Juergen Hoeller 5452144dab HibernateJpaDialect only resets Connection read-only status if actually necessary (avoiding side effects)
Issue: SPR-8959
Issue: SPR-12118
2014-09-01 17:47:48 +02:00
Stephane Nicoll f5cf3cd56e polishing 2014-08-21 10:14:41 +02:00
Juergen Hoeller 592e344191 PersistenceAnnotationBeanPostProcessor defensively handles BeanDefinition access for extended EntityManagers
Issue: SPR-8834
2014-08-20 11:14:51 +02:00
Juergen Hoeller 562916b69c Consistent getJpaDialect() narrowing (along with HibernateJpaVendorAdapter)
Issue: SPR-8959
Issue: SPR-11942
2014-08-09 17:10:34 +02:00
Juergen Hoeller cbda722329 HibernateJpaDialect prepares JDBC Connection by default if on Hibernate EntityManager 4 (with its connection release mode ON_CLOSE)
Analogous to HibernateTransactionManager, there is a "prepareConnection" flag on HibernateJpaDialect which allows for overriding the actual mode of operation. This is easily accessible from HibernateJpaVendorAdapter now which declares HibernateJpaDialect from its getJpaDialect() method.

Issue: SPR-8959
Issue: SPR-11942
2014-08-09 17:09:42 +02:00
Juergen Hoeller af13310da0 Refined DefaultJpaDialect's InvalidIsolationLevelException message
Issue: SPR-8325
2014-07-03 22:24:36 +02:00
Juergen Hoeller 0232739293 Javadoc coverage of package metadata detection (supported for Hibernate, not needed for EclipseLink and OpenJPA)
Issue: SPR-10910
2014-06-29 17:36:26 +02:00
Juergen Hoeller 045d7357d5 SharedEntityManagerCreator immediately throws TransactionRequiredException on persist, merge, remove etc (as required by JPA spec)
Issue: SPR-11923
2014-06-27 19:58:20 +02:00
Juergen Hoeller 591f79514d Spring's default JPA persistence unit exposes package metadata as well (currently only supported with Hibernate)
Issue: SPR-10910
2014-06-26 11:25:50 +02:00
Juergen Hoeller 18131bf611 Consistent declaration of private static final logger variables
Issue: SPR-11905
2014-06-24 14:02:05 +02:00
Juergen Hoeller 551950cdc0 Consistent use of ClassUtils.forName instead of class.getClassLoader().loadClass
Issue: SPR-11780
2014-05-15 09:56:11 +02:00
Stephane Nicoll 43e4dbadfe Revert merge commit e246010df7 2014-05-06 16:30:13 +02:00
Stephane Nicoll e18308851d polishing
Updating pull request for SPR-9541
2014-05-06 16:04:39 +02:00
Jan Stamer 371e3a7ac0 Add exception translator for EclipseLink exceptions
Issue: SPR-9541
2014-05-06 16:01:51 +02: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
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
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
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 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
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
Oliver Gierke b552c6e1d8 Fixed potential NPE in SharedEntityManagerCreator
Fix SharedEntityManagerCreator.createSharedEntityManager to correctly
forward an empty array in case that EntityManagerFactoryInfo returns
null from getEntityManagerInterface().

Previously the var-args invocation had turned null into an array with
a null value which caused a NullPointerException in the call to
Proxy.newProxyInstance() further down the call stack.

Issue: SPR-10678
2013-07-19 13:44:39 -07:00
Carson McDonald ae74a2158a Fix typo {explictly => explicitly}
- cherry-pick of pull request #257, which originally applied to 3.2.x
2013-05-31 08:22:36 +02:00
Rob Winch 9468548116 Add @Override to remaining source files
Issue: SPR-10130
2013-05-13 17:04:56 -05:00
Juergen Hoeller 2a44228b98 Consistent use of <pre class="code">
Issue: SPR-8108
2013-05-07 21:31:26 +02:00
Juergen Hoeller 942cab4d87 OpenJpaDialect javadoc makes no reference to TopLink anymore 2013-03-30 01:39:10 +01:00
Juergen Hoeller 6e6446cc7c EclipseLinkJpaDialect uses JPA 2.0's EntityManager unwrap method now for retrieving the underlying UnitOfWork/Connection 2013-03-30 01:36:29 +01:00
Juergen Hoeller 184455d630 Upgraded to Hibernate 4.2.0
HibernateJpaDialect's HibernateConnectionHandle does not call close() for Hibernate 4.x anymore, since on 4.2, the exposed Connection handle isn't a "borrowed connection" wrapper but rather the actual underlying Connection - with a close() call immediately returning the Connection to the pool and making the local handle invalid for further use within the transaction.

Also using JPA 2.0's EntityManager unwrap method now for retrieving the underlying Hibernate Session.

Issue: SPR-10395
2013-03-30 01:34:18 +01:00
Juergen Hoeller 9caa514c69 Removed deprecated JpaTemplate and JpaInterceptor classes; dropped unused EntityManager(Factory)Plus mechanism 2013-03-29 13:18:33 +01:00
Juergen Hoeller 7ceb02257e Removed deprecated JdoTemplate and JdoInterceptor classes; formally requiring JDO 3.0+ now 2013-03-29 13:17:13 +01:00
Juergen Hoeller cc0ea4a824 Removed deprecated saveOrUpdateAll method from HibernateOperations 2013-03-29 00:19:43 +01:00
Juergen Hoeller 541f3edd9e Fully upgraded orm.hibernate3 package to require Hibernate 3.6+ now 2013-03-29 00:19:02 +01:00
Juergen Hoeller ff160f9aeb JPA 2.1 support, in particular for SynchronizationType.UNSYNCHRONIZED
In the course of this effort, our joinTransaction() support has been overhauled to work for shared EntityManagers as well, since an unsynchronized shared EntityManager will nevertheless be scoped for the current transaction but not automatically join it (as per the JPA 2.1 spec). In the JTA case, we'll simply create an unsynchronized target EntityManager and will upgrade it to a synchronized one (later in the same transaction, if necessary) through an implicit joinTransaction() call. In the JpaTransactionManager case, we'll unbind the primary target EntityManager and will expose an unsynchronized EntityManager instead, upgrading it the same way as with JTA, with the primary EntityManager in that case just serving as a vehicle for transaction begin/commit/rollback calls.

For extended EntityManagers, we've just added further combinations to the existing variants: application-managed EntityManagers which may nevertheless auto-join transactions (EntityManagerFactory.createEntityManager with SynchronizationType.SYNCHRONIZED), and container-managed EntityManagers which might opt for not auto-joining transactions (@PersistenceContext with synchronizationType=UNSYNCHRONIZED).

Issue: SPR-8194
2013-03-27 14:46:23 +01:00
Juergen Hoeller ceb9a05ecb General JPA 2.0+ requirement; upgraded build and tests to EclipseLink 2.4, OpenJPA 2.2, Hibernate 3.6 2013-03-19 18:34:04 +01:00
Juergen Hoeller 30a9dad5fe Removed iBATIS SQL Maps support 2013-03-19 15:03:38 +01:00
Chris Beams ce4be3b46b Merge branch '3.2.x' into master
Conflicts:
	gradle.properties
	spring-beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java
	spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheManagerFactoryBean.java
	spring-core/src/main/java/org/springframework/core/convert/support/StringToEnumConverterFactory.java
	spring-core/src/main/java/org/springframework/core/env/ReadOnlySystemAttributesMap.java
	spring-jdbc/src/main/java/org/springframework/jdbc/datasource/LazyConnectionDataSourceProxy.java
	spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/AbstractLobHandler.java
	spring-web/src/main/java/org/springframework/http/client/BufferingClientHttpRequestWrapper.java
	spring-web/src/main/java/org/springframework/http/client/SimpleBufferingClientHttpRequest.java
	spring-web/src/main/java/org/springframework/http/converter/BufferedImageHttpMessageConverter.java
	spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java
2013-03-04 15:41:15 +01:00
Juergen Hoeller b979d8d548 Polishing along with SPR-10301 2013-02-27 00:22:53 +01:00
Juergen Hoeller 0d69a630ad DefaultJdoDialect supports the JDO 2.2+ isolation level feature out of the box
Issue: SPR-10323
2013-02-26 22:30:48 +01:00
Juergen Hoeller 5334ac59f6 "packagesToScan" feature for Hibernate 3 and Hibernate 4 detects annotated packages as well
Issue: SPR-7748
Issue: SPR-10288
2013-02-13 17:44:10 +01:00
Sam Brannen 220d2311c7 Polish documentation in Hibernate support classes
This commit fixes some minor typos in Hibernate support classes.
2013-02-01 23:51:07 +01:00
Phillip Webb d89e30b864 Fix unnecessary @SupressWarnings annotations 2013-01-29 15:37:25 -08:00
Juergen Hoeller 8f103c2ea1 Introduced NoUniqueBeanDefinitionException as a dedicated subclass of NoSuchBeanDefinitionException
Issue: SPR-10194
2013-01-22 21:12:06 +01:00
Juergen Hoeller 1a929f22e0 EntityManagerFactoryUtils finds default EntityManagerFactory in parent contexts as well
Also introduces consistent use of getBean(Class) for similar use cases across the framework, accepting a locally unique target bean even if further matching beans would be available in parent contexts (in contrast to BeanFactoryUtils.beanOfType's behavior).

Issue: SPR-10160
2013-01-22 21:12:05 +01:00
Juergen Hoeller 10dceb182e Marked LocalCacheProviderProxy as deprecated (following Hibernate 3.3.'s CacheProvider deprecation) 2013-01-10 17:00:40 +01:00
Chris Beams 70eaf02b7f Revert "Merge branch 'SPR-10130' into cleanup-master"
This reverts commit 45fa50821a, reversing
changes made to a312d900f8.
2013-01-02 10:33:59 +01:00
Chris Beams b2a048b6f3 Update Apache license headers for affected sources 2012-12-28 23:57:33 +01:00
Chris Beams 3b40ce76bf Add @Override annotations to main sources
Issue: SPR-10130
2012-12-28 23:53:24 +01:00
Chris Beams 8472a2b2ab Update Apache license headers for affected sources 2012-12-28 23:09:31 +01:00
Chris Beams 4c7cafbde6 Fix "unnecessary @SuppressWarnings" warnings 2012-12-28 22:50:46 +01:00
Phillip Webb 6c14eaad61 Fix [cast] compiler warnings 2012-12-28 22:41:06 +01:00
Phillip Webb b0986049a3 Fix [serial] compiler warnings
Fix serialization warnings by applying @SuppressWarnings("serial")
when appropriate.

In certain cases and for unknown reasons, a correctly-placed
@SuppressWarnings("serial") annotation will fix the warning at the
javac level (i.e. the Gradle command-line), but will produce an
"unnecessary @SuppressWarnings" warning within Eclipse. In these
cases, a private static final serialVersionUID field has been added
with the default value of 1L.
2012-12-28 22:41:06 +01:00
Phillip Webb 731d5be644 Fix warnings due to unused import statements 2012-12-28 22:40:49 +01:00
Chris Beams 9540d2c81b Replace <code> with {@code} throughout Javadoc
Issue: SPR-10128
2012-12-28 22:36:02 +01:00
Phillip Webb 2cf45bad86 Replace space indentation with tabs
Issue: SPR-10127
2012-12-28 20:49:56 +01:00
Phillip Webb 1762157ad1 Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
    xargs perl -p -i -e "s/[ \t]*$//g" {} \;

Issue: SPR-10127
2012-12-28 20:49:45 +01:00
Juergen Hoeller b9df7d68d9 Consistent fine-tuning of synchronized and concurrent data structures
In particular, avoiding synchronized Sets and Maps wherever possible (preferring a ConcurrentHashMap even instead of a synchronized Set) and specifying appropriate ConcurrentHashMap initial capacities (even if we end up choosing 16).
2012-12-12 23:46:26 +01:00
Chris Beams f26534700a Eliminate all Javadoc warnings
- Support external Javadoc links using Gradle's javadoc.options.links

 - Fix all other Javadoc warnings, such as typos, references to
   non-existent (or no longer existent) types and members, etc,
   including changes related to the Quartz 2.0 upgrade (SPR-8275) and
   adding the HTTP PATCH method (SPR-7985).

 - Suppress all output for project-level `javadoc` tasks in order to
   hide false-negative warnings about cross-module @see and @link
   references (e.g. spring-core having a @see reference to spring-web).
   Use the `--info` (-i) flag to gradle at any time to see project-level
   javadoc warnings without running the entire `api` task. e.g.
   `gradle :spring-core:javadoc -i`

 - Favor root project level `api` task for detection of legitimate
   Javadoc warnings. There are now zero Javadoc warnings across the
   entirety of spring-framework. Goal: keep it that way.

 - Remove all @link and @see references to types and members that exist
   only in Servlet <= 2.5 and Hibernate <= 4.0, favoring 3.0+ and 4.0+
   respectively. This is necessary because only one version of each of
   these dependencies can be present on the global `api` javadoc task's
   classpath. To that end, the `api` task classpath has now been
   customized to ensure that the Servlet 3 API and Hibernate Core 4 jars
   have precedence.

 - SPR-8896 replaced our dependency on aspectjrt with a dependency on
   aspectjweaver, which is fine from a POM point of view, but causes
   a spurious warning to be emitted from the ant iajc task that it
   "cannot find aspectjrt on the classpath" - even though aspectjweaver
   is perfectly sufficient. In the name of keeping the console quiet, a
   new `rt` configuration has been added, and aspectjrt added as a
   dependency to it. In turn, configurations.rt.asPath is appended to
   the iajc classpath during both compileJava and compileTestJava for
   spring-aspects.

Issue: SPR-10078, SPR-8275, SPR-7985, SPR-8896
2012-12-12 12:55:10 +01:00
Juergen Hoeller 184361a096 Transaction timeouts for JPA translate to "javax.persistence.query.timeout" only (for EclipseLink compatibility)
Issue: SPR-10068
2012-12-04 15:38:04 +01:00
Juergen Hoeller 4e443da7ae Officially deprecated Apache iBATIS support in favor of native Spring support in Mybatis (http://code.google.com/p/mybatis/) 2012-11-29 23:21:50 +01:00
Rob Winch d7bf56df49 Remove reflection usage in orm.hibernate4.*
Previously reflection was required when interacting with Hibernate 4 in
order to support both Hibernate 3 and Hibernate 4 since there were
non-passive changes in the APIs. Now that the Spring build uses Gradle
it is trivial to support multiple Hibernate versions.

This commit removes the reflection usage in orm.hibernate4.* by
creating a spring-orm-hibernate4 module that uses
gradle/merge-artifacts.gradle to build a single artifact but keep
distinct classpaths.

Issue: SPR-10039
2012-11-26 22:47:10 +01:00
Juergen Hoeller d6e1a4a26a LocalDataSourceConnectionProvider checks against SmartDataSource before closing a Connection
Issue: SPR-9978
2012-11-08 23:37:14 +01:00
Juergen Hoeller 4ff765446e Added "jtaDataSource" property to JPA LocalContainerEntityManagerFactoryBean (for default units)
Issue: SPR-9883
2012-10-31 02:53:19 +01:00
Rossen Stoyanchev 5d04ef4c4a Support selective filtering of error dispatches
OncePerRequestFilter now allows sub-classes to choose whether they
should ever get involved in processing an error dispatch.

Issue: SPR-9895
2012-10-28 12:47:00 -04:00
Rossen Stoyanchev d952da2338 Polish (minor) async support in filters
Issue: SPR-9895
2012-10-28 12:10:38 -04:00
Rossen Stoyanchev f036ed639f Polish (major) MVC async processing interceptors
New afterTimeout and afterCompletion callbacks

afterTimeout can provide a concurrent result to be used instead of the
one that could not be set or returned on time

Interceptor exceptions cause async processing to resume treating the
exception as the concurrent result

Adapter classes for convenient implementation of the interfaces

Issue: SPR-9914
2012-10-26 18:04:27 -04:00
Juergen Hoeller d7e2de019f Mention matching bean names in exception message in case of non-unique EntityManagerFactory lookup 2012-10-12 23:34:19 +02:00
Juergen Hoeller efd872e35a JPA persistence.xml files may use jar-file entries relative to the unit root (as per the JPA spec)
Issue: SPR-9797
2012-10-10 23:34:24 +02:00
Juergen Hoeller fe16334dd4 Hibernate 4 LocalSessionFactoryBuilder sets thread context ClassLoader (for JBoss 7 compatibility)
Issue: SPR-9846
2012-10-10 14:28:54 +02:00
Rossen Stoyanchev 57c36dd395 Add interceptors for async processing
This change introduces two new interceptors with callback methods
for concurrent request handling. These interfaces are
CallableProcessingInterceptor and DeferredResultProcessingInterceptor.

Unlike a HandlerInterceptor, and its AsyncHandlerInterceptor sub-type,
which intercepts the invocation of a handler in he main request
processing thread, the two new interfaces are aimed at intercepting the
asynchronous execution of a Callable or a DeferredResult.

This allows for the registration of thread initialization logic in the
case of Callable executed with an AsyncTaskExecutor, or for centralized
tracking of the completion and/or expiration of a DeferredResult.
2012-09-19 09:25:50 -04:00
Rossen Stoyanchev 97f97c4e9f Polish async support
Added handler argument to the signature of
AsyncHandlerInterceptor.afterConcurrentHandlingStarted(..).

Renamed AsyncWebUtils to WebAsyncUtils.
2012-09-17 14:58:56 -04:00
Juergen Hoeller f32e4077fa same-named unit from persistence.xml overrides in case of conflict with default unit
Issue: SPR-9741
2012-09-10 15:14:11 +02:00
Rossen Stoyanchev 6e85dd8917 Polish async request processing
This change fixes a cyclical package dependency.

The change also improves the implementation of
WebAsyncManager.hasConcurrentResult() following the resolution of
Apache issue id=53632 and the release of Apache Tomcat 7.0.30 that
contains the fix.
2012-09-07 21:30:11 -04:00
Rossen Stoyanchev 4f55518290 Update remaining filter with async support
Issue: SPR-9433
2012-08-17 13:09:52 -04:00
Rossen Stoyanchev cdab04a032 Set timeout value and task executor per async request
Methods returning DeferredResult can now specify a timeout value
through constructor arg while methods returning a Callable can wrap it
in an AsyncTask that also accepts a timeout and a specific task
executor.

Issue: SPR-9399
2012-08-17 13:09:51 -04:00
Rossen Stoyanchev 529e62921d Refactor Servlet 3 async support
As a result of the refactoring, the AsyncContext dispatch mechanism is
used much more centrally. Effectively every asynchronously processed
request involves one initial (container) thread, a second thread to
produce the handler return value asynchronously, and a third thread
as a result of a dispatch back to the container to resume processing
of the asynchronous resuilt.

Other updates include the addition of a MockAsyncContext and support
of related request method in the test packages of spring-web and
spring-webmvc. Also an upgrade of a Jetty test dependency required
to make tests pass.

Issue: SPR-9433
2012-08-03 19:15:53 -04:00
Rossen Stoyanchev 5a365074c2 Fix issue with failing test from previous commit
Issue: SPR-9611
2012-07-20 14:46:52 -04:00
Rossen Stoyanchev 6cc512b51c Ensure async Callables are in sync with the call stack
After this change each call stack level pushes and pops an async
Callable to ensure the AsyncExecutionChain is in sync with the
call stack. Before this change, a controller returning a "forward:"
prefixed string caused the AsyncExecutionChain to contain a
extra Callables that did not match the actual call stack.

Issue: SPR-9611
2012-07-20 12:50:01 -04:00
Juergen Hoeller dda3197c77 added "jtaTransactionManager" property to Hibernate 4 LocalSessionFactoryBean/Builder
Issue: SPR-9480
2012-07-06 22:43:36 +02:00
Rossen Stoyanchev 6cca57afd3 Exception for OSIV deferred close with async requests
OSIV deferred close mode is not supported with async requests and is
unlikely to be what's the desired. This change adds an exception with
a message stating this.

Issue: SPR-8517
2012-05-04 18:58:47 -04:00
Rossen Stoyanchev e7506b50b2 HanderInterceptor and OSIV async request changes
This change updates Open-Session-in-View filters and interceptors for
use in async requests mainly ensuring the open Hibernate session is
unbound from the main request processing thread and bound to the to
async thread.

Issue: SPR-8517
2012-05-04 16:12:14 -04:00
Stevo Slavic effb762558 Fix javadoc warnings
Before this change there were numerous javadoc warnings being reported
while building Spring framework API.

This commit resolves most of the javadoc warnings, reducing the total
number from 265 to 103.

Issue: SPR-9113
2012-04-30 11:31:02 +03:00
Chris Beams e3f544904c Fix warnings in LocalSessionFactoryBean 2012-03-09 11:36:56 +02:00
Chris Beams 045c97f75e Support automatic Hibernate dialect detection
Use the preferred SessionFactoryImplementor#getDialect call as
opposed to the previous Dialect#getDialect approach which required
explicitly setting the 'hibernate.dialect' property.

Issue: SPR-7396
2012-03-09 11:36:49 +02:00
Chris Beams ee36c80ca9 Sync with 3.1.x
* 3.1.x: (61 commits)
  Compensate for changes in JDK 7 Introspector
  Avoid 'type mismatch' errors in ExtendedBeanInfo
  Polish ExtendedBeanInfo and tests
  Infer AnnotationAttributes method return types
  Minor fix in MVC reference doc chapter
  Hibernate 4.1 etc
  TypeDescriptor equals implementation accepts annotations in any order
  "setBasenames" uses varargs now (for programmatic setup; SPR-9106)
  @ActiveProfiles mechanism works with @ImportResource as well (SPR-8992
  polishing
  clarified Resource's "getFilename" method to consistently return null
  substituteNamedParameters detects and unwraps SqlParameterValue object
  Replace spaces with tabs
  Consider security in ClassUtils#getMostSpecificMethod
  Adding null check for username being null.
  Improvements for registering custom SQL exception translators in app c
  SPR-7680 Adding QueryTimeoutException to the DataAccessException hiera
  Minor polish in WebMvcConfigurationSupport
  Detect overridden boolean getters in ExtendedBeanInfo
  Polish ExtendedBeanInfoTests
  ...
2012-02-13 15:17:30 +01:00
Chris Beams 02a4473c62 Rename modules {org.springframework.*=>spring-*}
This renaming more intuitively expresses the relationship between
subprojects and the JAR artifacts they produce.

Tracking history across these renames is possible, but it requires
use of the --follow flag to `git log`, for example

    $ git log spring-aop/src/main/java/org/springframework/aop/Advisor.java

will show history up until the renaming event, where

    $ git log --follow spring-aop/src/main/java/org/springframework/aop/Advisor.java

will show history for all changes to the file, before and after the
renaming.

See http://chrisbeams.com/git-diff-across-renamed-directories
2012-01-31 14:37:10 +01:00