[SNMP4J] MangedObjects locking

Frank Fock fock at agentpp.com
Wed May 27 00:39:33 CEST 2015


Hi Asaf,

The MOServer.lock only blocks write access to a ManagedObject from a 
different object (=request) than the
object (=request) that acquired the lock.

If you want to block any access, the easiest way is to make unregister 
the ManagedObject
before it is being updated and then reregistering it. The problem with 
that is a concurrent request
may be still using the unregistered ManagedObject because it entered 
that object before it
has been actually unregistered.

Do you really need to block any request?

Anyway, I will think about the best way how to implement this 
(optionally) in SNMP4J-Agent
as I agree that in certain situations it could be helpful.

Best regards,
Frank


Am 26.05.2015 um 15:17 schrieb Asaf Schoen:
> Hi Frank,
> I implemented a SNMP Agent using your library, and wondered how can I lock the agent (block it from answer any request) during the update period of the managed objects (each round minute).
> According to the documentation, I thought that I could use the MOServer's lock function, but it doesn't seem to work.
> What am I missing?
> Thanks,
> Asaf
>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> https://oosnmp.net/mailman/listinfo/snmp4j

-- 
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax:   +49 7024 8688231




More information about the SNMP4J mailing list