Configuration Mechanism
Tammi starts up as an empty run-time container that is configured for a specific
application and purpose with configuration scripts. Dynamic configuration is
capable of changing almost any component property both during startup and run-time.
Correspondingly, component implementations must accept configuration changes during
run-time. Tammi supports property files and Bean Scripting Framework (BSF) scripts
for configuration. BSF supports several scripting languages but Tammi itself applies
only DynamicJava.
Script and Property File Organization
Our convention is to organize configuration files based on the application
name and optionally on a functional subdivision.
Property files are referred to by explicit path names relative to a folder
defined for a specific path finder key. The default keys are start
for startup scripts, script for configuration scripts and
config for property files.
Don't create property files with the same name into different folders or copy
and paste settings from the default property files into your files.
Instead, create a separate property file for each purpose and name it precisely.
Include default properties before or after your settings. You may either
override or extend the included properties.
All folders and subfolders defined for the start key are
searched for startup scripts executed automatically during the startup process.
If you run scripts later during run-time, refer to them by explicit
path names relative to a folder defined for the corresponding path finder key.
Example - Configuration Files of an Imaginary Application
The start, script and config keys
have been defined to refer to folders etc/start, etc/script
and etc/config, respectively.
- The script 350_StartSomething.java is executed automatically during startup.
- The script SomeScript.java can be invoked by evaluating a path myapp/foo/SomeScript.java.
- The file some.properties can be referred to by a path myapp/foo/some.properties.
<root>
|---etc
....|---config
........|---myapp
............|---foo
................|---some.properties
....|---script
........|---myapp
............|---foo
................|---SomeScript.java
....|---start
........|---myapp
............|---foo
................|---350_StartSomething.java
|