Can I just load com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource class as a bean in Spring? What are this class API? Where it can be found?
I can only find samples of JNDI usage.
Are there any ready-made beans to have such properties like driverName, connectionString userName, password and which allow to issue SQL statements?
EDIT 1
Sorry forgot to say that I need solution except with DriverManagerDataSource because it is said manual it is very basic and not suitable for J2EE containers.
Section 13.3.1 of the Spring User Guide, titled Data access with JDBC, shows how to create a bean to access a database. You specify username, password, driver class, url, etc., to create a bean representing a
DataSource.You can use any data source class here, not only the
DriverManagerDataSourceshown in the example at the link above. For example, we deploy to Tomcat so I useorg.apache.tomcat.jdbc.pool.DataSourceas our data source. If you’re using Tomcat you can read more about that pool here: The Tomcat JDBC Connection Pool