I have created a C3P0DataSourceFactory and in the factory, I configured all the required elements for C3P0 (url, user, password and a connectionCustomizer). I have given the class name of the datasource factory in the Mybatis config. I can succesfully run SQL statements through Mybatis only if I give Mybatis the full correct URL. I have verified (logging statements) that the datasourceFactory has been called, C3P0 has initialized, and the connectionCustomizer has been called. The difficulty is that Mybatis is using the url in the Mybatis config and not the connection provided by C3P0.
I have configured C3P0 in the DataSourceFactory and Mybatis in XML.
I know I must be missing one little piece somewhere, but I can't seem to find it!
Could someone please suggest how to correctly configure Mybatis to use connections from the C3P0?
Scott Walton