incubator-lokahi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tob...@apache.org
Subject svn commit: r421958 - /incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/TMCAgent.java
Date Fri, 14 Jul 2006 17:32:37 GMT
Author: toback
Date: Fri Jul 14 10:32:36 2006
New Revision: 421958

URL: http://svn.apache.org/viewvc?rev=421958&view=rev
Log:
Fix so the agent loads the jvm properties file to init the jvm datastore. 

Modified:
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/TMCAgent.java

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/TMCAgent.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/TMCAgent.java?rev=421958&r1=421957&r2=421958&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/TMCAgent.java (original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/TMCAgent.java Fri
Jul 14 10:32:36 2006
@@ -27,6 +27,7 @@
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
+import java.io.FileNotFoundException;
 import java.net.ServerSocket;
 import java.sql.SQLException;
 
@@ -90,7 +91,11 @@
     DOMConfigurator.configure("agent.log4j.xml");
     int port = 5665;
     System.out.println("Log4j configured");
-    PropertiesFile.load(new FileInputStream(new File("agent.properties")));
+    try {
+      PropertiesFile.load(new FileInputStream(new File("agent.properties")));
+    } catch (FileNotFoundException e) {
+      logger.info("File not found Exception (might be the first time the agent is started.):"
+ e.getMessage());
+    }
     SimpleAxisServer sas = new SimpleAxisServer();
 //    ServerSocketFactory sf = SSLServerSocketFactory.getDefault();
     ServerSocketFactory sf = ServerSocketFactory.getDefault();



Mime
View raw message