Proposal for Using Catalina in Tomcat 4.0

$Id$

Introduction

As many Tomcat developers are aware, development on a next generation version of Apache JServ was in progress when Sun announced their contribution of the Java Server Web Development Kit (JSWDK) source code to the Apache Software Foundation in June 1999. Among other things, this caused interest in further development of Apache JServ to dwindle, on the (reasonable) assumption that Tomcat -- the code eventually delivered in October 1999 -- would become a natural successor to Apache JServ, with support for similar functionality but providing the key enhancements of support for the current versions of the servlet and JSP specifications.

When the code was delivered in October, it was obvious that its heritage and purpose were not in conformance with the stated goals of the Jakarta project ("commercial quality server solutions" and "world class implementation of the Java Servlet 2.2 and JSP 1.1 Specifications" -- both quotes from the home page at <http://jakarta.apache.org>). Although there have been improvements in functionality, quality, and performance since that time, these improvements have been relatively small in scale compared to the fundamental problems of the code base -- very poor internal organization and documentation, "spaghetti code" implementation of much of the functionality, substantial numbers of bugs in key features, and a general lack of maintainability.

Background

When it became obvious that "evolutionary" changes to the existing code base would take more effort and time than a "revolutionary" change to a new code base, considerable effort was (and continues to be) expended to create a new code base for the servlet container portion of Tomcat, based in large part on the design direction that Apache JServ was already headed. In addition, a set of goal statements was explicitly described. These goals (and the Catalina architectural design that implements them) have been presented -- with very positive reception -- at several recent trade shows (ApacheCon in March, O'Reilly Java Conference in March, JavaOne in June, and O'Reilly Open Source Conference in July). Briefly, the goals cover the following general areas:

High level diagrams of the Catalina component architecture are included in the session notes for the conference web sites mentioned above. In particular, the JavaOne presentation can be downloaded from: <http://jsp.java.sun.com/javaone/javaone2000/pdfs/TS-953.pdf>.

The existing implementation of these goals is present in the proposals/catalina directory of the jakarta-tomcat CVS module. It passes 100% of the servlet tests (and 100% of the JSP tests in conjunction with the JSP portions of Tomcat 3.x) from the jakarta-watchdog test suite that validates conformance to the servlet 2.2 and JSP 1.1 specifications.

Comparison With Tomcat 3.X

This section will be fairly brief, because the entire source code for both Tomcat 3.x and Catalina is available for anyone to peruse and compare for themselves. However, several key points are worthy of mention (in alphabetical order):

The Catalina Proposal

Given this background, and the fact that initial public drafts of the Servlet 2.3 and JSP 1.2 specifications is imminent, it is timely for us to make a decision to use Catalina as the code base for Tomcat 4.0 (supporting the features of the new specifications), while continuing to support the Tomcat 3.x code base for as long as is appropriate. The associated proposal for organizing the source code repository for Tomcat 4.0 development shows how this dual track development approach can be supported easily.