cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [06/12] git commit: updated refs/heads/ui-restyle to e13c32f
Date Thu, 24 Oct 2013 22:56:30 GMT
Move LockMasterListener initialization to earlier in the code

This is not perfect fix but should address 99% of the issues.  The only
time an issue could happen is if something in the bootstrap or system
context tried to lock a row.  Which shouldn't happen at the moment.  If
we find that to be an issue, the LockMasterListener could move to system
context and be inject here.


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

Branch: refs/heads/ui-restyle
Commit: d178b25daa484dda44bb34e63cb719d1c3cc1519
Parents: 0ef8b87
Author: Darren Shepherd <darren.s.shepherd@gmail.com>
Authored: Thu Oct 24 15:34:38 2013 -0700
Committer: Darren Shepherd <darren.s.shepherd@gmail.com>
Committed: Thu Oct 24 15:35:21 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/server/ManagementServerImpl.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d178b25d/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java
index 1c68523..e00c182 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -599,6 +599,8 @@ import com.cloud.vm.dao.VMInstanceDao;
 public class ManagementServerImpl extends ManagerBase implements ManagementServer {
     public static final Logger s_logger = Logger.getLogger(ManagementServerImpl.class.getName());
 
+    private static final LockMasterListener s_lockMasterListener = new LockMasterListener(ManagementServerNode.getManagementServerId());
+
     @Inject
     public AccountManager _accountMgr;
     @Inject
@@ -818,7 +820,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
     public boolean start() {
         s_logger.info("Startup CloudStack management server...");
 
-        _clusterMgr.registerListener(new LockMasterListener(ManagementServerNode.getManagementServerId()));
+        _clusterMgr.registerListener(s_lockMasterListener);
 
         enableAdminUser("password");
         return true;


Mime
View raw message