[SNMP4J] How to stop/restart BaseAgent?

Frank Fock fock at agentpp.com
Thu Mar 13 02:22:06 CET 2008


Mark,

You are right. For SNMP4J-Agent 1.2 I have deprecated
the BaseAgent concept and replaced it by an AgentConfigManager
class which does not impose this and other problems.

Nevertheless, I will fix this bug in BaseAgent for 1.2.

Best regards,
Frank

Mark Gorokhov wrote:
> The method BaseAgent.stop() stops the 'session' and sets it to null. 
> 
> Restarting the agent BaseAgent.run() from STATE_STOPPED recreates the
> 'session' object.
> 
> The following objects 
>     SnmpTargetMIB
>     NotificationOriginatorImpl
>     ProxyForwarderImpl 
> are created in BaseAgent with 'session' object as a parameter in their
> constructors and hold the reference to the original 'session' which is
> stopped and is not valid.
> 
> Is this correct?
> 
> I think that BaseAgent.initSnmpSession() should propagate new active
> 'session' into the above mentioned classes (and probably somewhere else)
> and replace stopped 'session'. This simple task requires missing
> setSession() in these classes.
> 
> Mark
> 
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

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



More information about the SNMP4J mailing list