}
public void initialize(EJBContainer container) throws Exception
{
this.container = (StatefulContainer) container;
Advisor advisor = container.getAdvisor();
cacheMap = new CacheMap();
PersistenceManager pmConfig = (PersistenceManager) advisor.resolveAnnotation(PersistenceManager.class);
EJBContainer ejbContainer = (EJBContainer)container;
String pmConfigValue = pmConfig.value();
PersistenceManagerFactoryRegistry pmFactoryRegistry = ejbContainer.getDeployment()
.getPersistenceManagerFactoryRegistry();
PersistenceManagerFactory pmFactory = pmFactoryRegistry.getPersistenceManagerFactory(pmConfigValue);
this.pm = pmFactory.createPersistenceManager();
pm.initialize(container);
CacheConfig config = (CacheConfig) advisor.resolveAnnotation(CacheConfig.class);
maxSize = config.maxSize();
sessionTimeout = config.idleTimeoutSeconds();
removalTimeout = config.removalTimeoutSeconds();
log = Logger.getLogger(getClass().getName() + "." + container.getEjbName());
log.debug("Initializing SimpleStatefulCache with maxSize: " +maxSize + " timeout: " +sessionTimeout +