Caucho Newsletter – December 2015

Resin application server - Java EE 6 Web Profile Certified

Happy Holidays! We have lots of updates for you. Here's a snapshot:
  • Resin 4.0.47 release
  • Baratine tutorials
  • Speak with a Caucho Engineer!
  • Resin tip of the day
Resin News

Resin 4.0.47 on

The latest release of Resin v4.0.47 is now available for download. As with previous 4.0 releases, the upgrade process is as simple as stopping Resin, saving your configuration, installing the latest version, and copying over your config.

Many of our clients who have upgraded to this latest version report an increase in performance of their clustered applications.

Check out the following enhancements in 4.0.47:
JDK 6 compatibility

Distributed session database synchronization issues, specifically: 

  • session: fixes related to Java deserialization (#5947i)
  • distcache: locking overhead reduced (#5962)
  • distcache: update remove query and locking (#5952)
  • session: fixes related to session removal/timeout (#5952)
  • compile: jdk5 compile issues (#6940)
  • cache/mmap: jdk6 compatibility (#5959, #5960i)
The latest releases of Resin continue to improve performance and reliability as we work hard to fix any bugs that are reported. For this reason, we always recommend users update their Resin installation and take advantage of these improvements.

Baratine News

Baratine Patterns Tutorial

The latest version 1.0.3 is available at As more users implement and prototype services, we are seeing a common set of questions arise around functionality. Many of these questions relate to the use of Baratine, such as “What JSRs are supported by the Baratine Framework?”  This is actually a basic question in terms of functionality for Baratine. In short, Baratine does not support any of the JSRs specifically. Instead, Baratine supports the use of Java 8 and many programming patterns ( that can be used to build services. We believe that as it currently stands a large majority, upwards of 90%, of the web services developers are looking to build can be created with these patterns and the Baratine framework. 

What’s more, rather than coding to specific JSRs, Baratine allows you to code directly to Java 8. This means code is more standard, easier to read, and you’ll automatically enjoy the performance and scalability aspects of Baratine. While there is coding required that is specific to the Baratine framework, we have restricted it to Service level Annotations ( These annotations allow developers to quickly and succinctly manage the lifecycle event of a service, similar to how annotations can be used to modify the lifecycle of a servlet.

If you know how to code in Java 8, then you are capable of building fully distributed web services with the ability to speak to any language and perform millions of operations per second per instance. Of course, this is made possible by the underlying Baratine framework which is complex in its coding, but exposes a POJO API that is naturally familiar to many developers.

Currently we are providing 10-15 minute tutorials ( that can be used to implement portions of an application or service. Here is the list: 

  • Hello World - How to deploy a Baratine Service and create a client to call into it
  • Single-Page Session - A session service used by a single-page application for user login state. Each user sessions creates a new session service instance
  • Singleton Resource Service - A service with a single resource, used to create new services from existing modules or from scratch
  • Queue with Application API - A user of a queue service submits a request and continues processing without waiting for a result
  • Local Microservice - Wrapping an existing module into a local microservice, similar to external creates encapsulated clean boundaries
  • Microservice - A microservice service is useful to convert an existing multi-threaded, blocking module into a loosely coupled service
  • Protocol for a Module - gives an existing module a HTTP protocol interface that supports HTTP request-response & WebSocket async protocol
  • In-Memory with External Database - An in-memory service layer that encapsulates a database better than a traditional passive cache
  • In-Memory Service with Internal Database - An in-memory service layer that persists data internally rather than an external database
  • Child Services - Build a REST-like Service with multiple child instances, each instance responsible for its own data
  • Setting up a Cluster - how to build a sharded service and deploy it to a cluster
  • Publish/Subscribe Stream - how to build a publish/subscribe service for Java and JavaScript clients
  • Publish/Subscribe Events - how to use publish/subscribe events in your services
  • Data Access Service - how to use Hibernate with Baratine
  • Singleton List Service - A single instance list service that maintains its own data
  • Multiple List Service - A multiple instance list service each independently maintaining their own data
  • REST Service - How to create a REST interface for a service
  • Facade Service - A facade service that allows you to expose an external API to a service, separate than the internal API

Are we missing a pattern? Let us know and we will implement it! :)

Helpful Information 


Have Questions Around Setting Up Clustering / HA?

Our Sales and Engineering teams are available to schedule calls with you to discuss Resin and Baratine as they apply to your specific environment. This benefit is included with your license and is a great way to learn about underlying models, features, performance and best practices that could be valuable to your development efforts and deployments.

Send an email to to schedule a call or contact us directly at 858-456-0300! Alternatively, if you are planning on being in the San Diego area, drop us a line and come by our offices to meet us in person!

Resin Tip

One of the most useful tools Resin provides for debugging is its logger. Resin has the ability to log any instance of a class and provide a detailed report of method invocation leading into and out of a class. Because of this, the log is usually the first place to look when something has gone awry with an application. By adding a simple one line logger to your resin.xml, you can enable the level of detail our engineers use to sort through various bugs. The following example details how quickly this can be done:

  1. Choose the name of the class or package you wish to log​.
    • Resin will log every class under a package name, i.e. logs
  2. Choose the level of detail you wish to have logged.
  3. Add the logger to your resin.xml and restart your application
  4. Resin will output log files to /var/log/jvm-*app-server*.log

 (in resin.xml)
//Log HTTP-related debugging
<logger name="com.caucho.http”.server level=“finer”/>
//Log every class that matches
<logger name="” level=“finer”/>
Alternatively, you can provide logging in a specific class as follows:
import java.util.logging.Logger;
import java.util.logging.Level;
public class Foo {
  private static final Logger log
    = Logger.getLogger(Foo.class.getName());
  void doFoo(String bar)
    // check for log level if your logging call does anything more
    // than pass parameters
    if (log.isLoggable(Level.FINER))
        log.finer(this + "doFoo(" + bar + ")");
    try {
    } catch (ExpectedException ex) {
      log.log(Level.FINEST, "expected exception", ex);


Copyright (c) 1998-2015 Caucho Technology, Inc. All rights reserved.
Caucho®, resin®, quercus® and baratine
TM are registered trademarks of Caucho Technology, Inc.

 Presentations   & Links

  Resin 4


Baratine Overview

Follow Us!

Facebook: Caucho Technology
Resin Twitter page
Caucho Blog


Contact Us
(858) 456-0300