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;
this.pm = ejbContainer.getDeployment().getPersistenceManagerFactoryRegistry().getPersistenceManagerFactory(
pmConfig.value()).createPersistenceManager();
pm.initialize(container);
CacheConfig config = (CacheConfig) advisor.resolveAnnotation(CacheConfig.class);
maxSize = config.maxSize();
sessionTimeout = config.idleTimeoutSeconds();
removalTimeout = config.removalTimeoutSeconds();