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>