mcconnell    2004/07/08 20:37:43

  Modified:    src/java/org/apache/james/transport Loader.java
  Log:
  Put in standard context handling with fallback.
  
  Revision  Changes    Path
  1.11      +14 -7     james-server/src/java/org/apache/james/transport/Loader.java
  
  Index: Loader.java
  ===================================================================
  RCS file: /home/cvs/james-server/src/java/org/apache/james/transport/Loader.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Loader.java       30 Jan 2004 02:22:11 -0000      1.10
  +++ Loader.java       9 Jul 2004 03:37:43 -0000       1.11
  @@ -49,14 +49,21 @@
        */
       public void contextualize(final Context context) throws ContextException 
       {
  -        try 
  +        try
           {
  -            baseDirectory = ((File)context.get( "app.home") ).getCanonicalPath();
  -        } 
  -        catch (Throwable e) 
  +            baseDirectory = ((File)context.get( "urn:avalon:home") 
).getCanonicalPath();
  +        }
  +        catch( Throwable ie )
           {
  -            logger.error( "can't get base directory for mailet loader" );
  -            throw new ContextException("can't contextualise mailet loader " + 
e.getMessage(), e);
  +            try 
  +            {
  +                baseDirectory = ((File)context.get( "app.home") 
).getCanonicalPath();
  +            }
  +            catch (Throwable e ) 
  +            {
  +                logger.error( "can't get base directory for mailet loader" );
  +                throw new ContextException("can't contextualise mailet loader " + 
e.getMessage(), e);
  +            }
           }
       }
   
  
  
  

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

Reply via email to