You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by le...@apache.org on 2002/03/29 16:15:55 UTC

cvs commit: jakarta-avalon-excalibur/instrument-manager/src/java/org/apache/avalon/excalibur/instrument/component InstrumentComponentHandler.java InstrumentDefaultComponentFactory.java

leif        02/03/29 07:15:55

  Modified:    instrument-manager/src/java/org/apache/avalon/excalibur/instrument/component
                        InstrumentComponentHandler.java
                        InstrumentDefaultComponentFactory.java
  Log:
  Fix a problem where the default names for components in a selector were not correct.
  
  Revision  Changes    Path
  1.3       +3 -2      jakarta-avalon-excalibur/instrument-manager/src/java/org/apache/avalon/excalibur/instrument/component/InstrumentComponentHandler.java
  
  Index: InstrumentComponentHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/instrument-manager/src/java/org/apache/avalon/excalibur/instrument/component/InstrumentComponentHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InstrumentComponentHandler.java	29 Mar 2002 14:03:49 -0000	1.2
  +++ InstrumentComponentHandler.java	29 Mar 2002 15:15:55 -0000	1.3
  @@ -29,7 +29,7 @@
   /**
    *
    * @author <a href="mailto:leif@silveregg.co.jp">Leif Mortenson</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2002/03/29 14:03:49 $
  + * @version CVS $Revision: 1.3 $ $Date: 2002/03/29 15:15:55 $
    * @since 4.1
    */
   public abstract class InstrumentComponentHandler
  @@ -99,7 +99,8 @@
                                                      context,
                                                      roleManager,
                                                      logkitManager,
  -                                                   instrumentManager );
  +                                                   instrumentManager,
  +                                                   instrumentableName );
   
           InstrumentComponentHandler handler;
           if( Poolable.class.isAssignableFrom( componentClass ) )
  
  
  
  1.3       +9 -5      jakarta-avalon-excalibur/instrument-manager/src/java/org/apache/avalon/excalibur/instrument/component/InstrumentDefaultComponentFactory.java
  
  Index: InstrumentDefaultComponentFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/instrument-manager/src/java/org/apache/avalon/excalibur/instrument/component/InstrumentDefaultComponentFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InstrumentDefaultComponentFactory.java	29 Mar 2002 14:03:49 -0000	1.2
  +++ InstrumentDefaultComponentFactory.java	29 Mar 2002 15:15:55 -0000	1.3
  @@ -21,13 +21,16 @@
    * Factory for Avalon Instrumentable components.
    *
    * @author <a href="mailto:leif@silveregg.co.jp">Leif Mortenson</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2002/03/29 14:03:49 $
  + * @version CVS $Revision: 1.3 $ $Date: 2002/03/29 15:15:55 $
    * @since 4.0
    */
   public class InstrumentDefaultComponentFactory
       extends DefaultComponentFactory
   {
       private InstrumentManager m_instrumentManager;
  +    
  +    /** Instrumentable Name assigned to objects created by this factory. */
  +    private String m_instrumentableName;
   
       /*---------------------------------------------------------------
        * Constructors
  @@ -43,6 +46,7 @@
        *              <code>DefaultComponentSelector</code>s.
        * @param instrumentManager the <code>InstrumentManager</code> to register the component
        *                          with if it is a Instrumentable.
  +     * @param instrumentableName The name of the handler.
        */
       public InstrumentDefaultComponentFactory( final Class componentClass,
                                                 final Configuration configuration,
  @@ -50,12 +54,14 @@
                                                 final Context context,
                                                 final RoleManager roles,
                                                 final LogKitManager logkit,
  -                                              final InstrumentManager instrumentManager )
  +                                              final InstrumentManager instrumentManager,
  +                                              final String instrumentableName )
   
       {
           super( componentClass, configuration, componentManager, context, roles, logkit );
   
           m_instrumentManager = instrumentManager;
  +        m_instrumentableName = instrumentableName;
       }
   
   
  @@ -88,9 +94,7 @@
           {
               getLogger().debug( "Doing instrument setup for: " + component );
               
  -            String instrumentName = configuration.getAttribute( "instrumentable", configuration.getName() );
  -            
  -            m_instrumentManager.registerInstrumentable( (Instrumentable)component, instrumentName );
  +            m_instrumentManager.registerInstrumentable( (Instrumentable)component, m_instrumentableName );
           }
       }
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>