org.broadleafcommerce.common.jmx
Class MetadataMBeanInfoAssembler
java.lang.Object
org.springframework.jmx.export.assembler.AbstractMBeanInfoAssembler
org.springframework.jmx.export.assembler.AbstractReflectiveMBeanInfoAssembler
org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler
org.broadleafcommerce.common.jmx.MetadataMBeanInfoAssembler
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean, org.springframework.jmx.export.assembler.AutodetectCapableMBeanInfoAssembler, org.springframework.jmx.export.assembler.MBeanInfoAssembler
public class MetadataMBeanInfoAssembler
- extends org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler
The MetadataMBeanInfoAssembler provided by Spring does not allow the usage of JDK dynamic proxies. However, several
of our services are AOP proxied for the sake of transactions, and the default behavior is to use JDK dynamic proxies for this.
It is possible to cause Spring to use CGLIB proxies instead via configuration, but this causes problems when it is desireable
or necessary to use constructor injection for the service definition, since CGLIB proxies require a default, no argument
constructor.
This class enhances the behavior of the Spring implementation to retrieve the rootId object inside the proxy for the sake of
metadata retrieval, thereby working around these shortcomings.
- Author:
- jfischer
| Fields inherited from class org.springframework.jmx.export.assembler.AbstractReflectiveMBeanInfoAssembler |
ATTRIBUTE_OPERATION_VISIBILITY, FIELD_CLASS, FIELD_CURRENCY_TIME_LIMIT, FIELD_DEFAULT, FIELD_DISPLAY_NAME, FIELD_GET_METHOD, FIELD_LOG, FIELD_LOG_FILE, FIELD_METRIC_CATEGORY, FIELD_METRIC_TYPE, FIELD_PERSIST_LOCATION, FIELD_PERSIST_NAME, FIELD_PERSIST_PERIOD, FIELD_PERSIST_POLICY, FIELD_ROLE, FIELD_SET_METHOD, FIELD_UNITS, FIELD_VISIBILITY, ROLE_GETTER, ROLE_OPERATION, ROLE_SETTER |
| Methods inherited from class org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler |
afterPropertiesSet, getAttributeDescription, getDescription, getOperationDescription, getOperationParameters, includeBean, includeOperation, includeReadAttribute, includeWriteAttribute, populateAttributeDescriptor, populateOperationDescriptor, setAttributeSource |
| Methods inherited from class org.springframework.jmx.export.assembler.AbstractReflectiveMBeanInfoAssembler |
applyCurrencyTimeLimit, applyDefaultCurrencyTimeLimit, createModelMBeanOperationInfo, getClassForDescriptor, getDefaultCurrencyTimeLimit, isExposeClassDescriptor, isUseStrictCasing, setDefaultCurrencyTimeLimit, setExposeClassDescriptor, setUseStrictCasing |
| Methods inherited from class org.springframework.jmx.export.assembler.AbstractMBeanInfoAssembler |
getClassName, getClassToExpose, getClassToExpose, getConstructorInfo, getMBeanInfo, getTargetClass |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.springframework.jmx.export.assembler.MBeanInfoAssembler |
getMBeanInfo |
MetadataMBeanInfoAssembler
public MetadataMBeanInfoAssembler()
checkManagedBean
protected void checkManagedBean(Object managedBean)
throws IllegalArgumentException
- Overrides:
checkManagedBean in class org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler
- Throws:
IllegalArgumentException
getNotificationInfo
protected ModelMBeanNotificationInfo[] getNotificationInfo(Object managedBean,
String beanKey)
- Overrides:
getNotificationInfo in class org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler
populateMBeanDescriptor
protected void populateMBeanDescriptor(Descriptor desc,
Object managedBean,
String beanKey)
- Overrides:
populateMBeanDescriptor in class org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler
getAttributeInfo
protected ModelMBeanAttributeInfo[] getAttributeInfo(Object managedBean,
String beanKey)
throws JMException
- Overrides:
getAttributeInfo in class org.springframework.jmx.export.assembler.AbstractReflectiveMBeanInfoAssembler
- Throws:
JMException
getOperationInfo
protected ModelMBeanOperationInfo[] getOperationInfo(Object managedBean,
String beanKey)
- Overrides:
getOperationInfo in class org.springframework.jmx.export.assembler.AbstractReflectiveMBeanInfoAssembler
Copyright © 2013. All Rights Reserved.