Beispiel #1
0
        public override int run(string[] args)
        {
            if(args.Length > 0)
            {
                Console.Error.WriteLine(appName() + ": too many arguments");
                return 1;
            }

            Ice.ObjectAdapter adapter = communicator().createObjectAdapter("SessionFactory");

            ReapThread reaper = new ReapThread();
            Thread reaperThread = new Thread(new ThreadStart(reaper.run));
            reaperThread.Start();

            adapter.add(new SessionFactoryI(reaper), communicator().stringToIdentity("SessionFactory"));
            adapter.activate();
            communicator().waitForShutdown();

            reaper.terminate();
            reaperThread.Join();

            return 0;
        }
Beispiel #2
0
        public override int run(string[] args)
        {
            if (args.Length > 0)
            {
                Console.Error.WriteLine(appName() + ": too many arguments");
                return(1);
            }

            var adapter = communicator().createObjectAdapter("SessionFactory");

            var reaper       = new ReapThread();
            var reaperThread = new Thread(new ThreadStart(reaper.run));

            reaperThread.Start();

            adapter.add(new SessionFactoryI(reaper), Ice.Util.stringToIdentity("SessionFactory"));
            adapter.activate();
            communicator().waitForShutdown();

            reaper.terminate();
            reaperThread.Join();

            return(0);
        }
Beispiel #3
0
 public SessionFactoryI(ReapThread reapThread)
 {
     _reaper = reapThread;
 }
Beispiel #4
0
 public SessionFactoryI(ReapThread reapThread)
 {
     _reaper = reapThread;
 }