Caching on the Web Server or in Stateful Session Beans

A very common question that comes up often when building n-tiered applications is where to cache user or application data. This question can spark debate that lasts for months and has no final agreement. Developers feel very passionate about certain topics, and this is one of them. It really shouldn’t be that controversial, however. There are really several options to choose from, depending on what type of information you are trying to cache. If you need to cache data for a particular user of the system, you can either cache it on the Web server or in a stateful session bean. There are a few other alternatives, but these are really the most obvious.

Follow this rule of thumb: If the data ...

Get Special Edition Using Enterprise JavaBeans™ 2.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.