Guide - Creating a Server Application

Introduction

This document will describe the process for assembling your first Server Application. There is a number of steps in creating a Server Application. These are;

  1. Select the blocks you wish to assemble.
  2. Write the config.xml file.
  3. Write the assembly.xml file.
  4. Write the environment.xml file.
  5. Package the component and related resources into a sar file.

Select the Blocks to Assemble

As a assembler it is your responsibility to select the particular Blocks required to build your application. You may aquire the Blocks from a number of sources depending on your resources. You may use the core Blocks supplied with Phoenix, contract someone to build the component or download the Block from an online repository.

Write the config.xml file

Configuration data for blocks is stored in the config.xml file. For more detail on the format of config.xml see the specification.

Write the assembly.xml file

The next stage is to write the assembly.xml file. The assembly.xml specifies the instances of Blocks that are part of the Server Application. Each Block has a name. Each block may also have dependencies that need to be satisfied and this can be done via the 'provide' sub-elements. The provide element maps block instances from the Server Application namespace to the Block role namespace specified in BlockInfo files. For more detail on the format of assembly.xml see the specification.

Write the environment.xml file

The next stage is to write the environment.xml file. The environment.xml is used to configure the code-based security policy, log management and thread pooling. For more detail on the format of environment.xml see the specification.

Create the sar file

The sar file format is the standard distribution format of Phoenix Server Applications. It is a standard Jar file with a specific directory layout. The config.xml, environment.xml and assembly.xml file must be stored in SAR-INF/ directory of the archive. All jar files, including both those that contain blocks and those that contain support classes should be stored in the SAR-INF/lib/ directory.

Guide Contents

  1. What is a Server Application?
  2. How do I create a Server Application?
  3. config.xml specification
  4. assembly.xml specification
  5. environment.xml specification
by Peter Donald