Class AvalonConfigurator
- java.lang.Object
-
- org.logicalcobwebs.proxool.configuration.AvalonConfigurator
-
public class AvalonConfigurator extends java.lang.ObjectConfigurator for the Avalon Framework. The configuration can contain any number of <proxool> elements. The <proxool> elements are delegated toXMLConfigurator, 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
configuremethod. 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 aretrueorfalse. Default:true.- Version:
- $Revision: 1.14 $, $Date: 2006/01/18 14:39:58 $
- Author:
- billhorsman, $Author: billhorsman $ (current maintainer)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCLOSE_ON_DISPOSE_ATTRIBUTEConstant 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.StringROLEAvalon ROLE id for this component.
-
Constructor Summary
Constructors Constructor Description AvalonConfigurator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Configuration configuration)Check that all top level elements are named proxool and hand them toXMLConfigurator.voiddispose()IfCLOSE_ON_DISPOSE_ATTRIBUTEis set: Close all connection pools that this configurator has configured.
-
-
-
Field Detail
-
ROLE
public static final java.lang.String ROLE
Avalon ROLE id for this component.
-
CLOSE_ON_DISPOSE_ATTRIBUTE
public static final 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. Legal values are "true" or "false". Default: true.- See Also:
- Constant Field Values
-
-
Method Detail
-
configure
public void configure(Configuration configuration) throws ConfigurationExceptionCheck that all top level elements are named proxool and hand them toXMLConfigurator.- Parameters:
configuration- the configuration handed over by the Avalon Framework.- Throws:
ConfigurationException- if the configuration fails.
-
dispose
public void dispose()
IfCLOSE_ON_DISPOSE_ATTRIBUTEis set: Close all connection pools that this configurator has configured.
...else: do nothing.
-
-