ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/embeddor DefaultEmbeddor.java
Date Wed, 24 Apr 2002 01:39:27 GMT
adammurdoch    02/04/23 18:39:27

  Modified:    container/src/java/org/apache/myrmidon/components/embeddor
                        DefaultEmbeddor.java
  Log:
  Don't assume that role name and class name are the same.
  
  Revision  Changes    Path
  1.49      +33 -13    jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java
  
  Index: DefaultEmbeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- DefaultEmbeddor.java	23 Apr 2002 12:44:26 -0000	1.48
  +++ DefaultEmbeddor.java	24 Apr 2002 01:39:27 -0000	1.49
  @@ -65,7 +65,7 @@
    * Instantiate this to embed inside other applications.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.48 $ $Date: 2002/04/23 12:44:26 $
  + * @version $Revision: 1.49 $ $Date: 2002/04/24 01:39:27 $
    */
   public class DefaultEmbeddor
       extends AbstractLogEnabled
  @@ -254,19 +254,38 @@
           throws Exception
       {
           // Create the components
  -        createComponent( ExtensionManager.class, PREFIX + "extensions.DefaultExtensionManager"
);
  +        createComponent( ExtensionManager.ROLE,
  +                         ExtensionManager.class,
  +                         PREFIX + "extensions.DefaultExtensionManager" );
           final Object converter =
  -            createComponent( Converter.class, PREFIX + "converter.DefaultMasterConverter"
);
  +            createComponent( Converter.ROLE,
  +                             Converter.class,
  +                             PREFIX + "converter.DefaultMasterConverter" );
           m_serviceManager.put( ConverterRegistry.ROLE, converter );
  -        createComponent( Configurer.class, PREFIX + "configurer.DefaultConfigurer" );
  -        createComponent( TypeManager.class, PREFIX + "type.DefaultTypeManager" );
  -        createComponent( RoleManager.class, PREFIX + "role.DefaultRoleManager" );
  -        createComponent( AspectManager.class, PREFIX + "aspect.DefaultAspectManager" );
  -        createComponent( Deployer.class, PREFIX + "deployer.DefaultDeployer" );
  -        createComponent( ClassLoaderManager.class,
  +        createComponent( Configurer.ROLE,
  +                         Configurer.class,
  +                         PREFIX + "configurer.DefaultConfigurer" );
  +        createComponent( TypeManager.ROLE,
  +                         TypeManager.class,
  +                         PREFIX + "type.DefaultTypeManager" );
  +        createComponent( RoleManager.ROLE,
  +                         RoleManager.class,
  +                         PREFIX + "role.DefaultRoleManager" );
  +        createComponent( AspectManager.ROLE,
  +                         AspectManager.class,
  +                         PREFIX + "aspect.DefaultAspectManager" );
  +        createComponent( Deployer.ROLE,
  +                         Deployer.class,
  +                         PREFIX + "deployer.DefaultDeployer" );
  +        createComponent( ClassLoaderManager.ROLE,
  +                         ClassLoaderManager.class,
                            PREFIX + "classloader.DefaultClassLoaderManager" );
  -        createComponent( Executor.class, PREFIX + "executor.AspectAwareExecutor" );
  -        createComponent( PropertyResolver.class, PREFIX + "property.DefaultPropertyResolver"
);
  +        createComponent( Executor.ROLE,
  +                         Executor.class,
  +                         PREFIX + "executor.AspectAwareExecutor" );
  +        createComponent( PropertyResolver.ROLE,
  +                         PropertyResolver.class,
  +                         PREFIX + "property.DefaultPropertyResolver" );
   
           m_serviceManager.put( Embeddor.ROLE, this );
   
  @@ -281,12 +300,13 @@
       /**
        * Creates a component.
        */
  -    private Object createComponent( final Class roleType,
  +    private Object createComponent( final String roleName,
  +                                    final Class roleType,
                                       final String defaultImpl )
           throws Exception
       {
           final Object component = createService( roleType, defaultImpl );
  -        m_serviceManager.put( roleType.getName(), component );
  +        m_serviceManager.put( roleName, component );
           m_components.add( component );
           return component;
       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message