Ejemplo n.º 1
0
 public static ViennaServerMgr Get()
 {
     if (s_serverMgr == null)
     {
         //	for faster subsequent calls
         s_serverMgr = new ViennaServerMgr();
         s_serverMgr.StartAll(true);
         s_serverMgr.log.Info(s_serverMgr.ToString());
     }
     return(s_serverMgr);
 }       //	get
Ejemplo n.º 2
0
        public bool StartAll(string processOption, bool traceFile)
        {
            log.Info("Start New log================================>" + DateTime.Now.Millisecond.ToString());
            try
            {
                s_serverMgr = new ViennaServerMgr(traceFile);
            }
            catch (Exception ex)
            {
                log.SaveError("Restart the Vienna Server", ex);
                return(false);
            }
            string[] arry = processOption.Substring(0, processOption.Length - 1).Split(',');

            //Now  get Sever info from VServer form
            for (int i = 0; i < arry.Length; i++)
            {
                if (arry[i].Equals("SP"))
                {
                    s_serverMgr.DoStartScheduler = true;
                }
                else if (arry[i].Equals("AP"))
                {
                    s_serverMgr.DoStartAcctProcessor = true;
                }
                else if (arry[i].Equals("AL"))
                {
                    s_serverMgr.DoStartAlertProcessor = true;
                }
                else if (arry[i].Equals("RP"))
                {
                    s_serverMgr.DoStartRequestProcessor = true;
                }
                else if (arry[i].Equals("WP"))
                {
                    s_serverMgr.DoWorkflowProcessor = true;
                }
                else if (arry[i].Equals("MS"))
                {
                    s_serverMgr.DoStartMSMQ = true;
                }
            }
            try
            {
                bool b = s_serverMgr.StartAll(true);
                if (b)
                {
                    if (s_serverMgr.DoStartMSMQ)
                    {
                        //MSMQServer sQ = new MSMQServer(Ini.s_prop.GetProperty("VIENNA_MAIL_SERVER"), Ini.s_prop.GetProperty("VIENNA_MAIL_USER"),
                        //Ini.s_prop.GetProperty("VIENNA_MAIL_PASSWORD"), Ini.s_prop.GetProperty("VIENNA_ADMIN_EMAIL"));
                    }
                }
            }
            catch
            {
                return(false);
            }

            return(true);
        }