Changeset 2904 for trunk/sources/HeuristicLab.Hive.Server.Core/3.2
- Timestamp:
- 03/01/10 21:20:01 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Hive.Server.Core/3.2
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ClientCommunicator.cs
r2846 r2904 39 39 using System.Runtime.Serialization.Formatters.Binary; 40 40 using HeuristicLab.Tracing; 41 using Linq = HeuristicLab.Hive.Server.LINQDataAccess; 41 42 42 43 namespace HeuristicLab.Hive.Server.Core { … … 60 61 private IInternalJobManager jobManager; 61 62 private IScheduler scheduler; 63 64 Linq.ClientDao clientDao = new Linq.ClientDao(); 62 65 63 66 private static int PENDING_TIMEOUT = 100; … … 195 198 /// <returns></returns> 196 199 public Response Login(ClientInfo clientInfo) { 197 ISession session = factory.GetSessionForCurrentThread();198 ITransaction tx = null;199 200 try {201 IClientAdapter clientAdapter =202 session.GetDataAdapter<ClientInfo, IClientAdapter>();203 204 tx = session.BeginTransaction();200 // ISession session = factory.GetSessionForCurrentThread(); 201 // ITransaction tx = null; 202 203 // try { 204 // IClientAdapter clientAdapter = 205 // session.GetDataAdapter<ClientInfo, IClientAdapter>(); 206 207 // tx = session.BeginTransaction(); 205 208 206 209 Response response = new Response(); … … 215 218 216 219 clientInfo.State = State.idle; 217 clientAdapter.Update(clientInfo); 220 221 if (clientDao.FindById(clientInfo.Id) == null) 222 clientDao.Insert(clientInfo); 223 else 224 clientDao.Update(clientInfo); 225 //clientAdapter.Update(clientInfo); 218 226 response.Success = true; 219 227 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_LOGIN_SUCCESS; 220 228 221 tx.Commit();229 //tx.Commit(); 222 230 return response; 223 }224 catch (Exception ex) {231 //} 232 /*catch (Exception ex) { 225 233 if (tx != null) 226 234 tx.Rollback(); … … 230 238 if (session != null) 231 239 session.EndSession(); 232 } 240 } */ 233 241 } 234 242 -
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ClientFacade.cs
r2122 r2904 36 36 [ServiceBehavior(InstanceContextMode = 37 37 InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple)] 38 class ClientFacade: IClientFacade { 38 public class ClientFacade: IClientFacade { 39 40 public ClientFacade() { 41 } 39 42 40 43 private IClientCommunicator clientCommunicator = -
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ClientManager.cs
r2086 r2904 29 29 using HeuristicLab.Hive.Server.DataAccess; 30 30 using HeuristicLab.DataAccess.Interfaces; 31 using HeuristicLab.Hive.Server.LINQDataAccess; 32 using ClientGroup=HeuristicLab.Hive.Contracts.BusinessObjects.ClientGroup; 33 using Resource=HeuristicLab.Hive.Contracts.BusinessObjects.Resource; 31 34 32 35 namespace HeuristicLab.Hive.Server.Core { 33 36 class ClientManager: IClientManager { 37 38 ClientDao clientDao = new ClientDao(); 34 39 35 40 ISessionFactory factory; -
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/DbTestApp.cs
r2591 r2904 34 34 using HeuristicLab.Hive.Server.Core; 35 35 using HeuristicLab.Core; 36 using HeuristicLab.Hive.Server.LINQDataAccess; 36 37 37 38 namespace HeuristicLab.Hive.Server { … … 298 299 299 300 IJobAdapter jobAdapter = 300 session.GetDataAdapter< Job, IJobAdapter>();301 session.GetDataAdapter<HeuristicLab.Hive.Contracts.BusinessObjects.Job, IJobAdapter>(); 301 302 302 303 Stream s = jobAdapter.GetSerializedJobStream( … … 358 359 IStorable restoredJob = 359 360 PersistenceManager.RestoreFromGZip(response.Obj.SerializedJobResultData); 361 } 362 363 private void TestLINQImplementation() { 364 ClientDao clientDao = new ClientDao(); 365 ClientInfo info = new ClientInfo(); 366 info.Id = Guid.NewGuid(); 367 info.FreeMemory = 1000; 368 info.Login = DateTime.Now; 369 info.Memory = 1000; 370 info.Name = "jackie"; 371 info.NrOfCores = 3; 372 info.NrOfFreeCores = 2; 373 info.CpuSpeedPerCore = 2500; 374 info.State = State.idle; 375 info = clientDao.Insert(info); 376 360 377 } 361 378 … … 365 382 //TestJobStreaming(); 366 383 //TestJobResultStreaming(); 367 TestJobResultDeserialization(); 368 } 384 //TestJobResultDeserialization(); 385 386 TestLINQImplementation(); 387 388 } 389 390 369 391 } 370 392 } -
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ExecutionEngineFacade.cs
r2099 r2904 29 29 30 30 namespace HeuristicLab.Hive.Server.Core { 31 class ExecutionEngineFacade: IExecutionEngineFacade {31 public class ExecutionEngineFacade: IExecutionEngineFacade { 32 32 33 33 private IJobManager jobManager = 34 34 ServiceLocator.GetJobManager(); 35 36 public ExecutionEngineFacade() { 37 38 } 35 39 36 40 #region IExecutionEngineFacade Members -
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/HeuristicLab.Hive.Server.Core-3.2.csproj
r2608 r2904 68 68 <Reference Include="System" /> 69 69 <Reference Include="System.Core"> 70 <RequiredTargetFramework>3.5</RequiredTargetFramework> 71 </Reference> 72 <Reference Include="System.Data.Linq"> 70 73 <RequiredTargetFramework>3.5</RequiredTargetFramework> 71 74 </Reference> … … 149 152 <Name>HeuristicLab.Hive.Server.DataAccess-3.2</Name> 150 153 </ProjectReference> 154 <ProjectReference Include="..\..\HeuristicLab.Hive.Server.LINQDataAccess\3.2\HeuristicLab.Hive.Server.LINQDataAccess-3.2.csproj"> 155 <Project>{A4499DDD-D1B8-414F-98F6-903C2C71BEB0}</Project> 156 <Name>HeuristicLab.Hive.Server.LINQDataAccess-3.2</Name> 157 </ProjectReference> 151 158 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj"> 152 159 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project> … … 171 178 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 172 179 </EmbeddedResource> 180 </ItemGroup> 181 <ItemGroup> 182 <WCFMetadata Include="Service References\" /> 173 183 </ItemGroup> 174 184 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ServerConsoleFacade.cs
r2099 r2904 43 43 44 44 public Guid sessionID = Guid.Empty; 45 46 public ServerConsoleFacade() { 47 } 45 48 46 49 public Response Login(string username, string password) { -
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/app.config
r2608 r2904 1 1 <?xml version="1.0" encoding="utf-8" ?> 2 2 <configuration> 3 <configSections> 3 <configSections> 4 <sectionGroup name="spring"> 5 <section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/> 6 <section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core"/> 7 </sectionGroup> 4 8 <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > 5 9 <section name="HeuristicLab.Hive.Server.Core.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> … … 13 17 </HeuristicLab.Hive.Server.Core.Properties.Settings> 14 18 </applicationSettings> 19 <spring> 20 <context> 21 <resource uri="config://spring/objects"/> 22 </context> 23 24 <objects xmlns="http://www.springframework.net" 25 xmlns:aop="http://www.springframework.net/aop"> 26 <object id="calculator" singleton="false" 27 type="HeuristicLab.Hive.Server.Core.ClientFacade, HeuristicLab.Hive.Server.Core-3.2" /> 28 29 <object id="serviceOperation" type="Spring.Aop.Support.SdkRegularExpressionMethodPointcut, Spring.Aop"> 30 <property name="patterns"> 31 <list> 32 <value>HeuristicLab.Hive.Server.Core.ClientFacade.*</value> 33 </list> 34 </property> 35 </object> 36 37 <object id="sci" type="HeuristicLab.Hive.Server.ServiceCallInterception, HeuristicLab.Hive.Server-3.2" /> 38 39 <aop:config> 40 <aop:advisor pointcut-ref="serviceOperation" advice-ref="sci"/> 41 </aop:config> 42 </objects> 43 </spring> 15 44 </configuration>
Note: See TracChangeset
for help on using the changeset viewer.