ISQLServerDataSource
, Serializable
, Wrapper
, Referenceable
, CommonDataSource
, DataSource
SQLServerConnectionPoolDataSource
public class SQLServerDataSource extends Object implements ISQLServerDataSource, DataSource, Serializable, Referenceable
SQLServerConnection
class.Constructor | Description |
---|---|
SQLServerDataSource() |
Constructs a SQLServerDataSource.
|
Modifier and Type | Method | Description |
---|---|---|
String |
getAccessToken() |
Returns the access token.
|
String |
getApplicationIntent() |
Returns the application intent.
|
String |
getApplicationName() |
Returns the application name.
|
String |
getAuthentication() |
Returns the authentication mode.
|
int |
getCancelQueryTimeout() |
Returns the cancel timeout.
|
String |
getColumnEncryptionSetting() |
Returns the Always Encrypted functionality setting for the data source object.
|
Connection |
getConnection() |
|
Connection |
getConnection(String username,
String password) |
|
String |
getDatabaseName() |
Returns the database name.
|
String |
getDescription() |
Returns the DataSource description
|
boolean |
getDisableStatementPooling() |
Returns whether statement pooling is disabled.
|
boolean |
getEnablePrepareOnFirstPreparedStatementCall() |
Returns the value that indicates whether the first execution of a prepared statement will call sp_executesql and
not prepare a statement.
|
boolean |
getEncrypt() |
Returns a Boolean value that indicates if the encrypt property is enabled.
|
String |
getFailoverPartner() |
Returns the name of the failover server that is used in a database mirroring configuration.
|
boolean |
getFIPS() |
Returns the value of connection property "fips".
|
GSSCredential |
getGSSCredentials() |
Returns the GSSCredential.
|
String |
getHostNameInCertificate() |
Returns the host name used in validating the SQL Server Secure Sockets Layer (SSL) certificate.
|
String |
getInstanceName() |
Returns the SQL Server instance name.
|
String |
getJASSConfigurationName() |
Returns the login configuration file for Kerberos authentication.
|
String |
getKeyStoreAuthentication() |
Returns the value of the keyStoreAuthentication setting for the data source object.
|
String |
getKeyStoreLocation() |
Returns the keyStoreLocation for the Java Key Store.
|
boolean |
getLastUpdateCount() |
Returns a Boolean value that indicates if the lastUpdateCount property is enabled.
|
int |
getLockTimeout() |
Returns an int value that indicates the number of milliseconds that the database will wait before reporting a
lock time out.
|
int |
getLoginTimeout() |
|
PrintWriter |
getLogWriter() |
Returns the log writer for this DataSource.
|
boolean |
getMultiSubnetFailover() |
Returns the value of the multiSubnetFailover connection property.
|
int |
getPacketSize() |
Returns the current network packet size used to communicate with SQL Server, specified in bytes.
|
Logger |
getParentLogger() |
|
int |
getPortNumber() |
Returns the current port number that is used to communicate with SQL Server.
|
int |
getQueryTimeout() |
Returns the query timeout.
|
Reference |
getReference() |
|
String |
getResponseBuffering() |
Returns the response buffering mode for this SQLServerDataSource object.
|
String |
getSelectMethod() |
Returns the default cursor type used for all result sets that are created by using this SQLServerDataSource
object.
|
boolean |
getSendStringParametersAsUnicode() |
Returns whether sending string parameters to the server in UNICODE format is enabled.
|
boolean |
getSendTimeAsDatetime() |
Returns the value of the sendTimeAsDatetime connection property.
|
String |
getServerName() |
Returns the name of the SQL Server instance.
|
boolean |
getServerNameAsACE() |
Returns if the serverName should be translated from Unicode to ASCII Compatible Encoding (ACE).
|
int |
getServerPreparedStatementDiscardThreshold() |
Returns the value of the setting that controls how many outstanding prepared statement discard actions
(sp_unprepare) can be outstanding per connection before a call to clean-up the outstanding handles on the server
is executed.
|
String |
getServerSpn() |
Returns the server spn.
|
int |
getSocketTimeout() |
Returns the socket timeout value.
|
String |
getSSLProtocol() |
Returns the value of connection property 'sslProtocol'.
|
int |
getStatementPoolingCacheSize() |
Returns the size of the prepared statement cache for this connection.
|
boolean |
getTransparentNetworkIPResolution() |
Returns the TransparentNetworkIPResolution value.
|
String |
getTrustManagerClass() |
Returns the value for the connection property 'trustManagerClass'.
|
String |
getTrustManagerConstructorArg() |
Returns the value for the connection property 'trustManagerConstructorArg'.
|
boolean |
getTrustServerCertificate() |
Returns a Boolean value that indicates if the trustServerCertificate property is enabled.
|
String |
getTrustStore() |
Returns the path (including file name) to the certificate trustStore file.
|
String |
getTrustStoreType() |
Returns the keyStore Type for the trustStore.
|
String |
getURL() |
Returns the URL that is used to connect to the data source.
|
boolean |
getUseBulkCopyForBatchInsert() |
Returns whether the use Bulk Copy API is used for Batch Insert.
|
String |
getUser() |
Returns the user name that is used to connect the data source.
|
String |
getWorkstationID() |
Returns the name of the client computer name that is used to connect to the data source.
|
boolean |
getXopenStates() |
Returns the value that indicates if converting SQL states to XOPEN compliant states is enabled.
|
boolean |
isWrapperFor(Class<?> iface) |
|
void |
setAccessToken(String accessToken) |
Sets the access token.
|
void |
setApplicationIntent(String applicationIntent) |
Sets the application intent.
|
void |
setApplicationName(String applicationName) |
Sets the specific application in various SQL Server profiling and logging tools.
|
void |
setAuthentication(String authentication) |
Sets the authentication mode.
|
void |
setAuthenticationScheme(String authenticationScheme) |
Sets the kind of integrated security you want your application to use.
|
void |
setCancelQueryTimeout(int cancelQueryTimeout) |
Sets the cancel timeout.
|
void |
setColumnEncryptionSetting(String columnEncryptionSetting) |
Sets the Column Encryption setting.
|
void |
setDatabaseName(String databaseName) |
Sets the the database to connect to.
|
void |
setDescription(String description) |
Sets the DataSource description.
|
void |
setDisableStatementPooling(boolean disableStatementPooling) |
Sets the value to disable/enable statement pooling.
|
void |
setEnablePrepareOnFirstPreparedStatementCall(boolean enablePrepareOnFirstPreparedStatementCall) |
Sets the value that enables/disables whether the first execution of a prepared statement will call sp_executesql
and not prepare a statement.
|
void |
setEncrypt(boolean encrypt) |
Sets a Boolean value that indicates if the encrypt property is enabled.
|
void |
setFailoverPartner(String serverName) |
Sets the fail over partner of the target SQL Server.
|
void |
setFIPS(boolean fips) |
Sets whether Fips Mode should be enabled/disabled on the connection.
|
void |
setGSSCredentials(GSSCredential userCredential) |
Sets the GSSCredential.
|
void |
setHostNameInCertificate(String hostName) |
Sets the host name to be used in validating the SQL Server Secure Sockets Layer (SSL) certificate.
|
void |
setInstanceName(String instanceName) |
Sets the the SQL Server instance name to connect to.
|
void |
setIntegratedSecurity(boolean enable) |
Sets a Boolean value that indicates if the integratedSecurity property is enabled.
|
void |
setJASSConfigurationName(String configurationName) |
Sets the login configuration file for Kerberos authentication.
|
void |
setKeyStoreAuthentication(String keyStoreAuthentication) |
Sets the name that identifies a key store.
|
void |
setKeyStoreLocation(String keyStoreLocation) |
Sets the location including the file name for the Java keystore.
|
void |
setKeyStoreSecret(String keyStoreSecret) |
Sets the password for the Java keystore.
|
void |
setLastUpdateCount(boolean lastUpdateCount) |
Sets a Boolean value that indicates if the lastUpdateCount property is enabled.
|
void |
setLockTimeout(int lockTimeout) |
Sets the lock timeout value.
|
void |
setLoginTimeout(int loginTimeout) |
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.
|
void |
setLogWriter(PrintWriter out) |
|
void |
setMultiSubnetFailover(boolean multiSubnetFailover) |
Sets the value of the multiSubnetFailover connection property.
|
void |
setPacketSize(int packetSize) |
Sets the packet size.
|
void |
setPassword(String password) |
Sets the password that will be used when connecting to SQL Server.
|
void |
setPortNumber(int portNumber) |
Sets the TCP-IP port number used when opening a socket connection to SQL Server.
|
void |
setQueryTimeout(int queryTimeout) |
Setting the query timeout.
|
void |
setResponseBuffering(String bufferingMode) |
Sets the response buffering mode for connections created by using this SQLServerDataSource object.
|
void |
setSelectMethod(String selectMethod) |
Sets the default cursor type used for the result set.
|
void |
setSendStringParametersAsUnicode(boolean sendStringParametersAsUnicode) |
Sets whether string parameters are sent to the server in UNICODE format.
|
void |
setSendTimeAsDatetime(boolean sendTimeAsDatetime) |
Sets the value to enable/disable the sendTimeAsDatetime connection property.
|
void |
setServerName(String serverName) |
Sets the host name of the target SQL Server.
|
void |
setServerNameAsACE(boolean serverNameAsACE) |
Sets whether the serverName will be translated from Unicode to ASCII Compatible Encoding (ACE).
|
void |
setServerPreparedStatementDiscardThreshold(int serverPreparedStatementDiscardThreshold) |
Sets the value that controls how many outstanding prepared statement discard actions (sp_unprepare) can be
outstanding per connection before a call to clean-up the outstanding handles on the server is executed.
|
void |
setServerSpn(String serverSpn) |
Sets the Service Principal Name (SPN) of the target SQL Server.
|
void |
setSocketTimeout(int socketTimeout) |
Sets the socket timeout value.
|
void |
setSSLProtocol(String sslProtocol) |
Sets the sslProtocol property for connection Set this value to specify TLS protocol keyword.
|
void |
setStatementPoolingCacheSize(int statementPoolingCacheSize) |
Sets the size of the prepared statement cache for this connection.
|
void |
setTransparentNetworkIPResolution(boolean tnir) |
Sets the value to enable/disable Transparent Netowrk IP Resolution (TNIR).
|
void |
setTrustManagerClass(String trustManagerClass) |
Sets the connection property 'trustManagerClass' on the connection.
|
void |
setTrustManagerConstructorArg(String trustManagerConstructorArg) |
Sets Constructor Arguments to be provided on constructor of 'trustManagerClass'.
|
void |
setTrustServerCertificate(boolean e) |
Sets a Boolean value that indicates if the trustServerCertificate property is enabled.
|
void |
setTrustStore(String trustStore) |
Sets the path (including file name) to the certificate trustStore file.
|
void |
setTrustStorePassword(String trustStorePassword) |
Sets the password that is used to check the integrity of the trustStore data.
|
void |
setTrustStoreType(String trustStoreType) |
Sets the keystore type for the trustStore.
|
void |
setURL(String url) |
Sets the datasource URL.
|
void |
setUseBulkCopyForBatchInsert(boolean useBulkCopyForBatchInsert) |
Sets whether the use Bulk Copy API should be used for Batch Insert.
|
void |
setUser(String user) |
Sets the user name that will be used when connecting to SQL Server.
|
void |
setWorkstationID(String workstationID) |
Sets the name of the client machine (or client workstation).
|
void |
setXopenStates(boolean xopenStates) |
Sets whether the driver will convert SQL states to XOPEN compliant states.
|
String |
toString() |
|
<T> T |
unwrap(Class<T> iface) |
createShardingKeyBuilder
createConnectionBuilder
public SQLServerDataSource()
public Connection getConnection() throws SQLServerException
getConnection
in interface DataSource
SQLServerException
public Connection getConnection(String username, String password) throws SQLServerException
getConnection
in interface DataSource
SQLServerException
public void setLoginTimeout(int loginTimeout)
setLoginTimeout
in interface CommonDataSource
setLoginTimeout
in interface DataSource
public int getLoginTimeout()
getLoginTimeout
in interface CommonDataSource
getLoginTimeout
in interface DataSource
public void setLogWriter(PrintWriter out)
setLogWriter
in interface CommonDataSource
setLogWriter
in interface DataSource
public PrintWriter getLogWriter()
getLogWriter
in interface CommonDataSource
getLogWriter
in interface DataSource
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
in interface CommonDataSource
SQLFeatureNotSupportedException
public void setApplicationName(String applicationName)
setApplicationName
in interface ISQLServerDataSource
applicationName
- A String that contains the name of the application.public String getApplicationName()
ISQLServerDataSource
getApplicationName
in interface ISQLServerDataSource
public void setDatabaseName(String databaseName)
setDatabaseName
in interface ISQLServerDataSource
databaseName
- if not set, returns the default value of null.public String getDatabaseName()
ISQLServerDataSource
getDatabaseName
in interface ISQLServerDataSource
public void setInstanceName(String instanceName)
setInstanceName
in interface ISQLServerDataSource
instanceName
- if not set, returns the default value of null.public String getInstanceName()
ISQLServerDataSource
getInstanceName
in interface ISQLServerDataSource
public void setIntegratedSecurity(boolean enable)
ISQLServerDataSource
setIntegratedSecurity
in interface ISQLServerDataSource
enable
- true if integratedSecurity is enabled. Otherwise, false.public void setAuthenticationScheme(String authenticationScheme)
ISQLServerDataSource
setAuthenticationScheme
in interface ISQLServerDataSource
authenticationScheme
- Values are "JavaKerberos" and the default "NativeAuthentication".public void setAuthentication(String authentication)
ISQLServerDataSource
setAuthentication
in interface ISQLServerDataSource
authentication
- the authentication modepublic String getAuthentication()
ISQLServerDataSource
getAuthentication
in interface ISQLServerDataSource
public void setGSSCredentials(GSSCredential userCredential)
ISQLServerDataSource
setGSSCredentials
in interface ISQLServerDataSource
userCredential
- the credentialpublic GSSCredential getGSSCredentials()
ISQLServerDataSource
getGSSCredentials
in interface ISQLServerDataSource
public void setAccessToken(String accessToken)
ISQLServerDataSource
setAccessToken
in interface ISQLServerDataSource
accessToken
- to be set in the string property.public String getAccessToken()
ISQLServerDataSource
getAccessToken
in interface ISQLServerDataSource
public void setColumnEncryptionSetting(String columnEncryptionSetting)
setColumnEncryptionSetting
in interface ISQLServerDataSource
columnEncryptionSetting
- Enables/disables Always Encrypted functionality for the data source object. The default is Disabled.public String getColumnEncryptionSetting()
ISQLServerDataSource
getColumnEncryptionSetting
in interface ISQLServerDataSource
public void setKeyStoreAuthentication(String keyStoreAuthentication)
ISQLServerDataSource
setKeyStoreAuthentication
in interface ISQLServerDataSource
keyStoreAuthentication
- the name that identifies a key store.public String getKeyStoreAuthentication()
ISQLServerDataSource
getKeyStoreAuthentication
in interface ISQLServerDataSource
public void setKeyStoreSecret(String keyStoreSecret)
ISQLServerDataSource
setKeyStoreSecret
in interface ISQLServerDataSource
keyStoreSecret
- the password to use for the keystore as well as for the keypublic void setKeyStoreLocation(String keyStoreLocation)
ISQLServerDataSource
setKeyStoreLocation
in interface ISQLServerDataSource
keyStoreLocation
- the location including the file name for the Java keystore.public String getKeyStoreLocation()
ISQLServerDataSource
getKeyStoreLocation
in interface ISQLServerDataSource
public void setLastUpdateCount(boolean lastUpdateCount)
ISQLServerDataSource
setLastUpdateCount
in interface ISQLServerDataSource
lastUpdateCount
- true if lastUpdateCount is enabled. Otherwise, false.public boolean getLastUpdateCount()
ISQLServerDataSource
getLastUpdateCount
in interface ISQLServerDataSource
public void setEncrypt(boolean encrypt)
ISQLServerDataSource
setEncrypt
in interface ISQLServerDataSource
encrypt
- true if the Secure Sockets Layer (SSL) encryption is enabled between the client and the SQL Server.
Otherwise, false.public boolean getEncrypt()
ISQLServerDataSource
getEncrypt
in interface ISQLServerDataSource
public void setTransparentNetworkIPResolution(boolean tnir)
ISQLServerDataSource
transparentNetworkIPResolution is ignored if multiSubnetFailover is true
transparentNetworkIPResolution is ignored if database mirroring is used
transparentNetworkIPResolution is ignored if there are more than 64 IP addresses
setTransparentNetworkIPResolution
in interface ISQLServerDataSource
tnir
- if set to true, the driver attempts to connect to the first IP address available. It is true by default.public boolean getTransparentNetworkIPResolution()
ISQLServerDataSource
getTransparentNetworkIPResolution
in interface ISQLServerDataSource
public void setTrustServerCertificate(boolean e)
ISQLServerDataSource
setTrustServerCertificate
in interface ISQLServerDataSource
e
- true, if the server Secure Sockets Layer (SSL) certificate should be automatically trusted when the
communication layer is encrypted using SSL. Otherwise, false.public boolean getTrustServerCertificate()
ISQLServerDataSource
getTrustServerCertificate
in interface ISQLServerDataSource
public void setTrustStoreType(String trustStoreType)
ISQLServerDataSource
setTrustStoreType
in interface ISQLServerDataSource
trustStoreType
- A String that contains the trust store typepublic String getTrustStoreType()
ISQLServerDataSource
getTrustStoreType
in interface ISQLServerDataSource
public void setTrustStore(String trustStore)
ISQLServerDataSource
setTrustStore
in interface ISQLServerDataSource
trustStore
- A String that contains the path (including file name) to the certificate trustStore file.public String getTrustStore()
ISQLServerDataSource
getTrustStore
in interface ISQLServerDataSource
public void setTrustStorePassword(String trustStorePassword)
ISQLServerDataSource
setTrustStorePassword
in interface ISQLServerDataSource
trustStorePassword
- A String that contains the password that is used to check the integrity of the trustStore data.public void setHostNameInCertificate(String hostName)
ISQLServerDataSource
setHostNameInCertificate
in interface ISQLServerDataSource
hostName
- A String that contains the host name.public String getHostNameInCertificate()
ISQLServerDataSource
getHostNameInCertificate
in interface ISQLServerDataSource
public void setLockTimeout(int lockTimeout)
setLockTimeout
in interface ISQLServerDataSource
lockTimeout
- the number of milliseconds to wait before the database reports a lock timeout. The default value of -1
means wait forever. If specified, this value will be the default for all statements on the connection.
Note a value of 0 means no wait. If lockTimeout is not set, getLockTimeout returns the default of -1.public int getLockTimeout()
ISQLServerDataSource
getLockTimeout
in interface ISQLServerDataSource
public void setPassword(String password)
setPassword
in interface ISQLServerDataSource
password
- Note getPassword is deliberately declared non-public for security reasons. If the password is not set,
getPassword returns the default value of null.public void setPortNumber(int portNumber)
setPortNumber
in interface ISQLServerDataSource
portNumber
- if not set, getPortNumber returns the default of 1433. Note as mentioned above, setPortNumber does not do
any range checking on the port value passed in,\ invalid port numbers like 99999 can be passed in without
triggering any error.public int getPortNumber()
ISQLServerDataSource
getPortNumber
in interface ISQLServerDataSource
public void setSelectMethod(String selectMethod)
setSelectMethod
in interface ISQLServerDataSource
selectMethod
- This(non-Javadoc) @see com.microsoft.sqlserver.jdbc.ISQLServerDataSource#setSelectMethod(java.lang.String)
property is useful when you are dealing with large result sets and do not want to store the whole result
set in memory on the client side. By setting the property to "cursor" you will be able to create a server
side cursor that can fetch smaller chunks of data at a time. If selectMethod is not set, getSelectMethod
returns the default value of "direct".public String getSelectMethod()
ISQLServerDataSource
getSelectMethod
in interface ISQLServerDataSource
public void setResponseBuffering(String bufferingMode)
ISQLServerDataSource
setResponseBuffering
in interface ISQLServerDataSource
bufferingMode
- A String that contains the buffering and streaming mode. The valid mode can be one of the following
case-insensitive Strings: full or adaptive.public String getResponseBuffering()
ISQLServerDataSource
getResponseBuffering
in interface ISQLServerDataSource
public void setApplicationIntent(String applicationIntent)
ISQLServerDataSource
setApplicationIntent
in interface ISQLServerDataSource
applicationIntent
- A String that contains the application intent.public String getApplicationIntent()
ISQLServerDataSource
getApplicationIntent
in interface ISQLServerDataSource
public void setSendTimeAsDatetime(boolean sendTimeAsDatetime)
ISQLServerDataSource
setSendTimeAsDatetime
in interface ISQLServerDataSource
sendTimeAsDatetime
- A Boolean value. When true, causes java.sql.Time values to be sent to the server as SQL Server datetime
types. When false, causes java.sql.Time values to be sent to the server as SQL Server time types.public boolean getSendTimeAsDatetime()
ISQLServerDataSource
getSendTimeAsDatetime
in interface ISQLServerDataSource
public void setSendStringParametersAsUnicode(boolean sendStringParametersAsUnicode)
setSendStringParametersAsUnicode
in interface ISQLServerDataSource
sendStringParametersAsUnicode
- if true (default), string parameters are sent to the server in UNICODE format. if false, string parameters
are sent to the server in the native TDS collation format of the database, not in UNICODE. if set, returns
the default of true.public boolean getSendStringParametersAsUnicode()
ISQLServerDataSource
getSendStringParametersAsUnicode
in interface ISQLServerDataSource
public void setServerNameAsACE(boolean serverNameAsACE)
ISQLServerDataSource
setServerNameAsACE
in interface ISQLServerDataSource
serverNameAsACE
- if enabled the servername will be translated to ASCII Compatible Encoding (ACE)public boolean getServerNameAsACE()
ISQLServerDataSource
getServerNameAsACE
in interface ISQLServerDataSource
public void setServerName(String serverName)
setServerName
in interface ISQLServerDataSource
serverName
- if not set, returns the default value of null is returned.public String getServerName()
ISQLServerDataSource
getServerName
in interface ISQLServerDataSource
public void setServerSpn(String serverSpn)
setServerSpn
in interface ISQLServerDataSource
serverSpn
- service principal namepublic String getServerSpn()
ISQLServerDataSource
getServerSpn
in interface ISQLServerDataSource
public void setFailoverPartner(String serverName)
setFailoverPartner
in interface ISQLServerDataSource
serverName
- if not set, returns the default value of null.public String getFailoverPartner()
ISQLServerDataSource
getFailoverPartner
in interface ISQLServerDataSource
public void setMultiSubnetFailover(boolean multiSubnetFailover)
ISQLServerDataSource
setMultiSubnetFailover
in interface ISQLServerDataSource
multiSubnetFailover
- The new value of the multiSubnetFailover connection property.public boolean getMultiSubnetFailover()
ISQLServerDataSource
getMultiSubnetFailover
in interface ISQLServerDataSource
public void setUser(String user)
setUser
in interface ISQLServerDataSource
user
- if not set, returns the default value of null.public String getUser()
ISQLServerDataSource
getUser
in interface ISQLServerDataSource
public void setWorkstationID(String workstationID)
setWorkstationID
in interface ISQLServerDataSource
workstationID
- host name of the client. if not set, the default value is constructed by calling
InetAddress.getLocalHost().getHostName() or if getHostName() returns blank then
getHostAddress().toString().public String getWorkstationID()
ISQLServerDataSource
getWorkstationID
in interface ISQLServerDataSource
public void setXopenStates(boolean xopenStates)
setXopenStates
in interface ISQLServerDataSource
xopenStates
- if true, the driver will convert SQL states to XOPEN compliant states. The default is false which causes
the driver to generate SQL 99 state codes. If not set, getXopenStates returns the default value of false.public boolean getXopenStates()
ISQLServerDataSource
getXopenStates
in interface ISQLServerDataSource
public void setFIPS(boolean fips)
ISQLServerDataSource
setFIPS
in interface ISQLServerDataSource
fips
- Boolean property to enable/disable fipspublic boolean getFIPS()
ISQLServerDataSource
getFIPS
in interface ISQLServerDataSource
public void setSSLProtocol(String sslProtocol)
ISQLServerDataSource
setSSLProtocol
in interface ISQLServerDataSource
sslProtocol
- Value for SSL Protocol to be set.public String getSSLProtocol()
ISQLServerDataSource
getSSLProtocol
in interface ISQLServerDataSource
public void setTrustManagerClass(String trustManagerClass)
ISQLServerDataSource
setTrustManagerClass
in interface ISQLServerDataSource
trustManagerClass
- The fully qualified class name of a custom javax.net.ssl.TrustManager.public String getTrustManagerClass()
ISQLServerDataSource
getTrustManagerClass
in interface ISQLServerDataSource
public void setTrustManagerConstructorArg(String trustManagerConstructorArg)
ISQLServerDataSource
setTrustManagerConstructorArg
in interface ISQLServerDataSource
trustManagerConstructorArg
- 'trustManagerClass' constructor argumentspublic String getTrustManagerConstructorArg()
ISQLServerDataSource
getTrustManagerConstructorArg
in interface ISQLServerDataSource
public void setURL(String url)
setURL
in interface ISQLServerDataSource
url
- The URL property is exposed for backwards compatibility reasons. Also, several Java Application servers
expect a setURL function on the DataSource and set it by default (JBoss and WebLogic) Note for security
reasons we do not recommend that customers include the password in the url supplied to setURL. The reason
for this is third-party Java Application Servers will very often display the value set to URL property in
their DataSource configuration GUI. We recommend instead that clients use the setPassword method to set
the password value. The Java Application Servers will not display a password that is set on the DataSource
in the configuration GUI. Note if setURL is not called, getURL returns the default value of
"jdbc:sqlserver://".public String getURL()
ISQLServerDataSource
getURL
in interface ISQLServerDataSource
public void setDescription(String description)
setDescription
in interface ISQLServerDataSource
description
- A String that contains the description.public String getDescription()
getDescription
in interface ISQLServerDataSource
public void setPacketSize(int packetSize)
setPacketSize
in interface ISQLServerDataSource
packetSize
- the size (in bytes) to use for the TCP/IP send and receive buffer. It is also the value used for the TDS
packet size (SQL Server Network Packet Size). Validity of the value is checked at connect time. If no
value is set for this property, its default value is 4KB.public int getPacketSize()
ISQLServerDataSource
getPacketSize
in interface ISQLServerDataSource
public void setQueryTimeout(int queryTimeout)
ISQLServerDataSource
setQueryTimeout
in interface ISQLServerDataSource
queryTimeout
- The number of seconds to wait before a timeout has occurred on a query. The default value is 0, which
means infinite timeout.public int getQueryTimeout()
ISQLServerDataSource
getQueryTimeout
in interface ISQLServerDataSource
public void setCancelQueryTimeout(int cancelQueryTimeout)
ISQLServerDataSource
setCancelQueryTimeout
in interface ISQLServerDataSource
cancelQueryTimeout
- The number of seconds to wait before we wait for the query timeout to happen.public int getCancelQueryTimeout()
ISQLServerDataSource
getCancelQueryTimeout
in interface ISQLServerDataSource
public void setEnablePrepareOnFirstPreparedStatementCall(boolean enablePrepareOnFirstPreparedStatementCall)
ISQLServerDataSource
setEnablePrepareOnFirstPreparedStatementCall
in interface ISQLServerDataSource
enablePrepareOnFirstPreparedStatementCall
- Changes the setting per the description.public boolean getEnablePrepareOnFirstPreparedStatementCall()
ISQLServerDataSource
getEnablePrepareOnFirstPreparedStatementCall
in interface ISQLServerDataSource
public void setServerPreparedStatementDiscardThreshold(int serverPreparedStatementDiscardThreshold)
ISQLServerDataSource
setServerPreparedStatementDiscardThreshold
in interface ISQLServerDataSource
serverPreparedStatementDiscardThreshold
- Changes the setting per the description.public int getServerPreparedStatementDiscardThreshold()
ISQLServerDataSource
getServerPreparedStatementDiscardThreshold
in interface ISQLServerDataSource
public void setStatementPoolingCacheSize(int statementPoolingCacheSize)
ISQLServerDataSource
setStatementPoolingCacheSize
in interface ISQLServerDataSource
statementPoolingCacheSize
- Changes the setting per the description.public int getStatementPoolingCacheSize()
ISQLServerDataSource
getStatementPoolingCacheSize
in interface ISQLServerDataSource
public void setDisableStatementPooling(boolean disableStatementPooling)
ISQLServerDataSource
setDisableStatementPooling
in interface ISQLServerDataSource
disableStatementPooling
- true to disable statement pooling, false to enable it.public boolean getDisableStatementPooling()
ISQLServerDataSource
getDisableStatementPooling
in interface ISQLServerDataSource
public void setSocketTimeout(int socketTimeout)
ISQLServerDataSource
setSocketTimeout
in interface ISQLServerDataSource
socketTimeout
- The number of milliseconds to wait before a timeout is occurred on a socket read or accept. The default
value is 0, which means infinite timeout.public int getSocketTimeout()
ISQLServerDataSource
getSocketTimeout
in interface ISQLServerDataSource
public void setUseBulkCopyForBatchInsert(boolean useBulkCopyForBatchInsert)
ISQLServerDataSource
setUseBulkCopyForBatchInsert
in interface ISQLServerDataSource
useBulkCopyForBatchInsert
- indicates whether Bulk Copy API should be used for Batch Insert operations.public boolean getUseBulkCopyForBatchInsert()
ISQLServerDataSource
getUseBulkCopyForBatchInsert
in interface ISQLServerDataSource
public void setJASSConfigurationName(String configurationName)
ISQLServerDataSource
setJASSConfigurationName
in interface ISQLServerDataSource
configurationName
- the configuration namepublic String getJASSConfigurationName()
ISQLServerDataSource
getJASSConfigurationName
in interface ISQLServerDataSource
public Reference getReference()
getReference
in interface Referenceable
public boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor
in interface Wrapper
SQLException
public <T> T unwrap(Class<T> iface) throws SQLException
unwrap
in interface Wrapper
SQLException
Copyright © 2018 Microsoft Corporation. All rights reserved.