Chris

Many thanks. I'll be trying these out over the next few days.

Martin O'Shea.

Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Martin,
> 
> On 10/1/2009 12:53 PM, MartinOShea wrote:
>>     private static DataSource dataSource = null;
> 
> I wouldn't recommend caching the DataSource object. This limits your
> ability to reconfigure the DataSource on the fly if you want to. Local
> JNDI lookups are super fast, so caching doesn't really save you that
> much time.
> 
>> This should be read in tandem with the code I posted yesterday
>> illustrating
>> a typical database operation.
>> 
>> How do I switch query logging on though?
> 
> On the server:
> http://dev.mysql.com/doc/refman/5.0/en/query-log.html
> 
> On the client:
> http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html
> 
> (Look for the profileSQL setting).
> 
> Note that, if you are using DBCP's reconnection capabilities, it's not
> necessary to set autoReconnect=true in the connection string (you'll
> just end up creating 2 new connections when your connection is dropped,
> though the first one will end up being destroyed pretty quickly).
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkrFIHkACgkQ9CaO5/Lv0PDUcwCfW1Wz6ieZ0pEnm/p+dm9vsiVo
> IFIAoIlQSxys4cHzVi+YAro3BDrV0dju
> =Ojns
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tomcat-6.X-and-MySQL-connection-pooling-issue-tp25677820p25707037.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to