blob: 63178214280a4551c949bbbc70f00a129f0d6301 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<document>
<properties>
<title>Fulcrum YAAFI Avalon Container Specification</title>
<author email="siegfried.goeschl@it20one.at">Siegfried Goeschl</author>
</properties>
<body>
<section name="Container Configuration">
<p> The Container Configuration File is used to bootstrap the YAAFI container. This file is
optional and only used if you either want full control over the container configuration or
would like to use advanced features such as global interceptors of fallback service
managers. </p>
<subsection name="Specification">
<table>
<tr>
<th>Item</th>
<th>Datatype</th>
<th>Cardinality</th>
<th>Description</th>
</tr>
<tr>
<td>containerType</td>
<td>String</td>
<td>[0|1]</td>
<td>The type of Avalon container where YAAFI is instantiated, either "phoenix",
"fortress" or "merlin". If no value is defined then <b>merlin</b> will be used. This
parameter is only relevant if you embed YAAFI into another Avalon container. </td>
</tr>
<tr>
<td>containerClazzName</td>
<td>String</td>
<td>[0|1]</td>
<td>The class name of the YAAFI container to be instantiated. This feature allows to use
inheritance for customizing the container functionality. </td>
</tr>
<tr>
<td>componentRoles</td>
<td>Tree</td>
<td>[0|1]</td>
<td>Information about the role configuration file</td>
</tr>
<tr>
<td>componentRoles/location</td>
<td>String</td>
<td>[0|1]</td>
<td>The location of the component role file</td>
</tr>
<tr>
<td>componentRoles/isEncrypted</td>
<td>String</td>
<td>[0|1]</td>
<td>Is the component role file encrypted? The possible values are
["true"|"false"|"auto"] </td>
</tr>
<tr>
<td>componentConfiguration</td>
<td>Tree</td>
<td>[0|1]</td>
<td>Information about the component configuration file</td>
</tr>
<tr>
<td>componentConfiguration/location</td>
<td>String</td>
<td>[0|1]</td>
<td>The location of the component configuration file</td>
</tr>
<tr>
<td>componentConfiguration/isEncrypted</td>
<td>String</td>
<td>[0|1]</td>
<td>Is the component configuration file encrypted? The possible values are
["true"|"false"|"auto"] </td>
</tr>
<tr>
<td>componentConfigurationProperties</td>
<td>Tree</td>
<td>[0|1]</td>
<td>Information about the component configuration proeprties used to resolve variables
in the componentConfiguration </td>
</tr>
<tr>
<td>componentConfigurationProperties/location</td>
<td>String</td>
<td>[0|1]</td>
<td>The location of the component configuration property file. The default value is
"/componentConfiguration.properties" </td>
</tr>
<tr>
<td>componentConfigurationProperties/resolver</td>
<td>String</td>
<td>[0|1]</td>
<td>The fully-qualified name of a class implementing
"ComponentConfigurationPropertiesResolver". An instance of this class is created to
support custom property resolvers such as commons-configuration integration. </td>
</tr>
<tr>
<td>parameters</td>
<td>Tree</td>
<td>[0|1]</td>
<td>Information about the parameters file</td>
</tr>
<tr>
<td>parameters/location</td>
<td>String</td>
<td>[0|1]</td>
<td>The location of the parameters file</td>
</tr>
<tr>
<td>parameters/isEncrypted</td>
<td>String</td>
<td>[0|1]</td>
<td>Is the parameters file encrypted? The possible values are
["true"|"false"|"auto"]</td>
</tr>
<tr>
<td>hasDynamicProxies</td>
<td>Boolean</td>
<td>[true|false]</td>
<td>Enable the usage of dynamic proxies for the whole container. When the no dynamic
proxies are used no interceptors will be installed. This is a quick way to disable a
interceptors without touching the remaining configuration (e.g. enable interceptors
for execution time profiling during intergration testing).</td>
</tr>
<tr>
<td>interceptors</td>
<td>Tree</td>
<td>[0|1]</td>
<td>Contains a list of container specific interceptors</td>
</tr>
<tr>
<td>interceptors/interceptor</td>
<td>String</td>
<td>[0..n]</td>
<td>Contains the service name of an interceptor</td>
</tr>
<tr>
<td>serviceManagers</td>
<td>Tree</td>
<td>[0|1]</td>
<td>Contains a list of fallback service managers used to expose additional servcices not
managed by the Avalon container.</td>
</tr>
<tr>
<td>serviceManager</td>
<td>String</td>
<td>1</td>
<td> The name of a service implementing the "ServiceManager" interface. The service
lookup is used to locate service not managed by by the Avalon container. This allows
to transparently integrate other service framework such as Spring.</td>
</tr>
</table>
</subsection>
<subsection name="Example 1">
<p>A plain vanilla container configuration defining the location of all configuration
files. It is assumed that the configuration files are not encrypted.</p>
<source><![CDATA[
<fulcrum-yaafi>
<componentRoles>
<location>./src/test/TestRoleConfig.xml</location>
</componentRoles>
<componentConfiguration>
<location>./src/test/TestComponentConfig.xml</location>
</componentConfiguration>
<parameters>
<location>./src/test/TestParameters.properties</location>
</parameters>
</fulcrum-yaafi>
]]></source>
</subsection>
<subsection name="Example 2">
<p>This container configuration defines the location of the component role and component
configuration files. Furthermore it adds two interceptors to all managed services.</p>
<source><![CDATA[
<fulcrum-yaafi>
<componentRoles>
<location>./src/test/componentRoles.xml</location>
</componentRoles>
<componentConfiguration>
<location>./src/test/componentConfiguration.xml</location>
</componentConfiguration>
<interceptors>
<interceptor>org.apache.fulcrum.yaafi.interceptor.performance.PerformanceInterceptorService</interceptor>
<interceptor>org.apache.fulcrum.yaafi.interceptor.logging.LoggingInterceptorService</interceptor>
</interceptors>
</fulcrum-yaafi>
]]></source>
</subsection>
<subsection name="Example 3">
<p>This container configuration defines the location of the component role and component
configuration files. Furthermore it defines a fallback service manager to lookup services
managed by the Spring framework.</p>
<source><![CDATA[
<fulcrum-yaafi>
<componentRoles>
<location>./src/test/springIntoAvalonComponentRoles.xml</location>
</componentRoles>
<componentConfiguration>
<location>./src/test/springIntoAvalonComponentConfiguration.xml</location>
</componentConfiguration>
<serviceManagers>
<serviceManager>springFrameworkService</serviceManager>
</serviceManagers>
</fulcrum-yaafi>
]]></source>
</subsection>
</section>
</body>
</document>