cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [2/2] git commit: updated refs/heads/master to 971c8a7
Date Wed, 01 Jun 2016 15:39:38 GMT
Merge pull request #1574 from nlivens/mysql_driver_issue

Make sure that the DB drivers are loaded before creating connectionsI've digged deeper, and
found out that Tomcat is really specific in how it loads the JDBC drivers apparently.
If we would be using the standard JDBC connection pooling of Tomcat (tomcat-jdbc) instead
of commons-dbcp, we would have the option to specify a "driverClassName" when creating our
This is not the case for commons-dbcp, which we are using within ACS.

If you check an official example of Tomcat :'_Java

As you can see in the above examples, both of them specify the driverClassName.
In the underlying implementation of Tomcat, Tomcat will do ```Class.forName(driverClassName)```
which will trigger the auto-registration of the Driver.

Tomcat code :
            if (driver==null) {
                if (log.isDebugEnabled()) {
                    log.debug("Instantiating driver using class: "+poolProperties.getDriverClassName()+"
                driver = (java.sql.Driver) Class.forName(poolProperties.getDriverClassName(),
                                                         true, PooledConnection.class.getClassLoader()

* pr/1574:
  Make sure that the DB drivers are loaded before initiating connections

Signed-off-by: Will Stevens <>


Branch: refs/heads/master
Commit: 971c8a74e487e1048dd85338b80baa15902858d4
Parents: bb9148b c956749
Author: Will Stevens <>
Authored: Wed Jun 1 11:39:15 2016 -0400
Committer: Will Stevens <>
Committed: Wed Jun 1 11:39:16 2016 -0400

 .../db/src/com/cloud/utils/db/ | 69 ++++++++++++++++++++
 .../com/cloud/utils/db/   | 18 +----
 2 files changed, 72 insertions(+), 15 deletions(-)

View raw message