--------------------------------------------------------------------------------
I want to include an attribute to an XMBean that is of type Map. I need to store in it key/value pairs. I have a class called ConfigXMBean with methods public Map getMyMapProperty() and public void setMyMapProperty(Map prop). In my config-xmbean.xml file I have the following description:
<attribute access="read-write" getMethod="getMyMapProperty" setMethod="setMyMapProperty"> <description>My Map Property </description> <name>setMyMapProperty</name> <type>java.util.Map</type> </attribute>
<descriptors> <persistence persistPolicy="OnUpdate" persistPeriod="10" persistLocation="${jboss.server.data.dir}" persistName="JNDIMap.ser"/> <currencyTimeLimit value="10"/> <state-action-on-update value="keep-running"/> <persistence-manager value="org.jboss.mx.persistence.ObjectStreamPersistenceManager" /> </descriptors>
This is a user question, really.
But I imagine if you aren't calling MBeanServer.setAttribute() and instead calling methods directly on the map, then there's no way for the interceptors to know the attribute was changed.