##### General information

- Overview
- News and Status
- Downloads
- Addons
- Changes
- Old Changes
- Wiki
- Issue tracker
- Mailing lists
- Tools
- License
- Team
- Developer Information
- Sponsorship
- Security
- Thanks

##### Documentation

- Tutorial
- OR Mapping Reference
  - Defining the Schema
  - Running the Generator
  - Database independence
  - Initialisation of the Runtime
  - Reading from the DB
  - Writing to the DB
  - Extending classes
  - Connections and Transactions
  - Exception handling
  - Inheritance
  - Supported databases
  - Supporting a new DB
  - Managers and Cache
  - Beans
  - Avalon Component
  - Customizing the generation
  - Relevant classes
  - Source XSD
  - Source XSD (strict)
  - Migration from Torque 3
- Code Generation Reference
- Module Documentation

##### Previous releases

- Torque 3.3

## General

Torque has provided Avalon Component support for some time now. This little HowTo should provide the necessary information to use Torque with some Avalon containers, namely ECM, Merlin and Fulcrum-YAAFI.

## Configuration

The configuration is straightforward. Use the following snippet to make the Torque component available in your container:

    <role-list>
        <role
            name="org.apache.torque.avalon.Torque"
            shorthand="Torque"
            default-class="org.apache.torque.avalon.TorqueComponent"/>
    </role-list>

Torque will need access to its configuration file, so the component configuration looks like this:

    <componentConfig>
        <Torque>
          <configFile>/WEB-INF/conf/Torque.properties</configFile>
        </Torque>
    </componentConfig>

The path of the configuration file is relative to the application root of the container.

## Use

All access to the Torque component should go through the `org.apache.torque.avalon.Torque` interface. It provides all methods available in `TorqueInstance`. The role name to lookup the component in your container is also `org.apache.torque.avalon.Torque`.