brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [4/5] brooklyn-server git commit: Be more defensive when terminating the server
Date Thu, 21 Apr 2016 08:45:51 GMT
Be more defensive when terminating the server

Saw managementContext.getHighAvailabilityManager() be null when startup
failed because Felix was unable to create its cache directory.


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/ea71d541
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/ea71d541
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/ea71d541

Branch: refs/heads/master
Commit: ea71d5414240c7f753f3f88e659611b95626209a
Parents: 512e79d
Author: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Authored: Thu Apr 14 16:12:11 2016 +0100
Committer: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Committed: Thu Apr 14 16:12:11 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/brooklyn/launcher/BrooklynLauncher.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/ea71d541/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynLauncher.java
----------------------------------------------------------------------
diff --git a/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynLauncher.java b/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynLauncher.java
index 62fd7ee..efb457e 100644
--- a/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynLauncher.java
+++ b/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynLauncher.java
@@ -384,7 +384,7 @@ public class BrooklynLauncher extends BasicLauncher<BrooklynLauncher>
{
         if (getPersistMode() != PersistMode.DISABLED) {
             try {
                 Stopwatch stopwatch = Stopwatch.createStarted();
-                if (managementContext.getHighAvailabilityManager().getPersister() != null)
{
+                if (managementContext.getHighAvailabilityManager() != null && managementContext.getHighAvailabilityManager().getPersister()
!= null) {
                     managementContext.getHighAvailabilityManager().getPersister().waitForWritesCompleted(Duration.TEN_SECONDS);
                 }
                 managementContext.getRebindManager().waitForPendingComplete(Duration.TEN_SECONDS,
true);


Mime
View raw message