tppt.db
Class DB2DBLocker
java.lang.Object
|
+--tppt.db.DBLocker
|
+--tppt.db.DB2DBLocker
- public class DB2DBLocker
- extends DBLocker
DB2DBLocker
is the class that is responsbile to obtain and releasse the
Database lock for the single user mode. This class is specific for DB2 only.
Warning:
This class is not productive version. It has been encountered the problem when
trying to obtain the lock in the testing. It will need modification and full
test if the problem is resolved. Please refer to the design document for detail.
- Version:
- 2.0
- Author:
- Jodie Wu
- See Also:
DBLocker
Field Summary |
protected static int |
LOCK_SP_NOT_EXIST
The SQL State Error code: the getDBLock stored procedure does not exist. |
protected static int |
LOCK_TABLE_NOT_EXIST
The SQL State Error code: the Sync table does not exist. |
protected static int |
TABLE_ALREADY_EXIST
The SQL State Error code: the Sync table already exist. |
protected static int |
TABLE_LOCK_INUSE
The SQL State Error code: the Sync table has been locked. |
(package private) static java.lang.String |
userid
|
Method Summary |
static boolean |
getDBLock()
Obtain the database lock. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
LOCK_TABLE_NOT_EXIST
protected static final int LOCK_TABLE_NOT_EXIST
- The SQL State Error code: the Sync table does not exist.
TABLE_ALREADY_EXIST
protected static final int TABLE_ALREADY_EXIST
- The SQL State Error code: the Sync table already exist.
TABLE_LOCK_INUSE
protected static final int TABLE_LOCK_INUSE
- The SQL State Error code: the Sync table has been locked.
LOCK_SP_NOT_EXIST
protected static final int LOCK_SP_NOT_EXIST
- The SQL State Error code: the getDBLock stored procedure does not exist.
userid
static java.lang.String userid
DB2DBLocker
public DB2DBLocker()
getDBLock
public static boolean getDBLock()
- Description copied from class:
DBLocker
- Obtain the database lock. It should be overwritten by the DBMS specfic class.
- Following copied from class:
tppt.db.DBLocker
- Returns:
- true if db lock is obtained.
main
public static void main(java.lang.String[] args)