[SNMP4J] problem to access tables with several indexes
wafae alami
alami.ouafae at gmail.com
Tue Sep 1 16:14:38 CEST 2009
Hi ,
I have a problem to access tables with more than one index . when I make a
get on table attribute , I get a random behavior , the response display the
same row a lot of time with different index :
ex:
Sent get request to 127.0.0.1 : 8001
gciCompName.19896612:-->JMX
gciCompName.21281279:-->JMX
Sent get request to 127.0.0.1 : 8001
gciJMXGatewayCompName.18634171:-->JMX
I ovveride the mapToRowMBean method as folow :
String oname ="ProxyPlatform:type=PPFCompMBean,compName=JMX,*";
JMXIndexSupport gciIndexSupport =
new AbstractSyntheticJMXIndexSupport() {
public ObjectName mapToRowMBean(Object rowIdentifier) {
try {
* if(rowIdentifier instanceof Object[]){
Object[] rows=(Object[])rowIdentifier;
return new ObjectName(oname+",groupName="
+rows[0]+",instName="+rows[1] );
} *
else
return new ObjectName(oname+",name=" + rowIdentifier);
}
catch (Exception ex) {
ex.printStackTrace();
return null;
}
}
};
while this table has two indexes : GroupName and InstName
Is this the rghit way to define it for multiple indexes sould I do
differently ?
Thanks in advance
Ouafae .
More information about the SNMP4J
mailing list