Say what you want about big bloated Websphere, but the developer
resources, redbooks, white papers, etc. on the
Websphere and
DeveloperWorks sites are
great. After I wrote most of my WROX JSP chapter on performance,
I found a very helpful white paper on
Websphere
Development Best Practices for Performance and Scalability (340kb
PDF). As far as I can tell, the best practices apply to any J2EE
application server, not just Websphere. Many of the
recommendations apply to EJB applications only, but there are also a
good number that apply to plain-old Servlet/JSP apps, for example:
- Don't store too much in each session
- Don't create sessions at all if you can avoid it
- Use database connection pooling
- Avoid string concatenation
- Minimize thread synchronization
- Don't use SingleThreadedModel
I had already covered most of the areas mentioned in the white paper,
except the thread synchronization and string concatenation tips. I'll add those too. I'm not sure why they don't mention page caching.