My application implements CAO with a SAO factory. I would like to switch my code over to using config files to allow for settings changes without re-comple
The server can reside on any machine in the users lan. The location (machine name) of the server is passed to the client when the client is loaded.
What is the be way to use config files in this scenario?
Here is my client and server code:
Server:
IDictionary prop = new Hashtable();
prop["port"] = 336;
prop["machineName"] = System.Environment.MachineName;
TcpChannel tchannel = new TcpChannel(prop, null, null);
ChannelServices.RegisterChannel(tchannel);
RemotingConfiguration.RegisterWellKnownServiceType(
typeof(Broker),
"VistaServer.Broker",
WellKnownObjectMode.Singleton);
CLient
TcpChannel tcpChannel = new TcpChannel();
ChannelServices.RegisterChannel(tcpChannel);
//Server url is passed in when the client runs
string url = "tcp://" + serverUrl + ":336/VistaServer.Broker";
iBroker = (IBroker)Activator.GetObject( typeof(IBroker), url);
s_IRemote = iBroker.CreateRemoteSystem(null);
s_IRemote.InitializeSystem();
Allen Anderson - 26 Jan 2004 17:27 GMT
well, you can't really class factory a CAO with an SAO through config
files. You can get all the way up to the point where you create your
SAO through the configs, but you will still have to hand create the
CAO and return it back from the SAO.
Allen Anderson
http://www.glacialcomponents.com
mailto: allen@put my website url here.com
>My application implements CAO with a SAO factory. I would like to switch my code over to using config files to allow for settings changes without re-comple
>
[quoted text clipped - 38 lines]
>
>s_IRemote.InitializeSystem();