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.
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.