cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [09/22] git commit: updated refs/heads/4.5 to 78b9be0
Date Thu, 05 Feb 2015 11:51:45 GMT
CID-1116546 Fix resource leak

(cherry picked from commit fe0168f6d2d1ee144a1a6e0580464420f1dfa5fe)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/4.5
Commit: 6fc97f9181732bd475a12f6df7f5cc3c8b5994b0
Parents: 7de7885
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Tue Nov 18 14:30:55 2014 +0100
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Thu Feb 5 15:32:08 2015 +0530

----------------------------------------------------------------------
 usage/src/com/cloud/usage/UsageServer.java | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6fc97f91/usage/src/com/cloud/usage/UsageServer.java
----------------------------------------------------------------------
diff --git a/usage/src/com/cloud/usage/UsageServer.java b/usage/src/com/cloud/usage/UsageServer.java
index 37d4b70..d4f19eb 100644
--- a/usage/src/com/cloud/usage/UsageServer.java
+++ b/usage/src/com/cloud/usage/UsageServer.java
@@ -25,7 +25,6 @@ import org.apache.commons.daemon.DaemonInitException;
 import org.apache.log4j.Logger;
 import org.apache.log4j.PropertyConfigurator;
 import org.apache.log4j.xml.DOMConfigurator;
-import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.util.Log4jConfigurer;
 
@@ -36,7 +35,8 @@ public class UsageServer implements Daemon {
     private static final Logger s_logger = Logger.getLogger(UsageServer.class.getName());
     public static final String Name = "usage-server";
 
-    UsageManager mgr;
+    private UsageManager mgr;
+    private ClassPathXmlApplicationContext appContext;
 
     /**
      * @param args
@@ -54,7 +54,8 @@ public class UsageServer implements Daemon {
 
     @Override
     public void start() {
-        ApplicationContext appContext = new ClassPathXmlApplicationContext("usageApplicationContext.xml");
+
+        appContext = new ClassPathXmlApplicationContext("usageApplicationContext.xml");
 
         try {
             ComponentContext.initComponentsLifeCycle();
@@ -73,7 +74,7 @@ public class UsageServer implements Daemon {
 
     @Override
     public void stop() {
-
+        appContext.close();
     }
 
     @Override


Mime
View raw message