com.sun.sgs.impl.kernel
Class Kernel

java.lang.Object
  extended by com.sun.sgs.impl.kernel.Kernel

 class Kernel
extends Object

This is the core class for the server. It is the first class that is created, and represents the kernel of the runtime. It is responsible for creating and initializing all components of the system and the applications configured to run in this system.

The kernel must be configured with certain required properties and supports other public properties. It can also be configured with any of the properties specified in the StandardProperties class, and supports the following additional configuration properties:

Property: "com.sun.sgs.impl.kernel.profile.level"
Default: MIN
By default, the minimal amount of profiling which is used internally by the system is enabled. To enable more profiling, this property must be set to a valid level for ProfileCollector.setDefaultProfileLevel(ProfileLevel).

Property: "com.sun.sgs.impl.kernel.profile.listeners"
Default: No Default
By default, no profile listeners are enabled. To enable a set of listeners, set this property to a colon-separated list of fully-qualified class names, each of which implements ProfileListener. A number of listeners are provided with the system in the com.sun.sgs.impl.profile.listener package.

Property: "com.sun.sgs.impl.kernel.access.coordinator"
Default: TrackingAccessCoordinator
The implementation class used to track access to shared objects. The value of this property should be the name of a public, non-abstract class that implements the AccessCoordinatorHandle interface, and that provides a public constructor with the three parameters Properties, TransactionProxy, and ProfileCollectorHandle.


Nested Class Summary
 class Kernel.KernelManager
          Basic implementation of the kernel management interface.
 
Field Summary
static String ACCESS_COORDINATOR_PROPERTY
           
static String PROFILE_LEVEL_PROPERTY
           
static String PROFILE_LISTENERS
           
 
Constructor Summary
protected Kernel(Properties appProperties)
          Creates an instance of Kernel.
 
Method Summary
static void main(String[] args)
          Main-line method that starts the Kernel.
(package private)  void shutdown()
          Shut down all services (in reverse order) and the schedulers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROFILE_LEVEL_PROPERTY

public static final String PROFILE_LEVEL_PROPERTY
See Also:
Constant Field Values

PROFILE_LISTENERS

public static final String PROFILE_LISTENERS
See Also:
Constant Field Values

ACCESS_COORDINATOR_PROPERTY

public static final String ACCESS_COORDINATOR_PROPERTY
See Also:
Constant Field Values
Constructor Detail

Kernel

protected Kernel(Properties appProperties)
          throws Exception
Creates an instance of Kernel. Once this is created the code components of the system are running and ready. Creating a Kernel will also result in initializing and starting the application and its associated services.

Parameters:
appProperties - application properties
Throws:
Exception - if for any reason the kernel cannot be started
Method Detail

shutdown

void shutdown()
Shut down all services (in reverse order) and the schedulers.


main

public static void main(String[] args)
                 throws Exception
Main-line method that starts the Kernel. Each kernel instance runs a single application.

If a single argument is given, the value of the argument is assumed to be a filename. This file is used in combination with additional configuration settings to determine an application's configuration properties.

The order of precedence for properties is as follows (from highest to lowest):

  1. System properties specified on the command line using a "-D" flag
  2. Properties specified in the file from the user's home directory with the name specified by BootProperties.DEFAULT_HOME_CONFIG_FILE.
  3. Properties specified in the file given as a command line argument.
  4. Properties specified in the resource with the name BootProperties.DEFAULT_APP_PROPERTIES This file is typically included as part of the application jar file.
  5. Properties specified in the file named by the optional BootProperties.EXTENSION_FILE_PROPERTY system property.
If no value is specified for a given property in any of these places, then a default is used or an Exception is thrown (depending on whether a default value is available). Certain properties are required to be specified somewhere in the application's configuration.

See StandardProperties for the required and optional properties.

Parameters:
args - optional filename for Properties file associated with the application to run
Throws:
Exception - if there is any problem starting the system

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved