Changeset 546
- Timestamp:
- 09/10/08 19:30:44 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.CEDMA.Server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Server/HeuristicLab.CEDMA.Server.csproj
r543 r546 13 13 <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> 14 14 <FileAlignment>512</FileAlignment> 15 <SignAssembly> true</SignAssembly>15 <SignAssembly>false</SignAssembly> 16 16 <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile> 17 17 </PropertyGroup> -
trunk/sources/HeuristicLab.CEDMA.Server/ServerForm.cs
r543 r546 43 43 public partial class ServerForm : Form { 44 44 private ServiceHost host; 45 private ServiceHost rdfHost; 45 46 private Database database; 47 private Store store; 46 48 private static readonly string dbFile = AppDomain.CurrentDomain.BaseDirectory + "/test.db3"; 47 49 private static readonly string connectionString = "Data Source=\"" + dbFile + "\";Pooling=False"; 50 private static readonly string rdfFile = AppDomain.CurrentDomain.BaseDirectory + "rdf_store.db3"; 51 private static readonly string rdfConnectionString = "sqlite:rdf:Data Source=\"" + rdfFile + "\""; 48 52 public ServerForm() { 49 53 InitializeComponent(); … … 75 79 } 76 80 81 private void InitRdfStore() { 82 store = new Store(rdfConnectionString); 83 } 84 77 85 private void Start() { 78 86 InitDatabase(); 79 InitRunScheduler(); 87 InitRdfStore(); 88 //InitRunScheduler(); 80 89 81 90 host = new ServiceHost(database, new Uri(addressTextBox.Text)); 91 rdfHost = new ServiceHost(store, new Uri(addressTextBox.Text+"/RdfStore")); 82 92 ServiceThrottlingBehavior throttlingBehavior = new ServiceThrottlingBehavior(); 83 93 throttlingBehavior.MaxConcurrentSessions = 20; 84 94 host.Description.Behaviors.Add(throttlingBehavior); 95 rdfHost.Description.Behaviors.Add(throttlingBehavior); 85 96 try { 86 97 NetTcpBinding binding = new NetTcpBinding(); … … 92 103 host.AddServiceEndpoint(typeof(IDatabase), binding, addressTextBox.Text); 93 104 host.Open(); 105 rdfHost.AddServiceEndpoint(typeof(IStore), binding, addressTextBox.Text+"/RdfStore"); 106 rdfHost.Open(); 94 107 } catch(CommunicationException ex) { 95 108 MessageBox.Show("An exception occurred: " + ex.Message); 96 109 host.Abort(); 110 rdfHost.Abort(); 97 111 } 98 112 }
Note: See TracChangeset
for help on using the changeset viewer.