title: Caching objects in EJB 3.0
body: <p>Which programming pattern (and product) I should use to create a generic in-memory object cache in EJB 3.0 stateless session bean? </p>
  
  <p>Does use of static member variables or singleton pattern cause any side-effects in clustered environment, if cache is not required to be coherent?</p>
  
  <p>Data to be cached is acquired from JDBC datasources (JPA is not an option) and web services. The amount of data to be cached is few megabytes. The cache must provide very fast reads and therefore I would prefer that the solution should be running inside the JVM that the application is using.</p>