Search in sources :

Example 1 with VelocityEngine

use of voldemort.server.http.gui.VelocityEngine in project voldemort by voldemort.

the class VoldemortServletContextListener method contextInitialized.

public void contextInitialized(ServletContextEvent event) {
    try {
        logger.info("Creating application...");
        VoldemortServer server = new VoldemortServer(VoldemortConfig.loadFromEnvironmentVariable());
        event.getServletContext().setAttribute(SERVER_KEY, server);
        event.getServletContext().setAttribute(SERVER_CONFIG_KEY, server.getVoldemortConfig());
        event.getServletContext().setAttribute(VELOCITY_ENGINE_KEY, new VelocityEngine(VOLDEMORT_TEMPLATE_DIR));
        server.start();
        logger.info("Application created.");
    } catch (ConfigurationException e) {
        logger.info("Error loading voldemort server:", e);
        throw e;
    } catch (Exception e) {
        logger.error("Error loading voldemort server:", e);
        throw new ConfigurationException(e);
    }
}
Also used : VelocityEngine(voldemort.server.http.gui.VelocityEngine) ConfigurationException(voldemort.utils.ConfigurationException) VoldemortServer(voldemort.server.VoldemortServer) ConfigurationException(voldemort.utils.ConfigurationException)

Aggregations

VoldemortServer (voldemort.server.VoldemortServer)1 VelocityEngine (voldemort.server.http.gui.VelocityEngine)1 ConfigurationException (voldemort.utils.ConfigurationException)1