Commit Graph

709 Commits

Author SHA1 Message Date
Juergen Hoeller
ce4e795f09 Polishing 2015-05-11 18:05:09 +02:00
Juergen Hoeller
6783ba2903 @Bean-returned FactoryBean proxy delegates to actual target instance now
Issue: SPR-12915
(cherry picked from commit 1da98b0)
2015-05-11 15:30:57 +02:00
Juergen Hoeller
50f49774bc CronSequenceGenerator explicitly rejects invalid incrementer delta
Issue: SPR-12871
(cherry picked from commit ceb17fc)
2015-04-01 17:11:56 +02:00
Juergen Hoeller
35bf96763d Polishing 2015-03-31 18:42:28 +02:00
Juergen Hoeller
e9e2b7369e Clarification: Lifecycle does not imply auto-startup semantics
Issue: SPR-12855
(cherry picked from commit 7e22623)
2015-03-31 18:40:27 +02:00
Juergen Hoeller
97f779674f Polishing 2015-03-25 15:28:30 +01:00
Stephane Nicoll
5f6ae13002 Only require an exception CacheResolver if necessary
Previously, a cache infrastructure with only a CacheResolver would have
worked fine until the JSR-107 API is added to the classpath. When this is
the case, the JCache support kicks in and an exception cache resolver is
all of the sudden required.

The CacheResolver _is_ different as the default implementation does look
different attributes so if a custom CacheResolver is set, it is not
possible to "reuse" it as a fallback exception CacheResolver.

Now, an exception CacheResolver is only required if a JSR-107 annotation
with an "exceptionCacheName" attribute is processed (i.e. the exception
CacheResolver is lazily instantiated if necessary).

The use case of having a CachingConfigurerSupport with only a
CacheResolver was still broken though since the JCache support only looks
for a JCacheConfigurer bean (per the generic type set on
AbstractCachingConfiguration). This has been fixed as well.

Issue: SPR-12850
(cherry picked from commit 314b069)
2015-03-25 15:26:00 +01:00
Juergen Hoeller
52ed9b7106 Consistent javadoc param declarations for type variables
(cherry picked from commit d23893f)
2015-03-25 01:02:40 +01:00
Juergen Hoeller
34aac078b1 Deferred import processing reliably detects late registration attempts
Issue: SPR-12838
(cherry picked from commit 1a8c6fa)
2015-03-23 22:02:41 +01:00
Juergen Hoeller
8d14e7736a Polishing
(cherry picked from commit 162ee36)
2015-03-21 00:35:08 +01:00
Juergen Hoeller
4446b5fe8a Revised DefaultManagedAwareThreadFactory to make its non-JNDI fallback work
Issue: SPR-12830
(cherry picked from commit a3e5fbf)
2015-03-20 23:56:50 +01:00
Juergen Hoeller
b352dbfdeb Polishing (in particular updating javadoc references to Apache Commons)
(cherry picked from commit bc6a98c)
2015-03-13 20:13:21 +01:00
Stephane Nicoll
406adb3381 Call AsyncUncaughtExceptionHandler when necessary
If a sub-class of Future (such as ListenableFuture) is used as a return
type and an exception is thrown, the AsyncUncaughtExceptionHandler is
called. Now checking for any Future implementation instead of a faulty
strict matching.

Issue: SPR-12797
2015-03-09 09:59:12 +01:00
Sam Brannen
bac012f3e8 Support @NumberFormat as a meta-annotation
This commit ensures that @NumberFormat can be used as a
meta-annotation, as was already the case for @DateTimeFormat.

In addition, this commit polishes FormattingConversionServiceTests and
MvcNamespaceTests.

Issue: SPR-12743
(backported from commits df1d90f & c3408d8)
2015-03-07 21:44:42 +01:00
Juergen Hoeller
7ed7f981c9 Polishing
(cherry picked from commit b541fc9)
2015-03-06 18:50:49 +01:00
Juergen Hoeller
3783591083 Polishing
(cherry picked from commit e5207e6)
2015-03-02 21:56:21 +01:00
Juergen Hoeller
1259671f3f LoadTimeWeavingConfiguration should not rely on private field injection
Issue: SPR-12776
2015-03-02 21:42:01 +01:00
Sam Brannen
b6f22aa514 Fully support XML config in GroovyBeanDefinitionReader
Prior to this commit, the GroovyBeanDefinitionReader claimed (via its
Javadoc) that it fully supported XML configuration files in addition to
its Groovy DSL; however, this was unfortunately inaccurate since XML
validation was disabled by default which led to certain features of XML
configuration not working. For example, it was impossible to define a
<qualifier> in an XML config file without specifying the 'type'
attribute (which has a default value defined in the spring-beans XSD).

This commit fixes this issue by ensuring that bean definitions in XML
resources are loaded with a "standard" XmlBeanDefinitionReader that is
created with default settings (i.e., with XML validation enabled). With
regard to backwards compatibility, bean definitions defined using the
Groovy DSL are still loaded with an XmlBeanDefinitionReader that has
XML validation disabled by default which is necessary for proper
parsing of the Groovy DSL.

Issue: SPR-12769
(cherry picked from commit 7edc7c2c8f)
2015-02-28 23:19:57 +01:00
Juergen Hoeller
3570a9a94a Polishing
(cherry picked from commit 2b34094)
2015-02-27 22:36:02 +01:00
Juergen Hoeller
772552b9ef Avoid potential deadlocks between event multicaster and singleton registry through shared lock
Issue: SPR-12739
(cherry picked from commit 81102de)
2015-02-26 20:54:00 +01:00
Juergen Hoeller
ce085a606f Revised condition override check based on method names instead of bean names
Issue: SPR-12744
(cherry picked from commit bb5b5d5)
2015-02-25 20:37:47 +01:00
Juergen Hoeller
3b8d878285 ScheduledAnnotationBeanPostProcessor uses target class as cache key in case of proxy
Issue: SPR-12709
(cherry picked from commit 1273c90)
2015-02-18 17:14:33 +01:00
Juergen Hoeller
0706889222 Polishing
(cherry picked from commit 058714b)
2015-02-10 22:58:16 +01:00
Juergen Hoeller
181b35243e Properly honor conditions on overriding bean methods
Issue: SPR-12694
(cherry picked from commit 981aefc)
2015-02-10 21:59:31 +01:00
Stephane Nicoll
09bd7037e9 Allow MBeans to be excluded additively
Previously, one could only set the list of bean names to exclude from
auto-detection and there was no way to add additional bean names.

MBeanExporter now exposes a addExcludedBean method that can be invoked
during the initialization phase to add bean names to ignore.

Issue: SPR-12686
2015-02-09 09:42:00 +01:00
Juergen Hoeller
14a3bf3941 ScheduledAnnotationBeanPostProcessor registers tasks in ContextRefreshedEvent phase (again)
Issue: SPR-12641
(cherry picked from commit 0479ca6)
2015-01-22 19:42:44 +01:00
Juergen Hoeller
1cefeb2af0 Prevent NPE in AbstractApplicationEventMulticaster's non-caching code path
Issue: SPR-12545
2014-12-30 10:01:58 +01:00
Juergen Hoeller
bc075c713f Polishing 2014-12-29 20:34:18 +01:00
Juergen Hoeller
6f2de283c4 Doc: base-packages can be comma/semicolon/space/tab/linefeed-separated
Issue: SPR-12523
2014-12-29 13:39:48 +01:00
Juergen Hoeller
0919a15f91 Spring's JMX support can rely on native MXBean detection on Java 6+
Issue: SPR-12574
2014-12-29 13:26:32 +01:00
Juergen Hoeller
d4a5059097 AnnotationJmxAttributeSource uses AnnotationUtils for consistent meta-annotation handling and diagnostics
Issue: SPR-12572
2014-12-29 13:17:49 +01:00
Stephane Nicoll
cae217de94 Handle scoped proxy properly in MBeanExporter
Previously, if a bean has a scoped proxy and is annotated to be exposed
to the JMX domain, both the scoped proxy and the target instance were
exposed in the JMX domain, resulting in a duplicate entries. Worse, if
such bean defines an explicit name, the application wouldn't start
because of a name conflict.

This commit deals explicitely with scoped proxy and make sure to only
expose the relevant bean.

Issue: SPR-12529
2014-12-23 16:03:52 +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
Juergen Hoeller
ad71c6a91c AbstractApplicationEventMulticaster populates ListenerRetriever cache in fully synchronized fashion
Issue: SPR-12545
(cherry picked from commit 61a6bc0)
2014-12-22 18:46:22 +01:00
Juergen Hoeller
b30843aee0 AbstractFallbackTransactionAttributeSource's DefaultCacheKey takes targetClass into account (again)
Issue: SPR-12536
(cherry picked from commit c087e51)
2014-12-22 18:46:07 +01:00
Stephane Nicoll
67f184293b Improve performance of generateKey
Only compute the error message to display when the generated key is
actually null instead of using Assert.notNull as the cache operation
'toString()' method is non trivial and gets computed regardless of the
result.

Issue: SPR-12527
2014-12-10 14:34:11 +01:00
Juergen Hoeller
bb1d1e916e Polishing 2014-12-07 20:52:18 +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
Stephane Nicoll
c1f1cac359 Remove DisposableBeanMethodInterceptor
Previously, any @Configuration class was enhanced to namely implement
DisposableBean in order to remove static callbacks that were registered
for that class. This leads to problem if an ApplicationContext is created
and destroyed within the lifecycle on another ApplicationContext in the
same class loader.

It turns out that the destruction callback is no longer necessary as the
interceptors are now stateless: the VM is free to reclaim any of those if
necessary.

Issue: SPR-12445
2014-12-02 13:56:50 +01:00
Juergen Hoeller
c85686ac78 Polishing 2014-12-01 19:16:31 +01:00
Juergen Hoeller
fa0ef2d87e BeanFactory accepts getBean arguments for non-prototype beans as well
Issue: SPR-12488
2014-12-01 19:05:26 +01:00
Juergen Hoeller
c5c5473d44 Common annotation processing for imported and nested classes within configuration classes
Issue: SPR-12486
2014-12-01 18:54:56 +01:00
Sebastien Deleuze
f39c505069 Remove a Groovy test already covered by testConfigFileParsingError()
The removed test testConfigFileParsingErrorWhenNamedBeans() could cause
a groovyc compilation error, for example when using latest IntelliJ IDEA.

Issue: SPR-12435
2014-11-25 12:03:28 +01:00
Juergen Hoeller
5e3edc667e Support @Validated at method level for overriding validation groups
Issue: SPR-9174
2014-11-24 23:42:48 +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
b4167be52d GroovyBeanDefinitionReader consistently throws BeanDefinitionParsingException for invalid files of any name
Issue: SPR-12435
2014-11-22 16:08:28 +01:00
Juergen Hoeller
4bd75e4146 BeanMethodInterceptor forwards user-provided arguments to getBean(name, args)
Issue: SPR-12443
2014-11-22 16:06:25 +01:00
Juergen Hoeller
6a96850aa7 Polishing 2014-11-06 14:29:43 +01:00
Juergen Hoeller
3c3e07e324 Defensive handling of manually registered singleton names (based on Spring Integration test failure)
Issue: SPR-12404
2014-11-01 23:03:02 +01:00
Juergen Hoeller
0e36402bd2 Revised retrieval of cache strategy beans
Issue: SPR-12336
2014-11-01 08:26:48 +01:00