Esempio n. 1
0
        public DFSManager(DFServer srv, string id)
        {
            this.server = srv;
            this.id = id;

            server.registerInterface(this);

            objrefWellKnown = RemotingServices.Marshal(this, id);
        }
Esempio n. 2
0
        public DFSManager(DFServer srv, string id, NamingContext nc)
        {
            this.server = srv;
            this.id = id;

            server.registerInterface(this);

            objrefWellKnown = RemotingServices.Marshal(this, id);

            this.nameService = nc;
            if ( nameService != null ) nameService.rebind(new NameComponent[] { new NameComponent(id) }, this);
        }
Esempio n. 3
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();
        }