Print
Assembler's guide

Introduction

The Server Assemblers Guide is written for assemblers who want to assemble a Server Application for Loom. It is assumed that you are familiar with the basic concepts of the Loom framework.

This page concentrates on assembly, and as such requires no knowledge of java programming. It does however assume you are familiar with server fundamentals, basic security measures, and performance tuning.

What is a Server Application?

In Loom, a Server Application is a set of Blocks that act in concert to provide a unified user service. Example Server Applications include a Mail Server, File Server, Web Server etc. The Server Application is a high level component that contains a set of Block components.

A Server Application requires a number of components other than Blocks to be complete. A Server Application requires configuration files to define Server Application wide settings (threading, security, logging), to define how blocks are wired together, and to define configuration data for the Block instances. A Block can also require other resources that are application specific.

Creating a Server Application

  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

Select the blocks you wish to assembly

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 Loom, 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 its information page

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 its information page

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 its information page

Package the component and related resources into a sar

The sar file format is the standard distribution format of Loom 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/ directory.

Powered by Atlassian Confluence