Sybase eWay API

com.stc.connector.sybaseadapter
Class SybaseSession

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

public class SybaseSession
extends SessionImpl

Session hosts a Connection interface

Version:
$Revision: 1.7 $
Author:
$Author: pveerava $

Field Summary
 
Fields inherited from class com.stc.connector.sybaseadapter.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
SybaseSession(javax.sql.DataSource dataSource, java.lang.String userName, java.lang.String password)
          SybaseSession 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.sybaseadapter.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

SybaseSession

public SybaseSession(javax.sql.DataSource dataSource,
                     java.lang.String userName,
                     java.lang.String password)
SybaseSession 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.

Sybase eWay API