I have created a resource that has a property that is supposed to be a Muse
Metric. I have followed the example of adding WSDM Metrics, and the
application works, however the only metric that gets returned to the client
is the duration, and it does not receive the last update. Part of the
Resource definition looks like this

<wsrmd:Property modifiability="read-only" mutability="mutable"
            name="myns:JVMMetric"
xmlns:myns="http://ws.apache.org/muse/test/pmi/jvm";
xmlns:muws2="http://docs.oasis-open.org/wsdm/muws2-2.xsd";>
               
<muws2:Capability>http://docs.oasis-open.org/wsdm/muws/capabilities/Metrics</muws2:Capability>
                    <muws2:TimeScope>Interval</muws2:TimeScope>
                    <muws2:GatheringTime>Periodic</muws2:GatheringTime>
                    <muws2:CalculationInterval>PT30S</muws2:CalculationInterval>
                     <muws2:ChangeType>Gauge</muws2:ChangeType>
            <wsrmd:ValidValues/>
            <wsrmd:StaticValues/>
            <wsrmd:InitialValues/>
        </wsrmd:Property>

and what I get returned to the client using the MetricsClient looks like
this:

<soapenv:Body>
        <wsrf-rp:GetResourcePropertyResponse
            xmlns:tns="http://axis2.platform.core.muse.apache.org";
xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2";>
            <myns:JVMMetric Duration="PT30S"
xmlns:myns="http://ws.apache.org/muse/test/pmi/jvm";>
                <myns:HeapSize>
                    <myns:LowerBound>51200</myns:LowerBound>
                    <myns:UpperBound>262144</myns:UpperBound>
                    <myns:LowerHighMark>51200</myns:LowerHighMark>
                    <myns:UpperHighMark>51838</myns:UpperHighMark>
                    <myns:Current>51838</myns:Current>
                </myns:HeapSize>
                <myns:UpTime>
                    <myns:Count>451279</myns:Count>
                </myns:UpTime>
            </myns:JVMMetric>
        </wsrf-rp:GetResourcePropertyResponse>
    </soapenv:Body>
</soapenv:Envelope>

The metric gets update certainly as the up time count keeps changing.

Is there anything extra that I need to do in order to make the change
listener update the metric?



I also have a second question: how would I go about adding my own Metric
capability in Muse - which would update the values of the metric fields
differently then the default implementation. Is there any way to say what
MetricCapability to use via XML, or do I have to change Muse source code?

-- 
View this message in context: 
http://www.nabble.com/Muse-Metric-not-displaying-last-update-field-tf3602958.html#a10065444
Sent from the Muse User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to