[SNMP4J] incomplete persistence

Frank Fock fock at agentpp.com
Tue Jan 12 00:27:51 CET 2010


This is indeed a bug, I have moved the unregisterMIBs line
below saveState().

On 11.01.2010 21:28, Clement_Pellerin at ibi.com wrote:
> 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);
>    }
>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list