[ mx4j-Bugs-858190 ] Types for setThresholds on GaugeMonitor
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #858190, was opened at 2003-12-11 11:32 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=450647&aid=858190&group_id=47745 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Noah Body (sherington) Assigned to: Nobody/Anonymous (nobody) Summary: Types for setThresholds on GaugeMonitor Initial Comment: I'm not sure if this is a bug, or is a constraint of the specification, but what I am trying to do is this... I have an MBean with an "Amount" field of type java.math.BigDecimal. java.math.BigDecimal extends java.lang.Number. I then want to use a GaugeMonitor to watch high/low thresholds for this attribute. On GaugeMonitor, there is a method setThresholds( Number high, Number, low ), so presumably it is OK to use BigDecimal for these threshold values. When I run my code, I get this warning in the trace output: "Monitor GaugeMonitor on MyServer:type=AmountManager attribute Amount attribute, threshold, offset and modules types don't match" This happens because in GaugeMonitor the "determineType" method checks "targetClass" explicitly for INT, LONG, BYTE, SHORT, FLOAT and DOUBLE and returns "false" if the targetClass is not one of those types. i.e., the determineType method does not check for BigDecimal (presumably BigInteger should work as well). Similar code exists in CounterMonitor where BigInteger should (?) work. So, is this a bug? Or is the use of BigDecimal and BigInteger not allowed? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=450647&aid=858190&group_id=47745 ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click