[jboss-jira] [JBoss JIRA] Reopened: (JBAS-7960) snmp-adaptor.sar: Exporting float jmx attributes does not work
Jason Greene (JIRA)
jira-events at lists.jboss.org
Thu Apr 21 14:27:18 EDT 2011
[ https://issues.jboss.org/browse/JBAS-7960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Greene reopened JBAS-7960:
--------------------------------
Due to feedback from the community, I have split the AS7 and AS6 projects and reopened all unscheduled AS6 issues that are a year or less old. This will make it easier community members to find and work on them.
Future releases beyond 6.1 can be done provided a community member steps up to coordinate them.
> snmp-adaptor.sar: Exporting float jmx attributes does not work
> --------------------------------------------------------------
>
> Key: JBAS-7960
> URL: https://issues.jboss.org/browse/JBAS-7960
> Project: Legacy JBoss Application Server 6
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: JMX
> Affects Versions: JBossAS-5.1.0.GA
> Reporter: Marc Schoechlin
> Assignee: Dimitris Andreadis
> Fix For: No Release
>
>
> Exporting SNMP float values does currently not work with snmp-adaptor.sar.
> Detailed are described in this discussion: http://community.jboss.org/thread/150912
> This bug can be fixed by the attached patch:
> Due to the fact that there is not compatible type in org.opennms.protocols.snmp.*
> Float is converted to String.
> The attached patch is based on:
> ${code}
> $ svn info
> Path: .
> URL: http://anonsvn.jboss.org/repos/jbossas/trunk
> Repository Root: http://anonsvn.jboss.org/repos/jbossas
> Repository UUID: 84be2c1e-ba19-0410-b317-a758671a6fc1
> Revision: 104117
> ${code}
> The patch:
> ${code}
> ndex: varia/src/main/java/org/jboss/jmx/adaptor/snmp/agent/RequestHandlerImpl.java
> ===================================================================
> --- varia/src/main/java/org/jboss/jmx/adaptor/snmp/agent/RequestHandlerImpl.java (revision 104117)
> +++ varia/src/main/java/org/jboss/jmx/adaptor/snmp/agent/RequestHandlerImpl.java (working copy)
> @@ -483,12 +483,21 @@
> {
> ssy = (SnmpObjectId)val;
> }
> - else if (val instanceof SnmpTimeTicks)
> + else if (val instanceof Float)
> + {
> + /*
> + * Due to the fact that there is not compatible type in org.opennms.protocols.snmp.* we convert
> + * Float to String
> + */
> + String in = String.valueOf(val);
> + ssy = new SnmpOctetString(in.getBytes());
> + }
> + else if (val instanceof SnmpTimeTicks)
> {
> ssy = (SnmpTimeTicks)val;
> }
> else
> - log.info("Unknown type for " + be);
> + log.info("Unknown type for " + be + "(Type was "+val.getClass().getName()+")");
> }
> catch (Exception e)
> {
> ${code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list