Package org.huihoo.willow

Examples of org.huihoo.willow.Engine


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


   * @param engine The new Engine
   */
  public void setEngine(Engine engine)
  {

    Engine oldEngine = this.engine;
    if ((oldEngine != null))
    {
      oldEngine.setService((Service)null);
    }
   
    this.engine = engine;
   
    if ((this.engine != null) )
View Full Code Here

        {
          ;
        }
        if (!threadDone)
        {
          Engine engine=StandardEngine.this;
          ClassLoader cl = Thread.currentThread().getContextClassLoader();
         
          try
          {   
            backgroundProcess();
          }
          catch (Throwable t)
          {
            log.error("Exception invoking periodic operation: ", t);
          }
          finally
          {
            Thread.currentThread().setContextClassLoader(cl);
          }
                       
          Context[] children = engine.findChildren();
          for (int i = 0; i < children.length; i++)
          {
            if (children[i].getBackgroundProcessorDelay() <= 0)
            {
              try
View Full Code Here

   * @param engine The associated Engine
   */
  public void setEngine(Engine engine)
  {
    // Default processing provided by our superclass
    Engine oldEngine = this.engine;
    this.engine = engine;
    support.firePropertyChange("engine", oldEngine, this.engine);

    // Register with the new Engine (if any)
    if ((this.engine != null))
View Full Code Here

   *
   * @param engine The associated this
   */
  public void setEngine(Engine engine)
  {
    Engine oldEngine = this.engine;
    this.engine = engine;
    support.firePropertyChange("engine", oldEngine, this.engine);
  }
View Full Code Here

   *
   * @param engine The associated this
   */
  public void setEngine(Engine engine)
  {
    Engine oldEngine = this.engine;
    this.engine = engine;
    support.firePropertyChange("engine", oldEngine, this.engine);
  }
View Full Code Here

   */
  public void begin(Attributes attributes) throws Exception
  {
    Context child = (Context) digester.peek(0);
    EngineDeployer parent = (EngineDeployer) digester.peek(1);
    Engine engine = null;
    if (!(parent instanceof StandardEngine))
    {
      Method method = parent.getClass().getMethod("getEngine", null);
      engine = (Engine) method.invoke(parent, null);
    }
    else
    {
      engine=(Engine)parent;
    }

    File engineBase =engine.getAbsoluteEngineBase();

    String appBase = child.getAppBase();
    if (appBase == null)
    {
      // Trying to guess the appBase according to the name
View Full Code Here

   */
  public void setEngine(Engine engine)
  {
    super.setParent(engine);

    Engine oldEngine = this.engine;
    this.engine = engine;
    support.firePropertyChange("engine", oldEngine, this.engine);
  }
View Full Code Here

    String absolute_appBase = getAppBase();
    File absolute_appBaseFile = new File(absolute_appBase);

    if (!absolute_appBaseFile.isAbsolute())
    {
      Engine parent = (Engine) this.getParent();
      absolute_appBaseFile = new File(parent.getAbsoluteEngineBase(), absolute_appBase);
    }

    return (absolute_appBaseFile);
  }
View Full Code Here

TOP

Related Classes of org.huihoo.willow.Engine

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.