Caching objects in EJB and threading

What's a correct way to maintain a cache of objects queried from the database and make it available to remote clients through a SLSB?

Seems like it is very difficult to achieve this without violating EJB rules against managing threads and static variables (or by using singleton). In order to have objects shared by threads, they have to be stored in some static scope, and synchronization is a must. [ December 10, 2008: Message edited by: Justin Chu ]