![]() | ![]() | ![]() | ||||||||
![]() | ||||||||||
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 documentation
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. InstallationCommand-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.
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 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. FiltersHessian
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. HMTP
HMTP (Hessian Message Transport Protocol) is an asynchronous, object-oriented messaging framework, designed around small, interactive message packets, a brokered-agent topology and based on the Hessian protocol and XMPP (Jabber). 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. 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. PerformanceQuercus/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.
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 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 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
|