[jboss-user] [Management, JMX/JBoss] - Re: Persistence not quite working

bossy do-not-reply at jboss.com
Wed Jan 31 05:36:14 EST 2007


Aaa, but the attributes are updated through the MBean server, I just don't use a setter. What I've got is a separate method( exposed in the MBean) that does the job. It's the one called increaseCount
So my stats-config.xml look like this

<!DOCTYPE mbean PUBLIC
  |    "-//JBoss//DTD JBOSS XMBEAN 1.0//EN"
  |    "http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_0.dtd">
  | 
  | <mbean>
  |    <description></description>
  | 
  |    <descriptors>
  |       <persistence persistPolicy="OnUpdate"
  |          persistPeriod="10"
  |          persistLocation="${jboss.server.data.dir}"
  |          persistName="StatsJNDIMap.ser"/>
  |       <currencyTimeLimit value="10"/>
  |       <state-action-on-update value="keep-running"/>
  |       <persistence-manager value="org.jboss.mx.persistence.ObjectStreamPersistenceManager" />
  |    </descriptors>
  | 
  |    <class>org.jboss.test.jmx.xmbean.JNDIMap</class>
  | 
  |    <constructor>
  |       <description>The default constructor</description>
  |       <name>JNDIMap</name>
  |    </constructor>
  | 
  | 
  |    <!-- Attributes -->
  | 
  |    <attribute access="read-write" getMethod="getStartDate" setMethod="setStartDate">
  |       <description>Start Date</description>
  |       <name>Start Date</name>
  |       <type>java.lang.String</type>
  |    </attribute>
  | 
  | 
  |    <attribute access="read-only" getMethod="getInBoxReqCount" >
  |       <description>Number of requests</description>
  |       <name>Get Message Requests</name>
  |       <type>java.lang.String</type>
  | 
  |    </attribute>
  | 
  |    <operation impact="ACTION" >
  |       <description>increase Count</description>
  |       <name>increaseCount</name>
  |       <parameter>
  |          <description>Property</description>
  |          <name>prop</name>
  |          <type>java.lang.String</type>
  |       </parameter>
  |    </operation>
  |   ... more
	

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008733#4008733

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008733



More information about the jboss-user mailing list