Commit Graph

27 Commits

Author SHA1 Message Date
Sam Brannen 227320dc81 Suppress warnings in HibernateTransactionManagerTests 2014-01-22 20:53:55 +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
Juergen Hoeller 70164cb145 Properly handle InvocationTargetException in reflective JtaPlatform implementation 2013-11-22 23:26:09 +01:00
Juergen Hoeller 00474ceecd Introduced setCacheRegionFactory method on LocalSessionFactoryBuilder/Bean
Issue: SPR-11056
2013-11-01 23:50:09 +01: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 542b5b2029 First-class support for MultiTenantConnectionProvider and CurrentTenantIdentifierResolver
Uses Object-typed setter methods to bridge between package location changes in Hibernate 4.2 vs 4.3. As a side bonus, those setters accept Class and class names as well.

Issue: SPR-10823
2013-09-03 18:32:01 +02:00
Juergen Hoeller a9e727cd88 Compatibility with Hibernate 4.3
Due to key SPI interfaces such as ConnectionProvider and JtaPlatform changing their package location in Hibernate 4.3, we have to resort to reflection in a few places. Most importantly, the ConfigurableJtaPlatform used by the setJtaTransactionManager method has now been redesigned as a reflective proxy.

Issue: SPR-10839
2013-09-03 17:58:18 +02:00
Juergen Hoeller c762b83a76 Explicit support for Hibernate 4.0's QueryTimeoutException, PessimisticLockException, PessimisticEntityLockException and OptimisticEntityLockException
Issue: SPR-10815
2013-08-20 19:06:24 +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 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
Rob Winch 9468548116 Add @Override to remaining source files
Issue: SPR-10130
2013-05-13 17:04:56 -05:00
Juergen Hoeller 096972d2b1 HibernateTransactionManager for Hibernate 4 supports "entityInterceptor(BeanName)" property
Issue: SPR-10301
2013-02-27 00:22:18 +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
Juergen Hoeller be606f4169 Added hint towards not using orm.hibernate3 classes with Hibernate 4
Issue: SPR-9365
2013-01-18 13:58:22 +01:00
Phillip Webb 42b5d6dd7e Remove duplicate test classes
Prior to this commit many test utility classes and sample beans were
duplicated across projects. This was previously necessary due to the
fact that dependent test sources were not shared during a gradle
build. Since the introduction of the 'test-source-set-dependencies'
gradle plugin this is no longer the case.

This commit attempts to remove as much duplicate code as possible,
co-locating test utilities and beans in the most suitable project.
For example, test beans are now located in the 'spring-beans'
project.

Some of the duplicated code had started to drift apart when
modifications made in one project where not ported to others. All
changes have now been consolidated and when necessary existing tests
have been refactored to account for the differences.

Conflicts:
	spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java
	spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java
	spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java
2013-01-04 10:02:29 +01:00
Chris Beams 8472a2b2ab Update Apache license headers for affected sources 2012-12-28 23:09:31 +01:00
Chris Beams 4c8cd7b0bd Add @Override annotations to test sources
Issue: SPR-10129
2012-12-28 23:05:44 +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
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
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 ff945bdca9 Added initial unit tests for Hibernate 4 2012-11-29 23:45:33 +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