What is marshalling and what are different kinds of
marshalling ?
Marshaling is used when an object is converted so that it
can be sent
across the networkor across application domains.Unmarshaling
creates an
object from the marshaleddata.There are two ways to do
marshalling :-
Marshal-by-value (MBV) :- In this the object is serialized
into the
channel, anda copy of the object is created on the other
side of the
network. The object tomarshal is stored into a stream, and
the stream
is used to build a copy of theobject on the
other side with the unmarshalling sequence.
Marshaling-by-reference (MBR):- Here it creates a proxy on
the client
that isused to communicate with the remote object. The
marshaling
sequence of aremote object creates an ObjRef instance that
itself can
be serialized acrossthe network.Objects that are derived
from
"MarshalByRefObject" are always marshaled
byreference.All our
previous samples have classes inherited from
"MarshalByRefObject"
To marshal a remote object the static method
RemotingServices.Marshal()
isused.
RemotingServices.Marshal() has following overloaded
versions:-
public static ObjRef Marshal(MarshalByRefObject obj)public
static
ObjRef Marshal(MarshalByRefObject obj, string objUri)
public static ObjRef Marshal(MarshalByRefObject obj, string
objUri,TyperequestedType)
The first argument obj specifies the object to marshal. The
objUri is
the path that isstored within the marshaled object
reference; it can be
used to access the remote object.The requestedType can be
used to pass
a different type of the object to
the object reference.This is useful if the client using the
remote
object shouldn't use the object class but aninterface that
the remote
object class implements instead. In this scenario the
interface isthe
requestedType that should be used for
marshaling.
What is ObjRef object in remoting ?
All Marshal() methods return ObjRef object.The ObjRef is
serializable
because itimplements the interface ISerializable, and
can be marshaled by value.
The ObjRef knowsabout :-
location of the remote object
host name
port number
object name.
--- Free PDF's for interview questions
Full Address book application in C# with technical
specification ,
estimation and test cases
http:
//www.questpond.com/AddressbookProject.zip
Web services Interview questions
h
ttp://www.questpond.com/WebServicesAndRemoting.zip
SQL Server 2005 Database optimization Interview questions
htt
p://www.questpond.com/DatabaseOptimization.zip
Basic .NET Framework interview questions
http://www.questpond.com/FrameWorkSampleInterviewQ
uestions.zip
.NET Interop and COM Interview questions
http://www.questpond.com/InteropdotnetInterviewQuest
ions.zip
ASP.NET Caching Interview questions
http://www.questpond.com/CachingInterviewQestions.zip
Do not know how estimations are done here's a complete book
on it
http://www.questpond.com/HowtoPrepareSoftwareQuotatio
ns.zip
Full Interview Questions for .NET and SQL Server
http://www
.geocities.com/dotnetinterviews/
Full free download of interview questions from
http://www.questpond.com
Help the community to make job search easier mail your
questions to
jobatyourdoorstep yahoo.co.in
Looking for a onsite job mail your resumes at
jobatyourdoorstep yahoo.co.in
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharp googlegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribe googlegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---
|