<document>

Resin 3.0.7 includes a number of configuration changes for the more advanced user. It also includes a large number of bug fixes and some performance enhancements.

The resin.conf and web.xml configuration files can now use resin:if and resin:choose control. These can be useful to create a resin.conf which works for both testing and deployment, depending on an environment parameter.

When possible, users should avoid using the control tags when possible to keep their configuration files as simple as possible.

<example> <web-app xmlns="http://caucho.com/ns/resin" xmlns:resin="http://caucho.com/ns/resin/core"> <resin:choose> <resin:when test="\${mode='development'}"> <resin:log>Development Mode</resin:log> </resin:when> <resin:when test="\${mode='deploy'}"> <resin:log>Deployment Mode</resin:log> </resin:when> <resin:otherwise> <resin:log>Unknown Mode \${mode}</resin:log> </resin:otherwise> </web-app> </example>

resin:set adds an EL variable to the current context.

<def> <resin:set var="name" value="\${value}"/> </def>

resin:if executes part of the configuration file conditionally.

<def> <resin:if test="${expr}"> ... <resin:if> </def>

resin:choose implements an if, elsif, else.

<def> <resin:choose> <resin:when test="${expr1}"> ... </resin:when> <resin:when test="${expr2}"> ... </resin:when> <resin:otherwise> </resin:otherwise> </def>

resin:env creates a new environment for a section of the configuration file. Some users may want to use this to create resources or databases with custom <class-loader> tags.

<example> <web-app> .. <resin:env> <class-loader> <library-loader path="/opt/customlib"/> </class-loader> <resource ...> </resin:env> ... </example>

Logs a message to the given log file.

resin:import now replaces resin:include. The behavior is a bit different. The target file now is validated by schema where the schema depends on the location of the resin:import. So a resin:import in <server> will have a target with a top-level now of <server>.

resin:import also allows a <fileset> attribute.

The compiling-loader will now batch as many changed *.java files as it finds and will submit all at once for compilation.

The "batch" attribute of compiling-loader controls this behavior.

The <log> tag now supports multiple <logger> children.

<example> <log path='log/connections.log' timestamp='[%H:%M:%S.%s] '/> <logger name='com.caucho.server.port.TcpConnection' level='all'/> <logger name='com.caucho.server.http.HttpRequest' level='all'/> </log> </example>

Manual configuration has been restored to mod_caucho.

The configuration looks like:

<example> LoadModule caucho_module /usr/local/apache2/modules/mod_caucho.so CauchoHost localhost 6802 <Location /test/*> SetHandler caucho-request </Location> </example>

The cluster-definition and cluster-ref have now been properly added.

<resin xmlns="http://caucho.com/ns/resin"> <server> <cluster-definition id='foo.com'> <srun id="foo" index='1' host='localhost' port='6810'/> </cluster-definition> <cluster-definition id='bar.com'> <srun id="bar" index='2' host='localhost' port='6811'/> </cluster-definition> <host-default> <cluster cluster-ref="${host.name}"/> <web-app id="/"/> </host-default> <host id="foo.com" root-directory="foo"/> <host id="bar.com" root-directory="bar"/> </server> </resin> <resin xmlns="http://caucho.com/ns/resin"> <server> <cluster-definition id='foo.com'> <srun id="a" index='1' host='localhost' port='6810'/> </cluster-definition> <cluster-definition id='bar.com'> <srun id="b" index='2' host='localhost' port='6811'/> </cluster-definition> <host-default> <web-app id='/'> <servlet servlet-name='remote' servlet-class='com.caucho.servlets.HmuxLoadBalanceServlet'> <init-param cluster="${host.name}"/> </servlet> <servlet-mapping url-pattern='/*' servlet-name='remote'/> </web-app> </host-default> <host id='foo.com'/> <host id='bar.com'/> </server> </resin>

The database configuration now allows for a backup driver. Multiple <driver> blocks round-robin the load.

<example> <database> <jndi-name>jdbc/mysql</jndi-name> <driver type="org.gjt.mm.mysql.Driver"> <url>jdbc:mysql://gryffindor:3306/test</url> </driver> <driver type="org.gjt.mm.mysql.Driver"> <url>jdbc:mysql://hufflepuff:3306/test</url> </driver> <backup-driver type="org.gjt.mm.mysql.Driver"> <url>jdbc:mysql://slytherin:3306/test</url> </backup-driver> </database>

Resin's JMX has been upgraded to support JDK 1.5. The MBeanServer at java:comp/jmx/MBeanServer makes the JDK java.lang.monitoring available.

mod_caucho can now have individually configured ResinConfigServer in separate <Location> blocks.

Added com.caucho.hessian.io.BeanSerializerFactory to allow bean-style serialization instead of requiring field serialization.

library-loader now accepts fileset.

The transaction manager can now be configured for distributed XA logging and recovery. The log does not affect single-resource transactions.

<resin xmlns="http://caucho.com/ns/resin"> <transaction-manager> <transaction-log> <path>file:/var/xalog/log1</path> </transaction-log> </transaction-manager> ... </resin>

A new resource, com.caucho.jsp.JspPrecompileResource, will precompile JSP files on web-app startup. This compilation is batched to a single javac invocation, which generally improves JSP compilation and startup performance.

</document>