commit | aa49ce8150cc2946f103361058f9225fe6737c0c | [log] [tgz] |
---|---|---|
author | Guillaume Nodet <gnodet@apache.org> | Fri Feb 12 08:57:35 2010 +0000 |
committer | Guillaume Nodet <gnodet@apache.org> | Fri Feb 12 08:57:35 2010 +0000 |
tree | 936979992b2a3f83e2122213fcbc9f56a7f0c370 | |
parent | 052535ad760dcdaeab1816886e484aeec378f8bb [diff] |
FELIX-1995: Fix synchronization issue which cause two spring osgi listeners to be registered and created git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@909302 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 b9f8a24..9a0069c 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
@@ -46,7 +46,7 @@ } public void init() { - createListener(); + getListener(); } public void destroy() throws Exception { @@ -55,7 +55,7 @@ } } - public BundleStateListener getListener() { + public synchronized BundleStateListener getListener() { if (listener == null) { listener = createListener(); }