public static void Main(String[] args) { IOrbServices orb = OrbServices.GetSingleton(); TestInterceptorInit testInterceptorInit = new TestInterceptorInit(); orb.RegisterPortableInterceptorInitalizer(testInterceptorInit); // register the channel int port = 8087; IiopChannel chan = new IiopChannel(port); ChannelServices.RegisterChannel(chan, false); orb.CompleteInterceptorRegistration(); TestInterceptorControlService controlService = new TestInterceptorControlService(testInterceptorInit); string objectURIControlService = "interceptorControl"; RemotingServices.Marshal(controlService, objectURIControlService); TestService test = new TestService(); string objectURI = "test"; RemotingServices.Marshal(test, objectURI); Console.WriteLine("server running"); Thread.Sleep(Timeout.Infinite); }
public void SetupEnvironment() { // register the channel if (m_channel == null) { m_channel = new IiopClientChannel(); ChannelServices.RegisterChannel(m_channel, false); RegisterInterceptors(); // get the reference to the test-service m_testService = (TestService)RemotingServices.Connect(typeof(TestService), "corbaloc:iiop:1.2@localhost:8087/test"); m_interceptorControl = (TestInterceptorControlService)RemotingServices.Connect(typeof(TestInterceptorControlService), "corbaloc:iiop:1.2@localhost:8087/interceptorControl"); } }