I've been reading a lot about System.AddIn (a.k.a. Managed Add-in Framework). It lets you activate add-ins in different isolation modes, including separate AppDomains or separate processes.
Most of the articles I've found hint at the fact that process isolation can be used to achieve application reliability, where an add-in can crash with an unhandled exception, but the application will not crash and can unload the offending add-in and keep going.
I have yet to find an article that actually spells out exactly how to do this. I've been trying to figure out through trial and error but so far with everything I've tried, the host application crashes if an add-in throws an unhandled exception. I have each add-in running in its own process, but there seems to be more pieces of the puzzle that I don't understand.
Is it possible to use System.AddIn to create a host that can survive an unhandled exception in one of its add-ins? Are there code samples or articles that spell this out somewhere? If this is not possible with System.AddIn, is there another architecture that would allow for this in a .开发者_如何学JAVANET application?
Did you find this article?
You let your add-in run in a different AppDomain and listen for uncaught exception raised in this domain.
精彩评论