<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    江蘇520

    江蘇520

    常用鏈接

    統計

    最新評論

    #

    Tomcat 6.0.20

    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/

    posted @ 2009-05-17 20:12 江蘇520| 編輯 收藏

    Fire Workflow 介紹

       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代表實際的業務邏輯。

    posted @ 2009-05-16 22:04 江蘇520| 編輯 收藏

    集成struts2 spring hibernate的實例

    集成struts,spring,hibernate時,對于初學者來說最大的麻煩就其繁瑣的xml配置文件。現在三者都對基于注解的配置提供了良好的支持。在struts2中,使用convent plugin,得益于annotation和規約,配置過程得以大大減少。在spring2.5也可以使用@Autowired,進行注入,使用@Controller,@Service,@Repository注解,自動定義bean,還支持annotation風格的聲明式事務支持,以及aspectJ類似的AOP。hibernate也可以使用JPA標準注解定義實體描述,避免使用mapping文件。

    當然,對于annotation和xml風格的配置,誰更好,更多依賴個人興趣。但使用annotation確實減少了很多配置工作量。本文采用annotation風格的配置,以TaskList為例子講解struts2 spring hibernate的集成。項目文件見附件。

    一:配置struts2。

    首先在web.xml文件中配置filter

    <filter>  
        
    <filter-name>struts2</filter-name>  
        
    <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>  
    </filter>  
      
    <filter-mapping>  
        
    <filter-name>struts2</filter-name>  
        
    <url-pattern>*.action</url-pattern>  
    </filter-mapping>  

    然后在classpath中創建struts.xml配置文件。

    <?xml version="1.0" encoding="UTF-8"?>  
    <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"   
            " http://www.bt285.cn /dtds/struts-2.1.dtd"
    >  
    <struts>  
        
    <constant name="struts.devMode" value="true" />  
        
    <constant name="struts.convention.default.parent.package" value="default-package" />  
        
    <constant name="struts.convention.package.locators" value="action" />  
        
    <package name="default-package" extends="convention-default">  
      
            
    <default-action-ref name="index" />  
      
            
    <action name="index"  >  
                
    <result>http://www.5a520.cn /WEB-INF/content/index.jsp</result>  
            
    </action>    
      
        
    </package>  
    </struts>  

     

    struts.devMode屬性,配置啟用調試,將有更多的錯誤信息輸出,便于排錯。struts.convention.default.parent.package屬性,指定使用注解標注的控制器的默認包。可以在這個默認包中配置全局信息。

    struts.convention.package.locators屬性,為查找控制器包路徑的關鍵字。如com.mycompany.action,com.mycompany.action.user,都會被struts2掃描。里面有繼承至Action的類,或類名以Action結尾的類,都會做為Action處理。

    <default-action-ref name="index" />指定了默認action,如果指定的action不存在則訪問該action。

    把struts2-spring-plugin-2.1.6.jar添加到classpath中,struts2會自動掃描struts-plugin.xml文件,該文件自動注冊了com.opensymphony.xwork2.ObjectFactory,完成和spring的集成。

    二:配置spring

    在web.xml中加入ContextLoaderListener,用以啟動spring容器。用contextConfigLocation指定spring配置文件路徑,可以使用*通配符結尾。

     

    <listener>  
        
    <listener-class>org.springframework.web.context.ContextLoaderListener   
        
    </listener-class>  
    </listener>  
    <context-param>  
        
    <param-name>contextConfigLocation</param-name>  
        
    <param-value>http://www.bt285.cn :/applicationContext.xml</param-value>  
    </context-param> 

    配置applicationContext.xml

    <?xml version="1.0" encoding="UTF-8"?>  
    <beans>  
      
        
    <context:component-scan base-package="persistence,service,action,aop"/>  
           
        
    <aop:aspectj-autoproxy  />  
      
        
    <tx:annotation-driven transaction-manager="transactionManager" />  
           
        
    <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager" >  
            
    <property name="sessionFactory" ref="sessionFactory" />  
        
    </bean>  
      
        
    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean" >       
            
    <property name="configLocation" value="classpath:hibernate.cfg.xml" />  
        
    </bean>  
      
        
    <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate" >  
            
    <property name="sessionFactory" ref="sessionFactory" />  
        
    </bean>  
           
    </beans>  

    <context:component-scan />指定Bean掃描的包,多個包逗號隔開,任何標注了@Component,@Controller,@Service,@Repository的類,都會被自動識別為bean。

    <aop:aspectj-autoproxy />聲明aspectj動態代理,啟用注解驅動的aspectj配置。

    <tx:annotation-driven />啟用注解驅動的聲明事務支持。

    然后定義了sessionFactory和transactionManager,hibernateTemplate用來注入到Dao中,取代繼承的方式使用spring對hibernate的集成支持。

    三:hibernate配置

    hibernate配置獨立配置,方便修改。

     

    <?xml version="1.0" encoding="UTF-8"?>  
    <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">  
    <hibernate-configuration>  
        
    <session-factory>  
            
    <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>  
            
    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>  
            
    <property name="hibernate.connection.url">jdbc:mysql:// http://www.feng123.com :3306/sshdemo</property>  
            
    <property name="hibernate.connection.username">root</property>  
            
    <property name="hibernate.connection.password">root</property>  
            
    <property name="hibernate.hbm2ddl.auto">update</property>  
            
    <property name="hibernate.show_sql">true</property>  
            
    <property name="hibernate.format_sql">true</property>  
            
    <property name="hibernate.current_session_context_class">thread</property>         
      
            
    <!-- 最大連接數 -->  
            
    <property name="hibernate.c3p0.max_size">20</property>  
            
    <!-- 最小連接數 -->  
            
    <property name="hibernate.c3p0.min_size">5</property>  
            
    <!-- 獲得連接的超時時間,如果超過這個時間,會拋出異常,單位毫秒 -->  
            
    <property name="hibernate.c3p0.timeout">120</property>  
            
    <!-- 最大的PreparedStatement的數量 -->  
            
    <property name="hibernate.c3p0.max_statements">100</property>  
            
    <!-- 每隔120秒檢查連接池里的空閑連接 ,單位是秒-->  
            
    <property name="hibernate.c3p0.idle_test_period">120</property>  
            
    <!-- 當連接池里面的連接用完的時候,C3P0一下獲取的新的連接數 -->  
            
    <property name="hibernate.c3p0.acquire_increment">2</property>  
            
    <!-- 每次都驗證連接是否可用 -->  
            
    <property name="hibernate.c3p0.validate">true</property>  
      
            
    <mapping class="domain.Task" />  
        
    </session-factory>  
    </hibernate-configuration>  


     

     

    posted @ 2009-05-14 17:40 江蘇520| 編輯 收藏

    我的常用分頁類

         摘要: package yourpackage;    import java.util.ArrayList;       /** *//**    * 分頁信息    * jdk 1.4 ...  閱讀全文

    posted @ 2009-05-13 16:54 江蘇520| 編輯 收藏

    僅列出標題
    共2頁: 上一頁 1 2 
    主站蜘蛛池模板: 亚洲av综合av一区二区三区 | sihu国产精品永久免费| 毛片免费全部免费观看| 亚洲欧洲国产视频| 免费成人福利视频| 亚洲av无码一区二区三区观看| 1000部拍拍拍18勿入免费视频软件 | 中国在线观看免费的www| 亚洲男女内射在线播放| 免费在线观看亚洲| 日韩毛片免费一二三| 亚洲精品第一国产综合精品99| 一级毛片免费不卡| 亚洲精品国产精品乱码不99| 在线观看肉片AV网站免费| 亚洲一二成人精品区| 在线a免费观看最新网站| 中文字幕无码亚洲欧洲日韩| 无码国模国产在线观看免费| 国产在亚洲线视频观看| 久久久久国产成人精品亚洲午夜 | 你是我的城池营垒免费观看完整版| 亚洲中文字幕不卡无码| 99精品视频在线视频免费观看| 亚洲精品国产电影午夜| 色婷婷7777免费视频在线观看| 亚洲heyzo专区无码综合| 亚洲五月午夜免费在线视频| 免费成人在线视频观看| 亚洲五月丁香综合视频| 夜色阁亚洲一区二区三区 | 2021在线观看视频精品免费| 亚洲www在线观看| 亚洲综合区小说区激情区| 好紧我太爽了视频免费国产| 亚洲三级高清免费| 亚洲女人被黑人巨大进入| 久久午夜羞羞影院免费观看| 亚洲日本乱码卡2卡3卡新区| 亚洲一区精品伊人久久伊人| 最近最好最新2019中文字幕免费 |