Title: [871] trunk/core/src/main/java/org/servicemix/jbi/management/BaseStandardMBean.java: Do not try to send jmx notifications if the mbean is unregistered (executor shut down).
- Revision
- 871
- Author
- gnt
- Date
- 2005-11-18 11:38:20 -0500 (Fri, 18 Nov 2005)
Log Message
Do not try to send jmx notifications if the mbean is unregistered (executor shut down).
Modified Paths
Diff
Modified: trunk/core/src/main/java/org/servicemix/jbi/management/BaseStandardMBean.java (870 => 871)
--- trunk/core/src/main/java/org/servicemix/jbi/management/BaseStandardMBean.java 2005-11-18 16:36:15 UTC (rev 870)
+++ trunk/core/src/main/java/org/servicemix/jbi/management/BaseStandardMBean.java 2005-11-18 16:38:20 UTC (rev 871)
@@ -364,11 +364,13 @@
*/
public void sendNotification(final Notification notification) throws MBeanException, RuntimeOperationsException {
if (notification != null) {
- executorService.execute(new Runnable() {
- public void run() {
- broadcasterSupport.sendNotification(notification);
- }
- });
+ if (!executorService.isShutdown()) {
+ executorService.execute(new Runnable() {
+ public void run() {
+ broadcasterSupport.sendNotification(notification);
+ }
+ });
+ }
}
}