I use JCS to store ldap search results that should be shared among several EJBs. I created a singleton class to initialize JCS only once, but because of the EJB classloader, it was initialized several times with its own copy. therefore, search resources are not used.
How do you guys solve the problem when you need to share the cache through multiple beans? I am looking for cache in the JVM. (Not remote, e.g. memcached, etc.).
Glassfish is used as an application server.
source
share