com.inet.tds
Class XDataSource
java.lang.Object
|
+--com.inet.tds.TdsDriver
|
+--com.inet.tds.TdsDataSource
|
+--com.inet.tds.XDataSource
- All Implemented Interfaces:
- java.lang.Cloneable, javax.sql.DataSource, java.sql.Driver, javax.naming.Referenceable, java.lang.Runnable, java.io.Serializable, javax.sql.XADataSource
- public class XDataSource
- extends TdsDataSource
- implements javax.sql.XADataSource
This class implements the interface XADataSource. This class is very important
if you want to use a JDBC 2.0 driver with an application server. See also:
How to install the sample in the J2EE.
This DataSource does not use the DTC. You don't need a separate install on the Server site.
The recover method works only in one JVM. After a crash of the JVM all transactions are rolled back.
- See Also:
DTCDataSource,
TdsDataSource, Serialized Form
|
Method Summary |
java.sql.Connection |
getConnection()
throws ever a SQLException |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password)
throws ever a SQLException |
javax.sql.XAConnection |
getXAConnection()
Attempt to establish a database connection. |
javax.sql.XAConnection |
getXAConnection(java.lang.String user,
java.lang.String password)
Attempt to establish a database connection. |
| Methods inherited from class com.inet.tds.TdsDataSource |
clone, equals, getCharset, getDatabaseName, getDescription, getInstanceName, getLoginTimeout, getLogWriter, getMode, getPassword, getPort, getPortNumber, getProperties, getProperty, getQueryTimeout, getReference, getServerName, getSqlServer7Mode, getUseCursorsAlways, getUser, setCharset, setDatabaseName, setDescription, setInstanceName, setLoginTimeout, setLogWriter, setMode, setPassword, setPort, setPortNumber, setProperties, setProperty, setProperty, setQueryTimeout, setServerName, setSqlServer7Mode, setUseCursorsAlways, setUser, toString |
| Methods inherited from class com.inet.tds.TdsDriver |
acceptsURL, connect, getMajorVersion, getMinorVersion, getPropertyInfo, jdbcCompliant, run |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.sql.XADataSource |
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
XDataSource
public XDataSource()
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- throws ever a SQLException
- Overrides:
getConnection in class TdsDataSource
- Following copied from class:
com.inet.tds.TdsDataSource
- Returns:
- a Connection to the database.
- Throws:
java.sql.SQLException -
getConnection
public java.sql.Connection getConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
- throws ever a SQLException
- Overrides:
getConnection in class TdsDataSource
- Following copied from class:
com.inet.tds.TdsDataSource
- Parameters:
username - the database user on whose behalf the Connection is being made.password - the user's password.- Returns:
- a Connection to the database.
- Throws:
java.sql.SQLException -
getXAConnection
public javax.sql.XAConnection getXAConnection()
throws java.sql.SQLException
- Attempt to establish a database connection.
- Specified by:
getXAConnection in interface javax.sql.XADataSource
- Returns:
- a Connection to the database
getXAConnection
public javax.sql.XAConnection getXAConnection(java.lang.String user,
java.lang.String password)
throws java.sql.SQLException
- Attempt to establish a database connection.
- Specified by:
getXAConnection in interface javax.sql.XADataSource
- Parameters:
user - the database user on whose behalf the Connection is being madepassword - the user's password- Returns:
- a Connection to the database
copyright by i-net software