avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/kernel/impl DefaultKernel.java
Date Thu, 27 Feb 2003 23:47:35 GMT
mcconnell    2003/02/27 15:47:35

  Modified:    merlin/src/java/org/apache/avalon/merlin/kernel/impl
                        DefaultKernel.java
  Log:
  Addition of a context argument holding the system directory.
  
  Revision  Changes    Path
  1.13      +16 -6     avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/kernel/impl/DefaultKernel.java
  
  Index: DefaultKernel.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/kernel/impl/DefaultKernel.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DefaultKernel.java	19 Feb 2003 11:54:02 -0000	1.12
  +++ DefaultKernel.java	27 Feb 2003 23:47:35 -0000	1.13
  @@ -180,6 +180,11 @@
       */
       private File m_home;
   
  +   /**
  +    * The system directory for resolving system extensions.
  +    */
  +    private File m_root;
  +
       /**
        * Logging channel for the container.
        */
  @@ -295,6 +300,7 @@
       public void contextualize( Locator context ) throws ContextException
       {
           m_home = (File) context.get( "urn:merlin:home" );
  +        m_root = (File) context.get( "urn:merlin:system" );
           m_common = (ClassLoader) context.get( "urn:merlin:classloader.common" );
           m_loader = (ClassLoader) context.get( "urn:merlin:classloader.system" );
           m_url = (URL) context.get( "urn:merlin:block.url" );
  @@ -399,8 +405,7 @@
           catch( Throwable e )
           {
               final String error = 
  -              "Bootstrap engine establishment error.  Extension path: " 
  -              + System.getProperty("java.ext.dirs");
  +              "Engine establishment error.";
               String log = ExceptionHelper.packException( error, e );
               if( getLogger().isErrorEnabled() )
               {
  @@ -643,8 +648,7 @@
               getLogger().debug( "bootstrap engine" );
           }
   
  -        LibraryDescriptor extensions =
  -          CREATOR.createLibraryDescriptor( config.getChild( "library" ) );
  +        Configuration lib = config.getChild( "library", false );
   
           ClasspathDescriptor classpath = 
             CREATOR.createClasspathDescriptor( config.getChild( "classpath" ) );
  @@ -657,11 +661,17 @@
               DefaultLocator context = new DefaultLocator( system );
               context.put( "urn:assembly:engine.bootstrap", "true" );
               context.put( "urn:assembly:engine.base", m_url );
  -            context.put( "urn:assembly:engine.extensions", extensions );
  +            if( lib != null )
  +            {
  +                LibraryDescriptor extensions =
  +                  CREATOR.createLibraryDescriptor( config.getChild( "library" ) );
  +                context.put( "urn:assembly:engine.extensions", extensions );
  +            }
               context.put( "urn:assembly:engine.classpath", classpath );
               context.put( "urn:assembly:logging.manager", logging );
               context.put( "urn:assembly:threads.manager", pool );
               context.put( "urn:assembly:home", m_home );
  +            context.put( "urn:assembly:system", m_root );
               context.makeReadOnly();
               engine.contextualize( context );
               engine.initialize();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message