tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "s.bernstein" <s.bernst...@attbi.com>
Subject Re: Problem w/ 2 jdbc DataSources
Date Sat, 22 Feb 2003 03:50:39 GMT
Solved it.  Pretty embarrassing.  The
org.apache.commons.dbcp.BasicDataSourceFactory class has a setter for
"validationQuery", so I have an  entry in server.xml for that.  I mindlessly
set a SELECT on an empty table, so the loop was repeated attempts to
validate the query.  It's always like that, isn't it?

Steve

----- Original Message -----
From: "s.bernstein" <s.bernstein@attbi.com>
To: <tomcat-user@jakarta.apache.org>
Sent: Friday, February 21, 2003 6:48 PM
Subject: Problem w/ 2 jdbc DataSources


> Hi,
> I set up one JNDI/DBCP connection pool to one MySQL db following the JNDI
> DataSources HOW-TO with seemingly no problems.  I needed to add a second
> MySQL running on the same machine under the same MySQL server (my W2K
> development machine).  I followed the exact same steps, only the db name
and
> URL are different.  The username/pwd are the same between the two, though
> the privileges are a little different. The second db has a separate
> connection pool class, so there's one pool instantiated for each db in the
> application scope for the web app.
>
> Attempts to connect to the 2nd db don't go through.  I replaced the
> "getConnection()" call with a hard-coded DriverManager approach and it
> worked, so I think that narrows it to the Tomcat config.  Watching the
> process under the "process" tab of WinMySQLadmin, refreshing constantly,
> seems to indicate there's a failing logon loop after a JSP attempts to get
a
> connection.  It seems to be infinite--I haven't waited for it to timeout.
>
> Is there some config pitfall or instruction I missed for multiple database
> environments?
>
> Thanks for your help,
> Steve
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message