Exemple #1
0
        static void Main(string[] args)
        {
            CorbaInit orb = CorbaInit.GetInit();
            IiopClientChannel clientChannel = new IiopClientChannel();
            //ChannelServices.RegisterChannel(clientChannel, false);

            IiopChannel iiop = new IiopChannel(8807);
            ChannelServices.RegisterChannel(iiop, false);

            NamingContext nc = InitialRefLineParser.getNamingServiceForArgs(args);

            if (nc == null)
                Console.WriteLine("Cannot connet to Naming Service");

            Console.WriteLine(Thread.CurrentThread.ManagedThreadId);

            DFServer dfs = new DFServer(Directory.GetCurrentDirectory() );
            DFSAccess dfa = new DFSAccess(dfs, "DFSAccess", nc);
            DFSManager dfm = new DFSManager(dfs, "DFSManager", nc);
            dfs.getServerWaitHandle().WaitOne();
        }