Return-Path:
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. The following context keys and associated values are considered to be
applicable to all containers. The following attributes may be declared within the scope of the
component info block of the meta-info model.
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.
Extending a Component's lifecycle is straightforward. An overview of the process
follows:
@@ -125,9 +125,9 @@
phases defined later in this document.
The life of any component can be broken down to the following phases:
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 describes the create and destroy
stages that occur between a component and a container
@@ -230,9 +230,9 @@
}
-
The Accessor
interface describes the access and release
stages that occur between a service or component manager and a container
@@ -268,10 +268,10 @@
}
-
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.
First we define the new Component extension interface. @@ -306,9 +306,9 @@ } -
Next we define the actual extension implementation which invokes the secure()
@@ -351,9 +351,9 @@
extensions, and are not limited to just one.
We then inform our container about the extension. This could be done in several different @@ -384,9 +384,9 @@ } -
To use the new SecurityManageable lifecycle extension, we simply implement @@ -432,13 +432,13 @@ } } -
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 @@ } -
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 @@ -
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 -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> -If you have any particular questions, comments, etc, please send an email to the Avalon developer mailing list.
-