[SNMP4J] Snmp Async Thread Pool

Smith, Ryan rsmith at shsolutions.com
Mon Jul 16 15:02:42 CEST 2007


 
 
Hello,
 
When I try to send 100 PDU() objects via the .send() or .inform()
methods (async) I see that a thread pool of up to 10 threads are
created.
 
When my program is finished running, the main thread ends, but the
threads in the thread pool remain running, (all 10) causing the
application to hang (not exit).  I'm calling: ((Snmp)
event.getSource()).cancel(event.getRequest(), this) in the callback
method.
I configure the snmp class to timeout sends after 5 seconds and retry 3
times before giving up.
 
Now, the snmp Manager I'm trying to send to is on udp:192.0.1.123:162  -
This machine doesn't exist.  So the host is unreachable and all the
requests timeout,  the only problem is that the threads aren't dying as
I expect they should.  I'm not sure what else I'm missing here,
any ideas?
 
Thank you,
-Ryan



More information about the SNMP4J mailing list