xml and xslt
resin 3.1 documentation
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.
You can start using Resin by simply expanding the archive, and starting Resin with a Java command line.
While most configuration options have been made available in resin.conf, this section describes some common command-line options.
Resin is a powerful, customizable application server. This section discusses how to configure Resin.
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 is Resin's implementation of the JPA 1.0 persistence specification, focusing on simplicity and quality.
Resin's HTTP Web Server includes load balancing for scalability and reliability.
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.
Resin provides a robust and tested connection pool that is used to obtain connections to databases.
Resin provides a wide variety of custom packaging and deployment options.
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'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.
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 (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).
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 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.
Resin can perform access logging, specify where JDK logging interface messages go, and redirect the stderr and stdout for your applications.
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.
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.
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.
Resin's <scheduled-task> capability lets you schedule
events using a flexible cron-style trigger. The task can be
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 inso 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.
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.
A list of symptoms and their possible resolution.
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.
The Resin watchdog process monitors the Resin JVM instance restarting as necessary.
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.