Rio Project 5.6 API Reference Documentation

Skip navigation links

Package org.rioproject.start

Provides utilities to bootstrap and initialize the Rio operational environment.

See: Description

Package org.rioproject.start Description

Provides utilities to bootstrap and initialize the Rio operational environment. This package document presents the following information:

Classpath
When Rio starts, the classpath is set the to the following: rio-platform.jar, rio-start.jar , resolver-api.jar${java.home}/lib/tools.jarstart.jarjsk-platform.jar, and all jars found in the   ${rio.home}/lib/logging directory. The remaining jars are dynamically loaded by the CommonClassLoader based on the platform configuration. By default, the following are loaded into the platform:

JARs
Location Loaded From
Description
rio-api-${rio.version}.jar
${rio.home}/lib-dl
Rio core technology platform client (download) classes
rio-lib-${rio.version}.jar ${rio.home}/lib Rio core technology platform classes
jsk-lib-${river.version}.jar
${rio.home}/lib
The Apache River required platform classes. More information on Apache River can be found here

Additional jars can be added to the platform by working with the Platform configuration. Platform configuration files are used as follows:
Platform configuration files are loaded when Rio starts. The contents of the org.rioproject.boot.platformDir directory will be scanned at startup time. Each .groovy file will processed.

It is important to understand the class loader hierarchy. The approach is to enable a platform oriented framework conducive towards creating a layered product. The resulting capabilities allow the declaration of JARs that are added to a CommonClassLoader, making the classes accessible by all ClassLoader instances that delegate to the CommonClassLoader. In this fashion a platform can be declared, initialized and made available.
 
The ClassLoader hierarchy when starting Rio is as follows:

                             AppCL
                               |
                               |
                 Resolver CL --+-- CommonClassLoader (URLs of common JARs)
                                           |
                                           |
                                           |
                           +---------------+-------...------+
                           |               |                |
                       Service-1CL     Service-2CL      Service-nCL
      


AppCL - Contains the main() class of the container. Main-Class in manifest points to org.rio.project.start.ServiceStarter
Classpath:  rio-platform.jar, rio-start.jar , ${java.home}/lib/tools.jarstart.jar, jsk-platform.jar
Codebase: none

Resolver CL - Contains classes for working with the Resolver.

CommonClassLoader - Contains the common Rio and Apache River classes (and other declared common platform JARs) to be made available to its children.
Classpath: Common JARs such as rio-api.jar, rio-lib.jar
Codebase: Context dependent. The codebase returned is the codebase of the specific child CL that is the current context of the request.

Service-nCL - Contains the service specific implementation classes.
Classpath: serviceImpl.jar
Codebase: "artifact:com/foo/bar/1.1"


Configuring Boot Attributes
The Rio boot environment supports the following configuration entries; where each configuration entry name is associated with the component name org.rioproject.boot
Default Platform Configuration
The 'platform' defines the support and technology that Rio core services (Cybernode & Provisioner) include as part of their environment. Configuring the platform involves working with the rio.home/config/platform directory.

This directory contains platform configuration files. The Platform configuration file is used as follows:
Platform configuration files are loaded when Rio starts. The contents of this directory will be scanned at startup time. Each .groovy file will be parsed.

The default platform configuration defines the core jars required for Rio. It's content is as follows:

/**
 * Declare common platform jars
 */
class CommonPlatformConfig {

    def getPlatformCapabilityConfigs() {
        def configs = []
        String libDir = System.getProperty("rio.home")+File.separator+"lib"+File.separator

        configs << new PlatformCapabilityConfig("Commons Compress",
                                                "1.0",
                                                "Apache Commons Compress",
                                                "Apache Software Foundation",
                                                libDir+"commons-compress.jar")
        configs << new PlatformCapabilityConfig("Sigar",
                                                "1.6.2",
                                                "Hyperic SIGAR",
                                                "Hyperic",
                                                libDir+"hyperic"+File.separator+"sigar.jar")
        return configs
    }
    
}



Skip navigation links
Copyright © Rio Project.

Copyright © 2007–2017 Rio Project. All rights reserved.