org.broadleafcommerce.profile.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.profile.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 |
|
Method Summary |
protected void |
checkManagedBean(java.lang.Object managedBean)
|
protected javax.management.modelmbean.ModelMBeanAttributeInfo[] |
getAttributeInfo(java.lang.Object managedBean,
java.lang.String beanKey)
|
protected javax.management.modelmbean.ModelMBeanNotificationInfo[] |
getNotificationInfo(java.lang.Object managedBean,
java.lang.String beanKey)
|
protected javax.management.modelmbean.ModelMBeanOperationInfo[] |
getOperationInfo(java.lang.Object managedBean,
java.lang.String beanKey)
|
protected void |
populateMBeanDescriptor(javax.management.Descriptor desc,
java.lang.Object managedBean,
java.lang.String beanKey)
|
| 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(java.lang.Object managedBean)
throws java.lang.IllegalArgumentException
- Overrides:
checkManagedBean in class org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler
- Throws:
java.lang.IllegalArgumentException
getNotificationInfo
protected javax.management.modelmbean.ModelMBeanNotificationInfo[] getNotificationInfo(java.lang.Object managedBean,
java.lang.String beanKey)
- Overrides:
getNotificationInfo in class org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler
populateMBeanDescriptor
protected void populateMBeanDescriptor(javax.management.Descriptor desc,
java.lang.Object managedBean,
java.lang.String beanKey)
- Overrides:
populateMBeanDescriptor in class org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler
getAttributeInfo
protected javax.management.modelmbean.ModelMBeanAttributeInfo[] getAttributeInfo(java.lang.Object managedBean,
java.lang.String beanKey)
throws javax.management.JMException
- Overrides:
getAttributeInfo in class org.springframework.jmx.export.assembler.AbstractReflectiveMBeanInfoAssembler
- Throws:
javax.management.JMException
getOperationInfo
protected javax.management.modelmbean.ModelMBeanOperationInfo[] getOperationInfo(java.lang.Object managedBean,
java.lang.String beanKey)
- Overrides:
getOperationInfo in class org.springframework.jmx.export.assembler.AbstractReflectiveMBeanInfoAssembler
Copyright © 2011. All Rights Reserved.