I guess the only solution is to create a singleton which you store as member variable.
@Stateless
public class MyBean {
private CacheManager cacheManager;
@PostConstruct
public void initialize() {
cacheManager = CacheManager.getInstance();
}
}
public class CacheManager {
private static CacheManager instance;
public synchronized getInstance() {
if (instance == null) {
instance = new CacheManager()
}
return instance;
}
}