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.
> why exactly are you trying to use a refelcted object to proxy to? I
> guess I don't quite get what your trying to accomplish. Maybe I could
[quoted text clipped - 32 lines]
> >Thanks,
> >Livingston.
Allen Anderson - 25 Mar 2004 16:58 GMT
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
>Allen,
>
[quoted text clipped - 31 lines]
>Thanks,
>Livingston.
Livingston George - 26 Mar 2004 16:31 GMT
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.
> yes, I understand what your trying to get to now. That's a tough call
> though.
[quoted text clipped - 44 lines]
> >Thanks,
> >Livingston.
Tom Hall - 27 Mar 2004 03:33 GMT
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
> Allen,
>
[quoted text clipped - 69 lines]
> > >Thanks,
> > >Livingston.