Package org.apache.openejb.jee

Examples of org.apache.openejb.jee.SessionConfig


    }

    @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"));
        }
View Full Code Here


            throw new DeploymentException(WebDeploymentMessageUtils.createMultipleConfigurationWebAppErrorMessage("session-config"));
        }
    }

    private CookieConfig getCookieConfig(WebApp webApp, MergeContext context) {
        SessionConfig sessionConfig = getSessionConfig(webApp, context);
        if (sessionConfig.getCookieConfig() == null) {
            sessionConfig.setCookieConfig(new CookieConfig());
        }
        return sessionConfig.getCookieConfig();
    }
View Full Code Here

        }
        return sessionConfig.getCookieConfig();
    }

    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;
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.jee.SessionConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.