Package org.jtalks.jcommune.model.entity

Examples of org.jtalks.jcommune.model.entity.JCommuneProperty.intValue()


    @Override
    public void sessionCreated(HttpSessionEvent se) {
        ServletContext servletContext = se.getSession().getServletContext();
        ApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
        JCommuneProperty property = (JCommuneProperty) ctx.getBean("sessionTimeoutProperty");
        int timeoutInSeconds = (int) TimeUnit.SECONDS.convert(property.intValue(), TimeUnit.MINUTES);
        if (timeoutInSeconds > 0) {
            se.getSession().setMaxInactiveInterval(timeoutInSeconds);
        } else {
            /* Zero property value should mean infinitive session.
             To disable session expiration we should pass negative value here.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.