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


 

Resin Documentation

home company blog wiki docs 
app server web server 
health cloud java ee pro 
 Resin Server | Application Server (Java EE Certified) and Web Server
 

resin 4.0.24 release notes


Summary

4.0.24 introduces the resin.properties and configuration simplification to make cloud deployments simpler. It also includes new memcache support.

Thanks to everyone who reported bugs in 4.0.23. We encourage people to report 4.0.24 bugs at http://bugs.caucho.com.

RPM

RPMs are now available for Resin-Pro

installing RPM
unix> sudo rpm --import http://caucho.com/download/rpm/RPM-GPG-KEY-caucho
unix> sudo yum install http://caucho.com/download/rpm/4.0.24/x86_64/resin-pro-4.0.24-1.x86_64.rpm

resin.properties

The configuration for common deployments has been simplified, moving the most often changed values into a separate resin.properties file. While Resin's resin.xml is still the basis for the configuration, it now includes the resin.properties with a <resin:properties> tag.

Example: sample /etc/resin/resin.properties
log_level     : info
dev_mode      : true
resin_doc     : true

app_tier      : 192.168.1.10 192.168.1.11
web_tier      : 192.168.1.20

http          : 8080
app-0.http    : 8081

setuid_user   : resin
setuid_group  : resin

jvm_args      : -Xmx2048m

system_key    : changeme
admin_enable  : true
admin_user    : admin
admin_password: {SSHA}xxxxxxx

The variables are all defined and controlled by the /etc/resin/resin.xml file. If you are already modifying the resin.xml, you can use this technique for your own properties.

resin:properties

Resin has a new <resin:properties> tag that works similarly to the <resin:import>, but populates the EL configuration variables. You can use this to implement /etc/resin/resin.properties and you can use it in systems like Amazon EC2 where per-instance user-data is available via an http URL.

Example: local.d/amazon.xml EC2 properties import
<resin xmlns="http://caucho.com/ns/resin"
      xmlns:resin="urn:java:com.caucho.resin">

  <resin:properties path="http://169.254.169.254/latest/user-data"
                    optional="true">

</resin>

rvar(): EL config function for properties

The new "rvar()" function in the resin.xml is used with resin.properties to allow server-specific configuration to override general configuration. For example, "http : 8080" defines the default HTTP port as port 8080, and "app-0.http : 8081" sets the HTTP port to 8081 when the server is named "app-0".

resin.xml Local Config files: /etc/resin/local.d/*.xml

Resin's default /etc/resin/resin.xml now imports files from /etc/resin/local.d/*.xml as local additions to the resin configuration. It uses an existing capability of the <resin:import> to include a fileset of paths.

The standard health.xml configuration has been moved to local.d.

The local.d can be used for simple configuration extensions, like adding a cluster-wide mysql configuration, or importing EC2/cloud properties file as in the above example. The top-level tag for the *.xml will be <resin> because the <resin:import> occurs at the <resin> level.

The resin.xml to implement the local.d looks as follows:

Example: resin.xml configuration for local.d
<resin xmlns="http://caucho.com/ns/resin">

  ...
  <resin:import fileset="${__DIR__}/local.d/*.xml"/>

  ...
</resin>

resin.properties openssl configuration

The standard resin.xml now includes openssl configuration. To enable openssl, upload the certificate files and update the resin.properties.

Example: resin.properties with openssl
openssl_file : keys/gryffindor.crt
openssl_key : keys/gryffindor.key
openssl_password : changeme

server-multi: allowing cluster definition in resin.properties

The new <server-multi> tag is designed to work with the resin.properties file to allow multiple servers to be defined with a single property. The address-list attribute allows a space delimited list of addresses. The server-multi will expand into multiple <server> tags, one for each address.

For example, you can use this system to configure the triad in the resin.properties without needing to modify the resin.xml file.

The following example defines three servers named "app-0", "app-1", and "app-2" which are configured for internal IP addresses 192.168.1.10, 192.168.1.11, and 192.168.1.12. The ":6801" overrides the default server port.

Example: app_tier configuration in resin.properties
app_tier : 192.168.1.10 192.168.1.11:6801 192.168.1.12:6802
http     : 8080

The configuration for the app_tier is in the default resin.xml

Example: app_tier configuration in resin.xml
<resin xmlns="http://caucho.com/ns/resin">
 ...
 <cluster id="app-tier">

   <server-multi id-prefix="app-" address_list="${app_tier}" port="6800">
   </server-multi>
   ...
 </cluster>
</resin>

join-cluster: allowing dynamic servers resin.properties

The <join-cluster> tag in the resin.xml informs the watchdog which cluster the server instance should join. It is equivalent to the -join-cluster command line argument. The join-cluster tag allows dynamic servers to work with the same /etc/resin.d/resin, and allows EC2-cloud servers to be configured with just the cloud /user-data configuration.

resinctl and bin/resin.sh

A new command-line script "resinctl" has been added as an alternative to bin/resin.sh. "resinctl" differs from bin/resin.sh by including the OS paths in the script itself. In other words, on a linux system, resinctl knows that the default resin.xml is in /etc/resin and the default root-directory is /var/www.

With the .rpm and .deb, resinctl is now installed in /usr/bin/resinctl, which makes it easily available from the command-line.

CLI: license-add

resinctl now has a "license-add" command which copies a license to the license directory, as a convenience.

Example: uploading a license
unix> resinctl license-add 1013009.license

CLI: start-all

The resinctl start-all command starts all servers on the local host by looking at the IP interfaces and matching them with the <server> and <server-multi> definitions. The start-all lets the /etc/init.d/resin start all servers without needing to be modified.

Unix startup: /etc/init.d/resin

The /etc/init.d/resin script has been changed so fewer sites will need to modify it. Since it also uses "start-all" to start all <server> configurations on the current machine, it no longer needs a -server configuration. The script now calls /usr/bin/resinctl to start and stop Resin.

memcache client/server

Resin's cache now supports a memcache interface for both the client and the server. When Resin is used as both the client and the server, adding and removing cache servers are automatically rescaled and updated in the client.

The client API for Resin's memcache is jcache (javax.cache). The configured cache can be injected like any CDI object.

Example: resin-web.xml memcache client config
<web-app xmlns="http://caucho.com/ns/resin"
  xmlns:memcache="urn:java:com.caucho.memcache">

  <memcache:MemcacheClient cluster="cache-tier" port="11212"/>

</web-app>
Example: CDI memcache injection
package example;

import javax.inject.*;
import javax.cache.*;

public class MyBean {
  @Inject Cache _memcache;
}

Resin can also be configured as a memcache server. The following <listen> configures it.

Example: resin.xml memcache server
<resin xmlns="http://caucho.com.ns/resin"
    xmlns:memcache="urn:java:com.caucho.memcache">

  <cluster id="cache_tier">

    <server-multi id-prefix="cache-"
                  address-list="${cache_tier}"
                  port="6820">

      <listen port="${rvar('memcache_port')?:11212}"
              keepalive-timeout="600s" socket-timeout="600s">
        <memcache:MemcacheProtocol/>
      </listen>
    </server-multi>
  </cluster>
    
</resin>

IIS .NET Plugin: added support for Windows Authentication

User credentials established with Windows Authentication are made available in Resin's HttpServletRequest.getRemoteUser() and HttpServletRequest.getUserPrincipal()


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

Cloud-optimized Resin Server is a Java EE certified Java Application Server, and Web Server, and Distributed Cache Server (Memcached).
Leading companies worldwide with demand for reliability and high performance web applications including SalesForce.com, CNET, DZone and many more are powered by Resin.

home company blog wiki docs 
app server web server 
health cloud java ee pro