}
ModuleManagementFacade moduleManagementFacade = WebServletUtils.getModuleManagementFacade(servletContext);
if (moduleManagementFacade != null) {
Application application = moduleManagementFacade.getApplicationManager().getApplication(applicationId);
RuntimeModule currentModuleContext = application.getModuleStateHolder().getModule(moduleName);
if (currentModuleContext != null) {
return new StateProtectingHttpSession(session, webAttributeQualifier, applicationId, moduleName, currentModuleContext.getClassLoader());
} else {
logger.warn("No module application context associated with module: " + moduleName + ". Using unwrapped session");