kafelez / jsendnsca

Automatically exported from code.google.com/p/jsendnsca
0 stars 0 forks source link

NonBlockingNagiosPassiveCheckSender should properly shutdown its executor #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The NonBlockingNagiosPassiveCheckSender does not offer any shutdown method so 
you can 
properly shut it down. This is needed in hot deployable environments such as 
OSGi or Tomcat etc 
where you may hot deploy you apps.

I have created a patch with a public method for that.
Also I exposed a setter to set a custom executor if you need to be in full 
control of which thread 
it uses. People using J2EE servers may want to let it use a pool from those 
servers.

Or e.g. at Apache we like to control the thread pool as well to also include a 
thread name so you 
can see what the thread does.

See for example this Helper class we use to create executors in Camel
https://svn.apache.org/repos/asf/camel/trunk/camel-
core/src/main/java/org/apache/camel/util/concurrent/ExecutorServiceHelper.java

Original issue reported on code.google.com by claus.ib...@gmail.com on 13 Jan 2010 at 9:54

GoogleCodeExporter commented 8 years ago
The patch

Original comment by claus.ib...@gmail.com on 13 Jan 2010 at 9:55

Attachments:

GoogleCodeExporter commented 8 years ago
Applied patch and committed

Original comment by rajneeshpatel on 13 Jan 2010 at 9:42

GoogleCodeExporter commented 8 years ago

Original comment by rajneeshpatel on 13 Jan 2010 at 11:16