Caucho Technology
  • resin 4.0
  • resin.xml: top-level configuration

    The top-level <resin> tag contains any <cluster> defined for a deployment. It also provides an resources for class-loaders, logging and shared resources.


    child of resin

    <cluster> configures a set of servers used for load-balancing and for sharing distributed sessions.

    • See the <cluster> tag for more details about the cluster contents.
    • See the <server> tag for more details about the server contents.
    <resin xmlns="">
      <cluster id="app-tier">
        <server id="a" address=""/>
        <server id="b" address=""/>
        <host id="">
          <web-app-deploy path="webapps"/>
    <cluster> Attributes
    idName of the clusterrequired


    child of resin

    <cluster-default> configures common configuration for all clusters.


    default true

    By default, Resin's System.getProperties() is environment-dependent, so the settings in on web-app do not affect the properties in any other web-app. Some sites may need to disable this virtualization capability, when using certain JVM agents.

    <environment-system-properties> schema
    element environment-system-properties {


    <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.

    <resin> schema
    element resin {
      env resources
      & cluster*
      & cluster-default*
      & environment-system-properties?
      & management?
      & min-free-memory?
      & resin-data-directory?
      & resin-system-auth-key?
      & root-directory?
      & security-manager?
      & security-provider?
      & watchdog-manager?
    Example: minimal resin.xml
    <resin xmlns=""
      <cluster id="web-tier">
        <server id="">
          <http address="*" port="8080"/>
        <resin:import path="app-default.xml"/>
        <host id="">
          <web-app id="" root-directory="/var/www/htdocs"/>


    All Resource tags are available to the <host>, for example, resources like <database> or <authenticator>. Resources defined at the host level are available for all web-apps in the host.

    Example: shared database in resin
    <resin xmlns="">
      <database jndi-name="jdbc/test">
        <driver type="org.postgresql.Driver">
      <cluster id="app-tier">


    child of resin

    <resin-data-directory> specifies the location of Resin's administration and data files, including persistent caching, sessions, and administration logs.

    <resin-data-directory> schema
    element resin-data-directory {


    child of resin

    <resin-system-auth-key> specifies authorization token for Resin's Security service.

    <resin-system-auth-key> schema
    element resin-system-auth-key {


    <root-directory> specifies the base directory for the contexts. All EL-style directory paths are relative to the root-directory.

    <root-directory> schema
    element root-directory {


    <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.

    <security-manager> schema
    element security-manager {
    Example: enabling security-manager
    <resin xmlns="">


    <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.

    <security-provider> schema
    element security-provider {
    Example: adding custom security providers
    <resin xmlns=""



    java properties
    versionReturns the JDK version from the java.version property


    resin properties
    addressThe machine's address as returned by InetAddress
    confThe path to the resin.xml
    homeThe --resin-home value, i.e. the location of the Resin installation
    homeNameThe local hostname as returned by InetAddress
    idThe --serverId command line value (see serverId)
    isProfessional()True if Resin professional is installed and licensed
    rootThe --resin-root value, i.e. the site's deployment directory
    serverIdThe --serverId command line value
    versionThe Resin version
    versionDateThe compilation date of Resin


    The ${system} variable return the System.getProperties() value.

    Example: returning -Dfoo=bar
    <resin xmlns=""


    The <watchdog> tag is used in ISP-style configurations where the <watchdog-manager> is configured separately from the resin.xml instances, and where the configuration file is generally not readable by the instance users.

    The <watchdog> tag corresponds to the <server> tag in standard resin.xml configurations, and specifies the resin.xml, the root directory and resin-user.

    <watchdog> Attributes
    chrootcalls chroot before starting the Resin process
    group-namesetgid value for unix systems
    java-exejava executable to use for the Resin instancejava
    java-homeJAVA_HOME value for the Resin instance
    open-portlist of ports the watchdog should open for the Resin instance, e.g. for ports that require root access
    resin.xmlPath to the resin.xml file for the Resin instancesame as for watchdog
    resin-rootRoot directory for the Resin instancesame as for watchdog
    <watchdog> schema
    element watchdog {
      attribute id { string }
      & chroot?
      & group-name?
      & java-exe?
      & java-home?
      & jvm-arg*
      & resin.xml?
      & resin-root?
      & open-port { address & port }*
      & user-name?


    For ISP configurations, <watchdog-manager> is used for a separate resin.xml just to configure the watchdog-manager itself. The <watchdog-manager> selects the <user-name>, <resin.xml>, ports, and Resin home directories before giving access to the user's Resin instance.

    <watchdog-manager> Attributes
    watchdogWatchdog configuration for a Resin instance, corresponding to a <server> in the resin.xml
    watchdog-addressThe TCP address the watchdog-manager listens for start, stop, status127.0.0.1
    watchdog-defaultDefaults applied to all watchdog instances
    watchdog-jvm-argJVM arguments for the watchdog-manager when launched
    watchdog-portThe TCP port the watchdog-manager listens for start, stop, status6700
    <watchdog-manager> schema
    element watchdog-manager {
      & watchdog-address?
      & watchdog-default*
      & watchdog-jvm-arg*
      & watchdog-port?

    Copyright © 1998-2011 Caucho Technology, Inc. All rights reserved.
    Resin ® is a registered trademark, and Quercustm, Ambertm, and Hessiantm are trademarks of Caucho Technology.