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/assembly/src/java/org/apache/avalon/assembly/engine EngineClassLoader.java
Date Mon, 17 Feb 2003 12:04:34 GMT
mcconnell    2003/02/17 04:04:34

  Modified:    assembly/src/java/org/apache/avalon/assembly/engine
                        EngineClassLoader.java
  Log:
  Modified the newInstance utility operation to take the name of the partition that is being
created.  This is used to provide the sub-partition name to the appliance repository which
in turn uses the name to establish the appliance URL.
  
  Revision  Changes    Path
  1.35      +10 -4     avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/EngineClassLoader.java
  
  Index: EngineClassLoader.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/EngineClassLoader.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- EngineClassLoader.java	16 Feb 2003 10:59:04 -0000	1.34
  +++ EngineClassLoader.java	17 Feb 2003 12:04:33 -0000	1.35
  @@ -654,6 +654,7 @@
   
      /**
       * Creation of a subsidiary engine.
  +    * @param name the name to assign to the manager
       * @param base the URL from which classpath declarations 
       *    shall be resolved
       * @param extensions the declaration of supplimentary extension directories
  @@ -661,14 +662,15 @@
       * @return the new engine
       */
       public EngineClassLoader newInstance( 
  -      URL base, LibraryDescriptor extensions, ClasspathDescriptor classpath )
  +      String name, URL base, LibraryDescriptor extensions, ClasspathDescriptor classpath
)
         throws EngineException
       {
  -        return newInstance( base, extensions, classpath, new URL[0] );
  +        return newInstance( name, base, extensions, classpath, new URL[0] );
       }
   
      /**
       * Creation of a subsidiary engine.
  +    * @param name the name to assign to the manager
       * @param base the URL from which classpath declarations 
       *    shall be resolved
       * @param extensions the declaration of supplimentary extension directories
  @@ -677,12 +679,15 @@
       * @return the new engine
       */
       public EngineClassLoader newInstance( 
  -      URL base, LibraryDescriptor extensions, ClasspathDescriptor classpath, URL[] urls
)
  +      String name, URL base, LibraryDescriptor extensions, ClasspathDescriptor classpath,
URL[] urls )
         throws EngineException
       {
           try
           {
               EngineClassLoader engine = new EngineClassLoader( urls, this );
  +            DefaultApplianceRepository manager = 
  +              new DefaultApplianceRepository( this, m_manager, name );
  +
               engine.enableLogging( getLogger() );
               DefaultLocator context = new DefaultLocator();
               context.put( "urn:assembly:home", m_home );
  @@ -692,6 +697,7 @@
               context.put( "urn:assembly:engine.classpath", classpath );
               context.put( "urn:assembly:logging.manager", m_logging );
               context.put( "urn:assembly:threads.manager", m_pool );
  +            context.put( "urn:assembly:appliance.repository", manager );
               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