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 14:18:55 -0800
This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:17:00 PDT