| ||||||||||
Resin 3.1 Documentation Examples Changes Release Notes Change Logs Resin 3.1.2 Resin 3.1.1 Resin 3.1.0 Archive Resin 3.0.20 Resin 3.0.19 Resin 3.0.18 Resin 3.0.17 Resin 3.0.16 Resin 3.0.15 Resin 3.0.14 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:type requires namespaceThe 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:logresin:message replaces resin:log since <resin:log> and <log> conflicted. resin:log is now deprecated. cluster-store has been removedUse 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 tracesFor debugging, when database connections aren't closed, the allocation stack traces are now automatically saved for subsequenct allocations. cookie-http-onlyAdds the HttpOnly flag to all cookies generated in a web-app to avoid cross-site scripting attacks. lazy-servlet-validateIf 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-cookiessl-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-deployear-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-headerThe <server> section now accepts a <server-header> to override the Server response header. Class reloadingClass reloading is now available for Resin-OS and can be used with agentlib CauchoConfigCacheDirectoryApache directive to set the cached mapping file. keepalive-max<http> now has a <keepalive-max> attribute. merge: VFS schemaPath 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 MethodInterceptorThe 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("<method>"); try { return inv.proceed(); } finally { System.out.println("</method>"); } } } log mbean-nameLogs 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.xmlAdded resin-ejb-jar.xml for EJBs. Resin already parses META-INF/foo.ejb files. shutdown-wait-maxshutdown-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-timeLazy web-apps (start-mode="lazy"), are now automatically undeployed when idle-time is expired (default 2h). resin.jar startupTo 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-startIf true, listen to the http ports after the server is done initializing. multipart formThe 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 servererror-page is now allowed in <server> to handle <busy> pages. rewrite-dispatchThe 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-pathThe 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 DBPoolThe 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 schemaThe servlet-mapping schema was incorrect for the Resin namespace. The correct order is servet-name, url-pattern. invocation-cache-sizeNew <server> parameters: invocation-cache-size and invocation-cache-max-url-size (default 256) client-read-timeoutThe client-read-timeout is now available in cluster-definition. cachingThe caching backing has changed to a more efficient backing store. cache/max-entry-sizeThe <cache> has a new parameter: max-entry-size. cluster sessionThe cluster session store has changed to a more efficient backing store. Configurationresin:typeresin: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<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 <my-bean xmlns:resin="http://caucho.com/ns/resin/core"> <resin:resource var="foo" type="qa.MyResource"/> <data>${foo}</data> </my-bean> resin:resource is now allowed anywhere, including in a custom bean. com.caucho.config.ConfigThe com.caucho.config.Config facade now makes it easy to use
Resin's dependency-injection configuration machinery for custom classes.
The InputStream is = new FileInputStream("conf.xml"); try { Config.configure(myObject, is); } finally { is.close(); } AcknowledgementsThanks 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.
|