avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/xslt XSLTProcessorImpl.java
Date Sat, 29 Mar 2003 18:53:26 GMT
bloritsch    2003/03/29 10:53:26

  Modified:    compatibility/src/java/org/apache/avalon/excalibur/io
                        FileUtil.java
               compatibility/src/test/org/apache/avalon/excalibur/collections/test
                        ThreadedMapTest.java
               compatibility/src/test/org/apache/avalon/excalibur/concurrent/test
                        ReadWriteLockTestCase.java
               component/src/java/org/apache/avalon/excalibur/component
                        ExcaliburComponentSelector.java
               event/src/test/org/apache/excalibur/mpool/test
                        MultiThreadedPoolComparisonProfile.java
                        PoolComparisonProfileAbstract.java
               extension/src/test/org/apache/avalon/excalibur/extension/test
                        DeweyDecimalTestCase.java
               fortress default.properties
               fortress/src/java/org/apache/avalon/fortress/util
                        ContextBuilder.java ContextManager.java
                        ContextManagerConstants.java FortressConfig.java
               fortress/src/test/org/apache/avalon/fortress/test
                        HandlersTestCase.java
               instrument-client/src/java/org/apache/excalibur/instrument/client
                        AbstractOptionDialog.java
                        InstrumentManagerConnection.java MenuBar.java
               instrument-manager/src/java/org/apache/excalibur/instrument/manager
                        InstrumentProxy.java
               instrument-manager/src/test/org/apache/excalibur/instrument/manager/test
                        DefaultInstrumentManagerTestCase.java
               logger/src/java/org/apache/avalon/excalibur/logger
                        DefaultLogTargetFactoryManager.java
                        DefaultLoggerManager.java
               monitor/src/java/org/apache/avalon/excalibur/monitor
                        MonitorableURLSource.java
               pool/src/java/org/apache/avalon/excalibur/pool
                        AbstractPool.java
               pool/src/test/org/apache/avalon/excalibur/pool/test
                        MultiThreadedPoolComparisonProfile.java
                        PoolProfile.java
               sourceresolve/src/java/org/apache/excalibur/source
                        SourceFactory.java
               sourceresolve/src/java/org/apache/excalibur/source/impl
                        AbstractSource.java FileSource.java
                        ResourceSource.java URLSource.java
               thread/src/java/org/apache/avalon/excalibur/thread/impl
                        BasicThreadPool.java
               thread/src/test/org/apache/avalon/excalibur/thread/impl/test
                        ResourceLimitingThreadPoolTestCase.java
               threadcontext/src/java/org/apache/excalibur/threadcontext
                        ThreadContext.java
               xfc/src/test/org/apache/excalibur/xfc/test xfcTestCase.java
               xmlutil/src/java/org/apache/excalibur/xml/xslt
                        XSLTProcessorImpl.java
  Removed:     pool/src/java/org/apache/avalon/excalibur/pool Mutex.java
  Log:
  concerted effort to go through and remove any issues remaining for excalibur components--reduced FIX ME's and readded the SourceResolver to the set of components that FOrtress has on init
  
  Revision  Changes    Path
  1.5       +2 -3      avalon-excalibur/compatibility/src/java/org/apache/avalon/excalibur/io/FileUtil.java
  
  Index: FileUtil.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/compatibility/src/java/org/apache/avalon/excalibur/io/FileUtil.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FileUtil.java	22 Mar 2003 12:46:24 -0000	1.4
  +++ FileUtil.java	29 Mar 2003 18:53:24 -0000	1.5
  @@ -714,8 +714,7 @@
   
               return file;
           }
  -        // FIXME: I'm almost certain this // removal is unnecessary, as getAbsoluteFile() strips
  -        // them. However, I'm not sure about this UNC stuff. (JT)
  +
           final char[] chars = filename.toCharArray();
           final StringBuffer sb = new StringBuffer();
   
  
  
  
  1.2       +1 -1      avalon-excalibur/compatibility/src/test/org/apache/avalon/excalibur/collections/test/ThreadedMapTest.java
  
  Index: ThreadedMapTest.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/compatibility/src/test/org/apache/avalon/excalibur/collections/test/ThreadedMapTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ThreadedMapTest.java	11 Mar 2003 13:29:18 -0000	1.1
  +++ ThreadedMapTest.java	29 Mar 2003 18:53:24 -0000	1.2
  @@ -36,7 +36,7 @@
       public void setUp()
       {
           System.gc();
  -        try {Thread.currentThread().sleep(100);} catch(Exception e){}
  +        try {Thread.sleep(100);} catch(Exception e){}
       }
       
       public void tearDown()
  
  
  
  1.5       +19 -19    avalon-excalibur/compatibility/src/test/org/apache/avalon/excalibur/concurrent/test/ReadWriteLockTestCase.java
  
  Index: ReadWriteLockTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/compatibility/src/test/org/apache/avalon/excalibur/concurrent/test/ReadWriteLockTestCase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ReadWriteLockTestCase.java	22 Mar 2003 12:46:25 -0000	1.4
  +++ ReadWriteLockTestCase.java	29 Mar 2003 18:53:24 -0000	1.5
  @@ -150,16 +150,16 @@
           final TriesReadLock rl = new TriesReadLock( lock );
   
           rl.start();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
           assertTrue( "Attempted to aquire read lock.", rl.hasSuccess() );
   
           wl.start();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
           assertTrue( "Attempted to aquire write lock.", !wl.hasSuccess() );
   
           lock.release();
   
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
           assertTrue( "Attempted to aquire write lock after releasing read lock.",
                       wl.hasSuccess() );
   
  @@ -170,7 +170,7 @@
           //
           final TriesReadLock r2 = new TriesReadLock( lock );
           r2.start();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
           assertTrue( "Attempted to aquire read lock.", r2.hasSuccess() );
   
           lock.release();
  @@ -208,7 +208,7 @@
           TriesWriteLock wlb = new TriesWriteLock( lock );
   
           rla.start();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
           assertTrue( "Attempted to aquire read lock.", rla.hasSuccess() );
   
           wla.start();
  @@ -218,10 +218,10 @@
           // Give the write lock threads some time to attempt
           // to aquire a lock.
           //
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
   
           rlb.start();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
   
           //
           // Two write locks queued up, one read lock queued up.
  @@ -238,7 +238,7 @@
           // lock should still be waiting.
           //
           lock.release();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
   
           //
           // One write lock queued up, one read lock queued up.
  @@ -255,7 +255,7 @@
           // Release write lock again. The other one of wla and wlb should grab the lock.
           //
           lock.release();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
   
           //
           // Two write locks queued up, one read lock queued up.
  @@ -270,7 +270,7 @@
           // Release the lock - the waiting read lock should grab it.
           //
           lock.release();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
           assertTrue( "Attempted to aquire write lock after releasing read lock.",
                       wla.hasSuccess() && wlb.hasSuccess() && rlb.hasSuccess() );
       }
  @@ -288,21 +288,21 @@
   
           rla.start();
           rlb.start();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
           assertTrue( "Attempted to aquire read multiple read locks.",
                       rla.hasSuccess() && rlb.hasSuccess() );
   
           wla.start();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
           assertTrue( "Write lock aquired even though read locks are held.", !wla.hasSuccess() );
   
           lock.release();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
           assertTrue( "Write lock aquired even though read locks are held. (There should be one read lock left)",
                       !wla.hasSuccess() );
   
           lock.release();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
           assertTrue( "Write lock not aquired even though lock should be released.",
                       wla.hasSuccess() );
       }
  @@ -323,7 +323,7 @@
           // and try aquiring a write lock (should not work).
           //
           rla.start();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
           assertTrue( "Could not aquire a read lock.", rla.hasSuccess() );
   
           assertTrue( "Could not aquire a read lock, even though only a read lock is held.",
  @@ -374,7 +374,7 @@
           // Grab a read lock.
           //
           rla.start();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
           assertTrue( rla.hasSuccess() );
   
           //
  @@ -382,7 +382,7 @@
           // because we are holding a read lock.)
           //
           wla.start();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
           assertTrue( !wla.hasSuccess() );
   
           //
  @@ -402,12 +402,12 @@
           // would fail.
           //
           rlb.start();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
           assertTrue( rlb.hasSuccess() );
           lock.release();
   
           wlb.start();
  -        Thread.currentThread().sleep( 100 );
  +        Thread.sleep( 100 );
           assertTrue( wlb.hasSuccess() );
           lock.release();
       }
  
  
  
  1.22      +2 -6      avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ExcaliburComponentSelector.java
  
  Index: ExcaliburComponentSelector.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ExcaliburComponentSelector.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- ExcaliburComponentSelector.java	25 Feb 2003 16:28:21 -0000	1.21
  +++ ExcaliburComponentSelector.java	29 Mar 2003 18:53:24 -0000	1.22
  @@ -353,11 +353,7 @@
       public void compose( final ComponentManager componentManager )
           throws ComponentException
       {
  -        //HACK: Is this necessary???
  -        if( null == m_componentManager )
  -        {
  -            m_componentManager = componentManager;
  -        }
  +        m_componentManager = componentManager;
       }
   
       /*---------------------------------------------------------------
  
  
  
  1.8       +1 -4      avalon-excalibur/event/src/test/org/apache/excalibur/mpool/test/MultiThreadedPoolComparisonProfile.java
  
  Index: MultiThreadedPoolComparisonProfile.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/event/src/test/org/apache/excalibur/mpool/test/MultiThreadedPoolComparisonProfile.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- MultiThreadedPoolComparisonProfile.java	22 Mar 2003 12:46:30 -0000	1.7
  +++ MultiThreadedPoolComparisonProfile.java	29 Mar 2003 18:53:24 -0000	1.8
  @@ -68,9 +68,6 @@
   {
       protected static final int THREADS = 100;
   
  -    private int m_startedCount;
  -    private boolean m_latched;
  -    private int m_completedCount;
       private int m_getCount;
       private Throwable m_throwable;
   
  
  
  
  1.10      +1 -12     avalon-excalibur/event/src/test/org/apache/excalibur/mpool/test/PoolComparisonProfileAbstract.java
  
  Index: PoolComparisonProfileAbstract.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/event/src/test/org/apache/excalibur/mpool/test/PoolComparisonProfileAbstract.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PoolComparisonProfileAbstract.java	22 Mar 2003 12:46:30 -0000	1.9
  +++ PoolComparisonProfileAbstract.java	29 Mar 2003 18:53:24 -0000	1.10
  @@ -116,7 +116,6 @@
   
           Class poolableClass = SmallPoolable.class;
           ClassInstanceObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
  -        int min = 0;
           int max = 100;
           boolean maxStrict = true;
           boolean blocking = false;
  @@ -145,7 +144,6 @@
   
           Class poolableClass = SmallPoolable.class;
           ClassInstanceObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
  -        int min = 0;
           int max = 100;
           long blockTimeout = 1;
   
  @@ -170,7 +168,6 @@
   
           Class poolableClass = MediumPoolable.class;
           ClassInstanceObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
  -        int min = 0;
           int max = 100;
           long blockTimeout = 1;
   
  @@ -195,7 +192,6 @@
   
           Class poolableClass = LargePoolable.class;
           ClassInstanceObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
  -        int min = 0;
           int max = 100;
           long blockTimeout = 1;
   
  @@ -220,7 +216,6 @@
   
           Class poolableClass = LargePoolable.class;
           ClassInstanceObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
  -        int min = 0;
           int max = 100;
           boolean maxStrict = true;
           boolean blocking = false;
  @@ -387,7 +382,6 @@
   
           Class poolableClass = SmallPoolable.class;
           ClassInstanceObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
  -        int min = 0;
           int max = 100;
           boolean maxStrict = false;
           boolean blocking = false;
  @@ -416,7 +410,6 @@
   
           Class poolableClass = SmallPoolable.class;
           ClassInstanceObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
  -        int min = 0;
           int max = 100;
           boolean maxStrict = false;
           boolean blocking = false;
  @@ -445,7 +438,6 @@
   
           Class poolableClass = MediumPoolable.class;
           ClassInstanceObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
  -        int min = 0;
           int max = 100;
           boolean maxStrict = false;
           boolean blocking = false;
  @@ -474,7 +466,6 @@
   
           Class poolableClass = MediumPoolable.class;
           ClassInstanceObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
  -        int min = 0;
           int max = 100;
           boolean maxStrict = false;
           boolean blocking = false;
  @@ -503,7 +494,6 @@
   
           Class poolableClass = LargePoolable.class;
           ClassInstanceObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
  -        int min = 0;
           int max = 100;
           boolean maxStrict = false;
           boolean blocking = false;
  @@ -532,7 +522,6 @@
   
           Class poolableClass = LargePoolable.class;
           ClassInstanceObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
  -        int min = 0;
           int max = 100;
           boolean maxStrict = false;
           boolean blocking = false;
  
  
  
  1.6       +7 -7      avalon-excalibur/extension/src/test/org/apache/avalon/excalibur/extension/test/DeweyDecimalTestCase.java
  
  Index: DeweyDecimalTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/extension/src/test/org/apache/avalon/excalibur/extension/test/DeweyDecimalTestCase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DeweyDecimalTestCase.java	27 Feb 2003 15:20:56 -0000	1.5
  +++ DeweyDecimalTestCase.java	29 Mar 2003 18:53:24 -0000	1.6
  @@ -98,8 +98,8 @@
       {
           try
           {
  -            final DeweyDecimal dd6 = new DeweyDecimal( DD6 );
  -            assertTrue( "DeweyDecimal 6 parsed!", false );
  +            new DeweyDecimal( DD6 );
  +            fail( "DeweyDecimal 6 parsed!" );
           }
           catch( final NumberFormatException nfe )
           {
  @@ -107,8 +107,8 @@
   
           try
           {
  -            final DeweyDecimal dd7 = new DeweyDecimal( DD7 );
  -            assertTrue( "DeweyDecimal 7 parsed!", false );
  +            new DeweyDecimal( DD7 );
  +            fail( "DeweyDecimal 7 parsed!" );
           }
           catch( final NumberFormatException nfe )
           {
  @@ -116,8 +116,8 @@
   
           try
           {
  -            final DeweyDecimal dd8 = new DeweyDecimal( DD8 );
  -            assertTrue( "DeweyDecimal 8 parsed!", false );
  +            new DeweyDecimal( DD8 );
  +            fail( "DeweyDecimal 8 parsed!" );
           }
           catch( final NumberFormatException nfe )
           {
  
  
  
  1.71      +2 -2      avalon-excalibur/fortress/default.properties
  
  Index: default.properties
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/default.properties,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- default.properties	18 Mar 2003 17:28:02 -0000	1.70
  +++ default.properties	29 Mar 2003 18:53:24 -0000	1.71
  @@ -17,7 +17,7 @@
   # --------------------------------------------------
   
   # ----- Doug Lea's Concurrent Utils, version 1.3 or later -----
  -util.concurrent.jar=${basedir}/../event/lib/util.concurrent-1.3.1.jar
  +util.concurrent.jar=${basedir}/../lib/util.concurrent-1.3.1.jar
   
   # ----- QDox Jar ----
   qdox.jar=${basedir}/../lib/qdox-1.1.jar
  @@ -49,7 +49,7 @@
   excalibur-event.jar=${excalibur-event.lib}/excalibur-event-1.0.2.jar
   
   # ----- Commons collections, version 2.1 or later -----
  -commons-collections.jar=${basedir}/../event/lib/commons-collections-2.1.jar
  +commons-collections.jar=${basedir}/../lib/commons-collections-2.1.jar
   
   # ----- Excalibur Source Resolver, version 1.0 or later -----
   excalibur-sourceresolve.home=${basedir}/../sourceresolve/dist
  
  
  
  1.10      +1 -7      avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/ContextBuilder.java
  
  Index: ContextBuilder.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/ContextBuilder.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ContextBuilder.java	22 Mar 2003 12:46:34 -0000	1.9
  +++ ContextBuilder.java	29 Mar 2003 18:53:24 -0000	1.10
  @@ -131,12 +131,6 @@
           return this;
       }
   
  -    public ContextBuilder setServiceManagerParent( ServiceManager serviceManager )
  -    {
  -        m_config.setServiceManagerParent( serviceManager );
  -        return this;
  -    }
  -
       public ContextBuilder setServiceManager( ServiceManager serviceManager )
       {
           m_config.setServiceManager( serviceManager );
  
  
  
  1.14      +36 -79    avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/ContextManager.java
  
  Index: ContextManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/ContextManager.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ContextManager.java	22 Mar 2003 12:46:34 -0000	1.13
  +++ ContextManager.java	29 Mar 2003 18:53:24 -0000	1.14
  @@ -99,19 +99,19 @@
    * further operations will be possible on it.</p>
    *
    * <p>You can get two different contexts from the ContextManager: the child
  - * context and the impl m_manager context. The former contains all
  - * managers, such as the pool m_manager etc. necessary for a child impl to
  - * create additional child containers. The impl m_manager context contains
  + * context and the impl manager context. The former contains all
  + * managers, such as the pool manager etc. necessary for a child impl to
  + * create additional child containers. The impl manager context contains
    * all of the child context, but also initialization parameters for the
    * impl, such as a Configuration object, a ComponentLocator, etc., that
    * the impl wants, but does not want to pass on to its children.</p>
    *
  - * <p>You would typically use the impl m_manager context to initialize
  - * the impl m_manager, and let it pass the child context on to the
  + * <p>You would typically use the impl manager context to initialize
  + * the impl manager, and let it pass the child context on to the
    * impl.</p>
    *
    * <p>The ContextManager will sometimes create new components, such as a
  - * component m_manager, a pool m_manager, etc. It will manage these components
  + * component manager, a pool manager, etc. It will manage these components
    * and dispose of them properly when it itself is disposed .</p>
    *
    * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
  @@ -144,8 +144,8 @@
       private final DefaultContext m_childContext;
   
       /**
  -     * Container m_manager's context. This context has the child context
  -     * as parent. Put things here that you want the impl m_manager
  +     * Container manager's context. This context has the child context
  +     * as parent. Put things here that you want the impl manager
        * to see, but do not wish to expose to the impl.
        */
       private final DefaultContext m_containerManagerContext;
  @@ -162,7 +162,7 @@
   
       /**
        * The components that are "owned" by this context and should
  -     * be disposed by it. Any m_manager that is created as a result
  +     * be disposed by it. Any manager that is created as a result
        * of it not being in the rootContext, or having been created
        * by the ContextManager should go in here.
        */
  @@ -188,7 +188,7 @@
           m_logger = logger;
   
           // The primordial logger is used for all output up until the point where
  -        //  the logger m_manager has been initialized.  However it is set into
  +        //  the logger manager has been initialized.  However it is set into
           //  two objects used to load the configuration resource files within
           //  the ContextManager.  Any problems loading these files will result in
           //  warning or error messages.  However in most cases, the debug
  @@ -201,21 +201,19 @@
        * Method to assume ownership of one of the managers the
        * <code>ContextManager</code> created.  Ownership means that the
        * <code>ContextManager</code> is responsible for destroying the
  -     * m_manager when the <code>ContextManager</code> is destroyed.
  -     *
  -     * FIXME: We should throw a NullPointerException instead.
  +     * manager when the <code>ContextManager</code> is destroyed.
        *
        * @param o  The object being claimed
        *
        * @throws IllegalArgumentException if the object is null.
        */
  -    private void assumeOwnership( Object o )
  +    private void assumeOwnership( Object object )
       {
  -        if( o == null )
  +        if( object == null )
           {
  -            throw new IllegalArgumentException( "Can not assume ownership of a null!" );
  +            throw new NullPointerException( "object: Can not assume ownership of a null!" );
           }
  -        ownedComponents.add( o );
  +        ownedComponents.add( object );
       }
   
       /**
  @@ -227,10 +225,9 @@
        */
       public void initialize() throws Exception
       {
  -        initializeOwnComponentManager();
  +        initializeServiceManager();
           initializeLoggerManager();
           initializeRoleManager();
  -        initializeServiceManager();
           initializeCommandQueue();
           initializePoolManager();
           initializeContext();
  @@ -258,7 +255,7 @@
               if( containerConfig == null )
               {
                   // No config.
  -                // Does the parent supply a logger m_manager?
  +                // Does the parent supply a logger manager?
                   try
                   {
                       m_containerManagerContext.get( CONFIGURATION );
  @@ -361,49 +358,6 @@
       }
   
       /**
  -     * Will set up a ServiceLocator if none is supplied.
  -     *
  -     * <p>The postcondition is that
  -     * <code>childContext.get( Container.SERVICE_MANAGER )</code> should
  -     * return a valid logger m_manager.</p>
  -     *
  -     * @throws Exception if the ServiceManager could not be instantiated.
  -     */
  -    protected void initializeServiceManager() throws Exception
  -    {
  -        try
  -        {
  -            m_childContext.put( SERVICE_MANAGER, m_rootContext.get( SERVICE_MANAGER ) );
  -            return;
  -        }
  -        catch( ContextException ce )
  -        {
  -        }
  -
  -        // See if we can inherit from the parent...
  -        try
  -        {
  -            m_childContext.get( SERVICE_MANAGER );
  -
  -            // OK, done.
  -            return;
  -        }
  -        catch( ContextException ce )
  -        {
  -            // No ComponentLocator available anywhere. (Set one up.)
  -        }
  -
  -        final ServiceManager parent = (ServiceManager)get( m_rootContext, SERVICE_MANAGER_PARENT, null );
  -
  -        if( null != parent )
  -        {
  -            ServiceManager sm = new DefaultServiceManager( parent );
  -            assumeOwnership( sm );
  -            m_containerManagerContext.put( SERVICE_MANAGER, sm );
  -        }
  -    }
  -
  -    /**
        * Set up the CommandQueue to enable asynchronous management.
        *
        * @throws Exception if the <code>CommandQueue</code> could not be
  @@ -450,7 +404,7 @@
           // Get the context Logger Manager
           LoggerManager loggerManager = (LoggerManager)m_childContext.get( LoggerManager.ROLE );
   
  -        // Get the logger for the thread m_manager
  +        // Get the logger for the thread manager
           Logger tmLogger = loggerManager.getLoggerForCategory( "system.threadmgr" );
   
           ContainerUtil.enableLogging( tm, tmLogger );
  @@ -571,19 +525,19 @@
           // Get the context Logger Manager
           LoggerManager loggerManager = (LoggerManager)m_childContext.get( LoggerManager.ROLE );
   
  -        // Create a logger for the role m_manager
  +        // Create a logger for the role manager
           Logger rmLogger = loggerManager.getLoggerForCategory(
               roleConfig.getAttribute( "logger", "system.roles" ) );
   
           // Lookup the context class loader
           ClassLoader classLoader = (ClassLoader)m_containerManagerContext.get( ClassLoader.class.getName() );
   
  -        // Create a parent role m_manager with all the default roles
  +        // Create a parent role manager with all the default roles
           FortressRoleManager erm = new FortressRoleManager( null, classLoader );
           erm.enableLogging( rmLogger.getChildLogger( "defaults" ) );
           erm.initialize();
   
  -        // Create a role m_manager with the configured roles
  +        // Create a role manager with the configured roles
           ConfigurableRoleManager rm = new ConfigurableRoleManager( erm, classLoader );
           rm.enableLogging( rmLogger );
           rm.configure( roleConfig );
  @@ -599,9 +553,10 @@
        *
        * @throws Exception when there is an error.
        */
  -    protected void initializeOwnComponentManager() throws Exception
  +    protected void initializeServiceManager() throws Exception
       {
  -        final DefaultServiceManager manager = new DefaultServiceManager();
  +        final ServiceManager parent = (ServiceManager)get(m_rootContext, SERVICE_MANAGER, null);
  +        final DefaultServiceManager manager = new DefaultServiceManager(parent);
           final DefaultServiceSelector selector = new DefaultServiceSelector();
           final ResourceSourceFactory resource = new ResourceSourceFactory();
           resource.enableLogging( getLogger() );
  @@ -622,6 +577,8 @@
           assumeOwnership( manager );
   
           m_manager = manager;
  +        
  +        m_childContext.put( ContextManagerConstants.SERVICE_MANAGER, m_manager );
       }
   
       /**
  @@ -724,7 +681,7 @@
        *
        * <p>The postcondition is that
        * <code>childContext.get( LoggerManager.ROLE )</code> should
  -     * return a valid logger m_manager.</p>
  +     * return a valid logger manager.</p>
        *
        * @throws Exception if it cannot instantiate the LoggerManager
        */
  @@ -732,7 +689,7 @@
       {
           try
           {
  -            // Try copying an already existing logger m_manager from the override context.
  +            // Try copying an already existing logger manager from the override context.
   
               m_childContext.put( LoggerManager.ROLE, m_rootContext.get( LoggerManager.ROLE ) );
           }
  @@ -746,7 +703,7 @@
               {
                   // No config specified.
   
  -                // Does the parent supply a logger m_manager?
  +                // Does the parent supply a logger manager?
                   try
                   {
                       m_childContext.get( LoggerManager.ROLE );
  @@ -809,7 +766,7 @@
        *
        * <p>The postcondition is that
        * <code>childContext.get( LoggerManager.ROLE )</code> should
  -     * return a valid logger m_manager.</p>
  +     * return a valid logger manager.</p>
        *
        * @throws Exception if it cannot instantiate the LoggerManager
        */
  @@ -817,7 +774,7 @@
       {
           try
           {
  -            // Try copying an already existing instrument m_manager from the override context.
  +            // Try copying an already existing instrument manager from the override context.
   
               m_childContext.put( InstrumentManager.ROLE, m_rootContext.get( InstrumentManager.ROLE ) );
           }
  @@ -829,7 +786,7 @@
               if( instrumentConfig == null )
               {
                   // No config.
  -                // Does the parent supply a logger m_manager?
  +                // Does the parent supply a logger manager?
                   try
                   {
                       m_childContext.get( InstrumentManager.ROLE );
  @@ -847,7 +804,7 @@
               // Get the context Logger Manager
               LoggerManager loggerManager = (LoggerManager)m_childContext.get( LoggerManager.ROLE );
   
  -            // Get the logger for the instrument m_manager
  +            // Get the logger for the instrument manager
               Logger imLogger = loggerManager.getLoggerForCategory(
                   instrumentConfig.getAttribute( "logger", "system.instrument" ) );
   
  @@ -868,7 +825,7 @@
        *
        * <p>The postcondition is that
        * <code>childContext.get( LoggerManager.ROLE )</code> should
  -     * return a valid logger m_manager.</p>
  +     * return a valid logger manager.</p>
        *
        * @throws Exception if it cannot instantiate the LoggerManager
        */
  @@ -884,7 +841,7 @@
               if( containerConfig == null )
               {
                   // No config.
  -                // Does the parent supply a logger m_manager?
  +                // Does the parent supply a logger manager?
                   try
                   {
                       m_containerManagerContext.get( ASSEMBLY_CONFIGURATION );
  
  
  
  1.5       +1 -3      avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/ContextManagerConstants.java
  
  Index: ContextManagerConstants.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/ContextManagerConstants.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ContextManagerConstants.java	22 Mar 2003 12:46:34 -0000	1.4
  +++ ContextManagerConstants.java	29 Mar 2003 18:53:24 -0000	1.5
  @@ -72,6 +72,4 @@
   
       String ASSEMBLY_CONFIGURATION_URI = "impl.assembly.config.uri";
       String CONFIGURATION_URI = "impl.configuration.uri";
  -
  -    String SERVICE_MANAGER_PARENT = "impl.serviceManager.parent";
   }
  
  
  
  1.11      +1 -6      avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/FortressConfig.java
  
  Index: FortressConfig.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/FortressConfig.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FortressConfig.java	22 Mar 2003 12:46:34 -0000	1.10
  +++ FortressConfig.java	29 Mar 2003 18:53:24 -0000	1.11
  @@ -156,11 +156,6 @@
           m_context.put( Queue.ROLE, commandQueue );
       }
   
  -    public void setServiceManagerParent( final ServiceManager serviceManager )
  -    {
  -        m_context.put( ContextManagerConstants.SERVICE_MANAGER_PARENT, serviceManager );
  -    }
  -
       public void setServiceManager( final ServiceManager componentManager )
       {
           m_context.put( ContextManagerConstants.SERVICE_MANAGER, componentManager );
  
  
  
  1.7       +2 -2      avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/HandlersTestCase.java
  
  Index: HandlersTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/HandlersTestCase.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- HandlersTestCase.java	22 Mar 2003 12:46:35 -0000	1.6
  +++ HandlersTestCase.java	29 Mar 2003 18:53:25 -0000	1.7
  @@ -67,7 +67,7 @@
    */
   public class HandlersTestCase extends TestCase
   {
  -    private Exception m_exception;
  +    protected Exception m_exception;
   
       public HandlersTestCase( final String name )
       {
  
  
  
  1.7       +2 -2      avalon-excalibur/instrument-client/src/java/org/apache/excalibur/instrument/client/AbstractOptionDialog.java
  
  Index: AbstractOptionDialog.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/instrument-client/src/java/org/apache/excalibur/instrument/client/AbstractOptionDialog.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractOptionDialog.java	22 Mar 2003 12:46:36 -0000	1.6
  +++ AbstractOptionDialog.java	29 Mar 2003 18:53:25 -0000	1.7
  @@ -80,7 +80,7 @@
       public static final int BUTTON_OK = 1;
       public static final int BUTTON_CANCEL = 2;
       
  -    private int m_action = BUTTON_CANCEL;
  +    protected int m_action = BUTTON_CANCEL;
       
       /*---------------------------------------------------------------
        * Constructors
  
  
  
  1.20      +6 -7      avalon-excalibur/instrument-client/src/java/org/apache/excalibur/instrument/client/InstrumentManagerConnection.java
  
  Index: InstrumentManagerConnection.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/instrument-client/src/java/org/apache/excalibur/instrument/client/InstrumentManagerConnection.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- InstrumentManagerConnection.java	22 Mar 2003 12:46:36 -0000	1.19
  +++ InstrumentManagerConnection.java	29 Mar 2003 18:53:25 -0000	1.20
  @@ -99,7 +99,7 @@
       extends JComponent
       implements LogEnabled
   {
  -    private final InstrumentClientFrame m_frame;
  +    protected final InstrumentClientFrame m_frame;
       private final String m_host;
       private final int m_port;
   
  @@ -110,7 +110,7 @@
       private HostContext m_altrmiHostContext;
       private Factory m_altrmiFactory;
       private InstrumentManagerClient m_manager;
  -    private InstrumentManagerTreeModel m_treeModel;
  +    protected InstrumentManagerTreeModel m_treeModel;
       private InstrumentManagerTree m_tree;
   
       private final ArrayList m_listeners = new ArrayList();
  @@ -539,7 +539,7 @@
           {
               try
               {
  -                String name = manager.getName();
  +                manager.getName();
                   return true;
               }
               catch ( InvocationException e )
  @@ -669,8 +669,7 @@
   
                       // If the sample already exists on the server, then the existing one
                       //  will be returned.
  -                    InstrumentSampleDescriptor sampleDescriptor =
  -                        instrumentDescriptor.createInstrumentSample(
  +                    instrumentDescriptor.createInstrumentSample(
                               dialog.getSampleDescription(),
                               dialog.getInterval(),
                               dialog.getSampleCount(),
  @@ -890,7 +889,7 @@
       /**
        * Invokes GC on the JVM running the InstrumentManager.
        */
  -    private void invokeGC()
  +    protected void invokeGC()
       {
           InstrumentManagerClient manager = getInstrumentManagerClient();
           if ( manager != null )
  
  
  
  1.12      +11 -11    avalon-excalibur/instrument-client/src/java/org/apache/excalibur/instrument/client/MenuBar.java
  
  Index: MenuBar.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/instrument-client/src/java/org/apache/excalibur/instrument/client/MenuBar.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- MenuBar.java	22 Mar 2003 12:46:38 -0000	1.11
  +++ MenuBar.java	29 Mar 2003 18:53:25 -0000	1.12
  @@ -75,7 +75,7 @@
   public class MenuBar
       extends JMenuBar
   {
  -    private InstrumentClientFrame m_frame;
  +    protected InstrumentClientFrame m_frame;
       //private ProfilerManager m_profilerManager;
   
       private JMenu m_menuFile;
  @@ -87,8 +87,6 @@
   
       private JMenu m_menuWindow;
   
  -    private boolean m_showUnconfigured;
  -
       /*---------------------------------------------------------------
        * Constructors
        *-------------------------------------------------------------*/
  @@ -211,7 +209,7 @@
           return m_menuInstrumentManagers;
       }
   
  -    private void rebuildInstrumentManagersMenu()
  +    protected void rebuildInstrumentManagersMenu()
       {
           m_menuInstrumentManagers.removeAll();
   
  @@ -276,7 +274,7 @@
           }
       }
   
  -    private void rebuildInstrumentManagerMenu( JMenu managerMenu,
  +    protected void rebuildInstrumentManagerMenu( JMenu managerMenu,
                                                  InstrumentManagerConnection connection )
       {
           managerMenu.removeAll();
  @@ -371,7 +369,7 @@
           }
       }
   
  -    private void rebuildInstrumentableMenu( JMenu instrumentableMenu,
  +    protected void rebuildInstrumentableMenu( JMenu instrumentableMenu,
                                               InstrumentManagerConnection connection,
                                               InstrumentableDescriptor instrumentableDescriptor )
       {
  @@ -442,7 +440,7 @@
           }
       }
   
  -    private void rebuildInstrumentMenu( JMenu instrumentMenu,
  +    protected void rebuildInstrumentMenu( JMenu instrumentMenu,
                                           InstrumentManagerConnection connection,
                                           InstrumentableDescriptor instrumentableDescriptor,
                                           InstrumentDescriptor instrumentDescriptor )
  @@ -456,10 +454,11 @@
           {
               public void actionPerformed( ActionEvent event )
               {
  +                /*  Not implemented.
  +
                   JMenuItem item = (JMenuItem)event.getSource();
                   Action action = item.getAction();
   
  -                /*
                   m_frame.instrumentCreateSample(
                       (InstrumentManagerConnection)action.getValue( "InstrumentManagerConnection" ),
                       (InstrumentDescriptor)action.getValue( "InstrumentDescriptor" ) );
  @@ -495,10 +494,11 @@
                           {
                               public void actionPerformed( ActionEvent event )
                               {
  +                                /* Not implemented
  +
                                   JMenuItem menu = (JMenuItem)event.getSource();
                                   Action action = menu.getAction();
   
  -                                /*
                                   m_frame.openInstrumentSampleFrame(
                                       (InstrumentManagerConnection)action.getValue(
                                           "InstrumentManagerConnection" ),
  @@ -615,7 +615,7 @@
           return m_menuWindow;
       }
   
  -    private void rebuildWindowMenu()
  +    protected void rebuildWindowMenu()
       {
           m_menuWindow.removeAll();
   
  
  
  
  1.7       +1 -4      avalon-excalibur/instrument-manager/src/java/org/apache/excalibur/instrument/manager/InstrumentProxy.java
  
  Index: InstrumentProxy.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/instrument-manager/src/java/org/apache/excalibur/instrument/manager/InstrumentProxy.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- InstrumentProxy.java	25 Feb 2003 16:28:16 -0000	1.6
  +++ InstrumentProxy.java	29 Mar 2003 18:53:25 -0000	1.7
  @@ -709,9 +709,6 @@
               ", size=" + sampleSize + ", lease=" + sampleLease + ", type=" +
               InstrumentSampleUtils.getInstrumentSampleTypeName( sampleType ) );
           
  -        // Validate the parameters
  -        long now = System.currentTimeMillis();
  -        
           // Generate a name for the new sample
           String sampleName = InstrumentSampleUtils.generateFullInstrumentSampleName(
               m_name, sampleType, sampleInterval, sampleSize );
  
  
  
  1.6       +7 -8      avalon-excalibur/instrument-manager/src/test/org/apache/excalibur/instrument/manager/test/DefaultInstrumentManagerTestCase.java
  
  Index: DefaultInstrumentManagerTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/instrument-manager/src/test/org/apache/excalibur/instrument/manager/test/DefaultInstrumentManagerTestCase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultInstrumentManagerTestCase.java	22 Mar 2003 12:46:44 -0000	1.5
  +++ DefaultInstrumentManagerTestCase.java	29 Mar 2003 18:53:25 -0000	1.6
  @@ -55,10 +55,8 @@
   import org.apache.avalon.framework.logger.ConsoleLogger;
   import org.apache.excalibur.instrument.manager.DefaultInstrumentManager;
   import org.apache.excalibur.instrument.manager.interfaces.InstrumentDescriptor;
  -import org.apache.excalibur.instrument.manager.interfaces.InstrumentSampleDescriptor;
   import org.apache.excalibur.instrument.manager.interfaces.InstrumentableDescriptor;
   import org.apache.excalibur.instrument.manager.interfaces.NoSuchInstrumentException;
  -import org.apache.excalibur.instrument.manager.interfaces.NoSuchInstrumentSampleException;
   import org.apache.excalibur.instrument.manager.interfaces.NoSuchInstrumentableException;
   
   /**
  @@ -122,8 +120,7 @@
       {
           try
           {
  -            InstrumentableDescriptor descriptor =
  -                m_instrumentManager.locateInstrumentableDescriptor( name );
  +            m_instrumentManager.locateInstrumentableDescriptor( name );
               fail( "Found an instrumentable named " + name + " when it should not have existed." );
           }
           catch( NoSuchInstrumentableException e )
  @@ -143,8 +140,7 @@
       {
           try
           {
  -            InstrumentDescriptor descriptor =
  -                m_instrumentManager.locateInstrumentDescriptor( name );
  +            m_instrumentManager.locateInstrumentDescriptor( name );
               fail( "Found an instrument named " + name + " when it should not have existed." );
           }
           catch( NoSuchInstrumentException e )
  @@ -153,13 +149,15 @@
           }
       }
       
  +    /* Never called
       private void assertInstrumentSampleExists( String name )
       {
           InstrumentSampleDescriptor descriptor =
               m_instrumentManager.locateInstrumentSampleDescriptor( name );
           assertEquals( "Looked up instrument sample name incorrect.", descriptor.getName(), name );
       }
  -    
  +    */
  +    /* Never called
       private void assertInstrumentSampleNotExists( String name )
       {
           try
  @@ -173,6 +171,7 @@
               // Ok
           }
       }
  +    */
       
       /*---------------------------------------------------------------
        * Test Cases
  
  
  
  1.10      +1 -3      avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger/DefaultLogTargetFactoryManager.java
  
  Index: DefaultLogTargetFactoryManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger/DefaultLogTargetFactoryManager.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DefaultLogTargetFactoryManager.java	22 Mar 2003 12:46:48 -0000	1.9
  +++ DefaultLogTargetFactoryManager.java	29 Mar 2003 18:53:25 -0000	1.10
  @@ -137,8 +137,6 @@
               final String factoryClass = confs[ i ].getAttribute( "class" );
               final String factoryType = confs[ i ].getAttribute( "type" );
   
  -            //FIXME(GP): Is this the right way to load a class or
  -            //           should the ContextClassLoader be used?
               final LogTargetFactory logTargetFactory;
               try
               {
  
  
  
  1.5       +1 -3      avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger/DefaultLoggerManager.java
  
  Index: DefaultLoggerManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger/DefaultLoggerManager.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultLoggerManager.java	22 Mar 2003 12:46:48 -0000	1.4
  +++ DefaultLoggerManager.java	29 Mar 2003 18:53:25 -0000	1.5
  @@ -72,8 +72,6 @@
    * define, which logger manager (Log4J, LogKit etc.) you want to use, so
    * you don't have to hard-code this.
    * 
  - * FIXME: This is only a start, it's neither tested not run
  - *
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
    * @version CVS $Revision$ $Date$
    */
  
  
  
  1.10      +3 -3      avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/MonitorableURLSource.java
  
  Index: MonitorableURLSource.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/MonitorableURLSource.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- MonitorableURLSource.java	22 Mar 2003 12:46:50 -0000	1.9
  +++ MonitorableURLSource.java	29 Mar 2003 18:53:25 -0000	1.10
  @@ -75,9 +75,9 @@
           throws Exception
       {
           checkInfos();
  -        if( null != file )
  +        if( null != m_file )
           {
  -            return new FileResource( file.getAbsolutePath() );
  +            return new FileResource( m_file.getAbsolutePath() );
           }
           else
           {
  
  
  
  1.10      +3 -1      avalon-excalibur/pool/src/java/org/apache/avalon/excalibur/pool/AbstractPool.java
  
  Index: AbstractPool.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/pool/src/java/org/apache/avalon/excalibur/pool/AbstractPool.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AbstractPool.java	7 Mar 2003 13:36:06 -0000	1.9
  +++ AbstractPool.java	29 Mar 2003 18:53:25 -0000	1.10
  @@ -58,6 +58,8 @@
   import org.apache.commons.collections.Buffer;
   import org.apache.commons.collections.UnboundedFifoBuffer;
   
  +import EDU.oswego.cs.dl.util.concurrent.Mutex;
  +
   /**
    * This is an <code>Pool</code> that caches Poolable objects for reuse.
    *
  
  
  
  1.5       +4 -7      avalon-excalibur/pool/src/test/org/apache/avalon/excalibur/pool/test/MultiThreadedPoolComparisonProfile.java
  
  Index: MultiThreadedPoolComparisonProfile.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/pool/src/test/org/apache/avalon/excalibur/pool/test/MultiThreadedPoolComparisonProfile.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MultiThreadedPoolComparisonProfile.java	22 Mar 2003 12:46:54 -0000	1.4
  +++ MultiThreadedPoolComparisonProfile.java	29 Mar 2003 18:53:25 -0000	1.5
  @@ -67,12 +67,9 @@
   {
       protected static final int THREADS = 100;
   
  -    private Object m_semaphore = new Object();
  -    private int m_startedCount;
  -    private boolean m_latched;
  -    private int m_completedCount;
  -    private int m_getCount;
  -    private Throwable m_throwable;
  +    protected Object m_semaphore = new Object();
  +    protected int m_getCount;
  +    protected Throwable m_throwable;
   
       /*---------------------------------------------------------------
        * Constructors
  
  
  
  1.7       +30 -40    avalon-excalibur/pool/src/test/org/apache/avalon/excalibur/pool/test/PoolProfile.java
  
  Index: PoolProfile.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/pool/src/test/org/apache/avalon/excalibur/pool/test/PoolProfile.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PoolProfile.java	22 Mar 2003 12:46:54 -0000	1.6
  +++ PoolProfile.java	29 Mar 2003 18:53:25 -0000	1.7
  @@ -151,8 +151,7 @@
   
           final SingleThreadedPool pool1 = new SingleThreadedPool( A.class, 5, 10 );
           final long pool1Start = System.currentTimeMillis();
  -        final int pool1Factor = 1;
  -        final int pool1Loops = TEST_SIZE / pool1Factor;
  +
           for( int i = 0; i < TEST_SIZE; i++ )
           {
               final Poolable a1 = pool1.get();
  @@ -163,7 +162,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 1: " + Runtime.getRuntime().freeMemory() );
   
  @@ -199,7 +198,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 2: " + Runtime.getRuntime().freeMemory() );
   
  @@ -245,7 +244,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 3: " + Runtime.getRuntime().freeMemory() );
   
  @@ -304,7 +303,7 @@
           final long createStart = System.currentTimeMillis();
           for( int i = 0; i < TEST_SIZE; i++ )
           {
  -            final Poolable a1 = new C();
  +            new C();
           }
           final long createEnd = System.currentTimeMillis();
           final long createDuration = createEnd - createStart;
  @@ -336,12 +335,10 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           final SingleThreadedPool pool1 = new SingleThreadedPool( B.class, 5, 10 );
           final long pool1Start = System.currentTimeMillis();
  -        final int pool1Factor = 1;
  -        final int pool1Loops = TEST_SIZE / pool1Factor;
   
           for( int i = 0; i < TEST_SIZE; i++ )
           {
  @@ -353,7 +350,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 1: " + Runtime.getRuntime().freeMemory() );
   
  @@ -390,7 +387,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 2: " + Runtime.getRuntime().freeMemory() );
   
  @@ -437,7 +434,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 3: " + Runtime.getRuntime().freeMemory() );
   
  @@ -497,7 +494,7 @@
           final long createStart = System.currentTimeMillis();
           for( int i = 0; i < TEST_SIZE; i++ )
           {
  -            final Poolable a1 = new C();
  +            new C();
           }
           final long createEnd = System.currentTimeMillis();
           final long createDuration = createEnd - createStart;
  @@ -530,12 +527,11 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           final SingleThreadedPool pool1 = new SingleThreadedPool( C.class, 5, 10 );
           final long pool1Start = System.currentTimeMillis();
  -        final int pool1Factor = 1;
  -        final int pool1Loops = TEST_SIZE / pool1Factor;
  +
           for( int i = 0; i < TEST_SIZE; i++ )
           {
               final Poolable a1 = pool1.get();
  @@ -546,7 +542,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 1: " + Runtime.getRuntime().freeMemory() );
   
  @@ -582,7 +578,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 2: " + Runtime.getRuntime().freeMemory() );
   
  @@ -628,7 +624,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 3: " + Runtime.getRuntime().freeMemory() );
   
  @@ -688,7 +684,7 @@
           final long createStart = System.currentTimeMillis();
           for( int i = 0; i < TEST_SIZE; i++ )
           {
  -            final Poolable a1 = new C();
  +            new C();
           }
           final long createEnd = System.currentTimeMillis();
           final long createDuration = createEnd - createStart;
  @@ -721,8 +717,6 @@
           final DefaultPool pool1 = new DefaultPool( A.class, 5, 10 );
           pool1.enableLogging( poolLogger );
           final long pool1Start = System.currentTimeMillis();
  -        final int pool1Factor = 1;
  -        final int pool1Loops = TEST_SIZE / pool1Factor;
   
           for( int i = 0; i < TEST_SIZE; i++ )
           {
  @@ -734,7 +728,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 1: " + Runtime.getRuntime().freeMemory() );
   
  @@ -772,7 +766,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 2: " + Runtime.getRuntime().freeMemory() );
   
  @@ -820,7 +814,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 3: " + Runtime.getRuntime().freeMemory() );
   
  @@ -881,7 +875,7 @@
           final long createStart = System.currentTimeMillis();
           for( int i = 0; i < TEST_SIZE; i++ )
           {
  -            final Poolable a1 = new C();
  +            new C();
           }
           final long createEnd = System.currentTimeMillis();
           final long createDuration = createEnd - createStart;
  @@ -914,13 +908,11 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           final DefaultPool pool1 = new DefaultPool( B.class, 5, 10 );
           pool1.enableLogging( poolLogger );
           final long pool1Start = System.currentTimeMillis();
  -        final int pool1Factor = 1;
  -        final int pool1Loops = TEST_SIZE / pool1Factor;
   
           for( int i = 0; i < TEST_SIZE; i++ )
           {
  @@ -932,7 +924,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 1: " + Runtime.getRuntime().freeMemory() );
   
  @@ -982,7 +974,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 2: " + Runtime.getRuntime().freeMemory() );
   
  @@ -1047,7 +1039,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 3: " + Runtime.getRuntime().freeMemory() );
   
  @@ -1128,7 +1120,7 @@
           final long createStart = System.currentTimeMillis();
           for( int i = 0; i < TEST_SIZE; i++ )
           {
  -            final Poolable a1 = new C();
  +            new C();
           }
           final long createEnd = System.currentTimeMillis();
           final long createDuration = createEnd - createStart;
  @@ -1161,13 +1153,11 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           final DefaultPool pool1 = new DefaultPool( C.class, 5, 10 );
           pool1.enableLogging( poolLogger );
           final long pool1Start = System.currentTimeMillis();
  -        final int pool1Factor = 1;
  -        final int pool1Loops = TEST_SIZE / pool1Factor;
   
           for( int i = 0; i < TEST_SIZE; i++ )
           {
  @@ -1180,7 +1170,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 1: " + Runtime.getRuntime().freeMemory() );
   
  @@ -1230,7 +1220,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 2: " + Runtime.getRuntime().freeMemory() );
   
  @@ -1295,7 +1285,7 @@
   
           System.gc();
           System.gc();
  -        Thread.currentThread().sleep( 2 );
  +        Thread.sleep( 2 );
   
           if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 3: " + Runtime.getRuntime().freeMemory() );
   
  @@ -1356,7 +1346,7 @@
           final long createStart = System.currentTimeMillis();
           for( int i = 0; i < TEST_SIZE; i++ )
           {
  -            final Poolable a1 = new C();
  +            new C();
           }
           final long createEnd = System.currentTimeMillis();
           final long createDuration = createEnd - createStart;
  
  
  
  1.7       +4 -6      avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/SourceFactory.java
  
  Index: SourceFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/SourceFactory.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SourceFactory.java	29 Jan 2003 06:56:01 -0000	1.6
  +++ SourceFactory.java	29 Mar 2003 18:53:26 -0000	1.7
  @@ -55,7 +55,6 @@
   package org.apache.excalibur.source;
   
   import java.io.IOException;
  -import java.net.MalformedURLException;
   import java.util.Map;
   
   import org.apache.avalon.framework.component.Component;
  @@ -90,12 +89,11 @@
        *        that drive the creation of the <code>Source</code> object. Each implementation
        *        must specify what parameters it accepts.
        * @return the created source object.
  -     * @throws MalformedURLException if the location is malformed.
  -     * @throws IOException if the source couldn't be created for some other reason.
  +     *
  +     * @throws IOException if the source couldn't be created for some reason.
        */
  -    //FIXME : can we really have an IOException here ?
       Source getSource( String location, Map parameters )
  -        throws MalformedURLException, IOException;
  +        throws IOException;
       
       /**
        * Release a {@link Source} object.
  
  
  
  1.10      +51 -15    avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/AbstractSource.java
  
  Index: AbstractSource.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/AbstractSource.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AbstractSource.java	29 Jan 2003 06:56:01 -0000	1.9
  +++ AbstractSource.java	29 Mar 2003 18:53:26 -0000	1.10
  @@ -71,12 +71,12 @@
   public abstract class AbstractSource
       implements Source
   {
  -    protected boolean gotInfos;
  -    protected long lastModificationDate;
  -    protected long contentLength;
  -    protected String systemId;
  +    private boolean m_gotInfos;
  +    private long m_lastModificationDate;
  +    private long m_contentLength;
  +    private String m_systemId;
   
  -	protected String scheme;
  +	private String m_scheme;
   
       /**
        * Get the last modification date and content length of the source.
  @@ -85,16 +85,16 @@
        */
       protected void getInfos()
       {
  -        this.contentLength = -1;
  -        this.lastModificationDate = 0;
  +        this.m_contentLength = -1;
  +        this.m_lastModificationDate = 0;
       }
   
       protected void checkInfos()
       {
  -        if( !this.gotInfos )
  +        if( !m_gotInfos )
           {
               getInfos();
  -            this.gotInfos = true;
  +            m_gotInfos = true;
           }
       }
   
  @@ -116,7 +116,7 @@
        */
       public String getURI()
       {
  -        return this.systemId;
  +        return m_systemId;
       }
   
       /**
  @@ -124,7 +124,7 @@
        */
       public String getScheme() 
       {
  -    	return this.scheme;
  +    	return this.m_scheme;
       }
   
       /**
  @@ -144,7 +144,7 @@
        */
       public void refresh()
       {
  -        this.gotInfos = false;
  +        m_gotInfos = false;
       }
   
       /**
  @@ -164,7 +164,7 @@
       public long getContentLength()
       {
           checkInfos();
  -        return this.contentLength;
  +        return this.m_contentLength;
       }
   
       /**
  @@ -174,6 +174,42 @@
       public long getLastModified()
       {
           checkInfos();
  -        return this.lastModificationDate;
  +        return this.m_lastModificationDate;
       }
  +    /**
  +     * Sets the contentLength.
  +     * @param contentLength The contentLength to set
  +     */
  +    protected void setContentLength(long contentLength)
  +    {
  +        m_contentLength = contentLength;
  +    }
  +
  +    /**
  +     * Sets the lastModificationDate.
  +     * @param setLastModified The lastModificationDate to set
  +     */
  +    protected void setLastModified(long lastModificationDate)
  +    {
  +        m_lastModificationDate = lastModificationDate;
  +    }
  +
  +    /**
  +     * Sets the scheme.
  +     * @param scheme The scheme to set
  +     */
  +    protected void setScheme(String scheme)
  +    {
  +        m_scheme = scheme;
  +    }
  +
  +    /**
  +     * Sets the systemId.
  +     * @param systemId The systemId to set
  +     */
  +    protected void setSystemId(String systemId)
  +    {
  +        m_systemId = systemId;
  +    }
  +
   }
  
  
  
  1.3       +9 -9      avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/FileSource.java
  
  Index: FileSource.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/FileSource.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FileSource.java	25 Feb 2003 16:28:33 -0000	1.2
  +++ FileSource.java	29 Mar 2003 18:53:26 -0000	1.3
  @@ -85,7 +85,7 @@
       throws IOException {
           super.init( url, parameters );
   
  -        if ( null == this.file ) {
  +        if ( null == this.m_file ) {
               throw new IllegalArgumentException("Malformed url for a file source : " + url);
           }
       }
  @@ -94,7 +94,7 @@
        * Get the associated file
        */
       public File getFile() {
  -        return this.file;
  +        return this.m_file;
       }
   
       /**
  @@ -168,7 +168,7 @@
        * @return true if the resource exists.
        */
       public boolean exists() {
  -        return this.file.exists();
  +        return this.m_file.exists();
       }
   
       /**
  @@ -189,19 +189,19 @@
       throws IOException, SourceException {
           // Create a temp file. It will replace the right one when writing terminates,
           // and serve as a lock to prevent concurrent writes.
  -        File tmpFile = new File(this.file.getPath() + ".tmp");
  +        File tmpFile = new File(this.m_file.getPath() + ".tmp");
   
           // Ensure the directory exists
           tmpFile.getParentFile().mkdirs();
   
           // Can we write the file ?
  -        if (this.file.exists() && !this.file.canWrite()) {
  -            throw new IOException("Cannot write to file " + this.file.getPath());
  +        if (this.m_file.exists() && !this.m_file.canWrite()) {
  +            throw new IOException("Cannot write to file " + this.m_file.getPath());
           }
   
           // Check if it temp file already exists, meaning someone else currently writing
           if (!tmpFile.createNewFile()) {
  -            throw new ConcurrentModificationException("File " + this.file.getPath() +
  +            throw new ConcurrentModificationException("File " + this.m_file.getPath() +
                 " is already being written by another thread");
           }
   
  @@ -254,6 +254,6 @@
        * Delete the source.
        */
       public boolean delete()  {
  -        return this.file.delete();
  +        return this.m_file.delete();
       }
   }
  
  
  
  1.9       +36 -9     avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/ResourceSource.java
  
  Index: ResourceSource.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/ResourceSource.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ResourceSource.java	29 Jan 2003 06:56:01 -0000	1.8
  +++ ResourceSource.java	29 Mar 2003 18:53:26 -0000	1.9
  @@ -56,6 +56,8 @@
   
   import java.io.IOException;
   import java.io.InputStream;
  +import java.net.URL;
  +import java.net.URLConnection;
   
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceException;
  @@ -66,7 +68,6 @@
   /**
    * Description of a source which is described by the resource protocol
    * which gets a resource from the classloader.
  - * FIXME: Get mime-type, content-length, lastModified
    *
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
    * @version CVS $Revision$ $Date$
  @@ -76,19 +77,45 @@
       implements Source
   {
       /** Location of the resource */
  -    private String m_location;
  +    private URL m_location;
  +    private String m_mimeType;
   
  -    public ResourceSource( String systemId )
  +    public ResourceSource( final String systemId )
       {
  -        this.systemId = systemId;
  +        setSystemId(systemId);
           final int pos = systemId.indexOf( "://" );
  -        m_location = systemId.substring( pos + 3 );
  -        this.scheme = systemId.substring(0, pos);
  +        m_location = getClassLoader().getResource(systemId.substring( pos + 3 ));
  +        setScheme(systemId.substring(0, pos));
       }
       
       public boolean exists()
       {
  -        return getClassLoader().getResource( m_location ) != null;
  +        return m_location != null;
  +    }
  +    
  +    protected void checkInfos()
  +    {
  +        super.checkInfos();
  +
  +        URLConnection connection = null;
  +        try
  +        {
  +            connection = m_location.openConnection();
  +            setLastModified(connection.getLastModified());
  +            setContentLength(connection.getContentLength());
  +            m_mimeType = connection.getContentType();
  +        }
  +        catch(IOException ioe)
  +        {
  +            setLastModified(0);
  +            setContentLength(-1);
  +            m_mimeType = null;
  +        }
  +    }
  +    
  +    public String getMimeType()
  +    {
  +        return m_mimeType;
       }
   
       /**
  @@ -98,7 +125,7 @@
           throws IOException, SourceException
       {
   
  -        InputStream in = getClassLoader().getResourceAsStream( m_location );
  +        InputStream in = m_location.openStream();
           if ( in == null )
             throw new SourceNotFoundException( "Source '"+m_location+"' was not found" );
           return in;
  
  
  
  1.22      +80 -80    avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/URLSource.java
  
  Index: URLSource.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/URLSource.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- URLSource.java	25 Feb 2003 16:28:33 -0000	1.21
  +++ URLSource.java	29 Mar 2003 18:53:26 -0000	1.22
  @@ -81,7 +81,6 @@
   
   /**
    * Description of a source which is described by an URL.
  - * FIXME: Get mime-type
    *
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
    * @version CVS $Revision$ $Date$
  @@ -94,31 +93,31 @@
       protected final String FILE = "file:";
   
       /** The URL of the source */
  -    protected URL url;
  +    protected URL m_url;
   
       /** The connection for a real URL */
  -    protected URLConnection connection;
  +    protected URLConnection m_connection;
   
       /** The file, if URL is a file */
  -    protected File file;
  +    protected File m_file;
   
       /** The <code>SourceParameters</code> used for a post*/
  -    protected SourceParameters parameters;
  +    protected SourceParameters m_parameters;
   
       /** Is this a post? */
  -    protected boolean isPost = false;
  +    protected boolean m_isPost = false;
       
       /** Does this source exist ? */
  -    protected boolean exists = false;
  +    protected boolean m_exists = false;
   
   
       /** the prev returned SourceValidity */
  -    protected SourceValidity cachedValidity;
  +    protected SourceValidity m_cachedValidity;
   
  -    protected long cachedLastModificationDate;
  +    protected long m_cachedLastModificationDate;
   
       /** The content type (if known) */
  -    protected String mimeType;
  +    protected String m_mimeType;
       
       /**
        * Constructor
  @@ -135,43 +134,44 @@
                         Map parameters )
           throws IOException
       {
  -        this.systemId = url.toExternalForm();
  +        String systemId = url.toExternalForm();
  +        setSystemId(systemId);
           int pos = systemId.indexOf(':');
  -        this.scheme = systemId.substring(0, pos);
  +        setScheme(systemId.substring(0, pos));
           if (systemId.startsWith( FILE ))
           {
  -            this.file = new File( this.systemId.substring( FILE.length() ) );
  +            m_file = new File( systemId.substring( FILE.length() ) );
           }
           else
           {
  -            this.file = null;
  +            m_file = null;
           }
  -        this.url = url;
  -        this.gotInfos = false;
  -        this.isPost = false;
  +        m_url = url;
  +        m_isPost = false;
  +        
           if( null != parameters )
           {
  -            this.parameters = (SourceParameters)parameters.get( SourceResolver.URI_PARAMETERS );
  +            m_parameters = (SourceParameters)parameters.get( SourceResolver.URI_PARAMETERS );
               final String method = (String)parameters.get( SourceResolver.METHOD );
               if( "POST".equalsIgnoreCase( method ) )
  -                this.isPost = true;
  +                this.m_isPost = true;
           }
  -        if( null == this.file
  -            && null != this.parameters
  -            && this.parameters.hasParameters()
  -            && !this.isPost )
  +        if( null == this.m_file
  +            && null != this.m_parameters
  +            && this.m_parameters.hasParameters()
  +            && !this.m_isPost )
           {
  -            StringBuffer urlBuffer = new StringBuffer( this.systemId );
  +            StringBuffer urlBuffer = new StringBuffer( systemId );
               String key;
  -            final Iterator i = this.parameters.getParameterNames();
  +            final Iterator i = this.m_parameters.getParameterNames();
               Iterator values;
               String value;
  -            boolean first = ( this.systemId.indexOf( '?' ) == -1 );
  +            boolean first = ( systemId.indexOf( '?' ) == -1 );
               if( first == true ) urlBuffer.append( '?' );
               while( i.hasNext() )
               {
                   key = (String)i.next();
  -                values = this.parameters.getParameterValues( key );
  +                values = this.m_parameters.getParameterValues( key );
                   while( values.hasNext() == true )
                   {
                       value = SourceUtil.encode( (String)values.next() );
  @@ -182,8 +182,8 @@
                       urlBuffer.append( value );
                   }
               }
  -            this.url = new URL( urlBuffer.toString() );
  -            this.parameters = null;
  +            this.m_url = new URL( urlBuffer.toString() );
  +            this.m_parameters = null;
           }
       }
   
  @@ -194,34 +194,34 @@
        */
       protected void getInfos()
       {
  -        // exists will be set below depending on the url type
  -        this.exists = false;
  +        // exists will be set below depending on the m_url type
  +        this.m_exists = false;
           
  -        if( null != this.file )
  +        if( null != this.m_file )
           {
  -            this.lastModificationDate = this.file.lastModified();
  -            this.contentLength = this.file.length();
  -            this.exists = this.file.exists();
  +            setLastModified( m_file.lastModified() );
  +            setContentLength( m_file.length() );
  +            m_exists = m_file.exists();
           }
           else
           {
  -            if( !this.isPost )
  +            if( !this.m_isPost )
               {
                   try
                   {
  -                    if( null == this.connection )
  +                    if( null == this.m_connection )
                       {
  -                        this.connection = this.url.openConnection();
  +                        this.m_connection = this.m_url.openConnection();
                           String userInfo = this.getUserInfo();
  -                        if( this.url.getProtocol().startsWith( "http" ) && userInfo != null )
  +                        if( this.m_url.getProtocol().startsWith( "http" ) && userInfo != null )
                           {
  -                            this.connection.setRequestProperty( "Authorization", "Basic " + SourceUtil.encodeBASE64( userInfo ) );
  +                            this.m_connection.setRequestProperty( "Authorization", "Basic " + SourceUtil.encodeBASE64( userInfo ) );
                           }
                       }
  -                    this.lastModificationDate = this.connection.getLastModified();
  -                    this.contentLength = this.connection.getContentLength();
  -                    this.mimeType = this.connection.getContentType();
  -                    this.exists = true;
  +                    setLastModified(m_connection.getLastModified());
  +                    setContentLength(m_connection.getContentLength());
  +                    m_mimeType = m_connection.getContentType();
  +                    m_exists = true;
                   }
                   catch( IOException ignore )
                   {
  @@ -230,7 +230,7 @@
               }
               else
               {
  -                // do not open connection when using post!
  +                // do not open m_connection when using post!
                   super.getInfos();
               }
           }
  @@ -242,7 +242,7 @@
       public boolean exists()
       {
           this.checkInfos();
  -        return this.exists;
  +        return this.m_exists;
       }
   
       /**
  @@ -259,36 +259,36 @@
           {
               this.checkInfos();
               InputStream input = null;
  -            if( null != this.file )
  +            if( null != this.m_file )
               {
  -                input = new FileInputStream( this.file );
  +                input = new FileInputStream( this.m_file );
               }
               else
               {
  -                if( this.connection == null )
  +                if( this.m_connection == null )
                   {
  -                    this.connection = this.url.openConnection();
  +                    this.m_connection = this.m_url.openConnection();
                       /* The following requires a jdk 1.3 */
                       String userInfo = this.getUserInfo();
  -                    if( this.url.getProtocol().startsWith( "http" ) && userInfo != null )
  +                    if( this.m_url.getProtocol().startsWith( "http" ) && userInfo != null )
                       {
  -                        this.connection.setRequestProperty( "Authorization", "Basic " + SourceUtil.encodeBASE64( userInfo ) );
  +                        this.m_connection.setRequestProperty( "Authorization", "Basic " + SourceUtil.encodeBASE64( userInfo ) );
                       }
   
                       // do a post operation
  -                    if( this.connection instanceof HttpURLConnection
  -                        && this.isPost )
  +                    if( this.m_connection instanceof HttpURLConnection
  +                        && this.m_isPost )
                       {
                           StringBuffer buffer = new StringBuffer( 2000 );
                           String key;
  -                        Iterator i = this.parameters.getParameterNames();
  +                        Iterator i = this.m_parameters.getParameterNames();
                           Iterator values;
                           String value;
                           boolean first = true;
                           while( i.hasNext() )
                           {
                               key = (String)i.next();
  -                            values = this.parameters.getParameterValues( key );
  +                            values = this.m_parameters.getParameterValues( key );
                               while( values.hasNext() == true )
                               {
                                   value = SourceUtil.encode( (String)values.next() );
  @@ -299,7 +299,7 @@
                                   buffer.append( value );
                               }
                           }
  -                        HttpURLConnection httpCon = (HttpURLConnection)connection;
  +                        HttpURLConnection httpCon = (HttpURLConnection)m_connection;
                           httpCon.setDoInput( true );
   
                           if( buffer.length() > 1 )
  @@ -316,18 +316,18 @@
                               out.close();
                           }
                           input = httpCon.getInputStream();
  -                        this.connection = null; // make sure a new connection is created next time
  +                        this.m_connection = null; // make sure a new m_connection is created next time
                           return input;
                       }
                   }
  -                input = this.connection.getInputStream();
  -                this.connection = null; // make sure a new connection is created next time
  +                input = this.m_connection.getInputStream();
  +                this.m_connection = null; // make sure a new m_connection is created next time
               }
               return input;
           }
           catch (FileNotFoundException fnfe)
           {
  -            throw new SourceNotFoundException("Resource not found " + this.systemId);
  +            throw new SourceNotFoundException("Resource not found " + getURI());
           }
       }
   
  @@ -348,7 +348,7 @@
               {
                   try
                   {
  -                    return (String)URLSource.urlGetUserInfo.invoke( this.url, URLSource.emptyParams );
  +                    return (String)URLSource.urlGetUserInfo.invoke( m_url, URLSource.emptyParams );
                   }
                   catch( Exception e )
                   {
  @@ -359,11 +359,11 @@
           }
           else
           {
  -            // test if the url class supports the getUserInfo method
  +            // test if the m_url class supports the getUserInfo method
               try
               {
                   URLSource.urlGetUserInfo = URL.class.getMethod( "getUserInfo", null );
  -                String ui = (String)URLSource.urlGetUserInfo.invoke( this.url, URLSource.emptyParams );
  +                String ui = (String)URLSource.urlGetUserInfo.invoke( m_url, URLSource.emptyParams );
                   URLSource.checkedURLClass = true;
                   URLSource.urlSupportsGetUserInfo = true;
                   return ui;
  @@ -386,22 +386,22 @@
        */
       public SourceValidity getValidity()
       {
  -        final long lm = this.getLastModified();
  +        final long lm = getLastModified();
           if( lm > 0 )
           {
  -            if (lm == this.cachedLastModificationDate)
  -                return this.cachedValidity;
  +            if (lm == m_cachedLastModificationDate)
  +                return m_cachedValidity;
   
  -            this.cachedLastModificationDate = lm;
  -            if (file != null)
  +            m_cachedLastModificationDate = lm;
  +            if (m_file != null)
               {
  -                this.cachedValidity = new FileTimeStampValidity(file, lm);
  +                m_cachedValidity = new FileTimeStampValidity(m_file, lm);
               }
               else
               {
  -                this.cachedValidity = new TimeStampValidity( lm );
  +                m_cachedValidity = new TimeStampValidity( lm );
               }
  -            return this.cachedValidity;
  +            return m_cachedValidity;
           }
           return null;
       }
  @@ -412,8 +412,8 @@
        */
       public void refresh()
       {
  -        // reset connection
  -        this.connection = null;
  +        // reset m_connection
  +        m_connection = null;
           super.refresh();
       }
   
  @@ -422,9 +422,9 @@
        */
       public boolean isDirectory()
       {
  -    	if ( null != this.file ) 
  +    	if ( null != m_file ) 
       	{
  -    		return this.file.isDirectory();
  +    		return m_file.isDirectory();
       	}
       	return false;
       }
  @@ -436,9 +436,9 @@
        */
       public Collection getChildrenLocations() 
       {
  -    	if ( null != this.file && this.file.isDirectory() )
  +    	if ( null != m_file && m_file.isDirectory() )
       	{
  -    		final String[] files = this.file.list();
  +    		final String[] files = m_file.list();
       		return Arrays.asList(files);
       	}
       	return Collections.EMPTY_LIST;
  @@ -451,7 +451,7 @@
        */
       public String getMimeType()
       {
  -        return this.mimeType;
  +        return m_mimeType;
       }
       
   }
  
  
  
  1.11      +4 -1      avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/BasicThreadPool.java
  
  Index: BasicThreadPool.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/BasicThreadPool.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- BasicThreadPool.java	23 Mar 2003 03:00:44 -0000	1.10
  +++ BasicThreadPool.java	29 Mar 2003 18:53:26 -0000	1.11
  @@ -216,12 +216,15 @@
   
       /**
        * Release worker back into pool.
  +     * 
  +     * FIX ME: do we want to verify if it is interrupted or interrupt the worker
  +     *         thread?
        *
        * @param worker the worker (Should be a {@link SimpleWorkerThread}).
        */
       protected void releaseWorker( final WorkerThread worker )
       {
  -        worker.interrupted();
  +        worker.interrupt();
           m_pool.put( (SimpleWorkerThread)worker );
       }
   }
  
  
  
  1.8       +2 -2      avalon-excalibur/thread/src/test/org/apache/avalon/excalibur/thread/impl/test/ResourceLimitingThreadPoolTestCase.java
  
  Index: ResourceLimitingThreadPoolTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/thread/src/test/org/apache/avalon/excalibur/thread/impl/test/ResourceLimitingThreadPoolTestCase.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ResourceLimitingThreadPoolTestCase.java	22 Mar 2003 12:46:55 -0000	1.7
  +++ ResourceLimitingThreadPoolTestCase.java	29 Mar 2003 18:53:26 -0000	1.8
  @@ -114,7 +114,7 @@
           commonTest( 10, 10, 0L, 200L, 5, false, false, -1, -1 );
       }
   
  -    private void incCompleteCount()
  +    protected void incCompleteCount()
       {
           synchronized( this )
           {
  
  
  
  1.13      +2 -2      avalon-excalibur/threadcontext/src/java/org/apache/excalibur/threadcontext/ThreadContext.java
  
  Index: ThreadContext.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/threadcontext/src/java/org/apache/excalibur/threadcontext/ThreadContext.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ThreadContext.java	16 Feb 2003 21:57:36 -0000	1.12
  +++ ThreadContext.java	29 Mar 2003 18:53:26 -0000	1.13
  @@ -103,7 +103,7 @@
       private final ThreadContextPolicy m_policy;
   
       ///Basic map to store variable mappings placed in context.
  -    private final HashMap m_map;
  +    protected final HashMap m_map;
   
       /**
        * Map that contains any state that needs to be restored
  
  
  
  1.14      +2 -2      avalon-excalibur/xfc/src/test/org/apache/excalibur/xfc/test/xfcTestCase.java
  
  Index: xfcTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/xfc/src/test/org/apache/excalibur/xfc/test/xfcTestCase.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- xfcTestCase.java	22 Mar 2003 12:46:58 -0000	1.13
  +++ xfcTestCase.java	29 Mar 2003 18:53:26 -0000	1.14
  @@ -112,7 +112,7 @@
           {
               Module ecm = new ECM();
               ecm.enableLogging( m_logger );
  -            Model model = ecm.generate( "just-roles-no-xconf" );
  +            ecm.generate( "just-roles-no-xconf" );
   
               fail( "Context validation failed" );
           }
  
  
  
  1.28      +2 -2      avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/xslt/XSLTProcessorImpl.java
  
  Index: XSLTProcessorImpl.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/xslt/XSLTProcessorImpl.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- XSLTProcessorImpl.java	17 Mar 2003 11:52:36 -0000	1.27
  +++ XSLTProcessorImpl.java	29 Mar 2003 18:53:26 -0000	1.28
  @@ -661,7 +661,7 @@
               }
               else
               {
  -                // is the base a file or a real url
  +                // is the base a file or a real m_url
                   if( !base.startsWith( "file:" ) )
                   {
                       int lastPathElementPos = base.lastIndexOf( '/' );
  
  
  

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


Mime
View raw message