#
Tomcat是Apache 软件基金会(Apache Software Foundation)的Jakarta 项目中的一个核心项目,由Apache、Sun 和其他一些公司及个人共同开发而成.由于有了Sun 的参与和支持,最新的Servlet 和JSP 规范总是能在Tomcat 中得到体现,因为Tomcat 技术先进、性能稳定,而且免费,因而深受Java 爱好者的喜爱并得到了部分软件开发商的认可,成为目前比较流行的Web 应用服务器.Tomcat 很受广大程序员的喜欢,因为它运行时占用的系统资源小,扩展性好,支持负载平衡与邮件服务等开发应用系统常用的功能;而且它还在不断的改进和完善中,任何一个感兴趣的程序员都可以更改它或在其中加入新的功能.
下载:Tomcat 6.0.20
Apache Tomcat Version 6.0.20
Release Notes
=============================
KNOWN ISSUES IN THIS RELEASE:
=============================
* Dependency Changes
* JNI Based Applications
* Bundled APIs
* Web application reloading and static fields in shared libraries
* Tomcat on Linux
* Enabling SSI and CGI Support
* Security manager URLs
* Symlinking static resources
* Enabling invoker servlet
* Viewing the Tomcat Change Log
* When all else fails
http://www.bt285.cn
http://www.feng123.com
===================
Dependency Changes:
===================
Tomcat 6.0 is designed to run on JSE 5.0 and later.
In addition, Tomcat 6.0 uses the Eclipse JDT Java compiler for compiling
JSP pages. This means you no longer need to have the complete
Java Development Kit (JDK) to run Tomcat, but a Java Runtime Environment
(JRE) is sufficient. The Eclipse JDT Java compiler is bundled with the
binary Tomcat distributions. Tomcat can also be configured to use the
compiler from the JDK to compile JSPs, or any other Java compiler supported
by Apache Ant.
=======================
JNI Based Applications:
=======================
Applications that require native libraries must ensure that the libraries have
been loaded prior to use. Typically, this is done with a call like:
static {
System.loadLibrary("path-to-library-file");
}
in some class. However, the application must also ensure that the library is
not loaded more than once. If the above code were placed in a class inside
the web application (i.e. under /WEB-INF/classes or /WEB-INF/lib), and the
application were reloaded, the loadLibrary() call would be attempted a second
time.
To avoid this problem, place classes that load native libraries outside of the
web application, and ensure that the loadLibrary() call is executed only once
during the lifetime of a particular JVM.
=============
Bundled APIs:
=============
A standard installation of Tomcat 6.0 makes all of the following APIs available
for use by web applications (by placing them in "lib"):
* annotations-api.jar (Annotations package)
* catalina.jar (Tomcat Catalina implementation)
* catalina-ant.jar (Tomcat Catalina Ant tasks)
* catalina-ha.jar (High availability package)
* catalina-tribes.jar (Group communication)
* el-api.jar (EL 2.1 API)
* jasper.jar (Jasper 2 Compiler and Runtime)
* jasper-el.jar (Jasper 2 EL implementation)
* jasper-jdt.jar (Eclipse JDT 3.3 Java compiler)
* jsp-api.jar (JSP 2.1 API)
* servlet-api.jar (Servlet 2.5 API)
* tomcat-coyote.jar (Tomcat connectors and utility classes)
* tomcat-dbcp.jar (package renamed database connection pool based on Commons DBCP)
You can make additional APIs available to all of your web applications by
putting unpacked classes into a "classes" directory (not created by default),
or by placing them in JAR files in the "lib" directory.
To override the XML parser implementation or interfaces, use the endorsed
mechanism of the JVM. The default configuration defines JARs located in
"endorsed" as endorsed.
================================================================
Web application reloading and static fields in shared libraries:
================================================================
Some shared libraries (many are part of the JDK) keep references to objects
instantiated by the web application. To avoid class loading related problems
(ClassCastExceptions, messages indicating that the classloader
is stopped, etc.), the shared libraries state should be reinitialized.
Something which might help is to avoid putting classes which would be
referenced by a shared static field in the web application classloader,
and putting them in the shared classloader instead (JARs should be put in the
"lib" folder, and classes should be put in the "classes" folder).
================
Tomcat on Linux:
================
GLIBC 2.2 / Linux 2.4 users should define an environment variable:
export LD_ASSUME_KERNEL=2.2.5
Redhat Linux 9.0 users should use the following setting to avoid
stability problems:
export LD_ASSUME_KERNEL=2.4.1
There are some Linux bugs reported against the NIO sendfile behavior, make sure you
have a JDK that is up to date, or disable sendfile behavior in the Connector.<br/>
6427312: (fc) FileChannel.transferTo() throws IOException "system call interrupted"<br/>
5103988: (fc) FileChannel.transferTo should return -1 for EAGAIN instead throws IOException<br/>
6253145: (fc) FileChannel.transferTo on Linux fails when going beyond 2GB boundary<br/>
6470086: (fc) FileChannel.transferTo(2147483647, 1, channel) cause "Value too large" exception<br/>
=============================
Enabling SSI and CGI Support:
=============================
Because of the security risks associated with CGI and SSI available
to web applications, these features are disabled by default.
To enable and configure CGI support, please see the cgi-howto.html page.
To enable and configue SSI support, please see the ssi-howto.html page.
======================
Security manager URLs:
======================
In order to grant security permissions to JARs located inside the
web application repository, use URLs of of the following format
in your policy file:
file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar
============================
Symlinking static resources:
============================
By default, Unix symlinks will not work when used in a web application to link
resources located outside the web application root directory.
This behavior is optional, and the "allowLinking" flag may be used to disable
the check.
=========================
Enabling invoker servlet:
=========================
Starting with Tomcat 4.1.12, the invoker servlet is no longer available by
default in all webapps. Enabling it for all webapps is possible by editing
$CATALINA_HOME/conf/web.xml to uncomment the "/servlet/*" servlet-mapping
definition.
Using the invoker servlet in a production environment is not recommended and
is unsupported. More details are available on the Tomcat FAQ at
http://tomcat.apache.org/faq/misc.html#invoker.
==============================
Viewing the Tomcat Change Log:
==============================
See changelog.html in this directory.
====================
When all else fails:
====================
See the FAQ
http://tomcat.apache.org/faq/
2009-02-02日 Fire Workflow 的Eclispe设计器插件上传到google code ,并有较详细的文档(2_通过设计器和模拟器快速了解Fire Workflow.pdf,3_各种工作流模式的实现.pdf)。
请到http://code.google.com/p/fireflow下载。
镜像:http://www.bt285.cn http://www.5a520.cn
Fire workflow FAQ
1、为什么要写Fire Workflow
本人从事企业MIS系统开发很多年头了,感觉MIS系统很多领域都有比较好的解决方案并已成为事实标准,例如Spring,Hibernate等等;然而工作流还没有令人满意的开源产品。我了解过的工作流产品(主要是开源的,收费产品没有什么研究,仅仅看看其白皮书而已)都存在如下毛病:
- 缺乏严密的理论做支撑,工作流模型大多千篇一律地照搬WfMC的xpdl,
- 因为缺乏理论支撑,所以工作流引擎的算法有点七拼八凑,扩展性也比较差。
- 没有好的设计器,应用比较困难
最近研究并应用了一下JBoss的Jbpm,除了其面向图的引擎算法让我眼前一亮外,其他的也不是令人满意。其引擎的扩展性不好,表结构太复杂,在大数据量系统中,性能令人堪忧。
鉴于此,我动手写了一个Fire Workflow,抛砖引玉。
2、Fire Workflow的定位
我从来不认为工作流可以“自定义”,所以Fire Workflow是面向开发人员的。Fire Workflow和Spring、Hibernate一样,是一个或几个普普通通的jar包,嵌入到系统中,用以解决系统开发中工作流领域的问题。
因为Fire Workflow是面向开发人员的,所以在下面两个方面花了较大功夫。
- 流程设计器。Fire Workflow用于帮助开发人员解决系统中的流程问题,所以好的流程设计器有助于开发人员提高开发效率。Fire Workflow设计器和主流IDE紧密集成(目前有Eclipse插件和NetBeans插件),使得开发人员开发调试流程就像开发调试一个普通java类一样简单。
- 工作流引擎。Fire Workflow引擎设计充分考虑扩展性,因为业务系统的需求五花八门,所以一个写的很死的引擎必然没有生命力。Fire Workflow引擎的各种服务都可以扩展或者替换。
Fire Workflow虽然不认可流程“自定义”需求,但是并不否认用户有调整业已存在的流程的需求,而且这种需求还比较普遍。所以Fire Workflow计划提供Web界面,让最终用户的系统管理员在一定范围内调整流程。
3、Fireflow的特点
理论严密
Fire Workflow以Petri Net作为理论基础,流程的顺序流转、分支、汇聚、跳转等算法都有定义/定理为依据。
设计合理
Fire workflow将工作流引擎的职责分解委派到各种服务中,每中服务都可以被扩展或者替换。
应用简单
Fire workflow的API以及数据库表结构非常简单。
性能优良
Fire workflow着重在流程实例的数据量,数据库IO等方面进行性能优化。
4、Fireflow的构成
Fire Workflow由模型、引擎、设计器(包含模拟器)三部分组成。
- 模型部分规定了流程定义文件的各种元素及其相互关系,例如流程(WorkflowProcess)、活动(Activity)、转移(Transition)、开始节点(StartNode)、结束节点(EndNode)、同步器(Synchronizer)。模型部分的实现在org-fireflow-model.jar中。
- 引擎读取流程定义文件并解释执行。引擎提供一组对象和相关的API供外部系统调用,如流程实例(ProcessInstance)、任务实例(TaskInstance)、工单(WorkItem)、事件等等。引擎部分的实现在org-fireflow-engine.jar中。
- 设计器编辑并输出流程定义文件。Fire Workflow的设计器附带了强大的模拟器,可以在设计时模拟流程的执行,从而检查流程定义的正确性。
此处附带解释一下我的一个观点:我认为,流程定义文件和java文件一样,是应用系统源代码的一部分。因此,流程设计器做成了当前流行的IDE的插件,便于开发人员进行流程开发。而且每个流程单独一个定义文件,就像每个java类在通常情况下单独一个文件一样。
5、Fire Workflow的流程定义语言为什么不使用Xpdl
本人认为Xpdl好看不好用。
相较于Xpdl,Fire workflow 的流程定义语言主要做了如下变动。
- 废除Package的概念:在我看来一个流程一个文件比较方便开发,流程定义文件在某中程度上和java类文件一样,是系统源代码的一部分
- 废除全局和局部的概念:在xpdl中有全局DataField和局部DataField区分,实际上其作用不大。
- 增加同步器节点:Fire Workflow将流程中的节点分成两类 ,即Acitivyt和Sychronizer(Start Node和End Node是synchronizer的特例)。这两类节点分别代表了业务子系统的逻辑操作和工作流子系统的逻辑操作。
- 增加Task元素:一个Activity可以包含多个Task,Task代表实际的业务逻辑。
摘要: package yourpackage;
import java.util.ArrayList;
/** *//**
* 分页信息
* jdk 1.4 ...
阅读全文