| Context Deployer
This deployer scans a designated directory by
ContextDeployer.setConfigurationDir(String) for the appearance/disappearance or
changes to xml configuration files. The scan is performed at startup and at
an optional hot deployment frequency specified by
ContextDeployer.setScanInterval(int) .
Each configuration file is in
XmlConfiguration format and represents
the configuration of a instance of
ContextHandler (or a subclass
specified by the XML Configure element).
The xml should configure the context and the instance is deployed to the
ContextHandlerCollection specified by
ContextDeployer.setContexts(Server) .
Similarly, when one of these existing files is removed, the corresponding
context is undeployed; when one of these files is changed, the corresponding
context is undeployed, the (changed) xml config file reapplied to it, and
then (re)deployed.
Note that the context itself is NOT copied into the hot deploy directory. The
webapp directory or war file can exist anywhere. It is the xml config file
that points to it's location and deploys it from there.
It means, for example, that you can keep a "read-only" copy of your webapp
somewhere, and apply different configurations to it simply by dropping
different xml configuration files into the configuration directory.
|