SNMP RMI API Sends the same alarm twice

by 
 on 16-Apr-2009 02:43 PM.
  in  OEMs & Developers 
We are using the SMNP RMI API,



The problem with this is the same alarm is received twice in the Trap Receiver,



SomeBackground :



In the TrapListener class we are starting a daemon thread which will be running in background.
Now we are adding the trapListener object to �trapReceiver.addTrapListener(<trapListener object>)�
Now I remove the trapListener from the trap receiver and do the following steps.
trapReceiver.removeTrapListener(this);
trapReceiver.releaseResources();
Now I am adding the �trapReceiver.addTrapListener(<trapListener object>)� again.


I believe after these steps the same alarm is sent twice by Adventnet, Eventhough I have called the removeTrapListener() and releaseResources(); Think the reference are not removed and the trap listener registered previously is still active.


Could you please let us know what could be the problem?
  • No status
Hi,

Either of the methods releaseResources() and cleanup() does not remove a TrapListener from the SnmpTrapReceiver object.
To deregister a TrapListener, only the method removeTrapListener(TrapListener) has to be used.

I believe that, in your case, the this keyword in the method call
SnmpTrapReceiver.removeTrapListener(this)
might not reference that TrapListener object which was added to the SnmpTrapReceiver previously.

This might be the reason for the TrapListener not removed from the SnmpTrapReceiver object.

Thanks,
Amarnath
Post Actions
Statistics
  • 1
     Replies
  • 262
     Views
  • 0
     Followers
Tags for the post
No tags available for this topic.
© 2009 Corp. All rights reserved. Trademarks | Privacy Policy | Site Map | Contact Us | Careers

Edit Link Delete Link

Edit Link Delete Link

LoadingImage