[SNMP4J] IllegalStateException in Snmp.send()
Frank Fock
fock at agentpp.com
Fri Apr 21 19:48:57 CEST 2006
Hi Fabian,
We can catch only a RuntimeException and rethrow it. I have
changed the code as follows for v1.7.1:
/**
* run
*/
public synchronized void run() {
try {
if ((!finished) && (retryCount > 0)) {
...
}
}
catch (RuntimeException ex) {
logger.error("Failed to process pending request "+key+
" because"+ex.getMessage(), ex);
throw ex;
}
Best regards,
Frank
Fabian Nart wrote:
> Hi
>
> I have an IllegalStateException (Timer already cancelled) in
> Snmp.send(). This looks like the cancel()-method had been called, but
> I'm sure that this is not the case. So I think that the Timer's
> task-execution-Thread has died and I did not notice that.
>
> To prevent such a silent Thread-death I suggest the following: The
> run()-method of the PendingRequest-class should catch, log and rethrow
> any Error and RuntimeException. This way we know when (and maybe why)
> such a Thread dies.
>
> Any comments? Cheers, Fabian
> _______________________________________________
> 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