[SNMP4J] agent-jmx methods
david pocivalnik
dp.desoma at gmail.com
Mon Mar 4 16:50:17 CET 2013
Hi,
i'm having a method that should add actions to the MIB, and I also add
the OID's to the ACTION_OIDS array.
here's some code:
Object[][] ret = new Object[mappings.length][3];
for (int cnt = 0; cnt < mappings.length; cnt++) {
ret[cnt][0] = mappings[cnt].getOid(dynIndex);
MBeanStateInfo[] states = new MBeanStateInfo[] {
new MBeanStateInfo(2, null, null) };
ret[cnt][1] = states;
MBeanActionInfo[] actions = new MBeanActionInfo[] {
new MBeanActionInfo(
mappings[cnt].getActionDef().getActionId(),
mappings[cnt].getActionDef().getMemberName(),
new Object[0] )
};
ret[cnt][2] = actions;
}
scalarSupportActions.addAll(new ObjectName(name), ret);
consider that the OID is correct (everytime an action is found I print
the OID) and unique, also the ActionId is different for each action. A
MOScalar is also registered at the server.
I can call one method (the one method I created long time ago), but none
of the new methods I just created today.
Can you think of anything why the behaviour is like this? access is
always read and write, variables are always the same, and the method
signatures are also the same (except some variation in the method name
of course, but the mapping is correct).
Thanks for hints, that's really confusing.
BR
david
More information about the SNMP4J
mailing list