}
}
// Discover Factories
BeanManagerFactory beanManagerFactory = null;
BridgeRequestScopeManagerFactory bridgeRequestScopeManagerFactory = null;
try {
beanManagerFactory = (BeanManagerFactory) FactoryExtensionFinder.getFactory(BeanManagerFactory.class);
bridgeRequestScopeManagerFactory = (BridgeRequestScopeManagerFactory) FactoryExtensionFinder.getFactory(
BridgeRequestScopeManagerFactory.class);
}
catch (BridgeException e) {
logger.debug("Unable to discover factories because portlet never received a RenderRequest");
}
if ((beanManagerFactory != null) && (bridgeRequestScopeManagerFactory != null)) {
// Cleanup instances of BridgeRequestScope that are associated with the expiring session.
HttpSession httpSession = httpSessionEvent.getSession();
BridgeRequestScopeManager bridgeRequestScopeManager =
bridgeRequestScopeManagerFactory.getBridgeRequestScopeManager();
bridgeRequestScopeManager.removeBridgeRequestScopesBySession(httpSession);
// For each session attribute:
String appConfigAttrName = ApplicationConfig.class.getName();
ServletContext servletContext = httpSession.getServletContext();