Changeset 4137
- Timestamp:
- 08/03/10 13:42:10 (14 years ago)
- Location:
- branches/3.3-HiveMigration/sources/HeuristicLab.Hive
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Console/3.3/HiveClientConsole.cs
r4107 r4137 109 109 110 110 private void InitLogFileReader() { 111 logFileReader = new LogFileReader( Environment.CurrentDirectory + @"/Hive.log");111 logFileReader = new LogFileReader(AppDomain.CurrentDomain.BaseDirectory + @"/Hive.Client.log"); 112 112 logFileReader.MoreData += new LogFileReader.MoreDataHandler(logFileReader_MoreData); 113 113 logFileReader.Start(); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ExecutionEngineFacade.cs
r4121 r4137 59 59 60 60 public ResponseObject<SerializedJob> GetLastSerializedResult(Guid jobId, bool requested, bool snapshot) { 61 using (contextFactory.GetContext( )) {61 using (contextFactory.GetContext(false)) { 62 62 return jobManager.GetLastSerializedJobResultOf(jobId, requested, snapshot); 63 63 } … … 65 65 66 66 public ResponseObject<JobDto> GetJobById(Guid jobId) { 67 using (contextFactory.GetContext( )) {67 using (contextFactory.GetContext(false)) { 68 68 return jobManager.GetJobById(jobId); 69 69 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ServerConsoleFacade.cs
r4133 r4137 49 49 50 50 public Response Login(string username, string password) { 51 using (contextFactory.GetContext()) { 52 Response resp = new Response(); 53 54 sessionID = secMan.Login(username, password); 55 if (sessionID == Guid.Empty) { 56 resp.Success = false; 57 resp.StatusMessage = ApplicationConstants.RESPONSE_SERVERCONSOLE_LOGIN_FAILED; 58 } else { 59 resp.Success = true; 60 resp.StatusMessage = 61 ApplicationConstants.RESPONSE_SERVERCONSOLE_LOGIN_SUCCESS; 62 } 63 return resp; 64 } 51 Response resp = new Response(); 52 53 sessionID = secMan.Login(username, password); 54 if (sessionID == Guid.Empty) { 55 resp.Success = false; 56 resp.StatusMessage = ApplicationConstants.RESPONSE_SERVERCONSOLE_LOGIN_FAILED; 57 } else { 58 resp.Success = true; 59 resp.StatusMessage = 60 ApplicationConstants.RESPONSE_SERVERCONSOLE_LOGIN_SUCCESS; 61 } 62 return resp; 65 63 } 66 64 67 65 68 66 public ResponseList<ClientDto> GetAllClients() { 69 using (contextFactory.GetContext( )) {67 using (contextFactory.GetContext(false)) { 70 68 secMan.Authorize("AccessClients", sessionID, Guid.Empty); 71 69 return clientManager.GetAllClients(); … … 74 72 75 73 public ResponseList<ClientGroupDto> GetAllClientGroups() { 76 using (contextFactory.GetContext( )) {74 using (contextFactory.GetContext(false)) { 77 75 //secMan.Authorize("AccessClientGroup", sessionID, Guid.Empty); 78 76 return clientManager.GetAllClientGroups(); … … 81 79 82 80 public ResponseList<UpTimeStatisticsDto> GetAllUpTimeStatistics() { 83 using (contextFactory.GetContext( )) {81 using (contextFactory.GetContext(false)) { 84 82 secMan.Authorize("AccessStatistics", sessionID, Guid.Empty); 85 83 return clientManager.GetAllUpTimeStatistics(); … … 108 106 109 107 public ResponseList<JobDto> GetAllJobs() { 110 using (contextFactory.GetContext( )) {108 using (contextFactory.GetContext(false)) { 111 109 secMan.Authorize("AccessJobs", sessionID, Guid.Empty); 112 110 return jobManager.GetAllJobs(); … … 115 113 116 114 public ResponseList<JobDto> GetAllJobsWithFilter(State jobState, int offset, int count) { 117 using (contextFactory.GetContext( )) {115 using (contextFactory.GetContext(false)) { 118 116 secMan.Authorize("AccessJobs", sessionID, Guid.Empty); 119 117 return jobManager.GetAllJobsWithFilter(jobState, offset, count); … … 122 120 123 121 public ResponseObject<JobDto> GetJobById(Guid jobId) { 124 using (contextFactory.GetContext( )) {122 using (contextFactory.GetContext(false)) { 125 123 secMan.Authorize("AccessJobs", sessionID, jobId); 126 124 return jobManager.GetJobById(jobId); … … 129 127 130 128 public ResponseObject<JobDto> GetJobByIdWithDetails(Guid jobId) { 131 using (contextFactory.GetContext( )) {129 using (contextFactory.GetContext(false)) { 132 130 secMan.Authorize("AccessJobs", sessionID, jobId); 133 131 return jobManager.GetJobByIdWithDetails(jobId); … … 143 141 144 142 public ResponseObject<JobDto> GetLastJobResultOf(Guid jobId) { 145 using (contextFactory.GetContext( )) {143 using (contextFactory.GetContext(false)) { 146 144 secMan.Authorize("AccessJobResults", sessionID, jobId); 147 145 return jobManager.GetLastJobResultOf(jobId); … … 150 148 151 149 public ResponseObject<SerializedJob> GetLastSerializedJobResultOf(Guid jobId, bool requested, bool snapshot) { 152 using (contextFactory.GetContext( )) {150 using (contextFactory.GetContext(false)) { 153 151 secMan.Authorize("AccessJobResults", sessionID, jobId); 154 152 return jobManager.GetLastSerializedJobResultOf(jobId, requested, snapshot); … … 157 155 158 156 public ResponseList<JobResult> GetAllJobResults(Guid jobId) { 159 using (contextFactory.GetContext( )) {157 using (contextFactory.GetContext(false)) { 160 158 secMan.Authorize("AccessJobResults", sessionID, jobId); 161 159 return jobManager.GetAllJobResults(jobId); … … 185 183 186 184 public ResponseObject<ClientGroupDtoList> GetAllGroupsOfResource(Guid resourceId) { 187 using (contextFactory.GetContext( )) {185 using (contextFactory.GetContext(false)) { 188 186 secMan.Authorize("AccessUserGroup", sessionID, Guid.Empty); 189 187 return clientManager.GetAllGroupsOfResource(resourceId); … … 199 197 200 198 public ResponseList<ProjectDto> GetAllProjects() { 201 using (contextFactory.GetContext( )) {199 using (contextFactory.GetContext(false)) { 202 200 secMan.Authorize("AccessProjects", sessionID, Guid.Empty); 203 201 return jobManager.GetAllProjects(); … … 227 225 228 226 public ResponseList<JobDto> GetJobsByProject(Guid projectId) { 229 using (contextFactory.GetContext( )) {227 using (contextFactory.GetContext(false)) { 230 228 secMan.Authorize("AccessJobs", sessionID, Guid.Empty); 231 229 return jobManager.GetJobsByProject(projectId); … … 234 232 235 233 public ResponseList<AppointmentDto> GetUptimeCalendarForResource(Guid guid) { 236 using (contextFactory.GetContext( )) {234 using (contextFactory.GetContext(false)) { 237 235 return clientManager.GetUptimeCalendarForResource(guid); 238 236 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Tracing/3.3/MethodCallPatternConverter.cs
r4136 r4137 11 11 StackTrace callStack = new StackTrace(); 12 12 int i = 1; 13 while (i < =callStack.FrameCount && !callStack.GetFrame(i).GetMethod().DeclaringType.FullName.StartsWith("HeuristicLab.Hive")) {13 while (i < callStack.FrameCount && !callStack.GetFrame(i).GetMethod().DeclaringType.FullName.StartsWith("HeuristicLab.Hive")) { 14 14 i++; 15 15 } 16 StackFrame stack = new StackFrame(i); 17 writer.Write(stack.GetMethod().Name); 16 StackFrame stack = new StackFrame(i); 17 var method = stack.GetMethod(); 18 if (method != null) { 19 writer.Write(stack.GetMethod().Name); 20 } 18 21 } 19 22 }
Note: See TracChangeset
for help on using the changeset viewer.