You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by me...@apache.org on 2007/01/07 13:49:02 UTC

svn commit: r493712 - /incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/info/JmxRuntimeInfoImpl.java

Author: meerajk
Date: Sun Jan  7 04:49:01 2007
New Revision: 493712

URL: http://svn.apache.org/viewvc?view=rev&rev=493712
Log:
Read online property from runtime.properties instead of 
being part of the management operation.

Modified:
    incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/info/JmxRuntimeInfoImpl.java

Modified: incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/info/JmxRuntimeInfoImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/info/JmxRuntimeInfoImpl.java?view=diff&rev=493712&r1=493711&r2=493712
==============================================================================
--- incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/info/JmxRuntimeInfoImpl.java (original)
+++ incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/info/JmxRuntimeInfoImpl.java Sun Jan  7 04:49:01 2007
@@ -72,20 +72,20 @@
      */
     public static JmxRuntimeInfoImpl newInstance(final String profileName,
                                                  final File installDirectory,
-                                                 final boolean online,
                                                  final MBeanServer mBeanServer)
     throws JmxException {
         
-        // TODO This logic should move to super class's constructor
-        File profileDirectory;
         try {
-            profileDirectory = DirectoryHelper.getProfileDirectory(installDirectory, profileName);
+            
+            File profileDirectory = DirectoryHelper.getProfileDirectory(installDirectory, profileName);
             
             // Load properties for this runtime
             File propFile = new File(profileDirectory, "etc/runtime.properties");
             Properties props = DirectoryHelper.loadProperties(propFile, System.getProperties());
             
+            boolean online = !Boolean.parseBoolean(props.getProperty("offline", "true"));
             return new JmxRuntimeInfoImpl(profileName, installDirectory, profileDirectory, online, props, mBeanServer);
+        
         } catch (IOException ex) {
             throw new JmxHostException(ex);
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org