Java开发网 |
注册 |
登录 |
帮助 |
搜索 |
排行榜 |
发帖统计
|
您没有登录 |
» Java开发网 » Java EE 综合讨论区
打印话题 寄给朋友 订阅主题 |
作者 | [Site] Java Performance Tuning |
SNIX
发贴: 43 积分: 30 |
于 2003-12-19 19:54
http://www.javaperformancetuning.com/tips/j2ee_ejb.shtml http://www.ddjembedded.com/resources/articles/2001/0112g/0112g.htm Balancing Network Load with Priority Queues (Page last updated December 2001, Added 2002-02-22, Author Frank Fabian, Publisher Dr. Dobb's). Tips: [Note that Java application servers often do not show a constant service time. Instead the service time often increases with higher concurrency due to non-linear effects of garbage collection]. http://www.javareport.com/html/from_pages/article.asp?id=252 Detailed article on load testing systems (Page last updated January 2001, Added 2001-01-19, Author Himanshu Bhatt, Publisher Java Report). Tips: Logging and stateful EJB can degrade performance. http://www.sys-con.com/java/article.cfm?id=671 J2EE Application server performance (Page last updated April 2001, Added 2001-04-20, Author Misha Davidson, Publisher Java Developers Journal). Tips: Good performance has sub-second latency (response time) and hundreds of (e-commerce) transactions per second. For read-only queries involving large amounts of data, avoid EJB objects and use JavaBeans as an intermediary to access manipulate and store the data for JSP access. Use stateless session EJBs to cache and manage infrequently changed data. Update the EJB occasionally. Use a dedicated session bean to perform and cache all JNDI lookups in a minimum number of requests. http://developer.java.sun.com/developer/technicalArticles/ebeans/ejbperformance/ Designing Entity Beans for Improved Performance (Page last updated March 2001, Added 2001-03-21, Author Beth Stearns, Publisher Sun). Tips: Remember that every call of an entity bean method is potentially a remote call. Designing with one access method per data attribute should only be used where remote access will not occur, i.e. entities are guaranteed to be in the same container. Use a value object which encapsulates all of an entity's data attributes, and which transfers all the data in one network transfer. This may result in large objects being transferred though. Group entity bean data attributes in subsets, and use multiple value objects to provide remote access to those subsets. http://www-4.ibm.com/software/webservers/appserv/ws_bestpractices.pdf Paper detailing the "Best Practices for Developing High Performance Web and Enterprise Applications" using IBM's WebSphere. All the tips are generally applicable to servlet/EJB development, as well as other types of server development. (Page last updated September 2000, Added 2001-01-19, Author Harvey W. Gunther, Publisher IBM). Tips: Access entity beans from session beans, not from client or servlet code. Reuse EJB homes. Use Read-Only methods where appropriate in entity-beans to avoid unnecessary invocations to store. The EJB "remote programming" model always assumes EJB calls are remote, even where this is not so. Where calls are actually local to the same JVM, try to use calling mechanisms that avoid the remote call. Remove stateful session beans (and any other unneeded objects) when finished with, to avoid extra overheads in case the container needs to be passivated. Beans.instantiate() incurs a filesystem check to create new bean instances. Use "new" to avoid this overhead. http://www.onjava.com/pub/a/onjava/2002/04/03/javaenterprise_tips.html J2EE worst practices (Page last updated April 2002, Added 2002-04-26, Author Brett McLaughlin, Publisher OnJava). Tips: Stateless session beans are soooo much faster. http://www.weblogic.com/docs51/admindocs/tuning.html Weblogic tuning (generally applicable Java tips extracted) (Page last updated June 2000, Added 2001-03-21, Author BEA Systems, Publisher BEA). Tips: Try to avoid excessive cycling (creation/deletion or activation/passivation) of beans. http://www.sys-con.com/java/article.cfm?id=1171 J2EE Performance tuning (Page last updated October 2001, Added 2001-10-22, Author James McGovern, Publisher Java Developers Journal). Tips: Always access entity beans from session beans. If only using an entity bean for data access, use JDBC directly instead. Use read-only in the deployment descriptor. Cache access to EJB homes. Use local entity beans when beans are co-located in the same JVM. Proprietary stubs can be used for caching and batching data. Use a dedicated remote object to generate unique primary keys. |
话题树型展开 |
人气 | 标题 | 作者 | 字数 | 发贴时间 |
2855 | [Site] Java Performance Tuning | SNIX | 4419 | 2003-12-19 19:54 |
已读帖子 新的帖子 被删除的帖子 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |