sql server - What's the difference between com.microsoft.sqlserver.jdbc.SQLServerConnection and java.sql.Connection -
i'm having maven web application on tomcat 8 connecting sql server 2012 database.
for logging purposes wanted use getclientconnectionid
.
due policies of microsoft it's quite pain make driver work maven (i know it's possible , did while, in case lead several problems after migrating/sharing project). unfortunately jtds-driver refuses work database server unknown reasons.
so right i've put sqljdbc4-4.0.jar lib folder of tomcat , meta-inf/services of project , since fine.
yet after doing more database i'm unsure if it's worth switch , tried information actual differences between com.microsoft.sqlserver.jdbc.sqlserverconnection
, java.sql.connection
, if make sense change.
so far couldn't find useful information. pages refer how solve issues each type...
is there difference in performance, behaviour or other possibilities justify switching back?
java.sql.connection
interface
com.microsoft.sqlserver.jdbc.sqlserverconnection
implementation ms-sql
, can't compare performance because first interface
nothing other actual implementation. use connection
maintain abstraction
in code, using implementation provide, com.microsoft.sqlserver.jdbc.sqlserverconnection
in case. people add runtime
dependencies
don't polluted namespace.
Comments
Post a Comment