|
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.
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="http://caucho.com/ns/resin">
<thread-pool>
<!-- Maximum number of threads. -->
<thread-max>200</thread-max>
<!-- Minimum number of spare threads. -->
<spare-thread-min>25</spare-thread-min>
</thread-pool>
<server>
...
</server>
</resin>
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 (rs.next()) {
course = (Course) rs.getObject(1);
out.println(course.getName() + " is taught by " +
course.getTeacher() + "<br>");
}
AmberConnection aConn = ...;
ResultSet rs = aConn.query("SELECT course.name, course.teacher" +
" FROM example.Course course" +
" ORDER BY course.name");
while (rs.next()) {
out.println(rs.getString(1) + " is taught by " +
rs.getString(2) + "<br>");
}
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="http://caucho.com/ns/resin">
<server>
<cluster>
<srun id="a" port='6810' index='1'/>
<srun id="b" port='6811' index='2'/>
<cluster-store type="jdbc">
<init>
<data-source>jdbc/session</data-source>
</init>
</cluster-store>
</cluster>
<web-app-default>
<session-config>
<cluster-store/>
</session-config>
</web-app-default>
...
</server>
</resin>
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/.
<server>
<host-deploy path="host-deploy">
<host-default>
<document-directory>doc</document-directory>
<web-app-deploy path="webapps"/>
</host-default>
</host-deploy>
</server>
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.
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.
java.util.logging configuration can now add custom handlers.
<log name="qa.test">
<handler resin:type="qa.MyHandler(file:/tmp/caucho/qa/t3.log)"/>
</log>
Resin now supports a custom syslog handler for Unix. Log messages
will be sent by the C syslog() call.
<log name="test.foo" level="warning">
<handler resin:type="com.caucho.log.SyslogHandler">
<facility>daemon<facility>
<severity>warning<severity>
</handler>
</log>
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 ${app.name} 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">
<web-app-default>
<config-file>WEB-INF/${app.name}.xml</config-file>
</web-app-default>
</web-app-deploy>
Resin's database pool can now support PreparedStatement
caching.
<database>
<jndi-name>test</jndi-name>
<driver type="test.jdbc.TestDriver">
<url>jdbc:test:foo</url>
</driver>
<prepared-statement-cache-size>8</prepared-statement-cache-size>
</database>
Webapps now wait for active request to complete before closing.
The time to wait is controlled by shutdown-wait-max.
<web-app-default>
<shutdown-wait-max>10s</shutdown-wait-max>
</web-app-default>
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 is now configurable with <resource>.
<resource jndi-name='mail/foo' type='javax.mail.Session'>
<init mail.host='localhost'/>
</resource>
Resin now displays the current license on startup. Customers who
have purchased license should contact sales@caucho.com for their
license files.
Copyright (c) 1998-2009 Caucho Technology, Inc. All rights reserved. caucho® ,
resin® and
quercus®
are registered trademarks of Caucho Technology, Inc.
|