Sun Adapter for DB2 Connect

com.stc.connector.db2connectadapter.base
Class SessionFactory

java.lang.Object
  extended by com.stc.connector.db2connectadapter.base.SessionFactory

public class SessionFactory
extends java.lang.Object

Factory to create a Session instance.

Version:
$Revision: 1.3 $
Author:
$Author: pveerava $

Constructor Summary
SessionFactory()
          Creates a new session factory.
 
Method Summary
static com.stc.connector.db.Session createSession(java.lang.Class clsSession, javax.sql.DataSource ds, java.util.Properties propsConn)
          Creates a new session instance based on given properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionFactory

public SessionFactory()
Creates a new session factory.

Method Detail

createSession

public static com.stc.connector.db.Session createSession(java.lang.Class clsSession,
                                                         javax.sql.DataSource ds,
                                                         java.util.Properties propsConn)
                                                  throws java.lang.Exception
Creates a new session instance based on given properties.

Parameters:
clsSession - The session class.
ds - DataSource to connect to the database.
propsConn - connection properties.
Returns:
a Session insatnce.
Throws:
java.lang.Exception - when there are problems in instantiating a Session object.

Sun Adapter for DB2 Connect