#
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 ...
閱讀全文