Commit Graph

473 Commits

Author SHA1 Message Date
Juergen Hoeller 620e83c35d SpringBeanContainer is public for custom JPA configuration purposes
Issue: SPR-16305
2018-07-05 16:48:35 +02:00
Juergen Hoeller 010ba33d03 Propagate read-only status through setDefaultReadOnly(true) for JPA
This involves a new ResourceTransactionDefinition variant that JpaTransactionManager indicates a transaction-local EntityManager on. HibernateJpaDialect uses this indicator for hard read-only behavior.

Issue: SPR-16956
2018-07-05 13:53:35 +02:00
Juergen Hoeller 63d6215247 Polishing 2018-07-04 19:23:27 +02:00
Juergen Hoeller c0d4cb55c7 LocalSessionFactoryBuilder provides Hibernate 5.3 BeanContainer support
LocalSessionFactoryBean automatically registers its containing BeanFactory as a BeanContainer when Hibernate 5.3 or higher is on the classpath.

Issue: SPR-16305
2018-07-04 19:23:19 +02:00
Juergen Hoeller 5dc8b5de6d Polishing 2018-07-04 15:07:17 +02:00
Juergen Hoeller 094c9b8bd2 LocalSessionFactoryBean and HibernateTransactionManager for JPA setup
SessionHolder extends EntityManagerHolder now, allowing for @PersistenceContext and co to interact with HibernateTransactionManager's thread-bound transactions, and SpringSessionContext is capable of interacting with JpaTransactionManager by detecting a plain EntityManagerHolder as well.

Issue: SPR-17002
2018-07-04 15:07:09 +02:00
Juergen Hoeller d22d408261 Propagate read-only status through Session.setDefaultReadOnly(true)
Issue: SPR-16956
2018-07-03 22:22:19 +02:00
Juergen Hoeller 6f8a524eaa Upgrade to Tomcat 9.0.10, RxJava 2.1.16, EclipseLink 2.7.2, Selenium 3.13 2018-06-28 14:52:35 +02:00
Juergen Hoeller 40efcc933c Polishing 2018-06-28 14:51:33 +02:00
Juergen Hoeller b6d95567e8 Explicit support for Hibernate Integrators on LocalSessionFactoryBean
Issue: SPR-16828
2018-06-28 14:15:16 +02:00
Juergen Hoeller 81cb740e0a New postProcessProperties variant on InstantiationAwareBeanPostProcessor
Allows for skipping the now-deprecated postProcessPropertyValues callback with its expensive PropertyDescriptor retrieval requirement. RequiredAnnotationBeanPostProcessor (which is dependent on postProcessPropertyValues) and the @Required annotation itself are also deprecated now: in favor of constructor injection (or afterPropertiesSet).

Issue: SPR-16918
2018-06-28 14:15:16 +02:00
Phillip Webb 5cedd0d5d4 Consistently use tabs rather than spaces
Update code that has accidentally used spaces instead of tabs.
Also remove all trailing whitespace.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb 0b53c1096a Always use 'this.' when accessing fields
Ensure that `this.` is used consistently when accessing class
fields.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb eeebd51f57 Use consistent class design
Update all classes so that inner classes are always last. Also
ensure that utility classes are always final and have a private
constructor and make exceptions final whenever possible.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb 866e9d702e Use consistent block style
Update all code to use a consistent block style.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb e0480f75ac Fix javadoc checkstyle issues
Fix checkstyle violations for javadoc.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Juergen Hoeller 25559b9e44 Polishing 2018-06-06 21:31:24 +02:00
Juergen Hoeller 8d94d20770 Upgrade to Hibernate ORM 5.3.1 and Undertow 2.0.9 2018-05-29 21:53:06 +02:00
Juergen Hoeller 3c8c99664f Query termination for JPA 2.1 StoredProcedureQuery.execute() method
Issue: SPR-16826
2018-05-16 00:44:52 +02:00
Juergen Hoeller e0ccbcbb66 Upgrade to Hibernate ORM 5.3 GA
Issue: SPR-16303
2018-05-15 12:33:33 +02:00
Juergen Hoeller 504e2768de Add SAP HANA to common JPA database platforms
Issue: SPR-16460
2018-05-05 20:38:10 +02:00
Juergen Hoeller a4b44e2713 Upgrade to Hibernate ORM 5.3 CR2 2018-05-05 17:13:50 +02:00
Juergen Hoeller e170cb0f79 Upgrade framework build to JPA 2.2 and JTA 1.3
Issue: SPR-16685
2018-04-11 16:06:10 +02:00
Juergen Hoeller ff53d78e96 Remove bogus DataSource test from JpaTransactionManagerTests 2018-04-10 00:40:51 +02:00
Juergen Hoeller b2f900e518 Upgrade to Hibernate ORM 5.2.16 and 5.1.13 2018-03-23 17:36:55 +01:00
Juergen Hoeller 2a3f90dc7b Upgrade to Hibernate ORM 5.2.15 and Hibernate Validator 6.0.8 2018-03-09 09:40:12 +01:00
Juergen Hoeller 139dc1d373 Polishing (collapsed if checks, consistent downcasts, refined javadoc) 2018-03-08 18:11:57 +01:00
igor-suhorukov 0f7485b01d Polish: reorder the modifiers to comply with the Java Language Specification. 2018-03-08 17:57:47 +01:00
Juergen Hoeller eb9c43dcbc Reliably expose nested cause exception message for PersistenceException
Issue: SPR-16559
2018-03-06 23:06:14 +01:00
Juergen Hoeller cec7204fca Polishing 2018-03-02 13:53:17 +01:00
Juergen Hoeller cd4f0935c5 Revised deprecation markers 2018-03-01 23:43:06 +01:00
igor-suhorukov 83300c4b27 Polish: follow naming convention 2018-03-01 00:22:29 +01:00
Juergen Hoeller 33cd160861 Upgrade to Reactor Bismuth SR7, Hibernate ORM 5.2.14, Common Annotations 1.3.2 2018-02-28 14:01:04 +01:00
Juergen Hoeller 578c078082 Polishing 2018-02-22 15:14:20 +01:00
Juergen Hoeller a5cbf5fe24 Consistent use of Collection.toArray with zero-sized array argument
Includes consistent use of ClassUtils.toClassArray (as non-null variant)

Issue: SPR-16523
2018-02-22 11:29:46 +01:00
Juergen Hoeller 3b810f3544 Consistent Class array vs vararg declarations (and related polishing) 2018-02-14 14:44:00 +01:00
Juergen Hoeller 39201adca4 Consistent handling of InterruptedException
Issue: SPR-16479
2018-02-10 13:03:33 +01:00
Juergen Hoeller 4318710b9b Upgrade to Hibernate 5.2.13 2018-02-07 14:14:22 +01:00
Juergen Hoeller e1fa65a37c Notes about HibernateJpaVendorAdapter settings vs native Hibernate rules
Issue: SPR-16428
2018-01-29 18:40:18 +01:00
Juergen Hoeller 4e194c3fbe Deprecate outdated HibernateTemplate operations in favor of lambdas
Issue: SPR-16426
2018-01-29 18:40:08 +01:00
Juergen Hoeller 9d0e62ef68 Javadoc format and related polishing 2018-01-22 11:43:21 +01:00
Juergen Hoeller 0270808b3c Upgrade to EclipseLink 2.7.1 2018-01-16 14:39:14 +01:00
Timo Meinen 823a16ce17 Log SQL parameters in EclipseLink when using showSql
As of EclipseLink 2.4.0 - Juno this is not sufficient to log
SQL parameter binding. Additionally,
eclipselink.logging.parameters must be enabled.

Issue: SPR-16383
2018-01-16 14:20:49 +01:00
Juergen Hoeller b6191f6057 Direct reference to JPA 2.1 SynchronizationType enum
Issue: SPR-13481
2018-01-07 23:30:05 +01:00
Juergen Hoeller e2018e6b72 HibernateJpaVendorAdapter sets connection release mode ON_CLOSE in non-PersistenceUnitInfo bootstrap scenario
Issue: SPR-16162
2017-11-11 18:43:43 +01:00
Juergen Hoeller a80fd9994a HibernateJpaVendorAdapter preserves connection release mode for JTA
Issue: SPR-16162
2017-11-10 20:21:03 +01:00
Juergen Hoeller e17ad551f3 Latest dependency updates (RxJava 1.3.3, Hibernate ORM 5.2.12, Hibernate Validator 5.4.2 & 6.0.3) 2017-10-20 16:16:06 +02:00
Juergen Hoeller 66a6fdacca Deprecate HibernateJpaSessionFactoryBean (against Hibernate 5.2)
Issue: SPR-16016
2017-10-04 12:29:16 +02:00
Juergen Hoeller e2882fe1db Build against EE 8 API level wherever possible
Upgrade to JAXB 2.3, JAX-WS 2.3, Annotations 1.3.1, Interceptor 1.2.1.
Also includes Log4J 2.9.1 and Asciidoctor 1.5.6.
2017-09-24 17:18:21 +02:00
Juergen Hoeller 9190b76ab9 Latest dependency updates (POI 3.17, Rome 1.8, EhCache 3.4, Caffeine 2.5.6, RxJava 2.1.4, Tomcat 8.5.21, JRuby 9.1.13, Rhino 1.7.7.2) 2017-09-23 11:28:19 +02:00
Juergen Hoeller 7ae59d0c2a Nullability refinements on private and static methods
Based on IntelliJ IDEA 2017.3 introspection results.

Issue: SPR-15756
2017-09-22 18:22:14 +02:00
Sebastien Deleuze 1bc93e3d0f Revisit nullability annotations
This commit introduces the following changes.

1) It adds a new Spring @NonNull annotation which allows to apply
@NonNullApi semantic on a specific element, like @Nullable does.
Combined with @Nullable, it allows partial null-safety support when
package granularity is too broad.

2) @Nullable and @NonNull can apply to ElementType.TYPE_USE in order
to be used on generic type arguments (SPR-15942).

3) Annotations does not apply to ElementType.TYPE_PARAMETER anymore
since it is not supported yet (applicability for such use case is
controversial and need to be discussed).

4) @NonNullApi does not apply to ElementType.FIELD anymore since in a
lot of use cases (private, protected) it is not part for the public API
+ its usage should remain opt-in. A dedicated @NonNullFields annotation
has been added in order to set fields default to non-nullable.

5) Updated Javadoc and reference documentation.

Issue: SPR-15756
2017-09-15 13:26:41 +02:00
Juergen Hoeller 69af698ceb Latest dependency updates (EclipseLink 2.7 final, Hibernate ORM 5.2.11, Selenium 3.5.3) 2017-09-14 15:16:53 +02:00
Brian Clozel 2eeb428e95 Move modules to independent build files
The main `build.gradle` file contains now only the common build
infrastructure; all module-specific build configurations have
been moved to their own build file.

Issue: SPR-15885
2017-08-21 14:41:55 +02:00
Sebastien Deleuze 73cf07e9a4 Fix overridden methods nullability
Issue: SPR-15869
2017-08-17 15:02:59 +02:00
Juergen Hoeller 46eba3dbfa Nullability fine-tuning around declaration inconsistencies
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 22:22:20 +02:00
Juergen Hoeller 9fc4fb10b0 Nullability fine-tuning around bean properties
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 11:43:58 +02:00
Sebastien Deleuze fb4ddb0746 Make getters and setters null-safety consistent
This commit ensure that null-safety is consistent between
getters and setters in order to be able to provide beans
with properties with a common type when type safety is
taken in account like with Kotlin.

It also add a few missing property level @Nullable
annotations.

Issue: SPR-15792
2017-07-19 09:07:56 +02:00
Juergen Hoeller c292a89b24 Http(Async)Client not actually nullable, plus MethodInterceptor nullability
Issue: SPR-15720
2017-07-19 00:15:37 +02:00
Juergen Hoeller cc74a2891a @Nullable all the way: null-safety at field level
This commits extends nullability declarations to the field level, formalizing the interaction between methods and their underlying fields and therefore avoiding any nullability mismatch.

Issue: SPR-15720
2017-06-30 01:54:16 +02:00
Rossen Stoyanchev 5b8f7f503f Deprecate adapter classes for async interceptors 2017-06-26 15:34:51 -04:00
Violeta Georgieva e0678ba583 Add onError callback to DeferredResult
Issue: SPR-15614
2017-06-26 14:12:56 -04:00
diguage 1ef5f61ab2 Refactor iterator of Map with Java8's Map.forEach
See gh-1459
2017-06-13 16:06:20 +02:00
Stephane Nicoll 58242f2249 Polish 2017-06-13 10:13:14 +02:00
Stephane Nicoll fc64b8040f Polish "Replace relevant code with lambda"
Closes gh-1454
2017-06-13 09:42:20 +02:00
diguage 4b1478d830 Replace relevant code with lambda
See gh-1454
2017-06-13 08:55:38 +02:00
Juergen Hoeller e2e0410570 Method-level javadoc on XmlReaderContext etc 2017-06-11 12:03:05 +02:00
Juergen Hoeller f813712f5b Consistent use of @Nullable across the codebase (even for internals)
Beyond just formally declaring the current behavior, this revision actually enforces non-null behavior in selected signatures now, not tolerating null values anymore when not explicitly documented. It also changes some utility methods with historic null-in/null-out tolerance towards enforced non-null return values, making them a proper citizen in non-null assignments.

Some issues are left as to-do: in particular a thorough revision of spring-test, and a few tests with unclear failures (ignored as "TODO: NULLABLE") to be sorted out in a follow-up commit.

Issue: SPR-15540
2017-06-07 14:19:15 +02:00
Sebastien Deleuze 1f28825f9d Add more @Nullable parameters based on null usage
Issue: SPR-15540
2017-05-31 21:42:23 +02:00
Sebastien Deleuze b47d713e14 Add missing @Nullable annotations on parameters
Issue: SPR-15540
2017-05-31 16:56:08 +02:00
Sebastien Deleuze 87598f48e4 Introduce null-safety of Spring Framework API
This commit introduces 2 new @Nullable and @NonNullApi
annotations that leverage JSR 305 (dormant but available via
Findbugs jsr305 dependency and already used by libraries
like OkHttp) meta-annotations to specify explicitly
null-safety of Spring Framework parameters and return values.

In order to avoid adding too much annotations, the
default is set at package level with @NonNullApi and
@Nullable annotations are added when needed at parameter or
return value level. These annotations are intended to be used
on Spring Framework itself but also by other Spring projects.

@Nullable annotations have been introduced based on Javadoc
and search of patterns like "return null;". It is expected that
nullability of Spring Framework API will be polished with
complementary commits.

In practice, this will make the whole Spring Framework API
null-safe for Kotlin projects (when KT-10942 will be fixed)
since Kotlin will be able to leverage these annotations to
know if a parameter or a return value is nullable or not. But
this is also useful for Java developers as well since IntelliJ
IDEA, for example, also understands these annotations to
generate warnings when unsafe nullable usages are detected.

Issue: SPR-15540
2017-05-27 08:57:01 +02:00
Juergen Hoeller 6fcf3a104f SharedEntityManagerCreator detects JPA 2.2's getResultStream method as query-terminating
This commit also changes "hibval5Version" to the more general "hibvalVersion" build variable, and includes dependency updates to Caffeine 2.5.1 and JRuby 9.1.9.

Issue: SPR-13482
2017-05-25 13:16:51 +02:00
Juergen Hoeller b2a6a572d3 Drop outdated DeferredQueryInvocationHandler.finalize() implementation
Issue: SPR-15363
2017-03-24 11:07:14 +01:00
Juergen Hoeller e892e02f41 Polishing 2017-03-21 17:44:47 +01:00
Juergen Hoeller 0f51ff5ebc Reset global rollback-only status when rolling back to savepoint
Issue: SPR-6568
2017-02-17 23:40:44 +01:00
Juergen Hoeller 07dd61eabd Drop NativeJdbcExtractor mechanism in favor of JDBC 4 unwrap
Issue: SPR-14670
2017-02-15 18:04:08 +01:00
Juergen Hoeller acf511ac0e Polishing 2017-02-02 20:11:06 +01:00
Juergen Hoeller 1b2dc3638f Revisit Assert to avoid single-arg assert methods (with refined messages)
Issue: SPR-15196
2017-01-30 22:15:55 +01:00
Juergen Hoeller e19dff179e Polishing 2017-01-12 21:18:01 +01:00
Sam Brannen 9ed66bf2eb Clean up warnings across code base 2017-01-07 01:54:38 +01:00
Juergen Hoeller 6d1cae2f57 Avoid proxy replacement for generic return type signatures
Issue: SPR-15010
2016-12-14 22:00:41 +01:00
Juergen Hoeller 2f80b8485a JPA/Hibernate docs: transaction management, JTA setup
Issue: SPR-14957
2016-12-08 18:24:12 +01:00
Juergen Hoeller b3cd1ad7f1 Refined throwing of BeanCreationExceptions (and reflection exceptions)
Issue: SPR-14883
2016-11-07 19:03:18 +01:00
Juergen Hoeller 5912d6f52a LocalSessionFactoryBean clears default MetadataSources on reinitialization
Issue: SPR-14815
2016-10-28 15:35:04 +02:00
Philippe Marschall ae5b0c6fb5 Replace J2EE with Java EE
String with version 5 the name of Java Platform, Enterprise Edition
changed from J2EE to Java EE. However a lot of the documentation still
uses the term J2EE.

This commit includes the following changes:

 * replace J2EE with Java EE where appropriate

This is not a blind search and replace. The following occurrences
remain unchanged:

 * references to old J2EE releases, most notably 1.3 and 1.4.
 * references to "Expert One-On-One J2EE Design and Development"
 * references to "Core J2EE patterns"
 * XML namespaces
 * package names

Issue: SPR-14811
See gh-1206
2016-10-15 11:49:00 +03:00
Juergen Hoeller bb7d20762c DefaultPersistenceUnitManager extracts jar file from default persistence unit root URL
Issue: SPR-14749
2016-09-26 15:15:45 +02:00
Juergen Hoeller 34ab818dfa HibernateExceptionTranslator avoids JPA IllegalState/ArgumentException translation
Issue: SPR-14681
2016-09-13 21:46:02 +02:00
Juergen Hoeller d631b4cca9 HibernateTemplate reflectively calls getNamedQuery (for runtime compatibility with Hibernate 5.0/5.1 vs 5.2)
Issue: SPR-14676
2016-09-10 12:38:04 +02:00
Stephane Nicoll dcade06fa0 Support for candidate components index
This commit adds a "spring-context-indexer" module that can be added to
any project in order to generate an index of candidate components defined
in the project.

`CandidateComponentsIndexer` is a standard annotation processor that
looks for source files with target annotations (typically `@Component`)
and references them in a `META-INF/spring.components` generated file.

Each entry in the index is the fully qualified name of a candidate
component and the comma-separated list of stereotypes that apply to that
candidate. A typical example of a stereotype is `@Component`. If a
project has a `com.example.FooService` annotated with `@Component` the
following `META-INF/spring.components` file is generated at compile time:

```
com.example.FooService=org.springframework.stereotype.Component
```

A new `@Indexed` annotation can be added on any annotation to instructs
the scanner to include a source file that contains that annotation. For
instance, `@Component` is meta-annotated with `@Indexed` now and adding
`@Indexed` to more annotation types will transparently improve the index
with additional information. This also works for interaces or parent
classes: adding `@Indexed` on a `Repository` base interface means that
the indexed can be queried for its implementation by using the fully
qualified name of the `Repository` interface.

The indexer also adds any class or interface that has a type-level
annotation from the `javax` package. This includes obviously JPA
(`@Entity` and related) but also CDI (`@Named`, `@ManagedBean`) and
servlet annotations (i.e. `@WebFilter`). These are meant to handle
cases where a component needs to identify candidates and use classpath
scanning currently.

If a `package-info.java` file exists, the package is registered using
a "package-info" stereotype.

Such files can later be reused by the `ApplicationContext` to avoid
using component scan. A global `CandidateComponentsIndex` can be easily
loaded from the current classpath using `CandidateComponentsIndexLoader`.

The core framework uses such infrastructure in two areas: to retrieve
the candidate `@Component`s and to build a default `PersistenceUnitInfo`.
Rather than scanning the classpath and using ASM to identify candidates,
the index is used if present.

As long as the include filters refer to an annotation that is directly
annotated with `@Indexed` or an assignable type that is directly
annotated with `@Indexed`, the index can be used since a dedicated entry
wil be present for that type. If any other unsupported include filter is
specified, we fallback on classpath scanning.

In case the index is incomplete or cannot be used, The
`spring.index.ignore` system property can be set to `true` or,
alternatively, in a "spring.properties" at the root of the classpath.

Issue: SPR-11890
2016-09-01 15:30:47 +02:00
Juergen Hoeller 5ee65cd4b1 Updated to JPA 2.1 requirement 2016-08-18 10:17:01 +02:00
Juergen Hoeller f1ab37cd01 Renamed setDefaultPersistenceUnitRootLocation to setPersistenceUnitRootLocation 2016-08-17 22:12:47 +02:00
Stephane Nicoll 1cad98dd31 Add setter for defaultPersistenceUnitRootLocation
This commit adds a setter for the default persistence unit's
defaultPersistenceUnitRootLocation attribute.
2016-08-17 17:40:58 +02:00
Juergen Hoeller 8b5d3559f5 Avoid stack overflow in case of chained factory-bean references to FactoryBean class
Issue: SPR-14551
2016-08-11 22:56:14 +02:00
Juergen Hoeller 6157fad91f PersistenceAnnotationBeanPostProcessor obtains default EntityManagerFactory via getBean(Class) algorithm
Issue: SPR-7549
2016-08-11 22:42:06 +02:00
Juergen Hoeller 36143692ac Consistent use of AvailableSettings instead of Environment
Issue: SPR-14548
2016-08-08 14:48:05 +02:00
Juergen Hoeller fad931d764 Consistent default connection release mode with Hibernate 5.1
Issue: SPR-14548
2016-08-04 03:07:14 +02:00
Sam Brannen 7ff9f0a8e9 Clean up warnings in spring-orm 2016-07-26 14:02:33 +02:00
Juergen Hoeller 195467083c Drop JpaSystemException(PersistenceException) constructor to avoid ambiguity in HibernateJpaVendorAdapter
Hibernate 5.2's HibernateException extends PersistenceException, leading to a different constructor compiled into the bytecode, breaking compatibility with Hibernate 5.0 at runtime.

Issue: SPR-13827
2016-07-26 01:23:39 +02:00
Sam Brannen beb45aac69 Suppress deprecation warning in PersistenceInjectionTests 2016-07-23 17:20:09 +02:00
Juergen Hoeller aae4874b85 Revised spring-orm test suite (no AbstractJpaTests anymore)
Issue: SPR-13515
2016-07-19 17:50:57 +02:00
Juergen Hoeller 1670b4e154 Reliably pass CurrentTenantIdentifierResolver to SessionFactory
Issue: SPR-14476
2016-07-19 17:25:07 +02:00
Juergen Hoeller adbc592f50 Unwrap JPA PersistenceException on flush failure (for Hibernate 5.2)
Issue: SPR-14457
2016-07-13 22:30:52 +02:00
Juergen Hoeller ddb4117233 HibernateExceptionTranslator converts JPA exceptions as well (for Hibernate 5.2)
Issue: SPR-14455
2016-07-13 22:24:38 +02:00
Juergen Hoeller c43e7497c1 Fixed typo: "occured"->"occurred" 2016-07-08 15:12:16 +02:00
Juergen Hoeller a1f5fb53db Java 8 getParameterCount() instead of getParameterTypes().length
Issue: SPR-13188
2016-07-07 01:04:24 +02:00
Juergen Hoeller 19e5a34f9f Restored binary compatibility with Hibernate 5.0/5.1's Query type
Issue: SPR-14425
2016-07-06 15:20:09 +02:00
Stephane Nicoll e4b0486c5a Add @FunctionalInterface on candidate interfaces
Issue: SPR-14432
2016-07-06 14:32:13 +02:00
Juergen Hoeller bc2c22d51e Streamline XML namespace support towards unversioned schemas
This commit also removes support code for outdated options which were only available in older schema versions.

Issue: SPR-13499
2016-07-05 20:50:03 +02:00
Sam Brannen 1391248ea6 Introduce log4j 2 for Spring's test suite
This commit adds a test runtime dependency on log4j 2 for every project
and migrates all log4j.properties files to log4j2-test.xml files.

Issue: SPR-14431
2016-07-05 19:19:09 +02:00
Stephane Nicoll 00d2606b00 Explicit type can be replaced by <>
Issue: SPR-13188
2016-07-05 17:00:34 +02:00
Juergen Hoeller 0fc0ce78ae Drop deprecated dependencies on Log4j, JRuby, JExcel, Burlap, Commons Pool/DBCP
This commit also removes outdated support classes for Oracle, GlassFish, JBoss.

Issue: SPR-14429
2016-07-05 15:46:53 +02:00
Juergen Hoeller 51252ebbca Avoid defensive checks against Java 8 API (java.util.Optional etc)
This commit also fixes broken javadoc links and code references.

Issue: SPR-13188
2016-07-05 02:09:00 +02:00
Juergen Hoeller 54004e0d78 Upgrade to JPA 2.1+ and Bean Validation 1.1+; remove native support for Hibernate 3.6 and 4.x
Issue: SPR-13481
Issue: SPR-13827
2016-07-04 23:37:23 +02:00
Juergen Hoeller 69ec437fbc Drop native OpenJPA support
Issue: SPR-14426
2016-07-04 23:35:19 +02:00
Juergen Hoeller d341624e91 Drop JDO support
Issue: SPR-14130
2016-07-04 23:34:48 +02:00
Juergen Hoeller 711eb99812 HibernateJpaVendorAdapter and LocalSessionFactoryBuilder enforce Hibernate 5.2's connection handling mode DELAYED_ACQUISITION_AND_HOLD
Issue: SPR-14393
2016-06-24 12:37:31 +02:00
Juergen Hoeller 5e08598a2a HibernateJpaDialect accepts equivalent connection for proper reset as well
Issue: SPR-14393
2016-06-23 18:24:09 +02:00
Juergen Hoeller 9394616f8f Support for Hibernate ORM 5.2
Issue: SPR-14327
2016-06-02 23:35:31 +02:00
Sam Brannen 49bc2a9a02 Clean up warnings in PersistenceXmlParsingTests 2016-05-27 16:30:50 +02:00
Juergen Hoeller abfe3f209d DefaultPersistenceUnitManager can determine persistence unit root from orm.xml location
Issue: SPR-14246
2016-05-26 23:57:49 +02:00
Johnny Lim 44e652f99e Remove duplicate words
Closes gh-1039
2016-04-19 08:24:21 +02:00
Juergen Hoeller 836a321ab2 JPA ClassFileTransformerAdapter defensively backs out when called from within a transform call
Issue: SPR-13886
2016-04-12 21:44:17 +02:00
Juergen Hoeller 74608e6b49 Polishing 2016-04-12 16:03:57 +02:00
Juergen Hoeller 517ebd1d3e Consistent formatting 2016-03-24 19:22:50 +01:00
Juergen Hoeller 7fcb277de9 Consistent behavior for unwrap(null) on JPA and Bean Validation wrappers
Includes a fix for Query unwrapping before passing it to addNamedQuery.

Issue: SPR-13960
Issue: SPR-13957
2016-02-18 16:19:09 +01:00
Juergen Hoeller 50829c9fdc Shared EntityManager does not insist on actualTransactionActive flag anymore
Issue: SPR-13838
2016-01-13 14:11:13 +01:00
Juergen Hoeller 09cea6e6bb Refined Future exception handling
Issue: SPR-13732
2015-12-21 15:09:09 +01:00
Juergen Hoeller db1171d5c4 Background bootstrapping via "bootstrapExecutor" for LocalContainerEntityManagerFactoryBean and LocalSessionFactoryBean/Builder
Issue: SPR-13732
2015-12-19 15:13:46 +01:00
Juergen Hoeller fca5365cf1 Avoid scoped destruction callbacks in case of no post-processor actually applying
Issue: SPR-13744
2015-12-18 16:54:05 +01:00
Sam Brannen 5b3edcd9f9 Spring Cleaning in December
- Delete unused imports
- Delete unused code
- Clean up warnings
2015-12-17 20:27:33 +01:00
Juergen Hoeller e90942223f Deprecate Hibernate 3 support
Issue: SPR-13230
2015-12-17 17:17:05 +01:00
Juergen Hoeller 9e03e0e73d Polishing 2015-12-15 11:53:40 +01:00
Juergen Hoeller 98be36a306 Extended default collection size for common per-bean caches
Issue: SPR-13621
2015-11-13 08:31:00 +01:00
Johnny Lim 2defb6555e Fix broken Javadoc related to `<` and `>` 2015-11-12 11:22:08 +01:00
Juergen Hoeller 15b88782f7 Polishing 2015-10-07 20:06:18 +02:00
Sam Brannen 3dcf8c1712 Simplify legacy JUnit 3.8 based tests in spring-orm
This is in preparation for a migration from JUnit 3 to JUnit 4.

Issue: SPR-13514, SPR-13515
2015-09-28 01:19:27 +02:00
Sam Brannen d5ee787e1e Migrate JUnit 3 tests to JUnit 4
This commit migrates all remaining tests from JUnit 3 to JUnit 4, with
the exception of Spring's legacy JUnit 3.8 based testing framework that
is still in use in the spring-orm module.

Issue: SPR-13514
2015-09-27 21:17:51 +02:00
Juergen Hoeller a1107af06f HibernateJpaDialect logs warning in case of Connection mismatch (e.g. configured release mode other than ON_CLOSE)
Related to that, HibernateTransactionManager specifically checks for active physical connections on reset as of Hibernate 5.

Issue: SPR-13269
Issue: SPR-13002
2015-08-27 16:41:41 +02:00
Sam Brannen ed20b3771c Clean up warnings on Hibernate support code 2015-07-21 23:39:07 +02:00
Juergen Hoeller 7e2a662f63 Enforce TransactionRequiredException for pre-bound EntityManager without actual transaction active
Issue: SPR-13243
2015-07-17 15:25:29 +02:00
Juergen Hoeller 2f8ac91872 Only attempt to call joinTransaction in case of actual transaction active
Issue: SPR-13242
2015-07-17 15:24:52 +02:00
Juergen Hoeller 11ec9998ae Note on 'generateDdl' versus JPA 2.1 schema generation
Issue: SPR-13040
2015-07-07 16:44:33 +02:00
Sam Brannen 6c530b7bfb Delete trailing whitespace in XML files 2015-06-19 17:14:10 +02:00
Juergen Hoeller b4095c3e1d Class identity comparisons wherever possible
Issue: SPR-12926
2015-05-20 14:34:16 +02:00
Juergen Hoeller cf0a916793 Consistent non-public AsyncRequestInterceptor classes
Issue: SPR-11694
2015-05-09 18:05:31 +02:00
Juergen Hoeller f9c3910341 Support for Hibernate ORM 5.0 Beta 2
Issue: SPR-11694
2015-05-09 17:55:18 +02:00
Sam Brannen e581244370 Delete legacy JdbcTestUtils in spring-orm 2015-04-14 22:15:31 +02:00
Juergen Hoeller c8cc8b7cbd Removed outdated references to Servlet 2.3/2.4
(cherry picked from commit 673dac5)
2015-03-24 21:24:12 +01:00
Juergen Hoeller 5b09723bb4 Polishing 2015-03-24 19:20:34 +01:00
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
Stephane Nicoll babbf6e871 Harmonize resources location
Issue: SPR-12766
2015-02-28 10:32:40 +01:00
Sam Brannen 40449e2741 Suppress warnings in tests
This commit suppresses warnings in test classes that were polluting the
Gradle build output.
2014-12-31 02:10:30 +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 6b6ca4889b HibernateTransactionManagerTests for Hibernate 3 covers currentSession() as well
Issue: SPR-9020
2014-08-09 18:30:08 +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
Sam Brannen 32b87079cb Re-enable Hibernate EntityManagerFactory tests
HibernateEntityManagerFactoryIntegrationTests in the spring-orm module
has been disabled for quite some time due to a dependency on the
AnnotationBeanConfigurerAspect from the spring-aspects module. Since
spring-aspects depends on spring-orm, a cyclical dependency would
result if this code were re-enabled "as is".

This commit removes the dependency on AnnotationBeanConfigurerAspect in
HibernateEntityManagerFactoryIntegrationTests by deleting all test code
and configuration related to @Configurable. In addition, this commit
also deletes all SessionFactory-specific test code in
HibernateEntityManagerFactoryIntegrationTests, allowing the test class
to focus on Hibernate as a JPA provider.

Issue: SPR-11922
2014-07-02 13:10:19 +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
Sam Brannen 50b21d061f Add TODO for fate of Hibernate JPA integration tests
Issue: SPR-11922
2014-06-26 14:41:06 +02:00
Sam Brannen 158cb346a5 Re-enable OpenJPA + AspectJ tests
With the upgrade to JDK 8, the OpenJPA/AspectJ integration tests now
pass again. Thus, we are re-enabling these tests.

Issue: SPR-10333
2014-06-26 14:41:06 +02:00
Sam Brannen e73b8b31f8 Delete accidental call to System.err 2014-06-26 14:41:05 +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
Sam Brannen 502022acca Delete test annotations in spring-orm
This commit deletes all test annotations from the spring-orm module in
order to reduce unnecessary confusion between these "copies" and the
real, current versions of such classes in the spring-test module.

Furthermore, the legacy abstract JUnit 3.8 base classes and test cases
have been refactored accordingly.
2014-06-25 21:25:00 +02:00
Juergen Hoeller 18131bf611 Consistent declaration of private static final logger variables
Issue: SPR-11905
2014-06-24 14:02:05 +02:00
Sam Brannen f1517f03ff Delete remaining SimpleJdbcTemplate usage
This commit deletes all remaining usage of the deprecated
SimpleJdbcTemplate class within the framework itself.

Issue: SPR-11895
2014-06-22 15:40:41 +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
Stephane Nicoll 5559209233 Remove useless imports 2014-04-22 09:57:12 +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