📄 resin-tags.xtp
字号:
<document><header> <product>resin</product> <title>resin.xml: top-level configuration</title> <version>Resin 3.0</version> <description> <p>The top-level <resin> tag contains any<<a href="cluster-tags.xtp">cluster</a>> defined for a deployment.It also provides an <a href="env-tags.xtp">resources</a> forclass-loaders, logging and shared resources.</p> </description></header><body><localtoc/><s1 title="See Also"><ul><li>See the <a href="index-tags.xtp">index</a> for a list of all the tags.</li><li>See <a href="server-tags.xtp">Server tags</a> for JVM-specific configuration like thread-max, JVM settings, ports, etc.</li><li>See <a href="webapp-tags.xtp">Web Application</a> configuration for web.xml (Servlet) configuration.</li><li>See <a href="config-env.xtp">Resource</a> configuration: classloader, databases, connectors, and beans.</li><li>See <a href="config-log.xtp">Log</a> configuration for access log configuration, java.util.logging, and stdout/stderr logging.</li></ul></s1><defun title="<cluster>" version="Resin 3.0"><parents>resin</parents><p><cluster> configures a set of servers used for load-balancing and forsharing distributed sessions.</p><ul><li>See <a href="cluster-tags"><cluster> tags</a> for more detailsabout the cluster contents.</li><li>See <a href="server-tags"><server> tags</a> for more detailsabout the server contents.</li></ul><example><resin xmlns="http://caucho.com/ns/resin"> <cluster id="app-tier"> <server id="a" address="192.168.0.1"/> <server id="b" address="192.168.0.2"/> <host id=""> <web-app-deploy path="webapps"/> </host> </cluster></resin></example><deftable title="<cluster> Attributes"><tr> <th>Attribute</th> <th>Description</th> <th>Default</th></tr><tr> <td>id</td> <td>Name of the cluster</td> <td>required</td></tr></deftable></defun><defun title="<cluster-default>" version="Resin 3.1"><parents>resin</parents><p><cluster-default> configures common configuration for allclusters.</p></defun><defun title="<environment-system-properties>"><default>true</default><p>By default, Resin's <code>System.getProperties()</code> isenvironment-dependent, so the settings in on web-app do not affect theproperties in any other web-app. Some sites may need to disablethis virtualization capability, when using certain JVM agents.</p><def title="<environment-system-properties> schema">element environment-system-properties { r_boolean-Type}</def></defun><defun title="<jmx-service>"><p><jmx-service> enables the clustered JMX management.</p><def title="<jmx-service> schema">element jmx-service { enable?}</def></defun><defun title="<log-service>"><p><log-service> enables persistent storage of warning and criticallog messages in the administration.</p><def title="<log-service> schema">element log-service { enable? & level?}</def></defun><defun title="<management>" version="Resin 3.0"><p><management> controls system-wide management capabilities, likethe clustered JMX reporting, transaction logging, and persistence logging.It also defines a system-wide administration authenticator, providing acentralized place to manage administration identity.</p><p>The <user> configuration is particularly important since it is usedas a security measure for the <a href="resin-watchdog.xtp">watchdog</a>as well as for remote JMX capabilities.</p><deftable title="<management> Attributes"><tr> <th>Attribute</th> <th>Description</th></tr><tr> <td>jmx-service</td> <td>enables the remote JMX administration (Resin-Pro)</td></tr><tr> <td>log-service</td> <td>enables persistent log management (Resin-Pro)</td></tr><tr> <td>path</td> <td>configures the directory for storing management data</td></tr><tr> <td>user</td> <td>configures system-wide administration accounts</td></tr><tr> <td>xa-log-service</td> <td>enables XA logging (Resin-Pro)</td></tr></deftable><def title="<management> schema">element management { jmx-service? & log-service? & path & secure? & user*}element user { name & password & disable?}</def><s2 title="user"><p>The <user> tags in <management> define Resin administrators forthe /resin-admin service and also add security for JMX remoting and thewatchdog.</p><p>Since the authenticator is available to all web-apps, you canuse the <management> login as a simple security authenticator forthe entire site. The role of the logged-in user is <var>resin-admin</var>,for configuring security authentication and for the <code>isUserInRole</code>method.</p><p>The password field is an MD5 hash of the username and password for security.The /resin-admin or <code>PasswordDigest</code> can be used to create thehash. See <a href="resin-security.xtp">Resin security</a> for moreinformation.</p><deftable title="<user> Attributes"><tr> <th>Attribute</th> <th>Description</th> <th>Default</th></tr><tr> <td>name</td> <td>The user's name</td> <td>required</td></tr><tr> <td>password</td> <td>An MD5 hash of the username and password. The /resin-admin pageprovides an easy way of generating the hash.</td> <td>required</td></tr><tr> <td>disable</td> <td>disable the user from logging in</td> <td>false</td></tr></deftable><def title="<user> schema">element user { name & password & disable?}</def></s2></defun><defun title="<resin>" version="Resin 3.0"> <p><resin> is the top-level configuration tag forthe resin.xml file. The <resin>tag needs to specify the Resin namespace, to allow for validationof the configuration file.</p><p>The environment of the top-level <resin> is the global classpath.This environment can be important for <log> configurationfor 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 jarsin resin/lib are not available.</p><def title="<resin> schema">element resin { <var>env resources</var> & cluster* & cluster-default* & environment-system-properties? & management? & min-free-memory? & root-directory? & security-manager? & security-provider? & watchdog-manager?}</def><example title="Example: minimal resin.xml"><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></example></defun><defun title="Resources" version="Resin 3.1"><parents>resin, cluster, host, web-app</parents><p>All <a href="env-tags.xtp">Resource tags</a> areavailable to the <host>, for example, resourceslike <database> or <authenticator>. Resources defined atthe host level are available for all web-apps in the host.</p><example title="Example: shared database in resin"><resin xmlns="http://caucho.com/ns/resin"> <database jndi-name="jdbc/test"> <driver type="org.postgresql.Driver"> <url>jdbc:postgresql://localhost/test</url> <user>caucho</user> </driver> </database> <cluster id="app-tier"> ... </cluster></resin></example></defun><defun title="<root-directory>" version="Resin 3.0"><parents>resin, cluster, host, web-app</parents><p><root-directory> specifies the base directoryfor the contexts. All EL-style directory paths are relative tothe root-directory.</p><def title="<root-directory> schema">element root-directory { r_path-Type}</def></defun><defun title="<security-manager>"><p><security-manager> enables the use of the security manager for the JVM.Because the JVM security manager is very slow, we generally do notrecommend enabling it for server applications. Instead, see the<a href="resin-watchdog.xtp">watchdog</a> configuration for alternativemethods for securiting the JVM in ISP configurations.</p><def title="<security-manager> schema">element security-manager { r_boolean-Type
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -