Exemplo n.º 1
0
        public static void Initialize()
        {
            if (logger != null)
            {
                logger.Close();
            }

            //logger = new Logger.Logger(GFXDConfigManager.GetClientSetting("logDir"),
            //    String.Format("{0}.log", typeof(DbHelper).FullName));
            logger = new Logger.Logger(Environment.GetEnvironmentVariable("GFXDADOOUTDIR"),
                                       String.Format("{0}.log", typeof(DbHelper).FullName));
            locker = new object();

            try
            {
                GFXDServerMgr.Initialize();
                DbDefault.CreateDB(String.Empty, DbCreateType.Replicate);
            }
            catch (Exception e)
            {
                Log(GetExceptionDetails(e, new StringBuilder()).ToString());
                throw new Exception(
                          "Encountered exception in Helper.Initialize(). Check log for detail.");
            }
        }
Exemplo n.º 2
0
        public static void Initialize()
        {
            LoadConfig();

            if (!startServer)
            {
                return;
            }

            if (logger != null)
            {
                logger.Close();
            }

            logger = new Logger.Logger(logDir, typeof(GFXDServerMgr).FullName + ".log");

            locator = new GFXDLocator();
            locator.Start();

            try
            {
                for (int i = 0; i < numServers; i++)
                {
                    GFXDServer server = new GFXDServer(locator);
                    server.Start();
                    AddServer(server);
                }
            }
            catch (Exception e)
            {
                Log(DbHelper.GetExceptionDetails(e, new StringBuilder()).ToString());
            }
        }
Exemplo n.º 3
0
        public GFXDLocator()
        {
            LoadConfig();

            if (logger != null)
            {
                logger.Close();
            }

            logger = new Logger.Logger(logDir, String.Format("{0}.log", typeof(GFXDLocator).FullName));

            locatorDir   = string.Format(@"{0}\{1}", installPath, defaultDir);
            LocatorState = GFXDState.STOPPED;
        }
Exemplo n.º 4
0
        public GFXDTest() //: this(new ManualResetEvent(false))
        {
            if (logger != null)
            {
                logger.Close();
            }

            //logger = new Logger.Logger(GFXDConfigManager.GetClientSetting("logDir"),
            //    this.GetType().FullName + ".log");
            logger = new Logger.Logger(Environment.GetEnvironmentVariable("GFXDADOOUTDIR"),
                                       this.GetType().FullName + ".log");

            Start();
        }
        public GFXDTestRunner()
        {
            this.resetEvent      = new ManualResetEvent(false);
            this.runContinuously = false;
            this.interrupted     = false;

            if (logger != null)
            {
                logger.Close();
            }

            //logger = new Logger.Logger(GFXDConfigManager.GetClientSetting("logDir"),
            //    typeof(GFXDTestRunner).FullName + ".log");

            logger = new Logger.Logger(Environment.GetEnvironmentVariable("GFXDADOOUTDIR"),
                                       typeof(GFXDTestRunner).FullName + ".log");
        }
Exemplo n.º 6
0
        public GFXDServer()
        {
            LoadConfig();

            if (logger != null)
            {
                logger.Close();
            }

            logger = new Logger.Logger(logDir, String.Format("{0}.log", typeof(GFXDServer).FullName));

            if (numServers == 1)
            {
                mcastPort = 0;
            }

            clientBindAddress = defaultClientBindAddress;
            clientPort        = defaultClientPort + (serverCount++);
            ServerName        = string.Format("{0}{1}", defaultServerDir, serverCount);
            serverDir         = string.Format(@"{0}\{1}", installPath, ServerName);
            this.ServerState  = GFXDState.STOPPED;
        }