What’s New in Connector/J 8.0?



Connector/J 8.0 was formerly known as Connector/J 6.0; see Changes in MySQL Connector/J 8.0.7 for an explanation of the version number change. This section describes differences between Connector/J 8.0 and Connector/J 5.1.

Here is a summary of major new features of Connector/J 8.0 (for details on the differences between the Connector/J 5.1 and 8.0 and for instructions on migrating, see Section 4.4.1, “Upgrading to MySQL Connector/J 8.0”):

  • It supports MySQL 5.6, 5.7, and 8.0.
  • It supports the JDBC 4.2 specification.
  • It is a MySQL driver for the Java 8 platform.
  • It supports the new X DevAPI, through which native support by MySQL 5.7 and 8.0 for JSON, NoSQL, document collection, and other features are provided to Java applications. See Using MySQL as a Document Store and the X DevAPI User Guide for details.

https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-api-changes.html Changes in the Connector/J API

This section describes some of the more important changes to the Connector/J API going from version 5.1 to 8.0. You might need to adjust your API calls accordingly:

  • The name of the class that implements java.sql.Driver in MySQL Connector/J has changed from com.mysql.jdbc.Driver to com.mysql.cj.jdbc.Driver. The old class name has been deprecated.
  • The names of these commonly-used classes and interfaces have also been changed:
    • ExceptionInterceptor: from com.mysql.jdbc.ExceptionInterceptor to com.mysql.cj.exceptions.ExceptionInterceptor
    • StatementInterceptor: from com.mysql.jdbc.StatementInterceptorV2 to com.mysql.cj.interceptors.QueryInterceptor
    • ConnectionLifecycleInterceptor: from com.mysql.jdbc.ConnectionLifecycleInterceptor to com.mysql.cj.jdbc.interceptors.ConnectionLifecycleInterceptor
    • AuthenticationPlugin: from com.mysql.jdbc.AuthenticationPlugin to com.mysql.cj.protocol.AuthenticationPlugin
    • BalanceStrategy: from com.mysql.jdbc.BalanceStrategy to com.mysql.cj.jdbc.ha.BalanceStrategy
    • MysqlDataSource: from com.mysql.jdbc.jdbc2.optional.MysqlDataSource to com.mysql.cj.jdbc.MysqlDataSource
    • MysqlDataSourceFactory: from com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory to com.mysql.cj.jdbc.MysqlDataSourceFactory
    • MysqlConnectionPoolDataSource: from com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource to com.mysql.cj.jdbc.MysqlConnectionPoolDataSource
    • MysqlXADataSource: from com.mysql.jdbc.jdbc2.optional.MysqlXADataSource to com.mysql.cj.jdbc.MysqlXADataSource
    • MysqlXid: from com.mysql.jdbc.jdbc2.optional.MysqlXid to com.mysql.cj.jdbc.MysqlXid

Comments are closed