org.ow2.jonas.launcher.felix
Class JOnAS

java.lang.Object
  extended by org.ow2.jonas.launcher.felix.JOnAS

public class JOnAS
extends Object

JOnAS Running on OSGi/Felix.

Author:
Guillaume Sauthier

Constructor Summary
JOnAS(boolean forceCleanUp)
          Creates a new configured framework instance.
 
Method Summary
protected  IConfigurationProvider getConfigurationProvider()
           
protected static void initializeSystemProperties()
          Initialize required System properties (using reasonable default values when needed).
static void main(String[] args)
          Start a new JOnAS.
protected static void setDefaultPropertyIfNotSet(String key, String def)
          If the property was already set, do not change its value, otherwise, use the default.
 void start()
          Start the OSGi framework.
 void stop()
          Stop the OSGi framework.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JOnAS

public JOnAS(boolean forceCleanUp)
      throws Exception
Creates a new configured framework instance.

Parameters:
forceCleanUp - true if cache directory must be deleted.
Throws:
Exception - cannot create the internal gateway.
Method Detail

getConfigurationProvider

protected IConfigurationProvider getConfigurationProvider()
Returns:
a new IConfigurationProvider.

start

public void start()
           throws org.osgi.framework.BundleException
Start the OSGi framework.

Throws:
org.osgi.framework.BundleException - cannot start Felix

stop

public void stop()
          throws org.osgi.framework.BundleException
Stop the OSGi framework.

Throws:
org.osgi.framework.BundleException - cannot stop Felix

main

public static void main(String[] args)
                 throws Exception
Start a new JOnAS.

Parameters:
args - not used
Throws:
Exception - if something failed

initializeSystemProperties

protected static void initializeSystemProperties()
Initialize required System properties (using reasonable default values when needed).


setDefaultPropertyIfNotSet

protected static void setDefaultPropertyIfNotSet(String key,
                                                 String def)
If the property was already set, do not change its value, otherwise, use the default.

Parameters:
key - property name
def - default property value


Copyright © 2007 OW2 Consortium. All Rights Reserved.