resin.xml: top-level configuration
The top-level <resin> tag contains any <cluster> defined for a deployment. It also provides a resources for class-loaders, logging and shared resources. child of resin
<cluster> configures a set of identically-configured servers. The cluster typically configures a set of <server>s, each with some ports, and a set of virtual <host>s. Only one <cluster> is active in any on server. At runtime, the <cluster> is selected by the <server> with matching the -server on the command line.
element cluster { attribute id { string } & environment resources & access-log? & cache? & connection-error-page? & ear-default* & error-page* & host* & host-default* & host-deploy* & ignore-client-disconnect? & invocation-cache-size? & invocation-cache-max-url-length? & machine* & ping* & redeploy-mode? & resin:choose* & resin:import* & resin:if* & rewrite-dispatch? & root-directory? & server* & server-default* & server-header? & session-cookie? & session-sticky-disable? & url-character-encoding? & url-length-max? & web-app-default* } <resin xmlns="http://caucho.com/ns/resin"> <cluster id="web-tier"> <server-default> <http port="8080"/> </server-default> <server id="a" address="192.168.0.10"/> <server id="b" address="192.168.0.11"/> <host host-name="www.foo.com"> ... </host> </cluster> </resin> child of resin
<cluster-default> defines default cluster configuration for all clusters in the <resin> server. <resin xmlns="http://caucho.com/ns/resin"> <cluster-default> <cache entries="16384" memory-size="64M"/> </cluster-default> <cluster id="web-tier"> ... </cluster> <cluster id="app-tier"> ... </cluster> </resin> By default, Resin's element environment-system-properties { r_boolean-Type } <resin> is the top-level configuration tag for the resin.xml file. The <resin> tag needs to specify the Resin namespace, to allow for validation of the configuration file. The environment of the top-level <resin> is the global classpath. This environment can be important for <log> configuration for threads which run with using only the global class loader. Because the <resin> environment does not have a dynamic class loader, dynamically loaded classes, like custom jars in resin/lib are not available.
element resin {
& cluster*
& cluster-default*
& environment-system-properties?
& management?
& min-free-memory?
& resin-data-directory?
& root-directory?
& security-manager?
& security-provider?
& watchdog-manager?
}
<resin xmlns="http://caucho.com/ns/resin" xmlns:resin="http://caucho.com/ns/resin/core"> <root-directory>/var/www</root-directory> <cluster id="web-tier"> <server id=""> <http address="*" port="8080"/> </server> <resin:import path="app-default.xml"/> <host id=""> <web-app id="" root-directory="/var/www/htdocs"/> </host> </cluster> </resin> child of resin
<resin-data-directory> specifies the location of Resin's administration and data files, including persistent caching, sessions, and administration logs. element resin-data-directory { r_path-Type } child of resin
<resin-system-auth-key> specifies authorization token for Resin's Security service. element resin-system-auth-key { String } javadoc <resin:AdminAuthenticator>
Authenticator used by Resin for administration purposes such as the /resin-admin application. Also used by the watchdog and clustering code to authenticate servers, so changing principals or passwords in this authenticator requires a shutdown and restart of the watchdog and Resin instances. Uses the same syntax as XmlAuthenticator.
<root-directory> specifies the base directory for the contexts. All EL-style directory paths are relative to the root-directory. element root-directory { r_path-Type } <resin xmlns="http://caucho.com/ns/resin"> <cluster id="app-tier"> <root-directory>/var/www/app-tier</root-directory> <server id="a" ...> <host host-name="www.foo.com"> </cluster> </resin> <security-manager> enables the use of the security manager for the JVM. Because the JVM security manager is very slow, we generally do not recommend enabling it for server applications. Instead, see the watchdog configuration for alternative methods for securiting the JVM in ISP configurations. element security-manager { r_boolean-Type } <resin xmlns="http://caucho.com/ns/resin"> ... <security-manager/> ... <security-provider> adds one or more security providers. Each entry specifies the name of a security provider class. The name is used to instantiate an instance of the object, which is then passed to Security.addProvider. element security-provider { string } <resin xmlns="http://caucho.com/ns/resin" xmlns:resin="http://caucho.com/ns/resin/core"> ... <security-provider> com.sun.net.ssl.internal.ssl.Provider </security-provider> <security-provider> example.MyProvider </security-provider> ... <stat-service> periodically checks the status of the server, and reports errors as necessary.
element stat-service { unix-load-avg-exit-threshold? & cpu-load-log-info-threshold? & cpu-load-log-warning-threshold? & cpu-load-thread-dump-threshold? & sample-period? & thread-dump-interval? }
|