public void initialize()

in contrib/TurbineYaafiComponentService.java [117:156]


    public void initialize() throws Exception
    {
        // get the configuration from the baseclass

        Configuration conf = this.getConfiguration();

        // if we are not running witin a servlet we get a null string here !!!

        String homePath = TurbineServlet.getRealPath ("/");

        if( homePath == null )
        {
            homePath = Turbine.getApplicationRoot();
        }

        // determine the home directory

        File home = new File(homePath);

        this.logger.info( "Using the following home : " + home.getAbsolutePath() );

        // create the configuration for YAAFI

        ServiceContainerConfiguration config = this.createServiceContainerConfiguration(conf);

        config.setLogger( this.createAvalonLogger( "yaafi" ) );
        config.setApplicationRootDir( home );

        try
        {
            this.container = ServiceContainerFactory.create(
                config
                );
        }
        catch (Throwable t)
        {
            String msg = "Initializing YAAFI failed";
            this.logger.error(msg,t);
        }
    }