sgoeschl    2004/12/13 04:59:16

  Modified:    testcontainer/src/java/org/apache/fulcrum/testcontainer
                        YAAFIContainer.java
  Log:
  Providing "urn:avalon:temp" since this is required for a few Avalon 
components.
  
  Revision  Changes    Path
  1.3       +20 -19    
jakarta-turbine-fulcrum/testcontainer/src/java/org/apache/fulcrum/testcontainer/YAAFIContainer.java
  
  Index: YAAFIContainer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-fulcrum/testcontainer/src/java/org/apache/fulcrum/testcontainer/YAAFIContainer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- YAAFIContainer.java       1 Nov 2004 13:29:22 -0000       1.2
  +++ YAAFIContainer.java       13 Dec 2004 12:59:16 -0000      1.3
  @@ -32,25 +32,25 @@
    * This is a simple YAAFI based container that can be used in unit test
    * of the fulcrum components.
    *
  - * @author <a href="mailto:[EMAIL PROTECTED]">Siegfried Goeschl</a> 
  + * @author <a href="mailto:[EMAIL PROTECTED]">Siegfried Goeschl</a>
    */
   public class YAAFIContainer extends AbstractLogEnabled implements Container
  -{    
  +{
   
       /** Component manager */
       private ServiceContainer manager;
  -    
  +
       /** Configuration file name */
       private String configFileName;
  -    
  +
       /** Role file name */
       private String roleFileName;
  -    
  +
       /** Parameters file name */
       private String parametersFileName;
  -    
  -    
  -    /** 
  +
  +
  +    /**
        * Constructor
        */
       public YAAFIContainer()
  @@ -59,7 +59,7 @@
           this.manager = new ServiceContainerImpl();
           this.enableLogging( new ConsoleLogger( ConsoleLogger.LEVEL_DEBUG ) );
       }
  -        
  +
       /**
        * Starts up the container and initializes it.
        *
  @@ -68,16 +68,16 @@
        */
       public void startup(String configFileName, String roleFileName, String 
parametersFileName )
       {
  -        getLogger().debug("Starting container...");        
  -        
  +        getLogger().debug("Starting container...");
  +
           this.configFileName = configFileName;
           this.roleFileName = roleFileName;
           this.parametersFileName = parametersFileName;
  -        
  -        File configFile = new File(configFileName);        
  -        
  +
  +        File configFile = new File(configFileName);
  +
           if (!configFile.exists())
  -        {            
  +        {
               throw new RuntimeException(
                   "Could not initialize the container because the config file 
could not be found:" + configFile);
           }
  @@ -91,9 +91,9 @@
           {
               getLogger().error("Could not initialize the container", e);
               throw new RuntimeException("Could not initialize the container");
  -        }    
  +        }
       }
  -    
  +
       // -------------------------------------------------------------
       // Avalon lifecycle interfaces
       // -------------------------------------------------------------
  @@ -108,9 +108,10 @@
           String absolutePath = new File("").getAbsolutePath();
           context.put(COMPONENT_APP_ROOT, absolutePath);
           context.put(URN_AVALON_HOME, new File( new 
File("").getAbsolutePath() ) );
  -        
  +        context.put(URN_AVALON_TEMP, new File( 
System.getProperty("java.io.tmpdir",absolutePath) ) );
  +
           Logger logger = new ConsoleLogger( ConsoleLogger.LEVEL_DEBUG );
  -        
  +
           this.manager = ServiceManagerFactory.create(
               logger,
               this.roleFileName,
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to