Package org.huihoo.willow.startup

Examples of org.huihoo.willow.startup.Embedded


    //----------------------------------------------------------------
    //  Startup workflow engine
    //----------------------------------------------------------------
    Logger logger=new ServletContextLogger(servletContext);
    Embedded embedded=new Embedded(logger);
   
    String contextPath=servletContext.getRealPath("/");
    File  contextFile=new File(contextPath);
       
    Engine engine=embedded.createEngine();
    engine.setName(contextFile.getName());
    engine.setAutoDeploy(false);
    engine.setParentClassLoader(servletClassLoader);
   
    UserDatabaseRealm userRealm=new UserDatabaseRealm();
    engine.setRealmDatabase(userRealm);
   
    embedded.setEngine(engine);
   
    Context context=embedded.createContext(contextFile.getName(),contextFile.getAbsolutePath());
    context.setAutoDeploy(false);
    context.setReloadable(false);
    engine.addChild(context);
   
    try
    {
      embedded.start();
    }
    catch (LifecycleException ex)
    {
      ex.printStackTrace();
      throw new ServletException(ex);
View Full Code Here

TOP

Related Classes of org.huihoo.willow.startup.Embedded

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.