Class TurbineConfig

  • All Implemented Interfaces:
    ServletConfig, ServletContext, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable
    Direct Known Subclasses:
    TurbineXmlConfig

    public class TurbineConfig
    extends Object
    implements ServletConfig, ServletContext, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.activity.Disposable
    A class used for initialization of Turbine without a servlet container.

    If you need to use Turbine outside of a servlet container, you can use this class for initialization of the Turbine servlet.

     TurbineConfig config = new TurbineConfig(".", "conf/TurbineResources.properties");
     

    All paths referenced in TurbineResources.properties and the path to the properties file itself (the second argument) will be resolved relative to the directory given as the first argument of the constructor, here - the directory where application was started. Don't worry about discarding the references to objects created above. They are not needed, once everything is initialized.

    In order to initialize the Services Framework outside of the Turbine Servlet, you need to call the init() method. By default, this will initialize the Resource and Logging Services and any other services you have defined in your TurbineResources.properties file.

    TODO Make this class enforce the lifecycle contracts
    Version:
    $Id$
    Author:
    Quinton McCombs, Rafal Krzewski, Jon S. Stevens, Daniel Rall, Henning P. Schmiedehausen, Eric Pugh