Resin 3.0.10 Release Notes
Resin 3.0

Features
Installation
Configuration
Web Applications
IOC/AOP
Resources
JSP
Servlets and Filters
Portlets
Databases
Admin (JMX)
CMP
EJB
Amber
EJB 3.0
Security
XML and XSLT
XTP
JMS
Performance
Protocols
Third-party
Troubleshooting/FAQ

Feature Overview
Release Notes
Change Logs
Migrate from 2.1
Benchmarks
Features FAQ

Resin 3.0.13
Resin 3.0.12
Resin 3.0.11
Archive

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
Archive
Archive
Resin 3.0.9

  1. resin:type requires namespace
  2. resin:message replaces resin:log
  3. cluster-store has been removed
  4. UserConnection.discardConnection()
  5. saving connection stack traces
  6. cookie-http-only
  7. lazy-servlet-validate
  8. ssl-session-cookie
  9. ear-deploy, war-deploy
  10. server-header
  11. Class reloading
  12. CauchoConfigCacheDirectory
  13. keepalive-max
  14. merge: VFS schema
  15. @TransactionAttribute and AOP MethodInterceptor
  16. log mbean-name
  17. META-INF/resin-ejb-jar.xml
  18. shutdown-wait-max
  19. lazy web-app and idle-time
  20. resin.jar startup
  21. bind-ports-after-start
  22. multipart form
  23. error-page in server
  24. rewrite-dispatch
  25. rewrite-real-path
  26. programmatic DBPool
  27. servlet-mapping schema
  28. invocation-cache-size
  29. client-read-timeout
  30. caching
  31. cache/max-entry-size
  32. cluster session
  33. Configuration
    1. resin:type
    2. resin:resource
    3. com.caucho.config.Config
  34. Acknowledgements

resin:type requires namespace

The configuration file validator is now more strict about the namespace of resin:type. The resin prefix must be defined as:

<resin xmlns="http://caucho.com/ns/resin"
       xmlns:resin="http://caucho.com/ns/resin/core">
  ...

resin:message replaces resin:log

resin:message replaces resin:log since <resin:log> and <log> conflicted. resin:log is now deprecated.

cluster-store has been removed

Use persistent-store instead.

UserConnection.discardConnection()

Added com.caucho.sql.UserConnection.discardConnection() to allow termination of broken connections undetected by the ping functionality.

saving connection stack traces

For debugging, when database connections aren't closed, the allocation stack traces are now automatically saved for subsequenct allocations.

cookie-http-only

Adds the HttpOnly flag to all cookies generated in a web-app to avoid cross-site scripting attacks.

lazy-servlet-validate

If true, Resin will only check that the servlet-class exists when it's actually used. Normally, Resin will validate the servlet-class immediately.

ssl-session-cookie

ssl-session-cookie specifies an alternate session cookie for use in secure connections. This prevents the possibiliy of snooping the non-SSL connection and then replaying the session cookie.

ear-deploy, war-deploy

ear-deploy and war-deploy now have an expand-prefix to select the expansion prefix, e.g. _ear_.

Also added require-file.

<ear-deploy path="deploy"
            expand-prefix=""
            require-file="META-INF/application.xml"/>

<war-deploy path="deploy"
            expand-prefix=""
            require-file="WEB-INF/web.xml"/>

server-header

The <server> section now accepts a <server-header> to override the Server response header.

Class reloading

Class reloading is now available for Resin-OS and can be used with agentlib

CauchoConfigCacheDirectory

Apache directive to set the cached mapping file.

keepalive-max

<http> now has a <keepalive-max> attribute.

merge: VFS schema

Path values now support a merge schema. The merge path is a collection of paths, like a classpath. The syntax is: "merge:(foo/bar;baz)", i.e. it uses ';' as a path separator.

The most important use of the merge schema is for a web-app document-directory, allowing for development or customization enhancements without affecting the raw web-app.

<web-app id="foo" document-directory="merge:(../custom-foo;foo)"/>

@TransactionAttribute and AOP MethodInterceptor

The EJB 3.0 @TransactionAttribute capability is now available for any Java class. It is no longer restricted to SessionBeans.

The @TransactionAttribute support can now be applied to any bean without any Resin-specific annotations. In addition, the attribute class is configurable.

example/MyClass.java
package example;

import javax.ejb.TransactionAttribute;

public class MyClass {
  ...
  @TransactionAttribute
  public void myFoo()
  {
    ...
  }
}

resin-web.xml
<web-xml xmlns="http://caucho.com/ns/resin">
  <classloader>
    <enhancer>
      <method annotation="javax.ejb.TransactionAttribute"
               type="com.caucho.transaction.enhancer.TransactionEnhancer"/>
    </enhancer>
  </classloader>

  ...
</web-xml>

The enhancer also supports AOP Alliance MethodInterceptors, allowing for custom annotations.

resin-web.xml
<web-xml xmlns="http://caucho.com/ns/resin">
  <classloader>
    <enhancer>
      <method annotation="example.MyAnnotation"
               type="example.MyMethodInterceptor"/>
    </enhancer>
  </classloader>

  ...
</web-xml>
package example; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; public class MyMethodInterceptor implements MethodInterceptor { public Object invoke(MethodInvocation inv) throws Throwable { System.out.println(""); try { return inv.proceed(); } finally { System.out.println(""); } } }

log mbean-name

Logs can now have an mbean-name.

<log name="qa.Test" mbean-name="type=Log,name=qa.Test"
        path="log/test.log" level="fine"/>

The MBean interface is com.caucho.log.mbean.LogMBean.

META-INF/resin-ejb-jar.xml

Added resin-ejb-jar.xml for EJBs. Resin already parses META-INF/foo.ejb files.

shutdown-wait-max

shutdown-wait-max is now also a configurable item in the <resin> block. It's necessary to set the <resin> value as well as the <web-app> value.

lazy web-app and idle-time

Lazy web-apps (start-mode="lazy"), are now automatically undeployed when idle-time is expired (default 2h).

resin.jar startup

To allow for resin.conf to configure the JVM parameters, resin.jar for Resin-Professional now can start a Resin daemon.

unix> java -jar lib/resin.jar start
...
unix> java -jar lib/resin.jar stop

bind-ports-after-start

If true, listen to the http ports after the server is done initializing.

multipart form

The multipart form processing can now accept a "caucho.multipart.form.upload-max" request attribute to set the size on a per-request basis.

The multipart form error now returns a "caucho.multipart.form.error.size".

error-page in server

error-page is now allowed in <server> to handle <busy> pages.

rewrite-dispatch

The dispatch functionality of mod_rewrite has been added. Currently, it only supports redirect.

<rewrite-dispatch>
  <redirect regexp='^/foo' target='http://www.foo.com'/>
</rewrite-dispatch>

rewrite-real-path

The real-path functionality of mod_rewrite has been added. It applies to the getRealPath mapping.

<rewrite-real-path>
  <rewrite regexp='/(foo)' replacement='/-$1-$0'/>
</rewrite-real-path>

programmatic DBPool

The DBPool can now be used to create Pools programmatically. It's still strongly recommended to use the configuration file instead.

TestDriver driver = new TestDriver();

DBPool pool = new com.caucho.sql.DBPool();
pool.setJndiName("test");
pool.setJDBCDriver(driver);
pool.setURL("jdbc:test:foo");
pool.init();

servlet-mapping schema

The servlet-mapping schema was incorrect for the Resin namespace. The correct order is servet-name, url-pattern.

invocation-cache-size

New <server> parameters: invocation-cache-size and invocation-cache-max-url-size (default 256)

client-read-timeout

The client-read-timeout is now available in cluster-definition.

caching

The caching backing has changed to a more efficient backing store.

cache/max-entry-size

The <cache> has a new parameter: max-entry-size.

cluster session

The cluster session store has changed to a more efficient backing store.

Configuration

resin:type

resin:type can now be used in more places, for example in string values, allowing custom classes to computer values.

<driver type="com.foo.DataSource">
  <url>jdbc:foo://localhost</url>
  <password resin:type="foo.Password">Xm91/zI==</password>
</driver>

foo/Password.java
package foo;

public class Password {
  String _value;

  public void addText(String value)
  {
    _value = value;
  }

  public Object replaceObject()
  {
    return decode(_value);
  }
}

resin:resource

<resin:resource> (and <resource>) now allow a var="foo" attribute, which sets configuration variables. This lets configuration files set temporary resources without using jndi.

In the following example, the MyBean object has a setData method. The resin:resource creates a temporary variable.

<my-bean xmlns:resin="http://caucho.com/ns/resin/core">
  <resin:resource var="foo" type="qa.MyResource"/>

  <data></data>
</my-bean>

resin:resource is now allowed anywhere, including in a custom bean.

com.caucho.config.Config

The com.caucho.config.Config facade now makes it easy to use Resin's dependency-injection configuration machinery for custom classes. The configure method takes a Java object and an InputStream to the configuration file and configures the object.

InputStream is = new FileInputStream("conf.xml");
try {
  Config.configure(myObject, is);
} finally {
  is.close();
}

Acknowledgements

Thanks to Dave Brosius for locating bugs in XML parsing, EJB-QL, and Amber query caching.

Thanks to Bin for adding the batch compilation capability to JspCompiler.


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