J2EE Performance tuning (Page last updated October 2001, Added
2001-10-22, Author James McGovern, Publisher Java Developers Journal).
Tips:
* Call HttpSession.invalidate() to clean up a session when you no
longer need to use it.
* For Web pages that don't require session tracking, save
resources by turning off automatic session creation using: <%@ page
session="false"%>
* Implement the HttpSessionBindingListener for all beans that are
scoped as session interface and explicitly release resources
implementing the method valueUnbound().
* Timeout sessions more quickly by setting the timeout or using
session.setMaxInactiveInterval().
* Keep-Alive may be extra overhead for dynamic sites.
* Use the include directive <%@ include file="copyleft.html" %>
where possible, as this is a compile-time directive (include action
<jsp:include page="copyleft.jsp" /> is a runtime directive).
* Use cache tagging where possible.
* 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.