Search:
Namespaces
Discussions
.NET v1.1
Feedback
MarshalByValue from other appdomain
Messages
Related Types
This message was discovered on
microsoft.public.dotnet.framework.remoting
.
Post a new message to this list...
Matthias
Hello,
I try to write a program in J# that loads and unloads assemblies
dynamically. So far I know, this is only possible by using different
appdomains.
To be able to use the loaded classes and their functions in the main
application domain I used
MarshalByRefObject
to create an instances of
classes and unwrap them in the destination appDomain.
This works fine and I can also call functions with simple parameters.
Unfortunately I also want to use methods with parameters which contain
for example hashmaps of java.util which is included in vjslib. This
classes are not serializable and therefore can not be transmitted via
proxy to an other appdomain. But this is necessary if we use
MarshalByRefObject
because here we don't have a real copy in the
destination appdomain.
In some articles and books I red that Marshalling by value makes real
copies of an object which I can use in an other application domain.
This method would be perfect for my work.
But how can I create an instance of an object in one appdomain and put
a real copy of it (marshal-by-value) in a second appdomain?
Thanks for your help in advance.
Matthias
Reply to this message...
Ken Kolda
You hit on the way this done -- the class must be serializable to be
marshalled by value across app domains. Instead of using the Java hashmap,
can you use System.Collections.
Hashtable
, which is serializable?
Ken
"Matthias" <
Click here to reveal e-mail address
> wrote in message
news:
Click here to reveal e-mail address
...
[Original message clipped]
Reply to this message...
System.Collections.Hashtable
System.MarshalByRefObject
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com