public ManagedContainer(Object id, SecurityService securityService) throws SystemException {
this.cache = new SimpleCache<Object, Instance>(null, new SimplePassivater(), 1000, 50, new Duration("1 hour"));
this.containerID = id;
this.securityService = securityService;
cache.setListener(new StatefulCacheListener());
sessionContext = new ManagedContext(securityService, new ManagedUserTransaction(new EjbUserTransaction(), entityManagerRegistry));
}