oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ime...@apache.org
Subject [oodt] branch master updated: [OODT-1034] Updated XmlRpcResourceManager to statup resmgr within main() method.
Date Tue, 04 Feb 2020 09:07:20 GMT
This is an automated email from the ASF dual-hosted git repository.

imesha pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/oodt.git


The following commit(s) were added to refs/heads/master by this push:
     new 6fb4c67  [OODT-1034] Updated XmlRpcResourceManager to statup resmgr within main()
method.
6fb4c67 is described below

commit 6fb4c67066d5f560a99350e00d654cedbf0b5469
Author: imesha <imesha.sudasingha@gmail.com>
AuthorDate: Tue Feb 4 14:36:58 2020 +0530

    [OODT-1034] Updated XmlRpcResourceManager to statup resmgr within main() method.
---
 .../oodt/cas/resource/system/XmlRpcResourceManager.java  | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManager.java
b/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManager.java
index 6c25831..1fe0171 100644
--- a/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManager.java
+++ b/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManager.java
@@ -63,7 +63,7 @@ import java.util.logging.Logger;
 public class XmlRpcResourceManager implements ResourceManager{
 
     /** our log stream */
-    private Logger LOG = Logger.getLogger(XmlRpcResourceManager.class.getName());
+    private static Logger LOG = Logger.getLogger(XmlRpcResourceManager.class.getName());
 
     private int port;
     /** our xml rpc web server */
@@ -453,10 +453,16 @@ public class XmlRpcResourceManager implements ResourceManager{
             System.err.println(usage);
             System.exit(1);
         }
-
-        new XmlRpcResourceManager(portNum);
-
-        for (;;) {
+	
+		XmlRpcResourceManager resourceManager = new XmlRpcResourceManager(portNum);
+		try {
+			resourceManager.startUp();
+		} catch (Exception e) {
+			LOG.log(Level.SEVERE, "An error occurred while starting resource manager", e);
+			return;
+		}
+	
+		for (;;) {
             try {
                 Thread.currentThread().join();
             } catch (InterruptedException ignore) {


Mime
View raw message