What is the fundamental of published or pre-created objects in Remoting ?

Q

.NET INTERVIEW QUESTIONS - What is the fundamental of published or pre-created objects in Remoting ?

✍: Guest

A

In scenarios of singleton or single call the objects are created dynamically. But in situations where you want to pre-create object and publish it you will use published object scenarios.

Dim obj as new objRemote
obj.Initvalue = 100
RemotingServices.Marshal(obj,”RemoteObject”)

As shown in above sample following changes will be needed on server side.
RemotingConfiguration.RegisterWellKnownServiceType is replaced by RemotingServices.Marshal(obj,”RemoteObject”) where “obj” is the pre-created objected
on the server whose value is initialized to 100.

2009-08-18, 3767👍, 0💬