tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/factory TyrexDataSourceFactory.java
Date Fri, 31 May 2002 21:20:49 GMT
remm        2002/05/31 14:20:48

  Modified:    catalina/src/share/org/apache/naming/factory Tag:
                        tomcat_40_branch TyrexDataSourceFactory.java
  Log:
  - Add back the error logging.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.3   +21 -6     jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/factory/TyrexDataSourceFactory.java
  
  Index: TyrexDataSourceFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/factory/TyrexDataSourceFactory.java,v
  retrieving revision 1.3.2.2
  retrieving revision 1.3.2.3
  diff -u -r1.3.2.2 -r1.3.2.3
  --- TyrexDataSourceFactory.java	31 May 2002 21:17:35 -0000	1.3.2.2
  +++ TyrexDataSourceFactory.java	31 May 2002 21:20:48 -0000	1.3.2.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/factory/TyrexDataSourceFactory.java,v
1.3.2.2 2002/05/31 21:17:35 remm Exp $
  - * $Revision: 1.3.2.2 $
  - * $Date: 2002/05/31 21:17:35 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/factory/TyrexDataSourceFactory.java,v
1.3.2.3 2002/05/31 21:20:48 remm Exp $
  + * $Revision: 1.3.2.3 $
  + * $Date: 2002/05/31 21:20:48 $
    *
    * ====================================================================
    *
  @@ -102,7 +102,7 @@
    * </ul>
    * 
    * @author Remy Maucherat
  - * @version $Revision: 1.3.2.2 $ $Date: 2002/05/31 21:17:35 $
  + * @version $Revision: 1.3.2.3 $ $Date: 2002/05/31 21:20:48 $
    */
   
   public class TyrexDataSourceFactory
  @@ -229,8 +229,9 @@
                       return ds;
                       
                   } catch (Throwable t) {
  -                    // Another factory could handle this, so just give up
  -                    return null;
  +                    log("Cannot create DataSource, Exception", t);
  +                    throw new NamingException
  +                        ("Exception creating DataSource: " + t.getMessage());
                   }
                   
               } else {
  @@ -243,6 +244,20 @@
           
       }
   
  +
  +    // -------------------------------------------------------- Private Methods
  +
  +
  +    private void log(String message) {
  +        System.out.print("TyrexDataSourceFactory:  ");
  +        System.out.println(message);
  +    }
  +
  +
  +    private void log(String message, Throwable exception) {
  +        log(message);
  +        exception.printStackTrace(System.out);
  +    }
   
   }
   
  
  
  

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


Mime
View raw message