Commit Graph

196 Commits

Author SHA1 Message Date
Stephane Nicoll
88456d4799 Fix faulty BeanPostProcessorChecker logs with @EnableCaching
Issue: SPR-16896
2018-06-04 15:03:04 +02:00
Juergen Hoeller
849b6ccb8b SchedulerFactoryBean triggers shutdown after registration failure
Issue: SPR-16816
2018-05-16 09:46:31 +02:00
Juergen Hoeller
1ab0850303 Revised mime.types file with cpp extension and updated modification docs
Issue: SPR-16678

(cherry picked from commit 9601d4b)
2018-04-03 13:19:34 +02:00
Juergen Hoeller
4cf1795359 Consistent to/cc/bcc array handling and revised hashCode without text
Issue: SPR-16671

(cherry picked from commit 1cc513d)
2018-03-31 17:02:12 +02:00
Juergen Hoeller
0bc7c47bea Polishing 2018-02-26 13:24:50 +01:00
Juergen Hoeller
8b071633d3 Consistent use of ClassUtils.toClassArray (and related polishing) 2018-02-22 14:27:57 +01:00
Juergen Hoeller
0030ff8711 Polishing 2018-02-13 14:20:07 +01:00
Juergen Hoeller
33d655a634 Consistent handling of InterruptedException (plus setSchedulerFactory)
Issue: SPR-16479
Issue: SPR-16439

(cherry picked from commit 39201ad)
2018-02-12 13:44:54 +01:00
Juergen Hoeller
db7d71503d Polishing 2017-10-23 19:03:56 +02:00
Juergen Hoeller
9fdc4404a5 Backport selected refinements from the nullability efforts
Issue: SPR-15656
2017-09-27 00:10:04 +02:00
Juergen Hoeller
fa2c377405 Downgrade to AspectJ 1.8.9 and merge EhCache 3 tests into spring-context-support
Includes latest applicable updates (Jackson 2.8.10, OkHttp 3.8.1, Undertow 1.3.31, Netty 4.1.15)

Issue: SPR-15836
Issue: SPR-15880
2017-09-08 19:41:27 +02:00
Juergen Hoeller
f80b2d9a94 Revised png and jpeg mappings
Issue: SPR-15546
Issue: SPR-15557
(cherry picked from commit e835f4d)
2017-06-07 17:56:09 +02:00
Stephane Nicoll
226cddadef Add getTargetDataSource to TransactionAwareCacheDecorator
Issue: SPR-15479
2017-04-27 11:36:43 +02:00
Stephane Nicoll
5a80f4f16e Polish 2017-04-27 11:36:35 +02:00
Juergen Hoeller
811d523211 FreeMarkerConfigurationFactory falls back to SpringTemplateLoader on any exception
Issue: SPR-15445
(cherry picked from commit a55a0f2)
2017-04-13 15:56:01 +02:00
Stephane Nicoll
278199d467 Revert "Improve allowNullValue handling when a null value is provided"
This reverts commit fd568f3e96.
2017-02-20 16:36:23 +01:00
Stephane Nicoll
fd568f3e96 Improve allowNullValue handling when a null value is provided
This commit improves `AbstractValueAdaptingCache` to throw a dedicated
exception if `allowNullValues` is `false` and a `null` value is provided
anyway. This avoid a lower-level exception from the cache library that
will miss some context.

Issue: SPR-15173
2017-02-20 16:24:34 +01:00
Juergen Hoeller
0f71f58616 Polishing 2017-02-18 00:52:12 +01:00
Stephane Nicoll
dde9e27630 Polish 2017-02-06 15:31:39 +01:00
Stephane Nicoll
15b174a522 Polish contribution
Closes gh-1292
Issue: SPR-15188
2017-02-06 15:31:31 +01:00
David Brimley
1fcb2608fb Honour ErrorHandler if Cache.put fails
This commit makes sure that the `ErrorHandler` is invoked if the cache
fails to put an element (be it in the main cache or the exception cache).

See gh-1292
Issue: SPR-15188
2017-02-06 15:31:18 +01:00
Juergen Hoeller
28849e0987 Revisit Assert to avoid single-arg assert methods (with refined messages)
Issue: SPR-15196
(cherry picked from commit 1b2dc36)
2017-01-31 10:28:46 +01:00
Juergen Hoeller
9de28d640e Polishing
(cherry picked from commit 3726c6f)
2016-10-21 12:59:59 +02:00
Stephane Nicoll
60e0177d00 Fix typo
See gh-1129
2016-08-10 10:46:43 +02:00
Juergen Hoeller
92d78c10a2 Polishing (backported from master) 2016-07-06 17:13:18 +02:00
Johnny Lim
44e652f99e Remove duplicate words
Closes gh-1039
2016-04-19 08:24:21 +02:00
Juergen Hoeller
4ae065996b Polishing
(cherry picked from commit aa5c12c)
2016-04-08 23:06:25 +02:00
Juergen Hoeller
157dcab56c Cleanup of remaining direct BeanWrapper usage
Issue: SPR-14121
2016-04-07 14:27:22 +02:00
Juergen Hoeller
6db6f23a04 Quartz ResourceLoaderClassLoadHelper explicitly falls back to classpath lookup
Issue: SPR-13706
2016-04-05 12:18:48 +02:00
Juergen Hoeller
8bfba6a07a EhCacheManagerFactoryBean logs cache manager name
Issue: SPR-14110
2016-04-04 14:56:08 +02:00
Juergen Hoeller
14bf6509ec Consistent cache key implementation across transaction and cache attribute sources
Includes consistent applicability of class-level metadata to user-level methods only.

Issue: SPR-14017
Issue: SPR-14095
2016-03-30 14:13:04 +02:00
Juergen Hoeller
a68b910b7c TimerScheduledFuture correctly calculates getDelay result
Issue: SPR-13977
2016-02-24 17:11:36 +01:00
Juergen Hoeller
25be5e060c TaskDecorator callback supported by common TaskExecutor implementations
Issue: SPR-13930
2016-02-17 16:58:02 +01:00
Stephane Nicoll
aed56ea732 Upgrade to Caffeine 2.1.0 2016-01-28 16:50:29 +01:00
Stephane Nicoll
29700658d4 Support Quartz trigger without JobDetail
This commit allows to create a Quartz trigger implementation via
either `CronTriggerFactoryBean` or `SimpleTriggerFactoryBean` even if no
job detail is provided.

Issue: SPR-13604
2016-01-19 18:03:03 +01:00
Juergen Hoeller
773d175681 Polishing 2016-01-13 12:52:05 +01:00
Stephane Nicoll
7d0ebddebe Flag Caffeine as Java8+ only
See also SPR-13824
2015-12-28 15:06:35 +01:00
Stephane Nicoll
19d97c4253 Support for multi-threaded cache access
Previously, if a `@Cacheable` method was accessed with the same key by
multiple threads, the underlying method was invoked several times instead
of blocking the threads while the value is computed. This scenario
typically affects users that enable caching to avoid calling a costly
method too often. When said method can be invoked by an arbitrary number
of clients on startup, caching has close to no effect.

This commit adds a new method on `Cache` that implements the read-through
pattern:

```
<T> T get(Object key, Callable<T> valueLoader);
```

If an entry for a given key is not found, the specified `Callable` is
invoked to "load" the value and cache it before returning it to the
caller. Because the entire operation is managed by the underlying cache
provider, it is much more easier to guarantee that the loader (e.g. the
annotated method) will be called only once in case of concurrent access.

A new `sync` attribute to the `@Cacheable` annotation has been addded.
When this flag is enabled, the caching abstraction invokes the new
`Cache` method define above. This new mode bring a set of limitations:

* It can't be combined with other cache operations
* Only one `@Cacheable` operation can be specified
* Only one cache is allowed
* `condition` and `unless` attribute are not supported

The rationale behind those limitations is that the underlying Cache is
taking care of the actual caching operation so we can't really apply
any SpEL or multiple caches handling there.

Issue: SPR-9254
2015-12-21 13:34:35 +01:00
Stephane Nicoll
3a238a2b61 Polish contribution
Closes gh-921

Issue: SPR-13690
2015-12-18 15:47:13 +01:00
Ben Manes
13aabeef37 Add caching support for Caffeine
Issue: SPR-13690
2015-12-18 15:47:13 +01:00
Juergen Hoeller
a2a9c47e59 Deprecate Velocity support
Issue: SPR-13235
2015-12-17 17:15:57 +01:00
Juergen Hoeller
8ce5e88c66 Require Jackson 2.6+, FreeMarker 2.3.21+, XStream 1.4.5+
Issue: SPR-13062
2015-12-17 17:14:50 +01:00
Juergen Hoeller
dd647659b3 Rearranged cache test class names across several modules 2015-11-26 16:30:44 +01:00
Stephane Nicoll
bf1afdfdc9 Add cache tests for JCache 2015-11-24 10:15:09 +01:00
Stephane Nicoll
610b5a20ea Fix test name 2015-11-23 18:22:53 +01:00
Stephane Nicoll
8dea3c5ade Remove test duplication 2015-11-23 18:19:58 +01:00
Stephane Nicoll
2a2a8d3f93 Allow null values to be cached with @CacheResult
Even though the JSR-107 spec forbids to store null values, our cache
abstraction allows that behaviour with a special handled (and this is
the default behaviour).

While this was working fine with our own set of annotations, the
JSR-107 interceptor counterpart was interpreting the spec sensu strictu.

We now allow for that special case as well.

Issue: SPR-13641
2015-11-09 13:04:40 +01:00
Juergen Hoeller
112781fb47 Reliable null value handling in ConcurrentMapCache, GuavaCache, JCacheCache
The 4.2 variant of this fix includes a common AbstractValueAdaptingCache base class and a common NullValue holder class.

Issue: SPR-13553
2015-10-09 22:55:18 +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
525d111210 Polishing 2015-09-24 16:43:26 +02:00