Resin 3.1 Upgrade
From Resin 3.0
- Use java -jar lib/resin.jar start instead of wrapper.pl
- resin.conf <cluster> and <server> reorganization
- jvm-arg arg configuration
Contents |
steps
To convert a Resin 3.0 config to Resin 3.1 or later, use the following steps:
- change <server> to <cluster>
- change <srun> to <server>
- put any <http> inside the <server> or <server-default>
- put JVM arguments inside <jvm-arg> inside <server>
- add explicit <host> or <web-app> for any default web-app or host
- put default configuration in <web-app-default>, <host-default>, or <server-default> as appropriate
- if you use multiple resin.conf for 3.0, merge them into a single resin.conf with separate <cluster> items.
- change any scripts calling wrapper.pl to call java -jar lib/resin.jar start
cluster and server
In Resin 3.1, we've adopted a consistent definition of the following terms to reduce ambiguity:
- server - a single JVM instance
- machine - a physical (or virtualized) machine, i.e. a single operating system copy
- cluster - a set of identically-configured servers. The jvm-args may differ, but the content served is identical
The Resin 3.1 configuration matches these definitions and follows a strict hierarchy:
- <resin> - domain containing of all clusters
- <cluster> - a collection of identical serveres, e.g. load-balancer tier vs app-tier vs JMS queue tier
- <host> - a virtual host
- <web-app> - a web-application
Even if you have a single server, that server belongs to a <cluster> with one server.
jvm-arg configuration in Resin 3.1
Resin 3.1 configures JVM arguments in the resin.conf using a <jvm-arg> so all configuration can be in one place, instead of split between the resin.conf and any shell scripts.
The <jvm-arg> is contained in the <server> tag because the JVM arguments apply to a single JVM, i.e. a Resin server.
A sample configuration might look like:
<resin xmlns="http://caucho.com/ns/resin"> <cluster id="app"> <server id="a" port="6800"> <http port="8080"/> <jvm-arg>-d64</jvm-arg> <jvm-arg>-Xms${HEAP}m</jvm-arg> <jvm-arg>-XX:MaxPermSize=512m</jvm-arg> <jvm-arg>-Dcom.sun.management.jmxremote.port=999</jvm-arg> </server> <host id="> ... </host> </cluster> </resin>
The ${HEAP} expression is a JSP EL expression that uses a -DHEAP=128 passed to the command-line, like
resin-3.1.x> java -DHEAP=128 -jar lib/resin.jar start
watchdog vs wrapper.pl
Resin 3.1 replaces the old wrapper.pl with a Java watchdog process. The watchdog reads the resin.conf and uses the <server> and <jvm-arg> to start the child Resin process.
To start the watchdog (and Resin), use
resin-3.1.x> java -jar lib/resin.jar start
To stop it, use
resin-3.1.x> java -jar lib/resin.jar stop