commit | e4460f0feda28e178405693e8cf127009da11010 | [log] [tgz] |
---|---|---|
author | Guillaume Nodet <gnodet@apache.org> | Thu Oct 15 12:35:37 2009 +0000 |
committer | Guillaume Nodet <gnodet@apache.org> | Thu Oct 15 12:35:37 2009 +0000 |
tree | be7e3c6b8ae5f3516b92d8678f86cdf377a74e94 | |
parent | 995ce07b127b37f3ddd2fc1825e2cf89b8749765 [diff] |
FELIX-1717: osgi:list column for spring is sometimes filled and sometimes not git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@825477 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 96914bc..50135b3 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
@@ -45,6 +45,10 @@ this.bundleContext = bundleContext; } + public void init() { + createListener(); + } + public void destroy() throws Exception { if (listener instanceof Destroyable) { ((Destroyable) listener).destroy();
diff --git a/karaf/shell/osgi/src/main/resources/OSGI-INF/blueprint/shell-osgi.xml b/karaf/shell/osgi/src/main/resources/OSGI-INF/blueprint/shell-osgi.xml index bb4b1f3..9885d4e 100644 --- a/karaf/shell/osgi/src/main/resources/OSGI-INF/blueprint/shell-osgi.xml +++ b/karaf/shell/osgi/src/main/resources/OSGI-INF/blueprint/shell-osgi.xml
@@ -74,7 +74,7 @@ <bean id="blueprintListener" class="org.apache.felix.karaf.shell.osgi.BlueprintListener" /> <service ref="blueprintListener" interface="org.osgi.service.blueprint.container.BlueprintListener" /> - <bean id="springListener" class="org.apache.felix.karaf.shell.osgi.SpringStateListenerFactory" destroy-method="destroy"> + <bean id="springListener" class="org.apache.felix.karaf.shell.osgi.SpringStateListenerFactory" init-method="init" destroy-method="destroy"> <property name="bundleContext" ref="blueprintBundleContext" /> </bean>