Free cookie consent management tool by TermsFeed Policy Generator

Changeset 546 for trunk/sources


Ignore:
Timestamp:
09/10/08 19:30:44 (16 years ago)
Author:
gkronber
Message:

published the rdf-store as WCF service. #261 (Items are stored multiple times in the result entries in the CEDMA DB)

Location:
trunk/sources/HeuristicLab.CEDMA.Server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CEDMA.Server/HeuristicLab.CEDMA.Server.csproj

    r543 r546  
    1313    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    1414    <FileAlignment>512</FileAlignment>
    15     <SignAssembly>true</SignAssembly>
     15    <SignAssembly>false</SignAssembly>
    1616    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
    1717  </PropertyGroup>
  • trunk/sources/HeuristicLab.CEDMA.Server/ServerForm.cs

    r543 r546  
    4343  public partial class ServerForm : Form {
    4444    private ServiceHost host;
     45    private ServiceHost rdfHost;
    4546    private Database database;
     47    private Store store;
    4648    private static readonly string dbFile = AppDomain.CurrentDomain.BaseDirectory + "/test.db3";
    4749    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 + "\"";
    4852    public ServerForm() {
    4953      InitializeComponent();
     
    7579    }
    7680
     81    private void InitRdfStore() {
     82      store = new Store(rdfConnectionString);
     83    }
     84
    7785    private void Start() {
    7886      InitDatabase();
    79       InitRunScheduler();
     87      InitRdfStore();
     88      //InitRunScheduler();
    8089
    8190      host = new ServiceHost(database, new Uri(addressTextBox.Text));
     91      rdfHost = new ServiceHost(store, new Uri(addressTextBox.Text+"/RdfStore"));
    8292      ServiceThrottlingBehavior throttlingBehavior = new ServiceThrottlingBehavior();
    8393      throttlingBehavior.MaxConcurrentSessions = 20;
    8494      host.Description.Behaviors.Add(throttlingBehavior);
     95      rdfHost.Description.Behaviors.Add(throttlingBehavior);
    8596      try {
    8697        NetTcpBinding binding = new NetTcpBinding();
     
    92103        host.AddServiceEndpoint(typeof(IDatabase), binding, addressTextBox.Text);
    93104        host.Open();
     105        rdfHost.AddServiceEndpoint(typeof(IStore), binding, addressTextBox.Text+"/RdfStore");
     106        rdfHost.Open();
    94107      } catch(CommunicationException ex) {
    95108        MessageBox.Show("An exception occurred: " + ex.Message);
    96109        host.Abort();
     110        rdfHost.Abort();
    97111      }
    98112    }
Note: See TracChangeset for help on using the changeset viewer.