Changeset 3578


Ignore:
Timestamp:
05/01/10 13:58:24 (12 years ago)
Author:
kgrading
Message:

Removed References to HiveLogging and updated the default logging mechanism (#991)

Location:
trunk/sources
Files:
51 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Grid/3.2/ProcessingEngine.cs

    r2073 r3578  
    8181        } catch(Exception ex) {
    8282          errorMessage = CreateErrorMessage(ex);
    83           HeuristicLab.Tracing.HiveLogger.Error(errorMessage);
     83          HeuristicLab.Tracing.Logger.Error(errorMessage);
    8484          // push operation on stack again
    8585          myExecutionStack.Push(atomicOperation);
  • trunk/sources/HeuristicLab.Hive.Client.Common/3.2/HeuristicLab.Hive.Client.Common-3.2.csproj

    r3022 r3578  
    8282  <ItemGroup>
    8383    <Compile Include="CommonPlugin.cs" />
    84     <Compile Include="Logging.cs" />
    8584    <Compile Include="MessageQueue.cs" />
    8685    <Compile Include="NetworkEnum.cs" />
  • trunk/sources/HeuristicLab.Hive.Client.Communication/3.2/CommunicationsPlugin.cs

    r2591 r3578  
    3535  [PluginDependency("HeuristicLab.Hive.Client.Common-3.2")]
    3636  [PluginDependency("HeuristicLab.Hive.Contracts-3.2")]
     37  [PluginDependency("HeuristicLab.Tracing")]
    3738  public class CommunicationsPlugin : PluginBase {
    3839  }
  • trunk/sources/HeuristicLab.Hive.Client.Communication/3.2/HeuristicLab.Hive.Client.Communication-3.2.csproj

    r3203 r3578  
    120120      <Name>HeuristicLab.PluginInfrastructure</Name>
    121121    </ProjectReference>
     122    <ProjectReference Include="..\..\HeuristicLab.Tracing\3.2\HeuristicLab.Tracing-3.2.csproj">
     123      <Project>{EE2034D9-6E27-48A1-B855-42D45F69A4FC}</Project>
     124      <Name>HeuristicLab.Tracing-3.2</Name>
     125    </ProjectReference>
    122126  </ItemGroup>
    123127  <ItemGroup>
  • trunk/sources/HeuristicLab.Hive.Client.Communication/3.2/WcfService.cs

    r3203 r3578  
    3333using System.IO;
    3434using System.Runtime.Serialization.Formatters.Binary;
     35using HeuristicLab.Tracing;
    3536
    3637namespace HeuristicLab.Hive.Client.Communication {
     
    4546    /// <returns>the Instance of the WcfService class</returns>
    4647    public static WcfService Instance {
    47       get {
     48      get {       
    4849        if (instance == null) {
     50          Logger.Debug("New WcfService Instance created");
    4951          instance = new WcfService();
    5052        }
     
    7678    public void Connect() {
    7779      try {
     80        Logger.Debug("Starting the Connection Process");
    7881        if (String.Empty.Equals(ServerIP) || ServerPort == 0) {
    79           Logging.Instance.Info(this.ToString(), "No Server IP or Port set!");
     82          Logger.Info("No Server IP or Port set!");
    8083          return;
    8184        }
     85
     86        Logger.Debug("Creating the new connection proxy");
    8287        proxy = new ClientFacadeClient(
    8388          WcfSettings.GetStreamedBinding(),
    8489          new EndpointAddress("net.tcp://" + ServerIP + ":" + ServerPort + "/HiveServer/ClientCommunicator")
    8590        );
    86 
     91        Logger.Debug("Created the new connection proxy");
     92
     93        Logger.Debug("Registring new Events");
    8794        proxy.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(proxy_LoginCompleted);
    8895        proxy.SendStreamedJobCompleted += new EventHandler<SendStreamedJobCompletedEventArgs>(proxy_SendStreamedJobCompleted);
     
    9097        proxy.ProcessSnapshotStreamedCompleted += new EventHandler<ProcessSnapshotStreamedCompletedEventArgs>(proxy_ProcessSnapshotStreamedCompleted);
    9198        proxy.ProcessHeartBeatCompleted += new EventHandler<ProcessHeartBeatCompletedEventArgs>(proxy_ProcessHeartBeatCompleted);
     99        Logger.Debug("Registered new Events");
     100        Logger.Debug("Opening the Connection");
    92101        proxy.Open();
     102        Logger.Debug("Opened the Connection");
    93103
    94104        ConnState = NetworkEnum.WcfConnState.Connected;
    95105        ConnectedSince = DateTime.Now;
    96        
    97         if (Connected != null)
    98           Connected(this, new EventArgs());                               
    99         //Todo: This won't be hit. EVER       
     106
     107        if (Connected != null) {
     108          Logger.Debug("Calling the connected Event");
     109          Connected(this, new EventArgs());
     110          //Todo: This won't be hit. EVER       
     111        }
    100112        if (ConnState == NetworkEnum.WcfConnState.Failed)
    101113          ConnectionRestored(this, new EventArgs());       
     
    113125    /// <param name="serverPort">current Server Port</param>
    114126    public void Connect(String serverIP, int serverPort) {
     127      Logger.Debug("Called Connected with " + serverIP + ":" + serverPort);
    115128      String oldIp = this.ServerIP;
    116129      int oldPort = this.ServerPort;
     
    124137
    125138    public void SetIPAndPort(String serverIP, int serverPort) {
     139      Logger.Debug("Called with " + serverIP + ":" + serverPort);
    126140      this.ServerIP = serverIP;
    127141      this.ServerPort = serverPort;
     
    141155    private void HandleNetworkError(Exception e) {
    142156      ConnState = NetworkEnum.WcfConnState.Failed;
    143       Logging.Instance.Error(this.ToString(), "exception: ", e);
     157      Logger.Error("Network exception occurred: " + e);
    144158    }
    145159
     
    152166    public event System.EventHandler<LoginCompletedEventArgs> LoginCompleted;
    153167    public void LoginAsync(ClientDto clientInfo) {
    154       if (ConnState == NetworkEnum.WcfConnState.Connected)
     168      if (ConnState == NetworkEnum.WcfConnState.Connected) {
     169        Logger.Debug("STARTED: Login Async");
    155170        proxy.LoginAsync(clientInfo);
     171      }
    156172    }
    157173    private void proxy_LoginCompleted(object sender, LoginCompletedEventArgs e) {
    158       if (e.Error == null)
     174      if (e.Error == null) {
     175        Logger.Debug("ENDED: Login Async");
    159176        LoginCompleted(sender, e);
    160       else
     177      } else
    161178        HandleNetworkError(e.Error.InnerException);
    162179    }
     
    165182      try {
    166183        if (ConnState == NetworkEnum.WcfConnState.Connected) {
     184          Logger.Debug("STARTED: Login Sync");
    167185          Response res = proxy.Login(clientInfo);
    168186          if (!res.Success) {
    169             Logging.Instance.Error(this.ToString(), "Login Failed! " + res.StatusMessage);
    170             HandleNetworkError(new Exception(res.StatusMessage));
     187            Logger.Error("FAILED: Login Failed! " + res.StatusMessage);
     188            throw new Exception(res.StatusMessage);
    171189          } else {
    172             ConnState = NetworkEnum.WcfConnState.Loggedin;
    173             Logging.Instance.Info(this.ToString(), res.StatusMessage);
     190            Logger.Info("ENDED: Login succeeded" + res.StatusMessage);
     191            ConnState = NetworkEnum.WcfConnState.Loggedin;           
    174192          }
    175193        }
     
    188206    public event System.EventHandler<SendJobCompletedEventArgs> SendJobCompleted;
    189207    public void SendJobAsync(Guid guid) {
    190       if (ConnState == NetworkEnum.WcfConnState.Loggedin)       
     208      if (ConnState == NetworkEnum.WcfConnState.Loggedin) {
     209        Logger.Debug("STARTED: Fetching of Jobs from Server for Client");
    191210        proxy.SendStreamedJobAsync(guid);
     211      }
    192212    }
    193213
    194214    void proxy_SendStreamedJobCompleted(object sender, SendStreamedJobCompletedEventArgs e) {
    195215      if (e.Error == null) {
     216        Logger.Debug("ENDED: Fetching of Jobs from Server for Client");
    196217        Stream stream = null;
    197218        MemoryStream memStream = null;
     
    220241            new SendJobCompletedEventArgs(new object[] { response, memStream.GetBuffer() }, e.Error, e.Cancelled, e.UserState);
    221242          SendJobCompleted(sender, completedEventArgs);
    222         }
    223         finally {
     243        } catch (Exception ex) {
     244          Logger.Error(ex);
     245        } finally {
    224246          if(stream != null)
    225247            stream.Dispose();
     
    241263    public void StoreFinishedJobResultAsync(Guid clientId, Guid jobId, byte[] result, double percentage, Exception exception, bool finished) {
    242264      if (ConnState == NetworkEnum.WcfConnState.Loggedin) {
     265        Logger.Debug("STARTED: Sending back the finished job results");
     266        Logger.Debug("Building stream");
    243267        Stream stream =
    244268          GetStreamedJobResult(clientId, jobId, result, percentage, exception);
    245 
     269        Logger.Debug("Builded stream");
     270        Logger.Debug("Making the call");
    246271        proxy.StoreFinishedJobResultStreamedAsync(stream, stream);
    247272      }
    248273     }
    249274    private void proxy_StoreFinishedJobResultStreamedCompleted(object sender, StoreFinishedJobResultStreamedCompletedEventArgs e) {
     275      Logger.Debug("Finished storing the job");
    250276      Stream stream =
    251277        (Stream)e.UserState;
    252       if (stream != null)
     278      if (stream != null) {
     279        Logger.Debug("Stream not null, disposing it");
    253280        stream.Dispose();
    254      
     281      }
    255282      if (e.Error == null) {
    256283        StoreFinishedJobResultCompletedEventArgs args =
    257284          new StoreFinishedJobResultCompletedEventArgs(
    258285            new object[] { e.Result }, e.Error, e.Cancelled, e.UserState);
     286        Logger.Debug("calling the Finished Job Event");
    259287        StoreFinishedJobResultCompleted(sender, args);
     288        Logger.Debug("ENDED: Sending back the finished job results");
    260289      } else
    261290        HandleNetworkError(e.Error);
     
    300329    public void SendHeartBeatAsync(HeartBeatData hbd) {
    301330      if (ConnState == NetworkEnum.WcfConnState.Loggedin)
     331        Logger.Debug("STARTING: sending heartbeat");
    302332        proxy.ProcessHeartBeatAsync(hbd);
    303333    }
    304334
    305335    private void proxy_ProcessHeartBeatCompleted(object sender, ProcessHeartBeatCompletedEventArgs e) {
    306       if (e.Error == null && e.Result.Success == true)
     336      if (e.Error == null && e.Result.Success == true) {
    307337        SendHeartBeatCompleted(sender, e);
    308       else {
     338        Logger.Debug("ENDED: sending heartbeats");
     339      } else {
    309340        try {
    310           Logging.Instance.Error(this.ToString(), "Error: " + e.Result.StatusMessage);
    311         } catch (Exception ex) {
    312           Logging.Instance.Error(this.ToString(), "Error: ", ex);         
     341          Logger.Error("Error: " + e.Result.StatusMessage);
     342        }
     343        catch (Exception ex) {
     344          Logger.Error("Error: ", ex);
    313345        }
    314346        HandleNetworkError(e.Error);
     
    351383    public Response IsJobStillNeeded(Guid jobId) {
    352384      try {
    353         return proxy.IsJobStillNeeded(jobId);
     385        Logger.Debug("STARTING: Sync call: IsJobStillNeeded");
     386        Response res = proxy.IsJobStillNeeded(jobId);
     387        Logger.Debug("ENDED: Sync call: IsJobStillNeeded");
     388        return res;
    354389      }
    355390      catch (Exception e) {
     
    361396
    362397    public ResponseResultReceived ProcessSnapshotSync(Guid clientId, Guid jobId, byte[] result, double percentage, Exception exception) {
    363       try {
    364         Logging.Instance.Info(this.ToString(), "Snapshot for Job " + jobId + " submitted");
     398      try {       
    365399        return proxy.ProcessSnapshotStreamed(
    366400          GetStreamedJobResult(clientId, jobId, result, percentage, exception));
     
    374408    public List<CachedHivePluginInfoDto> RequestPlugins(List<HivePluginInfoDto> requestedPlugins) {
    375409      try {
     410        Logger.Debug("STARTED: Requesting Plugins for Job");
     411        Logger.Debug("STARTED: Getting the stream");
    376412        Stream stream = proxy.SendStreamedPlugins(requestedPlugins.ToArray());
    377 
     413        Logger.Debug("ENDED: Getting the stream");
    378414        BinaryFormatter formatter =
    379415          new BinaryFormatter();
     416        Logger.Debug("STARTED: Deserializing the stream");
    380417        ResponsePlugin response = (ResponsePlugin)formatter.Deserialize(stream);
     418        Logger.Debug("ENDED: Deserializing the stream");
     419        if (stream != null)
     420          stream.Dispose();       
    381421        return response.Plugins;       
    382422      }
     
    389429    public void Logout(Guid guid) {
    390430      try {
     431        Logger.Debug("STARTED: Logout");
    391432        proxy.Logout(guid);
     433        Logger.Debug("ENDED: Logout");
    392434      }
    393435      catch (Exception e) {
     
    398440    public ResponseCalendar GetCalendarSync(Guid clientId) {
    399441      try {
    400         return proxy.GetCalendar(clientId);       
     442        Logger.Debug("STARTED: Syncing Calendars");
     443        ResponseCalendar cal = proxy.GetCalendar(clientId);
     444        Logger.Debug("ENDED: Syncing Calendars");
     445        return cal;
    401446      }
    402447      catch (Exception e) {
     
    408453    public Response SetCalendarStatus (Guid clientId, CalendarState state) {
    409454      try {
    410         return proxy.SetCalendarStatus(clientId, state);       
     455        Logger.Debug("STARTED: Setting Calendar status to: " + state);
     456        Response resp = proxy.SetCalendarStatus(clientId, state);
     457        Logger.Debug("ENDED: Setting Calendar status to: " + state);
     458        return resp;
    411459      } catch (Exception e) {
    412460        HandleNetworkError(e);
  • trunk/sources/HeuristicLab.Hive.Client.Core/3.2/ConfigurationManager/UptimeManager.cs

    r3220 r3578  
    99using HeuristicLab.Hive.Contracts.BusinessObjects;
    1010using HeuristicLab.Hive.Contracts;
     11using HeuristicLab.Tracing;
    1112
    1213namespace HeuristicLab.Hive.Client.Core.ConfigurationManager {
     
    4950      }
    5051      catch (Exception e) {
    51         Logging.Instance.Error(this.ToString(), "Persistance of the Calendar failed!", e);
     52        Logger.Error("Persistance of the Calendar failed!", e);
    5253      }
    5354      finally {
     
    6869        }
    6970        catch (Exception e) {
    70           Logging.Instance.Error(this.ToString(), "Deserialization of Calendar failed", e);
    71           Logging.Instance.Info(this.ToString(), "Starting with a new one");
     71          Logger.Error("Deserialization of Calendar failed", e);
     72          Logger.Info("Starting with a new one");
    7273          _appContainer = new AppointmentContainer();
    7374          CalendarAvailable = false;
  • trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Core.cs

    r3220 r3578  
    4444using HeuristicLab.Hive.JobBase;
    4545using HeuristicLab.Hive.Client.Core.JobStorage;
     46using HeuristicLab.Tracing;
    4647
    4748namespace HeuristicLab.Hive.Client.Core {
     
    5152  public class Core : MarshalByRefObject {
    5253    public static bool abortRequested { get; set; }
    53     private bool currentlyFetching = false;
     54
     55    private bool _currentlyFetching;
     56    private bool CurrentlyFetching {
     57      get {
     58        return _currentlyFetching;
     59      } set {       
     60        _currentlyFetching = value;
     61        Logger.Debug("Set CurrentlyFetching to " + _currentlyFetching);
     62      }
     63    }
    5464
    5565    private Dictionary<Guid, Executor> engines = new Dictionary<Guid, Executor>();
     
    6575    public void Start() {
    6676      abortRequested = false;
    67       Logging.Instance.Info(this.ToString(), "Hive Client started");
     77      Logger.Info("Hive Client started");
    6878      ClientConsoleServer server = new ClientConsoleServer();
    6979      server.StartClientConsoleServer(new Uri("net.tcp://127.0.0.1:8000/ClientConsole/"));
     
    104114        DetermineAction(container);
    105115      }
    106       System.Console.WriteLine("ended");
     116      Logger.Info("Program shutdown");
    107117    }
    108118
     
    112122    /// <param name="container">The Container, containing the message</param>
    113123    private void DetermineAction(MessageContainer container) {
    114       Logging.Instance.Info(this.ToString(), "Message: " + container.Message.ToString() + " for job: " + container.JobId);       
     124      Logger.Info("Message: " + container.Message.ToString() + " for job: " + container.JobId);       
    115125      switch (container.Message) {
    116126        //Server requests to abort a job
     
    119129            engines[container.JobId].Abort();
    120130          else
    121             Logging.Instance.Error(this.ToString(), "AbortJob: Engine doesn't exist");
     131            Logger.Error("AbortJob: Engine doesn't exist");
    122132          break;
    123133        //Job has been successfully aborted
     
    136146              GC.Collect();
    137147            } else
    138               Logging.Instance.Error(this.ToString(), "JobAbort: Engine doesn't exist");
     148              Logger.Error("JobAbort: Engine doesn't exist");
    139149          }
    140150          break;
     
    146156            engines[container.JobId].RequestSnapshot();
    147157          else
    148             Logging.Instance.Error(this.ToString(), "RequestSnapshot: Engine doesn't exist");
     158            Logger.Error("RequestSnapshot: Engine doesn't exist");
    149159          break;
    150160
     
    158168        //Pull a Job from the Server
    159169        case MessageContainer.MessageType.FetchJob:         
    160           if (!currentlyFetching) {
     170          if (!CurrentlyFetching) {
    161171            wcfService.SendJobAsync(ConfigManager.Instance.GetClientInfo().Id);
    162             currentlyFetching = true;
     172            CurrentlyFetching = true;
    163173          } else
    164             Logging.Instance.Info(this.ToString(), "Currently fetching, won't fetch this time!");
     174            Logger.Info("Currently fetching, won't fetch this time!");
    165175          break;         
    166176       
     
    174184        //When the timeslice is up
    175185        case MessageContainer.MessageType.UptimeLimitDisconnect:
    176           Logging.Instance.Info(this.ToString(), "Uptime Limit reached, storing jobs and sending them back");
     186          Logger.Info("Uptime Limit reached, storing jobs and sending them back");
    177187
    178188          //check if there are running jobs
    179189          if (engines.Count > 0) {
    180190            //make sure there is no more fetching of jobs while the snapshots get processed
    181             currentlyFetching = true;
     191            CurrentlyFetching = true;
    182192            //request a snapshot of each running job
    183193            foreach (KeyValuePair<Guid, Executor> kvp in engines) {
     
    193203          //Fetch or Force Fetch Calendar!
    194204        case MessageContainer.MessageType.FetchOrForceFetchCalendar:
    195           ResponseCalendar rescal = wcfService.GetCalendarSync(ConfigManager.Instance.GetClientInfo().Id);
    196           if(rescal.Success) {
    197             if(!UptimeManager.Instance.SetAppointments(false, rescal)) {
    198               wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.NotAllowedToFetch);             
    199             } else {
    200               wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.Fetched);             
    201             }
    202           } else {
    203             wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.NotAllowedToFetch);
    204           }
     205          Logger.Info("Fetch Calendar from Server");
     206          FetchCalendarFromServer(); 
    205207        break;
    206208
    207209        //Hard shutdown of the client
    208210        case MessageContainer.MessageType.Shutdown:
     211          Logger.Info("Shutdown Signal received");
    209212          lock (engines) {
     213            Logger.Debug("engines locked");
    210214            foreach (KeyValuePair<Guid, AppDomain> kvp in appDomains) {
     215              Logger.Debug("Shutting down Appdomain for " + kvp.Key);
    211216              appDomains[kvp.Key].UnhandledException -= new UnhandledExceptionEventHandler(appDomain_UnhandledException);
    212217              AppDomain.Unload(kvp.Value);
    213218            }
    214219          }
     220          Logger.Debug("Stopping heartbeat");
    215221          abortRequested = true;
    216222          beat.StopHeartBeat();
     223          Logger.Debug("Logging out");
    217224          WcfService.Instance.Logout(ConfigManager.Instance.GetClientInfo().Id);
    218225          break;
     
    230237    private void GetFinishedJob(object jobId) {
    231238      Guid jId = (Guid)jobId;
    232       Logging.Instance.Info(this.ToString(), "Getting the finished job with id: " + jId);
     239      Logger.Info("Getting the finished job with id: " + jId);
    233240      try {
    234241        if (!engines.ContainsKey(jId)) {
    235           Logging.Instance.Error(this.ToString(), "GetFinishedJob: Engine doesn't exist");
     242          Logger.Info("Engine doesn't exist");
    236243          return;
    237244        }
     
    240247
    241248        if (WcfService.Instance.ConnState == NetworkEnum.WcfConnState.Loggedin) {
    242           Logging.Instance.Info(this.ToString(), "Sending the finished job with id: " + jId);
     249          Logger.Info("Sending the finished job with id: " + jId);
    243250          wcfService.StoreFinishedJobResultAsync(ConfigManager.Instance.GetClientInfo().Id,
    244251            jId,
     
    248255            true);
    249256        } else {
    250           Logging.Instance.Info(this.ToString(), "Storing the finished job with id: " + jId + " to hdd");
     257          Logger.Info("Storing the finished job with id: " + jId + " to hdd");
    251258          JobStorageManager.PersistObjectToDisc(wcfService.ServerIP, wcfService.ServerPort, jId, sJob);
    252259          lock (engines) {
    253260            appDomains[jId].UnhandledException -= new UnhandledExceptionEventHandler(appDomain_UnhandledException);
    254261            AppDomain.Unload(appDomains[jId]);
    255             appDomains.Remove(jId);
    256             engines.Remove(jId);
     262            Logger.Debug("Unloaded appdomain");
     263            appDomains.Remove(jId);           
     264            engines.Remove(jId);           
    257265            jobs.Remove(jId);
     266            Logger.Debug("Removed job from appDomains, Engines and Jobs");
    258267          }
    259268        }
    260269      }
    261270      catch (InvalidStateException ise) {
    262         Logging.Instance.Error(this.ToString(), "Exception: ", ise);
     271        Logger.Error("Invalid State while Snapshoting:", ise);
    263272      }
    264273    }
    265274
    266275    private void GetSnapshot(object jobId) {
    267       Logging.Instance.Info(this.ToString(), "Fetching a snapshot for job " + jobId);
     276      Logger.Info("Fetching a snapshot for job " + jobId);
    268277      Guid jId = (Guid)jobId;
    269278      byte[] obj = engines[jId].GetSnapshot();
    270       Logging.Instance.Info(this.ToString(), "BEGIN: Sending snapshot sync");
     279      Logger.Debug("BEGIN: Sending snapshot sync");
    271280      wcfService.ProcessSnapshotSync(ConfigManager.Instance.GetClientInfo().Id,
    272281        jId,
     
    274283        engines[jId].Progress,
    275284        null);
    276       Logging.Instance.Info(this.ToString(), "END: Sended snapshot sync");
     285      Logger.Debug("END: Sended snapshot sync");
    277286      //Uptime Limit reached, now is a good time to destroy this jobs.
     287      Logger.Debug("Checking if uptime limit is reached");
    278288      if (!UptimeManager.Instance.IsOnline()) {
     289        Logger.Debug("Uptime limit reached");
     290        Logger.Debug("Killing Appdomain");
    279291        KillAppDomain(jId);
    280         //Still anything running?
    281         if (engines.Count == 0)
     292        //Still anything running? 
     293        if (engines.Count == 0) {
     294          Logger.Info("All jobs snapshotted and sent back, disconnecting");         
    282295          WcfService.Instance.Disconnect();
     296        } else {
     297          Logger.Debug("There are still active Jobs in the Field, not disconnecting");
     298        }
    283299
    284300      } else {
    285         Logging.Instance.Info(this.ToString(), "Restarting the job" + jobId);
     301        Logger.Debug("Restarting the job" + jobId);
    286302        engines[jId].StartOnlyJob();
     303        Logger.Info("Restarted the job" + jobId);
    287304      }
    288305    }
     
    299316    void wcfService_LoginCompleted(object sender, LoginCompletedEventArgs e) {
    300317      if (e.Result.Success) {
    301         currentlyFetching = false;
    302         Logging.Instance.Info(this.ToString(), "Login completed to Hive Server @ " + DateTime.Now);
     318        CurrentlyFetching = false;
     319        Logger.Info("Login completed to Hive Server @ " + DateTime.Now);
    303320      } else
    304         Logging.Instance.Error(this.ToString(), e.Result.StatusMessage);
     321        Logger.Error("Error during login: " + e.Result.StatusMessage);
    305322    }
    306323
     
    312329    void wcfService_SendJobCompleted(object sender, SendJobCompletedEventArgs e) {
    313330      if (e.Result.StatusMessage != ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT) {
    314         Logging.Instance.Info(this.ToString(), "Received new job with id " + e.Result.Job.Id);     
     331        Logger.Info("Received new job with id " + e.Result.Job.Id);     
    315332        bool sandboxed = false;
    316333        List<byte[]> files = new List<byte[]>();
    317         Logging.Instance.Info(this.ToString(), "Fetching plugins for job " + e.Result.Job.Id);
     334        Logger.Debug("Fetching plugins for job " + e.Result.Job.Id);
    318335        foreach (CachedHivePluginInfoDto plugininfo in PluginCache.Instance.GetPlugins(e.Result.Job.PluginsNeeded))
    319336          files.AddRange(plugininfo.PluginFiles);
    320         Logging.Instance.Info(this.ToString(), "Plugins fetched for job " + e.Result.Job.Id);
     337        Logger.Debug("Plugins fetched for job " + e.Result.Job.Id);
    321338        AppDomain appDomain = HeuristicLab.PluginInfrastructure.Sandboxing.SandboxManager.CreateAndInitSandbox(e.Result.Job.Id.ToString(), files);
    322339        appDomain.UnhandledException += new UnhandledExceptionEventHandler(appDomain_UnhandledException);
     
    325342            jobs.Add(e.Result.Job.Id, e.Result.Job);
    326343            appDomains.Add(e.Result.Job.Id, appDomain);
    327             Logging.Instance.Info(this.ToString(), "Creating AppDomain");
     344            Logger.Debug("Creating AppDomain");
    328345            Executor engine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName);
    329             Logging.Instance.Info(this.ToString(), "Created AppDomain");
     346            Logger.Debug("Created AppDomain");
    330347            engine.JobId = e.Result.Job.Id;
    331348            engine.Queue = MessageQueue.GetInstance();
    332             Logging.Instance.Info(this.ToString(), "Starting Engine for job " + e.Result.Job.Id);
     349            Logger.Debug("Starting Engine for job " + e.Result.Job.Id);
    333350            engine.Start(e.Data);
    334351            engines.Add(e.Result.Job.Id, engine);
     
    336353            ClientStatusInfo.JobsFetched++;
    337354
    338             Debug.WriteLine("Increment FetchedJobs to:" + ClientStatusInfo.JobsFetched);
     355            Logger.Info("Increment FetchedJobs to:" + ClientStatusInfo.JobsFetched);
    339356          }
    340357        }
    341358      } else
    342         Logging.Instance.Info(this.ToString(), "No more jobs left!");
    343       currentlyFetching = false;
     359        Logger.Info("No more jobs left!");
     360      CurrentlyFetching = false;
    344361    }
    345362
     
    350367    /// <param name="e"></param>
    351368    void wcfService_StoreFinishedJobResultCompleted(object sender, StoreFinishedJobResultCompletedEventArgs e) {
    352       Logging.Instance.Info(this.ToString(), "Job submitted with id " + e.Result.JobId);
     369      Logger.Info("Job submitted with id " + e.Result.JobId);
    353370      KillAppDomain(e.Result.JobId);
    354371      if (e.Result.Success) {
    355372        ClientStatusInfo.JobsProcessed++;
    356         Debug.WriteLine("ProcessedJobs to:" + ClientStatusInfo.JobsProcessed);
     373        Logger.Info("Increased ProcessedJobs to:" + ClientStatusInfo.JobsProcessed);
    357374      } else {
    358         Logging.Instance.Error(this.ToString(), "Sending of job " + e.Result.JobId + " failed, job has been wasted. Message: " + e.Result.StatusMessage);
     375        Logger.Error("Sending of job " + e.Result.JobId + " failed, job has been wasted. Message: " + e.Result.StatusMessage);
    359376      }
    360377    }
     
    366383    /// <param name="e"></param>
    367384    void wcfService_ProcessSnapshotCompleted(object sender, ProcessSnapshotCompletedEventArgs e) {
    368       Logging.Instance.Info(this.ToString(), "Snapshot " + e.Result.JobId + " has been transmitted according to plan.");
     385      Logger.Info("Snapshot " + e.Result.JobId + " has been transmitted according to plan.");
    369386    }
    370387
     
    375392    /// <param name="e"></param>
    376393    void wcfService_ServerChanged(object sender, EventArgs e) {
    377       Logging.Instance.Info(this.ToString(), "ServerChanged has been called");
     394      Logger.Info("ServerChanged has been called");
    378395      lock (engines) {
    379396        foreach (KeyValuePair<Guid, Executor> entries in engines) {
     
    394411    /// <param name="e"></param>
    395412    void wcfService_Connected(object sender, EventArgs e) {
     413      Logger.Info("WCF Service got a connection");
    396414      if (!UptimeManager.Instance.CalendarAvailable) {
    397         ResponseCalendar calres = wcfService.GetCalendarSync(ConfigManager.Instance.GetClientInfo().Id);
    398         if(calres.Success) {
    399           if (UptimeManager.Instance.SetAppointments(false, calres))
    400             wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.Fetched);
    401           else
    402             wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.NotAllowedToFetch);
    403         }
    404         else {
    405           wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.NotAllowedToFetch);
    406         }
     415        Logger.Info("No local calendar available, fetch it");
     416        FetchCalendarFromServer();
    407417      }
    408418      //if the fetching from the server failed - still set the client online... maybe we get
    409       //a result within the next few heartbeats
     419      //a result within the next few heartbeats     
    410420      if (!UptimeManager.Instance.CalendarAvailable || UptimeManager.Instance.IsOnline()) {
     421        Logger.Info("CalendarAvailable is " + UptimeManager.Instance.CalendarAvailable + " and IsOnline is: " + UptimeManager.Instance.IsOnline());
     422        Logger.Info("Setting client online");
    411423        wcfService.LoginSync(ConfigManager.Instance.GetClientInfo());
    412424        JobStorageManager.CheckAndSubmitJobsFromDisc();
    413         currentlyFetching = false;
     425        CurrentlyFetching = false;
     426      }
     427    }
     428
     429    private void FetchCalendarFromServer() {
     430      ResponseCalendar calres = wcfService.GetCalendarSync(ConfigManager.Instance.GetClientInfo().Id);
     431      if(calres.Success) {
     432        if (UptimeManager.Instance.SetAppointments(false, calres)) {
     433          Logger.Info("Remote calendar installed");
     434          wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.Fetched);
     435        } else {
     436          Logger.Info("Remote calendar installation failed, setting state to " + CalendarState.NotAllowedToFetch);
     437          wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.NotAllowedToFetch);
     438        }
     439      } else {
     440        Logger.Info("Remote calendar installation failed, setting state to " + CalendarState.NotAllowedToFetch);
     441        wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.NotAllowedToFetch);
    414442      }
    415443    }
     
    417445    //this is a little bit tricky -
    418446    void wcfService_ConnectionRestored(object sender, EventArgs e) {
    419       Logging.Instance.Info(this.ToString(), "Reconnected to old server - checking currently running appdomains");
     447      Logger.Info("Reconnected to old server - checking currently running appdomains");
    420448
    421449      foreach (KeyValuePair<Guid, Executor> execKVP in engines) {
    422450        if (!execKVP.Value.Running && execKVP.Value.CurrentMessage == MessageContainer.MessageType.NoMessage) {
    423           Logging.Instance.Info(this.ToString(), "Checking for JobId: " + execKVP.Value.JobId);
     451          Logger.Info("Checking for JobId: " + execKVP.Value.JobId);
    424452          Thread finThread = new Thread(new ParameterizedThreadStart(GetFinishedJob));
    425453          finThread.Start(execKVP.Value.JobId);
     
    435463
    436464    void appDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) {
    437       Logging.Instance.Error(this.ToString(), "Exception in AppDomain: " + e.ExceptionObject.ToString());
     465      Logger.Error("Exception in AppDomain: " + e.ExceptionObject.ToString());   
    438466    }
    439467
     
    447475    /// <param name="id">the GUID of the job</param>
    448476    private void KillAppDomain(Guid id) {
    449       Logging.Instance.Info(this.ToString(), "Shutting down Appdomain for Job " + id);
     477      Logger.Debug("Shutting down Appdomain for Job " + id);
    450478      lock (engines) {
    451479        try {
     
    457485        }
    458486        catch (Exception ex) {
    459           Logging.Instance.Error(this.ToString(), "Exception when unloading the appdomain: ", ex);
     487          Logger.Error("Exception when unloading the appdomain: ", ex);
    460488        }
    461489      }
  • trunk/sources/HeuristicLab.Hive.Client.Core/3.2/CorePlugin.cs

    r2591 r3578  
    3636  [PluginDependency("HeuristicLab.Hive.Contracts-3.2")]
    3737  [PluginDependency("HeuristicLab.Hive.JobBase-3.2")]
     38  [PluginDependency("HeuristicLab.Tracing", "3.2.0")]
    3839  public class CorePlugin: PluginBase {
    3940  }
  • trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Heartbeat.cs

    r3203 r3578  
    3232using HeuristicLab.Hive.Client.Core.ConfigurationManager;
    3333using HeuristicLab.Hive.Client.Communication.ServerService;
     34using HeuristicLab.Tracing;
    3435//using BO = HeuristicLab.Hive.Contracts.BusinessObjects;
    3536
     
    9293          //That's quiet simple: Just reconnect and you're good for new jobs
    9394          if (wcfService.ConnState != NetworkEnum.WcfConnState.Loggedin) {
    94             Logging.Instance.Info(this.ToString(), "Client goes online according to timetable");
     95            Logger.Info("Client goes online according to timetable");
    9596            wcfService.Connect();
    9697          }
     
    103104        wcfService.Connect();
    104105      } else if (wcfService.ConnState == NetworkEnum.WcfConnState.Loggedin) {
    105         Logging.Instance.Info(this.ToString(), "Sending Heartbeat: " + heartBeatData);       
     106        Logger.Debug("Sending Heartbeat: " + heartBeatData);       
    106107        wcfService.SendHeartBeatAsync(heartBeatData);
    107108      }
     
    109110
    110111    void wcfService_ProcessHeartBeatCompleted(object sender, ProcessHeartBeatCompletedEventArgs e) {
    111       Logging.Instance.Info(this.ToString(), "Heartbeat received");
     112      Logger.Debug("Heartbeat received");
    112113      e.Result.ActionRequest.ForEach(mc => MessageQueue.GetInstance().AddMessage(mc));     
    113114    }
  • trunk/sources/HeuristicLab.Hive.Client.Core/3.2/HeuristicLab.Hive.Client.Core-3.2.csproj

    r3203 r3578  
    157157      <Name>HeuristicLab.PluginInfrastructure</Name>
    158158    </ProjectReference>
     159    <ProjectReference Include="..\..\HeuristicLab.Tracing\3.2\HeuristicLab.Tracing-3.2.csproj">
     160      <Project>{EE2034D9-6E27-48A1-B855-42D45F69A4FC}</Project>
     161      <Name>HeuristicLab.Tracing-3.2</Name>
     162    </ProjectReference>
     163  </ItemGroup>
     164  <ItemGroup>
     165    <WCFMetadata Include="Service References\" />
    159166  </ItemGroup>
    160167  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • trunk/sources/HeuristicLab.Hive.Client.Core/3.2/JobStorage/JobStorageManager.cs

    r3220 r3578  
    1111using System.Diagnostics;
    1212using System.Xml;
     13using HeuristicLab.Tracing;
    1314
    1415namespace HeuristicLab.Hive.Client.Core.JobStorage {
     
    2829        jobstream.Write(job, 0, job.Length);
    2930        storedJobsList.Add(info);       
    30         Logging.Instance.Info("JobStorageManager", "Job " + info.JobID + " stored on the harddisc");
     31        Logger.Info("Job " + info.JobID + " stored on the harddisc");
    3132      }
    3233      catch (Exception e) {
    33         Logging.Instance.Error("JobStorageManager", "Exception: ", e);
     34        Logger.Error("Exception: ", e);
    3435      }
    3536      finally {
     
    4647        if (WcfService.Instance.ConnState == NetworkEnum.WcfConnState.Loggedin && (storedJobsList[index-1].ServerIP == WcfService.Instance.ServerIP && storedJobsList[index-1].ServerPort == WcfService.Instance.ServerPort)) {
    4748          String filename = storedJobsList[index-1].ServerIP + "." + storedJobsList[index-1].ServerPort + "." + storedJobsList[index-1].JobID.ToString();         
    48           Logging.Instance.Info("JobStorageManager", "Sending stored job " + storedJobsList[index - 1].JobID + " to the server");
     49          Logger.Info("Sending stored job " + storedJobsList[index - 1].JobID + " to the server");
    4950          try {
    5051            byte[] job = File.ReadAllBytes(path + filename + ".dat");
     
    5253              ResponseResultReceived res = WcfService.Instance.SendStoredJobResultsSync(ConfigManager.Instance.GetClientInfo().Id, storedJobsList[index - 1].JobID, job, 1.00, null, true);
    5354              if (!res.Success)
    54                 Logging.Instance.Error("JobStorageManager", "sending of job failed: " + res.StatusMessage);
     55                Logger.Error("sending of job failed: " + res.StatusMessage);
    5556              else
    56                 Logging.Instance.Info("JobStorageManager", "Sending of job " + storedJobsList[index - 1].JobID + " done");
     57                Logger.Info("Sending of job " + storedJobsList[index - 1].JobID + " done");
    5758            }
    5859            ClientStatusInfo.JobsProcessed++;
     
    6162          }
    6263          catch (Exception e) {
    63             Logging.Instance.Error("JobStorageManager", "Job not on hdd but on list - deleting job from list", e);
     64            Logger.Error("Job not on hdd but on list - deleting job from list ", e);
    6465            storedJobsList.Remove(storedJobsList[index - 1]);
    6566            StoreJobList();
     
    7879
    7980    static JobStorageManager() {
    80       Logging.Instance.Info("JobStorageManager", "Restoring Joblist from Harddisk");
     81      Logger.Info("Restoring Joblist from Harddisk");
    8182      if (!Directory.Exists(path))
    8283        Directory.CreateDirectory(path);
     
    8990          XmlTextReader reader = new XmlTextReader(stream);
    9091          storedJobsList = (List<JobStorageInfo>)serializer.Deserialize(reader);
    91           Logging.Instance.Info("JobStorageManager", "Loaded " + storedJobsList.Count + " Elements");
     92          Logger.Info("Loaded " + storedJobsList.Count + " Elements");
    9293        }
    9394        catch (Exception e) {
    94           Logging.Instance.Error("JobStorageManager", "Exception while loading the Stored Job List", e);
     95          Logger.Error("Exception while loading the Stored Job List", e);
    9596        } finally {
    9697          if(stream != null)
     
    9899        }
    99100      } else {
    100         Logging.Instance.Info("JobStorageManager", "no stored jobs on harddisk, starting new list");
     101        Logger.Info("no stored jobs on harddisk, starting new list");
    101102        storedJobsList = new List<JobStorageInfo>();
    102103      }
  • trunk/sources/HeuristicLab.Hive.Client.Core/3.2/PluginCache.cs

    r3011 r3578  
    77using HeuristicLab.Hive.Client.Common;
    88using HeuristicLab.Hive.Contracts.BusinessObjects;
     9using HeuristicLab.Tracing;
    910
    1011namespace HeuristicLab.Hive.Client.Core {
     
    3233
    3334    public List<CachedHivePluginInfoDto> GetPlugins(List<HivePluginInfoDto> requests) {
     35      Logger.Debug("Fetching plugins for job");
    3436      List<CachedHivePluginInfoDto> neededPlugins = new List<CachedHivePluginInfoDto>();
    3537      List<HivePluginInfoDto> missingPlugins = new List<HivePluginInfoDto>();
     
    4042        foreach (CachedHivePluginInfoDto cache in pluginCache) {
    4143          if (info.Name.Equals(cache.Name) && info.Version.Equals(cache.Version) && info.BuildDate <= cache.BuildDate) {
     44            Logger.Debug("Found plugin " + info.Name + ", " + info.Version);
    4245            neededPlugins.Add(cache);
    4346            found = true;
     
    4649        }
    4750        if (!found)
     51          Logger.Debug("Found NOT found " + info.Name + ", " + info.Version);
    4852          missingPlugins.Add(info);
    4953        found = false;
    5054      }
    5155
     56      Logger.Debug("Requesting missing plugins");
    5257      List<CachedHivePluginInfoDto> receivedPlugins = WcfService.Instance.RequestPlugins(missingPlugins);
     58      Logger.Debug("Requested missing plugins");
     59
    5360      if (receivedPlugins != null) {
    5461        neededPlugins.AddRange(receivedPlugins);
    5562        pluginCache.AddRange(receivedPlugins);
    5663      } else
    57         Logging.Instance.Error(this.ToString(), "Fetching of the plugins failed!");
     64        Logger.Error("Fetching of the plugins failed!");
    5865
    5966      return neededPlugins;
  • trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Properties/Settings.Designer.cs

    r944 r3578  
    22// <auto-generated>
    33//     This code was generated by a tool.
    4 //     Runtime Version:2.0.50727.3053
     4//     Runtime Version:2.0.50727.4927
    55//
    66//     Changes to this file may cause incorrect behavior and will be lost if
  • trunk/sources/HeuristicLab.Hive.Contracts/3.2/ApplicationConstants.cs

    r3203 r3578  
    2424using System.Linq;
    2525using System.Text;
     26using System.Data;
    2627
    2728namespace HeuristicLab.Hive.Contracts {
    2829  public class ApplicationConstants {
    2930
     31    public static System.Data.IsolationLevel ISOLATION_LEVEL = IsolationLevel.ReadCommitted;
     32
     33    public static System.Transactions.IsolationLevel ISOLATION_LEVEL_SCOPE =
     34      System.Transactions.IsolationLevel.ReadCommitted;
    3035    public static int HEARTBEAT_MAX_DIF = 120; // value in seconds
    3136    public static int JOB_TIME_TO_LIVE = 5;
  • trunk/sources/HeuristicLab.Hive.Contracts/3.2/BusinessObjects/JobDto.cs

    r3018 r3578  
    4848    public DateTime? DateCalculated { get; set; }
    4949    [DataMember]
     50    public DateTime? DateFinished { get; set; }
     51    [DataMember]
    5052    public int Priority { get; set; }
    5153    [DataMember]
  • trunk/sources/HeuristicLab.Hive.Contracts/3.2/HeuristicLab.Hive.Contracts-3.2.csproj

    r3203 r3578  
    7676      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    7777    </Reference>
     78    <Reference Include="System.Transactions" />
    7879    <Reference Include="System.Xml.Linq">
    7980      <RequiredTargetFramework>3.5</RequiredTargetFramework>
  • trunk/sources/HeuristicLab.Hive.Contracts/3.2/Interfaces/IJobManager.cs

    r3220 r3578  
    3434  public interface IJobManager {
    3535    [OperationContract]
     36    ResponseList<JobDto> GetAllJobsWithFilter(State jobState, int offset, int count);
     37    [OperationContract]
    3638    ResponseList<JobDto> GetAllJobs();
    3739    [OperationContract]
    3840    ResponseObject<JobDto> GetJobById(Guid jobId);
     41    [OperationContract]
     42    ResponseObject<JobDto> GetJobByIdWithDetails(Guid jobId);
    3943    [OperationContract]
    4044    ResponseObject<JobDto> AddNewJob(SerializedJob job);
     
    6266    ResponseList<JobDto> GetJobsByProject(Guid projectId);
    6367    [OperationContract]
    64     ResponseObject<JobDto> AddJobWithGroupStrings(SerializedJob job, IEnumerable<string> resources);
     68    ResponseObject<JobDto> AddJobWithGroupStrings(SerializedJob job, IEnumerable<string> resources);   
    6569  }
    6670}
  • trunk/sources/HeuristicLab.Hive.Engine/3.2/HiveEngine.cs

    r3220 r3578  
    135135          Thread.Sleep(RESULT_POLLING_INTERVAL_MS);
    136136          lock (locker) {
    137             HiveLogger.Debug("HiveEngine: Results-polling - GetLastResult");
     137            Logger.Debug("HiveEngine: Results-polling - GetLastResult");
    138138            response = executionEngineFacade.GetLastSerializedResult(jobId, false);
    139             HiveLogger.Debug("HiveEngine: Results-polling - Server: " + response.StatusMessage + " success: " + response.Success);
     139            Logger.Debug("HiveEngine: Results-polling - Server: " + response.StatusMessage + " success: " + response.Success);
    140140            // loop while
    141141            // 1. the user doesn't request an abort
     
    145145            if (abortRequested) return;
    146146            if (response.Success && response.Obj != null) {
    147               HiveLogger.Debug("HiveEngine: Results-polling - Got result!");
     147              Logger.Debug("HiveEngine: Results-polling - Got result!");
    148148              restoredJob = (Job)PersistenceManager.RestoreFromGZip(response.Obj.SerializedJobData);
    149               HiveLogger.Debug("HiveEngine: Results-polling - IsSnapshotResult: " + (restoredJob.Progress<1.0));
     149              Logger.Debug("HiveEngine: Results-polling - IsSnapshotResult: " + (restoredJob.Progress < 1.0));
    150150            }
    151151          }
     
    157157        OnFinished();
    158158      });
    159       HiveLogger.Debug("HiveEngine: Starting results-polling thread");
     159      Logger.Debug("HiveEngine: Starting results-polling thread");
    160160      t.Start();
    161161    }
     
    166166      ResponseObject<SerializedJob> response;
    167167      lock (locker) {
    168         HiveLogger.Debug("HiveEngine: Abort - RequestSnapshot");
     168        Logger.Debug("HiveEngine: Abort - RequestSnapshot");
    169169        Response snapShotResponse = executionEngineFacade.RequestSnapshot(jobId);
    170170        if (snapShotResponse.StatusMessage == ApplicationConstants.RESPONSE_JOB_IS_NOT_BEEING_CALCULATED) {
    171171          // job is finished already
    172           HiveLogger.Debug("HiveEngine: Abort - GetLastResult(false)");
     172          Logger.Debug("HiveEngine: Abort - GetLastResult(false)");
    173173          response = executionEngineFacade.GetLastSerializedResult(jobId, false);
    174           HiveLogger.Debug("HiveEngine: Abort - Server: " + response.StatusMessage + " success: " + response.Success);
     174          Logger.Debug("HiveEngine: Abort - Server: " + response.StatusMessage + " success: " + response.Success);
    175175        } else {
    176176          // server sent snapshot request to client
     
    178178          do {
    179179            Thread.Sleep(SNAPSHOT_POLLING_INTERVAL_MS);
    180             HiveLogger.Debug("HiveEngine: Abort - GetLastResult(true)");
     180            Logger.Debug("HiveEngine: Abort - GetLastResult(true)");
    181181            response = executionEngineFacade.GetLastSerializedResult(jobId, true);
    182             HiveLogger.Debug("HiveEngine: Abort - Server: " + response.StatusMessage + " success: " + response.Success);
     182            Logger.Debug("HiveEngine: Abort - Server: " + response.StatusMessage + " success: " + response.Success);
    183183            retryCount++;
    184184            // loop while
     
    194194      SerializedJob jobResult = response.Obj;
    195195      if (jobResult != null) {
    196         HiveLogger.Debug("HiveEngine: Results-polling - Got result!");
     196        Logger.Debug("HiveEngine: Results-polling - Got result!");
    197197        job = (Job)PersistenceManager.RestoreFromGZip(jobResult.SerializedJobData);
    198198        ControlManager.Manager.ShowControl(job.Engine.CreateView());
  • trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.Designer.cs

    r3022 r3578  
    5555      this.chContent = new System.Windows.Forms.ColumnHeader();
    5656      this.chDetails = new System.Windows.Forms.ColumnHeader();
    57       this.lvSnapshots = new System.Windows.Forms.ListView();
    58       this.chClientCalculated = new System.Windows.Forms.ColumnHeader();
    59       this.chProgress = new System.Windows.Forms.ColumnHeader();
    60       this.chSnapshotTime = new System.Windows.Forms.ColumnHeader();
    6157      this.lblProgress = new System.Windows.Forms.Label();
    6258      this.lblStatus = new System.Windows.Forms.Label();
     
    8581      this.menuItemAddGroup = new System.Windows.Forms.ToolStripMenuItem();
    8682      this.menuItemDeleteGroup = new System.Windows.Forms.ToolStripMenuItem();
     83      this.menuItemOpenCalendar = new System.Windows.Forms.ToolStripMenuItem();
    8784      this.lvClientControl = new System.Windows.Forms.ListView();
    8885      this.tcManagementConsole = new System.Windows.Forms.TabControl();
    8986      this.checkBox1 = new System.Windows.Forms.CheckBox();
    90       this.menuItemOpenCalendar = new System.Windows.Forms.ToolStripMenuItem();
    9187      this.menuStrip1.SuspendLayout();
    9288      this.plClientDetails.SuspendLayout();
     
    350346      this.plJobDetails.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
    351347      this.plJobDetails.Controls.Add(this.lvJobDetails);
    352       this.plJobDetails.Controls.Add(this.lvSnapshots);
    353348      this.plJobDetails.Controls.Add(this.lblProgress);
    354349      this.plJobDetails.Controls.Add(this.lblStatus);
     
    372367      this.lvJobDetails.Location = new System.Drawing.Point(17, 124);
    373368      this.lvJobDetails.Name = "lvJobDetails";
    374       this.lvJobDetails.Size = new System.Drawing.Size(382, 175);
     369      this.lvJobDetails.Size = new System.Drawing.Size(382, 243);
    375370      this.lvJobDetails.TabIndex = 17;
    376371      this.lvJobDetails.UseCompatibleStateImageBehavior = false;
     
    386381      this.chDetails.Text = "Details";
    387382      this.chDetails.Width = 255;
    388       //
    389       // lvSnapshots
    390       //
    391       this.lvSnapshots.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
    392             this.chClientCalculated,
    393             this.chProgress,
    394             this.chSnapshotTime});
    395       this.lvSnapshots.Enabled = false;
    396       this.lvSnapshots.FullRowSelect = true;
    397       this.lvSnapshots.GridLines = true;
    398       this.lvSnapshots.Location = new System.Drawing.Point(17, 310);
    399       this.lvSnapshots.Name = "lvSnapshots";
    400       this.lvSnapshots.Size = new System.Drawing.Size(382, 69);
    401       this.lvSnapshots.TabIndex = 16;
    402       this.lvSnapshots.UseCompatibleStateImageBehavior = false;
    403       this.lvSnapshots.View = System.Windows.Forms.View.Details;
    404       //
    405       // chClientCalculated
    406       //
    407       this.chClientCalculated.Text = "Client Calculated";
    408       this.chClientCalculated.Width = 112;
    409       //
    410       // chProgress
    411       //
    412       this.chProgress.Text = "Progress";
    413       this.chProgress.Width = 100;
    414       //
    415       // chSnapshotTime
    416       //
    417       this.chSnapshotTime.Text = "Snapshot request";
    418       this.chSnapshotTime.Width = 166;
    419383      //
    420384      // lblProgress
     
    657621            this.menuItemOpenCalendar});
    658622      this.contextMenuGroup.Name = "contextMenuJob";
    659       this.contextMenuGroup.Size = new System.Drawing.Size(154, 92);
     623      this.contextMenuGroup.Size = new System.Drawing.Size(154, 70);
    660624      //
    661625      // menuItemAddGroup
     
    670634      this.menuItemDeleteGroup.Size = new System.Drawing.Size(153, 22);
    671635      this.menuItemDeleteGroup.Text = "Delete Group";
     636      //
     637      // menuItemOpenCalendar
     638      //
     639      this.menuItemOpenCalendar.Name = "menuItemOpenCalendar";
     640      this.menuItemOpenCalendar.Size = new System.Drawing.Size(153, 22);
     641      this.menuItemOpenCalendar.Text = "Open Calendar";
    672642      //
    673643      // lvClientControl
     
    705675      this.checkBox1.Text = "checkBox1";
    706676      this.checkBox1.UseVisualStyleBackColor = true;
    707       //
    708       // menuItemOpenCalendar
    709       //
    710       this.menuItemOpenCalendar.Name = "menuItemOpenCalendar";
    711       this.menuItemOpenCalendar.Size = new System.Drawing.Size(153, 22);
    712       this.menuItemOpenCalendar.Text = "Open Calendar";
    713677      //
    714678      // HiveServerManagementConsole
     
    782746    private System.Windows.Forms.Label lblStatus;
    783747    private System.Windows.Forms.Label lblProgress;
    784     private System.Windows.Forms.ListView lvSnapshots;
    785     private System.Windows.Forms.ColumnHeader chClientCalculated;
    786     private System.Windows.Forms.ColumnHeader chProgress;
    787748    private System.Windows.Forms.Label lblStateClient;
    788749    private System.Windows.Forms.Label lblState;
     
    796757    private System.Windows.Forms.ListView lvJobControl;
    797758    private System.Windows.Forms.CheckBox checkBox1;
    798     private System.Windows.Forms.ColumnHeader chSnapshotTime;
    799759    private System.Windows.Forms.ContextMenuStrip contextMenuJob;
    800760    private System.Windows.Forms.ToolStripMenuItem menuItemAbortJob;
  • trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.cs

    r3220 r3578  
    242242        CloneList(jobsOld, out jobsOldHelp);
    243243
    244         GetDelta(jobsOld.List, jobsOldHelp);
     244        if(jobsOld != null && jobsOld.List != null && jobsOldHelp != null)
     245          GetDelta(jobsOld.List, jobsOldHelp);
    245246
    246247      }
     
    419420      lvJobDetails.Items.Clear();
    420421
    421       lvSnapshots.Enabled = true;
    422 
    423       if (currentJob.State == State.offline) {
     422      ResponseObject<JobDto> response = ServiceLocator.GetJobManager().GetJobByIdWithDetails(currentJob.Id);
     423
     424      if(response.Success == false || response.Obj == null)
     425        return;
     426
     427      JobDto job = response.Obj;
     428
     429      //lvSnapshots.Enabled = true;
     430
     431      if (job.State == State.offline) {
    424432        pbJobControl.Image = ilLargeImgJob.Images[2];
    425       } else if (currentJob.State == State.calculating) {
     433      } else if (job.State == State.calculating) {
    426434        pbJobControl.Image = ilLargeImgJob.Images[1];
    427       } else if (currentJob.State == State.finished) {
     435      } else if (job.State == State.finished) {
    428436        pbJobControl.Image = ilLargeImgJob.Images[0];
    429437      }
    430438
    431       lblJobName.Text = currentJob.Id.ToString();
    432       if (currentJob.Percentage != null) {
     439      lblJobName.Text = job.Id.ToString();
     440      if (job.Percentage != null) {
    433441        progressJob.Value = (int) (currentJob.Percentage*100);
    434442        lblProgress.Text = (int) (currentJob.Percentage*100) + "% calculated";
     
    437445      ListViewItem lvi = new ListViewItem();
    438446      lvi.Text = "User:";
    439       lvi.SubItems.Add(currentJob.UserId.ToString());
     447      lvi.SubItems.Add(job.UserId.ToString());
    440448      lvJobDetails.Items.Add(lvi);
    441449
     
    443451      lvi = new ListViewItem();
    444452      lvi.Text = "created at:";
    445       lvi.SubItems.Add(currentJob.DateCreated.ToString());
     453      lvi.SubItems.Add(job.DateCreated.ToString());
    446454      lvJobDetails.Items.Add(lvi);
    447455
    448       if (currentJob.ParentJob != null) {
     456      if (job.ParentJob != null) {
    449457        lvi = null;
    450458        lvi = new ListViewItem();
    451459        lvi.Text = "Parent job:";
    452         lvi.SubItems.Add(currentJob.ParentJob.ToString());
     460        lvi.SubItems.Add(job.ParentJob.ToString());
    453461        lvJobDetails.Items.Add(lvi);
    454462      }
     
    457465      lvi = new ListViewItem();
    458466      lvi.Text = "Priority:";
    459       lvi.SubItems.Add(currentJob.Priority.ToString());
     467      lvi.SubItems.Add(job.Priority.ToString());
    460468      lvJobDetails.Items.Add(lvi);
    461469
    462       if (currentJob.Project != null) {
     470      if (job.Project != null) {
    463471        lvi = null;
    464472        lvi = new ListViewItem();
    465473        lvi.Text = "Project:";
    466         lvi.SubItems.Add(currentJob.Project.Name.ToString());
     474        lvi.SubItems.Add(job.Project.Name.ToString());
    467475        lvJobDetails.Items.Add(lvi);
    468476      }
    469477
    470       if (currentJob.Client != null) {
     478      if (job.Client != null) {
    471479        lvi = null;
    472480        lvi = new ListViewItem();
    473481        lvi.Text = "Calculation begin:";
    474         lvi.SubItems.Add(currentJob.DateCalculated.ToString());
     482        lvi.SubItems.Add(job.DateCalculated.ToString());
    475483        lvJobDetails.Items.Add(lvi);
    476484
     
    479487        lvi = new ListViewItem();
    480488        lvi.Text = "Client calculated:";
    481         lvi.SubItems.Add(currentJob.Client.Name.ToString());
     489        lvi.SubItems.Add(job.Client.Name.ToString());
    482490        lvJobDetails.Items.Add(lvi);
    483491
    484         if (currentJob.State == State.finished) {
    485           IJobManager jobManager =
    486             ServiceLocator.GetJobManager();
    487           ResponseObject<JobResult> jobRes = null;
    488           //Todo: jobManager.GetLastJobResultOf(currentJob.Id);
    489 
    490           if (jobRes != null && jobRes.Obj != null) {
    491             lvi = null;
     492        if (job.State == State.finished) {
     493          lvi = null;
    492494            lvi = new ListViewItem();
    493495            lvi.Text = "Calculation ended:";
    494             lvi.SubItems.Add(jobRes.Obj.DateFinished.ToString());
     496            lvi.SubItems.Add(job.DateFinished.ToString());
    495497            lvJobDetails.Items.Add(lvi);
    496498          }
    497499        }
    498       }
    499       if (currentJob.State != State.offline) {
    500         lvSnapshots.Items.Clear();
    501         GetSnapshotList();
    502       } else {
    503         lvSnapshots.Visible = false;
    504       }
    505     }
     500      }
    506501
    507502    /// <summary>
     
    776771    private void CloneList(ResponseList<JobDto> oldList, out IDictionary<int, JobDto> newList) {
    777772      newList = new Dictionary<int, JobDto>();
    778       for (int i = 0; i < oldList.List.Count; i++) {
    779         newList.Add(i, oldList.List[i]);
     773      if (oldList != null && oldList.List != null) {
     774        for (int i = 0; i < oldList.List.Count; i++) {
     775          newList.Add(i, oldList.List[i]);
     776        }
    780777      }
    781778    }
    782779
    783780    private bool IsEqual(ClientDto ci1, ClientDto ci2) {
     781      if (ci1 == null && ci2 == null) {
     782        return true;
     783      }
    784784      if (ci2 == null) {
    785785        return false;
     
    849849    }
    850850
    851     private void GetSnapshotList() {
    852 
    853       lvSnapshots.Items.Clear();
    854       IJobManager jobManager = ServiceLocator.GetJobManager();
    855 
    856       ResponseList<JobResult> jobRes = jobManager.GetAllJobResults(currentJob.Id);
    857 
    858       if (jobRes != null && jobRes.List != null) {
    859         foreach (JobResult jobresult in jobRes.List) {
    860           ListViewItem curSnapshot = new ListViewItem(jobresult.ClientId.ToString());
    861           double percentage = jobresult.Percentage * 100;
    862           curSnapshot.SubItems.Add(percentage.ToString() + " %");
    863           curSnapshot.SubItems.Add(jobresult.Timestamp.ToString());
    864           lvSnapshots.Items.Add(curSnapshot);
    865         }
    866       }
    867 
    868       if ((jobRes.List == null) || (jobRes.List.Count == 0)) {
    869         lvSnapshots.Visible = false;
    870       } else {
    871         lvSnapshots.Visible = true;
    872       }
    873 
    874     }
    875 
    876851    #endregion
    877852
  • trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.resx

    r3022 r3578  
    129129        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
    130130        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABo
    131         FwAAAk1TRnQBSQFMAgEBBAEAAQwBAAEMAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
     131        FwAAAk1TRnQBSQFMAgEBBAEAARQBAAEUAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
    132132        AwABgAMAAUADAAEBAQABCAYAASAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
    133133        AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
     
    239239        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
    240240        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAO
    241         DgAAAk1TRnQBSQFMAgEBAwEAAQwBAAEMAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
     241        DgAAAk1TRnQBSQFMAgEBAwEAARQBAAEUAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
    242242        AwABgAMAASADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
    243243        AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
     
    312312    <value>
    313313        iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
    314         YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAABcQgAA
    315         XEIB62nEUwAAA3hJREFUSEu1ls1PE2EQxj229ouPVNErgZOJicZDjR68mHg1JgYvxov/gIlHxARBoxGU
     314        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAABcQQAA
     315        XEEBRtDlPgAAA3hJREFUSEu1ls1PE2EQxj229ouPVNErgZOJicZDjR68mHg1JgYvxov/gIlHxARBoxGU
    316316        KlJUVJDypVIQKkXBpIootoC0tLS0pZEIiILfikAfZ5Zuu9sWaDQ2edLt7vvOrzPzzsxuALBBquIeRR7p
    317317        CKmQVJSmeC3vyUu0FzNOD3NIFhJYpU8VuGBXpiVeK+6L2sgRQQKAbm4hTZ/pVcA8ooN9Ug/H7GY4Z3PS
     
    342342        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
    343343        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABy
    344         DAAAAk1TRnQBSQFMAgEBBAEAAQwBAAEMAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
     344        DAAAAk1TRnQBSQFMAgEBBAEAARQBAAEUAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
    345345        AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
    346346        AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
     
    409409        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
    410410        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABq
    411         CQAAAk1TRnQBSQFMAgEBAwEAAQwBAAEMAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
     411        CQAAAk1TRnQBSQFMAgEBAwEAARQBAAEUAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
    412412        AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
    413413        AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
  • trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ClientCommunicator.cs

    r3222 r3578  
    9090    /// <param name="e"></param>
    9191    void lifecycleManager_OnServerHeartbeat(object sender, EventArgs e) {
    92       HiveLogger.Info(this.ToString() + ": Server Heartbeat ticked");
    93 
    94       using (TransactionScope scope = new TransactionScope()) {
     92      Logger.Debug("Server Heartbeat ticked");
     93
     94      using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE })) {
    9595
    9696        List<ClientDto> allClients = new List<ClientDto>(DaoLocator.ClientDao.FindAll());
     
    101101
    102102            if (!lastHeartbeats.ContainsKey(client.Id)) {
    103               HiveLogger.Info(this.ToString() + ": Client " + client.Id +
     103              Logger.Info("Client " + client.Id +
    104104                              " wasn't offline but hasn't sent heartbeats - setting offline");
    105105              client.State = State.offline;
    106106              DaoLocator.ClientDao.Update(client);
    107               HiveLogger.Info(this.ToString() + ": Client " + client.Id +
     107              Logger.Info("Client " + client.Id +
    108108                              " wasn't offline but hasn't sent heartbeats - Resetting all his jobs");
    109109              foreach (JobDto job in DaoLocator.JobDao.FindActiveJobsOfClient(client)) {
    110110                //maybe implementa n additional Watchdog? Till then, just set them offline..
    111                 DaoLocator.JobDao.SetJobOffline(job);               
    112                 //jobManager.ResetJobsDependingOnResults(job);
     111                DaoLocator.JobDao.SetJobOffline(job);                               
    113112              }
    114113            } else {
     
    119118              if (dif.TotalSeconds > ApplicationConstants.HEARTBEAT_MAX_DIF) {
    120119                // if client calculated jobs, the job must be reset
    121                 HiveLogger.Info(this.ToString() + ": Client timed out and is on RESET");
     120                Logger.Info("Client timed out and is on RESET");
    122121                foreach (JobDto job in DaoLocator.JobDao.FindActiveJobsOfClient(client)) {
    123122                  jobManager.ResetJobsDependingOnResults(job);
     
    127126                  }
    128127                }
    129 
     128                Logger.Debug("setting client offline");
    130129                // client must be set offline
    131130                client.State = State.offline;
     
    134133                DaoLocator.ClientDao.Update(client);
    135134
     135                Logger.Debug("removing it from the heartbeats list");
    136136                heartbeatLock.EnterWriteLock();
    137137                lastHeartbeats.Remove(client.Id);
     
    264264    /// <returns></returns>
    265265    public ResponseHB ProcessHeartBeat(HeartBeatData hbData) {
    266       HiveLogger.Debug(this.ToString() + ": BEGIN Processing Heartbeat for Client " + hbData.ClientId);
    267       HiveLogger.Debug(this.ToString() + ": BEGIN Fetching Adapters");
    268       HiveLogger.Debug(this.ToString() + ": END Fetched Adapters");
    269       HiveLogger.Debug(this.ToString() + ": BEGIN Starting Transaction");
    270 
    271       HiveLogger.Debug(this.ToString() + ": END Started Transaction");
     266      Logger.Debug("BEGIN Processing Heartbeat for Client " + hbData.ClientId);
    272267
    273268      ResponseHB response = new ResponseHB();
    274269      response.ActionRequest = new List<MessageContainer>();
    275270
    276       HiveLogger.Debug(this.ToString() + ": BEGIN Started Client Fetching");
     271      Logger.Debug("BEGIN Started Client Fetching");
    277272      ClientDto client = DaoLocator.ClientDao.FindById(hbData.ClientId);
    278       HiveLogger.Debug(this.ToString() + ": END Finished Client Fetching");
     273      Logger.Debug("END Finished Client Fetching");
    279274      // check if the client is logged in
    280275      if (client.State == State.offline || client.State == State.nullState) {
     
    283278        response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.NoMessage));
    284279
    285         HiveLogger.Error(this.ToString() + " ProcessHeartBeat: Client state null or offline: " + client);
     280        Logger.Error("ProcessHeartBeat: Client state null or offline: " + client);
    286281
    287282        return response;
     
    292287
    293288      // save timestamp of this heartbeat
    294       HiveLogger.Debug(this.ToString() + ": BEGIN Locking for Heartbeats");
     289      Logger.Debug("BEGIN Locking for Heartbeats");
    295290      heartbeatLock.EnterWriteLock();
    296       HiveLogger.Debug(this.ToString() + ": END Locked for Heartbeats");
     291      Logger.Debug("END Locked for Heartbeats");
    297292      if (lastHeartbeats.ContainsKey(hbData.ClientId)) {
    298293        lastHeartbeats[hbData.ClientId] = DateTime.Now;
     
    302297      heartbeatLock.ExitWriteLock();
    303298
    304       HiveLogger.Debug(this.ToString() + ": BEGIN Processing Heartbeat Jobs");
     299      Logger.Debug("BEGIN Processing Heartbeat Jobs");
    305300      processJobProcess(hbData, response);
    306       HiveLogger.Debug(this.ToString() + ": END Processed Heartbeat Jobs");
     301      Logger.Debug("END Processed Heartbeat Jobs");
    307302
    308303      //check if new Cal must be loaded
     
    314309        //client.CalendarSyncStatus = CalendarState.Fetching;
    315310       
    316         HiveLogger.Info(this.ToString() + " fetch or forcefetch sent");       
     311        Logger.Info("fetch or forcefetch sent");       
    317312      }
    318313
    319314      // check if client has a free core for a new job
    320315      // if true, ask scheduler for a new job for this client
    321       HiveLogger.Debug(this.ToString() + ": BEGIN Looking for Client Jobs");
     316      Logger.Debug(" BEGIN Looking for Client Jobs");
    322317      if (hbData.FreeCores > 0 && scheduler.ExistsJobForClient(hbData)) {
    323318        response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.FetchJob));
     
    325320        response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.NoMessage));
    326321      }
    327       HiveLogger.Debug(this.ToString() + ": END Looked for Client Jobs");
     322      Logger.Debug(" END Looked for Client Jobs");
    328323      response.Success = true;
    329324      response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_HEARTBEAT_RECEIVED;
     
    332327
    333328      //tx.Commit();
    334       HiveLogger.Debug(this.ToString() + ": END Processed Heartbeat for Client " + hbData.ClientId);
     329      Logger.Debug(" END Processed Heartbeat for Client " + hbData.ClientId);
    335330      return response;
    336331    }
     
    344339    /// <param name="response"></param>
    345340    private void processJobProcess(HeartBeatData hbData, ResponseHB response) {
    346       HiveLogger.Info(this.ToString() + " processJobProcess: Started for Client " + hbData.ClientId);
     341      Logger.Debug("Started for Client " + hbData.ClientId);
    347342      List<JobDto> jobsOfClient = new List<JobDto>(DaoLocator.JobDao.FindActiveJobsOfClient(DaoLocator.ClientDao.FindById(hbData.ClientId)));
    348343      if (hbData.JobProgress != null && hbData.JobProgress.Count > 0) {       
     
    350345          response.Success = false;
    351346          response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_IS_NOT_BEEING_CALCULATED;
    352           HiveLogger.Error(this.ToString() + " processJobProcess: There is no job calculated by this user " + hbData.ClientId);
     347          Logger.Error("There is no job calculated by this user " + hbData.ClientId);
    353348          return;
    354349        }
     
    360355            response.Success = false;
    361356            response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_IS_NOT_BEEING_CALCULATED;
    362             HiveLogger.Error(this.ToString() + " processJobProcess: There is no job calculated by this user " + hbData.ClientId + " Job: " + curJob);
     357            Logger.Error("There is no job calculated by this user " + hbData.ClientId + " Job: " + curJob);
    363358          } else if (curJob.State == State.abort) {
    364359            // a request to abort the job has been set
     
    392387            if (newAssignedJobs.ContainsKey(currJob.Id)) {
    393388              newAssignedJobs[currJob.Id]--;
    394               HiveLogger.Error(this.ToString() + " processJobProcess: Job TTL Reduced by one for job: " + currJob + "and is now: " + newAssignedJobs[currJob.Id] + ". User that sucks: " + currJob.Client);
     389              Logger.Error("Job TTL Reduced by one for job: " + currJob + "and is now: " + newAssignedJobs[currJob.Id] + ". User that sucks: " + currJob.Client);
    395390              if (newAssignedJobs[currJob.Id] <= 0) {
    396                 HiveLogger.Error(this.ToString() + " processJobProcess: Job TTL reached Zero, Job gets removed: " + currJob + " and set back to offline. User that sucks: " + currJob.Client);
     391                Logger.Error("Job TTL reached Zero, Job gets removed: " + currJob + " and set back to offline. User that sucks: " + currJob.Client);
    397392
    398393                currJob.State = State.offline;
     
    404399              }
    405400            } else {
    406               HiveLogger.Error(this.ToString() + " processJobProcess: Job ID wasn't with the heartbeats:  " + currJob);
     401              Logger.Error("Job ID wasn't with the heartbeats:  " + currJob);
    407402              currJob.State = State.offline;
    408403              DaoLocator.JobDao.Update(currJob);
     
    413408
    414409            if (newAssignedJobs.ContainsKey(currJob.Id)) {
    415               HiveLogger.Info(this.ToString() + " processJobProcess: Job is sending a heart beat, removing it from the newAssignedJobList: " + currJob);
     410              Logger.Info("Job is sending a heart beat, removing it from the newAssignedJobList: " + currJob);
    416411              newAssignedJobs.Remove(currJob.Id);
    417412            }
     
    427422    /// <param name="clientId"></param>
    428423    /// <returns></returns>
    429     /*public ResponseSerializedJob SendSerializedJob(Guid clientId) {
    430       ISession session = factory.GetSessionForCurrentThread();
    431       ITransaction tx = null;
    432 
    433       try {
    434         IJobAdapter jobAdapter =
    435           session.GetDataAdapter<JobDto, IJobAdapter>();
    436 
    437         tx = session.BeginTransaction();
    438 
    439         ResponseSerializedJob response = new ResponseSerializedJob();
    440 
    441         JobDto job2Calculate = scheduler.GetNextJobForClient(clientId);
    442         if (job2Calculate != null) {
    443           SerializedJob computableJob =
    444             jobAdapter.GetSerializedJob(job2Calculate.Id);
    445 
    446           response.Job = computableJob;
    447           response.Success = true;
    448           HiveLogger.Info(this.ToString() + " SendSerializedJob: Job pulled: " + computableJob.JobInfo + " for user " + clientId);                     
    449           response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_PULLED;
    450           lock (newAssignedJobs) {
    451             if (!newAssignedJobs.ContainsKey(job2Calculate.Id))
    452               newAssignedJobs.Add(job2Calculate.Id, ApplicationConstants.JOB_TIME_TO_LIVE);
    453           }
    454         } else {
    455           HiveLogger.Info(this.ToString() + " SendSerializedJob: No more Jobs left for " + clientId);                     
    456           response.Success = false;
    457           response.Job = null;
    458           response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT;
    459         }
    460 
    461         tx.Commit();
    462 
    463         return response;
    464       }
    465       catch (Exception ex) {
    466         if (tx != null)
    467           tx.Rollback();
    468         throw ex;
    469       }
    470       finally {
    471         if (session != null)
    472           session.EndSession();
    473       }
    474     }     */
    475 
    476     /// <summary>
    477     /// if the client was told to pull a job he calls this method
    478     /// the server selects a job and sends it to the client
    479     /// </summary>
    480     /// <param name="clientId"></param>
    481     /// <returns></returns>
    482424    public ResponseJob SendJob(Guid clientId) {
    483425
     
    487429      if (job2Calculate != null) {
    488430        response.Job = job2Calculate;
     431        response.Job.PluginsNeeded = DaoLocator.PluginInfoDao.GetPluginDependenciesForJob(response.Job);
    489432        response.Success = true;
    490         HiveLogger.Info(this.ToString() + " SendSerializedJob: Job pulled: " + job2Calculate + " for user " + clientId);
     433        Logger.Info("Job pulled: " + job2Calculate + " for user " + clientId);
    491434        response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_PULLED;
    492435        lock (newAssignedJobs) {
     
    494437            newAssignedJobs.Add(job2Calculate.Id, ApplicationConstants.JOB_TIME_TO_LIVE);
    495438        }
    496       } else {
     439      } else {                 
    497440        response.Success = false;
    498441        response.Job = null;
    499442        response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT;
    500         HiveLogger.Info(this.ToString() + " SendSerializedJob: No more Jobs left for " + clientId);
     443        Logger.Info("No more Jobs left for " + clientId);
    501444      }
    502445
     
    510453      bool finished) {
    511454
    512       HiveLogger.Info(this.ToString() + " ProcessJobResult: BEGIN Job received for Storage - main method:");
     455      Logger.Info("BEGIN Job received for Storage - main method:");
    513456
    514457
     
    547490        jobStream.Close();
    548491      }
    549       HiveLogger.Info(this.ToString() + " ProcessJobResult: END Job received for Storage:");
     492      Logger.Info("END Job received for Storage:");
    550493      return response;
    551494    }
     
    559502      bool finished) {
    560503
    561       HiveLogger.Info(this.ToString() + " ProcessJobResult: BEGIN Job received for Storage - SUB method: " + jobId);
     504      Logger.Info("BEGIN Job received for Storage - SUB method: " + jobId);
    562505
    563506      ResponseResultReceived response = new ResponseResultReceived();
     
    579522        response.JobId = jobId;
    580523
    581         HiveLogger.Error(this.ToString() + " ProcessJobResult: No job with Id " + jobId);
     524        Logger.Error("No job with Id " + jobId);
    582525
    583526        //tx.Rollback();
     
    588531        response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_WAS_ABORTED;
    589532
    590         HiveLogger.Error(this.ToString() + " ProcessJobResult: Job was aborted! " + job.JobInfo);
     533        Logger.Error("Job was aborted! " + job.JobInfo);
    591534
    592535        //tx.Rollback();
     
    598541        response.JobId = jobId;
    599542
    600         HiveLogger.Error(this.ToString() + " ProcessJobResult: Job is not being calculated (client = null)! " + job.JobInfo);
     543        Logger.Error("Job is not being calculated (client = null)! " + job.JobInfo);
    601544
    602545        //tx.Rollback();
     
    608551        response.JobId = jobId;
    609552
    610         HiveLogger.Error(this.ToString() + " ProcessJobResult: Wrong Client for this Job! " + job.JobInfo + ", Sending Client is: " + clientId);
     553        Logger.Error("Wrong Client for this Job! " + job.JobInfo + ", Sending Client is: " + clientId);
    611554
    612555        //tx.Rollback();
     
    618561        response.JobId = jobId;
    619562
    620         HiveLogger.Error(this.ToString() + " ProcessJobResult: Job already finished! " + job.JobInfo + ", Sending Client is: " + clientId);
     563        Logger.Error("Job already finished! " + job.JobInfo + ", Sending Client is: " + clientId);
    621564
    622565        //tx.Rollback();
    623566        return response;
    624567      }
     568      //Todo: RequestsnapshotSent => calculating?
    625569      if (job.JobInfo.State == State.requestSnapshotSent) {
    626570        job.JobInfo.State = State.calculating;
     
    632576        response.JobId = jobId;
    633577
    634         HiveLogger.Error(this.ToString() + " ProcessJobResult: Wrong Job State, job is: " + job.JobInfo);
     578        Logger.Error("Wrong Job State, job is: " + job.JobInfo);
    635579
    636580        //tx.Rollback();
     
    641585      if (finished) {
    642586        job.JobInfo.State = State.finished;
     587        job.JobInfo.DateFinished = DateTime.Now;
    643588      }
    644589
     
    652597      response.finished = finished;
    653598
    654       HiveLogger.Info(this.ToString() + " ProcessJobResult: END Job received for Storage - SUB method: " + jobId);
     599      Logger.Info("END Job received for Storage - SUB method: " + jobId);
    655600      return response;
    656601
     
    691636    public Response Logout(Guid clientId) {
    692637
    693       HiveLogger.Info("Client logged out " + clientId);
     638      Logger.Info("Client logged out " + clientId);
    694639     
    695640      Response response = new Response();
     
    736681        response.Success = false;
    737682        response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_DOESNT_EXIST;
    738         HiveLogger.Error(this.ToString() + " IsJobStillNeeded: Job doesn't exist (anymore)! " + jobId);
     683        Logger.Error("Job doesn't exist (anymore)! " + jobId);
    739684        return response;
    740685      }
     
    742687        response.Success = true;
    743688        response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_ALLREADY_FINISHED;
    744         HiveLogger.Error(this.ToString() + " IsJobStillNeeded: already finished! " + job);
     689        Logger.Error("already finished! " + job);
    745690        return response;
    746691      }
  • trunk/sources/HeuristicLab.Hive.Server.Core/3.2/HiveServerCorePlugin.cs

    r3012 r3578  
    3535  [PluginDependency("HeuristicLab.Hive.Server.LINQDataAccess-3.2")]
    3636  [PluginDependency("HeuristicLab.Security.Contracts-3.2")]
     37  [PluginDependency("HeuristicLab.Tracing", "3.2.0")]
    3738  public class HiveServerCorePlugin : PluginBase {
    3839  }
  • trunk/sources/HeuristicLab.Hive.Server.Core/3.2/JobManager.cs

    r3220 r3578  
    3535using System.Transactions;
    3636using HeuristicLab.Hive.Server.LINQDataAccess;
     37using IsolationLevel=System.Transactions.IsolationLevel;
    3738
    3839namespace HeuristicLab.Hive.Server.Core {
     
    5758
    5859    public void ResetJobsDependingOnResults(JobDto job) {
    59       HiveLogger.Info(this.ToString() + ": Setting job " + job.Id + " offline");
     60      Logger.Info("Setting job " + job.Id + " offline");
    6061      if (job != null) {
    6162        DaoLocator.JobDao.SetJobOffline(job);
     
    6566
    6667    void checkForDeadJobs() {
    67       HiveLogger.Info(this.ToString() + " Searching for dead Jobs");
    68       using (TransactionScope scope = new TransactionScope()) {
     68      Logger.Info("Searching for dead Jobs");
     69      using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE })) {
    6970        List<JobDto> allJobs = new List<JobDto>(DaoLocator.JobDao.FindAll());
    7071        foreach (JobDto curJob in allJobs) {
     
    9192    /// <returns></returns>
    9293    public ResponseList<JobDto> GetAllJobs() {
    93        /*ISession session = factory.GetSessionForCurrentThread();
    94 
    95        try {
    96          IJobAdapter jobAdapter =
    97              session.GetDataAdapter<JobDto, IJobAdapter>();*/
    98 
    9994         ResponseList<JobDto> response = new ResponseList<JobDto>();
    10095
     
    10499
    105100         return response;
    106        /*}
    107        finally {
    108          if (session != null)
    109            session.EndSession();
    110        } */
    111     }
     101    }
     102
     103    public ResponseList<JobDto> GetAllJobsWithFilter(State jobState, int offset, int count) {
     104      ResponseList<JobDto> response = new ResponseList<JobDto>();
     105      response.List = new List<JobDto>(DaoLocator.JobDao.FindWithLimitations(jobState, offset, count));
     106      return response;
     107    } 
    112108
    113109    /// <summary>
     
    126122    /// <returns></returns>
    127123    public ResponseObject<JobDto> GetJobById(Guid jobId) {
    128       /*ISession session = factory.GetSessionForCurrentThread();
    129 
    130       try {             
    131         IJobAdapter jobAdapter =
    132             session.GetDataAdapter<JobDto, IJobAdapter>();*/
    133 
    134124        ResponseObject<JobDto> response = new ResponseObject<JobDto>();
    135125
     
    145135        return response;
    146136      }
    147       /*finally {
    148         if (session != null)
    149           session.EndSession();
    150       }
    151     }   */
     137
     138    public ResponseObject<JobDto> GetJobByIdWithDetails(Guid jobId) {
     139      ResponseObject<JobDto> job = new ResponseObject<JobDto>();
     140      job.Obj = DaoLocator.JobDao.FindById(jobId);
     141      if (job.Obj != null) {
     142        job.Success = true;
     143        job.StatusMessage = ApplicationConstants.RESPONSE_JOB_GET_JOB_BY_ID;
     144
     145        job.Obj.Client = DaoLocator.ClientDao.GetClientForJob(jobId);
     146      } else {
     147        job.Success = false;
     148        job.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_DOESNT_EXIST;
     149      }     
     150      return job;
     151    }
    152152
    153153    public ResponseObject<JobDto> AddJobWithGroupStrings(SerializedJob job, IEnumerable<string> resources) {
     
    167167    /// <returns></returns>
    168168    public ResponseObject<JobDto> AddNewJob(SerializedJob job) {
    169       /*ISession session = factory.GetSessionForCurrentThread();
    170 
    171       try {
    172         IJobAdapter jobAdapter =
    173             session.GetDataAdapter<JobDto, IJobAdapter>();*/
    174 
    175169        ResponseObject<JobDto> response = new ResponseObject<JobDto>();
    176170
     
    218212    /// <returns></returns>
    219213    public Response RemoveJob(Guid jobId) {
    220       /*ISession session = factory.GetSessionForCurrentThread();
    221 
    222       try {
    223         IJobAdapter jobAdapter =
    224             session.GetDataAdapter<JobDto, IJobAdapter>();*/
    225 
    226214        Response response = new Response();
    227215
     
    238226        return response;
    239227      }
    240       /*finally {
    241         if (session != null)
    242           session.EndSession();
    243       }
    244     }   */
    245228
    246229    public ResponseObject<JobDto> GetLastJobResultOf(Guid jobId) {
     
    258241    public ResponseObject<SerializedJob>
    259242      GetLastSerializedJobResultOf(Guid jobId, bool requested) {
    260       /*ISession session = factory.GetSessionForCurrentThread();
    261 
    262       ITransaction tx = null;
    263 
    264       try {
    265         IJobAdapter jobAdapter =
    266             session.GetDataAdapter<JobDto, IJobAdapter>();
    267 
    268         IJobResultsAdapter jobResultsAdapter =
    269           session.GetDataAdapter<JobResult, IJobResultsAdapter>();
    270 
    271         tx = session.BeginTransaction();                          */
    272243
    273244        ResponseObject<SerializedJob> response =
     
    386357
    387358    public ResponseList<JobResult> GetAllJobResults(Guid jobId) {
    388      /* ISession session = factory.GetSessionForCurrentThread();
    389       ResponseList<JobResult> response = new ResponseList<JobResult>();
    390 
    391       try {
    392         IJobResultsAdapter jobResultAdapter =
    393             session.GetDataAdapter<JobResult, IJobResultsAdapter>();
    394         IJobAdapter jobAdapter = session.GetDataAdapter<JobDto, IJobAdapter>();
    395 
    396         JobDto job = jobAdapter.GetById(jobId);
    397         if (job == null) {
    398           response.Success = false;
    399           response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_DOESNT_EXIST;
    400           return response;
    401         }
    402         response.List = new List<JobResult>(jobResultAdapter.GetResultsOf(job.Id));
    403         response.Success = true;
    404         response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_RESULT_SENT;
    405 
    406         return response;
    407       }
    408       finally {
    409         if(session != null)
    410           session.EndSession();
    411       }  */
    412359      return new ResponseList<JobResult>();
    413360    }
    414361
    415362    public ResponseList<ProjectDto> GetAllProjects() {
    416       /*ISession session = factory.GetSessionForCurrentThread();
    417       ResponseList<ProjectDto> response = new ResponseList<ProjectDto>();
    418 
    419       try {
    420         IProjectAdapter projectAdapter =
    421           session.GetDataAdapter<ProjectDto, IProjectAdapter>();
    422 
    423         List<ProjectDto> allProjects = new List<ProjectDto>(projectAdapter.GetAll());
    424         response.List = allProjects;
    425         response.Success = true;
    426         return response;
    427       }
    428       finally {
    429         if (session != null)
    430           session.EndSession();
    431       } */
    432363      return null;
    433364    }
    434365
    435366    private Response createUpdateProject(ProjectDto project) {
    436       /*ISession session = factory.GetSessionForCurrentThread();
    437       Response response = new Response();
    438       ITransaction tx = null;
    439 
    440       try {
    441         IProjectAdapter projectAdapter =
    442           session.GetDataAdapter<ProjectDto, IProjectAdapter>();
    443 
    444         if (project.Name == null || project.Name == "") {
    445           response.Success = false;
    446           response.StatusMessage = ApplicationConstants.RESPONSE_JOB_PROJECT_NAME_EMPTY;
    447           return response;
    448         }
    449         tx = session.BeginTransaction();
    450         projectAdapter.Update(project);
    451 
    452         tx.Commit();
    453         response.Success = true;
    454         response.StatusMessage = ApplicationConstants.RESPONSE_JOB_PROJECT_ADDED;
    455       } catch (ConstraintException ce) {
    456         if (tx != null)
    457           tx.Rollback();
    458         response.Success = false;
    459         response.StatusMessage = ce.Message;
    460       }
    461       catch (Exception ex) {
    462         if (tx != null)
    463           tx.Rollback();
    464         throw ex;
    465       }
    466       finally {
    467         if (session != null)
    468           session.EndSession();
    469       }
    470       return response;    */
    471367      return null;
    472368    }
     
    481377
    482378    public Response DeleteProject(Guid projectId) {
    483       /*ISession session = factory.GetSessionForCurrentThread();
    484       Response response = new Response();
    485       ITransaction tx = null;
    486 
    487       try {
    488         IProjectAdapter projectAdapter =
    489           session.GetDataAdapter<ProjectDto, IProjectAdapter>();
    490 
    491         ProjectDto project = projectAdapter.GetById(projectId);
    492         if (project == null) {
    493           response.Success = false;
    494           response.StatusMessage = ApplicationConstants.RESPONSE_JOB_PROJECT_DOESNT_EXIST;
    495           return response;
    496         }
    497         projectAdapter.Delete(project);
    498         tx.Commit();
    499         response.Success = true;
    500         response.StatusMessage = ApplicationConstants.RESPONSE_JOB_PROJECT_DELETED;
    501       }
    502       catch (Exception e) {
    503         if (tx != null)
    504           tx.Rollback();
    505         response.Success = false;
    506         response.StatusMessage = e.Message;
    507       }
    508       finally {
    509         if (session != null)
    510           session.EndSession();
    511       }     
    512       return response; */
    513379      return null;
    514380    }
    515381
    516382    public ResponseList<JobDto> GetJobsByProject(Guid projectId) {
    517       /*ISession session = factory.GetSessionForCurrentThread();
    518       ResponseList<JobDto> response = new ResponseList<JobDto>();
    519 
    520       try {
    521         IJobAdapter jobAdapter =
    522           session.GetDataAdapter<JobDto, IJobAdapter>();
    523         List<JobDto> jobsByProject = new List<JobDto>(jobAdapter.GetJobsByProject(projectId));
    524         response.List = jobsByProject;
    525         response.Success = true;
    526       }
    527       finally {
    528         if (session != null)
    529           session.EndSession();
    530       }
    531        
    532       return response;*/
    533383      return null;     
    534384    }
    535 
    536385    #endregion
    537386  }
  • trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ServerConsoleFacade.cs

    r3220 r3578  
    9797    }
    9898
     99    public ResponseList<JobDto> GetAllJobsWithFilter(State jobState, int offset, int count) {
     100      secMan.Authorize("AccessJobs", sessionID, Guid.Empty);
     101      return jobManager.GetAllJobsWithFilter(jobState, offset, count);
     102    }
     103
    99104    public ResponseObject<JobDto> GetJobById(Guid jobId) {
    100105      secMan.Authorize("AccessJobs", sessionID, jobId);
    101106      return jobManager.GetJobById(jobId);
     107    }
     108
     109    public ResponseObject<JobDto> GetJobByIdWithDetails(Guid jobId) {
     110      secMan.Authorize("AccessJobs", sessionID, jobId);
     111      return jobManager.GetJobByIdWithDetails(jobId);
    102112    }
    103113
  • trunk/sources/HeuristicLab.Hive.Server.DataAccess/3.2/IJobDao.cs

    r3018 r3578  
    2121    IEnumerable<JobDto> FindFittingJobsForClient(State state, int freeCores, int freeMemory, Guid clientGuid);
    2222    Stream GetSerializedJobStream(Guid jobId);
     23
     24    IEnumerable<JobDto> FindWithLimitations(State jobState, int offset, int count);
    2325  }
    2426}
  • trunk/sources/HeuristicLab.Hive.Server.DataAccess/3.2/IPluginInfoDao.cs

    r3011 r3578  
    77  public interface IPluginInfoDao: IGenericDao<HivePluginInfoDto> {   
    88    void InsertPluginDependenciesForJob(JobDto jobDto);
     9    List<HivePluginInfoDto> GetPluginDependenciesForJob(JobDto jobDto);
    910  }
    1011}
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/BaseDao.cs

    r3011 r3578  
    33using System.Linq;
    44using System.Text;
     5using System.Data.Linq;
     6using HeuristicLab.Tracing;
    57
    68namespace HeuristicLab.Hive.Server.LINQDataAccess {
     
    1214    }
    1315
     16    protected void CommitChanges() {
     17      try {
     18        Context.SubmitChanges(ConflictMode.ContinueOnConflict);
     19      } catch (ChangeConflictException e) {
     20        Logger.Warn("Concurrency Exception! " + e.Message);
     21        foreach (ObjectChangeConflict conflict in Context.ChangeConflicts) {         
     22          conflict.Resolve(RefreshMode.KeepChanges);
     23        }
     24      }
     25    }
     26
    1427    public abstract TDatabaseEntity DtoToEntity(TBusiness source, TDatabaseEntity target);
    1528    public abstract TBusiness EntityToDto(TDatabaseEntity source, TBusiness target);
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/ClientConfigDao.cs

    r3011 r3578  
    2626      ClientConfig c = DtoToEntity(bObj, null);
    2727      Context.ClientConfigs.InsertOnSubmit(c);
    28       Context.SubmitChanges();
     28      CommitChanges();
    2929      bObj.Id = c.ClientConfigId;
    3030      return bObj; 
     
    3333    public void Delete(ClientConfigDto bObj) {
    3434      Context.ClientConfigs.DeleteOnSubmit(Context.ClientConfigs.SingleOrDefault(c => c.ClientConfigId.Equals(bObj.Id)));
    35       Context.SubmitChanges();
     35      CommitChanges();
    3636    }
    3737
     
    3939      ClientConfig cc = Context.ClientConfigs.SingleOrDefault(c => c.ClientConfigId.Equals(bObj.Id));
    4040      DtoToEntity(bObj, cc);
    41       Context.SubmitChanges();
     41      CommitChanges();
    4242    }
    4343
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/ClientDao.cs

    r3203 r3578  
    4343      dbclient.UseCalendarFromResourceId = clientGroupId;
    4444      dbclient.CalendarSyncStatus = Enum.GetName(typeof(CalendarState), CalendarState.Fetch);
    45       Context.SubmitChanges();
     45      CommitChanges();
    4646    }
    4747
     
    4949      Client c = DtoToEntity(info, null);     
    5050      Context.Clients.InsertOnSubmit(c);
    51       Context.SubmitChanges();
     51      CommitChanges();
    5252      info.Id = c.ResourceId;
    5353      return info;
     
    5858      Resource res = Context.Resources.SingleOrDefault(c => c.ResourceId.Equals(info.Id));           
    5959      Context.Resources.DeleteOnSubmit(res);
    60       Context.SubmitChanges();
     60      CommitChanges();
    6161    }
    6262
     
    6464      Client client = Context.Clients.SingleOrDefault(c => c.ResourceId.Equals(info.Id));
    6565      DtoToEntity(info, client);
    66       try {
    67         Console.WriteLine("Sending from thread: " + Thread.CurrentThread.ManagedThreadId);
    68         Context.SubmitChanges();
    69       } catch (System.Data.Linq.ChangeConflictException cce) {
    70         Console.WriteLine(cce);       
    71       }
     66      CommitChanges();     
    7267    }
    7368
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/ClientGroupDao.cs

    r3220 r3578  
    3131      ClientGroup cc = DtoToEntity(bObj, null);
    3232      Context.ClientGroups.InsertOnSubmit(cc);
    33       Context.SubmitChanges();
     33      CommitChanges();
    3434      bObj.Id = cc.ResourceId;
    3535      return bObj;
     
    4444
    4545      Context.Resources.DeleteOnSubmit(res);
    46       Context.SubmitChanges();
     46      CommitChanges();
    4747    }
    4848
     
    5050      ClientGroup client = Context.ClientGroups.SingleOrDefault(c => c.ResourceId.Equals(bObj.Id));
    5151      DtoToEntity(bObj, client);
    52       Context.SubmitChanges();
     52      CommitChanges();
    5353    }
    5454
     
    5757      Resource res = Context.Resources.SingleOrDefault(r => r.ResourceId.Equals(resource));
    5858      cg.ClientGroup_Resources.Add(new ClientGroup_Resource { ClientGroup = cg, Resource = res });     
    59       Context.SubmitChanges();
     59      CommitChanges();
    6060    }
    6161
     
    6565          cg => cg.ResourceId.Equals(resource) && cg.ClientGroupId.Equals(clientGroupId));
    6666      Context.ClientGroup_Resources.DeleteOnSubmit(cgr);
    67       Context.SubmitChanges();
     67      CommitChanges();
    6868    }
    6969
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/ContextFactory.cs

    r3220 r3578  
    99  public class ContextFactory {
    1010    [ThreadStatic]
    11     private static HiveDataContext _hiveDataContext;
     11    private static HiveDataContext _hiveDataContext = null;
    1212
    1313    [ThreadStatic]
    14     private static SqlTransaction _currentTransaction;
     14    private static SqlTransaction _currentTransaction = null;
    1515
    1616    public static HiveDataContext Context {
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/HeuristicLab.Hive.Server.LINQDataAccess-3.2.csproj

    r3220 r3578  
    134134      <Name>HeuristicLab.PluginInfrastructure</Name>
    135135    </ProjectReference>
     136    <ProjectReference Include="..\..\HeuristicLab.Tracing\3.2\HeuristicLab.Tracing-3.2.csproj">
     137      <Project>{EE2034D9-6E27-48A1-B855-42D45F69A4FC}</Project>
     138      <Name>HeuristicLab.Tracing-3.2</Name>
     139    </ProjectReference>
    136140  </ItemGroup>
    137141  <ItemGroup>
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/Hive.dbml

    r3203 r3578  
    8888      <Column Name="ResourceId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
    8989      <Column Name="Percentage" Type="System.Double" DbType="Float" CanBeNull="true" />
    90       <Column Name="SerializedJob" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX)" CanBeNull="true" UpdateCheck="Never" />
     90      <Column Name="SerializedJob" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX)" CanBeNull="true" UpdateCheck="Never" IsDelayLoaded="true" />
    9191      <Column Name="DateCreated" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
    9292      <Column Name="DateCalculated" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/Hive.designer.cs

    r3203 r3578  
    17741774    private System.Nullable<double> _Percentage;
    17751775   
    1776     private System.Data.Linq.Binary _SerializedJob;
     1776    private System.Data.Linq.Link<System.Data.Linq.Binary> _SerializedJob;
    17771777   
    17781778    private System.Nullable<System.DateTime> _DateCreated;
     
    19571957    }
    19581958   
    1959     [Column(Storage="_SerializedJob", DbType="VarBinary(MAX)", CanBeNull=true, UpdateCheck=UpdateCheck.Never)]
     1959    [Column(Storage="_SerializedJob", DbType="VarBinary(MAX)", UpdateCheck=UpdateCheck.Never)]
    19601960    public System.Data.Linq.Binary SerializedJob
    19611961    {
    19621962      get
    19631963      {
    1964         return this._SerializedJob;
    1965       }
    1966       set
    1967       {
    1968         if ((this._SerializedJob != value))
     1964        return this._SerializedJob.Value;
     1965      }
     1966      set
     1967      {
     1968        if ((this._SerializedJob.Value != value))
    19691969        {
    19701970          this.OnSerializedJobChanging(value);
    19711971          this.SendPropertyChanging();
    1972           this._SerializedJob = value;
     1972          this._SerializedJob.Value = value;
    19731973          this.SendPropertyChanged("SerializedJob");
    19741974          this.OnSerializedJobChanged();
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/JobDao.cs

    r3220 r3578  
    2525    }
    2626
     27    public IEnumerable<JobDto> FindWithLimitations(State jobState, int offset, int count) {
     28
     29      IQueryable<JobDto> query = null;
     30      if (jobState == State.finished) {
     31         query = from job in Context.Jobs
     32                 where job.JobState == Enum.GetName(typeof (State), jobState)
     33                 orderby job.DateFinished
     34                 select EntityToDto(job, null);
     35      } else if (jobState == State.calculating || jobState == State.requestSnapshot || jobState == State.requestSnapshotSent) {
     36        query = from job in Context.Jobs
     37                    where job.JobState == Enum.GetName(typeof(State), jobState)
     38                    orderby job.DateCalculated
     39                    select EntityToDto(job, null);
     40      } else {
     41        query = from job in Context.Jobs
     42                    where job.JobState == Enum.GetName(typeof(State), jobState)
     43                    orderby job.DateCreated
     44                    select EntityToDto(job, null);
     45      }
     46
     47      return query.Skip(offset).Take(count).ToList();
     48    }
     49
     50
    2751    public byte[] GetBinaryJobFile(Guid jobId) {
    2852      return (from job in Context.Jobs
     
    3458      Job j = DtoToEntity(bObj, null);
    3559      Context.Jobs.InsertOnSubmit(j);
    36       Context.SubmitChanges();
     60      CommitChanges();
    3761      bObj.Id = j.JobId;
    3862      return bObj;
     
    4569        j.AssignedResources.Add(new AssignedResource { ResourceId = assignRessourceId});
    4670      Context.Jobs.InsertOnSubmit(j);
    47       Context.SubmitChanges();
     71      CommitChanges();
    4872      job.JobInfo.Id = j.JobId;
    4973      return job;
     
    5478      Job job = Context.Jobs.SingleOrDefault(j => j.JobId.Equals(bObj.Id));
    5579      Context.Jobs.DeleteOnSubmit(job);
    56       Context.SubmitChanges();
     80      CommitChanges();
    5781    }
    5882
    5983    public void Update(JobDto bObj) {
    6084      Job job = Context.Jobs.SingleOrDefault(j => j.JobId.Equals(bObj.Id));
    61       DtoToEntity(bObj, job);
    62       try {
    63         Context.SubmitChanges();
    64       } catch (ChangeConflictException cfe) {
    65        
    66       }
     85      DtoToEntity(bObj, job);   
     86      CommitChanges();
    6787    }
    6888
     
    105125      c.Jobs.Add(j);
    106126      j.Client = c;
    107       Context.SubmitChanges();     
     127      CommitChanges();     
    108128    }
    109129
     
    112132      j.Client = null;
    113133      j.JobState = Enum.GetName(typeof(State), State.offline);
    114       Context.SubmitChanges();
     134      CommitChanges();
    115135    }
    116136
     
    137157      target.DateCalculated = source.DateCalculated;
    138158      target.DateCreated = source.DateCreated;
     159      target.DateFinished = source.DateFinished;
    139160      target.JobId = source.Id;
    140161
     
    162183      target.MemoryNeeded = source.MemoryNeeded;
    163184
    164 
    165 
    166185      target.DateCalculated = source.DateCalculated;
    167186      target.DateCreated = source.DateCreated;
     187      target.DateFinished = source.DateFinished;
    168188      target.Id = source.JobId;
    169      
    170          
     189       
    171190      target.Percentage = source.Percentage;
    172191     
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/LINQDataAccessPlugin.cs

    r3011 r3578  
    1111  [PluginDependency("HeuristicLab.Hive.Contracts-3.2")]
    1212  [PluginDependency("HeuristicLab.Hive.Server.DataAccess-3.2")]
     13  [PluginDependency("HeuristicLab.Tracing", "3.2.0")]
    1314  public class LINQDataAccessPlugin: PluginBase {
    1415  }
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/PluginInfoDao.cs

    r3011 r3578  
    2626      PluginInfo pi = DtoToEntity(bObj, null);
    2727      Context.PluginInfos.InsertOnSubmit(pi);
    28       Context.SubmitChanges();
     28      CommitChanges();
    2929      bObj.Id = pi.PluginId;
    3030      return bObj;
     
    3939      PluginInfo pi = Context.PluginInfos.SingleOrDefault(p => p.PluginId.Equals(bObj.Id));
    4040      DtoToEntity(bObj, pi);
    41       Context.SubmitChanges();
     41      CommitChanges();
    4242    }
    4343
     
    5353                                };
    5454          Context.PluginInfos.InsertOnSubmit(dbpi);
    55           Context.SubmitChanges();
     55          CommitChanges();
    5656        }
    5757
     
    6060        rq.PluginInfo = dbpi;
    6161        Context.RequiredPlugins.InsertOnSubmit(rq);
    62         Context.SubmitChanges();
     62        CommitChanges();
    6363      }
     64    }
     65
     66    public List<HivePluginInfoDto> GetPluginDependenciesForJob(JobDto jobDto) {
     67      return (from rp in Context.RequiredPlugins
     68              where rp.JobId.Equals(jobDto.Id)
     69              select EntityToDto(rp.PluginInfo, null)).ToList();
     70     
    6471    }
    6572
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/Properties/Settings.Designer.cs

    r2904 r3578  
    2727        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    2828        [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
    29         [global::System.Configuration.DefaultSettingValueAttribute("Data Source=SEMTEX-PC;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=" +
     29        [global::System.Configuration.DefaultSettingValueAttribute("Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=" +
    3030            "True")]
    3131        public string HeuristicLab_Hive_LinqConnectionString {
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/Properties/Settings.settings

    r2904 r3578  
    66      <DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
    77&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    8   &lt;ConnectionString&gt;Data Source=SEMTEX-PC;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=True&lt;/ConnectionString&gt;
     8  &lt;ConnectionString&gt;Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=True&lt;/ConnectionString&gt;
    99  &lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
    1010&lt;/SerializableConnectionString&gt;</DesignTimeValue>
    11       <Value Profile="(Default)">Data Source=SEMTEX-PC;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=True</Value>
     11      <Value Profile="(Default)">Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=True</Value>
    1212    </Setting>
    1313  </Settings>
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/UptimeCalendarDao.cs

    r3203 r3578  
    6060      UptimeCalendar uc = DtoToEntity(bObj, null);
    6161      Context.UptimeCalendars.InsertOnSubmit(uc);
    62       Context.SubmitChanges();
     62      CommitChanges();
    6363      bObj.Id = uc.UptimeCalendarId;
    6464      return bObj;
     
    6767    public void Delete(AppointmentDto bObj) {
    6868      Context.UptimeCalendars.DeleteOnSubmit(Context.UptimeCalendars.SingleOrDefault(uc => uc.UptimeCalendarId.Equals(bObj.Id)));
    69       Context.SubmitChanges();
     69      CommitChanges();
    7070    }
    7171
     
    7373      UptimeCalendar cc = Context.UptimeCalendars.SingleOrDefault(c => c.UptimeCalendarId.Equals(bObj.Id));
    7474      DtoToEntity(bObj, cc);
    75       Context.SubmitChanges();
     75      CommitChanges();
    7676    }
    7777
     
    9595      }
    9696
    97       Context.SubmitChanges();           
     97      CommitChanges();           
    9898    }   
    9999
     
    143143      }
    144144     
    145       Context.SubmitChanges();
     145      CommitChanges();
    146146
    147147      //Get all Subgroups
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/VarBinaryStream.cs

    r3220 r3578  
    77using System.Data.SqlClient;
    88using System.Data;
     9using HeuristicLab.Tracing;
    910
    1011namespace HeuristicLab.Hive.Server.LINQDataAccess {
     
    253254
    254255    public void Close() {
     256      Logger.Info("Closing Stream");
    255257      if (_transaction != null) {
    256258        _transaction.Commit();
    257259        _transaction = null;
     260        Logger.Info("Transaction commited and closed");
    258261      }
    259262
     
    262265        ContextFactory.Context.Dispose();
    263266        ContextFactory.Context = null;
     267        Logger.Info("Connection and Context disposed and set null");
    264268      }
    265269    }
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/app.config

    r2904 r3578  
    55    <connectionStrings>
    66        <add name="HeuristicLab.Hive.Server.LINQDataAccess.Properties.Settings.HeuristicLab_Hive_LinqConnectionString"
    7             connectionString="Data Source=SEMTEX-PC;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=True"
     7            connectionString="Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=True"
    88            providerName="System.Data.SqlClient" />
    99    </connectionStrings>
  • trunk/sources/HeuristicLab.Hive.Server/3.2/HeuristicLab.Hive.Server-3.2.csproj

    r3011 r3578  
    168168      <Name>HeuristicLab.PluginInfrastructure</Name>
    169169    </ProjectReference>
     170    <ProjectReference Include="..\..\HeuristicLab.Tracing\3.2\HeuristicLab.Tracing-3.2.csproj">
     171      <Project>{EE2034D9-6E27-48A1-B855-42D45F69A4FC}</Project>
     172      <Name>HeuristicLab.Tracing-3.2</Name>
     173    </ProjectReference>
    170174  </ItemGroup>
    171175  <ItemGroup>
  • trunk/sources/HeuristicLab.Hive.Server/3.2/HiveServerPlugin.cs

    r3011 r3578  
    3535  [PluginDependency("HeuristicLab.Hive.Server.LINQDataAccess-3.2")]
    3636  [PluginDependency("HeuristicLab.SpringNET", "1.3.0.0")]
     37  [PluginDependency("HeuristicLab.Tracing", "3.2.0")]
    3738  public class HiveServerPlugin : PluginBase {
    3839  }
  • trunk/sources/HeuristicLab.Hive.Server/3.2/ServiceCallInterception.cs

    r3220 r3578  
    77using HeuristicLab.Hive.Server.LINQDataAccess;
    88using System.Transactions;
     9using HeuristicLab.Hive.Contracts;
     10using HeuristicLab.Tracing;
    911
    1012namespace HeuristicLab.Hive.Server {
    1113  internal class ServiceCallInterception : IMethodInterceptor {
    1214
    13     private bool useTransactions = false;
     15    private const bool UseTransactions = true;
    1416
    1517    public object Invoke(IMethodInvocation invocation) {
    16       Console.WriteLine(DateTime.Now + " - " + Thread.CurrentThread.ManagedThreadId + " - Entering Method " +
    17                         invocation.Method.Name);
     18      Logger.Info("Entering Method: " + invocation.Method.Name);
    1819
    1920      if(ContextFactory.Context != null) {
    20         Console.WriteLine("Error - Not null context found - why wasn't this disposed?");
     21        Logger.Info("Not null context found - why wasn't this disposed?");
     22        try {
     23          Logger.Info("Trying to dispose");
     24          ContextFactory.Context.Dispose();
     25        } catch (Exception e) {
     26          Logger.Error(e);
     27        }
    2128        ContextFactory.Context = null;
    2229      }
     
    2633      if (invocation.Method.Name.Equals("SendStreamedJob") || invocation.Method.Name.Equals("StoreFinishedJobResultStreamed")) {       
    2734        ContextFactory.Context.Connection.Open();
    28         if(useTransactions)
    29           ContextFactory.Context.Transaction = ContextFactory.Context.Connection.BeginTransaction();
     35        if(UseTransactions) {
     36          Logger.Debug("Opening Transaction");
     37          ContextFactory.Context.Transaction = ContextFactory.Context.Connection.BeginTransaction(ApplicationConstants.ISOLATION_LEVEL);
     38        } else {
     39          Logger.Debug("Not using a Transaction");
     40        }
    3041        try {
    3142          obj = invocation.Proceed();
    32           Console.WriteLine("leaving context open for Streaming");
     43          Logger.Info("leaving context open for streaming");
    3344        }
    34         catch (Exception e) {         
    35           Console.WriteLine(e);
     45        catch (Exception e) {
     46          Logger.Error("Exception occured during method invocation", e);             
    3647          ContextFactory.Context.Dispose();
    3748          ContextFactory.Context = null;
    3849        }       
    3950      } else {
    40         if(useTransactions) {
    41           using (TransactionScope scope = new TransactionScope()) {
     51        if(UseTransactions) {
     52          using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE })) {
    4253            try {
     54              Logger.Debug("Current Transaction Isolation level is: " + Transaction.Current.IsolationLevel);
    4355              obj = invocation.Proceed();
    4456              scope.Complete();
    4557            }
    4658            catch (Exception e) {
    47               Console.WriteLine("Exception Occured");
    48               Console.WriteLine(e);
     59              Logger.Error("Exception occured during method invocation", e);             
    4960            }
    5061            finally {
    5162              ContextFactory.Context.Dispose();
    52               Console.WriteLine("setting old context null");
     63              Logger.Debug("Disposed Context");
    5364              ContextFactory.Context = null;
    54               Console.WriteLine("Disposing old Context");
     65              Logger.Debug("Set Context Null");
    5566            }
    5667          }
     
    6071          }
    6172          catch (Exception e) {
    62             Console.WriteLine("Exception Occured");
    63             Console.WriteLine(e);
     73            Logger.Error("Exception occured during method invocation", e);                         
    6474          }
    6575          finally {
    6676            ContextFactory.Context.Dispose();
    67             Console.WriteLine("setting old context null");
     77            Logger.Debug("Disposed Context");
    6878            ContextFactory.Context = null;
    69             Console.WriteLine("Disposing old Context");
     79            Logger.Debug("Set Context Null");
    7080          } 
    7181        }
    7282      }
    73       Console.WriteLine(DateTime.Now + " - " + Thread.CurrentThread.ManagedThreadId + " - Leaving Method " +
    74                           invocation.Method.Name);
     83      Logger.Info("Leaving Method: " + invocation.Method.Name);
    7584
    7685      return obj;
  • trunk/sources/HeuristicLab.PluginInfrastructure/Sandboxing/SandboxManager.cs

    r3247 r3578  
    9494      applicationManager.PrepareApplicationDomain(apps, plugins);
    9595      //if (files != null && files.Count() > 0)
    96       //applicationManager.LoadAssemblies(files);
     96        //applicationManager.LoadAssemblies(files);
    9797      return applicationDomain;
    9898    }
  • trunk/sources/HeuristicLab.Security.Core/3.2/Properties/Settings.Designer.cs

    r2846 r3578  
    2626        [global::System.Configuration.ApplicationScopedSettingAttribute()]
    2727        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    28         [global::System.Configuration.DefaultSettingValueAttribute("Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Security;Persist Security Info" +
    29             "=True;User ID=hive;Password=hive;Pooling=true;MultipleActiveResultSets=true")]
     28        [global::System.Configuration.DefaultSettingValueAttribute("Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Security;Integrated Security=T" +
     29            "rue;Pooling=true;MultipleActiveResultSets=true")]
    3030        public string SecurityServerConnectionString {
    3131            get {
  • trunk/sources/HeuristicLab.Security.Core/3.2/Properties/Settings.settings

    r2846 r3578  
    44  <Settings>
    55    <Setting Name="SecurityServerConnectionString" Type="System.String" Scope="Application">
    6       <Value Profile="(Default)">Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Security;Persist Security Info=True;User ID=hive;Password=hive;Pooling=true;MultipleActiveResultSets=true</Value>
     6      <Value Profile="(Default)">Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Security;Integrated Security=True;Pooling=true;MultipleActiveResultSets=true</Value>
    77    </Setting>
    88  </Settings>
  • trunk/sources/HeuristicLab.Security.Core/3.2/app.config

    r2846 r3578  
    1010        <HeuristicLab.Security.Core.Properties.Settings>
    1111            <setting name="SecurityServerConnectionString" serializeAs="String">
    12                 <value>Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Security;Persist Security Info=True;User ID=hive;Password=hive;Pooling=true;MultipleActiveResultSets=true</value>
     12                <value>Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Security;Integrated Security=True;Pooling=true;MultipleActiveResultSets=true</value>
    1313            </setting>
    1414        </HeuristicLab.Security.Core.Properties.Settings>
  • trunk/sources/HeuristicLab.Tracing/3.2/HeuristicLab.Hive.log4net.xml

    r2610 r3578  
    99    <staticLogFileName value="true" />
    1010    <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
    11     <layout type="log4net.Layout.PatternLayout">
    12       <conversionPattern value="%-4timestamp %-5level% =>   %message%newline%exception" />
     11    <layout type="HeuristicLab.Tracing.MethodCallPatternLayout, HeuristicLab.Tracing-3.2">
     12      <conversionPattern value="%date{yyyy-MM-dd HH:mm:ss.ffff} %-4timestamp %-5level %logger.%RM - %message%newline%exception" />
     13    </layout>
     14  </appender>
     15
     16  <appender name="ServerRollingFileAppender" type="log4net.Appender.RollingFileAppender">
     17    <file value="Hive.Server.log" />
     18    <appendToFile value="true" />
     19    <rollingStyle value="Size" />
     20    <maxSizeRollBackups value="10" />
     21    <maximumFileSize value="1000KB" />
     22    <staticLogFileName value="true" />
     23    <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
     24    <layout type="HeuristicLab.Tracing.MethodCallPatternLayout, HeuristicLab.Tracing-3.2">
     25      <conversionPattern value="%date{yyyy-MM-dd HH:mm:ss.ffff} %-4timestamp %-5level %logger.%RM - %message%newline%exception" />
     26    </layout>
     27  </appender>
     28
     29  <appender name="ClientRollingFileAppender" type="log4net.Appender.RollingFileAppender">
     30    <file value="Hive.Client.log" />
     31    <appendToFile value="true" />
     32    <rollingStyle value="Size" />
     33    <maxSizeRollBackups value="10" />
     34    <maximumFileSize value="1000KB" />
     35    <staticLogFileName value="true" />
     36    <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
     37    <layout type="HeuristicLab.Tracing.MethodCallPatternLayout, HeuristicLab.Tracing-3.2">
     38      <conversionPattern value="%date{yyyy-MM-dd HH:mm:ss.ffff} %-4timestamp %-5level %logger.%RM - %message%newline%exception" />
    1339    </layout>
    1440  </appender>
     
    1844    <lossy value="true" />
    1945    <evaluator type="log4net.Core.LevelEvaluator">
    20         <threshold value="INFO"/>
     46        <threshold value="DEBUG"/>
    2147    </evaluator>
    2248    <appender-ref ref="RollingFileAppender" />
     
    2753    <appender-ref ref="BufferingForwardingAppender" />
    2854  </root>
     55
     56  <logger name="HeuristicLab.Hive.Server">
     57    <level value="DEBUG" />
     58    <appender-ref ref="ServerRollingFileAppender" />   
     59  </logger>
     60
     61  <logger name="HeuristicLab.Hive.Client">
     62    <level value="DEBUG" />
     63    <appender-ref ref="ClientRollingFileAppender" /> 
     64  </logger>
    2965 
    3066</log4net>
Note: See TracChangeset for help on using the changeset viewer.