jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/sql DataSourceUtil.java
Date Wed, 17 Apr 2002 21:21:24 GMT
luehe       02/04/17 14:21:24

  Modified:    standard/src/org/apache/taglibs/standard/resources
                        Resources.properties
               standard/src/org/apache/taglibs/standard/tag/common/sql
                        DataSourceUtil.java
  Log:
  Fixed 8206: SQL Actions Aren't Considering url [,driver] [, [user] [, password]
  
  Revision  Changes    Path
  1.24      +3 -0      jakarta-taglibs/standard/src/org/apache/taglibs/standard/resources/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/resources/Resources.properties,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- Resources.properties	17 Apr 2002 13:22:18 -0000	1.23
  +++ Resources.properties	17 Apr 2002 21:21:24 -0000	1.24
  @@ -196,6 +196,9 @@
   SQL_PROCESS_ERROR=\
       Error processing SQL: "{0}"
   
  +SQL_DATASOURCE_INVALID=\
  +    dataSource is neither a String nor a javax.sql.DataSource
  +
   # XML
   
   FOREACH_NOT_NODESET=\
  
  
  
  1.2       +7 -8      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/sql/DataSourceUtil.java
  
  Index: DataSourceUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/sql/DataSourceUtil.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DataSourceUtil.java	16 Apr 2002 00:01:34 -0000	1.1
  +++ DataSourceUtil.java	17 Apr 2002 21:21:24 -0000	1.2
  @@ -119,17 +119,16 @@
                   Context ctx = new InitialContext();
                   // relative to standard JNDI root for J2EE app
                   Context envCtx = (Context) ctx.lookup("java:comp/env");
  -                dataSource = (DataSource) envCtx.lookup((String)rawDataSource);
  +                dataSource = (DataSource) envCtx.lookup((String) rawDataSource);
               } catch (NamingException ex) {
  -                throw new JspException(ex.toString(), ex);
  +                setUsingParams((String) rawDataSource);
               }
  -            if (dataSource == null) {
  -                setUsingParams((String)rawDataSource);
  -            }
  -        }
  -        else if (rawDataSource instanceof DataSource) {
  +        } else if (rawDataSource instanceof DataSource) {
               dataSource = (DataSource) rawDataSource;
  -        }
  +        } else {
  +	    throw new JspException(
  +                Resources.getMessage("SQL_DATASOURCE_INVALID"));
  +	}
       }
   
       /**
  
  
  

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


Mime
View raw message