|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.logicalcobwebs.proxool.configuration.AvalonConfigurator
public class AvalonConfigurator
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
.
Field Summary | |
---|---|
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. |
private boolean |
closeOnDispose
|
private java.util.List |
configuredPools
|
private static Log |
LOG
|
static java.lang.String |
ROLE
Avalon ROLE id for this component. |
Constructor Summary | |
---|---|
AvalonConfigurator()
|
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. |
private org.xml.sax.Attributes |
getAttributes(Configuration configuration)
|
private void |
reportProperties(XMLConfigurator xmlConfigurator,
Configuration[] properties)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Log LOG
public static final java.lang.String ROLE
public static final java.lang.String CLOSE_ON_DISPOSE_ATTRIBUTE
private boolean closeOnDispose
private final java.util.List configuredPools
Constructor Detail |
---|
public AvalonConfigurator()
Method Detail |
---|
public void configure(Configuration configuration) throws ConfigurationException
XMLConfigurator
.
configuration
- the configuration handed over by the Avalon Framework.
ConfigurationException
- if the configuration fails.public void dispose()
CLOSE_ON_DISPOSE_ATTRIBUTE
is set: Close all connection pools that this configurator has configured.
private void reportProperties(XMLConfigurator xmlConfigurator, Configuration[] properties) throws ConfigurationException, org.xml.sax.SAXException
ConfigurationException
org.xml.sax.SAXException
private org.xml.sax.Attributes getAttributes(Configuration configuration) throws ConfigurationException
ConfigurationException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |