|
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
since <resin:log> and <log> conflicted. resin:log is now deprecated.
Use persistent-store instead.
Added com.caucho.sql.UserConnection.discardConnection() to allow
termination of broken connections undetected by the ping functionality.
For debugging, when database connections aren't closed, the
allocation stack traces are now automatically saved for subsequenct
allocations.
Adds the HttpOnly
flag to all cookies generated in a web-app to avoid
cross-site scripting attacks.
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 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 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"/>
The <server> section now accepts a <server-header> to override
the Server response header.
Class reloading is now available for Resin-OS and can be used
with agentlib
Apache directive to set the cached mapping file.
<http> now has a <keepalive-max> attribute.
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)"/>
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.
package example;
import javax.ejb.TransactionAttribute;
public class MyClass {
...
@TransactionAttribute
public void myFoo()
{
...
}
}
<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.
<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("");
}
}
}
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.
Added resin-ejb-jar.xml for EJBs. Resin already parses META-INF/foo.ejb files.
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-apps (start-mode="lazy"), are now automatically undeployed
when idle-time is expired (default 2h).
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
If true, listen to the http ports after the server is done initializing.
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 is now allowed in <server> to handle <busy> pages.
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>
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>
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();
The servlet-mapping schema was incorrect for the Resin namespace.
The correct order is servet-name, url-pattern.
New <server> parameters: invocation-cache-size and invocation-cache-max-url-size (default 256)
The client-read-timeout is now available in cluster-definition.
The caching backing has changed to a more efficient backing store.
The <cache> has a new parameter: max-entry-size.
The cluster session store has changed to a more efficient backing store.
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>
package foo;
public class Password {
String _value;
public void addText(String value)
{
_value = value;
}
public Object replaceObject()
{
return decode(_value);
}
}
<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.
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();
}
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.
Copyright (c) 1998-2009 Caucho Technology, Inc. All rights reserved. caucho® ,
resin® and
quercus®
are registered trademarks of Caucho Technology, Inc.
|