org.logicalcobwebs.proxool.configuration

Class AvalonConfigurator

Implemented Interfaces:
Component, Configurable, Disposable, ThreadSafe

public class AvalonConfigurator
extends java.lang.Object
implements Component, Configurable, ThreadSafe, Disposable

Configurator for the Avalon Framework. The configuration can contain any number of <proxool> elements. The <proxool> elements are delegated to XMLConfigurator, and have exactly the same format as is documented in that class.

This is a "faceless" Avalon component. This means that it does not present an operational interface, it simply configures Proxool when Avalon calls its configure method. You need to lookup this component in your bootstrap code to make this happen.

The configuration takes one attribute: close-on-dispose
You can use this to let this configurator know wether or not to close the pools it has created when it is disposed.
Legal values are true or false. Default: true.

Version:
$Revision: 1.14 $, $Date: 2006/01/18 14:39:58 $
Authors:
billhorsman
$Author: billhorsman $ (current maintainer)

Field Summary

static String
CLOSE_ON_DISPOSE_ATTRIBUTE
Constant for the boolean "close-on-dispose" attribute that signifies wether or not this configurator shall close the pools it has created when it is disposed.
static String
ROLE
Avalon ROLE id for this component.

Method Summary

void
configure(Configuration configuration)
Check that all top level elements are named proxool and hand them to XMLConfigurator.
void
dispose()
If CLOSE_ON_DISPOSE_ATTRIBUTE is set: Close all connection pools that this configurator has configured.

Field Details

CLOSE_ON_DISPOSE_ATTRIBUTE

public static final String CLOSE_ON_DISPOSE_ATTRIBUTE
Constant for the boolean "close-on-dispose" attribute that signifies wether or not this configurator shall close the pools it has created when it is disposed. Legal values are "true" or "false". Default: true.

ROLE

public static final String ROLE
Avalon ROLE id for this component.

Method Details

configure

public void configure(Configuration configuration)
            throws ConfigurationException
Parameters:
configuration - the configuration handed over by the Avalon Framework.

dispose

public void dispose()
If CLOSE_ON_DISPOSE_ATTRIBUTE is set: Close all connection pools that this configurator has configured.
...else: do nothing.