| 
					
				 | 
			
			
				@@ -1913,12 +1913,22 @@ void __fastcall TVmsCommMain::plRemainDblClick(TObject *Sender) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //--------------------------------------------------------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+void __fastcall TVmsCommMain::pnlTrafDblClick(TObject *Sender) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (!FrmVmsLog->Showing) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        FrmVmsLog->Show(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//--------------------------------------------------------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 void __fastcall TVmsCommMain::tmrDbWriteTimer(TObject *Sender) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     tmrDbWrite->Enabled = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     AnsiString dbJobName = APP_GetDbJobName(tmrDbWrite->Tag); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     FrmVmsLog->LogMsg("Dbms Write Hang: " + dbJobName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     MERROR("MAINxxxxxxxxxxxx=> DBMS Write Job Hang Error: %s", dbJobName.c_str()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    RestartApplication("DbmReadThread"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //--------------------------------------------------------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1929,6 +1939,12 @@ void __fastcall TVmsCommMain::tmrDbReadTimer(TObject *Sender) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     FrmVmsLog->LogMsg("Dbms Read Hang: " + dbJobName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     MERROR("MAINxxxxxxxxxxxx=> DBMS Job Read Hang Error: %s", dbJobName.c_str()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    RestartApplication("DbmThread"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//--------------------------------------------------------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+void __fastcall TVmsCommMain::RestartApplication(String AHangJobName) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #if 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     bool bRestart = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     String sRestart; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1942,7 +1958,7 @@ void __fastcall TVmsCommMain::tmrDbReadTimer(TObject *Sender) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (bRestart) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        MERROR("DBMS Job Hang Error: Server Self Die...."); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        MERROR("DBMS Job Hang Error: Server Self Die.... By %s", AnsiString(AHangJobName).c_str()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String sRestartApp = g_sAppDir + "RestarterApp.exe"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (FileExists(sRestartApp)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1950,7 +1966,7 @@ void __fastcall TVmsCommMain::tmrDbReadTimer(TObject *Sender) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 for (thrIterator it=G_Threads.FObjects.begin(); it != G_Threads.FObjects.end(); ++it) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     TItsThread *pObj = (TItsThread*)it->second; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (pObj->Name == "DbmThread") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (pObj->Name == AHangJobName) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         TDbmThread *dbmThread = (TDbmThread*)pObj; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         dbmThread->CloseDb(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1967,16 +1983,11 @@ void __fastcall TVmsCommMain::tmrDbReadTimer(TObject *Sender) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             g_AppCfg.bAppClose = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Close(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            MERROR("DBMS Job Hang Error: Server Self Die....: Not Found RestarterApp.exe."); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //--------------------------------------------------------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-void __fastcall TVmsCommMain::pnlTrafDblClick(TObject *Sender) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (!FrmVmsLog->Showing) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        FrmVmsLog->Show(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//--------------------------------------------------------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 |