org.objectweb.telosys.dal.dao
Class DatabaseSessionManager

java.lang.Object
  extended byorg.objectweb.telosys.dal.dao.DatabaseSessionManager

public class DatabaseSessionManager
extends java.lang.Object

Central point to get a DatabaseSession

Since:
v 1.0.2

Field Summary
static int DEFAULT_DATABASE
           
static int NO_DATABASE
           
 
Constructor Summary
DatabaseSessionManager()
           
 
Method Summary
static DatabaseSession getDatabaseSession(int iDatabaseId)
          Returns a DatabaseSession instance for the given database ID.
static DatabaseSession getThreadLocalDatabaseSession(int iDatabaseId)
          Returns a DatabaseSession instance for the given database ID,
and store it as thread-local variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DATABASE

public static final int DEFAULT_DATABASE
See Also:
Constant Field Values

NO_DATABASE

public static final int NO_DATABASE
See Also:
Constant Field Values
Constructor Detail

DatabaseSessionManager

public DatabaseSessionManager()
Method Detail

getDatabaseSession

public static DatabaseSession getDatabaseSession(int iDatabaseId)
                                          throws TelosysException
Returns a DatabaseSession instance for the given database ID.
( this is the basic behavior, without thread-local variable storage )

Parameters:
iDatabaseId -
Returns:
Throws:
TelosysException

getThreadLocalDatabaseSession

public static DatabaseSession getThreadLocalDatabaseSession(int iDatabaseId)
                                                     throws TelosysException
Returns a DatabaseSession instance for the given database ID,
and store it as thread-local variable.

Parameters:
iDatabaseId -
Returns:
Throws:
TelosysException