net.sourceforge.jtds.jdbcx
Class JtdsDataSource
java.lang.Object
|
+--net.sourceforge.jtds.jdbcx.JtdsDataSource
- All Implemented Interfaces:
- javax.sql.ConnectionPoolDataSource, javax.sql.DataSource, javax.naming.Referenceable, java.io.Serializable, javax.sql.XADataSource
- public class JtdsDataSource
- extends java.lang.Object
- implements javax.sql.DataSource, javax.sql.ConnectionPoolDataSource, javax.sql.XADataSource, javax.naming.Referenceable, java.io.Serializable
The jTDS DataSource
, ConnectionPoolDataSource
and
XADataSource
implementation.
- Since:
- jTDS 0.3
- Version:
- $Id: JtdsDataSource.java,v 1.28 2005/03/18 11:46:52 alin_sinpalean Exp $
- Author:
- Alin Sinplean
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
serverName
protected java.lang.String serverName
serverType
protected java.lang.String serverType
portNumber
protected java.lang.String portNumber
databaseName
protected java.lang.String databaseName
tdsVersion
protected java.lang.String tdsVersion
charset
protected java.lang.String charset
language
protected java.lang.String language
domain
protected java.lang.String domain
instance
protected java.lang.String instance
lastUpdateCount
protected java.lang.String lastUpdateCount
sendStringParametersAsUnicode
protected java.lang.String sendStringParametersAsUnicode
namedPipe
protected java.lang.String namedPipe
macAddress
protected java.lang.String macAddress
prepareSql
protected java.lang.String prepareSql
packetSize
protected java.lang.String packetSize
tcpNoDelay
protected java.lang.String tcpNoDelay
user
protected java.lang.String user
password
protected java.lang.String password
loginTimeout
protected java.lang.String loginTimeout
lobBuffer
protected java.lang.String lobBuffer
maxStatements
protected java.lang.String maxStatements
appName
protected java.lang.String appName
progName
protected java.lang.String progName
wsid
protected java.lang.String wsid
xaEmulation
protected java.lang.String xaEmulation
logFile
protected java.lang.String logFile
ssl
protected java.lang.String ssl
batchSize
protected java.lang.String batchSize
description
protected java.lang.String description
driver
private static Driver driver
- Driver instance used for obtaining connections.
JtdsDataSource
public JtdsDataSource()
- Constructs a new datasource.
getXAConnection
public javax.sql.XAConnection getXAConnection()
throws java.sql.SQLException
- Returns a new XA database connection.
- Specified by:
getXAConnection
in interface javax.sql.XADataSource
- Returns:
- a new database connection
- Throws:
java.sql.SQLException
- if an error occurs
getXAConnection
public javax.sql.XAConnection getXAConnection(java.lang.String user,
java.lang.String password)
throws java.sql.SQLException
- Returns a new XA database connection for the user and password specified.
- Specified by:
getXAConnection
in interface javax.sql.XADataSource
- Parameters:
user
- the user name to connect withpassword
- the password to connect with- Returns:
- a new database connection
- Throws:
java.sql.SQLException
- if an error occurs
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Returns a new database connection.
- Specified by:
getConnection
in interface javax.sql.DataSource
- Returns:
- a new database connection
- Throws:
java.sql.SQLException
- if an error occurs
getConnection
public java.sql.Connection getConnection(java.lang.String user,
java.lang.String password)
throws java.sql.SQLException
- Returns a new database connection for the user and password specified.
- Specified by:
getConnection
in interface javax.sql.DataSource
- Parameters:
user
- the user name to connect withpassword
- the password to connect with- Returns:
- a new database connection
- Throws:
java.sql.SQLException
- if an error occurs
getReference
public javax.naming.Reference getReference()
throws javax.naming.NamingException
- Specified by:
getReference
in interface javax.naming.Referenceable
getPooledConnection
public javax.sql.PooledConnection getPooledConnection()
throws java.sql.SQLException
- Returns a new pooled database connection.
- Specified by:
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
- Returns:
- a new pooled database connection
- Throws:
java.sql.SQLException
- if an error occurs
getPooledConnection
public javax.sql.PooledConnection getPooledConnection(java.lang.String user,
java.lang.String password)
throws java.sql.SQLException
- Returns a new pooled database connection for the user and password specified.
- Specified by:
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
- Parameters:
user
- the user name to connect withpassword
- the password to connect with- Returns:
- a new pooled database connection
- Throws:
java.sql.SQLException
- if an error occurs
getLogWriter
public java.io.PrintWriter getLogWriter()
throws java.sql.SQLException
- Specified by:
getLogWriter
in interface javax.sql.DataSource
setLogWriter
public void setLogWriter(java.io.PrintWriter out)
throws java.sql.SQLException
- Specified by:
setLogWriter
in interface javax.sql.DataSource
setLoginTimeout
public void setLoginTimeout(int loginTimeout)
throws java.sql.SQLException
- Specified by:
setLoginTimeout
in interface javax.sql.DataSource
getLoginTimeout
public int getLoginTimeout()
throws java.sql.SQLException
- Specified by:
getLoginTimeout
in interface javax.sql.DataSource
setDatabaseName
public void setDatabaseName(java.lang.String databaseName)
getDatabaseName
public java.lang.String getDatabaseName()
setDescription
public void setDescription(java.lang.String description)
getDescription
public java.lang.String getDescription()
setPassword
public void setPassword(java.lang.String password)
getPassword
public java.lang.String getPassword()
setPortNumber
public void setPortNumber(int portNumber)
getPortNumber
public int getPortNumber()
setServerName
public void setServerName(java.lang.String serverName)
getServerName
public java.lang.String getServerName()
setUser
public void setUser(java.lang.String user)
getUser
public java.lang.String getUser()
setTds
public void setTds(java.lang.String tds)
getTds
public java.lang.String getTds()
setServerType
public void setServerType(int serverType)
getServerType
public int getServerType()
getDomain
public java.lang.String getDomain()
setDomain
public void setDomain(java.lang.String domain)
getInstance
public java.lang.String getInstance()
setInstance
public void setInstance(java.lang.String instance)
getSendStringParametersAsUnicode
public boolean getSendStringParametersAsUnicode()
setSendStringParametersAsUnicode
public void setSendStringParametersAsUnicode(boolean sendStringParametersAsUnicode)
getNamedPipe
public boolean getNamedPipe()
setNamedPipe
public void setNamedPipe(boolean namedPipe)
getLastUpdateCount
public boolean getLastUpdateCount()
setLastUpdateCount
public void setLastUpdateCount(boolean lastUpdateCount)
getXaEmulation
public boolean getXaEmulation()
setXaEmulation
public void setXaEmulation(boolean xaEmulation)
getCharset
public java.lang.String getCharset()
setCharset
public void setCharset(java.lang.String charset)
getLanguage
public java.lang.String getLanguage()
setLanguage
public void setLanguage(java.lang.String language)
getMacAddress
public java.lang.String getMacAddress()
setMacAddress
public void setMacAddress(java.lang.String macAddress)
setPacketSize
public void setPacketSize(int packetSize)
getPacketSize
public int getPacketSize()
getTcpNoDelay
public boolean getTcpNoDelay()
setTcpNoDelay
public void setTcpNoDelay(boolean tcpNoDelay)
setPrepareSql
public void setPrepareSql(int prepareSql)
getPrepareSql
public int getPrepareSql()
setLobBuffer
public void setLobBuffer(long lobBuffer)
getLobBuffer
public long getLobBuffer()
setMaxStatements
public void setMaxStatements(int maxStatements)
getMaxStatements
public int getMaxStatements()
setAppName
public void setAppName(java.lang.String appName)
getAppName
public java.lang.String getAppName()
setProgName
public void setProgName(java.lang.String progName)
getProgName
public java.lang.String getProgName()
setWsid
public void setWsid(java.lang.String wsid)
getWsid
public java.lang.String getWsid()
setLogFile
public void setLogFile(java.lang.String logFile)
getLogFile
public java.lang.String getLogFile()
setSsl
public void setSsl(java.lang.String ssl)
getSsl
public java.lang.String getSsl()
setBatchSize
public void setBatchSize(int batchSize)
getBatchSize
public int getBatchSize()
Generated on April 15 2005