Author: mladen.turk(a)jboss.com
Date: 2007-10-12 07:18:09 -0400 (Fri, 12 Oct 2007)
New Revision: 1105
Modified:
trunk/sight/java/org/jboss/sight/Library.java
trunk/sight/java/org/jboss/sight/Service.java
Log:
Make Service proparities a runtime object loaded on Library.initialize
Modified: trunk/sight/java/org/jboss/sight/Library.java
===================================================================
--- trunk/sight/java/org/jboss/sight/Library.java 2007-10-12 11:09:32 UTC (rev 1104)
+++ trunk/sight/java/org/jboss/sight/Library.java 2007-10-12 11:18:09 UTC (rev 1105)
@@ -137,7 +137,7 @@
if (initialize0()) {
/* Initialize Runtime objects */
File.initializeStdFiles();
-
+ Service.loadResources();
return true;
}
return false;
Modified: trunk/sight/java/org/jboss/sight/Service.java
===================================================================
--- trunk/sight/java/org/jboss/sight/Service.java 2007-10-12 11:09:32 UTC (rev 1104)
+++ trunk/sight/java/org/jboss/sight/Service.java 2007-10-12 11:18:09 UTC (rev 1105)
@@ -53,7 +53,7 @@
private static Properties serviceProperties = null;
private static boolean servicePropertiesLoaded = false;
- private static void setupKnownService(Service service)
+ protected static void loadResources()
{
if (serviceProperties == null) {
serviceProperties = new Properties();
@@ -80,13 +80,15 @@
}
}
}
- if (OS.IS_LINUX || OS.IS_SOLARIS) {
- String pserviceName = serviceProperties.getProperty(service.Name +
".2", service.Name);
- service.DisplayName = serviceProperties.getProperty(pserviceName +
".0", service.DisplayName);
- service.Description = serviceProperties.getProperty(pserviceName +
".1");
- }
}
+ private static void setupKnownService(Service service)
+ {
+ String pserviceName = serviceProperties.getProperty(service.Name +
".2", service.Name);
+ service.DisplayName = serviceProperties.getProperty(pserviceName +
".0", service.DisplayName);
+ service.Description = serviceProperties.getProperty(pserviceName +
".1");
+ }
+
private Service()
{
super(0);
@@ -112,7 +114,9 @@
throw new OperatingSystemException(Error.getError(e));
}
Name = name;
- setupKnownService(this);
+ if (OS.IS_LINUX || OS.IS_SOLARIS) {
+ setupKnownService(this);
+ }
}
protected Service(ServiceControlManager scm, String name,
Show replies by date