Uh oh!
There was an error while loading. Please reload this page.
spanner-jdbc: Step 27 - JdbcDriver - #5912
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
68038e2 to
0dd1027CompareUh oh!
There was an error while loading. Please reload this page.
| } | ||
| private static JdbcDriver registeredDriver; | ||
| static void register() throws SQLException { |
There was a problem hiding this comment.
Sorry, one last question. How come this is different than the class loading done in JdbcDataSource?
There was a problem hiding this comment.
The JdbcDataSource is not responsible for registering the JDBC driver. That is the responsibility of the driver itself, and is done automatically when the driver class (JdbcDriver) is loaded. In most newer environments this is done automatically thanks to the service registration in META-INF/services/java.sqlDriver. The JdbcDataSource does a manual load of the driver class to be 100% certain that the driver is loaded and registered, although in most cases it will be redundant.
* add JdbcDriver * add jdbc DataSource implementation * removed information from test connection url
Adds the actual JDBC Driver, including the service registration file for the driver.