Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 211FB109BC for ; Thu, 24 Oct 2013 22:56:44 +0000 (UTC) Received: (qmail 74727 invoked by uid 500); 24 Oct 2013 22:56:35 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 74587 invoked by uid 500); 24 Oct 2013 22:56:32 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 74278 invoked by uid 99); 24 Oct 2013 22:56:26 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Oct 2013 22:56:26 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id AF06B81C94E; Thu, 24 Oct 2013 22:56:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bfederle@apache.org To: commits@cloudstack.apache.org Date: Thu, 24 Oct 2013 22:56:30 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [06/12] git commit: updated refs/heads/ui-restyle to e13c32f 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 Authored: Thu Oct 24 15:34:38 2013 -0700 Committer: Darren Shepherd 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;