org.broadleafcommerce.common.jmx
Class MetadataNamingStrategy
java.lang.Object
org.springframework.jmx.export.naming.MetadataNamingStrategy
org.broadleafcommerce.common.jmx.MetadataNamingStrategy
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean, org.springframework.jmx.export.naming.ObjectNamingStrategy
public class MetadataNamingStrategy
- extends org.springframework.jmx.export.naming.MetadataNamingStrategy
The MetadataNamingStrategy 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
| Methods inherited from class org.springframework.jmx.export.naming.MetadataNamingStrategy |
afterPropertiesSet, setAttributeSource, setDefaultDomain |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetadataNamingStrategy
public MetadataNamingStrategy()
getObjectName
public ObjectName getObjectName(Object managedBean,
String beanKey)
throws MalformedObjectNameException
- Specified by:
getObjectName in interface org.springframework.jmx.export.naming.ObjectNamingStrategy- Overrides:
getObjectName in class org.springframework.jmx.export.naming.MetadataNamingStrategy
- Throws:
MalformedObjectNameException
Copyright © 2012. All Rights Reserved.