marmotta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sschaff...@apache.org
Subject git commit: minor changes to startup sequence (don't throw configuration events as long as the system is not fully started)
Date Wed, 15 May 2013 18:19:03 GMT
Updated Branches:
  refs/heads/develop 53f8778f4 -> adff4653c


minor changes to startup sequence (don't throw configuration events as long as the system
is not fully started)


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/adff4653
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/adff4653
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/adff4653

Branch: refs/heads/develop
Commit: adff4653c6507054a4bd7985146703c69c03a17a
Parents: 53f8778
Author: Sebastian Schaffert <sschaffert@apache.org>
Authored: Wed May 15 20:17:08 2013 +0200
Committer: Sebastian Schaffert <sschaffert@apache.org>
Committed: Wed May 15 20:17:08 2013 +0200

----------------------------------------------------------------------
 .../core/api/config/ConfigurationService.java      |    3 ++
 .../services/config/ConfigurationServiceImpl.java  |   19 +++++++++++++-
 .../core/startup/MarmottaStartupService.java       |    2 +
 3 files changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/adff4653/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/config/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/config/ConfigurationService.java
b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/config/ConfigurationService.java
index ebf173b..ef79f58 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/config/ConfigurationService.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/config/ConfigurationService.java
@@ -530,4 +530,7 @@ public interface ConfigurationService {
     void performServerShutdown();
 
 
+    boolean isInitialising();
+
+    void setInitialising(boolean initialising);
 }

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/adff4653/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/config/ConfigurationServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/config/ConfigurationServiceImpl.java
b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/config/ConfigurationServiceImpl.java
index 02cdd81..12c0302 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/config/ConfigurationServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/config/ConfigurationServiceImpl.java
@@ -307,14 +307,29 @@ public class ConfigurationServiceImpl implements ConfigurationService
{
             log.info("Apache Marmotta Configuration Service: initialisation completed");
 
             configurationInitEvent.fire(new ConfigurationServiceInitEvent());
-
-            initialising = false;
         } finally {
             lock.writeLock().unlock();
         }
 
     }
 
+    @Override
+    public boolean isInitialising() {
+        return initialising;
+    }
+
+    /**
+     * Signal that initialisation of the system has completed and configuration events are
now enabled.
+     *
+     * @param initialising
+     */
+    @Override
+    public void setInitialising(boolean initialising) {
+        this.initialising = initialising;
+
+        log.info("Initialisation completed, enabling configuration events");
+    }
+
     /**
      * Initialise the Apache Marmotta Logging Configuration.
      * <ul>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/adff4653/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/startup/MarmottaStartupService.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/startup/MarmottaStartupService.java
b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/startup/MarmottaStartupService.java
index 612ca3d..e3523f5 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/startup/MarmottaStartupService.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/startup/MarmottaStartupService.java
@@ -250,6 +250,8 @@ public class MarmottaStartupService {
 
             hostStarted = true;
 
+            configurationService.setInitialising(false);
+
             startupEvent.fire(new SystemStartupEvent());
         } finally {
             lock.unlock();


Mime
View raw message