Hi Victor,
Thanks, but I've never really experienced any problems with the mm.mysql
driver and I've been using it for almost 2 years. I've been using the
DbConnectionBroker code from www.javaexchange.com for even longer and I'd
like to start using the standard JNDI DataSource stuff instead. It's just
confusing. I can't find a clear explanation of when to use a DataSource vs.
a ConnectionPoolDataSource vs. a PooledConnection.
Anybody who can lend some insight would be much appreciated.
Thanks,
--jeff
----- Original Message -----
From: "Victor van Dijk" <victor@xxx.com>
To: <resin-interest@xxx.com>
Sent: Wednesday, April 03, 2002 2:18 PM
Subject: RE: Help with connection pooling the *right* way...
> Hi,
>
> It seems to be Ok. But you can also use the caucho MySQL driver. It is
> supposed to be faster than the mm.mysql driver. The caucho driver is
> already included when you install 2.0.5 .
> Take a look at http://www.caucho.com/projects/jdbc-mysql/ for more
> details.
>
> ---------------------------
> <resource-ref>
> <res-ref-name>jdbc/test</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <init-param driver-name="com.caucho.jdbc.mysql.Driver"/>
> <init-param url="jdbc:mysql_caucho://localhost:3306/test"/>
> <init-param user="XXXX"/>
> <init-param password="XXXX"/>
> <init-param max-connections="20"/>
> <init-param max-idle-time="600"/>
> </resource-ref>
> ---------------------------
>
>
> -----Oorspronkelijk bericht-----
> Van: owner-resin-interest@xxx.com
> [mailto:owner-resin-interest@xxx.com] Namens Jeff Kilbride
> Verzonden: woensdag 3 april 2002 23:35
> Aan: Resin Interest
> Onderwerp: Help with connection pooling the *right* way...
>
> I'm using Resin 2.0.5 and MySQL. My current configuration looks like
> this:
>
> ---------------------------
> <resource-ref>
> <res-ref-name>jdbc/test</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <init-param driver-name="org.gjt.mm.mysql.Driver"/>
> <init-param
> url="jdbc:mysql://localhost:3306/test?autoReconnect=true"/>
> <init-param user="XXXX"/>
> <init-param password="XXXX"/>
> <init-param max-connections="20"/>
> <init-param max-idle-time="600"/>
> </resource-ref>
> ---------------------------
>
> I use this resource for form based authentication and everything seems
> to be
> working correctly. I turned on the sql.log and I can see connections
> being
> created, re-used, and then closed when they timeout. Here's my question:
> is
> this the "correct" way to set up a connection pool with Resin and MySQL?
> Should I be using some sort of PooledDataSource instead of using the
> Driver
> directly? MySQL comes with both a MysqlPooledConnection class and a
> MysqlConnectionPoolDataSource class, but I have no idea if/when/where to
> use
> them.
>
> This is the one aspect of configuration that always confuses me. I have
> a
> feeling my setup is OK, but may not be the best way to do it. Can
> somebody
> please explain this or possibly give an example of their setup?
>
> Thanks,
> --jeff
>
Received on Wed 03 Apr 2002 22:56:26 -0800
This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:17:00 PDT