You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use IBatisNet develop a Web application, in fact, started to automate tasks in multi-threaded processing, processed once every 10 minutes, but the following problem
#39
To initialize DaoManager in Global.asax
C # code
protected void Application_start (...) {
/ / Initialize DaoManager
WZW.IBatisNet.SqlMap.DaoConfig.GetInstance (). InitBaseDaoManager ();
/ / Record system startup log
Biz.SysLogBiz.GetInstance (). AddLog ("", Const.SYS_LOG_LOG_TYPE_SYSTEM_START, "system startup success!");
Biz.AutoRunBiz.GetInstance ();
}
Automatic processing procedure is as follows:
C # code
public class AutoRunBiz
{
private static AutoRunBiz instance = null;
public static AutoRunBiz GetInstance ()
{
if (instance == null)
{
instance = new AutoRunBiz ();
}
return the instance;
}
public AutoRunBiz ()
{
/ / Timer is running
Thread th = new Thread (new ThreadStart (this.Run));
th.Start ();
}
private void Run ()
{
while (true)
{
Biz.MakePageBiz.GetInstance (). MakeIndex ();
/ / Executed once every 10 minutes
Thread.Sleep (600000);
}
}
}
Found that the system logs the following questions:
System startup system startup 2009-10-26 19:40:19
System startup system startup 2009-10-26 19:29:56
System startup system startup 2009-10-26 19:19:47
Every 10 minutes will be initialized once DaoManager
Description Global.asax the Application_Start every 10 minutes performed once,
if not the automatic task processing, only the execution time Application_start
Master please help?
Original issue reported on code.google.com by [email protected] on 3 Feb 2012 at 12:33
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 3 Feb 2012 at 12:33The text was updated successfully, but these errors were encountered: