Resin 3.0.4 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.5
Resin 3.0.3

  1. Overview
  2. Thread Pooling
  3. Amber
  4. Persistent Sessions
  5. Virtual Host deployment
  6. Servlet 2.4 and JSP 2.0
  7. Smaller Changes
    1. Internationalized Domain Names
    2. log handlers
    3. syslog handler
    4. web-app-deploy contains web-app-default
    5. PreparedStatement caching
    6. web-app shutdown changes
    7. JNI enhancements
    8. JavaMail configuration
    9. Licensing


Any bug you find in 3.0.4 should be reported in the bugtrack.

Because of the large number of changes from Resin 2.1 to Resin 3.0, developers should stress test their application with Resin 3.0.4 thoroughly before deploying it.

Thread Pooling

The thread pooling and connection management has changed dramatically for Resin 3.0.4. With the exception of the new <thread-pool> configuration, this should be invisible for most users except as a gain in scalability.

Performance for static files is now essentially the same as Apache 2.

The new thread model now better supports large number of simultaneous connections, e.g. 300 and 500 simultaneous open sockets.

The single thread pool is shared across all of Resin, so the configuration is in <resin> and outside of <server>.

<resin xmlns="">
    <!-- Maximum number of threads. -->

    <!-- Minimum number of spare threads. -->


The old <connection-pool> has been deprecated and will be removed in Resin 3.0.5.


Amber is Resin's new persistence manager, currently in development. We have added some sample tutorials as a preview. Since the tutorials are direct translations of the old CMP tutorials, you can compare the two persistence methods directly.

We are very excited about the Amber direction and believe it will avoid the complexity of J2EE/EJB for 80% of projects, reducing development time and engineering cost.

Amber will likely eventually provide facades for Hibernate and JDO 2.0 when that is available. During development, we'll only be supporting Amber's native API.

Amber currently uses Hibernate's configuration files and its API model resembles Hibernate, but uses JDBC more directly. Amber's lifecycle is patterned after JDO, using bytecode enhancement to make the JDO state changes possible.

Amber's JDBC use appears in its queries. Here's an example:

AmberConnection aConn = ...;

ResultSet rs = aConn.query("SELECT course FROM example.Course course");

while ( {
  course = (Course) rs.getObject(1);

  out.println(course.getName() + " is taught by " +
              course.getTeacher() + "<br>");

directly using query results
AmberConnection aConn = ...;

ResultSet rs = aConn.query("SELECT, course.teacher" +
                           " FROM example.Course course" +
                           " ORDER BY");

while ( {
  out.println(rs.getString(1) + " is taught by " +
              rs.getString(2) + "<br>");

Persistent Sessions

Persistent session support for JDBC has been enhanced to take advantage of clustering and sticky sessions. Each session now has a preferred owning server which reduces the overhead of the session persistence, and removes the need for always-load-session.

Because of these enhancements, we now recomment jdbc-store over tcp-store for most configurations.

The changes affect the configuration files. Because the jdbc store is now cluster-aware, it needs to be configured in the <cluster> and merely enabled in the <session-config>. A typical configuration will look like the following:

<resin xmlns="">
      <srun id="a" port='6810' index='1'/>
      <srun id="b" port='6811' index='2'/>

      <cluster-store type="jdbc">



Virtual Host deployment

Virtual hosts can now be deployed like .war files. Virtual hosts do need to a .jar extension. The <host-deploy> configures the virtual host deployment.

Because there is no standard for virtual host deployment, Resin allows the flexibility to configure the layout as the site needs. We recommend using a pattern following Resin's virtual hosts, the host root-directory contains doc/, webapps/ and log/.

  <host-deploy path="host-deploy">


      <web-app-deploy path="webapps"/>


Servlet 2.4 and JSP 2.0

Because both Servlet 2.4 and JSP 2.0 are still in draft stage, Resin's support is considered beta. However, we don't expect the specs are likely to change much from the current draft to the final draft.

Smaller Changes

Internationalized Domain Names

Resin now supports RFC3490 for internationalized domain names, the standard for encoding of virtual hosts in non-ascii character sets. The support should be transparent to users.

log handlers

java.util.logging configuration can now add custom handlers.

<log name="qa.test">
   <handler resin:type="qa.MyHandler(file:/tmp/caucho/qa/t3.log)"/>

syslog handler

Resin now supports a custom syslog handler for Unix. Log messages will be sent by the C syslog() call.

<log name="" level="warning">
  <handler resin:type="com.caucho.log.SyslogHandler">

web-app-deploy contains web-app-default

The <web-app-deploy> configuration can now include a <web-app-default> that is only applied to the expanded .war files. Applications can use the <web-app-default> and the ${} to add new configuration files.

The following allows a WEB-INF/foo.xml configuration file to configure a foo.war.

<web-app-deploy path="webapps">

PreparedStatement caching

Resin's database pool can now support PreparedStatement caching.

  <driver type="test.jdbc.TestDriver">


web-app shutdown changes

Webapps now wait for active request to complete before closing. The time to wait is controlled by shutdown-wait-max.




JNI enhancements

Resin has increased its use of JNI for performance. These changes will be invisible for most users, but if there are bugs, they may produce some surprising effects when using getResource() and getResourceAsStream().

JavaMail configuration

JavaMail is now configurable with <resource>.

<resource jndi-name='mail/foo' type='javax.mail.Session'>


Resin now displays the current license on startup. Customers who have purchased license should contact for their license files.

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