[SNMP4J] incomplete persistence

Clement_Pellerin at ibi.com Clement_Pellerin at ibi.com
Mon Jan 11 21:28:52 CET 2010


I believe AgentConfigManager.shutdown() is incorrect because it unregisters the MIBs before it saves the state. When we finally reach saveState(), only the application MIBs are still known to the MOServer. The result is we never store the USM or VACM in persistent storage. Should the call to unregisterMIBs(null) be moved below the call to saveState()?

 public void shutdown() {
    suspendProcessing();
    unregisterMIBs(null);
    try {
      session.close();
      session = null;
    }
    catch (IOException ex) {
      logger.warn("Failed to close SNMP session: "+ex.getMessage());
    }
    saveState();
    runState.setState(STATE_SHUTDOWN);
  }




More information about the SNMP4J mailing list