incubator-stonehenge-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bende...@apache.org
Subject svn commit: r792384 [3/4] - in /incubator/stonehenge/trunk/stocktrader/dotnet: ./ business_service/ business_service/BusinessServiceConfigurationSettings/ business_service/BusinessServiceConsole/ business_service/BusinessServiceImplementation/ business...
Date Thu, 09 Jul 2009 03:37:58 GMT
Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceConsoleHost/Program.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceConsoleHost/Program.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceConsoleHost/Program.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceConsoleHost/Program.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,252 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+//  .Net StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+//======================================================================================================
+// This is the host program for the Configuration Service  - a console application
+//======================================================================================================
+//======================================================================================================
+// Code originally contributed by Microsoft Corporation.
+// This contribution to the Stonehenge project is limited strictly 
+// to the source code that is submitted in this submission.  
+// Any technology, including underlying platform technology, 
+// that is referenced or required by the submitted source code 
+// is not a part of the contribution.  
+// For example and not by way of limitation, 
+// any systems/Windows libraries (WPF, WCF, ASP.NET etc.) 
+// required to run the submitted source code is not a part of the contribution
+//======================================================================================================
+
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Text;
+using System.Threading;
+using System.Net;
+using System.Diagnostics;
+using System.ServiceModel;
+using System.ServiceModel.Configuration;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Activation;
+using Trade.ConfigServiceConfigurationSettings;
+using Trade.ConfigServiceContract;
+using Trade.ConfigServiceDataContract;
+using Trade.ConfigServiceImplementation;
+using Trade.Utility;
+
+
+namespace Trade.ConfigServiceConsoleHost
+{
+    class ConfigService_ConsoleHost
+    {
+
+        /// <summary>
+        /// The program entry class. Note how this simply inherits from the provided base class.
+        /// </summary>
+        class ConfigHost : IDisposable
+        {
+
+            private ServiceHost host;
+
+
+            public void startUp()
+            {
+                string shortHostName = System.Net.Dns.GetHostName();
+                IPHostEntry myEntry = System.Net.Dns.GetHostEntry(shortHostName);
+                string myName = myEntry.HostName;
+                //The key call to create our list of runtime hosts to be initialized.
+                //List<ServiceHostInfo> startupList = new List<ServiceHostInfo>(new ServiceHostInfo[] { new ServiceHostInfo(Settings.SELFHOST_VHOST_NAME, false, null, new object[] { new Trade.BusinessServiceImplementation.ErrorBehaviorAttribute() }, new TradeServiceWcf()) });
+                ////Stock call to startup the Master Host.
+                //base.startService(new Settings(), new ConfigurationService(), new NodeCommunication(), null, new ConfigurationActions(true), startupList, null, new object[] { typeof(Iconfigservice) });
+
+                Settings thisSettings = new Settings();
+
+                Uri TradeServiceUriBase = new Uri("http://" + myName + ":7000/tradeconfigservice");
+
+                //Create a ServiceHost for the configservice service.
+                Type serviceType = typeof(ConfigService);
+                host = new ServiceHost(serviceType, TradeServiceUriBase);
+                addEndpointsAndBehaviors(host, TradeServiceUriBase);
+                host.Open();
+
+            }
+
+            private ServiceHost addEndpointsAndBehaviors(ServiceHost host, Uri uri)
+            {
+                ServiceMetadataBehavior mexbehavior = new ServiceMetadataBehavior();
+                mexbehavior.HttpGetEnabled = true;
+                mexbehavior.HttpGetUrl = uri;
+                host.Description.Behaviors.Add(mexbehavior);
+                Binding mexHttpBinding = MetadataExchangeBindings.CreateMexHttpBinding();
+                ServiceEndpoint sepMex = host.AddServiceEndpoint(typeof(IMetadataExchange), mexHttpBinding, uri.AbsoluteUri + "/mex");
+                BasicHttpBinding httpBinding = new BasicHttpBinding();
+                host.AddServiceEndpoint(typeof(IConfigService), httpBinding, "");
+
+                //Describe for Console output
+                StockTraderUtility.DescribeService(host);
+
+                return host;
+            }
+
+            public void Dispose()
+            {
+                if (host != null)
+                    host.Close();
+            }
+        }
+
+        /// <summary>
+        /// The program entry class. Note how this simply inherits from the provided base class.
+        /// </summary>
+        class ConfigTestClient
+        {
+
+            private Uri GetUri()
+            {
+                string shortHostName = System.Net.Dns.GetHostName();
+                IPHostEntry myEntry = System.Net.Dns.GetHostEntry(shortHostName);
+                string myName = myEntry.HostName;
+
+                return new Uri("http://" + myName + ":7000/tradeconfigservice");
+            }
+
+            //tests the config service by returning the uri of the Business Service that the DOTNET_CLIENT
+            //currently points to in the database
+            public void RunClientTest()
+            {
+                try
+                {
+                    var client = new ChannelFactory<IConfigService>();
+                    client.Endpoint.Binding = new BasicHttpBinding();
+                    var proxy = client.CreateChannel(new EndpointAddress(GetUri()));
+
+                    var request = new ClientConfigRequest();
+                    request.ClientName = "DOTNET_CLIENT";
+                    var response = proxy.GetClientConfig(request);
+
+                    Console.ForegroundColor = ConsoleColor.Green;
+                    Console.WriteLine("Test Success");
+                    Console.WriteLine(" Current DOTNET_CLIENT-> BS = {0}", response.BS);
+                    Console.ForegroundColor = ConsoleColor.Gray;
+                }
+                catch (Exception ex)
+                {
+                    //Debugger.Break();
+                    Console.ForegroundColor = ConsoleColor.Red;
+                    Console.WriteLine("Error Running Test");
+                    Console.WriteLine(ex.ToString());
+                    Console.ForegroundColor = ConsoleColor.Gray;
+                }
+            }
+
+            //tests the config service by returning the uri of the Order Processing Service that the DOTNET_BS
+            //currently points to in the database
+            public void RunBsTest()
+            {
+                try
+                {
+                    var client = new ChannelFactory<IConfigService>();
+                    client.Endpoint.Binding = new BasicHttpBinding();
+                    var proxy = client.CreateChannel(new EndpointAddress(GetUri()));
+
+                    var request = new BSConfigRequest();
+                    request.BSName = "DOTNET_BS";
+                    var bs = proxy.GetBSConfig(request);
+
+                    Console.ForegroundColor = ConsoleColor.Green;
+                    Console.WriteLine("Test Success");
+                    Console.WriteLine(" Current DOTNET_BS-> OPS = {0}", bs.OPS);
+                    Console.WriteLine(" Current DOTNET_BS-> DBHost = {0}", bs.DBHostName);
+                    Console.ForegroundColor = ConsoleColor.Gray;
+                }
+                catch (Exception ex)
+                {
+                    //Debugger.Break();
+                    Console.ForegroundColor = ConsoleColor.Red;
+                    Console.WriteLine("Error Running Test");
+                    Console.WriteLine(ex.ToString());
+                    Console.ForegroundColor = ConsoleColor.Gray;
+                }
+            }
+
+        }
+
+        [STAThread]
+        static void Main(string[] args)
+        {
+            // Start Host
+            Console.SetWindowSize(Console.LargestWindowWidth - 30, Console.LargestWindowHeight - 30);
+            Console.Title = ".NET StockTrader Configuration Service Host";
+            
+
+            bool restart = true;
+
+            while (restart)
+            {
+                using (ConfigHost configHost = new ConfigHost())
+                {
+                    configHost.startUp();
+
+                    Console.WriteLine(" {0} is started.", Console.Title);
+                    Console.WriteLine();
+
+                    // Run Tests
+                    Console.ForegroundColor = ConsoleColor.Yellow;
+                    Console.WriteLine(" Running Tests for {0}", Console.Title);
+                    Console.WriteLine();
+
+                    ConfigTestClient client = new ConfigTestClient();
+                    client.RunClientTest();
+                    client.RunBsTest();
+
+                    Console.WriteLine();
+
+                    Console.WriteLine("Press Enter to quit or Ctrl+R to restart");
+
+                    restart = WaitForRestart();
+                }
+            }
+        }
+
+
+        private static bool WaitForRestart()
+        {
+            while (true)
+            {
+                // clear users input
+                Console.CursorLeft = 0;
+                Console.Write(' ');
+                Console.CursorLeft = 0;
+
+                // read users input
+                var key = Console.ReadKey();
+                if ((key.Modifiers & ConsoleModifiers.Control) != 0
+                    && key.Key == ConsoleKey.R)
+                {
+                    return true;
+                }
+                if (key.Key == ConsoleKey.Enter || key.Key == ConsoleKey.Escape)
+                {
+                    return false;
+                }
+            }
+        }
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceConsoleHost/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceConsoleHost/Properties/AssemblyInfo.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceConsoleHost/Properties/AssemblyInfo.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceConsoleHost/Properties/AssemblyInfo.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("ConfigServiceConsoleHost")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("ConfigServiceConsoleHost")]
+[assembly: AssemblyCopyright("Copyright ? Microsoft 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("13eb849e-85a3-4435-88c9-7994be409c28")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceConsoleHost/nettradericon.ico
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceConsoleHost/nettradericon.ico?rev=792384&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceConsoleHost/nettradericon.ico
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceConsoleHost/stocktrader.snk
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceConsoleHost/stocktrader.snk?rev=792384&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceConsoleHost/stocktrader.snk
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceContract/ConfigServiceContract.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceContract/ConfigServiceContract.csproj?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceContract/ConfigServiceContract.csproj (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceContract/ConfigServiceContract.csproj Thu Jul  9 03:37:55 2009
@@ -0,0 +1,90 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{B0D086A8-B168-4DCD-8D2C-6F08CE159B5C}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Trade.ConfigServiceContract</RootNamespace>
+    <AssemblyName>Trade.ConfigServiceContract</AssemblyName>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>stocktrader.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <OldToolsVersion>2.0</OldToolsVersion>
+    <SccProjectName>
+    </SccProjectName>
+    <SccLocalPath>
+    </SccLocalPath>
+    <SccAuxPath>
+    </SccAuxPath>
+    <SccProvider>
+    </SccProvider>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Messaging" />
+    <Reference Include="System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\System.Runtime.Serialization.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\System.ServiceModel.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Transactions" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="IConfigService.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="stocktrader.snk" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\ConfigServiceDataContract\ConfigServiceDataContract.csproj">
+      <Project>{82B5FA73-8A82-4DC0-B473-43B78543668B}</Project>
+      <Name>ConfigServiceDataContract</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PostBuildEvent>if not exist "$(SolutionDir)$(OutDir)\" mkdir  "$(SolutionDir)$(OutDir)\"
+copy "$(TargetPath)"  "$(SolutionDir)$(OutDir)\"
+copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)$(OutDir)\"</PostBuildEvent>
+  </PropertyGroup>
+</Project>

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceContract/IConfigService.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceContract/IConfigService.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceContract/IConfigService.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceContract/IConfigService.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,138 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+//  .Net StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+using System.ServiceModel;
+using Trade.ConfigServiceDataContract;
+
+namespace Trade.ConfigServiceContract
+{
+    /// <summary>
+    /// This is the service contract for the Configuration Service. It defines the service layer operations
+    /// that are separately implemented in the implementation class.
+    /// </summary> 
+    [ServiceContract(Name = "ConfigServiceService", Namespace = "http://Trade.TraderConfigHost")]
+    public interface IConfigService
+    {
+
+
+
+        /// <summary>
+        /// Get configurations of a client
+        /// </summary>
+        /// <param name="client">Name of the client</param>
+        /// <returns>Object ClientConfigRequest</returns>
+        [OperationContract]
+        ClientConfigResponse GetClientConfig(ClientConfigRequest client);
+
+        /// <summary>
+        /// Get configurations of a business service
+        /// </summary>
+        [OperationContract]
+        BSConfigResponse GetBSConfig(BSConfigRequest bs);
+
+        /// <summary>
+        /// Sets connection from client to business service
+        /// </summary>
+        [OperationContract(Action = "ClientToBS")]
+        void SetClientToBS(ClientToBS clientConfig);
+
+        /// <summary>
+        /// Sets connection from business service to order processor service
+        /// </summary>
+        [OperationContract(Action = "BSToOPS")]
+        void SetBSToOPS(BSToOPS bsConfig);
+
+        /// <summary>
+        /// Gets all business service locations
+        /// </summary>
+        [OperationContract]
+        ServiceLocation[] GetBSLocations();
+
+        /// <summary>
+        /// Gets all the order processing service locations
+        /// </summary>
+        [OperationContract]
+        ServiceLocation[] GetOPSLocations();
+       
+
+        /*************************************************************************************
+         * TODO: The rest of these methods have been defined in the PHP Configuration Class.
+         * They may need to be defined for the user interface
+
+        /// <summary>
+        /// Set the database configuration of a DB
+        /// </summary>
+        /// <param name="config">DBConfig object consisting of the DBName, DBPort and DBHostname that is to be set</param>
+        [OperationContract(Action = "DBConfig")]
+        void SetDbConfig(DBConfig config);
+
+        /// <summary>
+        /// Look up all the databases set up
+        /// </summary>
+        /// <returns>DBConfigs for all the DBs</returns>
+        [OperationContract]
+        DBConfig[] GetDBConfigs();
+
+        /// <summary> 
+        /// Sets active database.
+        /// </summary>
+        /// <param name="activeConfig">Name of the active database</param>
+        [OperationContract(Action = "ActiveDB")]
+        void SetActiveDB(string activeConfig);
+
+        /// <summary>
+        /// Get active database.
+        /// </summary>
+        [OperationContract]
+        DBConfig GetActiveDB();
+
+        /// <summary>
+        /// Sets service location (End point URL) of a given service.
+        /// </summsry>
+        /// <param name="location">Service Location object consisting of a ServiceName and a ServiceUrl</param>
+        [OperationContract(Action = "ServiceLocation")]
+        void setServiceLocation(ServiceLocation location);
+         
+        /// <summary>
+        /// Get all connections from client to business service
+        /// </summary>
+        [OperationContract(Action = "GetClientToBSConnections")]
+        ClientToBS[] GetClientToBsConnections();
+
+
+        /// <summary>
+        /// Get all connections from business service to order processor service
+        /// </summary>
+        [OperationContract(Action = "GetBSToOPSConnections")]
+        BSToOPS[] GetBSToOPSConnections();
+
+        /// <summary>
+        /// Get configurations of a order processor service
+        /// </summary>
+        [OperationContract]
+        OPSConfigResponse GetOPSConfig(OPSConfigRequest ops);
+        ********************************************************************************/
+
+    }
+
+    
+
+    
+}
+

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceContract/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceContract/Properties/AssemblyInfo.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceContract/Properties/AssemblyInfo.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceContract/Properties/AssemblyInfo.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,53 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Trade.ConfigServiceContract")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Apache Stonehenge")]
+[assembly: AssemblyProduct(".NET StockTrader")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("bf4073c8-56c2-4f2d-8ec4-4249aec34ba1")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("2.0.2.0")]
+[assembly: AssemblyFileVersion("2.0.2.0")]

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceContract/stocktrader.snk
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceContract/stocktrader.snk?rev=792384&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceContract/stocktrader.snk
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/BSConfigRequest.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/BSConfigRequest.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/BSConfigRequest.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/BSConfigRequest.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,28 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+//  .Net StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+namespace Trade.ConfigServiceDataContract
+{
+    public class BSConfigRequest
+    {
+        //TODO: This this is only holding a string - is this a required data type?
+        //Have left this as it is for the sake of conformity with the PHP
+        public string BSName { get; set; }
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/BSConfigResponse.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/BSConfigResponse.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/BSConfigResponse.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/BSConfigResponse.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,31 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+//  .Net StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+namespace Trade.ConfigServiceDataContract
+{
+    public class BSConfigResponse
+    {
+        public string DBName { get; set; }
+        public string DBHostName { get; set; }
+        public int DBPort { get; set; }
+        public string OPS { get; set; }
+        public string OPSName { get; set; }
+        public bool Sec { get; set; }
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/BSToOPS.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/BSToOPS.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/BSToOPS.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/BSToOPS.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,27 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+//  .Net StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+namespace Trade.ConfigServiceDataContract
+{
+    public class BSToOPS
+    {
+        public string Bs { get; set; }
+        public string Ops { get; set; }
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ClientConfigRequest.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ClientConfigRequest.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ClientConfigRequest.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ClientConfigRequest.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,28 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+//  .Net StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+namespace Trade.ConfigServiceDataContract
+{
+    public class ClientConfigRequest
+    {
+        //TODO: This this is only holding a string - is this a required data type?
+        //Have left this as it is for the sake of conformity with the PHP
+        public string ClientName { get; set; }
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ClientConfigResponse.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ClientConfigResponse.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ClientConfigResponse.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ClientConfigResponse.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,28 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+//  .Net StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+namespace Trade.ConfigServiceDataContract
+{
+    public class ClientConfigResponse
+    {
+        public string BS { get; set; }
+        public string BSName { get; set; }
+        public bool Sec { get; set; }
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ClientToBS.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ClientToBS.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ClientToBS.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ClientToBS.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,27 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+//  .Net StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+namespace Trade.ConfigServiceDataContract
+{
+    public class ClientToBS
+    {
+        public string Client { get; set; }
+        public string Bs { get; set; }
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ConfigServiceDataContract.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ConfigServiceDataContract.csproj?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ConfigServiceDataContract.csproj (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ConfigServiceDataContract.csproj Thu Jul  9 03:37:55 2009
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{82B5FA73-8A82-4DC0-B473-43B78543668B}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Trade.ConfigServiceDataContract</RootNamespace>
+    <AssemblyName>Trade.ConfigServiceDataContract</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>stocktrader.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="BSConfigRequest.cs" />
+    <Compile Include="BSConfigResponse.cs" />
+    <Compile Include="BSToOPS.cs" />
+    <Compile Include="OPSConfigResponse.cs" />
+    <Compile Include="ClientConfigRequest.cs" />
+    <Compile Include="ClientConfigResponse.cs" />
+    <Compile Include="ClientToBS.cs" />
+    <Compile Include="DBConfig.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="ServiceLocation.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="stocktrader.snk" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PostBuildEvent>if not exist "$(SolutionDir)$(OutDir)\" mkdir  "$(SolutionDir)$(OutDir)\"
+copy "$(TargetPath)"  "$(SolutionDir)$(OutDir)\"
+copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)$(OutDir)\"</PostBuildEvent>
+  </PropertyGroup>
+</Project>

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/DBConfig.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/DBConfig.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/DBConfig.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/DBConfig.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,28 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+//  .Net StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+namespace Trade.ConfigServiceDataContract
+{
+    public class DBConfig
+    {
+        public string DBName { get; set; }
+        public string DBHostName { get; set; }
+        public string DBPort { get; set; }
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/OPSConfigRequest.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/OPSConfigRequest.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/OPSConfigRequest.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/OPSConfigRequest.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,7 @@
+namespace ConfigServiceDataContract
+{
+    public class OPSConfigRequest
+    {
+        public string OPSName { get; set; }
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/OPSConfigResponse.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/OPSConfigResponse.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/OPSConfigResponse.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/OPSConfigResponse.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,28 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+//  .Net StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+namespace Trade.ConfigServiceDataContract
+{
+    public class OPSConfigResponse
+    {
+        public string DBName { get; set; }
+        public string DBHostName { get; set; }
+        public int DBPort { get; set; }
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/Properties/AssemblyInfo.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/Properties/AssemblyInfo.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/Properties/AssemblyInfo.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,51 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Trade.ConfigServiceDataContract")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Apache Stonehenge")]
+[assembly: AssemblyProduct(".NET StockTrader")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("5f2c036e-cb1b-45e3-9ee9-84a0b576cfc1")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("2.0.2.0")]
+[assembly: AssemblyFileVersion("2.0.2.0")]

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ServiceLocation.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ServiceLocation.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ServiceLocation.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/ServiceLocation.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,27 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+//  .Net StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+namespace Trade.ConfigServiceDataContract
+{
+    public class ServiceLocation
+    {
+        public string ServiceName { get; set; }
+        public string ServiceURL { get; set; }
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/stocktrader.snk
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/stocktrader.snk?rev=792384&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceDataContract/stocktrader.snk
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/ConfigService.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/ConfigService.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/ConfigService.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/ConfigService.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,127 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+//  .Net StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+//======================================================================================================
+// The Config Service implementation class/business logic.
+//======================================================================================================
+
+
+using System;
+using System.Configuration;
+using System.Diagnostics;
+using System.ServiceModel;
+using System.Runtime.Serialization;
+using Trade.ConfigServiceConfigurationSettings;
+using Trade.ConfigServiceDataContract;
+using Trade.ConfigServiceContract;
+using Trade.IDAL;
+using Trade.DALFactory;
+using Trade.Utility;
+
+
+namespace Trade.ConfigServiceImplementation
+{
+    
+    /// <summary>
+    /// Service class which implements the Configuration service contract.
+    /// ReleaseServiceInstanceOnTransactionComplete is marked as false  to support transacted batches from the 
+    /// transacted (persisted) durable MSMQ message queue. This is required!
+    /// </summary>
+    [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.PerCall, IncludeExceptionDetailInFaults = true)]
+    public class ConfigService : IConfigService
+    {
+        private IConfig dalConfig;
+
+        private Trade.IDAL.IConfig startDAL()
+        {
+            dalConfig = Trade.DALFactory.Config.Create(Settings.DAL);
+            dalConfig.Open(Settings.TRADEDB_SQL_CONN_STRING);
+            return dalConfig;
+        }
+        
+        public ClientConfigResponse GetClientConfig(ClientConfigRequest client)
+        {
+
+            dalConfig = startDAL();
+
+            ClientConfigResponse ans = dalConfig.GetClientConfig(client.ClientName);
+            dalConfig.Close();
+
+            return ans;
+
+        }
+        
+        public BSConfigResponse GetBSConfig(BSConfigRequest bs)
+        {
+            dalConfig = startDAL();
+
+            BSConfigResponse ans = dalConfig.GetBSConfig(bs.BSName);
+            
+            dalConfig.Close();
+
+            return ans;
+        }
+
+        public void SetClientToBS(ClientToBS clientConfig)
+        {
+            dalConfig = startDAL();
+
+            dalConfig.SetClientToBS(clientConfig);
+
+            dalConfig.Close();
+
+        }
+
+        public void SetBSToOPS(BSToOPS bsConfig)
+        {
+            dalConfig = startDAL();
+
+            dalConfig.SetBSToOPS(bsConfig);
+
+            dalConfig.Close();
+        }
+
+        public ServiceLocation[] GetBSLocations()
+        {
+            dalConfig = startDAL();
+
+            ServiceLocation[] ans = dalConfig.GetBSLocations();
+
+            dalConfig.Close();
+
+            return ans;
+        }
+
+        public ServiceLocation[] GetOPSLocations()
+        {
+            dalConfig = startDAL();
+
+            ServiceLocation[] ans = dalConfig.GetOPSLocations();
+
+            dalConfig.Close();
+
+            return ans;
+        }
+
+
+    }
+
+
+}
+

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/ConfigServiceImplementation.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/ConfigServiceImplementation.csproj?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/ConfigServiceImplementation.csproj (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/ConfigServiceImplementation.csproj Thu Jul  9 03:37:55 2009
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{7482A188-019C-49DF-A1A1-68D6CD254E44}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Trade.ConfigServiceImplementation</RootNamespace>
+    <AssemblyName>Trade.ConfigServiceImplementation</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <StartupObject>
+    </StartupObject>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>stocktrader.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.configuration" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.ServiceModel">
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="ConfigService.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\common\DALFactory\StockTraderDALFactory.csproj">
+      <Project>{F67C8D85-6DC0-45CD-A748-636E3881E2F5}</Project>
+      <Name>StockTraderDALFactory</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\common\DALSQLServer\StockTraderDALSQLServer.csproj">
+      <Project>{34C5AB90-E195-4BEE-A895-7AB1F81D552D}</Project>
+      <Name>StockTraderDALSQLServer</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\common\IDAL\StockTraderIDAL.csproj">
+      <Project>{509EB16A-6586-4200-8323-32438C9B47DC}</Project>
+      <Name>StockTraderIDAL</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\common\StockTraderUtility\Utility.csproj">
+      <Project>{382E6E1C-E430-4F6C-BC41-5D84A3798B02}</Project>
+      <Name>Utility</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\ConfigServiceConfigurationSettings\ConfigServiceConfigurationSettings.csproj">
+      <Project>{5A192168-838E-4DD1-A5E9-9EE191B941FE}</Project>
+      <Name>ConfigServiceConfigurationSettings</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\ConfigServiceContract\ConfigServiceContract.csproj">
+      <Project>{B0D086A8-B168-4DCD-8D2C-6F08CE159B5C}</Project>
+      <Name>ConfigServiceContract</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\ConfigServiceDataContract\ConfigServiceDataContract.csproj">
+      <Project>{82B5FA73-8A82-4DC0-B473-43B78543668B}</Project>
+      <Name>ConfigServiceDataContract</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="stocktrader.snk" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PostBuildEvent>if not exist "$(SolutionDir)$(OutDir)\" mkdir  "$(SolutionDir)$(OutDir)\"
+copy "$(TargetPath)"  "$(SolutionDir)$(OutDir)\"
+copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)$(OutDir)\"</PostBuildEvent>
+  </PropertyGroup>
+</Project>

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/CustomCertValidator.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/CustomCertValidator.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/CustomCertValidator.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/CustomCertValidator.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,61 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+//  .Net StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+//======================================================================================================
+// This is the Order Processor Service Custom Certificate validator.  It utilizes the provide base class,
+// CustomCertificateValidator, that comes with Config Service.  This base class uses a list of thumbprints
+// for valid certificates we want to accept for clients connecting with client certificates to the secured
+// message security mode endpoint.  See the StockTrader Setup and Configuration Guide for details.  You
+// must override the base method getAllowedThumbprints and provide your custom list, per below.  For OPS,
+// the only two certs that will be allowed are those that ship with the StockTrader sample.  
+//======================================================================================================
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Trade.Utility;
+
+namespace Trade.ConfigServiceImplementation
+{
+    /// <summary>
+    /// The Order Processor Service custom X.509 certificate validator, that uses the base class
+    /// provided with Configuration Service.  This class is referenced in the config file, with the
+    /// OPS_M_Security_Behavior behavior configuration for the host exe.
+    /// </summary>
+    public class CustomCertValidator : CustomCertificateValidator
+    {
+        /// <summary>
+        /// Override to provide our list of valid cert thumbprints for the service.
+        /// </summary>
+        /// <returns></returns>
+        protected override string[] getAllowedThumbprints()
+        {
+            List<string> thumbprints = new List<string>();
+
+            //This is the thumbprint for the BSLClient Certificate in the BSLClient.pfx file.  Spaces should be removed.
+            thumbprints.Add("59d185eae27b5d89df9a90927353206cc89b8a1b");
+
+            //This is the thumbprint for the OPSHost Certificate in the OPSHost.pfx file.  Spaces should be removed. We add
+            //this one as well for allowing the service certificate to be used when a node checks its own endpoints.
+            thumbprints.Add("fa0f58bb605fa43369e279e8f9088872fde09943");
+
+            return thumbprints.ToArray();
+        }
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/Properties/AssemblyInfo.cs?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/Properties/AssemblyInfo.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/Properties/AssemblyInfo.cs Thu Jul  9 03:37:55 2009
@@ -0,0 +1,53 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Trade.ConfigServiceImplementation")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Apache Stonehenge")]
+[assembly: AssemblyProduct(".NET StockTrader")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("bf4073c8-56c2-4f2d-8ec4-4249aec34ba1")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("2.0.2.0")]
+[assembly: AssemblyFileVersion("2.0.2.0")]

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/stocktrader.snk
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/stocktrader.snk?rev=792384&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceImplementation/stocktrader.snk
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceSolution.sln
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceSolution.sln?rev=792384&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceSolution.sln (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/config_service/ConfigServiceSolution.sln Thu Jul  9 03:37:55 2009
@@ -0,0 +1,82 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigServiceConsoleHost", "ConfigServiceConsoleHost\ConfigServiceConsoleHost.csproj", "{569D1683-C49E-48A4-8202-62A7429CCB1B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigServiceConfigurationSettings", "ConfigServiceConfigurationSettings\ConfigServiceConfigurationSettings.csproj", "{5A192168-838E-4DD1-A5E9-9EE191B941FE}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigServiceContract", "ConfigServiceContract\ConfigServiceContract.csproj", "{B0D086A8-B168-4DCD-8D2C-6F08CE159B5C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigServiceDataContract", "ConfigServiceDataContract\ConfigServiceDataContract.csproj", "{82B5FA73-8A82-4DC0-B473-43B78543668B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigServiceImplementation", "ConfigServiceImplementation\ConfigServiceImplementation.csproj", "{7482A188-019C-49DF-A1A1-68D6CD254E44}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StockTraderDALFactory", "..\common\DALFactory\StockTraderDALFactory.csproj", "{F67C8D85-6DC0-45CD-A748-636E3881E2F5}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StockTraderDALSQLServer", "..\common\DALSQLServer\StockTraderDALSQLServer.csproj", "{34C5AB90-E195-4BEE-A895-7AB1F81D552D}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EBB1604B-3F50-4A81-87C3-1AE4029EEEC6} = {EBB1604B-3F50-4A81-87C3-1AE4029EEEC6}
+		{82B5FA73-8A82-4DC0-B473-43B78543668B} = {82B5FA73-8A82-4DC0-B473-43B78543668B}
+	EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StockTraderIDAL", "..\common\IDAL\StockTraderIDAL.csproj", "{509EB16A-6586-4200-8323-32438C9B47DC}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EBB1604B-3F50-4A81-87C3-1AE4029EEEC6} = {EBB1604B-3F50-4A81-87C3-1AE4029EEEC6}
+		{82B5FA73-8A82-4DC0-B473-43B78543668B} = {82B5FA73-8A82-4DC0-B473-43B78543668B}
+		{B0D086A8-B168-4DCD-8D2C-6F08CE159B5C} = {B0D086A8-B168-4DCD-8D2C-6F08CE159B5C}
+	EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utility", "..\common\StockTraderUtility\Utility.csproj", "{382E6E1C-E430-4F6C-BC41-5D84A3798B02}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BusinessServiceDataContract", "..\business_service\BusinessServiceDataContract\BusinessServiceDataContract.csproj", "{EBB1604B-3F50-4A81-87C3-1AE4029EEEC6}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{569D1683-C49E-48A4-8202-62A7429CCB1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{569D1683-C49E-48A4-8202-62A7429CCB1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{569D1683-C49E-48A4-8202-62A7429CCB1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{569D1683-C49E-48A4-8202-62A7429CCB1B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{5A192168-838E-4DD1-A5E9-9EE191B941FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{5A192168-838E-4DD1-A5E9-9EE191B941FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{5A192168-838E-4DD1-A5E9-9EE191B941FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{5A192168-838E-4DD1-A5E9-9EE191B941FE}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B0D086A8-B168-4DCD-8D2C-6F08CE159B5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B0D086A8-B168-4DCD-8D2C-6F08CE159B5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B0D086A8-B168-4DCD-8D2C-6F08CE159B5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B0D086A8-B168-4DCD-8D2C-6F08CE159B5C}.Release|Any CPU.Build.0 = Release|Any CPU
+		{82B5FA73-8A82-4DC0-B473-43B78543668B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{82B5FA73-8A82-4DC0-B473-43B78543668B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{82B5FA73-8A82-4DC0-B473-43B78543668B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{82B5FA73-8A82-4DC0-B473-43B78543668B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{7482A188-019C-49DF-A1A1-68D6CD254E44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{7482A188-019C-49DF-A1A1-68D6CD254E44}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{7482A188-019C-49DF-A1A1-68D6CD254E44}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{7482A188-019C-49DF-A1A1-68D6CD254E44}.Release|Any CPU.Build.0 = Release|Any CPU
+		{F67C8D85-6DC0-45CD-A748-636E3881E2F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{F67C8D85-6DC0-45CD-A748-636E3881E2F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F67C8D85-6DC0-45CD-A748-636E3881E2F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{F67C8D85-6DC0-45CD-A748-636E3881E2F5}.Release|Any CPU.Build.0 = Release|Any CPU
+		{34C5AB90-E195-4BEE-A895-7AB1F81D552D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{34C5AB90-E195-4BEE-A895-7AB1F81D552D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{34C5AB90-E195-4BEE-A895-7AB1F81D552D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{34C5AB90-E195-4BEE-A895-7AB1F81D552D}.Release|Any CPU.Build.0 = Release|Any CPU
+		{509EB16A-6586-4200-8323-32438C9B47DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{509EB16A-6586-4200-8323-32438C9B47DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{509EB16A-6586-4200-8323-32438C9B47DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{509EB16A-6586-4200-8323-32438C9B47DC}.Release|Any CPU.Build.0 = Release|Any CPU
+		{382E6E1C-E430-4F6C-BC41-5D84A3798B02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{382E6E1C-E430-4F6C-BC41-5D84A3798B02}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{382E6E1C-E430-4F6C-BC41-5D84A3798B02}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{382E6E1C-E430-4F6C-BC41-5D84A3798B02}.Release|Any CPU.Build.0 = Release|Any CPU
+		{EBB1604B-3F50-4A81-87C3-1AE4029EEEC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EBB1604B-3F50-4A81-87C3-1AE4029EEEC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EBB1604B-3F50-4A81-87C3-1AE4029EEEC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{EBB1604B-3F50-4A81-87C3-1AE4029EEEC6}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/App.config
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/App.config?rev=792384&r1=792383&r2=792384&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/App.config (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/App.config Thu Jul  9 03:37:55 2009
@@ -26,16 +26,13 @@
 -->
 <configuration>
   <appSettings>
-    <add key="DBServer" value="localhost" />
-    <add key="Database" value="StockTraderDB" />
-    <add key="UserID" value="trade" />
-    <add key="Password" value="yyy" />
     <add key="MinDBConnections" value="20" />
     <add key="MaxDBConnections" value="20" />
     <add key="DAL" value="Trade.DALSQLServer" />
     <add key="ENABLE_GLOBAL_SYSTEM_DOT_TRANSACTIONS_CONFIGSTRING" value="true" />
     <add key="SYSTEMDOTTRANSACTION_TIMEOUT" value="30" />
     <add key="DISPLAYNUMBERORDERITERATIONS" value="3" />
+    <add key="CS_DOTNET_ENDPOINT_CONFIG_HTTP" value="ConfigClient_DotNet_BasicHttpBinding"/>
   </appSettings>
   <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
@@ -70,6 +67,20 @@
                behaviorConfiguration="OpsHost_MSec_Behavior">
       </service>
     </services>
+    
+    <!--********************************************************
+    
+    Config Service CLIENTS
+    
+    *********************************************************-->
+
+    <client>
+      <endpoint address="http://localhost:7000/tradeconfigservice"
+          contract="Trade.ConfigServiceContract.IConfigService"
+          binding="basicHttpBinding"
+          name="ConfigClient_DotNet_BasicHttpBinding" />
+    </client>
+    
     <!--********************************************************
         
     Config Service BINDINGS

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/OrderProcessorConsoleHost.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/OrderProcessorConsoleHost.csproj?rev=792384&r1=792383&r2=792384&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/OrderProcessorConsoleHost.csproj (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/OrderProcessorConsoleHost.csproj Thu Jul  9 03:37:55 2009
@@ -81,6 +81,10 @@
       <Project>{F67C8D85-6DC0-45CD-A748-636E3881E2F5}</Project>
       <Name>StockTraderDALFactory</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\common\DALSQLServer\StockTraderDALSQLServer.csproj">
+      <Project>{34C5AB90-E195-4BEE-A895-7AB1F81D552D}</Project>
+      <Name>StockTraderDALSQLServer</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\common\OrderProcessorServiceConfigurationSettings\OrderProcessorServiceConfigurationSettings.csproj">
       <Project>{B28867CC-DD77-4F17-BA01-92625C235F6C}</Project>
       <Name>OrderProcessorServiceConfigurationSettings</Name>

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorImplementation/OrderProcessorImplementation.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorImplementation/OrderProcessorImplementation.csproj?rev=792384&r1=792383&r2=792384&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorImplementation/OrderProcessorImplementation.csproj (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorImplementation/OrderProcessorImplementation.csproj Thu Jul  9 03:37:55 2009
@@ -79,10 +79,18 @@
       <Project>{EBB1604B-3F50-4A81-87C3-1AE4029EEEC6}</Project>
       <Name>BusinessServiceDataContract</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\common\ConfigClient\ConfigClient.csproj">
+      <Project>{D82DED61-E8CC-4530-A271-C74500ABBFA9}</Project>
+      <Name>ConfigClient</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\common\DALFactory\StockTraderDALFactory.csproj">
       <Project>{F67C8D85-6DC0-45CD-A748-636E3881E2F5}</Project>
       <Name>StockTraderDALFactory</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\common\DALSQLServer\StockTraderDALSQLServer.csproj">
+      <Project>{34C5AB90-E195-4BEE-A895-7AB1F81D552D}</Project>
+      <Name>StockTraderDALSQLServer</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\common\IDAL\StockTraderIDAL.csproj">
       <Project>{509EB16A-6586-4200-8323-32438C9B47DC}</Project>
       <Name>StockTraderIDAL</Name>
@@ -95,6 +103,18 @@
       <Project>{382E6E1C-E430-4F6C-BC41-5D84A3798B02}</Project>
       <Name>Utility</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\config_service\ConfigServiceConfigurationSettings\ConfigServiceConfigurationSettings.csproj">
+      <Project>{5A192168-838E-4DD1-A5E9-9EE191B941FE}</Project>
+      <Name>ConfigServiceConfigurationSettings</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\config_service\ConfigServiceContract\ConfigServiceContract.csproj">
+      <Project>{B0D086A8-B168-4DCD-8D2C-6F08CE159B5C}</Project>
+      <Name>ConfigServiceContract</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\config_service\ConfigServiceDataContract\ConfigServiceDataContract.csproj">
+      <Project>{82B5FA73-8A82-4DC0-B473-43B78543668B}</Project>
+      <Name>ConfigServiceDataContract</Name>
+    </ProjectReference>
     <ProjectReference Include="..\OrderProcessorContract\OrderProcessorContract.csproj">
       <Project>{1AD6DBB4-CA83-460F-BDCD-45E1ECE318B4}</Project>
       <Name>OrderProcessorContract</Name>

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorImplementation/ProcessOrder.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorImplementation/ProcessOrder.cs?rev=792384&r1=792383&r2=792384&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorImplementation/ProcessOrder.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorImplementation/ProcessOrder.cs Thu Jul  9 03:37:55 2009
@@ -48,6 +48,9 @@
 using Trade.OrderProcessorContract;
 using Trade.OrderProcessorServiceConfigurationSettings;
 using Trade.Utility;
+using Trade.ConfigClient;
+using Trade.ConfigServiceDataContract;
+
 
 namespace Trade.OrderProcessorImplementation
 {
@@ -59,8 +62,23 @@
         {
             try
             {
-                dalOrder = Trade.DALFactory.Order.Create(Settings.DAL);
-                dalOrder.Open(Settings.TRADEDB_SQL_CONN_STRING);
+                //Get the DB Config information from the database
+                //TODO: This should ideally use GetOPSConfig("DOTNET_OPS") but the DBConfig info will still be the same
+                var configClient = new ConfigServiceClient();
+                var bsRequest = new BSConfigRequest();
+                bsRequest.BSName = "DOTNET_BS";
+                var bsConfig = configClient.GetBSConfig(bsRequest);
+
+                if (bsConfig == null)
+                    throw new Exception(string.Format(StockTraderUtility.EXCEPTION_MESSAGE_BAD_CONFIG, bsRequest.BSName));
+
+                //Create instance of a DAL, which could be designed for any type of DB backend.
+                //TODO: Replace he hardcoded DAL String - perhaps include this info in the database?
+                dalOrder = Trade.DALFactory.Order.Create("Trade.DALSQLServer");
+                var connectionString = SQLHelper.GenerateSqlServerConnectionString(bsConfig.DBHostName, bsConfig.DBPort);
+                dalOrder.Open(connectionString);
+
+
                 decimal total = 0;
                 int holdingid = -1;
                 QuoteDataModel quote = dalOrder.getQuoteForUpdate(order.symbol);



Mime
View raw message