org.ow2.jonas.launcher.felix.util
Class JOnASUtils

java.lang.Object
  extended by org.ow2.jonas.launcher.felix.util.JOnASUtils

public final class JOnASUtils
extends Object

JOnAS utilities.

Author:
Guillaume Sauthier

Method Summary
static File getJOnASBase()
           
static File getJOnASRoot()
           
static String getServerProperty(String property, String defaultValue)
          Returns the value associated to the given property in jonas.properties file.
static String getVersion()
           
static boolean isDeveloperMode()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getJOnASBase

public static File getJOnASBase()
Returns:
the JOnAS Base to be used

getServerProperty

public static String getServerProperty(String property,
                                       String defaultValue)
                                throws Exception
Returns the value associated to the given property in jonas.properties file.

Parameters:
property - the property name
defaultValue - the default value
Returns:
The value associated to the given property.
Throws:
Exception - If the property value cannot be retrieved

getJOnASRoot

public static File getJOnASRoot()
Returns:
the JOnAS Root to be used. May throw an IllegalStateException if jonas.root System property is not set.

getVersion

public static String getVersion()
Returns:
the JOnAS version from the Implementation-Version Manifest entry.

isDeveloperMode

public static boolean isDeveloperMode()
Returns:
true if the jonas.developer system property has been set.


Copyright © 2010 OW2 Consortium. All Rights Reserved.