Bug 8206 - SQL Actions Aren't Considering url [,driver] [, [user] [, password]
Summary: SQL Actions Aren't Considering url [,driver] [, [user] [, password]
Status: RESOLVED FIXED
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: unspecified
Hardware: Other Windows XP
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-17 13:40 UTC by David Geary
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Geary 2002-04-17 13:40:10 UTC
If you specify a string value with the syntax in the Summary, 
DataSourceUtil.getDataSource() will throw an exception if it's not a valid 
JNDI path. The call to DataSourceUtil.setUsingParams() is never made.

Here's the pertinent code from DataSourceUtil:

if (rawDataSource instanceof String) {
            try {
                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);
            } catch (NamingException ex) {
                throw new JspException(ex.toString(), ex);
            }
            if (dataSource == null) {
                setUsingParams((String)rawDataSource);
            }
        }
Comment 1 Jan Luehe 2002-04-17 21:22:00 UTC
Fixed.