Re: third post: Marshal by value remoting
From: Sam Santiago (ssantiago_at_n0spam-SoftiTechture.com)
Date: 12/14/04
- Previous message: Ashish Kaila: "Re: Serializing / Deserializing from different apps"
- In reply to: ALI-R: "Re: third post: Marshal by value remoting"
- Next in thread: ALI-R: "Re: third post: Marshal by value remoting"
- Reply: ALI-R: "Re: third post: Marshal by value remoting"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 13 Dec 2004 19:49:51 -0800
You got it. They are simply objects that can be serialized and transported
across process boundaries.
-- _______________________________ Sam Santiago ssantiago@n0spam-SoftiTechture.com http://www.SoftiTechture.com _______________________________ "ALI-R" <newbie@microsoft.com> wrote in message news:exaf7tX4EHA.1452@TK2MSFTNGP11.phx.gbl... > ok,I think I got yuo guys,, > > Is the following statement true?? > > Marshal-by-value objects are either parameters or return values of remoted > methods in Marshal-by-ref remote objects. > > Right??? > thanks > "Sam Santiago" <ssantiago@n0spam-SoftiTechture.com> wrote in message > news:%23TbXTkX4EHA.4008@TK2MSFTNGP15.phx.gbl... >> Wrong. What we're are saying is that a marshal-by-value object is >> simply >> an object that is serializable. Where you create this object and how > you >> use it is going to determine if remoting is involved or not. If you >> declare a variable locally of that MBV type and then call an MBR that >> returns a MBV to you, then you have involved remoting. The MBV was > created >> on the server and returned to you. The instantiation of that object >> occurred on the server. If you instantiate the object locally and use it > as >> a parameter to a MBR object then remoting is involved again. The object > was >> instantiated on the client and sent to the server as a parameter to a >> MBR. >> If you instantiate the object locally and use it locally without >> involving >> an MBR then remoting is not involved, it's simply a serializable object. >> >> Thanks, >> >> Sam >> >> -- >> _______________________________ >> Sam Santiago >> ssantiago@n0spam-SoftiTechture.com >> http://www.SoftiTechture.com >> _______________________________ >> "ALI-R" <newbie@microsoft.com> wrote in message >> news:%23SrzzbX4EHA.2196@TK2MSFTNGP14.phx.gbl... >> > So you guys mean that I am doing something which is not >> > possible(getting > a >> > remote object by value and not by refernece) right?? >> > >> > "Sam Santiago" <ssantiago@n0spam-SoftiTechture.com> wrote in message >> > news:OFNPROX4EHA.604@TK2MSFTNGP10.phx.gbl... >> >> Marshal-by-value is simply an object that is serializable. If you >> >> want >> > this >> >> object created on the server, then it must be sent to the client. In >> > order >> >> to initiate a server action you must invoke a method on a remoted >> >> object - >> > a >> >> marshal by reference objects. Marshal-by-value objects are either >> >> parameters or return values of remoted methods. It is a valid object >> > class, >> >> so there is nothing stopping you from instantiated an instance of this >> > class >> >> on your client. Here's another example on GotDotNet: >> >> >> >> http://samples.gotdotnet.com/quickstart/howto/ >> >> >> >> >> >> Thanks, >> >> >> >> Sam >> >> >> >> -- >> >> _______________________________ >> >> Sam Santiago >> >> ssantiago@n0spam-SoftiTechture.com >> >> http://www.SoftiTechture.com >> >> _______________________________ >> >> "ALI-R" <newbie@microsoft.com> wrote in message >> >> news:%23A8$69W4EHA.3380@TK2MSFTNGP09.phx.gbl... >> >> >I tried no using GetObject but it makes the instance of my local copy > of >> >> >the >> >> > object and no matter wether the server host application is up or >> >> > down >> > ,it >> >> > creates the instance from local object. >> >> > So you mean no body can use Marshal By Value alone without using >> >> > MarshalByRefObject,I don't think so because these are classified as > two >> >> > comletely differnet methods to work remotely so there should be a >> >> > workaround >> >> > this.I want to know how to use object in client ,,it seems that on > the >> >> > server there is no problem cause I said I can get the soap > description >> > of >> >> > it.there should be a way in client to get the copied object. I think >> > there >> >> > is someting wrong in my client config file. >> >> > >> >> > Thanks for your help,, >> >> > "Ken Kolda" <ken.kolda@elliemae-nospamplease.com> wrote in message >> >> > news:OCy3s3W4EHA.1404@TK2MSFTNGP11.phx.gbl... >> >> >> Although I've never tried this, I don't believe you can use >> >> >> GetObject() >> >> > with >> >> >> a non-MarshalByRef class. Keep in mind that the call to GetObject() >> >> > actually >> >> >> just creates a proxy. With marshal-by-value objects, there should >> >> >> be >> >> >> no >> >> >> proxy, so it makes sense this mechanism won't work. >> >> >> >> >> >> What you need to do is create a MarshalByRef object that you >> >> >> remote. >> > Then >> >> >> create a method on it, such as GetCompanyList(), which will return >> >> >> your >> >> >> serializable company list. >> >> >> >> >> >> Ken >> >> >> >> >> >> >> >> >> "ALI-R" <newbie@microsoft.com> wrote in message >> >> >> news:ed7v0nW4EHA.524@TK2MSFTNGP09.phx.gbl... >> >> >> > it is exactly what I do except I am trying to marshal an object >> >> >> > by >> >> >> > value >> >> >> to >> >> >> > client (not server) when I use >> >> >> > >> >> >> >> >> > >> > > cLst=(ListServer.CompanyList)Activator.GetObject(typeof(ListServer.CompanyLi >> >> >> > st),"tcp://magid1017:9000/ListServer") >> >> >> > >> >> >> > I get this error: >> >> >> > >> >> >> > Trying to create a proxy to an unbound type >> >> >> > >> >> >> > What is this error for? >> >> >> > >> >> >> > Thanks for you help >> >> >> > >> >> >> > "Sam Santiago" <ssantiago@n0spam-SoftiTechture.com> wrote in > message >> >> >> > news:uD81fPW4EHA.4092@TK2MSFTNGP14.phx.gbl... >> >> >> > > Here's an example from MS KB: >> >> >> > > >> >> >> > > How To Marshal an Object to a Remote Server by Value by Using >> > Visual >> >> >> Basic >> >> >> > > .NET >> >> >> > > http://support.microsoft.com/default.aspx?scid=kb;en-us;301116 >> >> >> > > >> >> >> > > Thanks, >> >> >> > > >> >> >> > > Sam >> >> >> > > >> >> >> > > -- >> >> >> > > _______________________________ >> >> >> > > Sam Santiago >> >> >> > > ssantiago@n0spam-SoftiTechture.com >> >> >> > > http://www.SoftiTechture.com >> >> >> > > _______________________________ >> >> >> > > "ALI-R" <newbie@microsoft.com> wrote in message >> >> >> > > news:OLODRsV4EHA.1188@tk2msftngp13.phx.gbl... >> >> >> > > >I have a remote object containg two classes ,one marked as >> >> >> > > >seriazable >> >> >> and >> >> >> > > > the other one has inherited MarshalByRefObject.I have my own >> >> >> > > > host >> >> >> > > > programme >> >> >> > > > which loads remote object on the server .On the client when I >> > work >> >> >> with >> >> >> > > > the >> >> >> > > > class which has inherited MarshalByRefObject,there is no > problem >> > at >> >> >> > > > all.but >> >> >> > > > the other class which has marked with [Serializable] seems to > be >> >> > goofy >> >> >> > > > since >> >> >> > > > wether the host is up or not ,when I try to use it ,,it uses > the >> >> > local >> >> >> > > > copy >> >> >> > > > of assemly in my computer (in client) and if I change the > class >> > to >> >> >> > inherit >> >> >> > > > MarshalByRefObject,it agian starts working.I am using config >> >> >> > > > file >> >> >> > > > in >> >> >> > > > client >> >> >> > > > and have to have a local copy of remote object referenced in > my >> >> >> > > > application. >> >> >> > > > >> >> >> > > > I would appreciate if somebody can solve this problem,I have >> >> >> > > > been >> >> >> > posting >> >> >> > > > several messages but there is no reply yet. >> >> >> > > > >> >> >> > > > Thanks, >> >> >> > > > ALI >> >> >> > > > >> >> >> > > > >> >> >> > > >> >> >> > > >> >> >> > >> >> >> > >> >> >> >> >> >> >> >> > >> >> > >> >> >> >> >> > >> > >> >> > >
- Previous message: Ashish Kaila: "Re: Serializing / Deserializing from different apps"
- In reply to: ALI-R: "Re: third post: Marshal by value remoting"
- Next in thread: ALI-R: "Re: third post: Marshal by value remoting"
- Reply: ALI-R: "Re: third post: Marshal by value remoting"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|