Return-Path: Delivered-To: apmail-avalon-cvs-archive@avalon.apache.org Received: (qmail 36861 invoked by uid 500); 20 Feb 2003 15:53:30 -0000 Mailing-List: contact cvs-help@avalon.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon CVS List" Reply-To: "Avalon Developers List" Delivered-To: mailing list cvs@avalon.apache.org Received: (qmail 36833 invoked by uid 500); 20 Feb 2003 15:53:30 -0000 Received: (qmail 36809 invoked from network); 20 Feb 2003 15:53:29 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 20 Feb 2003 15:53:29 -0000 Received: (qmail 31182 invoked by uid 1291); 20 Feb 2003 15:53:28 -0000 Date: 20 Feb 2003 15:53:28 -0000 Message-ID: <20030220155328.31181.qmail@icarus.apache.org> From: leosimons@apache.org To: avalon-excalibur-cvs@apache.org Subject: cvs commit: avalon-excalibur/container/src/xdocs book.xml tabs.xml attributes.xml extension.xml index.xml list.xml menu.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N leosimons 2003/02/20 07:53:28 Modified: container build.xml container/src/xdocs attributes.xml extension.xml index.xml list.xml Added: container/src/xdocs book.xml tabs.xml Removed: container/src/xdocs menu.xml Log: forrestize Revision Changes Path 1.9 +1 -1 avalon-excalibur/container/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/avalon-excalibur/container/build.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- build.xml 29 Jan 2003 14:07:38 -0000 1.8 +++ build.xml 20 Feb 2003 15:53:28 -0000 1.9 @@ -294,7 +294,7 @@ - + 1.4 +7 -7 avalon-excalibur/container/src/xdocs/attributes.xml Index: attributes.xml =================================================================== RCS file: /home/cvs/avalon-excalibur/container/src/xdocs/attributes.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- attributes.xml 29 Aug 2002 11:16:57 -0000 1.3 +++ attributes.xml 20 Feb 2003 15:53:28 -0000 1.4 @@ -11,7 +11,7 @@ - +
Overview

Within Avalon there are a number of different containers with varying level of consistency with respect to the naming of context keys and more recently the subject @@ -20,9 +20,9 @@

This information should be considered as a proposal only.

- +
- +
Context Keys

The following context keys and associated values are considered to be applicable to all containers.

@@ -64,9 +64,9 @@ - +
- +
Type Attributes

The following attributes may be declared within the scope of the component info block of the meta-info model.

@@ -110,7 +110,7 @@ - +
1.7 +37 -37 avalon-excalibur/container/src/xdocs/extension.xml Index: extension.xml =================================================================== RCS file: /home/cvs/avalon-excalibur/container/src/xdocs/extension.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- extension.xml 7 Feb 2003 16:07:33 -0000 1.6 +++ extension.xml 20 Feb 2003 15:53:28 -0000 1.7 @@ -11,7 +11,7 @@ - +
What are lifecycle extensions ?

Lifecycle extensions are additional stages a component can traverse through during it's lifetime. Lifecycle extensions allow a container to provide extra functionality @@ -76,9 +76,9 @@ one of these containers and would like to use lifecycle extensions.

- +
- +
How do I extend a Component's lifecycle ?

Extending a Component's lifecycle is straightforward. An overview of the process follows: @@ -125,9 +125,9 @@ phases defined later in this document.

- +
- +
When can a Component's lifecycle be extended ?

The life of any component can be broken down to the following phases:

@@ -183,9 +183,9 @@ to any one context of use.

- +
- +
Lifestyle Extension Interfaces

A container manages extensions using an extension handler. Handlers may implement @@ -194,7 +194,7 @@ accessor extension will be activated during the access and release stages.

- +
The Creator Interface

The Creator interface describes the create and destroy stages that occur between a component and a container @@ -230,9 +230,9 @@ } - +

- +
Accessor Interface

The Accessor interface describes the access and release stages that occur between a service or component manager and a container @@ -268,10 +268,10 @@ } - - +

+
- +
Fortress Example

Let's look at a simple example. The following is also available as a working sample @@ -283,7 +283,7 @@ Components. We'll call it the SecurityManageable interface.

- +
Define the component extension interface

First we define the new Component extension interface. @@ -306,9 +306,9 @@ } - +

- +
Create the lifecycle extensions class

Next we define the actual extension implementation which invokes the secure() @@ -351,9 +351,9 @@ extensions, and are not limited to just one.

- +
- +
Register the lifecycle extensions class

We then inform our container about the extension. This could be done in several different @@ -384,9 +384,9 @@ } - +

- +
Use the new component interface

To use the new SecurityManageable lifecycle extension, we simply implement @@ -432,13 +432,13 @@ } } - +

- +
- +
Merlin Example - +
Create your lifestyle stage interface

The following interface is your domain specific lifecycle stage interface. It is the interface that an extension handler will use to interact with your component during deployment and decommissioning. @@ -455,9 +455,9 @@ } - +

- +
Create the lifestyle extension handler

An extension handler is the implementation class that will be activated by the Merlin container to handle domain specific tasks during the deployment and decommissioning phases. The extension can implement etier or both of the Creator and Accessor interfaces depeding on the particular extension requirements. IN this example we are defining a simple creation stage handler that supplies a message to an instance of Exploitable. @@ -513,9 +513,9 @@ - +

- +
Create a component implementing the stage interface public class MyComponent extends AbstractLogEnabled implements Exploitable { @@ -551,9 +551,9 @@ </type> - +
- +
Register you component and the extension

To complete the process you need to declare your handler and component in a jar manifest file. The following entries show the declaration of the component and the extension handler.

@@ -568,9 +568,9 @@ Avalon: Type - +
- +
Execute the example

To execute the example you simply need to include a reference to you component within a Merlin container declaration. The following XML source declares a Merlin kernel, container, and component. You don't need to include the handler because Merlin can sort that out itself based on the information supplied in the meta-info declarations.

@@ -592,16 +592,16 @@ </kernel> - +
- +
- +
Need more information ?

If you have any particular questions, comments, etc, please send an email to the Avalon developer mailing list.

- +