resin.conf: Ports, Virtual Hosts, Clustering and Threads
Resin 3.1

Documentation
Examples
Changes

Overview
Installation
Configuration
Quercus
SOA/IoC
JSP
Servlets and Filters
Admin (JMX)
EJB
Amber
Security
Performance
Hessian
XML and XSLT
Third-party
Troubleshooting/FAQ

tags
Common Tasks
Relax Schema
howto
Config FAQ
Scrapbook
DB Scrapbook

env tags
<resin>
<cluster>
<server>
port tags
<host>
<web-app>
<database>
session tags
rewrite tags
service tags
log
el variables
el control
env tags
tags
<cluster>

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

See Also

  • See the index for a list of all the tags.
  • See Web Application configuration for web.xml (Servlet) configuration.
  • See Environment configuration for resources: classloader, databases, connectors, and resources.
  • See Log configuration for access log configuration, java.util.logging, and stdout/stderr logging.
<cluster>
child of resin

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

<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>
idName of the clusterrequired
<cluster-default>
child of resin

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

<resin>

<resin> is the top-level configuration tag for the resin.conf 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
<resin xmlns="http://caucho.com/ns/resin">
  <cluster id="web-tier">
    <server id="">
      <http address="*" port="8080"/>
    </server id="">

    <resin:import path="app-default.xml"/>

    <host id=""/>
      <web-app id="/"/>
    </host>
  </cluster>
</resin>
EL variables defined by <resin>
variablecorresponding API
resin-homeCauchoSystem.getResinHome()
server-rootCauchoSystem.getServerRoot()
<root-directory>
child of resin, cluster, host, web-app

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

<security-manager>

<security-manager> enables the use of the security manager for the JVM.

<resin xmlns="http://caucho.com/ns/resin"
       xmlns:resin="http://caucho.com/ns/resin/core">

  ...
  <security-manager/>
  ...
<security-provider>

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

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

  ...

Common Tags

There are some conventions for tag names that provide similar functionality.

fileset

<fileset> provides the ability to match a set of files. It is modelled after the ant tag by the same name.

dirthe starting directoryrequired
includean include patterndo not include all files
excludean exclude patterndo not exclude any files

A pattern can contain two special characters: '*' and '**'. '*' matches any part of path, but does not match the path separator. '**' matches any part of a path, including the path separator.

<fileset dir="lib">
  <include name="*.jar"/>
</fileset>

MATCH    lib/foo.jar
MATCH    lib/bar.jar
NO MATCH lib/baz/foo.jar
<fileset dir="lib">
  <include name="**/*.jar"/>
</fileset>

MATCH    lib/foo.jar
MATCH    lib/bar.jar
MATCH    lib/baz/foo.jar

Startup and Redeploy Mode

The startup-mode is used in a number of places to determine the behaviour of a resource when the server starts.

The startup-mode has three values: "automatic", "lazy", and "manual".

  • automatic - starts the resource on server start (default)
  • lazy - starts the resource on the first use
  • manual - waits for JMX to start the resource

The redeploy-mode is used in a number of places to determine the behaviour of a resource when it is replaced or modified while the server is running.

The redeploy-mode has two values: "automatic", and "manual".

  • automatic - restarts the resource when it is modified (web.xml, *.class, *.war, etc).
  • manual - waits for JMX to restart the resource when changes occur.

env tags
tags
<cluster>
Copyright © 1998-2006 Caucho Technology, Inc. All rights reserved.
Resin ® is a registered trademark, and Quercustm, Ambertm, and Hessiantm are trademarks of Caucho Technology.