commit | 040e6ec05fac833759118251497bd764e2b79827 | [log] [tgz] |
---|---|---|
author | Guillaume Nodet <gnodet@apache.org> | Tue Jan 19 10:08:36 2010 +0000 |
committer | Guillaume Nodet <gnodet@apache.org> | Tue Jan 19 10:08:36 2010 +0000 |
tree | 2e4384b80a433be92ca17cb7c10493a3bc79a1cc | |
parent | 2fdcd612a6c5a90f8b2ca1a52153829ab86e2b02 [diff] |
FELIX-1995: Spring status does not show properly after osgi:list command git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@900715 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/karaf/shell/osgi/src/main/java/org/apache/felix/karaf/shell/osgi/SpringStateListenerFactory.java b/karaf/shell/osgi/src/main/java/org/apache/felix/karaf/shell/osgi/SpringStateListenerFactory.java index 50135b3..b9f8a24 100644 --- a/karaf/shell/osgi/src/main/java/org/apache/felix/karaf/shell/osgi/SpringStateListenerFactory.java +++ b/karaf/shell/osgi/src/main/java/org/apache/felix/karaf/shell/osgi/SpringStateListenerFactory.java
@@ -64,7 +64,11 @@ private BundleStateListener createListener() { try { - return new SpringApplicationListener(bundleContext); + // Use dynamic class loading to make sure we actually try to reload the class for + // dynamic imports to kick in if possible + Class cl = getClass().getClassLoader().loadClass("org.apache.felix.karaf.shell.osgi.SpringStateListenerFactory$SpringApplicationListener"); + return (BundleStateListener) cl.getConstructor(BundleContext.class).newInstance(bundleContext); +// return new SpringApplicationListener(bundleContext); } catch (Throwable t) { return null; }