Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2011-04-03 12:41:42 -0400
committerGlyn Normington2011-04-03 12:41:42 -0400
commitc2c73a06f860deeea25d826a52af7c6b05aa1f8d (patch)
treec2fd70faccef60dc65141550a37ac61f28100c04 /org.eclipse.virgo.kernel.dmfragment
parenta3bc4a553bb9935ea9d1cfacdd6675e464396db3 (diff)
downloadorg.eclipse.virgo.kernel-c2c73a06f860deeea25d826a52af7c6b05aa1f8d.tar.gz
org.eclipse.virgo.kernel-c2c73a06f860deeea25d826a52af7c6b05aa1f8d.tar.xz
org.eclipse.virgo.kernel-c2c73a06f860deeea25d826a52af7c6b05aa1f8d.zip
avoid unnecessary log messages
Diffstat (limited to 'org.eclipse.virgo.kernel.dmfragment')
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ServiceProxyRetryDisablingBundleListener.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ServiceProxyRetryDisablingBundleListener.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ServiceProxyRetryDisablingBundleListener.java
index 7b09d1c9..cafc95f8 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ServiceProxyRetryDisablingBundleListener.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ServiceProxyRetryDisablingBundleListener.java
@@ -51,9 +51,12 @@ class ServiceProxyRetryDisablingBundleListener implements SynchronousBundleListe
ApplicationContext.class.getName(), null);
for (ServiceReference<?> applicationContextServiceReference : applicationContextServiceReferences) {
- ApplicationContext applicationContext = (ApplicationContext) bundleContext.getService(applicationContextServiceReference);
- ApplicationContextShutdownBean.disableServiceProxyRetry(applicationContext);
- bundleContext.ungetService(applicationContextServiceReference);
+ Object service = bundleContext.getService(applicationContextServiceReference);
+ if (service instanceof ApplicationContext) {
+ ApplicationContext applicationContext = (ApplicationContext) service;
+ ApplicationContextShutdownBean.disableServiceProxyRetry(applicationContext);
+ bundleContext.ungetService(applicationContextServiceReference);
+ }
}
} catch (InvalidSyntaxException ise) {
logger.error("Failed to retrieve all application contexts from service registry", ise);

Back to the top