本文整理了Java中org.apache.openejb.jee.WebApp.getSessionConfig()
方法的一些代码示例,展示了WebApp.getSessionConfig()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebApp.getSessionConfig()
方法的具体详情如下:
包路径:org.apache.openejb.jee.WebApp
类名称:WebApp
方法名:getSessionConfig
暂无
代码示例来源:origin: org.apache.geronimo.modules/geronimo-web-2.5-builder
@Override
public void preProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
if (webApp.getSessionConfig().size() == 1) {
SessionConfig sessionConfig = webApp.getSessionConfig().get(0);
mergeSessionConfig(webApp, sessionConfig, context, ElementSource.WEB_XML);
context.setAttribute("session-config", sessionConfig);
} else if (webApp.getSessionConfig().size() > 1) {
throw new DeploymentException(WebDeploymentMessageUtils.createMultipleConfigurationWebAppErrorMessage("session-config"));
}
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-web-2.5-builder
private SessionConfig getSessionConfig(WebApp webApp, MergeContext context) {
SessionConfig sessionConfig = (SessionConfig) context.getAttribute("session-config");
if (sessionConfig == null) {
sessionConfig = new SessionConfig();
webApp.getSessionConfig().add(sessionConfig);
context.setAttribute("session-config", sessionConfig);
}
return sessionConfig;
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-web-2.5-builder
private static void checkMultiplicities(WebApp webApp) throws DeploymentException {
if (webApp.getSessionConfig().size() > 1) {
throw new DeploymentException(WebDeploymentMessageUtils.createMultipleConfigurationWebAppErrorMessage("session-config"));
}
if (webApp.getJspConfig().size() > 1) {
throw new DeploymentException(WebDeploymentMessageUtils.createMultipleConfigurationWebAppErrorMessage("jsp-config"));
}
if (webApp.getLoginConfig().size() > 1) {
throw new DeploymentException(WebDeploymentMessageUtils.createMultipleConfigurationWebAppErrorMessage("login-config"));
}
}
代码示例来源:origin: org.apache.tomee/openejb-core
if (webModule.getWebApp() != null && webModule.getWebApp().getSessionConfig() != null) {
for (final SessionConfig sessionConfig : webModule.getWebApp().getSessionConfig()) {
if (sessionConfig.getSessionTimeout() != null) {
webAppInfo.sessionTimeout = sessionConfig.getSessionTimeout();
代码示例来源:origin: org.apache.geronimo.modules/geronimo-web-2.5-builder
for (SessionConfig sessionConfig: webApp.getSessionConfig()) {
SessionConfigInfo sessionConfigInfo = new SessionConfigInfo();
sessionConfigInfo.sessionTimeoutMinutes = sessionConfig.getSessionTimeout() != null? sessionConfig.getSessionTimeout(): null;
代码示例来源:origin: org.apache.geronimo.modules/geronimo-web-2.5-builder
List<SessionConfig> sessionConfigs = webApp.getSessionConfig();
if (sessionConfigs.size() > 1) {
throw new DeploymentException("Web app " + webApp.getDisplayName() + " cannot have more than one sesion-config element. Currently has " + sessionConfigs.size() + " session-config elements.");
内容来源于网络,如有侵权,请联系作者删除!