Tomcat 6.0 - New Features & More
New Features
------------
Http11NioProcessor: Added an NIO non-blocking HTTPS protocol connector
written in Java to provide users with another choice on platforms that
handle non-blocking IO threads well. This Nio code is essentially the
APR connector code, but using the java.nio package. For "blocking
reads" it uses a thread suspend mechanism, and for "blocking write" it
uses a busy wait. Alternately known as the "HTTP NIO connector".
This one is the most compelling new feature of Tomcat 6.0, however our
benchmarks found it to be slightly slower than the usual HTTP JIO
connector.
Advanced IO (A.K.A. "Comet"): The ability to push data on a HTTP
connection, outside of the execution of the service method of the
servlet. Specific applications require this kind of capability (like
gtalk; to be frank, I don't know that many apps which need it) and
since usage of theAJP or HTTP connector is exclusive, it is not
possible to implement this sort of thing with Servlets. I would
have liked to use SIP and SIP Servlets for this. However, it appears
like it's not going to happen. The feature will require APR to work in
the intended way, but the wrapper servlet that I will use to present
the functionality to the end user should work with the regular java.io
connectors (using a thread per connection, of course). In some ways,
it is a bit similar to the sendfile addition, so it's probably useful,
but proprietary. See
http://alex.dojotoolkit.org/wp-content/LowLatencyData.pdf "I am still
very interested in SIP (which allows bidirectional communication
without the big hack that is comet), personally." --Remy
Support for Java 1.5 (and higher) annotations.
Restricted servlets (which can only be loaded by a privileged webapp).
Improvements in memory usage.
Clustering code overhaul (almost nobody uses this).
* Clustered SSO
Introduced a new HTTP push feature called "Comet". Not particularly compelling
for most users, but a small number of users do need it.
Added the VirtualWebappLoader and VirtualDirContext implementation
classes to allow running an expanded webapp during development. This
feature allows developers to run and debug a webapp without packaging it for
deployment, in some cases without having to redeploy the webapp
repeatedly during development.
Added the <Executor> element in server.xml as of 6.0.11. Executor
is nested within the Service element. By default Executor is commented out:
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
In addition, Connectors can now set the attribute executor="tomcatThreadPool".
If you ever use the executor attribute, remove all other attributes that
set thread settings.
As of version 6.0.19, the JIO Connector now exposes the following additional
attribute settings in server.xml (see the Tomcat 6.0 online docs for details
about each):
socket.soReuseAddress
socket.soLingerOn
socket.soLingerTime
socket.soTimeout
socket.soTrafficClass
socket.rxBufSize
socket.txBufSize
socket.tcpNoDelay
socket.soKeepAlive
socket.ooBInline
socket.performanceConnectionTime
socket.performanceLatency
socket.performanceBandwidth
During development of 6.0.19, Filip Hanik contributed a new database
connection pool implementation for Tomcat 6 and Tomcat 7:
https://issues.apache.org/bugzilla/show_bug.cgi?id=46038
It is not active, by default in Tomcat 6. One must compile and configure it.
To download the source and binaries, go to:
http://people.apache.org/~fhanik/jdbc-pool/v1.0.7.1/
In Tomcat 6.0.21 and higher, there is a new JdbcLeakPrevention class that
prevents a major memory leak on webapp reloads, caused by the JDK's JDBC
code hanging onto JDBC driver references.



