INT-3852: Support ObjectName Customization
JIRA: https://jira.spring.io/browse/INT-3852 Custom object names in `@IntegrationManagedResource` were ignored. Some EIP objects were wrapped with their `Lifecycle` in order to expose a single MBean with all attributes and operations. This process "hid" the annotation so the object namer failed to detect the presence of a custom object name or the other attributes. Also, update the `@IntegrationManagedResource` to use the Spring 4.2 `@AliasFor` annotation. INT-3852: Polishing Polishing - Test with Proxy
This commit is contained in:
committed by
Artem Bilan
parent
ccc1568b89
commit
2fb039004d
@@ -22,11 +22,13 @@ import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import org.springframework.core.annotation.AliasFor;
|
||||
import org.springframework.jmx.export.annotation.ManagedResource;
|
||||
|
||||
/**
|
||||
* Clone of {@link ManagedResource} limiting beans thus annotated so that they
|
||||
* will only be exported by the {@code IntegrationMBeanExporter}.
|
||||
* will only be exported by the {@code IntegrationMBeanExporter} and prevented
|
||||
* from being exported by other MBeanExporters (if present).
|
||||
*
|
||||
* @author Gary Russell
|
||||
* @since 4.2
|
||||
@@ -43,8 +45,10 @@ public @interface IntegrationManagedResource {
|
||||
* attribute, for simple default usage.
|
||||
* @return the value.
|
||||
*/
|
||||
@AliasFor("objectName")
|
||||
String value() default "";
|
||||
|
||||
@AliasFor("value")
|
||||
String objectName() default "";
|
||||
|
||||
String description() default "";
|
||||
|
||||
Reference in New Issue
Block a user