Sun Adapter for DB2 Connect

com.stc.connector.db2connectadapter
Class Db2ConnectSession

java.lang.Object
  extended by com.stc.connector.db2connectadapter.base.SessionImpl
      extended by com.stc.connector.db2connectadapter.Db2ConnectSession
All Implemented Interfaces:
com.stc.connector.db.Session

public class Db2ConnectSession
extends SessionImpl

Session hosts a Connection interface

Version:
$Revision: 1.6 $
Author:
$Author: pveerava $

Field Summary
 
Fields inherited from class com.stc.connector.db2connectadapter.base.SessionImpl
bSupportsBatch, conn, dataSource, dbms, dmd, isConnected, password, sessionEventListeners, sqlException, userName
 
Fields inherited from interface com.stc.connector.db.Session
DBMS_TYPE_UNKNOWN
 
Constructor Summary
Db2ConnectSession(javax.sql.DataSource dataSource, java.lang.String userName, java.lang.String password)
          Db2ConnectSession constructor.
 
Method Summary
 void checkConnection(java.sql.SQLException sqlException)
          Connection status check if there is a SQL exception.
 boolean isNativeDriver()
          Check to see if it is a native driver
 void open()
          Opens the session.
 void setDBMS(int dbmsType)
          Sets the DBMS type.
 
Methods inherited from class com.stc.connector.db2connectadapter.base.SessionImpl
addSessionEventListener, close, commit, connect, connInvoke, getAutoCommit, getCatalog, getConcurrencyType, getConnection, getDBMS, getMetaData, getNewTypeFlag, getResultSetType, getSupportsBatch, getTransactionIsolation, getTypeMap, inValidateConnection, isClosed, isConnected, isReadOnly, releaseResources, removeSessionEventListener, requestReset, rollback, setAutoCommit, setCatalog, setConcurrencyType, setNewTypeFlag, setReadOnly, setResultSetType, setTransactionIsolation, setTypeMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Db2ConnectSession

public Db2ConnectSession(javax.sql.DataSource dataSource,
                         java.lang.String userName,
                         java.lang.String password)
Db2ConnectSession constructor.

Parameters:
dataSource - a DataSource instance used to create a connection.
userName - user name for login.
password - password for login.
Method Detail

open

public void open()
          throws java.sql.SQLException
Opens the session.

Specified by:
open in interface com.stc.connector.db.Session
Overrides:
open in class SessionImpl
Throws:
java.sql.SQLException - when SQL problems occur.

setDBMS

public void setDBMS(int dbmsType)
             throws java.sql.SQLException
Sets the DBMS type.

Specified by:
setDBMS in interface com.stc.connector.db.Session
Overrides:
setDBMS in class SessionImpl
Parameters:
dbmsType - the database vendor type.
Throws:
java.sql.SQLException - when there is any SQL problem.

isNativeDriver

public boolean isNativeDriver()
Check to see if it is a native driver

Returns:
true if it is a native driver;otherwise, false

checkConnection

public void checkConnection(java.sql.SQLException sqlException)
                     throws java.sql.SQLException
Connection status check if there is a SQL exception.

Specified by:
checkConnection in interface com.stc.connector.db.Session
Overrides:
checkConnection in class SessionImpl
Parameters:
sqlException - a SQLException instance.
Throws:
java.sql.SQLException - when SQL problems occur.

Sun Adapter for DB2 Connect