Mastering Resin


  • The official guide to Resin, authorized by the company that invented the product, Caucho Technology
  • Offers a comprehensive tutorial and reference on how to use all flavors of Resin, including the basic Resin server, Resin-CMP, and Resin-Enterprise
  • Demonstrates how to build enterprise Java applications, optimize performance, and use other tools with Resin
  • Illustrates how to ...
See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (5) from $1.99   
  • New (1) from $18.99   
  • Used (4) from $1.99   
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any coupons and promotions
Seller since 2008

Feedback rating:



New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.


Ships from: BAY SHORE, NY

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Page 1 of 1
Showing All
Sort by
Sending request ...


  • The official guide to Resin, authorized by the company that invented the product, Caucho Technology
  • Offers a comprehensive tutorial and reference on how to use all flavors of Resin, including the basic Resin server, Resin-CMP, and Resin-Enterprise
  • Demonstrates how to build enterprise Java applications, optimize performance, and use other tools with Resin
  • Illustrates how to configure Resin for various commercial and open source hardware platforms, maintain high availability of the server, and use all of the advanced features
  • Companion Web site includes updates on the technology and links to useful resources and tools
Read More Show Less

Product Details

  • ISBN-13: 9780471431039
  • Publisher: Wiley
  • Publication date: 8/15/2003
  • Edition number: 1
  • Pages: 408
  • Product dimensions: 7.42 (w) x 9.20 (h) x 0.85 (d)

Meet the Author

RICHARD HIGHTOWER is CTO of Trivera Technologies, a leading Java education and consulting company. He is also an active Java developer, a regular contributor to the Java Developer's Journal, and is the author of the successful Wiley book Java Tools for Extreme Programming.

JOSEPH D. GRADECKI is a software engineer at Comprehensive Software Solutions and an associate professor of computer science at Colorado Technical University. He is an expert in building enterprise applications using Java, servlets, JSPs, Resin, XML, and MySQL. Gradecki is also the co-author of MySQL and Java Developer's Guide (Wiley).

Read More Show Less

Read an Excerpt

Mastering Resin

By Richard Hightower Joseph D. Gradecki

John Wiley & Sons

Copyright © 2003

Richard Hightower, Joseph D. Gradecki
All right reserved.

ISBN: 0-471-43103-6

Chapter One

An Overview of Resin

During the early years of the Web, developers used a fairly small set of
HTML document tags to manipulate the style and layout of each Web
page. These static Web pages were usually stored on the same computer
that was executing a Web server. When a user launched a Web browser
on his or her local machine and pointed that browser to a Web server, a protocol-based
exchange of information began. The page sent to the user was
really just a text file with information and HTML tags embedded in it to
present the information in a clear manner.

As time went on, it became clear that providing up-to-date and personalized
information was going to be a developer's nightmare if using static pages was
the only option. Keeping the static pages up-to-date was feasible, but personalizing
that information manually was next to impossible. This meant that the
pages had to be created on the fly in response to an action or request by the
user. One early solution to this problem was called Common Gateway Interface
(CGI). Figure 1.1 shows an example of how requests are made using CGI
and a Web server.

Unfortunately, there were someproblems with using CGI for dynamic Web
page generation. First, the CGI protocol was designed to allow a Web server to
communicate with an external program and not specifically for the generation
of dynamic Web pages. The creation of the Web pages is actually a side effect of
the CGI protocol. As shown in Figure 1.1, the protocol is written so that the
Web server will create new process spaces in which the CGI application will
execute. All information passed from the user's Web browser to the Web server
is passed as environment variables to the waiting CGI application. All of these
operations are expensive in terms of processor time as well as memory utilization.

The second problem is the fact that most CGI applications were written in
Perl, with C and C++ coming in second. Depending on your programming
capability, Perl could be a stumbling block to Web development.

After the success of CGI became apparent, an alternative implementation of
CGI was created called FastCGI. Figure 1.2 shows the request flow in FastCGI.

The primary difference between CGI and FastCGI is the creation of persistent
processes in which the CGI application executes. By using persistent
processes, the Web server doesn't have to expend processor time and memory
constantly creating and destroying processes. The success of FastCGI led
to the development of other products, like mod_perl and PerlEx, to address
performance and interface issues.

The overall success of CGI was dependent on the fact that most Web servers
on the market supported its use. This included open-source servers, such as
Apache; Internet Information Services (IIS) from Microsoft; and iPlanet from
Netscape. However, at the same time these Web servers started experimenting
with newer technologies like Active Server Pages (ASP) and Server-Side
JavaScript (SSJS).

Both ASP and SSJS solutions to the problem of dynamic Web pages employ
the concept of embedding code into the HTML page where dynamic content
is needed. ASP, for example, uses JScript or VBScript. Figure 1.3 shows the
process flow for ASP and SSJS.

As Figure 1.3 shows, a user requests an ASP page from a Web server that supports
ASP, usually IIS. The page is pulled into the Web server and processed.

The processing involves executing the ASP or SSJS code within the server
and replacing the code with HTML tags and content. The resulting static page
is sent to the browser.

One of my core beliefs is that all programming languages-both conventional
and Internet based-should be compared with each other only when we're
discussing a specific solution. Is Java better than Cobol? Well, for some applications
clearly it is, but in some business situations, fancy GUIs and RMI just
aren't needed. The same is true for things like ASP and servlets. Therefore, at
this point, let's move to a discussion of JSP, servlets, and beans, which
entered the scene after ASP and SSJS.

In the hierarchy of power, the JavaServer Pages (JSP) technology probably
comes next. JSP pages are similar to both ASP and SSJS in that code is embedded
in the HTML of a Web page. However, JSP isn't designed to be specific to
one Web server. As long as a Web server can interpret the Java code embedded
in the Web page, it will be able to handle JSP pages. Some of the real power in
JSP comes from its ability to interact with JavaBeans. Beans are modular
pieces of Java code designed to perform a specific job. Beans can be referenced
from JSP pages and automatically instantiated on the server machine.

Finally, we have servlets. A servlet is an extension to a Web server written as
a class that will be instantiated to provide additional functionality to the
server. Figure 1.4 shows the process flow for a Web page that utilizes servlets.

When a Web page that includes calls to a servlet is requested by a browser, the
HTML is processed by the Web server and the servlet calls are farmed to a
servlet engine. The servlet engine will instantiate the servlet code, process
the request, and return any results to the Web server. Servlets are powerful
because they:

* Remain in memory after the first instantiation.

* Are portable to any platform that can execute Java.

* Have access to the full power of the Java language and its supporting

You can use servlets for database access, distributed access using Remote
Management Interface (RMI) or Common Object Request Broker Architecture
(CORBA), and a host of other operations.

In the remainder of this chapter, we cover the Resin server product family
and take a more in-depth look at the features provided by the servers.

What Is Resin?

Resin is a high-performance XML application server for use with JSPs,
servlets, JavaBeans, XML, and a host of other technologies. The 2.1.x line of
servers is fully Servlet 2.3 and JSP 1.2 compliant and beats all of the competition
in number of operations per second, as shown in the data obtained from Released in August 2003, Resin
3.x is JSP 2.0 and Servlet 2.4 draft compliant. As the drafts become standard,
Resin 3.x will be updated to reflect any changes.

Over the past few years, the Resin family of servers has evolved with the
needs of its users. As of this writing, two Resin application servers are available.
Resin is the core product, and it supports all of the basic features
defined in this chapter. Resin Enterprise enhances the core product with
Enterprise JavaBeans (EJB) container-managed persistence (CMP) and database
caching. Distributed objects are included using the Burlap protocol as
well as full support for the EJB 2.0 specification. In the remainder of this
chapter, we outline the major features of the Resin application server.

Resin/Resin Enterprise Features

The following features are available in both Resin and Resin Enterprise:

* JSP/servlet support

* Serif/XTP


* Internal and external Web servers

* Load balancing

* Distributed sessions

* Security

* Virtual hosting

* Web services


* JDK 1.4 Logging

Let's take a look at each of these features.


As mentioned earlier, the Resin application server fully supports the Java JSP
2.0 specification. JSP pages can use Java as well as JavaScript to embed code
within the HTML tags and text on the page. However, beginning with Resin
3.x, JavaScript is not supported; therefore you will only want to use Java in
your JSP pages. The server can handle XML-based JSP notation like the


What's your name?

The Resin server allows you to create custom tag libraries to add better internal
documentation to Web pages. Full support is provided for Web applications
pulling together JSP pages, scripts, and beans.


JSP, servlets, and XML Template Pages can take advantage of Resin's ability
to process Extensible Stylesheet Language (XSL) or Extensible Markup Language
(XML) style sheets. By using XSL, basic XML can be transformed to
HTML or another output, such as Wireless Application Protocol (WAP).
Depending on the needs of the user, different style sheets can be created and
used against XML to produce the desired output. In the following example, a
JSP page instructs the Resin server to use the new.xsl style sheet against the
provided XML:

<%@ page session=false contentType='x-application/xslt' %>

Output Just For You

Web Server Support

Out of the box, Resin is a fully self-contained application server as well as a
Web server. There is no need for any additional server software. The internal
Web server is very fast and, in most cases, outperforms the competition.
Resin also supports these external Web servers: Apache, Netscape, IIS, and
O'Reilly WebSite.

Load Balancing

There's no need to worry about losing customers or visitors to your site when
it's powered with a Resin server. Resin supports the use of a hardware load
balancer for higher cost situations and a low-cost solution using Resin itself.
The LoadBalanceServlet servlet is executed on one front-end machine, and it
distributes user requests to numerous back-end servers. The Resin server
also includes an HTTP proxy cache to make the entire system more efficient.

Distributed Sessions

For sites that must use sessions, Resin supports sticky and distributed sessions.
Through file-based and in-memory hashtables, customer won't have
problems with shopping carts when requesting transfers to different servers
in a server farm or when a server crashes. There is support for database persistent
sessions as well as TCP-based distribution.


The Resin server includes four security mechanisms for use in applications:

Authentication through XmlAuthenticator-This allows
username/password combinations to be placed in configuration files.

Authorization for protecting areas of a Web site-The areas of the
site can be protected using various constraints: pattern-based for specific
pages, roles-based for specific users, IP-based for keeping pages specific
to specific machines, and transport-based for limiting pages to SSL. Further
authorization can be constrained using custom controls.

Encryption of data-Resin supports OpenSSL for encrypting data. Full
support is provided for certificates.

Security Manager for separating virtual uses in an ISP situation-The
manager will put each Web application in its own separate security

Virtual Hosting

If you are in a situation where numerous users or departments will be using
Resin, it's a good idea to configure virtual hosting. In this mode, each host has
its own directory structure. Advanced configuration allows each host to have
its own Java Virtual Machine (JVM) for complete separation.

Web Services

The developers of Resin have incorporated two different Web service protocols
to support this new Internet technology. The protocols are called Burlap
Web Service Protocol and Hessian Binary Web Service Protocol.


Burlap Web Service Protocol is designed to be a lightweight protocol for
allowing EJB services to communicate with non-Java servers and clients. The
underlying protocol is all XML-based for maximum interoperability. The protocol
is simple, and using a Burlap service results in behavior similar to
instantiating an object and calling a method. A basic client would look like

public class Client {
public static void main(String args)
throws Exception {
BurlapProxyFactory factory = new BurlapProxyFactory();
TestService test = (TestService) factory.create(
TestService.class, "");
System.out.println("Call doIt(): " + TestService.doIt());

Building a Burlap service is just like creating a standard Java class, with the
public methods exposed or made available to remote clients. Here's the code
for the service called by our client:

public class TestService extends BurlapServlet implements Basic {
public String doIt()
return "called doIt()";

You can use the protocol in Java 2 Micro Edition (J2ME) devices, and it also
supports object serialization.


The Hessian Binary Web Service Protocol is designed to be a simple protocol
just like Burlap but is optimized for sending binary data between servers and
clients. The API for Hessian is just as simple as Burlap, and it supports serialization
as well.

Resin Enterprise

The remaining features are specific to Resin Enterprise:


* XDoclet



For those of you who have written servlets-or just about any type of Web
application that uses a database-the acronyms ODBC and JDBC may make
you tremble. When writing servlets that connect with a database, JDBC is the
common interface used. The developer is responsible for creating the connection
to the database, building the SQL, and executing the calls. With EJB
container-managed persistence (see
doc/EJBConcepts4.html#62950), most of the work is done for you. Resin
helps even further by intelligently caching the database data. Full relations
can be created between CMP beans like 1-n, 1-1, and others using a series of
XML-based configurations.


Resin Enterprise supports XDoclet, which is an extension to JavaDoc available
at The custom Javadoc @tags created by
Resin are: resin-ejb:entit-bean, resin-ejb:cmp-field, resin-ejb:entity-method,
and resin-ejb:relation.


The Enterprise server supports Enterprise JavaBeans Query Language (EJBQL)
in its use of container-managed persistence. EJB-QL (which is defined by
Sun at allows for
support of portable data stores and maintains SQL '92 compliance.

What's Next

As we've seen, the Resin family of products is quite comprehensive and full of
features. This chapter has only touched on the high points. In the next chapter,
we begin the process of installing and learn how to bring out the best in
the application servers.


Excerpted from Mastering Resin
by Richard Hightower Joseph D. Gradecki
Copyright © 2003 by Richard Hightower, Joseph D. Gradecki.
Excerpted by permission.
All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.

Read More Show Less

Table of Contents

About the Authors
Pt. I Introduction to Resin
Ch. 1 An Overview of Resin 1
Ch. 2 Setting Up the Resin Server 11
Pt. II Application Development with Resin
Ch. 3 Using JSP and Resin 31
Ch. 4 Using Servlets and Resin 53
Ch. 5 Using XTP and StyleScript 73
Ch. 6 Object-Relational Mapping with CMP 107
Ch. 7 Using XDoclet with Resin 151
Ch. 8 The Burlap Web Service Protocol 163
Ch. 9 Hessian Binary Web Service Protocol 179
Ch. 10 Parsing 199
Ch. 11 Database Connectivity 207
Ch. 12 Debugging and Logging 221
Ch. 13 Security 231
Ch. 14 Page Caching 245
Pt. III Resin Administration
Ch. 15 Resin Server Configuration 253
Ch. 16 Configuring Your Web Server 289
Ch. 17 Exploring Virtual Hosting 307
Ch. 18 Using Resin HardCore 313
Ch. 19 Load Balancing and Reliability 315
Pt. IV Appendixes
App. A Resin Sources 325
App. B Resin Status 329
App. C Resin and Eclipse 335
App. D Burlap and Hessian APIs 343
Index 363
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted September 7, 2003


    For those of you who have spent hours trying to navigate around Caucho's site looking for proper documentation, this is the book for you. This book is filled with good examples, great tips and covers everything you need to know to run Resin in a variety of environments.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)