13 messages in com.mysql.lists.javaRe: MySQL Connector/J 5.0.0 Beta Has ...
FromSent OnAttachments
Mark Matthews03 Jan 2006 12:55 
Mark Kirkwood09 Feb 2006 17:24 
Jack Wang09 Feb 2006 18:28 
Mark Kirkwood09 Feb 2006 20:15 
Jack Wang09 Feb 2006 20:52 
Mark Kirkwood09 Feb 2006 22:08 
Jack Wang09 Feb 2006 23:22 
Mark Kirkwood10 Feb 2006 00:54 
Jack Wang10 Feb 2006 05:30 
Mark Matthews10 Feb 2006 06:32 
Mark Kirkwood10 Feb 2006 13:47 
Mark Kirkwood10 Feb 2006 14:27 
Mark Kirkwood06 Mar 2006 16:34 
Subject:Re: MySQL Connector/J 5.0.0 Beta Has Been Released
From:Mark Kirkwood (mar@paradise.net.nz)
Date:03/06/2006 04:34:29 PM
List:com.mysql.lists.java

Mark Kirkwood wrote:

Mark Matthews wrote:

Mark,

I've taken a look at the patch, and I have a cleaner way to do it.

Good, it's a real hack :-)

There is an issue with redefining the USER_PROPERTY_KEY to "username", since that makes all legacy code that uses "user=" in a URL no longer work.

I'm also wondering why you want "userName", since page 12 of the JDBC-2.0 specification (where DataSources were first introduced), says the property must be called "user"?

Ok - I did wonder about that. Looks like the Tomcat 5.0 docs

http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html

and the corresponding Mysql 5.0 documented datasource examples are in error (they all specify "username") - a bit confusing eh?

To further add to the confusion note that the Apache/Tomcat factory

org.apache.commons.dbcp.BasicDataSourceFactory

works with "username"

I thought I should help clear up some confusion about this (read: my confusion...). It looks like there is *no* standard or convention at all for the user(name) variable used by the various connection factories: e.g:

Tomcat: username Jboss: user-name Mysql: user

This (obviously) means you can't just plug-n-play to a different one (as I was essentially doing).

Now (as Mark M indicated) the underlying JDBC-2.0 protocol demands "user", so the factories are doing that remapping themselves. Hope that helps and sorry for the noise!

Mark