Hi,
There are no Spring factory objects that will perform, say, programmatic channel registration for you, that will need to be done using the standard .NET remoting configuration. I think you should be fine if you just list the channel information in app.config and remove the following entry:
Code:
<service>
<activated type="BLL.Impl.UserManagementControler, BLLImpl"/>
</service>
in the standard app.config settings. To obtain a CAO reference to the object UserManagementControler the spring server configuration file you had
Code:
<object name="UserManagementControler" singleton="false" type="BLL.Impl.UserManagementControler, BLLImpl"> </object>
<object name="remoteFactory" type="Spring.Remoting.RemoteFactory, Spring.Services"></object>
<object name="publishedRemoteFactory" type="Spring.Remoting.SaoServiceExporter, Spring.Services">
<property name="Service" ref="remoteFactory"/>
<property name="ServiceName" value="RemoteFactory"/>
</object>
looks fine. Just have your server app.config contain only the following channel registration information, i.e.
Code:
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="9000" />
</channels>
</application>
</system.runtime.remoting>
Take a look at the sample Remoting application and how the instance of "prototypeCalculator" is obtained on the client and the corresponding server side configuration.
If you would like to remove the need to use the standard .NET channel configuration, there are a few options, we can create a ChannelFactoryObject that will perform the appropriate programmatic registration or even use the custom XML schema support to mimic the .NET App.config syntax exactly. (That would be the cool way to do it!)
It is a bit of busy work, since there are a fair amount of properties to support it fully. Alternatively, you can write a minimal ChannelFactoryObject, or a small helper class, or code inside an 'init method' that will call
Code:
TcpChannel channel = new TcpChannel(9000);
ChannelServices.RegisterChannel(channel);
This would let you use things like propery placeholders to set the tcp port number - which might the whole point of why you want to shift this configuration into spring and not the standard .net app.config section.
Let me know if I can help out more - I can code up the ChannelFactoryObject if you think it will be helpful.
Cheers,
Mark