You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by as...@apache.org on 2007/05/15 18:21:00 UTC

svn commit: r538241 - in /jakarta/jcs/trunk/src: java/org/apache/jcs/ java/org/apache/jcs/access/ java/org/apache/jcs/access/exception/ java/org/apache/jcs/access/monitor/ java/org/apache/jcs/admin/servlet/ java/org/apache/jcs/utils/timing/ test-conf/ ...

Author: asmuts
Date: Tue May 15 09:20:57 2007
New Revision: 538241

URL: http://svn.apache.org/viewvc?view=rev&rev=538241
Log:
Fixing unit tests that are failing from a HSQL upgrade.  I isolated the database directories between tests.

Fixed soem formatting and javadoc warnings.

Modified:
    jakarta/jcs/trunk/src/java/org/apache/jcs/JCS.java
    jakarta/jcs/trunk/src/java/org/apache/jcs/access/CacheAccess.java
    jakarta/jcs/trunk/src/java/org/apache/jcs/access/GroupCacheAccess.java
    jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/CacheException.java
    jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/InvalidArgumentException.java
    jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/InvalidGroupException.java
    jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/InvalidHandleException.java
    jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/NotARetrievableObjectException.java
    jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/NullObjectException.java
    jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/ObjectExistsException.java
    jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/ObjectNotFoundException.java
    jakarta/jcs/trunk/src/java/org/apache/jcs/access/monitor/MonitorAccess.java
    jakarta/jcs/trunk/src/java/org/apache/jcs/access/monitor/MonitorXMLRPCServer.java
    jakarta/jcs/trunk/src/java/org/apache/jcs/admin/servlet/JCSAdminServlet.java
    jakarta/jcs/trunk/src/java/org/apache/jcs/utils/timing/ElapsedTimer.java
    jakarta/jcs/trunk/src/test-conf/TestHSQLDiskCache.ccf
    jakarta/jcs/trunk/src/test-conf/TestJDBCDiskCacheRemoval.ccf
    jakarta/jcs/trunk/src/test-conf/TestJDBCDiskCacheShrink.ccf
    jakarta/jcs/trunk/src/test-conf/TestMySQLDiskCache.ccf
    jakarta/jcs/trunk/src/test/org/apache/jcs/ZeroSizeCacheUnitTest.java
    jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java
    jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSteadyLoadTest.java
    jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java
    jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java
    jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheConcurrentUnitTest.java
    jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheUnitTest.java
    jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheHsqlBackedUnitTest.java
    jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/JCS.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/JCS.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/JCS.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/JCS.java Tue May 15 09:20:57 2007
@@ -26,27 +26,25 @@
 import org.apache.jcs.engine.control.CompositeCacheManager;
 
 /**
- * Simple class for using JCS. To use JCS in your application, you can use the
- * static methods of this class to get access objects (instances of this class)
- * for your cache regions. Ideally this class should be all you need to import
- * to use JCS. One JCS should be created for each region you want to access. If
- * you have several regions, then get instances for each. For best performance
+ * Simple class for using JCS. To use JCS in your application, you can use the static methods of
+ * this class to get access objects (instances of this class) for your cache regions. Ideally this
+ * class should be all you need to import to use JCS. One JCS should be created for each region you
+ * want to access. If you have several regions, then get instances for each. For best performance
  * the getInstance call should be made in an initialization method.
- *
- * @version $Id$
  */
 public class JCS
     extends GroupCacheAccess
 {
+    /** cache.ccf alternative. */
     private static String configFilename = null;
 
+    /** The manager returns cache instances. */
     private static CompositeCacheManager cacheMgr;
 
     /**
      * Protected constructor for use by the static factory methods.
-     *
-     * @param cacheControl
-     *            Cache which the instance will provide access to
+     * <p>
+     * @param cacheControl Cache which the instance will provide access to
      */
     protected JCS( CompositeCache cacheControl )
     {
@@ -55,9 +53,8 @@
 
     /**
      * Get a JCS which accesses the provided region.
-     *
-     * @param region
-     *            Region that return JCS will provide access to
+     * <p>
+     * @param region Region that return JCS will provide access to
      * @return A JCS which provides access to a given region.
      * @exception CacheException
      */
@@ -71,11 +68,9 @@
 
     /**
      * Get a JCS which accesses the provided region.
-     *
-     * @param region
-     *            Region that return JCS will provide access to
-     * @param icca
-     *            CacheAttributes for region
+     * <p>
+     * @param region Region that return JCS will provide access to
+     * @param icca CacheAttributes for region
      * @return A JCS which provides access to a given region.
      * @exception CacheException
      */
@@ -88,10 +83,9 @@
     }
 
     /**
-     * Gets an instance of CompositeCacheManager and stores it in the cacheMgr
-     * class field, if it is not already set. Unlike the implementation in
-     * CacheAccess, the cache manager is a CompositeCacheManager. NOTE: This can
-     * will be moved up into GroupCacheAccess.
+     * Gets an instance of CompositeCacheManager and stores it in the cacheMgr class field, if it is
+     * not already set. Unlike the implementation in CacheAccess, the cache manager is a
+     * CompositeCacheManager. NOTE: This can will be moved up into GroupCacheAccess.
      */
     protected static synchronized void ensureCacheManager()
     {
@@ -111,9 +105,9 @@
     }
 
     /**
-     * Set the filename that the cache manager will be initialized with. Only
-     * matters before the instance is initialized.
-     *
+     * Set the filename that the cache manager will be initialized with. Only matters before the
+     * instance is initialized.
+     * <p>
      * @param configFilename
      */
     public static void setConfigFilename( String configFilename )

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/access/CacheAccess.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/access/CacheAccess.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/access/CacheAccess.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/access/CacheAccess.java Tue May 15 09:20:57 2007
@@ -40,17 +40,18 @@
 /**
  * This class provides an interface for all types of access to the cache.
  * <p>
- * An instance of this class is tied to a specific cache region. Static methods
- * are provided to get such instances.
+ * An instance of this class is tied to a specific cache region. Static methods are provided to get
+ * such instances.
  * <p>
- * Using this class you can retrieve an item, the items wrapper, the element
- * configuration, put an item in the cache, remove an item, and clear a region.
+ * Using this class you can retrieve an item, the items wrapper, the element configuration, put an
+ * item in the cache, remove an item, and clear a region.
  * <p>
  * The JCS class is the prefered way to access these methods.
  */
 public class CacheAccess
     implements ICacheAccess
 {
+    /** The logger. */
     private static final Log log = LogFactory.getLog( CacheAccess.class );
 
     /**
@@ -68,8 +69,7 @@
     /**
      * Constructor for the CacheAccess object.
      * <p>
-     * @param cacheControl
-     *            The cache which the created instance accesses
+     * @param cacheControl The cache which the created instance accesses
      */
     public CacheAccess( CompositeCache cacheControl )
     {
@@ -79,16 +79,13 @@
     // ----------------------------- static methods for access to cache regions
 
     /**
-     * Define a new cache region with the given name. In the oracle
-     * specification, these attributes are global and not region specific,
-     * regional overirdes is a value add each region should be able to house
-     * both cache and element attribute sets. It is more efficient to define a
-     * cache in the props file and then strictly use the get access method. Use
-     * of the define region outside of an initialization block should be
-     * avoided.
+     * Define a new cache region with the given name. In the oracle specification, these attributes
+     * are global and not region specific, regional overirdes is a value add each region should be
+     * able to house both cache and element attribute sets. It is more efficient to define a cache
+     * in the props file and then strictly use the get access method. Use of the define region
+     * outside of an initialization block should be avoided.
      * <p>
-     * @param name
-     *            Name that will identify the region
+     * @param name Name that will identify the region
      * @return CacheAccess instance for the new region
      * @exception CacheException
      */
@@ -103,10 +100,8 @@
     /**
      * Define a new cache region with the specified name and attributes.
      * <p>
-     * @param name
-     *            Name that will identify the region
-     * @param cattr
-     *            CompositeCacheAttributes for the region
+     * @param name Name that will identify the region
+     * @param cattr CompositeCacheAttributes for the region
      * @return CacheAccess instance for the new region
      * @exception CacheException
      */
@@ -119,15 +114,12 @@
     }
 
     /**
-     * Define a new cache region with the specified name and attributes and
-     * return a CacheAccess to it.
+     * Define a new cache region with the specified name and attributes and return a CacheAccess to
+     * it.
      * <p>
-     * @param name
-     *            Name that will identify the region
-     * @param cattr
-     *            CompositeCacheAttributes for the region
-     * @param attr
-     *            Attributes for the region
+     * @param name Name that will identify the region
+     * @param cattr CompositeCacheAttributes for the region
+     * @param attr Attributes for the region
      * @return CacheAccess instance for the new region
      * @exception CacheException
      */
@@ -142,8 +134,7 @@
     /**
      * Get a CacheAccess instance for the given region.
      * <p>
-     * @param region
-     *            Name that identifies the region
+     * @param region Name that identifies the region
      * @return CacheAccess instance for region
      * @exception CacheException
      */
@@ -156,11 +147,9 @@
     }
 
     /**
-     * Get a CacheAccess instance for the given region with the given
-     * attributes.
+     * Get a CacheAccess instance for the given region with the given attributes.
      * <p>
-     * @param region
-     *            Name that identifies the region
+     * @param region Name that identifies the region
      * @param icca
      * @return CacheAccess instance for region
      * @exception CacheException
@@ -174,8 +163,8 @@
     }
 
     /**
-     * Helper method which checks to make sure the cacheMgr class field is set,
-     * and if not requests an instance from CacheManagerFactory.
+     * Helper method which checks to make sure the cacheMgr class field is set, and if not requests
+     * an instance from CacheManagerFactory.
      */
     protected static void ensureCacheManager()
     {
@@ -191,11 +180,9 @@
     // ------------------------------------------------------- instance methods
 
     /**
-     * Retrieve an object from the cache region this instance provides access
-     * to.
+     * Retrieve an object from the cache region this instance provides access to.
      * <p>
-     * @param name
-     *            Key the object is stored as
+     * @param name Key the object is stored as
      * @return The object if found or null
      */
     public Object get( Object name )
@@ -206,19 +193,18 @@
     }
 
     /**
-     * This method returns the ICacheElement wrapper which provides access to
-     * element info and other attributes.
+     * This method returns the ICacheElement wrapper which provides access to element info and other
+     * attributes.
      * <p>
-     * This returns a reference to the wrapper. Any modifications will be
-     * reflected in the cache. No defensive copy is made.
+     * This returns a reference to the wrapper. Any modifications will be reflected in the cache. No
+     * defensive copy is made.
      * <p>
-     * This method is most useful if you want to determine things such as the
-     * how long the element has been in the cache.
+     * This method is most useful if you want to determine things such as the how long the element
+     * has been in the cache.
      * <p>
      * The last access time in teh ElementAttributes should be current.
      * <p>
-     * @param name
-     *            Key the object is stored as
+     * @param name Key the object is stored as
      * @return The ICacheElement if the object is found or null
      */
     public ICacheElement getCacheElement( Object name )
@@ -227,18 +213,14 @@
     }
 
     /**
-     * Place a new object in the cache, associated with key name. If there is
-     * currently an object associated with name in the region an
-     * ObjectExistsException is thrown. Names are scoped to a region so they
-     * must be unique within the region they are placed.
-     * <p>
-     * @param key
-     *            Key object will be stored with
-     * @param value
-     *            Object to store
-     * @exception CacheException
-     *                and ObjectExistsException is thrown if the item is already
-     *                in the cache.
+     * Place a new object in the cache, associated with key name. If there is currently an object
+     * associated with name in the region an ObjectExistsException is thrown. Names are scoped to a
+     * region so they must be unique within the region they are placed.
+     * <p>
+     * @param key Key object will be stored with
+     * @param value Object to store
+     * @exception CacheException and ObjectExistsException is thrown if the item is already in the
+     *                cache.
      */
     public void putSafe( Object key, Object value )
         throws CacheException
@@ -252,14 +234,11 @@
     }
 
     /**
-     * Place a new object in the cache, associated with key name. If there is
-     * currently an object associated with name in the region it is replaced.
-     * Names are scoped to a region so they must be unique within the region
-     * they are placed. ObjectExistsException
-     * @param name
-     *            Key object will be stored with
-     * @param obj
-     *            Object to store
+     * Place a new object in the cache, associated with key name. If there is currently an object
+     * associated with name in the region it is replaced. Names are scoped to a region so they must
+     * be unique within the region they are placed. ObjectExistsException
+     * @param name Key object will be stored with
+     * @param obj Object to store
      * @exception CacheException
      */
     public void put( Object name, Object obj )
@@ -271,13 +250,12 @@
     }
 
     /**
-     * Constructs a cache element with these attribures, and puts it into the
-     * cache.
+     * Constructs a cache element with these attribures, and puts it into the cache.
      * <p>
      * If the key or the value is null, and InvalidArgumentException is thrown.
      * <p>
-     * @see org.apache.jcs.access.behavior.ICacheAccess#put(java.lang.Object,
-     *      java.lang.Object, org.apache.jcs.engine.behavior.IElementAttributes)
+     * @see org.apache.jcs.access.behavior.ICacheAccess#put(java.lang.Object, java.lang.Object,
+     *      org.apache.jcs.engine.behavior.IElementAttributes)
      */
     public void put( Object key, Object val, IElementAttributes attr )
         throws CacheException
@@ -309,8 +287,8 @@
     }
 
     /**
-     * Destory the region and all objects within it. After calling this method,
-     * the Cache object can no longer be used as it will be closed.
+     * Destory the region and all objects within it. After calling this method, the Cache object can
+     * no longer be used as it will be closed.
      * <p>
      * @exception CacheException
      * @deprecated
@@ -359,11 +337,10 @@
     }
 
     /**
-     * Invalidate all objects associated with key name, removing all references
-     * to the objects from the cache.
+     * Invalidate all objects associated with key name, removing all references to the objects from
+     * the cache.
      * <p>
-     * @param name
-     *            Key that specifies object to invalidate
+     * @param name Key that specifies object to invalidate
      * @exception CacheException
      * @deprecated use remove
      */
@@ -376,8 +353,7 @@
     /**
      * Removes a single item by name.
      * <p>
-     * @param name,
-     *            the name of the item to remove.
+     * @param name the name of the item to remove.
      * @throws CacheException
      */
     public void remove( Object name )
@@ -387,24 +363,22 @@
     }
 
     /**
-     * ResetAttributes allows for some of the attributes of a region to be reset
-     * in particular expiration time attriubtes, time to live, default time to
-     * live and idle time, and event handlers. Changing default settings on
-     * groups and regions will not affect existing objects. Only object loaded
-     * after the reset will use the new defaults. If no name argument is
+     * ResetAttributes allows for some of the attributes of a region to be reset in particular
+     * expiration time attriubtes, time to live, default time to live and idle time, and event
+     * handlers. Changing default settings on groups and regions will not affect existing objects.
+     * Only object loaded after the reset will use the new defaults. If no name argument is
      * provided, the reset is applied to the region.
      * <p>
-     * NOTE: this method is does not reset the attributes for items already in
-     * the cache. It could potentially do this for items in memory, and maybe on
-     * disk (which would be slow) but not remote items. Rather than have
-     * unpredicatble behavior, this method just sets the default attributes.
+     * NOTE: this method is does not reset the attributes for items already in the cache. It could
+     * potentially do this for items in memory, and maybe on disk (which would be slow) but not
+     * remote items. Rather than have unpredicatble behavior, this method just sets the default
+     * attributes.
      * <p>
      * TODO is should be renamed "setDefaultElementAttributes"
      * <p>
      * @deprecated As of release 1.3
      * @see setDefaultElementAttributes
-     * @param attr
-     *            New attributes for this region.
+     * @param attr New attributes for this region.
      * @exception CacheException
      * @exception InvalidHandleException
      */
@@ -415,17 +389,14 @@
     }
 
     /**
-     * This method is does not reset the attributes for items already in the
-     * cache. It could potentially do this for items in memory, and maybe on
-     * disk (which would be slow) but not remote items. Rather than have
-     * unpredicatble behavior, this method just sets the default attributes.
-     * Items subsequently put into the cache will use these defaults if they do
-     * not specify specific attributes.
+     * This method is does not reset the attributes for items already in the cache. It could
+     * potentially do this for items in memory, and maybe on disk (which would be slow) but not
+     * remote items. Rather than have unpredicatble behavior, this method just sets the default
+     * attributes. Items subsequently put into the cache will use these defaults if they do not
+     * specify specific attributes.
      * <p>
-     * @param attr
-     *            the default attributes.
-     * @throws CacheException
-     *             if something goes wrong.
+     * @param attr the default attributes.
+     * @throws CacheException if something goes wrong.
      */
     public void setDefaultElementAttributes( IElementAttributes attr )
         throws CacheException
@@ -434,16 +405,13 @@
     }
 
     /**
-     * Reset attributes for a particular element in the cache. NOTE: this method
-     * is currently not implemented.
+     * Reset attributes for a particular element in the cache. NOTE: this method is currently not
+     * implemented.
      * <p>
-     * @param name
-     *            Key of object to reset attributes for
-     * @param attr
-     *            New attributes for the object
+     * @param name Key of object to reset attributes for
+     * @param attr New attributes for the object
      * @exception CacheException
-     * @exception InvalidHandleException
-     *                if the item does not exist.
+     * @exception InvalidHandleException if the item does not exist.
      */
     public void resetElementAttributes( Object name, IElementAttributes attr )
         throws CacheException, InvalidHandleException
@@ -463,8 +431,8 @@
     }
 
     /**
-     * GetElementAttributes will return an attribute object describing the
-     * current attributes associated with the object name.
+     * GetElementAttributes will return an attribute object describing the current attributes
+     * associated with the object name.
      * <p>
      * This was confusing, so I created a new method with a clear name.
      * <p>
@@ -480,11 +448,11 @@
     }
 
     /**
-     * Retrieves A COPY OF the default element attributes used by this region.
-     * This does not provide a reference to the element attributes.
+     * Retrieves A COPY OF the default element attributes used by this region. This does not provide
+     * a reference to the element attributes.
      * <p>
-     * Each time an element is added to the cache without element attributes,
-     * the default element attributes are cloned.
+     * Each time an element is added to the cache without element attributes, the default element
+     * attributes are cloned.
      * <p>
      * @return the deafualt element attributes used by this region.
      * @throws CacheException
@@ -496,12 +464,11 @@
     }
 
     /**
-     * GetElementAttributes will return an attribute object describing the
-     * current attributes associated with the object name. The name object must
-     * override the Object.equals and Object.hashCode methods.
+     * GetElementAttributes will return an attribute object describing the current attributes
+     * associated with the object name. The name object must override the Object.equals and
+     * Object.hashCode methods.
      * <p>
-     * @param name
-     *            Key of object to get attributes for
+     * @param name Key of object to get attributes for
      * @return Attributes for the object, null if object not in cache
      * @exception CacheException
      */
@@ -523,8 +490,7 @@
     }
 
     /**
-     * This returns the ICacheStats object with information on this region and
-     * its auxiliaries.
+     * This returns the ICacheStats object with information on this region and its auxiliaries.
      * <p>
      * This data can be formatted as needed.
      * <p>
@@ -544,8 +510,8 @@
     }
 
     /**
-     * Dispose this region. Flushes objects to and closes auxiliary caches. This
-     * is a shutdown command!
+     * Dispose this region. Flushes objects to and closes auxiliary caches. This is a shutdown
+     * command!
      * <p>
      * To simply remove all elements from the region use clear().
      */
@@ -557,8 +523,8 @@
     /**
      * Gets the ICompositeCacheAttributes of the cache region.
      * <p>
-     * @return ICompositeCacheAttributes, the controllers config info, defined
-     *         in the top section of a region definition.
+     * @return ICompositeCacheAttributes, the controllers config info, defined in the top section of
+     *         a region definition.
      */
     public ICompositeCacheAttributes getCacheAttributes()
     {
@@ -568,8 +534,7 @@
     /**
      * Sets the ICompositeCacheAttributes of the cache region.
      * <p>
-     * @param cattr
-     *            The new ICompositeCacheAttribute value
+     * @param cattr The new ICompositeCacheAttribute value
      */
     public void setCacheAttributes( ICompositeCacheAttributes cattr )
     {
@@ -577,14 +542,13 @@
     }
 
     /**
-     * This instructs the memory cache to remove the <i>numberToFree</i>
-     * according to its eviction policy. For example, the LRUMemoryCache will
-     * remove the <i>numberToFree</i> least recently used items. These will be
-     * spooled to disk if a disk auxiliary is available.
+     * This instructs the memory cache to remove the <i>numberToFree</i> according to its eviction
+     * policy. For example, the LRUMemoryCache will remove the <i>numberToFree</i> least recently
+     * used items. These will be spooled to disk if a disk auxiliary is available.
      * <p>
      * @param numberToFree
-     * @return the number that were removed. if you ask to free 5, but there are
-     *         only 3, you will get 3.
+     * @return the number that were removed. if you ask to free 5, but there are only 3, you will
+     *         get 3.
      * @throws CacheException
      */
     public int freeMemoryElements( int numberToFree )

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/access/GroupCacheAccess.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/access/GroupCacheAccess.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/access/GroupCacheAccess.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/access/GroupCacheAccess.java Tue May 15 09:20:57 2007
@@ -38,6 +38,7 @@
     extends CacheAccess
     implements IGroupCacheAccess
 {
+    /** The underlying cache manager. */
     private static CompositeCacheManager cacheMgr;
 
     /**

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/CacheException.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/CacheException.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/CacheException.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/CacheException.java Tue May 15 09:20:57 2007
@@ -26,9 +26,8 @@
  */
 public class CacheException
     extends Exception
-// extends NestableException
 {
-
+    /** Don't change. */
     private static final long serialVersionUID = 8725795372935590265L;
 
     /**

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/InvalidArgumentException.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/InvalidArgumentException.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/InvalidArgumentException.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/InvalidArgumentException.java Tue May 15 09:20:57 2007
@@ -20,12 +20,13 @@
  */
 
 /**
- * InvalidArgumentException is thrown if an argument is passed to the cache that
- * is invalid. For instance, null values passed to put result in this exception.
+ * InvalidArgumentException is thrown if an argument is passed to the cache that is invalid. For
+ * instance, null values passed to put result in this exception.
  */
 public class InvalidArgumentException
     extends CacheException
 {
+    /** Don't change. */
     private static final long serialVersionUID = -6058373692208755562L;
 
     /** Constructor for the InvalidArgumentException object */
@@ -35,7 +36,8 @@
     }
 
     /**
-     * Constructor for the InvalidArgumentException object
+     * Constructor for the InvalidArgumentException object.
+     * <p>
      * @param message
      */
     public InvalidArgumentException( String message )

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/InvalidGroupException.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/InvalidGroupException.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/InvalidGroupException.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/InvalidGroupException.java Tue May 15 09:20:57 2007
@@ -21,11 +21,11 @@
 
 /**
  * InvalidGroupException
- *
  */
 public class InvalidGroupException
     extends CacheException
 {
+    /** Don't change. */
     private static final long serialVersionUID = -5219807114008843480L;
 
     /** Constructor for the InvalidGroupException object */
@@ -36,7 +36,7 @@
 
     /**
      * Constructor for the InvalidGroupException object
-     *
+     * <p>
      * @param message
      */
     public InvalidGroupException( String message )

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/InvalidHandleException.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/InvalidHandleException.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/InvalidHandleException.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/InvalidHandleException.java Tue May 15 09:20:57 2007
@@ -25,7 +25,7 @@
 public class InvalidHandleException
     extends CacheException
 {
-
+    /** Don't change. */
     private static final long serialVersionUID = -5947822454839845924L;
 
     /** Constructor for the InvalidHandleException object */
@@ -36,7 +36,8 @@
     }
 
     /**
-     * Constructor for the InvalidHandleException object
+     * Constructor for the InvalidHandleException object.
+     * <p>
      * @param message
      */
     public InvalidHandleException( String message )

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/NotARetrievableObjectException.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/NotARetrievableObjectException.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/NotARetrievableObjectException.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/NotARetrievableObjectException.java Tue May 15 09:20:57 2007
@@ -20,15 +20,15 @@
  */
 
 /**
- * This would be thrown if the object could not be retrieved from a method that
- * throws exceptions rather than null.
+ * This would be thrown if the object could not be retrieved from a method that throws exceptions
+ * rather than null.
  * <p>
  * TODO check to see if we can get rid of this.
  */
 public class NotARetrievableObjectException
     extends CacheException
 {
-
+    /** Don't change. */
     private static final long serialVersionUID = 4501711027054012410L;
 
     /** Constructor for the NotARetrievableObjectException object */
@@ -39,7 +39,7 @@
 
     /**
      * Constructor for the NotARetrievableObjectException object
-     *
+     * <p>
      * @param message
      */
     public NotARetrievableObjectException( String message )

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/NullObjectException.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/NullObjectException.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/NullObjectException.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/NullObjectException.java Tue May 15 09:20:57 2007
@@ -21,11 +21,11 @@
 
 /**
  * Description of the Class
- *
  */
 public class NullObjectException
     extends CacheException
 {
+    /** Don't change. */
     private static final long serialVersionUID = 827922769279844194L;
 
     /** Constructor for the NullObjectException object */
@@ -35,8 +35,8 @@
     }
 
     /**
-     * Constructor for the NullObjectException object
-     *
+     * Constructor for the NullObjectException object.
+     * <p>
      * @param message
      */
     public NullObjectException( String message )

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/ObjectExistsException.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/ObjectExistsException.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/ObjectExistsException.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/ObjectExistsException.java Tue May 15 09:20:57 2007
@@ -20,20 +20,19 @@
  */
 
 /**
- * The putSafe method on the JCS convenience class throws this exception if the
- * object is already present in the cache.
+ * The putSafe method on the JCS convenience class throws this exception if the object is already
+ * present in the cache.
  * <p>
  * I'm removing this exception from normal use.
  * <p>
- * The overhead of throwing exceptions and the cumbersomeness of coding around
- * exceptions warrants removal. Exceptions like this don't make sense to throw
- * in the course of normal operations to signify a normal and expected
- * condition. Returning null if an object isn't found is sufficient.
+ * The overhead of throwing exceptions and the cumbersomeness of coding around exceptions warrants
+ * removal. Exceptions like this don't make sense to throw in the course of normal operations to
+ * signify a normal and expected condition. Returning null if an object isn't found is sufficient.
  */
 public class ObjectExistsException
     extends CacheException
 {
-
+    /** Don't change. */
     private static final long serialVersionUID = -3779745827993383872L;
 
     /** Constructor for the ObjectExistsException object */

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/ObjectNotFoundException.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/ObjectNotFoundException.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/ObjectNotFoundException.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/access/exception/ObjectNotFoundException.java Tue May 15 09:20:57 2007
@@ -24,13 +24,13 @@
  * <p>
  * TODO see if we can remove this.
  * <p>
- * This is thrown from the composite cache if you as for the element attributes
- * and the element does not exist.
+ * This is thrown from the composite cache if you as for the element attributes and the element does
+ * not exist.
  */
 public class ObjectNotFoundException
     extends CacheException
 {
-
+    /** Don't change. */
     private static final long serialVersionUID = 5684353421076546842L;
 
     /** Constructor for the ObjectNotFoundException object */

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/access/monitor/MonitorAccess.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/access/monitor/MonitorAccess.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/access/monitor/MonitorAccess.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/access/monitor/MonitorAccess.java Tue May 15 09:20:57 2007
@@ -38,8 +38,10 @@
 public class MonitorAccess
     implements Serializable
 {
+    /** Don't change. */
     private static final long serialVersionUID = 1002037665133774391L;
 
+    /** The logger. */
     private static final Log log = LogFactory.getLog( MonitorAccess.class );
 
     /** Description of the Field */

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/access/monitor/MonitorXMLRPCServer.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/access/monitor/MonitorXMLRPCServer.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/access/monitor/MonitorXMLRPCServer.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/access/monitor/MonitorXMLRPCServer.java Tue May 15 09:20:57 2007
@@ -30,6 +30,7 @@
  */
 public class MonitorXMLRPCServer
 {
+    /** The logger */
     private static final Log log = LogFactory.getLog( MonitorXMLRPCServer.class );
 
     /**

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/admin/servlet/JCSAdminServlet.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/admin/servlet/JCSAdminServlet.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/admin/servlet/JCSAdminServlet.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/admin/servlet/JCSAdminServlet.java Tue May 15 09:20:57 2007
@@ -87,11 +87,15 @@
 
     private static final String DETAIL_ACTION = "detail";
 
-    /*
-     * (non-Javadoc)
-     * @see org.apache.velocity.servlet.VelocityServlet#handleRequest(javax.servlet.http.HttpServletRequest,
-     *      javax.servlet.http.HttpServletResponse,
-     *      org.apache.velocity.context.Context)
+    /**
+     * Velocity based admin servlet.
+     * <p>
+     * @param request 
+     * @param response 
+     * @param context 
+     * @return Template
+     * @throws Exception 
+     * 
      */
     protected Template handleRequest( HttpServletRequest request, HttpServletResponse response, Context context )
         throws Exception

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/utils/timing/ElapsedTimer.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/utils/timing/ElapsedTimer.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/utils/timing/ElapsedTimer.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/utils/timing/ElapsedTimer.java Tue May 15 09:20:57 2007
@@ -24,6 +24,7 @@
  */
 public class ElapsedTimer
 {
+    /** display suffix describing the unit of measure. */
     private static final String SUFFIX = "ms.";
 
     /**
@@ -35,7 +36,7 @@
      * Gets the time elapsed between the start time and now. The start time is reset to now.
      * Subsequent calls will get the time between then and now.
      * <p>
-     * @return
+     * @return the elapsed time
      */
     public long getElapsedTime()
     {

Modified: jakarta/jcs/trunk/src/test-conf/TestHSQLDiskCache.ccf
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test-conf/TestHSQLDiskCache.ccf?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/test-conf/TestHSQLDiskCache.ccf (original)
+++ jakarta/jcs/trunk/src/test-conf/TestHSQLDiskCache.ccf Tue May 15 09:20:57 2007
@@ -47,24 +47,21 @@
 jcs.auxiliary.HSQL.attributes=org.apache.jcs.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
 jcs.auxiliary.HSQL.attributes.userName=sa
 jcs.auxiliary.HSQL.attributes.password=
-jcs.auxiliary.HSQL.attributes.url=jdbc:hsqldb:
-jcs.auxiliary.HSQL.attributes.database=target/cache_hsql_db
+jcs.auxiliary.HSQL.attributes.url=jdbc:hsqldb:target/HSQLDiskCacheUnitTest1
 jcs.auxiliary.HSQL.attributes.driverClassName=org.hsqldb.jdbcDriver
 jcs.auxiliary.HSQL.attributes.tableName=JCS_STORE3
 jcs.auxiliary.HSQL.attributes.testBeforeInsert=false
 jcs.auxiliary.HSQL.attributes.maxActive=15
 jcs.auxiliary.HSQL.attributes.allowRemoveAll=true
 jcs.auxiliary.HSQL.attributes.MaxPurgatorySize=10000000
-jcs.auxiliary.HSQL.attributes.EventQueueType=POOLED
-jcs.auxiliary.HSQL.attributes.EventQueuePoolName=disk_cache_event_queue
+jcs.auxiliary.HSQL.attributes.EventQueueType=SINGLE
 
 # HSQL disk cache, doesn't allow remove all
 jcs.auxiliary.HSQL_NORA=org.apache.jcs.auxiliary.disk.jdbc.hsql.HSQLDiskCacheFactory
 jcs.auxiliary.HSQL_NORA.attributes=org.apache.jcs.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
 jcs.auxiliary.HSQL_NORA.attributes.userName=sa
 jcs.auxiliary.HSQL_NORA.attributes.password=
-jcs.auxiliary.HSQL_NORA.attributes.url=jdbc:hsqldb:
-jcs.auxiliary.HSQL_NORA.attributes.database=target/cache_hsql_db
+jcs.auxiliary.HSQL_NORA.attributes.url=jdbc:hsqldb:target/HSQLDiskCacheUnitTest2
 jcs.auxiliary.HSQL_NORA.attributes.driverClassName=org.hsqldb.jdbcDriver
 jcs.auxiliary.HSQL_NORA.attributes.tableName=JCS_STORE4
 jcs.auxiliary.HSQL_NORA.attributes.testBeforeInsert=false

Modified: jakarta/jcs/trunk/src/test-conf/TestJDBCDiskCacheRemoval.ccf
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test-conf/TestJDBCDiskCacheRemoval.ccf?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/test-conf/TestJDBCDiskCacheRemoval.ccf (original)
+++ jakarta/jcs/trunk/src/test-conf/TestJDBCDiskCacheRemoval.ccf Tue May 15 09:20:57 2007
@@ -39,7 +39,7 @@
 jcs.auxiliary.JDBC.attributes=org.apache.jcs.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
 jcs.auxiliary.JDBC.attributes.userName=sa
 jcs.auxiliary.JDBC.attributes.password=
-jcs.auxiliary.JDBC.attributes.url=jdbc:hsqldb:target/cache_hsql_db
+jcs.auxiliary.JDBC.attributes.url=jdbc:hsqldb:target/JDBCDiskCacheRemovalUnitTest
 jcs.auxiliary.JDBC.attributes.driverClassName=org.hsqldb.jdbcDriver
 jcs.auxiliary.JDBC.attributes.tableName=${DATABASE_NAME}
 jcs.auxiliary.JDBC.attributes.testBeforeInsert=false

Modified: jakarta/jcs/trunk/src/test-conf/TestJDBCDiskCacheShrink.ccf
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test-conf/TestJDBCDiskCacheShrink.ccf?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/test-conf/TestJDBCDiskCacheShrink.ccf (original)
+++ jakarta/jcs/trunk/src/test-conf/TestJDBCDiskCacheShrink.ccf Tue May 15 09:20:57 2007
@@ -60,7 +60,7 @@
 jcs.auxiliary.JDBC.attributes=org.apache.jcs.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
 jcs.auxiliary.JDBC.attributes.userName=sa
 jcs.auxiliary.JDBC.attributes.password=
-jcs.auxiliary.JDBC.attributes.url=jdbc:hsqldb:target/cache_hsql_db
+jcs.auxiliary.JDBC.attributes.url=jdbc:hsqldb:target/JDBCDiskCacheShrinkUnitTest
 jcs.auxiliary.JDBC.attributes.driverClassName=org.hsqldb.jdbcDriver
 jcs.auxiliary.JDBC.attributes.tableName=JCS_STORE_SHRINK
 jcs.auxiliary.JDBC.attributes.testBeforeInsert=false

Modified: jakarta/jcs/trunk/src/test-conf/TestMySQLDiskCache.ccf
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test-conf/TestMySQLDiskCache.ccf?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/test-conf/TestMySQLDiskCache.ccf (original)
+++ jakarta/jcs/trunk/src/test-conf/TestMySQLDiskCache.ccf Tue May 15 09:20:57 2007
@@ -41,7 +41,7 @@
 jcs.auxiliary.MYSQL.attributes=org.apache.jcs.auxiliary.disk.jdbc.mysql.MySQLDiskCacheAttributes
 jcs.auxiliary.MYSQL.attributes.userName=sa
 jcs.auxiliary.MYSQL.attributes.password=
-jcs.auxiliary.MYSQL.attributes.url=jdbc:hsqldb:target/cache_hsql_db
+jcs.auxiliary.MYSQL.attributes.url=jdbc:hsqldb:target/MySQLDiskCacheHsqlBackedUnitTest
 jcs.auxiliary.MYSQL.attributes.driverClassName=org.hsqldb.jdbcDriver
 jcs.auxiliary.MYSQL.attributes.tableName=JCS_STORE_MYSQL
 jcs.auxiliary.MYSQL.attributes.testBeforeInsert=false

Modified: jakarta/jcs/trunk/src/test/org/apache/jcs/ZeroSizeCacheUnitTest.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/ZeroSizeCacheUnitTest.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/test/org/apache/jcs/ZeroSizeCacheUnitTest.java (original)
+++ jakarta/jcs/trunk/src/test/org/apache/jcs/ZeroSizeCacheUnitTest.java Tue May 15 09:20:57 2007
@@ -29,11 +29,13 @@
 public class ZeroSizeCacheUnitTest
     extends TestCase
 {
-
+    /** number to get each loop */
     private static int items = 20000;
 
     /**
      * Test setup
+     * <p>
+     * @throws Exception 
      */
     public void setUp()
         throws Exception
@@ -90,7 +92,5 @@
         }
 
         System.out.println( jcs.getStats() );
-
     }
-
 }

Modified: jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java (original)
+++ jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java Tue May 15 09:20:57 2007
@@ -33,6 +33,7 @@
 {
     /**
      * Constructor for the TestDiskCache object.
+     * <p>
      * @param testName
      */
     public BlockDiskCacheSameRegionConcurrentUnitTest( String testName )
@@ -42,6 +43,7 @@
 
     /**
      * Main method passes this test to the text test runner.
+     * <p>
      * @param args
      */
     public static void main( String args[] )
@@ -91,15 +93,6 @@
                 throws Exception
             {
                 this.runTestForRegion( "blockRegion4", 2200, 5200 );
-            }
-        } );
-
-        suite.addTest( new BlockDiskCacheSameRegionConcurrentUnitTest( "testBlockDiskCache5" )
-        {
-            public void runTest()
-                throws Exception
-            {
-                this.runTestForRegion( "blockRegion4", 0, 5200 );
             }
         } );
 

Modified: jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSteadyLoadTest.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSteadyLoadTest.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSteadyLoadTest.java (original)
+++ jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSteadyLoadTest.java Tue May 15 09:20:57 2007
@@ -37,10 +37,13 @@
 public class BlockDiskCacheSteadyLoadTest
     extends TestCase
 {
+    /** String for separating log entries. */
     private static final String LOG_DIVIDER = "---------------------------";
 
+    /** the runtime. */
     private static Runtime rt = Runtime.getRuntime();
 
+    /** The decimal format to use int he logs. */
     private static DecimalFormat format = new DecimalFormat( "#,###" );
 
     /**

Modified: jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java (original)
+++ jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java Tue May 15 09:20:57 2007
@@ -49,6 +49,7 @@
      * Verify the fix for BUG JCS-20
      * <p>
      * Setup an hsql db. Add an item. Remove using partial key.
+     * @throws Exception 
      */
     public void testPartialKeyRemoval_Good()
         throws Exception
@@ -80,6 +81,9 @@
 
     /**
      * Create the database.
+     * @throws InstantiationException 
+     * @throws IllegalAccessException 
+     * @throws ClassNotFoundException 
      * @throws SQLException
      */
     private void setupDatabase()
@@ -91,7 +95,7 @@
         Properties p = new Properties();
         String driver = p.getProperty( "driver", "org.hsqldb.jdbcDriver" );
         String url = p.getProperty( "url", "jdbc:hsqldb:" );
-        String database = p.getProperty( "database", rafroot + "/cache_hsql_db" );
+        String database = p.getProperty( "database", rafroot + "/JDBCDiskCacheRemovalUnitTest" );
         String user = p.getProperty( "user", "sa" );
         String password = p.getProperty( "password", "" );
 
@@ -104,6 +108,7 @@
 
     /**
      * SETUP TABLE FOR CACHE
+     * <p>
      * @param cConn
      */
     private void setupTABLE( Connection cConn )

Modified: jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java (original)
+++ jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java Tue May 15 09:20:57 2007
@@ -33,9 +33,8 @@
 
 /**
  * Runs basic tests for the JDBC disk cache.
- *
+ * <p>
  * @author Aaron Smuts
- *
  */
 public class JDBCDiskCacheShrinkUnitTest
     extends TestCase
@@ -43,7 +42,7 @@
 
     /**
      * Test setup
-     *
+     * <p>
      * @throws ClassNotFoundException
      * @throws IllegalAccessException
      * @throws InstantiationException
@@ -60,7 +59,7 @@
         Properties p = new Properties();
         String driver = p.getProperty( "driver", "org.hsqldb.jdbcDriver" );
         String url = p.getProperty( "url", "jdbc:hsqldb:" );
-        String database = p.getProperty( "database", rafroot + "/cache_hsql_db" );
+        String database = p.getProperty( "database", rafroot + "/JDBCDiskCacheShrinkUnitTest" );
         String user = p.getProperty( "user", "sa" );
         String password = p.getProperty( "password", "" );
 
@@ -72,9 +71,9 @@
     }
 
     /**
-     * Test the basic JDBC disk cache functionality with a hsql backing. Verify
-     * that items configured to expire after 1 second actually expire.
-     *
+     * Test the basic JDBC disk cache functionality with a hsql backing. Verify that items
+     * configured to expire after 1 second actually expire.
+     * <p>
      * @throws Exception
      */
     public void testExpireInBackground()
@@ -110,7 +109,7 @@
 
     /**
      * Verify that those not scheduled to expire do not expire.
-     *
+     * <p>
      * @throws CacheException
      * @throws InterruptedException
      */
@@ -163,7 +162,6 @@
 
     /**
      * Verify that eternal trumps max life.
-     *
      * @throws CacheException
      * @throws InterruptedException
      */
@@ -216,7 +214,6 @@
 
     /**
      * SETUP TABLE FOR CACHE
-     *
      * @param cConn
      */
     void setupTABLE( Connection cConn )

Modified: jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheConcurrentUnitTest.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheConcurrentUnitTest.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheConcurrentUnitTest.java (original)
+++ jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheConcurrentUnitTest.java Tue May 15 09:20:57 2007
@@ -26,23 +26,19 @@
 import org.apache.jcs.JCS;
 
 /**
- * Test which exercises the indexed disk cache. This one uses three different
- * regions for thre threads.
- *
- * @version $Id: TestDiskCache.java 224346 2005-06-04 02:01:59Z asmuts $
+ * Test which exercises the indexed disk cache. This one uses three different regions for thre
+ * threads.
  */
 public class HSQLDiskCacheConcurrentUnitTest
     extends TestCase
 {
     /**
-     * Number of items to cache, twice the configured maxObjects for the memory
-     * cache regions.
+     * Number of items to cache, twice the configured maxObjects for the memory cache regions.
      */
     private static int items = 100;
 
     /**
      * Constructor for the TestDiskCache object.
-     *
      * @param testName
      */
     public HSQLDiskCacheConcurrentUnitTest( String testName )
@@ -52,7 +48,7 @@
 
     /**
      * Main method passes this test to the text test runner.
-     *
+     * <p>
      * @param args
      */
     public static void main( String args[] )
@@ -62,8 +58,8 @@
     }
 
     /**
-     * A unit test suite for JUnit
-     *
+     * A unit test suite for JUnit. Uses ActiveTestSuite to run multiple tests concurrently.
+     * <p>
      * @return The test suite
      */
     public static Test suite()
@@ -105,18 +101,15 @@
      */
     public void setUp()
     {
-        JCS.setConfigFilename( "/TestHSQLDiskCache.ccf" );
+        JCS.setConfigFilename( "/TestHSQLDiskCacheConcurrent.ccf" );
     }
 
     /**
-     * Adds items to cache, gets them, and removes them. The item count is more
-     * than the size of the memory cache, so items should spool to disk.
-     *
-     * @param region
-     *            Name of the region to access
-     *
-     * @exception Exception
-     *                If an error occurs
+     * Adds items to cache, gets them, and removes them. The item count is more than the size of the
+     * memory cache, so items should spool to disk.
+     * <p>
+     * @param region Name of the region to access
+     * @exception Exception If an error occurs
      */
     public void runTestForRegion( String region )
         throws Exception

Modified: jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheUnitTest.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheUnitTest.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheUnitTest.java (original)
+++ jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheUnitTest.java Tue May 15 09:20:57 2007
@@ -25,10 +25,8 @@
 import org.apache.jcs.access.exception.CacheException;
 
 /**
- * Test which exercises the indexed disk cache. This one uses three different
- * regions for thre threads.
- *
- * @version $Id: TestDiskCache.java 224346 2005-06-04 02:01:59Z asmuts $
+ * Test which exercises the indexed disk cache. This one uses three different regions for thre
+ * threads.
  */
 public class HSQLDiskCacheUnitTest
     extends TestCase
@@ -42,21 +40,18 @@
     }
 
     /**
-     * Adds items to cache, gets them, and removes them. The item count is more
-     * than the size of the memory cache, so items should spool to disk.
-     *
-     * @param region
-     *            Name of the region to access
-     *
-     * @exception Exception
-     *                If an error occurs
+     * Adds items to cache, gets them, and removes them. The item count is more than the size of the
+     * memory cache, so items should spool to disk.
+     * <p>
+     * @param region Name of the region to access
+     * @exception Exception If an error occurs
      */
     public void testBasicPutRemove()
         throws Exception
     {
         int items = 20;
 
-        String region = "testCache";
+        String region = "testBasicPutRemove";
 
         JCS jcs = JCS.getInstance( region );
 
@@ -67,11 +62,9 @@
             jcs.put( i + ":key", region + " data " + i );
         }
 
-        System.out.println( jcs.getStats() );
-
-        // Thread.sleep( 1000 );
+        //SleepUtil.sleepAtLeast( 1000 );
 
-        // System.out.println( jcs.getStats() );
+        System.out.println( jcs.getStats() );
 
         // Test that all items are in cache
 
@@ -99,10 +92,9 @@
 
     /**
      * Verify that remove all work son a region where it is not prohibited.
-     *
+     * <p>
      * @throws CacheException
      * @throws InterruptedException
-     *
      */
     public void testRemoveAll()
         throws CacheException, InterruptedException
@@ -120,10 +112,11 @@
         }
 
         // a db thread could be updating when we call remove all?
-        // there was a race on remove all, an element may be put to disk after it is called even though the put
+        // there was a race on remove all, an element may be put to disk after it is called even
+        // though the put
         // was called before clear.
         // I discovered it and removed it.
-        //Thread.sleep( 500 );
+        // Thread.sleep( 500 );
 
         System.out.println( jcs.getStats() );
 
@@ -133,16 +126,15 @@
         {
             String value = (String) jcs.get( i + ":key" );
 
-            assertNull( "value should be null key = [" + i + ":key] value = [" + value + "]",  value );
+            assertNull( "value should be null key = [" + i + ":key] value = [" + value + "]", value );
         }
     }
 
     /**
      * Verify that remove all does not work on a region where it is prohibited.
-     *
+     * <p>
      * @throws CacheException
      * @throws InterruptedException
-     *
      */
     public void testRemoveAllProhibition()
         throws CacheException, InterruptedException
@@ -160,7 +152,7 @@
         }
 
         // a db thread could be updating the disk when
-        //Thread.sleep( 500 );
+        // Thread.sleep( 500 );
 
         System.out.println( jcs.getStats() );
 

Modified: jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheHsqlBackedUnitTest.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheHsqlBackedUnitTest.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheHsqlBackedUnitTest.java (original)
+++ jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheHsqlBackedUnitTest.java Tue May 15 09:20:57 2007
@@ -61,7 +61,7 @@
         Properties p = new Properties();
         String driver = p.getProperty( "driver", "org.hsqldb.jdbcDriver" );
         String url = p.getProperty( "url", "jdbc:hsqldb:" );
-        String database = p.getProperty( "database", rafroot + "/cache_hsql_db" );
+        String database = p.getProperty( "database", rafroot + "/MySQLDiskCacheHsqlBackedUnitTest" );
         String user = p.getProperty( "user", "sa" );
         String password = p.getProperty( "password", "" );
 

Modified: jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java?view=diff&rev=538241&r1=538240&r2=538241
==============================================================================
--- jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java (original)
+++ jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java Tue May 15 09:20:57 2007
@@ -87,7 +87,7 @@
             lur.send( led );
         }
 
-        SleepUtil.sleepAtLeast( numMes );
+        SleepUtil.sleepAtLeast( numMes * 3 );
 
         System.out.println( "PutCount = " + listener.getPutCnt() );
         assertEquals( "Should have received " + numMes + " by now.", numMes, listener.getPutCnt() );
@@ -135,7 +135,7 @@
             service.update( element );
         }
 
-        Thread.sleep( 1000 );
+        SleepUtil.sleepAtLeast( 1000 );
 
         System.out.println( "cache. getPutCount = " + cacheMgr.getCache().getUpdateCount() );
 
@@ -171,12 +171,12 @@
         ICacheElement element = new CacheElement( "test", "key", "value1" );
         service.update( element );
 
-        Thread.sleep( 300 );
+        SleepUtil.sleepAtLeast( 300 );
 
         ICacheElement element2 = new CacheElement( "test", "key", "value2" );
         service.update( element2 );
 
-        Thread.sleep( 1000 );
+        SleepUtil.sleepAtLeast(  1000 );
 
         ICacheElement cacheElement = cacheMgr.getCache().get( "key" );
         System.out.println( "cacheElement = " + cacheElement );
@@ -214,12 +214,12 @@
         ICacheElement element = new CacheElement( "test", key, "value1" );
         service.update( element );
 
-        Thread.sleep( 300 );
+        SleepUtil.sleepAtLeast( 300 );
 
         ICacheElement element2 = new CacheElement( "test", key, "value2" );
         service.update( element2 );
 
-        Thread.sleep( 1000 );
+        SleepUtil.sleepAtLeast( 1000 );
 
         ICacheElement cacheElement = cacheMgr.getCache().get( "key" );
         System.out.println( "cacheElement = " + cacheElement );
@@ -257,7 +257,7 @@
         LateralTCPService service = new LateralTCPService( lattr2 );
         service.setListenerId( 123456 );
 
-        Thread.sleep( 300 );
+        SleepUtil.sleepAtLeast(  300 );
 
         // DO WORK
         ICacheElement result = service.get( "test", "key" );



---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org