Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/16/08 22:20:13 (16 years ago)
Author:
kgrading
Message:

improved sandbox (#410)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs

    r993 r997  
    4545
    4646namespace HeuristicLab.Hive.Client.Core {
    47   public class Core {
    48 
     47  public class Core: MarshalByRefObject {
    4948    public delegate string GetASnapshotDelegate();
    5049
    5150    Dictionary<long, Executor> engines = new Dictionary<long, Executor>();
    5251    Dictionary<long, AppDomain> appDomains = new Dictionary<long, AppDomain>();
    53 
    54     private ClientCommunicatorClient ccc;
     52   
    5553    private WcfService wcfService;
    5654
     
    146144    void wcfService_PullJobCompleted(object sender, PullJobCompletedEventArgs e) {
    147145      if (e.Result.StatusMessage != ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT) {
    148         bool sandboxed = false;
     146        bool sandboxed = true;
    149147
    150148        PluginManager.Manager.Initialize();
    151         AppDomain appDomain =  PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.JobId.ToString(), sandboxed, typeof(TestJob));     
     149        AppDomain appDomain =  PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.JobId.ToString(), sandboxed, typeof(TestJob));
     150        appDomain.UnhandledException += new UnhandledExceptionEventHandler(appDomain_UnhandledException);
     151
    152152        appDomains.Add(e.Result.JobId, appDomain);
    153153
     
    190190      return engines;
    191191    }
     192
     193    void appDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) {
     194      Logging.GetInstance().Error(this.ToString(), " Exception: " + e.ExceptionObject.ToString());
     195    }
    192196  }
    193197}
Note: See TracChangeset for help on using the changeset viewer.