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.
<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>
|
resin:set adds an EL variable to the current context.
<resin:set var="name" value="${value}"/>
|
resin:if executes part of the configuration file conditionally.
<resin:if test="">
...
<resin:if>
|
resin:choose implements an if, elsif, else.
<resin:choose>
<resin:when test="">
...
</resin:when>
<resin:when test="">
...
</resin:when>
<resin:otherwise>
</resin:otherwise>
|
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.
<web-app>
..
<resin:env>
<class-loader>
<library-loader path="/opt/customlib"/>
</class-loader>
<resource ...>
</resin:env>
...
|
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.
<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>
|
Manual configuration has been restored to mod_caucho.
The configuration looks like:
LoadModule caucho_module /usr/local/apache2/modules/mod_caucho.so
CauchoHost localhost 6802
<Location /test/*>
SetHandler caucho-request
</Location>
|
The cluster-definition and cluster-ref have now been properly added.
backend.conf
<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=""/>
<web-app id="/"/>
</host-default>
<host id="foo.com" root-directory="foo"/>
<host id="bar.com" root-directory="bar"/>
</server>
</resin>
|
frontend.conf
<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=""/>
</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.
<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.conf
<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.
Copyright © 1998-2005 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark,
and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc. | |
|