tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Kilbride" <>
Subject Re: How to make DbConnectionBroker from to work with Mysql?
Date Tue, 17 Apr 2001 04:33:06 GMT
There's very good documentation and examples at, but here's
a quickie overview:

import com.javaexchange.dbConnectionBroker.*;

DbConnectionBroker _broker;
String dbDriver="";
String dbServer="jdbc:mysql://localhost:3306";
String dbLogin="your_login";
String dbPassword="your_password";
int minConns=2;
int maxConns=20;
String logFile="path/to/your/log/file";
double recycleTime=5.0;

_broker = new DbConnectionBroker(dbDriver,

Connection conn = _broker.getConnection();

// Normal use of connection here....


I'm assuming you're using the mm.mysql driver and connecting to localhost.
If not, you need to change the dbDriver and dbServer strings. At, there are examples for implementing a Singleton pattern
and using inheritance to make it easier to use the connection broker in your
code. I suggest you go through the docs. You can even view them online:


----- Original Message -----
From: "Jason" <>
To: <>
Sent: Monday, April 16, 2001 7:51 PM
Subject: How to make DbConnectionBroker from to work with

> Hi everyone,
>     anyone knows how to use DbConnectionBroker from to
> connect to MYSQL instead of to Oracle?  My application is using Mysql
> and it runs fine.  Now I want to use connection pooling to improve the
> performance before deployment.  However, I cannot make
> DbConnectionBroker and Mysql work together.  Any idea?
> Thanx!
> Jason

View raw message