public class AvalonConfigurator
extends java.lang.Object
implements org.apache.avalon.framework.component.Component, org.apache.avalon.framework.configuration.Configurable
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
.
Modifier and Type | Field and Description |
---|---|
static java.lang.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 java.lang.String |
ROLE
Avalon ROLE id for this component.
|
Constructor and Description |
---|
AvalonConfigurator() |
Modifier and Type | Method and Description |
---|---|
void |
configure(org.apache.avalon.framework.configuration.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. |
public static final java.lang.String ROLE
public static final java.lang.String CLOSE_ON_DISPOSE_ATTRIBUTE
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
XMLConfigurator
.configure
in interface org.apache.avalon.framework.configuration.Configurable
configuration
- the configuration handed over by the Avalon Framework.org.apache.avalon.framework.configuration.ConfigurationException
- if the configuration fails.public void dispose()
CLOSE_ON_DISPOSE_ATTRIBUTE
is set: Close all connection pools that this configurator has configured.