Resin 3.1 Documentation
Resin 3.1

Documentation
Examples
Changes

Overview
Quick Start
Installation
Command-Line
Configuration
Admin
Amber
Clustering
Caching
Database
Deployment
EJB 3.0
Embedding
Filters
Hessian
HMTP
IoC
JSP
Logging
Messaging
Performance
Quercus/PHP
Remoting
Scheduled Tasks
Security
Server Push
Servlets
Third-party
Troubleshooting
Virtual Hosting
Watchdog
WebApp
XML and XSLT
Resin 3.1
Resin 3.1
Overview

Overview

Resin is a high-performance, scalable Java/PHP application server. We release two versions of Resin: an open source version under the GPL, and a professional version with enhanced performance, clustering, and reliability features.

Quick Start

You can start using Resin by simply expanding the archive, and starting Resin with a Java command line.

Installation

Resin Web Server
Apache
IIS
Plugin Dispatch
Linux Boot

Command-Line

While most configuration options have been made available in resin.conf, this section describes some common command-line options.

Configuration

Resin is a powerful, customizable application server. This section discusses how to configure Resin.

<cluster> - clustering, caching, load-balancing, and distributed sessions
<database> - connection pool and database driver configuration
<host> - virtual hosts
Ports - HTTP, SSL, addresses and ports
<resin> - top-level configuration container
Resource tags - database, classloader, jms, bean, and IoC
Rewrite - URL rewriting, dispatching, and load-balancing
<server> - threading, keepalive, timeout, and jvm arguments
session - servlet sessions
variables - configuration variables
<web-app> - servlet and filter configuration
Index - alphabetical list of tags
Relax Schema
Environment
Resin J2EE
Resin web.xml
resin.conf
J2EE Common
J2EE web.xml

Admin

The /resin-admin web-app provides an administration overview of a Resin server. Resin-Pro users can obtain information across the entire cluster, profile a running Resin instance, and obtain thread dumps and heap dumps.

All Resin users should familiarize themselves with the thread dump, profile, and heap capabilities.

Amber

Amber is Resin's implementation of the JPA 1.0 persistence specification, focusing on simplicity and quality.

Clustering

Resin's HTTP Web Server includes load balancing for scalability and reliability.

Caching

Server caching can speed dynamic pages to near-static speeds. When pages created by database queries only change every 15 minutes, e.g. CNN or Wikipedia or Slashdot, Resin can cache the results and serve them like static pages. Because Resin's caching only depends on HTTP headers, it will work for any JSPs, servlet or PHP page.response.

Resin's caching operates like a proxy cache, looking at HTTP headers to compare hash codes or digests or simply caching for a static amount of time. Since the proxy cache follows the HTTP standards, applications like Mediawiki will automatically see dramatic performance improvement with no extra work. You can even cache REST-style GET requests.

Because the cache supports advanced headers like "Vary", it can cache different versions of the page depending on the browser's capabilities. Gzip-enabled browsers will get the cached compressed page while more primitive browsers will see the plan page. With "Vary: Cookie", you can return a cached page for anonymous users, and still return a custom page for logged-in users.

Database

Resin provides a robust and tested connection pool that is used to obtain connections to databases.

Deployment

Resin provides a wide variety of custom packaging and deployment options.

EJB 3.0

Resin's EJB support is integrated with Resin IoC. This integration means plain Java beans can use EJB annotations and interception, EJBs can use Resin IoC annotations, and both kinds of beans can be configured directly from the resin-web.xml or discovered by classpath scanning.

Embedding

Resin's embedding API lets developers embed Resin as the web interface for an existing application, simplifies unit testing, and improves IDE integration capabilities. The ResinEmbed JavaDoc gives more details.

Filters

Hessian

Hessian and Burlap are compact binary and XML protocols for applications needing performance without protocol complexity. Hessian is a small binary protocol. Burlap is a matching XML protocol. Providing a web service is as simple as creating a servlet. Using a service is as simple as a JDK Proxy interface.

Hessian
Hessian 1.0 spec
Hessian 2.0 draft spec
Java Binding
Burlap
Burlap 1.0 Spec
Burlap Design Notes
Hessian Messaging

HMTP

IoC

Resin is designed around an internal inversion-of-control framework used for all configuration and resources including servlets, EJBs, messaging, remoting, and databases. Applications can take advantage of Resin's IoC capabilities using WebBeans-standard annotations and interfaces.

Since Resin-IoC is used for servlets, WebBeans and EJBs, any application bean can use EJB annotations like @TransactionAttribute or WebBeans @InterceptionTypes or event @Observes capabilities, in addition to the dependency injection and IoC configuration.

The dependency injection framework is type-safe, meaning the registry is organized around Java types, not a flat namespace, which gives more power and flexibility for component assembly. Since injection is annotation-based, most components can avoid XML configuration, while XML is still available for components.

JSP

JSP creates output (such as HTML) from template text and scripting actions. Template text is returned verbatim to the requesting client, and actions are used to fill in dynamic values and do things conditionallly.

Introduction
Compilation
EL
JSTL
Directives
Variables
Actions
Applications
Schema for JSP-2.0 .tld files
Velocity syntax
JSP Templates

Logging

Resin can perform access logging, specify where JDK logging interface messages go, and redirect the stderr and stdout for your applications.

Messaging

Configuration for Resin's JMS provider implementation. The JDBC Queues and Topics provide a persistent messaging store. The Memory Queues and Topics provide a low-overhead memory-based store.

Performance

Benchmarks
JVM Tuning
Performance FAQ
Performance Scrapbook
Tuning

Quercus/PHP

Quercus is Caucho Technology's fast, open-source, 100% Java implementation of the PHP language. Performance is 4x mod_php and is comparable with PHP accelerator performance. Quercus uses Resin-IoC/WebBeans to integrate with Resin services.

Security - Quercus gains security advantages from the JVM platform
Module Status

Remoting

Resin's remoting lets applications write services as plain Java objects and export them with a choice of protocols, including Hessian, Burlap, CXF (SOAP), XFire. Because Resin activates the service as an IoC singleton, the service can use any of Resin's IoC capabilities, including dependency injection, AOP interception, EJB transactions, and event handling.

For applications which need to use a custom protocol, making a new driver for a protocol is also straightforward.

Scheduled Tasks

Resin's <scheduled-task> capability lets you schedule events using a flexible cron-style trigger. The task can be any Runnable bean, a method specified by EL, or a URL.

Security

Server Push

Resin's server-push (Comet) servlet API enables streaming communication such as reverse AJAX dynamic updates for browser/JavaScript applications. The API encapsulates of the threading and communications issues between the request threads and the rest of the application.

Servlets

Servlets are Java classes which service HTTP requests. The only requirement for writing a servlet is that it implements the javax.servlet.Servlet interface.

Servlets are loaded from the classpath like all Java classes. Normally, users put servlets in WEB-INF/classes so Resin will automatically reload them when they change.

JSP pages are implemented as Servlets, and tend to be more efficient for pages with lots of text.

Third-party

Resin's support for third-party libraries and packages is primarily documented at http://wiki.caucho.com. This section includes links to the most popular packages.

Troubleshooting

A list of symptoms and their possible resolution.

Virtual Hosting

Each Resin instance can serve many virtual hosts. The virtual host will have its own servlets and documents. For greater isolation, you can configure each virtual host to have its own JVM and you can have all the virtual hosts controlled by a single web server.

Watchdog

The Resin watchdog process monitors the Resin JVM instance restarting as necessary.

WebApp

A web application is a self-contained subtree of the web site. It uses Servlets, Filters, JSP, and the functionality provided by Resin and any other java code to provide a response to a client that makes an HTTP request.

XML and XSLT

Introduction
JAXP
XML Path Language (XPath)
XSLT Filter
XSLT
XPath Functions

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