avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon/merlin/platform/xdocs/reference/system properties.xml
Date Wed, 07 Apr 2004 16:49:23 GMT
mcconnell    2004/04/07 09:49:23

  Modified:    merlin/activation/impl/src/java/org/apache/avalon/activation/impl
                        ApplianceInvocationHandler.java
                        BlockInvocationHandler.java
               merlin/composition/api/src/java/org/apache/avalon/composition/data
                        ClassLoaderDirective.java ContainmentProfile.java
               merlin/composition/api/src/java/org/apache/avalon/composition/model
                        ClassLoaderModel.java Resolver.java
               merlin/composition/impl/src/java/org/apache/avalon/composition/data/builder
                        XMLContainmentProfileCreator.java
               merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl
                        DefaultClassLoaderModel.java
                        DefaultTypeRepository.java Resources.properties
               merlin/kernel/cli merlin.properties
               merlin/kernel/unit merlin.properties
               merlin/platform/tutorials/jmx/conf hello.block
               merlin/platform/tutorials/jmx merlin.properties
               merlin/platform/xdocs/extensions/facilities finder.xml
               merlin/platform/xdocs/merlin/systems repository.xml
               merlin/platform/xdocs/reference/component/lifecycle
                        incarnation.xml
               merlin/platform/xdocs/reference/containment/directives/classloader/classpath
                        index.xml navigation.xml
               merlin/platform/xdocs/reference/containment/directives/classloader/classpath/repository
                        index.xml navigation.xml
               merlin/platform/xdocs/reference/containment/directives/include
                        index.xml
               merlin/platform/xdocs/reference/containment/overrides
                        index.xml
               merlin/platform/xdocs/reference/system properties.xml
  Removed:     merlin/composition/api/src/java/org/apache/avalon/composition/data
                        CertsDirective.java GrantDirective.java
                        PKCS7Directive.java X509Directive.java
  Log:
  Remove certs directive form classloader and cleanup soe of the composition code.
  
  Revision  Changes    Path
  1.9       +19 -8     avalon/merlin/activation/impl/src/java/org/apache/avalon/activation/impl/ApplianceInvocationHandler.java
  
  Index: ApplianceInvocationHandler.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/activation/impl/src/java/org/apache/avalon/activation/impl/ApplianceInvocationHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ApplianceInvocationHandler.java	17 Mar 2004 10:30:07 -0000	1.8
  +++ ApplianceInvocationHandler.java	7 Apr 2004 16:49:21 -0000	1.9
  @@ -30,6 +30,7 @@
   
   import org.apache.avalon.composition.model.ComponentModel;
   import org.apache.avalon.composition.model.TransientRuntimeException;
  +import org.apache.avalon.composition.model.Reclaimer;
   
   import org.apache.avalon.framework.logger.Logger;
   
  @@ -40,7 +41,8 @@
    * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
    * @version $Revision$ $Date$
    */
  -public final class ApplianceInvocationHandler implements InvocationHandler
  +public final class ApplianceInvocationHandler 
  +  implements InvocationHandler, Reclaimer
   {
       //-------------------------------------------------------------------
       // immutable state
  @@ -68,7 +70,8 @@
       * @param appliance the runtime appliance
       * @param logger the assigned logging channel 
       */
  -    protected ApplianceInvocationHandler( DefaultAppliance appliance, Logger logger, boolean
secure )
  +    protected ApplianceInvocationHandler( 
  +      DefaultAppliance appliance, Logger logger, boolean secure )
       {
           assertNotNull( appliance, "appliance" ); 
           assertNotNull( logger, "logger" ); 
  @@ -132,12 +135,11 @@
           }
       }
   
  -    private Logger getLogger()
  -    {
  -        return m_logger;
  -    }
  +    //-------------------------------------------------------------------
  +    // Reclaimer
  +    //-------------------------------------------------------------------
   
  -    protected void release()
  +    public void release()
       {
           if( !m_destroyed )
           {
  @@ -152,6 +154,10 @@
           }
       }
   
  +    //-------------------------------------------------------------------
  +    // implementation
  +    //-------------------------------------------------------------------
  +
       protected void finalize() throws Throwable
       {
           if( !m_destroyed && ( null != m_instance ) )
  @@ -164,6 +170,11 @@
               getLogger().debug( message );
               release();
           }
  +    }
  +
  +    private Logger getLogger()
  +    {
  +        return m_logger;
       }
   
       private Object getInstance() throws Exception
  
  
  
  1.3       +52 -2     avalon/merlin/activation/impl/src/java/org/apache/avalon/activation/impl/BlockInvocationHandler.java
  
  Index: BlockInvocationHandler.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/activation/impl/src/java/org/apache/avalon/activation/impl/BlockInvocationHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BlockInvocationHandler.java	17 Mar 2004 10:30:07 -0000	1.2
  +++ BlockInvocationHandler.java	7 Apr 2004 16:49:21 -0000	1.3
  @@ -20,13 +20,17 @@
   import java.lang.reflect.InvocationHandler;
   import java.lang.reflect.InvocationTargetException;
   import java.lang.reflect.Method;
  +import java.lang.reflect.Proxy;
   import java.lang.reflect.UndeclaredThrowableException;
  +import java.util.Hashtable;
  +import java.util.Map;
   
   import org.apache.avalon.activation.ApplianceException;
   
   import org.apache.avalon.composition.model.DeploymentModel;
   import org.apache.avalon.composition.model.ContainmentModel;
   import org.apache.avalon.composition.model.ServiceModel;
  +import org.apache.avalon.composition.model.Reclaimer;
   
   import org.apache.avalon.framework.logger.Logger;
   
  @@ -38,6 +42,7 @@
   {
       private final DefaultBlock m_block;
       private final Logger m_logger;
  +    private final Map m_providers = new Hashtable();
   
      /**
       * Create a proxy invocation handler.
  @@ -78,6 +83,7 @@
   
           final ContainmentModel model = m_block.getContainmentModel();
           Class source = method.getDeclaringClass();
  +
           ServiceModel service = model.getServiceModel( source );
           if( null == service )
           {
  @@ -87,7 +93,7 @@
                + "].";
               throw new IllegalStateException( error );
           }
  -
  +        
           DeploymentModel provider = service.getServiceProvider();
   
           //
  @@ -97,7 +103,8 @@
   
           try
           {
  -            Object object = provider.resolve();
  +            Object object = locateServiceInstance( provider );
  +            //Object object = provider.resolve();
               return method.invoke( object, args );
           }
           catch( UndeclaredThrowableException e )
  @@ -125,5 +132,48 @@
                 + "' in appliance: " + m_block;
               throw new ApplianceException( error, e );
           }
  +    }
  +
  +   /**
  +    * Locate a service reference and cache it locally for the 
  +    * lifetime of the invocation handler.
  +    * 
  +    * @param provider the deployment model 
  +    * @return a cached service reference
  +    * @exception Exception if something unexpected happens
  +    */
  +    private Object locateServiceInstance( DeploymentModel provider ) throws Exception
  +    {
  +        Object source = m_providers.get( provider );
  +        if( null != source ) return source;
  +        Object object = provider.resolve();
  +        m_providers.put( provider, object );
  +        return object;
  +    }
  +
  +   /**
  +    * Finalization of the invocation handler during which
  +    * we release any cached service references.
  +    * 
  +    * @exception Throwable if an error occurs
  +    */
  +    protected void finalize() throws Throwable
  +    {
  +        Object[] objects = m_providers.values().toArray();
  +        for( int i=0; i<objects.length; i++ )
  +        {
  +            Object instance = objects[i];
  +            if( Proxy.isProxyClass( instance.getClass() ) )
  +            {
  +                InvocationHandler handler = 
  +                    Proxy.getInvocationHandler( instance );
  +                if( handler instanceof Reclaimer )
  +                { 
  +                    Reclaimer source = (Reclaimer) handler;
  +                    source.release();
  +                }
  +            }
  +        }
  +        m_providers.clear();
       }
   }
  
  
  
  1.6       +3 -22     avalon/merlin/composition/api/src/java/org/apache/avalon/composition/data/ClassLoaderDirective.java
  
  Index: ClassLoaderDirective.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/data/ClassLoaderDirective.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ClassLoaderDirective.java	24 Jan 2004 23:25:23 -0000	1.5
  +++ ClassLoaderDirective.java	7 Apr 2004 16:49:22 -0000	1.6
  @@ -29,7 +29,6 @@
   {
       private static final LibraryDirective EMPTY_LIBRARY = new LibraryDirective();
       private static final ClasspathDirective EMPTY_CLASSPATH = new ClasspathDirective();
  -    private static final GrantDirective EMPTY_GRANT = new GrantDirective();
   
       /**
        * The library directive.
  @@ -40,15 +39,13 @@
        * The root category hierachy.
        */
       private ClasspathDirective m_classpath;
  -
  -    private GrantDirective m_grantDirective;
       
       /**
        * Create an empty ClassloaderDirective.
        */
       public ClassLoaderDirective()
       {
  -        this( null, null, null );
  +        this( null, null );
       }
   
       /**
  @@ -56,12 +53,10 @@
        *
        * @param library the library descriptor
        * @param classpath the classpath descriptor
  -     * @param grant the security policy declared for the classloader
        */
       public ClassLoaderDirective( 
          final LibraryDirective library,
  -       final ClasspathDirective classpath,
  -       final GrantDirective grant )
  +       final ClasspathDirective classpath )
       {
           if( library == null )
           {
  @@ -80,15 +75,6 @@
           {
               m_classpath = classpath;
           }
  -
  -        if( grant == null )
  -        {
  -            m_grantDirective = EMPTY_GRANT;
  -        }
  -        else
  -        {
  -            m_grantDirective = grant;
  -        }
       }
   
      /**
  @@ -121,10 +107,5 @@
       public ClasspathDirective getClasspathDirective()
       {
           return m_classpath;
  -    }
  -    
  -    public GrantDirective getGrantDirective()
  -    {
  -        return m_grantDirective;
       }
   }
  
  
  
  1.11      +2 -3      avalon/merlin/composition/api/src/java/org/apache/avalon/composition/data/ContainmentProfile.java
  
  Index: ContainmentProfile.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/data/ContainmentProfile.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ContainmentProfile.java	17 Mar 2004 10:30:08 -0000	1.10
  +++ ContainmentProfile.java	7 Apr 2004 16:49:22 -0000	1.11
  @@ -51,8 +51,7 @@
       private static final ClassLoaderDirective EMPTY_CLASSLOADER =
         new ClassLoaderDirective( 
           new LibraryDirective(), 
  -        new ClasspathDirective(), 
  -        new GrantDirective() );
  +        new ClasspathDirective());
   
       //========================================================================
       // state
  
  
  
  1.8       +1 -13     avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ClassLoaderModel.java
  
  Index: ClassLoaderModel.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ClassLoaderModel.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ClassLoaderModel.java	29 Feb 2004 22:25:26 -0000	1.7
  +++ ClassLoaderModel.java	7 Apr 2004 16:49:22 -0000	1.8
  @@ -106,16 +106,4 @@
       */
       ClassLoaderModel createClassLoaderModel( 
         Logger logger, ContainmentProfile profile, URL[] implied ) throws ModelException;
  -
  -   /** 
  -    * Return the security ProtectionDomain defined for this ClassLoaderModel.
  -    * 
  -    * These ProtectionDomains will be enforced if code level security is enabled
  -    * globally. If no Permissions are returned, all the components under
  -    * this container will run without Permissions.
  -    *
  -    * @return A ProtectionDomain array which should be enagaged if codelevel
  -    *         security is enabled for the Classloader.
  -    **/
  -    ProtectionDomain[] getProtectionDomains();
   }
  
  
  
  1.3       +6 -6      avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/Resolver.java
  
  Index: Resolver.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/Resolver.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Resolver.java	4 Apr 2004 23:33:56 -0000	1.2
  +++ Resolver.java	7 Apr 2004 16:49:22 -0000	1.3
  @@ -44,11 +44,11 @@
        */
       Object resolve( boolean proxy ) throws Exception;
   
  -    /**
  -     * Release an object
  -     *
  -     * @param instance the object to be released
  -     */
  +   /**
  +    * Release an object.
  +    * 
  +    * @param instance the object to release
  +    */
       void release( Object instance );
   
   }
  
  
  
  1.13      +2 -92     avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/data/builder/XMLContainmentProfileCreator.java
  
  Index: XMLContainmentProfileCreator.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/data/builder/XMLContainmentProfileCreator.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XMLContainmentProfileCreator.java	17 Mar 2004 10:39:11 -0000	1.12
  +++ XMLContainmentProfileCreator.java	7 Apr 2004 16:49:22 -0000	1.13
  @@ -25,25 +25,20 @@
   
   import org.apache.avalon.composition.data.BlockCompositionDirective;
   import org.apache.avalon.composition.data.BlockIncludeDirective;
  -import org.apache.avalon.composition.data.CertsDirective;
   import org.apache.avalon.composition.data.ClassLoaderDirective;
   import org.apache.avalon.composition.data.ClasspathDirective;
   import org.apache.avalon.composition.data.ContainmentProfile;
   import org.apache.avalon.composition.data.DeploymentProfile;
   import org.apache.avalon.composition.data.FilesetDirective;
  -import org.apache.avalon.composition.data.GrantDirective;
   import org.apache.avalon.composition.data.IncludeDirective;
   import org.apache.avalon.composition.data.LibraryDirective;
   import org.apache.avalon.composition.data.MetaDataException;
   import org.apache.avalon.composition.data.NamedComponentProfile;
  -import org.apache.avalon.composition.data.PermissionDirective;
  -import org.apache.avalon.composition.data.PKCS7Directive;
   import org.apache.avalon.composition.data.RepositoryDirective;
   import org.apache.avalon.composition.data.ResourceDirective;
   import org.apache.avalon.composition.data.ServiceDirective;
   import org.apache.avalon.composition.data.Targets;
   import org.apache.avalon.composition.data.TargetDirective;
  -import org.apache.avalon.composition.data.X509Directive;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.meta.info.ServiceDescriptor;
  @@ -156,92 +151,7 @@
             createLibraryDirective( config.getChild( "library", false ) );
           ClasspathDirective classpath = 
             createClasspathDirective( config.getChild( "classpath", false ) );
  -        GrantDirective grants =
  -          createGrantDirective( config.getChild( "grant" ) );
  -        return new ClassLoaderDirective( library, classpath, grants );
  -    }
  -
  -    private GrantDirective createGrantDirective( Configuration config )
  -       throws ConfigurationException
  -    {
  -        ArrayList result = new ArrayList();
  -        Configuration[] permChildren = config.getChildren( "permission" );
  -        for( int i = 0; i < permChildren.length; i++ )
  -        {
  -            Configuration child = permChildren[i];
  -            PermissionDirective perm = createPermissionDirective( child );
  -            result.add( perm );
  -        }
  -        PermissionDirective[] pd = new PermissionDirective[ result.size() ];
  -        result.toArray( pd );
  -        
  -        
  -        Configuration certChild = config.getChild( "certificates" );
  -        CertsDirective certs = createCertsDirective( certChild );
  -        return new GrantDirective( pd, certs );
  -    }
  -    
  -    private CertsDirective createCertsDirective( Configuration conf )
  -       throws ConfigurationException
  -    {
  -        Configuration[] x509conf = conf.getChildren( "x509" );
  -        X509Directive[] x509 = new X509Directive[ x509conf.length ];
  -        for( int i=0 ; i < x509conf.length ; i++ )
  -        {
  -            String href = x509conf[i].getAttribute( "href", "" );
  -            String data = x509conf[i].getValue();
  -            try
  -            {
  -                x509[i] = new X509Directive( href, data );
  -            } catch( CertificateException e )
  -            {
  -                throw new ConfigurationException( "Invalid Certificate in " + x509conf[i],
e );
  -            } catch( IOException e )
  -            {
  -                throw new ConfigurationException( "Can't access: " + href, e );
  -            }
  -        }
  -        
  -        Configuration[] pkcs7conf = conf.getChildren( "pkcs7" );
  -        PKCS7Directive[] pkcs7 = new PKCS7Directive[ pkcs7conf.length ];
  -        for( int i=0 ; i < pkcs7conf.length ; i++ )
  -        {
  -            String href = pkcs7conf[i].getAttribute( "href" );
  -            try
  -            {
  -                pkcs7[i] = new PKCS7Directive( href );
  -            } catch( CertificateException e )
  -            {
  -                throw new ConfigurationException( "Invalid Certificate in " + pkcs7conf[i],
e );
  -            } catch( IOException e )
  -            {
  -                throw new ConfigurationException( "Can't access: " + href, e );
  -            }
  -        }
  -        return new CertsDirective( x509, pkcs7 );
  -    }
  -    
  -    private PermissionDirective createPermissionDirective( Configuration config )
  -       throws ConfigurationException
  -    {
  -        String classname = config.getAttribute( "class" );
  -        String name = config.getAttribute( "name", null );
  -        String result = "";
  -        Configuration[] actions = config.getChildren( "action" );
  -        for( int i=0 ; i < actions.length ; i ++ )
  -        {
  -            if( i > 0 )
  -                result = result + "," + actions[i].getValue();
  -            else
  -                result = result + actions[i].getValue();
  -        }
  -        try
  -        {
  -            return new PermissionDirective( classname, name, result );
  -        } catch( Exception e )
  -        {
  -            throw new ConfigurationException( "Unable to create the Permission Directive.",
e );
  -        }
  +        return new ClassLoaderDirective( library, classpath );
       }
       
       private ClasspathDirective createClasspathDirective( Configuration config )
  
  
  
  1.15      +2 -54     avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultClassLoaderModel.java
  
  Index: DefaultClassLoaderModel.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultClassLoaderModel.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DefaultClassLoaderModel.java	1 Apr 2004 04:06:52 -0000	1.14
  +++ DefaultClassLoaderModel.java	7 Apr 2004 16:49:22 -0000	1.15
  @@ -34,23 +34,18 @@
   
   import java.security.cert.Certificate;
   
  -import org.apache.avalon.composition.data.CertsDirective;
   import org.apache.avalon.composition.data.ContainmentProfile;
   import org.apache.avalon.composition.data.ClassLoaderDirective;
   import org.apache.avalon.composition.data.FilesetDirective;
  -import org.apache.avalon.composition.data.GrantDirective;
   import org.apache.avalon.composition.data.IncludeDirective;
   import org.apache.avalon.composition.data.PermissionDirective;
   import org.apache.avalon.composition.data.RepositoryDirective;
   import org.apache.avalon.composition.data.ResourceDirective;
  -
   import org.apache.avalon.composition.model.ClassLoaderModel;
   import org.apache.avalon.composition.model.TypeRepository;
   import org.apache.avalon.composition.model.ServiceRepository;
   import org.apache.avalon.composition.model.ModelException;
  -
   import org.apache.avalon.composition.provider.ClassLoaderContext;
  -
   import org.apache.avalon.composition.util.StringHelper;
   
   import org.apache.avalon.extension.Extension;
  @@ -125,8 +120,6 @@
       private final URL[] m_urls;
   
       private final URLClassLoader m_classLoader;
  -
  -    private ProtectionDomain[] m_protectionDomains;
       
       private final DefaultTypeRepository m_types;
   
  @@ -205,16 +198,6 @@
                 new URLClassLoader( m_urls, context.getClassLoader() );
   
               //
  -            // changes needed here - grants must be under the control of 
  -            // system administrator which means that grants can only exist in 
  -            // either the kernel configuration or a targets override 
  -            // configuration - more specifically, a block's classloader directive
  -            // cannot grant permissions
  -            //
  -
  -            m_protectionDomains = createProtectionDomains( directive.getGrantDirective()
);
  -
  -            //
               // scan the classpath for component type and service
               // definitions
               //
  @@ -263,6 +246,7 @@
       {
           ClassLoaderContext context = 
             createChildContext( logger, profile, implied );
  +        logger.debug( "creating child classloader for: " + profile );
           return new DefaultClassLoaderModel( context );
       }
   
  @@ -367,21 +351,6 @@
       {
           return m_classLoader;
       }
  -
  -   /** 
  -    * Return the security ProtectionDomains defined for this ClassLoaderModel.
  -    * 
  -    * These ProtectionDomains will be enforced if code level security is enabled
  -    * globally. If no ProtectionDomain are returned, all the components under
  -    * this container will run without Permissions.
  -    *
  -    * @return A ProtectionDomain which should be enagaged if codelevel
  -    *         security is enabled for the Classloader.
  -    **/
  -    public ProtectionDomain[] getProtectionDomains()
  -    {
  -        return m_protectionDomains;
  -    }
       
       //==============================================================
       // private implementation
  @@ -513,27 +482,6 @@
           }
   
           return (String[]) classpath.toArray( new String[0] );
  -    }
  -
  -    private ProtectionDomain[] createProtectionDomains( GrantDirective directive )
  -    {
  -        Permissions permissions = new Permissions();
  -        PermissionDirective[] permDirectives = directive.getPermissionDirectives();
  -        for( int i=0 ; i < permDirectives.length ; i++ )
  -        {
  -            permissions.add( permDirectives[i].getPermission() );
  -        }
  -        
  -        CertsDirective certsDirective = directive.getCertsDirective();
  -        Certificate[] allCerts = certsDirective.getCertificates();
  -            
  -        ProtectionDomain[] pd = new ProtectionDomain[ m_urls.length ];
  -        for( int i=0 ; i < m_urls.length ; i++ )
  -        {
  -            CodeSource cs = new CodeSource( m_urls[i], allCerts );
  -            pd[i] = new ProtectionDomain( cs, permissions );
  -        }                
  -        return pd;
       }
       
       /**
  
  
  
  1.10      +8 -1      avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultTypeRepository.java
  
  Index: DefaultTypeRepository.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultTypeRepository.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DefaultTypeRepository.java	8 Mar 2004 11:28:36 -0000	1.9
  +++ DefaultTypeRepository.java	7 Apr 2004 16:49:22 -0000	1.10
  @@ -156,6 +156,13 @@
                   getLogger().debug( message );
               }
           }
  +
  +        if( getLogger().isDebugEnabled() )
  +        {
  +            final String message = 
  +              REZ.getString( "type.repository.completion" );
  +            getLogger().debug( message );
  +        }
       }
   
       //==============================================================
  
  
  
  1.8       +1 -0      avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/Resources.properties,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Resources.properties	22 Feb 2004 16:12:58 -0000	1.7
  +++ Resources.properties	7 Apr 2004 16:49:22 -0000	1.8
  @@ -67,6 +67,7 @@
   type.repository.count=type install count: {0}
   type.repository.addition=registered [type:{0}/{1}].
   type.repository.unknown-type=Unable to locate a component type descriptor for the component
class [{0}] in the classloader.  Please verify that the component classname is correct and
that a component type descriptor is included in a jar file available within the container
classloader.
  +type.repository.completion=type registration complete
   
   
   #Scanner
  
  
  
  1.3       +1 -1      avalon/merlin/kernel/cli/merlin.properties
  
  Index: merlin.properties
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/cli/merlin.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- merlin.properties	2 Feb 2004 00:44:09 -0000	1.2
  +++ merlin.properties	7 Apr 2004 16:49:22 -0000	1.3
  @@ -1,5 +1,5 @@
   
  -merlin.info = true
  +merlin.info = false
   merlin.debug = false
   merlin.deployment = conf/test.block,conf/test-2.block,conf/hello.block
   merlin.override = conf/override.xml
  
  
  
  1.7       +1 -1      avalon/merlin/kernel/unit/merlin.properties
  
  Index: merlin.properties
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/unit/merlin.properties,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- merlin.properties	4 Mar 2004 03:42:30 -0000	1.6
  +++ merlin.properties	7 Apr 2004 16:49:22 -0000	1.7
  @@ -1,5 +1,5 @@
   
  -merlin.info = true
  +merlin.info = false
   merlin.debug = false
   merlin.deployment = conf/hello.block
   merlin.override = conf/override.xml
  
  
  
  1.3       +9 -9      avalon/merlin/platform/tutorials/jmx/conf/hello.block
  
  Index: hello.block
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/platform/tutorials/jmx/conf/hello.block,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- hello.block	4 Apr 2004 06:30:54 -0000	1.2
  +++ hello.block	7 Apr 2004 16:49:22 -0000	1.3
  @@ -5,25 +5,25 @@
       <classpath>
         <repository>
           <resource id="merlin/tutorial:jmx-hello" version="1.0"/>
  -        <resource id="avalon-merlin-jmx:merlin-jmx-management-api" version="1.0"/>
  -        <resource id="avalon-merlin-jmx:merlin-jmx-management-spi" version="1.0"/>
  -        <resource id="avalon-merlin-jmx:merlin-jmx-management-mx4j" version="1.0"/>
  -        <resource id="avalon-merlin-jmx:merlin-jmx-util" version="1.0"/>
  -        <resource id="avalon-merlin-jmx:merlin-jmx-handler" version="1.0"/>
  +        <resource id="avalon-jmx:avalon-jmx-api" version="0.9.0"/>
  +        <resource id="avalon-jmx:avalon-jmx-spi" version="0.9.0"/>
  +        <resource id="avalon-jmx:avalon-jmx-mx4j" version="0.9.0"/>
  +        <resource id="avalon-jmx:avalon-jmx-util" version="0.9.0"/>
  +        <resource id="avalon-jmx:avalon-jmx-handler" version="0.9.0"/>
           <resource id="mx4j:mx4j-jmx" version="1.1.1"/>
           <resource id="mx4j:mx4j-tools" version="1.1.1"/>
         </repository>
       </classpath>
     </classloader>
   
  -  <include name="ComponentRegistrationManager" id="avalon-merlin-jmx:merlin-jmx-management-mx4j"
version="1.0"/>
  -
  -  <component name="JmxManagementHandler" class="org.apache.avalon.merlin.jmx.handler.JmxManagementHandler"/>
  -  
     <component name="hello" class="tutorial.HelloComponent">
       <configuration>
         <hello>Hello, Apache!</hello>
       </configuration>
     </component>
   
  +  <include name="mx4j" id="avalon-jmx:avalon-jmx-mx4j" version="0.9.0"/>
  +
  +  <component name="handler" class="org.apache.avalon.jmx.handler.JmxManagementHandler"/>
  +  
   </container>
  
  
  
  1.3       +0 -1      avalon/merlin/platform/tutorials/jmx/merlin.properties
  
  Index: merlin.properties
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/platform/tutorials/jmx/merlin.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- merlin.properties	4 Apr 2004 06:30:54 -0000	1.2
  +++ merlin.properties	7 Apr 2004 16:49:22 -0000	1.3
  @@ -5,4 +5,3 @@
   # merlin.info = true
   # merlin.debug = false
   
  -merlin.repository = /home/niclas/.maven/repository
  
  
  
  1.3       +37 -1     avalon/merlin/platform/xdocs/extensions/facilities/finder.xml
  
  Index: finder.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/platform/xdocs/extensions/facilities/finder.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- finder.xml	3 Apr 2004 07:52:51 -0000	1.2
  +++ finder.xml	7 Apr 2004 16:49:22 -0000	1.3
  @@ -26,6 +26,42 @@
   
     <body>
       <section name="Avalon Finder Facility">
  +      <p>
  +      The finder is a component that provides support for the 
  +      dynamic resolution of a services.  The finder is a facility
  +      and as such can access and navigate the containment model 
  +      for solutions to service requests.
  +      </p>
  +      <subsection name="Finder Interface">
  +        <p>
  +        The finder interface is defainged as:
  +        </p>
  +<source>
  +package org.apache.avalon.finder;
  +
  +/**
  + * Defintion of the Finder service contract.
  + */
  +public interface Finder
  +{
  +   /**
  +    * Find an object fullfilling the supplied service class.
  +    * 
  +    * @param service the service class that the returned 
  +    *    object if gauranteed to fulfill
  +    * @exception FinderException if a provider could not be found
  +    */
  +    Object find( Class service ) throws FinderException;
  +
  +   /**
  +    * Release an object that was resolved using the find operation.
  +    * 
  +    * @param object the object to release
  +    */
  +    void release( Object object );
  +}
  +</source>
  +      </subsection>
       </section>
     </body>
   
  
  
  
  1.4       +19 -0     avalon/merlin/platform/xdocs/merlin/systems/repository.xml
  
  Index: repository.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/platform/xdocs/merlin/systems/repository.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- repository.xml	5 Apr 2004 02:12:34 -0000	1.3
  +++ repository.xml	7 Apr 2004 16:49:22 -0000	1.4
  @@ -41,6 +41,25 @@
             <th>Feature</th><th>Description</th>
           </tr>
           <tr>
  +          <td>Resource Cache Management</td>
  +          <td>
  +          The Avalon Repository provides support for an artifact cache.  Artifacts
  +          are addressable using the host independent <strong>artifact:</strong>

  +          protocol.  The repository system maps artifact references to physical 
  +          resources and handles resource downloading and local caching.
  +          </td>
  +        </tr>
  +        <tr>
  +          <td>Classloader Management</td>
  +          <td>
  +          Some artifacts declare a <strong>meta</strong> MIME type extension
which
  +          contains information about an artifact's structural dependecies. The 
  +          repository system uses this information to dynamically construct classloaders
  +          and factory objects.  These capabilities are central to the bootstrapping
  +          facilities provided by the Avalon Repository package.
  +          </td>
  +        </tr>
  +        <tr>
             <td>Resource Management API</td>
             <td>
             The Avalon Repository is a Java <a href="about/api/index.html">API</a>,

  
  
  
  1.2       +6 -0      avalon/merlin/platform/xdocs/reference/component/lifecycle/incarnation.xml
  
  Index: incarnation.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/platform/xdocs/reference/component/lifecycle/incarnation.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- incarnation.xml	2 Apr 2004 02:51:55 -0000	1.1
  +++ incarnation.xml	7 Apr 2004 16:49:22 -0000	1.2
  @@ -67,6 +67,12 @@
   </source>
               </td>
             </tr>
  +        </table>
  +      </subsection>
  +
  +      <subsection name="Optional Lifecycle Stages">
  +
  +        <table>
             <tr>
               <td><a name="logging"/><p>logging</p></td>
               <td>
  
  
  
  1.2       +2 -2      avalon/merlin/platform/xdocs/reference/containment/directives/classloader/classpath/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/platform/xdocs/reference/containment/directives/classloader/classpath/index.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.xml	2 Apr 2004 08:09:59 -0000	1.1
  +++ index.xml	7 Apr 2004 16:49:22 -0000	1.2
  @@ -42,7 +42,7 @@
               </td>
             </tr>
             <tr>
  -            <td><a href="fileset.html">fileset</a></td><td>n</td>
  +            <td><a href="fileset/index.html">fileset</a></td><td>n</td>
               <td>
                A fileset directive.
               </td>
  
  
  
  1.4       +4 -2      avalon/merlin/platform/xdocs/reference/containment/directives/classloader/classpath/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/platform/xdocs/reference/containment/directives/classloader/classpath/navigation.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- navigation.xml	4 Apr 2004 15:49:06 -0000	1.3
  +++ navigation.xml	7 Apr 2004 16:49:22 -0000	1.4
  @@ -47,8 +47,10 @@
               <item name="services" href="/reference/containment/directives/services/index.html"/>
               <item name="classloader" href="/reference/containment/directives/classloader/index.html">
                 <item name="classpath" href="/reference/containment/directives/classloader/classpath/index.html">
  -                <item name="repository" href="/reference/containment/directives/classloader/classpath/repository/index.html"/>
  -                <item name="fileset" href="/reference/containment/directives/classloader/classpath/fileset.html"/>
  +                <item name="repository" 
  +                   href="/reference/containment/directives/classloader/classpath/repository/index.html"/>
  +                <item name="fileset" 
  +                   href="/reference/containment/directives/classloader/classpath/fileset/index.html"/>
                 </item>
                 <item name="library" href="/reference/containment/directives/classloader/extensions.html"/>
               </item>
  
  
  
  1.2       +12 -0     avalon/merlin/platform/xdocs/reference/containment/directives/classloader/classpath/repository/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/platform/xdocs/reference/containment/directives/classloader/classpath/repository/index.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.xml	2 Apr 2004 08:09:59 -0000	1.1
  +++ index.xml	7 Apr 2004 16:49:22 -0000	1.2
  @@ -34,6 +34,18 @@
   <p>A repository is a logical source of jar files. Resource directives contained in
the repository are resolved to jar files by a repository implementation.  The default implementation
is a file based repository located under the Melrin installation.</p>
         </subsection>
   
  +      <subsection name="Nested Elements">
  +        <table>
  +          <tr><th>Element</th><th>Occurance</th><th>Description</th></tr>
  +          <tr>
  +            <td><a href="resource.html">resource</a></td><td>0..n</td>
  +            <td>
  +             Jar file resource references.
  +            </td>
  +          </tr>
  +        </table>
  +      </subsection>
  +
         <subsection name="Sample XML">
   <p>
   The following classpath (from the James deployment directive) demonstrates the use of repository
based references.
  
  
  
  1.4       +1 -1      avalon/merlin/platform/xdocs/reference/containment/directives/classloader/classpath/repository/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/platform/xdocs/reference/containment/directives/classloader/classpath/repository/navigation.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- navigation.xml	4 Apr 2004 15:49:06 -0000	1.3
  +++ navigation.xml	7 Apr 2004 16:49:22 -0000	1.4
  @@ -54,7 +54,7 @@
                         href="/reference/containment/directives/classloader/classpath/repository/resource.html"/>
                   </item>
                   <item name="fileset" 
  -                    href="/reference/containment/directives/classloader/classpath/fileset.html"/>
  +                    href="/reference/containment/directives/classloader/classpath/fileset/index.html"/>
                 </item>
                 <item name="library" href="/reference/containment/directives/classloader/extensions.html"/>
               </item>
  
  
  
  1.3       +2 -2      avalon/merlin/platform/xdocs/reference/containment/directives/include/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/platform/xdocs/reference/containment/directives/include/index.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- index.xml	3 Apr 2004 08:52:18 -0000	1.2
  +++ index.xml	7 Apr 2004 16:49:23 -0000	1.3
  @@ -40,8 +40,8 @@
               <td>target</td><td>*</td>
               <td>
                A set of target directives scoped relative to the container established 
  -             by the include. Targets declarations correspond to the specification of 
  -             <a href="../../overrides/index.html">override target elements</a>

  +             by the include. Each target declaration corresponds to the specification of

  +             <a href="../../overrides/target/index.html">target override target element</a>

                presented under the config.xml spec.
               </td>
             </tr>
  
  
  
  1.2       +6 -20     avalon/merlin/platform/xdocs/reference/containment/overrides/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/platform/xdocs/reference/containment/overrides/index.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.xml	2 Apr 2004 08:09:59 -0000	1.1
  +++ index.xml	7 Apr 2004 16:49:23 -0000	1.2
  @@ -29,6 +29,12 @@
     <body>
       <section name="Targets Directive">
   
  +      <subsection name="Description">
  +<p>
  +A targets configuration contains named configuration target declarations that can be used
to override configurations for component and container directives.  A targets configuration
may contain multiple target declarations, each referencing a named deloyment target (component
or container).
  +</p>
  +      </subsection>
  +
         <subsection name="Nested Elements">
           <table>
             <tr><th>Element</th><th>Occurance</th><th>Description</th></tr>
  @@ -39,26 +45,6 @@
               </td>
             </tr>
           </table>
  -      </subsection>
  -
  -      <subsection name="Attributes">
  -
  -        <table>
  -          <tr><th>Attribute</th><th>Required</th><th>Description</th></tr>
  -          <tr>
  -            <td>path</td><td>yes</td>
  -            <td>
  -            Absolute or relative path of the component that the target is qualifying.
  -            </td>
  -          </tr>
  -        </table>
  -
  -      </subsection>
  -
  -      <subsection name="Description">
  -<p>
  -A targets configuration contains named configuration target declarations that can be used
to override configurations for component and container directives.  A targets configuration
may contain multiple target declarations, each referencing a named deloyment target (component
or container).
  -</p>
         </subsection>
   
         <subsection name="Sample XML">
  
  
  
  1.2       +6 -0      avalon/merlin/platform/xdocs/reference/system/properties.xml
  
  Index: properties.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/platform/xdocs/reference/system/properties.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- properties.xml	1 Apr 2004 23:49:12 -0000	1.1
  +++ properties.xml	7 Apr 2004 16:49:23 -0000	1.2
  @@ -124,6 +124,12 @@
                  temp directory will be used.</td>
             </tr>
             <tr>
  +            <td>merlin.anchor</td>
  +            <td>${merlin.home}</td>
  +            <td>The root directory used by merlin to resolve relative
  +              filset directory references.</td>
  +          </tr>
  +          <tr>
               <td>merlin.ext</td>
               <td>${merlin.dir}</td>
               <td>The root directory used by merlin to resolve jar 
  
  
  

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


Mime
View raw message