This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.settings-1.1.0
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-settings.git

commit de1d2024f1e0c68b0ac2aeb5eea32eb9c8e49428
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Mon Feb 7 14:55:33 2011 +0000

    SLING-1970 : Potential deadlock during start of settings service
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/settings@1067955
 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/sling/settings/impl/Activator.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/settings/impl/Activator.java 
b/src/main/java/org/apache/sling/settings/impl/Activator.java
index 5a7b299..a68b8d7 100644
--- a/src/main/java/org/apache/sling/settings/impl/Activator.java
+++ b/src/main/java/org/apache/sling/settings/impl/Activator.java
@@ -56,6 +56,7 @@ public class Activator implements BundleActivator, 
BundleListener {
 
         if ( this.settingsService.isDelayedStart() ) {
             this.bundleContext.addBundleListener(this);
+            this.tryToStart();
         } else {
             this.startService();
         }
@@ -66,13 +67,19 @@ public class Activator implements BundleActivator, 
BundleListener {
      */
     public void bundleChanged(BundleEvent event) {
         if ( 
SlingSettingsServiceImpl.ENGINE_SYMBOLIC_NAME.equals(event.getBundle().getSymbolicName()))
 {
+            this.tryToStart();
+        }
+
+    }
+
+    private synchronized void tryToStart() {
+        if ( this.settingsService.isDelayedStart() ) {
             this.settingsService.initDelayed(this.bundleContext);
             if ( !this.settingsService.isDelayedStart() ) {
                 this.bundleContext.removeBundleListener(this);
                 this.startService();
             }
         }
-
     }
 
     private void startService() {

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to