Commit Graph

823 Commits

Author SHA1 Message Date
Juergen Hoeller ef7cf2c650 Revised description of event source parameter
Issue: SPR-13021
2015-05-13 14:58:02 +02:00
Juergen Hoeller 02da2e85ee DataBinder allows for adding custom Formatters as alternative to PropertyEditors (including per-field formatters)
Includes a generic FormatterPropertyEditorAdapter plus Number conversion support in TypeConverterDelegate.

Issue: SPR-7773
Issue: SPR-6069
2015-05-12 22:33:18 +02:00
Juergen Hoeller 64a01d64c5 Polishing 2015-05-11 14:42:45 +02:00
Philippe Marschall 994d86992c Avoid eager formatting in pre-condition checks
In general, the Spring Framework aims to construct error message
strings only if an actual error has occurred. This seems to be the
common pattern in the codebase and saves both CPU and memory. However,
there are some places where eager error message formatting occurs
unnecessarily.

This commit addresses this issue in the following classes:
AdviceModeImportSelector, AnnotationAttributes, and
ReadOnlySystemAttributesMap.

The change in ReadOnlySystemAttributesMap also avoids a potential
NullPointerException.

Issue: SPR-13007
2015-05-10 12:36:01 +02:00
Juergen Hoeller 1722fa6678 JSR-223 based StandardScriptFactory (including <lang:std> support)
This commit also completes 4.2 schema variants in spring-context.

Issue: SPR-5215
2015-05-08 23:56:08 +02:00
Sam Brannen 4bf32578b5 Rename MethodBasedEvaluationContextTest to *Tests 2015-05-08 18:44:49 +02:00
Juergen Hoeller dbd82d128d Polishing 2015-05-07 20:18:17 +02:00
Juergen Hoeller e87dc9f82d Test for AspectJ pointcuts with lambdas (currently marked as ignored)
Issue: SPR-11807
2015-05-07 19:59:54 +02:00
Juergen Hoeller 1cc042d4c7 Polishing 2015-05-07 16:03:15 +02:00
Sam Brannen 7a690df925 Remove trailing whitespace from Java source code 2015-05-06 20:08:42 +02:00
Sam Brannen 2015781ea1 Rename duplicate EnvironmentIntegrationTests to EnvironmentSystemIntegrationTests 2015-05-06 15:55:20 +02:00
Stephane Nicoll b8f10f69a9 Fix binary compatibility for SmartApplicationListener
Making sure that `GenericApplicationListenerAdapter` implements
`SmartApplicationListener` again as older code may try to cast an
instance to `SmartApplicationListener`.

Issue: SPR-8201
2015-05-06 08:52:47 +09:00
Sam Brannen 572cbb0821 Consistently supply test name to @Parameters 2015-05-05 14:07:00 +02:00
Juergen Hoeller 706d3adf07 Consistently throw IllegalStateException from getAutowireCapableBeanFactory()
Issue: SPR-12932
2015-04-24 23:20:43 +02:00
Sam Brannen 122d3476d9 Polish Javadoc for condition annotation attributes 2015-04-24 01:38:13 +02:00
Sam Brannen ad6bea1cda Support abstract, bridge, & interface methods in AnnotatedElementUtils
This commit introduces support for finding annotations on abstract,
bridge, and interface methods in AnnotatedElementUtils.

 - Introduced dedicated findAnnotationAttributes() methods in
   AnnotatedElementUtils that provide first-class support for
   processing methods, class hierarchies, interfaces, bridge methods,
   etc.

 - Introduced find/get search algorithm dichotomy in
   AnnotatedElementUtils which is visible in the public API as well as
   in the internal implementation. This was necessary in order to
   maintain backwards compatibility with the existing API (even though
   it was undocumented).

 - Reverted all recent changes made to the "get semantics" search
   algorithm in AnnotatedElementUtils in order to ensure backwards
   compatibility, and reverted recent changes to
   JtaTransactionAnnotationParser and SpringTransactionAnnotationParser
   accordingly.

 - Documented internal AnnotatedElementUtils.Processor<T> interface.

 - Enabled failing tests and introduced
   findAnnotationAttributesFromBridgeMethod() test in
   AnnotatedElementUtilsTests.

 - Refactored ApplicationListenerMethodAdapter.getCondition() and
   enabled failing test in TransactionalEventListenerTests.

 - AnnotationUtils.isInterfaceWithAnnotatedMethods() is now package
   private.

Issue: SPR-12738, SPR-11514, SPR-11598
2015-04-24 00:55:48 +02:00
Sam Brannen e0d2dbd21d Polish Javadoc & TODOs in ApplicationListenerMethodAdapter
Issue: SPR-12738
2015-04-23 01:33:47 +02:00
Sam Brannen 86733a98da Polish ApplicationListenerMethodAdapter 2015-04-22 02:54:23 +02:00
Juergen Hoeller 9ed0a56d84 AbstractApplicationContext collects early ApplicationEvents and publishes them once the multicaster is available
Issue: SPR-12902
2015-04-16 18:16:15 +02:00
Juergen Hoeller aa49949d7a Bean type mismatch check accepts assignable values according to ClassUtils
Issue: SPR-12905
2015-04-16 18:15:33 +02:00
Juergen Hoeller e403aefe86 Proper exception in case of an @Bean method call encountering a bean type mismatch
Issue: SPR-12905
2015-04-15 23:37:51 +02:00
Juergen Hoeller 1da98b0542 @Bean-returned FactoryBean proxy delegates to actual target instance now
Issue: SPR-12915
2015-04-15 22:49:53 +02:00
Sam Brannen 96e6406b4b Clarify semantics for multiple profiles in @Profile 2015-04-15 21:56:31 +02:00
Juergen Hoeller fafb823e8d Polishing 2015-04-15 15:13:42 +02:00
Stephane Nicoll e5b505224b Improve exception message
Issue: SPR-12898
2015-04-10 09:20:51 +02:00
Stephane Nicoll 6bc14cc7ae Add cache-related logs
Add a trace log for cache hit and cache miss events.

Issue: SPR-11654
2015-04-07 14:27:43 +02:00
Juergen Hoeller 595cdf05e9 Polishing 2015-04-04 00:23:25 +02:00
Juergen Hoeller e1395a6c68 Avoid repeated exposure of SpringProxy/Advised for fallback interfaces as well
Issue: SPR-12870
2015-04-01 18:54:47 +02:00
Juergen Hoeller 2c637dcb2e ReaderEditor supports Reader injection analogous to InputStreamEditor (from Spring resource location)
Also, EncodedResource implements InputStreamSource now since it declares getInputStream() anyway.

Issue: SPR-12876
2015-04-01 17:02:55 +02:00
Juergen Hoeller ceb17fcaca CronSequenceGenerator explicitly rejects invalid incrementer delta
Issue: SPR-12871
2015-04-01 16:45:24 +02:00
Juergen Hoeller f9c2d1d171 DefaultAopProxyFactory falls back to JdkDynamicAopProxy when encountering JDK proxy as target
Issue: SPR-12870
2015-03-31 16:15:22 +02:00
Juergen Hoeller a15dc08bea @Import allows for importing regular component classes as well
Issue: SPR-11740
2015-03-31 11:39:20 +02:00
Juergen Hoeller 14c891c3b3 MethodValidationPostProcessor provides protected createMethodValidationAdvice template method
Issue: SPR-12863
2015-03-31 10:12:35 +02:00
Juergen Hoeller 7e22623758 Clarification: Lifecycle does not imply auto-startup semantics
Issue: SPR-12855
2015-03-30 21:06:12 +02:00
Juergen Hoeller beae336627 Polishing 2015-03-25 15:22:41 +01:00
Stephane Nicoll 314b069fd8 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
2015-03-25 15:12:08 +01:00
Juergen Hoeller d23893fd25 Consistent javadoc param declarations for type variables 2015-03-25 00:44:01 +01:00
Juergen Hoeller b2308926bc Restored isTypeMatch null behavior and refined typeToMatch parameter name
Issue: SPR-12147
2015-03-23 21:57:03 +01:00
Juergen Hoeller 1a8c6fa5ee Deferred import processing reliably detects late registration attempts
Issue: SPR-12838
2015-03-23 19:58:02 +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
Juergen Hoeller 778a01943b ResolvableType-based type matching at the BeanFactory API level
Issue: SPR-12147
2015-03-18 23:05:13 +01:00
Juergen Hoeller a3e5fbf5ed Revised DefaultManagedAwareThreadFactory to make its non-JNDI fallback work
Issue: SPR-12830
2015-03-18 21:21:46 +01:00
Juergen Hoeller c43acd7675 SpringValidatorAdapter allows for fine-tuning the FieldError representation
Issue: SPR-12819
2015-03-16 21:01:18 +01:00
Juergen Hoeller 768f6e836a Bean class name may contain SpEL expression for late resolution
Issue: SPR-12817
2015-03-16 20:53:41 +01:00
Juergen Hoeller 6c169bd644 Initial support for JSR-354 Money & Currency
Issue: SPR-12209
2015-03-13 19:40:00 +01:00
Juergen Hoeller 13659d645b Consistent support for @Order annotation as alternative to Ordered interface
Issue: SPR-12806
2015-03-13 18:18:33 +01:00
Juergen Hoeller f5b4e18209 @Configuration classes get processed according to their @Order (if applicable)
Issue: SPR-12657
2015-03-13 18:18:21 +01:00
Juergen Hoeller 9d497cbd98 @Bean definitions override scanned classes, plus check whether overriding is actually allowed
Issue: SPR-9567
Issue: SPR-9682
2015-03-13 18:18:06 +01:00
Stephane Nicoll 8f8a85912a 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:57:53 +01:00
Sam Brannen d90cee78ef Remove trailing whitespace in source code 2015-03-07 21:16:18 +01:00
Kazuki Shimizu c746b10da9 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
2015-03-07 21:00:25 +01:00
Sam Brannen 789d904658 Assume TestGroup.PERFORMANCE for AnnotationProcessorPerformanceTests
This commit applies the TestGroup.PERFORMANCE assumption for all test
methods within AnnotationProcessorPerformanceTests.
2015-03-07 15:43:09 +01:00
Juergen Hoeller 71cdf856e1 (Reloadable)ResourceBundleMessageSource allows for custom PropertyResourceBundle/Properties subclasses
Issue: SPR-12666
2015-03-06 17:45:37 +01:00
Juergen Hoeller b541fc9366 Polishing 2015-03-05 18:56:57 +01:00
Stephane Nicoll 772a26a743 polishing
Issue: SPR-12761
2015-03-05 15:36:08 +01:00
Stephane Nicoll 31df7155ab Refine BeanPostProcessorChecker condition
Previously, adding `@EnableAsync` on a blank application would lead to an
info message stating that `ProxyAsyncConfiguration` is not eligible for
getting processed by all BeanPostProcessors. Concretely, this is ok as
such internal configuration is not meant to be a target of such post
processing.

Revisit the condition for non infrastructure bean only. Add the
infrastructure role to a set of internal configuration, including the
`ProxyAsyncConfiguration`.

Issue: SPR-12761
2015-03-05 11:37:11 +01:00
Juergen Hoeller fdd1f83639 Polishing
(cherry picked from commit 3783591)
2015-03-02 22:05:16 +01:00
Juergen Hoeller ab2c721875 LoadTimeWeavingConfiguration should not rely on private field injection
Issue: SPR-12776
(cherry picked from commit 1259671)
2015-03-02 21:58:01 +01:00
Sam Brannen 7edc7c2c8f 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
2015-02-28 23:12:13 +01:00
Stephane Nicoll babbf6e871 Harmonize resources location
Issue: SPR-12766
2015-02-28 10:32:40 +01:00
Juergen Hoeller 2b3409461f Polishing 2015-02-27 22:29:42 +01:00
Sam Brannen fcd60b269e Polish ScheduledTaskRegistrar(Tests) 2015-02-27 19:26:17 +01:00
Juergen Hoeller 81102deedf Avoid potential deadlocks between event multicaster and singleton registry through shared lock
Issue: SPR-12739
2015-02-26 18:35:06 +01:00
Juergen Hoeller 09fde31732 Support for Hibernate Validator 5.2
Issue: SPR-12758
2015-02-26 18:33:53 +01:00
Juergen Hoeller 626748d718 Renamed ScheduledTaskRegistrarTest to ScheduledTaskRegistrarTests
Issue: SPR-12748
2015-02-26 18:33:37 +01:00
Tobias Montagna-Hay 64467b4f59 Provide accessors to scheduled tasks
Updated ScheduledTaskRegistrar to offer accessors to the tasks
it is responsible to schedule.

Issue: SPR-12748
2015-02-26 14:05:45 +01:00
Stephane Nicoll dff2a3d180 Reduce logging level of EventListenerMethodProcessor
Reduce logging level when no target annotation is found a on bean. For
consistency, update ScheduledAnnotationBeanPostProcessor and
JmsListenerAnnotationBeanPostProcessor that define the same log
statement.

Issue: SPR-12574
2015-02-26 13:33:19 +01:00
Juergen Hoeller bb5b5d52ed Revised condition override check based on method names instead of bean names
Issue: SPR-12744
2015-02-25 18:45:28 +01:00
Sam Brannen c3408d869c @NumberFormat & @DateTimeFormat are now @Documented 2015-02-23 23:34:55 +02:00
Juergen Hoeller e3d1a1dda2 @Resource injection points support @Lazy as well
Issue: SPR-12654
2015-02-20 21:53:34 +01:00
Stephane Nicoll 152a7b645f Support for Collection-based return type
If an `@EventListener` annotated method returns a Collection or an Array,
each individual items are now published as an event instead of publishing
one event with said collection.

Issue: SPR-12733
2015-02-20 09:40:16 +01:00
Stephane Nicoll 8fcbdaee24 Handle receive timeout in JmsInvokerClientInterceptor
JmsInvokerClientInterceptor defines a receiveTimeout field but does not
handle such timeout. This commit adds an additional callback that throws
an RemoteTimeoutException instead.

Sub-classes can override the onReceiveTimeout to throw a different
exception or return a fallback RemoteInvocationResult.

Issue: SPR-12731
2015-02-19 17:13:48 +01:00
Stephane Nicoll aabf73dea4 Add Commons Pool 2 support
Deprecated CommonsPoolTargetSource (supporting commons pool 1.5+) in
favor of CommonsPool2TargetSource with a similar contract.

Commons Pool 2.x uses object equality while Commons Pool 1.x used
identity equality. This clearly means that Commons Pool 2 behaves
differently if several instances having the same identity according to
their `Object#equals(Object)` method are managed in the same pool. To
provide a smooth upgrade, a backward-compatible pool is created by
default; use `setUseObjectEquality(boolean)` if you need the standard
Commons Pool 2.x behavior.

Issue: SPR-12532
2015-02-19 13:07:04 +01:00
Stephane Nicoll 1aec6a6cc2 Detect Order on target class as well
Previously, the `@Order` annotation was managed in an inconsistent way
when placed at the implementation level. For simple beans, it was
discovered properly but wasn't for beans requiring a proxy.

OrderComparator.SourceProvider now explicitly allows to return several
order sources; the default implementation returns not only the factory
method (if  any) but also the target class if it happens to be different
from the class of the bean.

Issue: SPR-12636
2015-02-19 09:47:20 +01:00
Juergen Hoeller 1273c90a64 ScheduledAnnotationBeanPostProcessor uses target class as cache key in case of proxy
Issue: SPR-12709
2015-02-18 16:16:05 +01:00
Stephane Nicoll 8eb7beebc8 Order ApplicationListener using @Order
AnnotationListener implementations can now be ordered either using the
`@Order` annotation or by implementing the Ordered interface.

Issue: SPR-12410
2015-02-16 10:41:26 +01:00
Stephane Nicoll 66735d01cf Add exception-handler attribute support for AspectJ
Previously, the exception-handler attribute was not taken care of when
task:annotation-driven is used in AspectJ mode. This commit provides the
expected behavior.

Issue: SPR-12619
2015-02-12 15:25:51 +01:00
Juergen Hoeller 058714b03a Polishing 2015-02-10 19:30:59 +01:00
Juergen Hoeller 981aefc2c0 Properly honor conditions on overriding bean methods
Issue: SPR-12694
2015-02-10 19:26:19 +01:00
Stephane Nicoll 6b3092c236 Clear expression caches on context shutdown
Issue: SPR-12691
2015-02-10 14:47:15 +01:00
Stephane Nicoll 37c04bd9c8 Fix usage of Java8 API 2015-02-10 09:47:34 +01:00
Stephane Nicoll 4741a12fdc Support for transactional event listener
Update the application event listener infrastructure to support events
that are processed according to a transactional phase.

Introduce EventListenerFactory that can be implemented to provide support
for additional event listener types. TransactionalEventListener is a new
annotation that can be used in lieu of the regular EventListener. Its
related factory implementation is registered in the context automatically
via @EnableTransactionManagement or <tx:annotation-driven/>

By default, a TransactionalEventListener is invoked when the transaction
has completed successfully (i.e. AFTER_COMMIT). Additional phases are
provided to handle BEFORE_COMMIT and AFTER_ROLLBACK events.

If no transaction is running, such listener is not invoked at all unless
the `fallbackExecution` flag has been explicitly set.

Issue: SPR-12080
2015-02-10 09:14:33 +01:00
Stephane Nicoll f0fca890bb Annotation-based event listeners
Add support for annotation-based event listeners. Enabled automatically
when using Java configuration or can be enabled explicitly via the
regular <context:annotation-driven/> XML element. Detect methods of
managed beans annotated with @EventListener, either directly or through
a meta-annotation.

Annotated methods must define the event type they listen to as a single
parameter argument. Events are automatically filtered out according to
the method signature. When additional runtime filtering is required, one
can specify the `condition` attribute of the annotation that defines a
SpEL expression that should match to actually invoke the method for a
particular event. The root context exposes the actual `event`
(`#root.event`) and method arguments (`#root.args`). Individual method
arguments are also exposed via either the `a` or `p` alias (`#a0` refers
to the first method argument). Finally, methods arguments are exposed via
their names if that information can be discovered.

Events can be either an ApplicationEvent or any arbitrary payload. Such
payload is wrapped automatically in a PayloadApplicationEvent and managed
explicitly internally. As a result, users can now publish and listen
for arbitrary objects.

If an annotated method has a return value, an non null result is actually
published as a new event, something like:

@EventListener
public FooEvent handle(BarEvent event) { ... }

Events can be handled in an aynchronous manner by adding `@Async` to the
event method declaration and enabling such infrastructure. Events can
also be ordered by adding an `@Order` annotation to the event method.

Issue: SPR-11622
2015-02-10 09:13:02 +01:00
Stephane Nicoll 6d6422acde Support for generics-based events
Update the event publishing infrastructure to support generics-based
events, that is support ApplicationListener implementations that define
a generic event, something like:

public class MyListener
        implements ApplicationListener<GenericEvent<String>> { ... }

This listener should only receive events that are matching the generic
signature, for instance:

public class StringEvent extends GenericEvent<String> { ... }

Note that because of type erasure, publishing an event that defines the
generic type at the instance level will not work. In other words,
publishing "new GenericEvent<String>" will not work as expected as type
erasure will define it as GenericEvent<?>.

To support this feature, use the new GenericApplicationListener that
supersedes SmartApplicationListener to handle generics-based even types via
`supportsEventType` that takes a ResolvableType instance instead of the
simple Class of the event. ApplicationEventMulticaster has an additional
method to multicast an event based on the event and its ResolvableType.

Issue: SPR-8201
2015-02-10 09:08:12 +01:00
Stephane Nicoll 982f9ce6c9 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:41:03 +01:00
Stephane Nicoll c7b324b89b Move cached expression evaluation abstraction
Move MethodCacheKey and related classes to the expression package so that
other parts of the framework can benefit ot it.

CacheExpressionEvaluator is a base class that can be used to cache SpEL
expressions based on its annotation source (i.e. method). Sub-classing
that base class provides a simple to use API to retrieve Expression
instances efficiently.

Issue: SPR-12622
2015-01-26 14:44:14 +01:00
Juergen Hoeller 0479ca68fe ScheduledAnnotationBeanPostProcessor registers tasks in ContextRefreshedEvent phase (again)
Issue: SPR-12641
2015-01-22 18:42:30 +01:00
Sam Brannen 7a6dfe3765 Make MBeanServer integration tests more robust
This commit overhauls several of the tests that interact with an
MBeanServer with the goal of increasing the reliability of these tests.

 - MBeanClientInterceptorTests now uses JUnit "assumptions" instead of
   preemptively returning from test methods, thus allowing such methods
   to be properly marked as "ignored" instead of "passed".

 - MBeanClientInterceptorTests now uses JUnit's support for expected
   exceptions where appropriate.

 - MBeanClientInterceptorTests and RemoteMBeanClientInterceptorTests now
   use Spring's SocketUtils to find an available TCP port when starting
   an MBeanServer instead of aborting the tests when the default JMX
   port is not available.

Issue: SPR-12601
2015-01-12 12:19:11 +01:00
Sam Brannen 08f3a79821 Fix broken test in EnableSchedulingTests
Commit 65d163e changed the textual message of an exception thrown by
ScheduledAnnotationBeanPostProcessor.afterSingletonsInstantiated(), and
this in turn caused the withAmbiguousTaskSchedulers_andSingleTask()
method in EnableSchedulingTests to start failing (albeit only during
'Performance' builds).

This commit updates the assertion to match the current implementation of
ScheduledAnnotationBeanPostProcessor.
2015-01-10 22:30:06 +01:00
Juergen Hoeller 9ac02b319d Remove pre-3.2 deprecated classes and methods
Issue: SPR-12578
2014-12-30 20:05:15 +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