Have no proof of concept in mind, but...

Have you tried using remoting to cross the domains using interfaces
defined in the third assembly for both end points and ensuring that both
sides inherit from MarshalByRef?  (to use events but avoid loading of
the respective assemblies in the respective appdomains)

Otherwise you might take a look at loosely coupled event models.

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Dean Cleaver
Sent: Wednesday, September 12, 2007 2:23 PM
To: [email protected]
Subject: Re: Correct handling of AppDomains

Yes - they're in a separate assembly.

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Peter Ritchie
Sent: Thursday, 13 September 2007 09:06
To: [email protected]
Subject: Re: [ADVANCED-DOTNET] Correct handling of AppDomains

Where are the interfaces defined that you're using?  Are they in a third
assembly?

On Thu, 13 Sep 2007 08:37:47 +1200, Dean Cleaver
<[EMAIL PROTECTED]> wrote:

>Hi,
>
>I'm writing an automation module that is designed to fire various jobs
>(created as assemblies implementing a given interface). I'm using
>AppDomains to create an instance of the job (via the interface so I
>don't load the assemblies into my original AppDomain).
>
>The issue I have is that the jobs are asynchronous however I'm having a
>hard time detecting when they're finished. If I try to add any events,
>then the new AppDomain wants to load my service assembly.
>
>If the AppDomain goes out of scope, I presume the code in it will still
>execute? And will it ever unload? I've searched the net for best
>practises on AppDomains, but can find very little on this type of issue
>- most is the basics of how to create one, perform an action and then
>unload it. Some of my jobs are only a few seconds long, others several
>hours, so I don't really want to run them synchronously.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This list is hosted by DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This list is hosted by DevelopMentor=AE  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to