Configuration FAQ
Resin 3.0

Features
Installation
Configuration
Web Applications
IOC/AOP
Resources
JSP
Servlets and Filters
Portlets
Databases
Admin (JMX)
CMP
EJB
Amber
EJB 3.0
Security
XML and XSLT
XTP
JMS
Performance
Protocols
Third-party
Troubleshooting/FAQ

index
howto
resin.conf
env
web-app
log
el control
Bean Config
Common Tasks
Relax Schema
Config FAQ
Scrapbook
J2EE web.xml
Configuration
Scrapbook

  1. Where is the configuration GUI, and the GUI for deploying web-apps and new virtual hosts?
  2. Where can I find the .rnc files that Resin uses for validating configuration files?
  3. Can I precompile JSP's?
  4. How can I disable directory listings?
  5. What impact does always-save-session have on performance?

Where is the configuration GUI, and the GUI for deploying web-apps and new virtual hosts?

Resin deliberately does not include any kind of GUI for deployment or management. Or philosophy is:

  • a single xml configuration file for the server (resin.conf)
  • changes to the server configuration file (resin.conf) are automatically detected and cause a restart of the server
  • changes to the WEB-INF/web.xml configuration file for a web application are automatically detected and cause a restart of the web application
  • new web applications are added either with resin.conf file changes, or by adding a .war or subdirectory to a webapps/ directory
  • new virtual hosts are added either with resin.conf file changes, or by adding a .jar or subdirectory in a hosts directory.

Where can I find the .rnc files that Resin uses for validating configuration files?

The .rnc files used by Resin for validation are in $RESIN_HOME/lib/resin.jar.

  • com/caucho/server/resin/resin.rnc
  • com/caucho/server/webapp/web-xml.rnc
  • com/caucho/server/webapp/resin-web-xml.rnc
  • com/caucho/server/resin/env.rnc
  • com/caucho/jsp/cfg/jsp-tld.rnc
  • com/caucho/jsp/cfg/jsp11-tld.rnc
  • com/caucho/jsp/cfg/jsp12-tld.rnc
  • com/caucho/jsp/cfg/jsp1_2-tld.rnc
  • com/caucho/jsp/cfg/jsp20-tld.rnc

Can I precompile JSP's?

How can I disable directory listings?

Directory listing is performed by a servlet named `directory'. The standard resin.conf contains a definition of that servlet:

resin.conf definition of directory servlet
<web-app-default>
  ...
  <servlet servlet-name="directory"
           servlet-class="com.caucho.servlets.DirectoryServlet"/>

Directory listing is disabled by removing or commenting out this definition.

resin.conf disabled directory servlet
<web-app-default>
  ...
  <!-- disabled:
  <servlet servlet-name="directory"
           servlet-class="com.caucho.servlets.DirectoryServlet"/>
  -->

What impact does always-save-session have on performance?

We've seen significant performance issues when distributed sessions are enabled, and are trying to find some clues as to the cause. We've seen as much as 30% increase in cpu utilization when disttributed sessions are enabled, and we are using <always-save-session> .
<always-save-session> has a significant impact on performance.

When using <always-save-session> , Resin can't know if an internal bean value has changed, so the session is serialized with every request. That's a pretty significant amount of work, depending on how much is stored in the session.

It is far more efficient to design the session to avoid the need for <always-save-session> , so session values are only saved once and then are read-only.

You can avoid <always-save-session> if you call setAttribute() each time the session state changes. If your web application calls session.setAttribute("key",value) everytime you change the value object, then Resin can intercept that call and realize that the session needs to be written to the distributed store again.

Resin 3.0 is a little more efficient thatn Resin 2.1. Resin 3.0 compares the crc sum of the serialization; it compares the crc value of the serialization of current session objects with the objects in the backing store, and if there is no change the session is not written.


J2EE web.xml
Configuration
Scrapbook
Copyright © 1998-2005 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark, and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.