Commit Graph

265 Commits

Author SHA1 Message Date
Juergen Hoeller
ca24fd50b0 Rethrow original BeanCreationException if fallback producer fails
Closes gh-22689
2019-03-27 16:01:18 +01:00
Spring Operator
540759ec41 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 6515 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-23 15:19:34 +01:00
Yoann Rodière
17caac8f1f Add tests for SpringBeanContainer (Hibernate ORM integration) and fix the behavior when requesting named beans (#22260)
* Add integration tests for SpringBeanContainer (Hibernate ORM integration)
* Autowire bean properties of beans retrieved by name in SpringBeanContainer
* Add integration tests for fallback cases in SpringBeanContainer (Hibernate ORM integration)
* Fix SpringBeanContainer incorrectly losing the bean name when calling the fallback producer

(cherry picked from commit 00855c4f5f)
2019-02-05 16:01:40 +01:00
Juergen Hoeller
c024bdcc6f Cleanup after unexpected exception from external delegation call
Issue: SPR-17559
2018-12-04 02:15:47 +01:00
Juergen Hoeller
7854b7ac40 Avoid log statements between resource opening and returning
Issue: SPR-17559
2018-12-03 23:50:50 +01:00
Juergen Hoeller
0841dc5f99 Restore Hibernate ORM 5.1 compatibility in HibernateTransactionManager
Issue: SPR-17557
2018-12-03 18:27:30 +01:00
Juergen Hoeller
bf272b0b21 Nullability fine-tuning based on IntelliJ IDEA 2018.3 inspection
Issue: SPR-15540
2018-11-22 16:12:38 +01:00
Juergen Hoeller
3681d58e98 SpringBeanContainer leniently applies fallback on any BeansException
Issue: SPR-17430
2018-10-25 18:06:06 +02:00
Juergen Hoeller
d9e7253532 SpringBeanContainer exposes bean instance returned from initializeBean
Issue: SPR-17332
2018-10-09 23:13:58 +02:00
Juergen Hoeller
78cad0fdd3 HibernateTransactionManager lazily acquires JDBC Connection
Aligned with HibernateJpaDialect, using ConnectionHandle as functional interface now. Also, LazyConnectionDataSourceProxy supports Connection holdability as applied by HibernateTransactionManager, for use with prepareConnection=true.

Issue: SPR-17216
2018-08-31 12:40:04 +02:00
stsypanov
7dba79c7c1 Use String::isEmpty instead of "".equals(arg) when arg is not null 2018-08-26 22:48:21 +02:00
Juergen Hoeller
e64c6dfa3d MergedBeanDefinitionPostProcessors clear internal caches on bean reset
Issue: SPR-17126
2018-08-06 15:41:35 +02:00
Juergen Hoeller
c46dacc209 Support for deferred access to StoredProcedureQuery output parameters
Issue: SPR-17115
2018-08-02 14:30:55 +02:00
Juergen Hoeller
9a43d2ec20 Revised log levels: less WARN and INFO, fine-tuned DEBUG vs TRACE
Issue: SPR-16946
2018-07-20 15:05:16 +02:00
Juergen Hoeller
9c08a482d1 Prefer ArrayList/ArrayDeque over LinkedList for multi-element holders
LinkedList remains in place where a List is likely to remain empty or single-element (in order to avoid unused capacity).

Issue: SPR-17037
2018-07-18 22:17:42 +02:00
Juergen Hoeller
93d91219fd Support for "cacheRegionFactory" injection with Hibernate 5
Issue: SPR-17043
2018-07-16 13:03:46 +02:00
Juergen Hoeller
a80c5121fe Polishing 2018-07-09 15:53:44 +02:00
Juergen Hoeller
d9e8d3bbe1 Custom "jdbcExceptionTranslator" on HibernateJpaDialect
Also available on LocalSessionFactoryBean through HibernateExceptionTranslator, as with our former Hibernate 3 support.

Issue: SPR-17015
2018-07-09 15:52:36 +02:00
Juergen Hoeller
d2eb4d2671 SpringBeanContainer falls back to Hibernate's default producer
Issue: SPR-17010
2018-07-05 17:54:07 +02:00
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
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
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
3c8c99664f Query termination for JPA 2.1 StoredProcedureQuery.execute() method
Issue: SPR-16826
2018-05-16 00:44:52 +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
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
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
39201adca4 Consistent handling of InterruptedException
Issue: SPR-16479
2018-02-10 13:03:33 +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