Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.36 2005/10/27 13:22:33 alin_sinpalean Exp $
Author:
  Alin Sinplean
See Also:
  Serialized Form

Field Summary
`protected java.lang.String` | `appName`
`protected java.lang.String` | `batchSize`
`protected java.lang.String` | `bufferMaxMemory`
`protected java.lang.String` | `bufferMinPackets`
`protected java.lang.String` | `cacheMetaData`
`protected java.lang.String` | `charset`
`protected java.lang.String` | `databaseName`
`protected java.lang.String` | `description`
`protected java.lang.String` | `domain`
`private static Driver` | `driver` Driver instance used for obtaining connections.
`protected java.lang.String` | `instance`
`protected java.lang.String` | `language`
`protected java.lang.String` | `lastUpdateCount`
`protected java.lang.String` | `lobBuffer`
`protected java.lang.String` | `logFile`
`protected java.lang.String` | `loginTimeout`
`protected java.lang.String` | `macAddress`
`protected java.lang.String` | `maxStatements`
`protected java.lang.String` | `namedPipe`
`protected java.lang.String` | `packetSize`
`protected java.lang.String` | `password`
`protected java.lang.String` | `portNumber`
`protected java.lang.String` | `prepareSql`
`protected java.lang.String` | `progName`
`protected java.lang.String` | `sendStringParametersAsUnicode`
`(package private) static long` | `serialVersionUID` Serial version UID.
`protected java.lang.String` | `serverName`
`protected java.lang.String` | `serverType`
`protected java.lang.String` | `socketTimeout`
`protected java.lang.String` | `ssl`
`protected java.lang.String` | `tcpNoDelay`
`protected java.lang.String` | `tdsVersion`
`protected java.lang.String` | `useCursors`
`protected java.lang.String` | `useLOBs`
`protected java.lang.String` | `user`
`protected java.lang.String` | `wsid`
`protected java.lang.String` | `xaEmulation`

Constructor Summary
`JtdsDataSource()` Constructs a new datasource.

Method Summary
`java.lang.String` | `getAppName()`
`int` | `getBatchSize()`
`int` | `getBufferMaxMemory()`
`int` | `getBufferMinPackets()`
`boolean` | `getCacheMetaData()`
`java.lang.String` | `getCharset()`
`java.sql.Connection` | `getConnection()` Returns a new database connection.
`java.sql.Connection` | `getConnection(java.lang.String user, java.lang.String password)` Returns a new database connection for the user and password specified.
`java.lang.String` | `getDatabaseName()`
`java.lang.String` | `getDescription()`
`java.lang.String` | `getDomain()`
`java.lang.String` | `getInstance()`
`java.lang.String` | `getLanguage()`
`boolean` | `getLastUpdateCount()`
`long` | `getLobBuffer()`
`java.lang.String` | `getLogFile()`
`int` | `getLoginTimeout()`
`java.io.PrintWriter` | `getLogWriter()`
`java.lang.String` | `getMacAddress()`
`int` | `getMaxStatements()`
`boolean` | `getNamedPipe()`
`int` | `getPacketSize()`
`java.lang.String` | `getPassword()`
`javax.sql.PooledConnection` | `getPooledConnection()` Returns a new pooled database connection.
`javax.sql.PooledConnection` | `getPooledConnection(java.lang.String user, java.lang.String password)` Returns a new pooled database connection for the user and password specified.
`int` | `getPortNumber()`
`int` | `getPrepareSql()`
`java.lang.String` | `getProgName()`
`javax.naming.Reference` | `getReference()`
`boolean` | `getSendStringParametersAsUnicode()`
`java.lang.String` | `getServerName()`
`int` | `getServerType()`
`int` | `getSocketTimeout()`
`java.lang.String` | `getSsl()`
`boolean` | `getTcpNoDelay()`
`java.lang.String` | `getTds()`
`boolean` | `getUseCursors()`
`boolean` | `getUseLOBs()`
`java.lang.String` | `getUser()`
`java.lang.String` | `getWsid()`
`javax.sql.XAConnection` | `getXAConnection()` Returns a new XA database connection.
`javax.sql.XAConnection` | `getXAConnection(java.lang.String user, java.lang.String password)` Returns a new XA database connection for the user and password specified.
`boolean` | `getXaEmulation()`
`void` | `setAppName(java.lang.String appName)`
`void` | `setBatchSize(int batchSize)`
`void` | `setBufferMaxMemory(int bufferMaxMemory)`
`void` | `setBufferMinPackets(int bufferMinPackets)`
`void` | `setCacheMetaData(boolean cacheMetaData)`
`void` | `setCharset(java.lang.String charset)`
`void` | `setDatabaseName(java.lang.String databaseName)`
`void` | `setDescription(java.lang.String description)`
`void` | `setDomain(java.lang.String domain)`
`void` | `setInstance(java.lang.String instance)`
`void` | `setLanguage(java.lang.String language)`
`void` | `setLastUpdateCount(boolean lastUpdateCount)`
`void` | `setLobBuffer(long lobBuffer)`
`void` | `setLogFile(java.lang.String logFile)`
`void` | `setLoginTimeout(int loginTimeout)`
`void` | `setLogWriter(java.io.PrintWriter out)`
`void` | `setMacAddress(java.lang.String macAddress)`
`void` | `setMaxStatements(int maxStatements)`
`void` | `setNamedPipe(boolean namedPipe)`
`void` | `setPacketSize(int packetSize)`
`void` | `setPassword(java.lang.String password)`
`void` | `setPortNumber(int portNumber)`
`void` | `setPrepareSql(int prepareSql)`
`void` | `setProgName(java.lang.String progName)`
`void` | `setSendStringParametersAsUnicode(boolean sendStringParametersAsUnicode)`
`void` | `setServerName(java.lang.String serverName)`
`void` | `setServerType(int serverType)`
`void` | `setSocketTimeout(int socketTimeout)`
`void` | `setSsl(java.lang.String ssl)`
`void` | `setTcpNoDelay(boolean tcpNoDelay)`
`void` | `setTds(java.lang.String tds)`
`void` | `setUseCursors(boolean useCursors)`
`void` | `setUseLOBs(boolean useLOBs)`
`void` | `setUser(java.lang.String user)`
`void` | `setWsid(java.lang.String wsid)`
`void` | `setXaEmulation(boolean xaEmulation)`

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Field Detail

### serialVersionUID

    static final long serialVersionUID

  Serial version UID.

### 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

### socketTimeout

    protected java.lang.String socketTimeout

### ssl

    protected java.lang.String ssl

### batchSize

    protected java.lang.String batchSize

### bufferMaxMemory

    protected java.lang.String bufferMaxMemory

### bufferMinPackets

    protected java.lang.String bufferMinPackets

### cacheMetaData

    protected java.lang.String cacheMetaData

### useCursors

    protected java.lang.String useCursors

### useLOBs

    protected java.lang.String useLOBs

### description

    protected java.lang.String description

### driver

    private static final Driver driver

  Driver instance used for obtaining connections.

Constructor Detail

### JtdsDataSource

    public JtdsDataSource()

  Constructs a new datasource.

Method Detail

### 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 with
    `password` - 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 with
    `password` - 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 with
    `password` - 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`

### setSocketTimeout

    public void setSocketTimeout(int socketTimeout)
                          throws java.sql.SQLException

### getSocketTimeout

    public int getSocketTimeout()
                         throws java.sql.SQLException

### 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()

### getBufferMaxMemory

    public int getBufferMaxMemory()

### setBufferMaxMemory

    public void setBufferMaxMemory(int bufferMaxMemory)

### getBufferMinPackets

    public int getBufferMinPackets()

### setBufferMinPackets

    public void setBufferMinPackets(int bufferMinPackets)

### getCacheMetaData

    public boolean getCacheMetaData()

### setCacheMetaData

    public void setCacheMetaData(boolean cacheMetaData)

### getUseCursors

    public boolean getUseCursors()

### setUseCursors

    public void setUseCursors(boolean useCursors)

### getUseLOBs

    public boolean getUseLOBs()

### setUseLOBs

    public void setUseLOBs(boolean useLOBs)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Generated on November 8 2005