[Home] [Index] [Previous] [Next]

Arooa Life

Living the life of an Arooa Component.

Being Session Aware

The easiest way to interact with the Arooa framework is to access the ArooaSession. To do this during configuration from within a component simply implement ArooaSessionAware.

Reasons for doing this might include:

For examples look at the Oddjob Jobs that are ArooaSessionAware and what they do with the session.

The Lifecycle of a component.

This is a summary of what Arooa framework does with your job:

At parse time:

  1. The component is created using a no argument constructor either from a class name found by looking up the element.

  2. If the configuration element contains an id attribute the component is registered so that it's properties can be gotten at later with the ${} replacement syntax.

  3. If the component is an instance of ArooaContextAware or ArooaSessionAware the ArooaContext or ArooaSession will be injected into your component. Amongst other things the ArooaContext contains your components very own RuntimeConfiguration object. This allows your component to configure itself. The framework will configure the component for you so unless you want very special you don't need to implement this method.

  4. constant properties (those which don't contain ${} replacement syntax) are set via the components setXXX().

  5. If the component implements ArooaLifeAware the initialised() method is called.

At run time:

  1. Dynamic properties are set. The ${ } values are resolved and the resulting object is set via the setXXX() method in the component and in all child elements and values.

  2. If the component implements ArooaLifeAware the configured() method is called.

At termination:

  1. If the component implements ArooaLifeAware the destroy() method is called.

  2. All properties set from the configuration will be set to null.

[Home] [Index] [Previous] [Next]