Caucho maker of Resin Server | Application Server (Java EE Certified) and Web Server


 

Resin Documentation

home company blog docs 
app server 
 Resin Server | Application Server (Java EE Certified) and Web Server
 

resin 4.0.16 release notes


Summary

4.0.16 has primarily been a bug-fix release.

Web Profile TCK

  • EL - pass
  • EJB - pass
  • JDBC - pass
  • JPA - pass
  • JSF - pass
  • JSP - pass
  • JSR-299 (CDI) - pass
  • JSR-330 (javax.inject) - pass
  • JSTL - pass
  • JTA - pass
  • Servlet - pass

Health Check Updates

The health check system has been enhanced, allowing for more control of Resin restarts and logging. The configuration is still in progress, and can be seen in the conf/health.xml file.

The health configuration follows the same pattern as the rewrite rules. Each action has a set of optional predicates that tell when the action should occur.

Example: cpu-based ThreadDump in health.xml
<cluster xmlns="http://caucho.com/ns/resin"
         xmlns:health="urn:java:com.caucho.health">

  <health:CpuHealthCheck>
    <warningThreshold>95</warningThreshold>
    <criticalThreshold>99</criticalThreshold>
  </health:CpuHealthCheck>
  
  <health:DumpThreads>
    <health:IfCriticalRechecked time="2m" healthCheck="${cpuHealthCheck}"/>
  </health:DumpThreads>
</cluster>

In the example, the <health:IfCriticalRechecked> predicate is true if the CpuHealthCheck returns a critical value for 2 minutes. This will avoid log a thread dump for a temporary CPU spike.

WebSocket API

Resin 4.0.16 has implemented draft-6 of the web socket protocol. A Resin WebSocket Tutorial is available.

Resin's API is based on the stream model of the Servlet API, using OutputStream and PrintWriter to send messages and InputStream and Reader to receive messages.

WebSocketContext.java
package com.caucho.servlet;

public interface WebSocketContext
{
  public OutputStream startBinaryMessage() throws IOException;

  public PrintWriter startTextMessage() throws IOException;

  public void setTimeout(long timeout);

  public long getTimeout();

  public void close();
  
  public void disconnect();
}
WebSocketListener.java
package com.caucho.servlet;

public interface WebSocketListener
{
  public void onStart(WebSocketContext context)
    throws IOException;
  
  public void onReadBinary(WebSocketContext context, InputStream is)
    throws IOException;

  public void onReadText(WebSocketContext context, Reader is)
    throws IOException;

  public void onClose(WebSocketContext context)
    throws IOException;

  public void onDisconnect(WebSocketContext context)
    throws IOException;

  public void onTimeout(WebSocketContext context)
    throws IOException;
}

HMTP/BAM API changes

The HMTP/JMTP messaging APIs continue to change as we work on simplifying the model. Resin uses HMTP/BAM as its internal clustered messaging framework.

We now have 5 base classes:

  • MessageStream - the underlying stream for the unidirectional and request/response messages
  • Actor - the actor/service interface for an application service.
  • Mailbox - the queue receiving messages for the actor.
  • Broker - the router to dispatch messages to other actors' mailboxes.
  • BamManager - manages adding and removing actors from a broker system.

rewrite-dispatch

The rewrite-dispatch order has been normalized. This should be invisible for most users, Resin now has a better-defined order for dispatching.

All requests now go through the following order (basically a servlet filter chain order.)

rewrite-dispatch order
security (checked first)
rewrite-dispatch
filters
servlet

Since dispatch actions like <resin:LoadBalance> and <resin:HttpProxy> are rewrite-dispatch rules, this means that security will be applied, but servlet filters will not be applied.

proxy cache

The proxy cache has been refactored internally to better handle exceptions and disconnects while filling the cache. The decision to make a request a cache-fill thread now happens at the top filter call, which allows the cleanup logic to be a simple "finally" block.

{SSHA} authentication passwords

Resin's authenticators now support LDAP-style {SSHA} passwords for all the built-in authenticators, or anyone extending from AbstractAuthenticator.

Sample XmlAuthenticator with {SSHA}
<web-app xmlns="http://caucho.com/ns/resin"
         xmlns:resin="urn:java:com.caucho.resin">
  
  <resin:XmlAuthenticator>
     <user name='harry' password='{SSHA}Vug/pmSPPOTh/dCG2GpDE6BIE+1zYWx0'/>
     <user name='draco' password='{SSHA}H9STJXP1NwWBy1VIL+6cVQPEMtxzbmFrZQ=='/>
  </resin:XmlAuthenticator>

</web-app>  

load-balance/cluster pools split

The load-balance and cluster TCP socket pools are now split and using different timeouts. The cluster socket pool is used for HMTP/BAM messages for heartbeat, dist-cache, repository, etc. The load balance pool is used for <resin:LoadBalance>, <resin:HttpProxy> and <resin:FastCgiProxy.


Copyright © 1998-2015 Caucho Technology, Inc. All rights reserved. Resin ® is a registered trademark. Quercustm, and Hessiantm are trademarks of Caucho Technology.