blob: 93d97e248125be6400fafe76bc773e9af2b35600 [file] [log] [blame]
<?xml version="1.0"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed 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>Turbine Services - Component Service</title>
</properties>
<body>
<section name="Component Service">
<p>
The Component service loads external modules which implement the
org.apache.stratum.lifecycle Interfaces for use with Turbine 2.
</p>
<p>
Main usage for this are the <a href="http://db.apache.org/torque/">
Torque</a> and <a href="http://jakarta.apache.org/turbine/fulcrum/">
Fulcrum</a> components of the <a
hef="http://jakarta.apache.org/turbine/">Turbine</a> project.
</p>
<p>
As Turbine-2 now uses the decoupled Torque, you must initialize Torque
at startup. Fulcrum is currently not integrated in Turbine-2.2 but you
can use some services from it.
</p>
<p>
As of version 2.3 Turbine now provides an
<a href="avalon-component-service.html">Avalon Component Service</a>
that can be used to configure Torque. In future releases additional
components will be migrated to Avalon components, most likely as part
of Fulcrum.
</p>
</section>
<section name="Configuration">
<source><![CDATA[
# -------------------------------------------------------------------
#
# S E R V I C E S
#
# -------------------------------------------------------------------
# Classes for Turbine Services should be defined here.
# Format: services.[name].classname=[implementing class]
#
# To specify properties of a service use the following syntax:
# service.[name].[property]=[value]
services.ComponentService.classname=org.apache.turbine.services.component.TurbineComponentService
.
.
.
# -------------------------------------------------------------------
#
# C O M P O N E N T S E R V I C E
#
# -------------------------------------------------------------------
# Components implementing the lifecycle interfaces can be loaded,
# configured and initialized by Turbine
# -------------------------------------------------------------------
#
# Here you define the names of the various components to load. These
# names are used as identifiers later so you can choose them freely. It
# is, however, sensible to use the same names as the component projects
# that you want to load.
#
services.ComponentService.name = torque
#
# This is the class of the component to be loaded.
#
# It must implement the org.apache.stratum.lifecycle.Initializable and
# org.apache.stratum.lifecycle.Configurable interface to be loaded.
#
# It may implement the org.apache.stratum.lifecycle.Disposable interface.
# If it does, the Component is disposed at shutdown (Servlet destroy()) time.
#
services.ComponentService.torque.classname = org.apache.torque.Torque
#
# This is the path to the Config file of the Component. It is relative
# to the Root of the Application (either the Webroot given by the Servlet
# Container or the Root given to TurbineConfig at startup time)
#
services.ComponentService.torque.config = /conf/Torque.properties
#
# Properties can be given directly to Components. This sets the "foo"
# property for torque to "bar".
#
services.ComponentService.torque.property.foo = bar
# This is an example of how to load Fulcrum as a component
#
#
services.ComponentService.name = fulcrum
services.ComponentService.fulcrum.classname = org.apache.fulcrum.Fulcrum
services.ComponentService.fulcrum.config = /conf/Fulcrum.properties
]]></source>
</section>
<section name="Usage">
<p>
If you plan to use the decoupled Torque in your application, you should
leave the Component Service configured at all times. It is started at
early startup time. Once it has initialized all the components, there
are no application specific methods or services available.
</p>
</section>
</body>
</document>