differences between ms sql microsoft's jdbc drivers and jTDS's driver

前端 未结 5 932
抹茶落季
抹茶落季 2021-01-03 19:25

What are the differences between each driver? I mean, besides one of them being open-source

What are the pros / cons of each one?

Which one would you recomme

5条回答
  •  星月不相逢
    2021-01-03 19:39

    While for many years jTDS was much superior than buggy mssql's own driver, the things are changing to the opposite recently.

    Here is qoute from https://confluence.atlassian.com/bitbucketserver/transitioning-from-jtds-to-microsoft-s-jdbc-driver-776640388.html:

    Why change drivers?

    Recent releases of Hibernate, which Bitbucket Server uses to simplify its persistence layer, have introduced a requirement that the JDBC drivers and connection pools used be JDBC4-compliant. JDBC4 was introduced with Java 6.

    The jTDS driver used by releases prior to Bitbucket Server 2.1 is a JDBC3 driver, compatible with Java 1.3, and therefore cannot be used with newer versions of Hibernate. While jTDS 1.3.0 and 1.3.1 claim to implement JDBC4, and JDBC4.1, they actually don't. The new methods have been "implemented", but their implementations are all throw new AbstractMethodError(), which means they can't actually be used. (See an example here, on GitHub.)

    Since jTDS 1.3.1 does not provide a functioning JDBC4 implementation, the decision was made to replace jTDS with Microsoft's own SQL Server driver. Microsoft's driver is actively maintained, where jTDS hasn't been updated since 2014 (and prior to the small round of updates done in 2014 it hadn't been updated for multiple years). Microsoft offers a full JDBC4.2 (Java 8) driver and supports all the features of SQL Server, including SQL Server 2016.

提交回复
热议问题