Hello,
I have a remote object that I configure first and then register to the remoting service.
No matter if I use Singleton or Singlecall as the WellKnownObjectMode, when my client program calls one of the methods on this remote object, new instance of MyRemoteObject is created and the method on this new instance is called. Of course with singleton mode new instance is created only once but it still isn't the one I just configured and registered.
This bothers me because I want to call the very instance of MyRemoteObject I just CONFIGURED and registered to the remoting service.
I don't wan to create new instance of the remote object every time it's method is called(or once with singleton mode).
How can this be done so that the very instance that I configured and registered, is invoked when client calls it's method?
//I create new instance of my remote object
MyRemoteObject myObj = new MyRemoteObject();
//I configure the object
myObj.configure();
//Then register it to the remoting service
TcpChannel tcpChan = new TcpChannel(8080);
ChannelServices.RegisterChannel(tcpChan);
RemotingConfiguration.RegisterWellKnownServiceType(
myObj.GetType(),
myObj.GetType().Name,WellKnownObjectMode.Singleton);
Thanks in advance, kerkkoj.