Resin 3.0.8 Release Notes
Resin 3.0

Web Applications
Servlets and Filters
Admin (JMX)
EJB 3.0

Feature Overview
Release Notes
Change Logs
Migrate from 2.1
Features FAQ

Resin 3.0.13
Resin 3.0.12
Resin 3.0.11

Resin 3.0.10
Resin 3.0.9
Resin 3.0.8
Resin 3.0.7
Resin 3.0.6
Resin 3.0.5
Resin 3.0.4
Resin 3.0.3
Resin 3.0.2
Resin 3.0.1
Resin 3.0.0
Resin 3.0.9
Resin 3.0.7

  1. Dependency Injection/Inversion of Control
  2. MBean JNDI - MBean Dependency Injection
  3. Persistent/Distributed sessions
  4. cluster client configuration
  5. http/srun timeout configuration
  6. web-app-deploy Enchancements
  7. startup-mode, redeploy-mode, and WebAppMBean.restart()
  8. log rotation and compression
  9. Ping Enchancements: Deadlock detection with JDK 1.5
  10. Cache invalidation
  11. Portlet Support
  12. Groovy Support
  13. PHP
  14. Hessian
  15. jndi-link
  16. ThrottleFilter
  17. 64-bit JNI
  18. Bugs

Dependency Injection/Inversion of Control

Resin's buzzword compliance has been enhanced in 3.0.8. Instead of the old, boring "bean-style init" phrase, parts of the documentation have been upgraded to use the snazzier "dependency injection" buzzword. Since Resin's configuration is based on setters, the proper buzzword is "setter based dependency injection."

The upgraded, buzzword-compliant documentation includes:

The main documentation on Resin's bean-style init has not yet been upgraded to the new buzzwords, but provides more information on the configuration patterns.

MBean JNDI - MBean Dependency Injection

MBeans now have a JNDI URL, "mbean:", which allows them to the used for bean-style init (Dependency Injection.)

The JNDI lookup will return the MBean's proxy interface if one is available.

If a MBean domain is included in the name, e.g. "mbean:foo:type=Bar", Resin will use the full MBean name. If only the attributes are used, e.g. "mbean:type=Bar", Resin will add the local JMX context name. In other words, Resin will add the web-app's properties. This allows the configuration to be independent of the web-app or host configuration block.

So "mbean:type=Bar", might be converted to the full MBean name ",WebApp=/dir,type=Bar".

Since jndi:lookup can be used for dependency injection (bean-style init), you can use it to configure mbeans.

<web-app xmlns="">
  <resource mbean-name="type=Test" type="qa.Test"/>

  <resource jndi-name="t1" type="qa.T1">

In the preceeding example, T1 has a setTest(TestMBean) method.

Persistent/Distributed sessions

The persistent/distributed sessions have been changed because the old configuration had caused much confusion. (The old configuration still works for backward compatibility.)

<persistent-store> configures the persistent/distributed store in the <server> level for all persistent store types: jdbc, cluster (tcp), and file. The <server> level is required because the persistent-store needs to communicate with other servers in the cluster to notify about updates.

Each <web-app> needs to enable persistent store for its session-config individually. The use-persistent-store attribute of the <session-config> enables the persistent-store.

As usual, you can use <web-app-default> to enable configuration for all web-apps.

<resin xmlns="">

    <srun server-id="a" port="6810" index="1"/>
    <srun server-id="b" port="6811" index="2"/>

  <persistent-store type="jdbc">
    <init data-source="jdbc/session"/>

    <session-config use-persistent-store="true"/>

  <host id=''>
    <web-app id='/'/>

cluster client configuration

The client configuration for the cluster is now configurable (e.g. for load balancing and distributed sessions).

<resin xmlns="">

     <srun .../>


http/srun timeout configuration

Added read-timeout and write-timeout for http and srun .

<http host="localhost" port="8080">

web-app-deploy Enchancements

web-apps configured with web-app-deploy can now be custom configured in the resin-conf using <web-app> inside the web-app-deploy. In particular, the <web-app> can define a <context-path> different from the default value given by the .war name.

The web-apps are matched using the <document-directory> as a unique identifier.

<web-app-deploy path="webapps">
  <web-app context-path="/foo" document-directory="bar"/>

startup-mode, redeploy-mode, and WebAppMBean.restart()

Application redeployment is now controllable through the web-app web.xml and through JMX.

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

  • automatic - starts the web-app on server start (default)
  • lazy - starts the web-app on the first request
  • manual - waits for JMX to start the web-app.

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

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

The WebAppMBean has three new methods:

  • start() - starts the application
  • stop() - stops the application
  • restart() - restarts the application

log rotation and compression

If the archive-name for log rotation ends in ".gz", then Resin will use GZip to compress the log when it's rotated. See the log configuration .

  <log name="" level="warning" path='log/error.log'

  <access-log path="log/access.log"

Ping Enchancements: Deadlock detection with JDK 1.5

With JDK 1.5, the <ping> resource will check the JDK to detect deadlocks and will automatically log the deadlocked threads and restart the JDK when deadlocks are detected.

Cache invalidation

The ServletServerMBean adds clearCache() and clearCacheByPattern().

Portlet Support

Resin's Portlet support provides a generic library package for application to use the portal/portlet design pattern.

The portlet support is currently in Beta.

Groovy Support

Resin can use Groovy scripts as Java classes or even as servlets


Full Groovy support is waiting for an important bug fixes from Groovy. See the Groovy Bug Report 375 and vote on it.

To enable Groovy support, put the groovy*.jar and the asm-*.jar in resin/lib. Then add a <compiling-loader> entry to the <class-loader> configuration.

WEB-INF/web.xml configuration for groovy
<web-app xmlns="">
    <compiling-loader path="WEB-INF/groovy"

Once you've done that, you can drop in groovy source files in WEB-INF/groovy and use them like Java beans from your Java classes.

package test;

public class MyBean {
  public String toString() return { "groovy[]"; }


PHP support has been fixed in 3.0.8. The full configuration doc is in thirdparty/php.

  <servlet servlet-name="php"

  <servlet-mapping url-pattern="*.php" servlet-name="php"/>


Hessian 1.0.1 has been released. Hessian 1.0.1 clarifies the non-normative naming conventions for the meta-info protocol and the object names.

The new object name uses query string of "?id=XXX" to avoid dependency on EJB.

The new meta-info attributes for _hessian_getAttribute(attrName) are:

java.api.classReturns the java API interface for this URL.
java.home.classReturns the java API interface for the factory/home URL, i.e. stripped of the "?id=XXX".
java.object.classReturns the java API interface for the object instances URL, i.e. those which have query string "?id=XXX".

Hessian now supports a JNDI "hessian:" URL.

Context ic = new InitialContext();
Bean bean = (Bean) ic.lookup("hessian://localhost:8080/hessian/bean");


jndi-link no longer requires the <factory>. Now it can be used as a symbolic link to another JNDI name.

<web-app xmlns="">
  <jndi-link jndi-name="java:comp/env/stock-service"


A new standard ThrottleFilter has been added. The filter restricts the number of requests from the same IP, defaulting to 2 (the HTTP spec limit.) The ThrottleFilter is useful to limit some parallel download programs that can use more threads than they should.

<filter filter-name="throttle"

<filter-mapping url-pattern="/*" filter-name="throttle"/>

64-bit JNI

The JNI has been updated to support 64-bit compilation on Solaris. The configuration looks like:

unix> ./configure --enable-64bit
unix> make
unix> make install
unix> bin/ -J-d64


  • See the changelog for more details.
  • Important bug fix for JNI keepalives on Win32.
  • Important misc memory and reload fixes

Resin 3.0.9
Resin 3.0.7
Copyright © 1998-2005 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark, and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.