[Mono-list] Remoting and Type Activation

Matthew Metnetsky met@uberstats.com
Mon, 30 Aug 2004 14:04:54 -0400


Thanks, that was the simple answer I was looking for.

~ Matthew

On Mon, 2004-08-30 at 12:50, Lluis Sanchez wrote:
> The rules are easy. MarshalByRefObject derived objects are passed by
> reference, which means that the object keeps running in the process that
> created it, and the client gets a reference to the remote object.
> Objects not derived from MarshalByRefObject and marked as serializable,
> are passed as value, which means that a copy of the object will be sent
> to the process requesting the object, and it will run there.
> 
> Lluis.
> 
> On dv, 2004-08-27 at 22:19, Matthew Metnetsky wrote:
> > I'm trying to make a small library I have remotable without much luck. 
> > I've following the examples at MSDN
> > 
> > (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconbuildingbasicnetremotingapplication.asp), which of course works fine.  I've even extended it to try and better mimic the basic design ideas of my library, and that works too.
> > 
> > But the second I try it on my library it fails.  I can create the class
> > which starts my library fine, but when I call it to return an instance
> > of my database manager it starts returning local copies (as debugged by
> > Console.WriteLine("server") vs. Console.WriteLine("client") at different
> > levels.  The library itself is way to large to attach yet alone
> > understand with a quick glimpse so I was wondering if anyone was willing
> > to give some pointers.  
> > 
> > - What causes the Remoting framework to switch from server to client?
> > - How might I force this to not happen?
> > - Do all classes have to be serializable/marshal even when they're not
> > the directly used/access?
> > - Any thing else I might be missing?
> > 
> > I'm on Mono CVS and using TCP Client based Remoting.
> > 
> > ~ Matthew
> > 
> > _______________________________________________
> > Mono-list maillist  -  Mono-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list