[Freeswitch-dev] Shadow copy for mod_managed

Jeff Lenk jlenk at frontiernet.net
Fri Oct 10 11:50:49 EDT 2008


Hello Michael,

Here is a link to a mechanism I have used to dynamically load and unload
assemblies using an appdomain.

http://csharpfeeds.com/post/5308/App_Domains_and_dynamic_loading_the_lost_co
lumns.aspx

Maybe a little easier

- Jeff



-----Original Message-----
From: freeswitch-dev-bounces at lists.freeswitch.org
[mailto:freeswitch-dev-bounces at lists.freeswitch.org] On Behalf Of Michael
Giagnocavo
Sent: Thursday, October 09, 2008 6:53 PM
To: freeswitch-dev at lists.freeswitch.org
Subject: [Freeswitch-dev] Shadow copy for mod_managed

Hello,

        I'm thinking of adding a ShadowCopy function to mod_managed to allow
easy overwriting and reloading of managed modules. Here's the comment
description for the feature. Any comments?

Shadow copy loading
The build in ShadowCopy loading for an AppDomain is nice, but it will not
reload an assembly with the same path.
So when overwriting assemblies, the Load/LoadFrom doesn't help and just
returns the currently loaded assembly. (LoadFile bypasses Fusion, and hence
the ShadowCopy feature).
Because of this, we implement our own shadow copy loading facility.
On initial load, all files in the managed module dir are copied to the
shadow dir under the "0" folder and loaded from there.
(Existing files in the shadow folder are deleted.)
When loading a new assembly after the initial load, it is copied to the
shadow dir, under the current version (start at 1, go up).
Resolved dependencies are also copied over to the current version folder.

Thanks,
Michael

_______________________________________________
Freeswitch-dev mailing list
Freeswitch-dev at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.173 / Virus Database: 270.7.6/1716 - Release Date: 10/9/2008
9:44 AM




More information about the Freeswitch-dev mailing list