* Fixed unnecessary database activity when user logout without log in

This commit is contained in:
Heng Sin Low 2007-01-16 08:43:00 +00:00
parent 7c76bdf292
commit 9df795c82e
1 changed files with 7 additions and 4 deletions

View File

@ -47,10 +47,13 @@ public final class Env
*/ */
public static void exitEnv (int status) public static void exitEnv (int status)
{ {
//hengsin, avoid unncessary query of session when exit without log in
if (DB.isConnected(false)) {
// End Session // End Session
MSession session = MSession.get(Env.getCtx(), false); // finish MSession session = MSession.get(Env.getCtx(), false); // finish
if (session != null) if (session != null)
session.logout(); session.logout();
}
// //
reset(true); // final cache reset reset(true); // final cache reset
s_log.info(""); s_log.info("");