Re: SNMP Buffer OverFlow Exception
Frank Fock <
fock@...>
2013-05-02 15:10:59 GMT
Hi,
You probably misunderstood me. You do not need to synchronize anything,
just make sure that a PDU object is not modified after Snmp.send*
has been called. SNMP4J does not make an internal copy of the PDU
object for performance reasons. Thus, if you modify the object while
it is being send out, you get wrong results and BufferOverflowExceptions.
Best regards,
Frank
Am 02.05.2013 11:41, schrieb Ballarpure, Akshay (NSN - IN/Hyderabad):
> Thanks a lot Frank for information.
>
> BTW, What is the fix here ?
> Do I need to synchronize transport mapping only ?
>
> Here is how I can create transport mapping.
>
> private Snmp createSnmpSession (InetAddress address, int port)
> throws IOException
> {
> s_logger.info ("Creating Snmp Session: " +
> "addr = " + address + ", port = " + port);
>
> TransportMapping transport = null;
> if(address != null && port != -1)
> {
> transport = new DefaultUdpTransportMapping (
> new UdpAddress (address, port));
(Continue reading)