Java

本类阅读TOP10

·使用MyEclipse开发Struts框架的Hello World!(录像1)
·hibernate配置笔记
·AOP编程入门--Java篇
·linux下Tomcat 5.0.20 与 Apache 2 安装/集成/配置
·在win2003下整合了整合Tomcat5.5+ apache_2.0.53+ mod_jk_2.0.47.dll
·构建Linux下IDE环境--Eclipse篇
·Jsp 连接 mySQL、Oracle 数据库备忘(Windows平台)
·ASP、JSP、PHP 三种技术比较
·Tomcat5.5.9的安装配置
·AWT GUI 设计笔记(二)

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
WebSphere Application Server Best Practices

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

1 WebSphere Application Server Best Practices – Overview

这个文档描述了在开发基于servletsJSPJDBCEJB等技术的WEB Application的过程中的最佳实践。下表列出了这些最佳时间,并以从15的等级来标识这些实践对性能的影响程度和发生的频率等。

 

Category

Best Practice Number and Description

Importance

Servlets

1. Do not store large object graphs in HttpSession

2

Servlets

2. Release HttpSessions when finished

3

JSP Files

3. Do not create HttpSessions in JSPs by default

4

Servlets

4. Minimize synchronization in Servlets

2

Servlets

5. Do not use SingleThreadModel

5

All web and enterprise application components

6. Use JDBC connection pooling

3

All web and enterprise application components

7. Reuse datasources for JDBC connections

1

All web and enterprise application components

8. Release JDBC resources when done

3

Servlets

9. Use the HttpServlet Init method to perform expensive

operations that need only be done once

4

All web and enterprise application components

10. Minimize use of System.out.println

 

2

All web and enterprise application components

11. Avoid String concatenation “+=”

 

1

Enterprise beans

12. Access entity beans from session beans

 

3

Enterprise beans

13. Reuse EJB homes

1

Enterprise beans

14. Use “Read-Only” methods where appropriate

 

3

Enterprise beans

15. Reduce the transaction isolation level where appropriate

 

5

Enterprise beans

16. EJBs and Servlets - same JVM - “No local copies”

 

2

Enterprise beans

17. Remove stateful session beans when finished

 

2

Servlets

18. Don’t use Beans.instantiate() to create new bean

instances

3

 

对于每个实践,本文档提供了以下的内容:

1、描述和简要的背景介绍。

2一段需要避免的代码片断。

3一段最佳时间的实例代码片断。

4、通过列举最佳实践的益处来对其性能作比较。

 

对于开发者而言,要想开发出高性能的WEB Application的话除了上面列出的最佳实践之外还要掌握良好的Java语言构建技巧,在Bibliography – Additional References 部分可以到找到相应的参考。




相关文章

相关软件