mpoeschl    02/03/13 02:33:50

  Modified:    src/java/org/apache/torque Torque.java TorqueException.java
                        TorqueRuntimeException.java
  Log:
  javadocs only
  
  Revision  Changes    Path
  1.46      +41 -5     jakarta-turbine-torque/src/java/org/apache/torque/Torque.java
  
  Index: Torque.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/Torque.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- Torque.java       6 Mar 2002 23:17:18 -0000       1.45
  +++ Torque.java       13 Mar 2002 10:33:50 -0000      1.46
  @@ -90,7 +90,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Rafal Krzewski</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Martin Poeschl</a>
  - * @version $Id: Torque.java,v 1.45 2002/03/06 23:17:18 jvanzyl Exp $
  + * @version $Id: Torque.java,v 1.46 2002/03/13 10:33:50 mpoeschl Exp $
    */
   public class Torque implements Initializable, Configurable
   {
  @@ -139,7 +139,6 @@
        */
       protected static Map managers = new HashMap();
   
  -
       /**
        * The logging category.
        */
  @@ -241,6 +240,7 @@
       /**
        * configure torque
        *
  +     * @param config Configuration
        * @see org.apache.stratum.lifecycle.Configurable
        * @throws TorqueException Any exceptions caught during processing will be
        *         rethrown wrapped into a TorqueException.
  @@ -357,6 +357,10 @@
        * <br>
        *
        * Generic ServiceBroker provides no Services.
  +     *
  +     * @param configuration the Configuration representing the properties file
  +     * @throws TorqueException Any exceptions caught during processing will be
  +     *         rethrown wrapped into a TorqueException.
        */
       protected static void initManagerMappings(Configuration configuration)
           throws TorqueException
  @@ -383,9 +387,16 @@
           }
       }
   
  +    /**
  +     * Initialize a manager
  +     *
  +     * @param name
  +     * @param className
  +     * @throws TorqueException
  +     */
       private static void initManager(String name, String className)
           throws TorqueException
  -    { 
  +    {
           AbstractBaseManager manager = (AbstractBaseManager) managers.get(name);
   
           if (manager == null)
  @@ -401,13 +412,18 @@
                   catch (Exception e)
                   {
                       throw new TorqueException(
  -                        "Could not instantiate manager associated with key: " 
  +                        "Could not instantiate manager associated with key: "
                           + name, e);
                   }
               }
           }
       }
   
  +    /**
  +     * Determine whether Torque has already been initialized.
  +     *
  +     * @return true if Torque is already initialized
  +     */
       public static boolean isInit()
       {
           return isInit;
  @@ -415,6 +431,8 @@
   
       /**
        * Sets the configuration for Torque and all dependencies.
  +     *
  +     * @param c the Configuration
        */
       public static void setConfiguration(Configuration c)
       {
  @@ -423,6 +441,8 @@
   
       /**
        * Get the configuration for this component.
  +     *
  +     * @return the Configuration
        */
       public static Configuration getConfiguration()
       {
  @@ -534,6 +554,12 @@
           return false;
       }
   
  +    /**
  +     * This method returns a Manager for the given name.
  +     *
  +     * @param name
  +     * @return a Manager
  +     */
       public static AbstractBaseManager getManager(String name)
       {
           return (AbstractBaseManager)managers.get(name);
  @@ -600,7 +626,7 @@
        * of the connection pool to associate with the map.
        *
        * @param name The name of the database corresponding to the
  -     * <code>DatabaseMap</code> to retrieve.
  +     *        <code>DatabaseMap</code> to retrieve.
        * @return The named <code>DatabaseMap</code>.
        * @throws TorqueException Any exceptions caught during processing will be
        *         rethrown wrapped into a TorqueException.
  @@ -672,6 +698,11 @@
           return map;
       }
   
  +    /**
  +     *
  +     *
  +     * @param className
  +     */
       public static void registerMapBuilder(String className)
       {
           mapBuilders.add(className);
  @@ -807,6 +838,7 @@
        * Release a connection back to the database pool.  <code>null</code>
        * references are ignored.
        *
  +     * @param dbconn the connection to release
        * @throws TorqueException Any exceptions caught during processing will be
        *         rethrown wrapped into a TorqueException.
        */
  @@ -877,6 +909,10 @@
        * @param url The URL of the database to use.
        * @param username The name of the database user.
        * @param password The password of the database user.
  +     * @param maxCons
  +     * @param expiryTime
  +     * @param maxConnectionAttempts
  +     * @param connectionWaitTimeout
        * @throws TorqueException Any exceptions caught during processing will be
        *         rethrown wrapped into a TorqueException.
        */
  
  
  
  1.6       +27 -0     
jakarta-turbine-torque/src/java/org/apache/torque/TorqueException.java
  
  Index: TorqueException.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/TorqueException.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TorqueException.java      6 Mar 2002 23:17:18 -0000       1.5
  +++ TorqueException.java      13 Mar 2002 10:33:50 -0000      1.6
  @@ -61,23 +61,50 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Daniel Rall</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
  + * @version $Id: TorqueException.java,v 1.6 2002/03/13 10:33:50 mpoeschl Exp $
    */
   public class TorqueException extends NestableException
   {
  +
  +    /**
  +     * Constructs a new <code>TorqueException</code> without specified detail
  +     * message.
  +     */
       public TorqueException()
       {
       }
   
  +    /**
  +     * Constructs a new <code>TorqueException</code> with specified detail
  +     * message.
  +     *
  +     * @param msg the error message.
  +     */
       public TorqueException(String msg)
       {
           super(msg);
       }
   
  +    /**
  +     * Constructs a new <code>TorqueException</code> with specified nested
  +     * <code>Throwable</code>.
  +     *
  +     * @param nested the exception or error that caused this exception
  +     *               to be thrown.
  +     */
       public TorqueException(Throwable nested)
       {
           super(nested);
       }
   
  +    /**
  +     * Constructs a new <code>TorqueException</code> with specified detail
  +     * message and nested <code>Throwable</code>.
  +     *
  +     * @param msg the error message.
  +     * @param nested the exception or error that caused this exception
  +     *               to be thrown.
  +     */
       public TorqueException(String msg, Throwable nested)
       {
           super(msg, nested);
  
  
  
  1.4       +12 -8     
jakarta-turbine-torque/src/java/org/apache/torque/TorqueRuntimeException.java
  
  Index: TorqueRuntimeException.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/TorqueRuntimeException.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TorqueRuntimeException.java       10 Aug 2001 17:47:06 -0000      1.3
  +++ TorqueRuntimeException.java       13 Mar 2002 10:33:50 -0000      1.4
  @@ -63,16 +63,21 @@
   import java.util.StringTokenizer;
   
   /**
  - * This is a base class of runtime exeptions thrown by Turbine.
  + * This is a base class of runtime exeptions thrown by Torque.
    *
    * This class represents a non-checked type exception (see
  - * {@see java.lang.RuntimeException}). It has the nested stack trace
  - * functionality found in the {@see TurbineException} class.
  - *
  - * It's sad that this class is a straight copy/paste of Turbine exception.
  - * I wish that Java supported NonCheckedException marker interface...
  + * {@see java.lang.RuntimeException}).
  + * It is intended to ease the debugging by carrying on the information about the
  + * exception which was caught and provoked throwing the current exception.
  + * Catching and rethrowing may occur multiple times, and provided that all
  + * exceptions except the first one are descendands of
  + * <code>TorqueRuntimeException</code>, when the exception is finally printed
  + * out using any of the <code>printStackTrace()</code> methods, the stacktrace
  + * will contain the information about all exceptions thrown and caught on the
  + * way.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Rafal Krzewski</a>
  + * @version $Id: TorqueRuntimeException.java,v 1.4 2002/03/13 10:33:50 mpoeschl Exp 
$
    */
   public class TorqueRuntimeException
       extends RuntimeException
  @@ -131,8 +136,7 @@
       }
   
       /**
  -     * Prints the stack trace of this exception the the standar error
  -     * stream.
  +     * Prints the stack trace of this exception the the standar error stream.
        */
       public void printStackTrace()
       {
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to