public static void Main(String[] args) {
            // register the channel
            int port = 8087;
            IiopChannel chan = new IiopChannel(port);
            ChannelServices.RegisterChannel(chan, false);

            TestService test = new TestService();
            string objectURI = "test";
            RemotingServices.Marshal(test, objectURI);
            
            TestExceptionServiceImpl testExService = new TestExceptionServiceImpl();
            RemotingServices.Marshal(testExService, "testExService");

            RemotingConfiguration.RegisterWellKnownServiceType(typeof(TestWellKnownService),
                                                               "testSingleCall",
                                                               WellKnownObjectMode.SingleCall 
                                                              );

            RemotingConfiguration.RegisterWellKnownServiceType(typeof(TestWellKnownService),
                                                               "testSingletonCall",
                                                               WellKnownObjectMode.Singleton 
                                                              );
            TestContextBoundService contextBound = new TestContextBoundService();
            RemotingServices.Marshal(contextBound, "testContextBound");            

            TestBoxedValuetypeServiceImpl testBoxedService = new TestBoxedValuetypeServiceImpl();
            RemotingServices.Marshal(testBoxedService, "testBoxedService");

            Console.WriteLine("server running");
            Thread.Sleep(Timeout.Infinite);
        }
Beispiel #2
0
        public static void Main(String[] args)
        {
            // register the channel
            int         port = 8087;
            IiopChannel chan = new IiopChannel(port);

            ChannelServices.RegisterChannel(chan, false);

            TestService test      = new TestService();
            string      objectURI = "test";

            RemotingServices.Marshal(test, objectURI);

            TestExceptionServiceImpl testExService = new TestExceptionServiceImpl();

            RemotingServices.Marshal(testExService, "testExService");

            RemotingConfiguration.RegisterWellKnownServiceType(typeof(TestWellKnownService),
                                                               "testSingleCall",
                                                               WellKnownObjectMode.SingleCall
                                                               );

            RemotingConfiguration.RegisterWellKnownServiceType(typeof(TestWellKnownService),
                                                               "testSingletonCall",
                                                               WellKnownObjectMode.Singleton
                                                               );
            TestContextBoundService contextBound = new TestContextBoundService();

            RemotingServices.Marshal(contextBound, "testContextBound");

            TestBoxedValuetypeServiceImpl testBoxedService = new TestBoxedValuetypeServiceImpl();

            RemotingServices.Marshal(testBoxedService, "testBoxedService");

            Console.WriteLine("server running");
            Thread.Sleep(Timeout.Infinite);
        }