| |||||||||||||||||||||||||||||||||
Migration from Resin 2.1.x will require some changes, mostly to your configuration files. Resin 3 is a significant internal redesign of Resin. As features have accumulated and Java and XML design have progressed, the old code needed a severe cleaning. The Release Notes up until version 3.0.3 contain valuable information for migrating from 2.1. Additional notes are included below.
The release notes for 3.0.0, 3.0.1, 3.0.2, 3.0.3, and 3.0.4 contain in-depth explanations of many the changes that occured for Resin 3.
Resin 3.0 now validates configuration files. In particular, attributes like <foo a="bar"> need the quotes. Resin 2.1 allowed illegal XML attributes, Resin 3.0 is more strict. The Resin configuration files now have their own namespace, which is necessary for the validation. The resin.conf looks like:
The web.xml or resin-web.xml looks like:
Using the Resin namespace lets you use Resin extensions like <database> configuration. If you want to use a strict Servlet web.xml, use the J2EE namespace:
The top-level configuration has changed to <resin> and <server>. These changes more closely conform to typical XML usage.
srun and clusterThe <srun> configuration now belongs inside a <cluster> declaration to more clearly convey how the cluster is organized. <http> is unchanged.
Resin 3.0 makes as much configuration explicit as possible, including web-app defaults. web-apps and hosts must be explicitly configured in the resin.conf, either with <web-app> or <web-app-deploy> elements. This differs from Resin 2.1, which always included a "default" web-app and host even when not configured. The following configuration will return a 404 message for /test.jsp because it does not have a defined root web-app. Because there's a "foo" web-app, /foo/test.jsp would work.
web-app-default and host-defaultAs part of Resin 3.0's requirement of explicit defaults, the defaults for web-apps and hosts belong in <web-app-default> and <host-default> elements. (Resin 2.1 had a confusing mechanism where configuration outside the <web-app> was a default for inside the <web-app>.) The following configures a default <context-param> for all web-apps in the host.
All of Resin's defaults, like the JSP servlet the the default <mime-mapping> configuration are in a <web-app-default> that is included explicitly from the resin.conf.
loggingResin now uses the JDK 1.4 logging facility .The wrapper now redirects output from the java process to log/jvm.log. There were all kinds of problems trying to use the same output file from the wrapper (which catches the stdout and stderr from the java process) and in the resin.conf (which catches the use of System.out and System.err). thread dumpsThread dumps from a Resin process that does not output to a terminal will appear in log/jvm.log. jars no longer includedThe jar files jaxp, dom, sax.jar, jndi.jar, and jdbc2_0-stdext.jar are already included in JDK 1.4, so Resin no longer needs to include them. resin:include-directory
resourceCustom resource configuration now uses the <resource> tag. The old <resource-ref> was an inaccurate extension of the Servlet spec's <resource-ref>. The change should avoid confusion. <resource> configuration has the following components:
Databases
authenticator and custom authentiatorAuthenticators, including custom authenticators are now resources. They belong outside the <login-config> element.
XSL/XTP search path for .xsl filesIn Resin 3.0.x, much more of the configuration is explicit. Resin 2.x had a bunch of built-in defaults. One of the defaults in Resin 2.x was to search for .xsl files in WEB-INF/xsl. In Resin 3.0.x, the XTP stylesheets are looked up in the classpath. So, to have XTP look in WEB-INF/xsl, you need to add it to the classpath. The following will do the trick:
You can either put that directly in the <web-app> or use a <web-app-default> to add WEB-INF/xsl for all your webapps.
|