⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 initializationservlet.java

📁 OPIAM stands for Open Identity and Access Management. This Suite will provide modules for user & rig
💻 JAVA
字号:
/*
 * OPIAM Suite
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */

package opiam.admin.faare.struts.utils;

import opiam.admin.faare.PropertiesManager;
import opiam.admin.faare.service.services.views.ViewGenerator;
import opiam.admin.faare.struts.managers.AppliParametersManager;

import org.apache.log4j.Logger;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;


/**
 * Class which initializes an application.
 *
 */
public class InitializationServlet extends HttpServlet
{
    /**
     * @see javax.servlet.Servlet#init(ServletConfig).
     * Loads configuration and services and loads logical views names.
     */
    public void init(ServletConfig arg0) throws ServletException
    {
        super.init(arg0);

        Logger logger = Logger.getLogger(InitializationServlet.class);

        try
        {
            PropertiesManager.getInstance();
            AppliParametersManager.initialize();
            this.getServletContext().setAttribute("logicalViewNames",
                ViewGenerator.getViewNamesList());
            this.getServletContext().setAttribute("init_success", "true");
        }
        catch (RuntimeException e)
        {
            this.getServletContext().removeAttribute("init_success");
            logger.error("****************************************************");
            logger.error(
                " INITIALIZATIONSERVLET FAILED. PLEASE REBOOT THE WEBAPP !");
            logger.error("****************************************************");
            throw new ServletException("InitializationServlet failed");
        }

        logger.info("******************************************");
        logger.info(" INITIALIZATIONSERVLET ENDED SUCCESSFULLY");
        logger.info("******************************************");
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -