Re: Remoting a Reflected Object

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Tom Hall (nospam_at_harmonyit.com)
Date: 03/27/04


Date: Fri, 26 Mar 2004 21:33:53 -0500

Well, actually you can use interfaces - its just tricky to create the object
(fortunately Ingo Rammer has solved it)!

Check out this article - I have use his technique extensively in my
projects - it works.

http://www.ingorammer.com/RemotingFAQ/USEINTERFACESWITHCONFIGFILES.html

Tom

"Livingston George" <livingston.george@innova-team.com> wrote in message
news:%23$TgSZ0EEHA.712@tk2msftngp13.phx.gbl...
> Allen,
>
> Can I know how you achieved this?
>
> I mean, Can I see some code?
> I wonder how the Server Application instanciates the Reflected object!
>
> I initially, had my ShareDll classes has Interfaces only.
> But, an Interface cannot be inherited from MarshalByRefObj rite?
> So I could not use it.
>
> But May be I should inherit the Implementation class from MarshalByRefObj
> and Implement my ShareDll.
>
>
> Thanks,
> Livingston.
>
> "Allen Anderson" <allen@sparkysystems.com> wrote in message
> news:670660l1ufq66qusud1kar458vagr3nmgt@4ax.com...
> > yes, I understand what your trying to get to now. That's a tough call
> > though.
> >
> > I did something similar where I wanted to be able to upgrade the
> > object and I used an interface instead of an abstract class. This
> > gave me the looser type checking but still allowed me to dynamically
> > replace the files without it screaming at me about incorrect versions
> > of objects.
> >
> >
> > Allen Anderson
> > http://www.glacialcomponents.com
> > mailto: allen@put my website url here.com
> >
> >
> > On Thu, 25 Mar 2004 03:00:43 +0530, "Livingston George"
> > <livingston.george@innova-team.com> wrote:
> >
> > >Allen,
> > >
> > >I have 2 Components / assemblies. a. MainModule. and
b.DataServerModule.
> > >
> > >DataServerModule is referring to MainModule. And main module should not
> be
> > >dependent on DataServerModule. Reason is, DataServerModule can be
> replaced
> > >by another module in the future.
> > >But the DataServerModule should be dynamically callable by MainModule.
> > >The DataServerModule has classes implementing few Interfaces. On these
> > >interfaces the MainModule will make method calls.
> > >
> > >The DataServerModule is also implementing a Callback Interface Object
> which
> > >will be used by remote clients to send data by calling methods on it.
> > >For this I need to publish the Callback Object.
> > >
> > >This is the Scenario.
> > >
> > >First I was planning to Host both Modules in separate applications so
> that I
> > >can achieve the MainModule's independency but the DataServerModule
again
> had
> > >to have an access to MainModule and its objects. So I could not move
> these
> > >two assemblies to two different processes. If I do then it means, More
> > >remoting objects on both the assemblies. More metadata dlls (like your
> > >ShareDLL).
> > >
> > >So, I was trying to use reflection to get the DataServerModule loaded.
> > >I was assuming if the publishing is done by the Callback Object itself,
> the
> > >MainModule is totally independent of handling DataServerModule.
> > >
> > >Without using Reflection publishing from the object itself works fine.
> But
> > >when I do the same looks like Publishing fails.
> > >
> > >I think now you have a good idea of what I am trying to achieve.
> > >
> > >Thanks,
> > >Livingston.
> > >
>
>



Relevant Pages

  • Re: Abstract Class Theory
    ... >> there would be no need for abstract methods, and no abstract classes. ... >> the derived class will be overriding, or even overloading, the base class ... > class inherit from both. ... Actually you are confusing abstract classes and interfaces. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Abstract Class vs. Interface
    ... A class that inherits from an abstract base class can choose ... Often interfaces represent a set of capabilities for example: ... class Apple: Fruit, Eatable ... It is unlikely that class Cow and class Apple would inherit from the same ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [Bug][perf hw-breakpoints] Null pointer exception when using register_user_hw_breakpoint wit
    ... While testing out two new interfaces that ... The bug is seen only when 'inherit' flag of 'perf_event_attr' is set ... Please find the screen logs taken from an x86 box, running -tip kernel ... Ooh, cute, it seems the inherit code assumes we have a file structure ...
    (Linux-Kernel)
  • Re: BeginEdit Method (Event?)
    ... You could create a similar proxy object by implementing the same interfaces, ... The third being the interface where BeginEdit comes from. ... However, I don't think they directly inherit from DataRow, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: interfaces
    ... abstract classes serves the purpose and have all good things then what is ... but you can implement as many interfaces as you like. ... if you are creating a "Dog" class you might inherit from ... "IChaseParkedCars" were abstract classes rather than interfaces. ...
    (microsoft.public.dotnet.languages.csharp)