johng       01/08/14 10:07:50

  Modified:    java/src/org/apache/xalan/lib/sql ConnectionPool.java
                        DefaultConnectionPool.java SQLDocument.java
                        XConnection.java
  Log:
  Fixed bug in connect method where User and Password were not
  correctly being passed to the JDBC Driver. Requires chnage in
  ConnectionPool Interface
  Submitted by: John Gentilin
  
  Revision  Changes    Path
  1.9       +6 -0      
xml-xalan/java/src/org/apache/xalan/lib/sql/ConnectionPool.java
  
  Index: ConnectionPool.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/lib/sql/ConnectionPool.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ConnectionPool.java       2001/08/01 02:38:30     1.8
  +++ ConnectionPool.java       2001/08/14 17:07:49     1.9
  @@ -185,5 +185,11 @@
      */
     public void setPoolEnabled( final boolean flag );
   
  +  /**
  +   * Used to pass in extra configuration options during the
  +   * database connect phase.
  +   */
  +  public void setProtocol(Properties p);
  +
   
   }
  
  
  
  1.9       +16 -16    
xml-xalan/java/src/org/apache/xalan/lib/sql/DefaultConnectionPool.java
  
  Index: DefaultConnectionPool.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/lib/sql/DefaultConnectionPool.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultConnectionPool.java        2001/08/01 02:38:30     1.8
  +++ DefaultConnectionPool.java        2001/08/14 17:07:50     1.9
  @@ -206,22 +206,22 @@
       m_ConnectionProtocol.put("user", u);
     }
   
  -///**
  -//   * Copy the properties from the source to our properties
  -//   * @param p
  -//   * @return
  -//   */
  -//  public void setProtocol( Properties p )
  -//  {
  -//    Enumeration e = p.keys();
  -//
  -//    while (e.hasMoreElements())
  -//    {
  -//      String key = (String) e.nextElement();
  -//      m_ConnectionProtocol.put(key, p.getProperty(key));
  -//    }
  -//
  -//  }
  +  /**
  +   * The Protocol string is used to pass in other connection
  +   * properties. A properties file is a general purpose container
  +   *
  +   * @param p
  +   * @return
  +   */
  +  public void setProtocol( Properties p )
  +  {
  +    Enumeration e = p.keys();
  +    while (e.hasMoreElements())
  +    {
  +      String key = (String) e.nextElement();
  +      m_ConnectionProtocol.put(key, p.getProperty(key));
  +    }
  +  }
   
   
     /**
  
  
  
  1.15      +2 -2      
xml-xalan/java/src/org/apache/xalan/lib/sql/SQLDocument.java
  
  Index: SQLDocument.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/lib/sql/SQLDocument.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- SQLDocument.java  2001/08/01 02:38:30     1.14
  +++ SQLDocument.java  2001/08/14 17:07:50     1.15
  @@ -282,7 +282,7 @@
      * @param streamingMode
      * @throws SQLException
      */
  -  public SQLDocument( DTMManager mgr, int ident, ConnectionPool pool, 
Connection con, Statement stmt, ResultSet data, boolean streamingMode )throws 
SQLException 
  +  public SQLDocument( DTMManager mgr, int ident, ConnectionPool pool, 
Connection con, Statement stmt, ResultSet data, boolean streamingMode )throws 
SQLException
     {
       super(mgr, ident);
   
  @@ -770,8 +770,8 @@
       if (DEBUG) System.out.println("nextNode()");
       try
       {
  -      // return m_ResultSet.isAfterLast();
         return false;
  +//      return m_ResultSet.isAfterLast();
       }
       catch(Exception e)
       {
  
  
  
  1.20      +1 -1      
xml-xalan/java/src/org/apache/xalan/lib/sql/XConnection.java
  
  Index: XConnection.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/lib/sql/XConnection.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- XConnection.java  2001/08/01 18:37:27     1.19
  +++ XConnection.java  2001/08/14 17:07:50     1.20
  @@ -563,7 +563,7 @@
   
         defpool.setDriver(driver);
         defpool.setURL(dbURL);
  -//      defpool.setProtocol(prop);
  +      defpool.setProtocol(prop);
   
         // Only enable pooling in the default pool if we are explicatly
         // told too.
  
  
  

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

Reply via email to