incubator-stonehenge-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drew...@apache.org
Subject svn commit: r728157 - in /incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost: ./ App.config OrderProcessorConsoleHost.csproj Program.cs Properties/ Properties/AssemblyInfo.cs nettradericon.ico stocktrader.snk
Date Fri, 19 Dec 2008 21:43:24 GMT
Author: drewbai
Date: Fri Dec 19 13:43:24 2008
New Revision: 728157

URL: http://svn.apache.org/viewvc?rev=728157&view=rev
Log:
Initial commit

Added:
    incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/
    incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/App.config
    incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/OrderProcessorConsoleHost.csproj
    incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/Program.cs
    incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/Properties/
    incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/Properties/AssemblyInfo.cs
    incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/nettradericon.ico
  (with props)
    incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/stocktrader.snk
  (with props)

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/App.config
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/App.config?rev=728157&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/App.config
(added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/App.config
Fri Dec 19 13:43:24 2008
@@ -0,0 +1,153 @@
+<?xml version="1.0"?>
+<!-- You can change these settings (app.config) before compiling the application, or change
+     these settings in Trade.BusinessServiceHost.Config before running the application. 
+     Changing Trade.BusinessServiceHost.Config directly requires no re-compilation of the
application, as
+     they are picked up when the application is launched. 
+     
+     Note: As an alternative to hand editing this file you can use the 
+     Visual Studio XML editor admin tool to configure this file for your application. 
+-->
+<configuration>
+  <appSettings>
+    <!--This is the connection string to the Order Processor's Config Repository. All
app-specific config information
+        is centralized in the repository, and not specified in separate config files.
+        For a production application you should encrypt connection string information in
config files. See MSDN for details. -->
+    <add key="ORDER_PROCESSING_MODE" value="ASync_Http_MSecurity" />
+    <!--
+       //Valid Config Values for user-set "OrderMode" config setting.
+        public const string ORDER_STRING_Sync = "Sync_InProcess";
+        public const string ORDER_STRING_ASyncHttp = "ASync_Http";
+        public const string ORDER_STRING_ASyncHttpMSec = "ASync_Http_MSecurity";
+        public const string ORDER_STRING_WSO2_HTTP_MSEC = "ASync_WSO2_Java_Http_MSecurity";
+
+    -->
+    <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" />
+  </appSettings>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+    </assemblyBinding>
+    <!-- Note: <gcServer enabled ="true"/> configures the .NET CLR garbage collection
mode.  
+               this mode is used to get the best peak throughput and performance of high-scale
+               .NET Server self-hosted applications. When running in Workstation GC mode
(the default), for example
+               .NET StockTrader exhibits up to 20% *less* peak throughput. You SHOULD NOT
alter the GC mode
+               in Web.Config for ASP.NET Web apps, however, as this setting is set automatically
within
+               ASP.NET worker processes for peak throughput based on the computer specifications
(number of CPUs) 
+               at .NET install-time.
+    -->
+    <gcServer enabled="true">
+    </gcServer>
+  </runtime>
+  <!-- system.service model is the new configuration section added with the release of
.NET 3.0 and
+       Windows Communication Foundation.  
+   -->
+  <system.serviceModel>
+    <!--This enables the WCF ServiceModel performance counters for this application.-->
+    <!--<diagnostics performanceCounters="All"></diagnostics>-->
+    <!--The <services> section configures the WCF services that the .NET Stock Order
Processor will host.
+    Note that StockTrader uses the configuration files only to specify base service names
and their bindings.
+    Base addresses and Service/Client endpoints are created programmatically at runtime.-->
+    <services>
+      <service name="Trade.OrderProcessorImplementation.OrderProcessor" behaviorConfiguration="OPS_M_Security_Behavior">
+      </service>
+      <!--<service name="Trade.OrderProcessorImplementation.OrderProcessor" behaviorConfiguration="TradeServiceBehaviors">
+      </service>
+      <service name="Trade.OrderProcessorHostConfigurationImplementation.ConfigurationService"
/>
+      <service name="ConfigService.ServiceNodeCommunicationImplementation.NodeCommunication"
/> -->
+    </services>
+    <!--********************************************************BEGIN CONFIG SERVICE TEMPLATE
BINDINGS*****************************************************-->
+    <bindings>
+      <!--BEGIN basicHttpBindings-->
+      <basicHttpBinding>
+        <!--THESE ARE TEMPLATE PRIMARY SERVICE HOST BINDINGS.  TO AUGMENT, ADD WITH PREFIX
'Host_'-->
+        <binding name="Host_BasicHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:30:00" sendTimeout="00:1:00" allowCookies="true" bypassProxyOnLocal="true"
hostNameComparisonMode="StrongWildcard" maxBufferSize="1048576" maxBufferPoolSize="10485768"
maxReceivedMessageSize="1048576" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
+          <readerQuotas maxDepth="512" maxStringContentLength="262144" maxArrayLength="262144"
maxBytesPerRead="65536" maxNameTableCharCount="262144" />
+          <security mode="None">
+            <transport clientCredentialType="None" proxyCredentialType="None" realm=""
/>
+            <message clientCredentialType="Certificate" algorithmSuite="Default" />
+          </security>
+        </binding>
+      </basicHttpBinding>
+      <!--BEGIN wsHttpBindings-->
+      <wsHttpBinding>
+        <binding name="Host_WsHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:30:00" sendTimeout="00:1:00" allowCookies="true" maxReceivedMessageSize="65536"
hostNameComparisonMode="StrongWildcard" messageEncoding="Text" textEncoding="utf-8" bypassProxyOnLocal="true"
transactionFlow="false">
+          <readerQuotas maxDepth="512" maxStringContentLength="262144" maxArrayLength="262144"
maxBytesPerRead="65536" maxNameTableCharCount="262144" />
+          <reliableSession enabled="false" ordered="true" inactivityTimeout="00:10:00"
/>
+          <security mode="None">
+            <transport clientCredentialType="None" proxyCredentialType="None" realm=""
/>
+            <message clientCredentialType="Certificate" negotiateServiceCredential="true"
algorithmSuite="Default" />
+          </security>
+        </binding>
+        <binding name="Host_WsHttpBinding_M_Security_OPS" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:30:00" sendTimeout="00:1:00" allowCookies="true" maxReceivedMessageSize="65536"
hostNameComparisonMode="StrongWildcard" messageEncoding="Text" textEncoding="utf-8" bypassProxyOnLocal="true"
transactionFlow="false">
+          <readerQuotas maxDepth="512" maxStringContentLength="262144" maxArrayLength="262144"
maxBytesPerRead="65536" maxNameTableCharCount="262144" />
+          <reliableSession enabled="false" ordered="true" inactivityTimeout="00:10:00"
/>
+          <security mode="Message">
+            <transport clientCredentialType="None" proxyCredentialType="None" realm=""
/>
+            <message clientCredentialType="Certificate" negotiateServiceCredential="true"
algorithmSuite="Default" />
+          </security>
+        </binding>
+      </wsHttpBinding>
+    </bindings>
+    <!--*******************************************BEGIN CONFIG SERVICE TEMPLATE SERVICE
BEHAVIORS****************************************-->
+    <!--Service Behaviors are applied (at the service level) to services that specify
them, hence apply to ALL ENDPOINTS FOR A SERVICE HOST/VHOST -->
+    <behaviors>
+      <serviceBehaviors>
+        <behavior name="DefaultBehavior">
+          <serviceMetadata httpGetEnabled="true" />
+        </behavior>
+        <behavior name="TradeServiceBehaviors">
+          <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true"
/>
+          <serviceThrottling maxConcurrentInstances="400" maxConcurrentCalls="400" maxConcurrentSessions="100"
/>
+        </behavior>
+        <behavior name="OPS_M_Security_Behavior">
+          <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true"
/>
+          <serviceThrottling maxConcurrentInstances="400" maxConcurrentCalls="400" maxConcurrentSessions="100"
/>
+          <serviceCredentials>
+            <serviceCertificate findValue="OPS.Com" x509FindType="FindBySubjectName" storeLocation="LocalMachine"
storeName="TrustedPeople" />
+            <clientCertificate>
+              <authentication certificateValidationMode="Custom" customCertificateValidatorType="Trade.OrderProcessorImplementation.CustomCertValidator,
Trade.OrderProcessorImplementation" revocationMode="Online" trustedStoreLocation="LocalMachine"
/>
+            </clientCertificate>
+          </serviceCredentials>
+        </behavior>
+      </serviceBehaviors>
+      <!--BEGIN CONFIG SERVICE TEMPLATE ENDPOINT BEHAVIORS-->
+      <!--Endpint Behaviors are applied at the individual endpoint level.-->
+      <endpointBehaviors>
+        <behavior name="ClientCertificateBehavior">
+          <clientCredentials>
+            <serviceCertificate>
+              <authentication certificateValidationMode="PeerOrChainTrust" />
+            </serviceCertificate>
+          </clientCredentials>
+        </behavior>
+        <behavior name="OPS_ClientCertificateBehavior">
+          <clientCredentials>
+            <clientCertificate findValue="OPS.Com" x509FindType="FindBySubjectName" storeLocation="LocalMachine"
storeName="TrustedPeople">
+            </clientCertificate>
+          </clientCredentials>
+        </behavior>
+      </endpointBehaviors>
+    </behaviors>
+    <!--END CONFIG SERVICE TEMPLATE BEHAVIORS-->
+  </system.serviceModel>
+  <system.web>
+    <membership defaultProvider="ClientAuthenticationMembershipProvider">
+      <providers>
+        <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
serviceUri="" />
+      </providers>
+    </membership>
+    <roleManager defaultProvider="ClientRoleProvider" enabled="true">
+      <providers>
+        <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
serviceUri="" cacheTimeout="86400" />
+      </providers>
+    </roleManager>
+  </system.web>
+</configuration>
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/OrderProcessorConsoleHost.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/OrderProcessorConsoleHost.csproj?rev=728157&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/OrderProcessorConsoleHost.csproj
(added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/OrderProcessorConsoleHost.csproj
Fri Dec 19 13:43:24 2008
@@ -0,0 +1,113 @@
+<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>{E0A01A0E-6EF9-4826-B1AE-51B281739AF2}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Trade.OrderProcessorConsoleHost</RootNamespace>
+    <AssemblyName>Trade.OrderProcessorConsoleHost</AssemblyName>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>stocktrader.snk</AssemblyOriginatorKeyFile>
+    <StartupObject>Trade.OrderProcessorConsoleHost.OrderProcessor_ConsoleHost</StartupObject>
+    <ApplicationIcon>nettradericon.ico</ApplicationIcon>
+    <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.Configuration" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <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.Web.Extensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml" />
+    <Reference Include="Trade.DALSQLServer, Version=2.0.2.0, Culture=neutral, PublicKeyToken=aaca655dc76c580b,
processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\SharedLibraries\Trade.DALSQLServer.dll</HintPath>
+    </Reference>
+    <Reference Include="Trade.OrderProcessorContract, Version=2.0.2.0, Culture=neutral,
PublicKeyToken=aaca655dc76c580b, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\SharedLibraries\Trade.OrderProcessorContract.dll</HintPath>
+    </Reference>
+    <Reference Include="Trade.OrderProcessorImplementation, Version=2.0.2.0, Culture=neutral,
PublicKeyToken=aaca655dc76c580b, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\SharedLibraries\Trade.OrderProcessorImplementation.dll</HintPath>
+    </Reference>
+    <Reference Include="Trade.OrderProcessorServiceConfigurationSettings, Version=2.0.2.0,
Culture=neutral, PublicKeyToken=aaca655dc76c580b, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\SharedLibraries\Trade.OrderProcessorServiceConfigurationSettings.dll</HintPath>
+    </Reference>
+    <Reference Include="Trade.Utility, Version=2.0.2.0, Culture=neutral, PublicKeyToken=aaca655dc76c580b,
processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\SharedLibraries\Trade.Utility.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="App.config" />
+    <Content Include="stocktrader.snk" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="nettradericon.ico" />
+  </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>copy "$(TargetPath)" ..\..\..\..\SharedLibraries
+copy "$(TargetDir)$(TargetName).pdb"  ..\..\..\..\SharedLibraries
+copy "$(TargetDir)$(TargetName).exe.config" ..\..\..\..\SharedLibraries
+</PostBuildEvent>
+  </PropertyGroup>
+</Project>
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/Program.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/Program.cs?rev=728157&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/Program.cs
(added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/Program.cs
Fri Dec 19 13:43:24 2008
@@ -0,0 +1,107 @@
+//  .Net StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design
Considerations for Service-Oriented Applications
+
+//======================================================================================================
+// This is one of two optional host programs for the Order Processor Service .  In this case
a Console  
+// application.  You can also optionally run the Windows host.  
+//======================================================================================================
+//======================================================================================================
+// 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.OrderProcessorServiceConfigurationSettings;
+using Trade.OrderProcessorContract;
+using Trade.OrderProcessorImplementation;
+using Trade.Utility;
+
+
+namespace Trade.OrderProcessorConsoleHost
+{
+    class OrderProcessor_ConsoleHost
+    {
+        //private static EndPointBehaviors endpointBehaviorList;
+        //public static List<ServiceHostInfo> startupList;
+
+        /// <summary>p
+        /// The program entry class. Note how this simply inherits from the provided base
class.
+        /// </summary>
+        class MyHost 
+        {
+           
+            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(IOrderProcessor)
});
+
+                Settings thisSettings = new Settings();
+
+                Uri TradeServiceUriBase = new Uri("http://" + myName + ":8000/tradeorderprocessor");
+
+                //Create a ServiceHost for the Orderprocessor service.
+                Type serviceType = typeof(OrderProcessor);
+                ServiceHost 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_BasicHttpBinding");
+                WSHttpBinding wsHttpBinding = new WSHttpBinding("Host_WsHttpBinding_M_Security_OPS");
+                host.AddServiceEndpoint(typeof(IOrderProcessor), httpBinding, "");
+                host.AddServiceEndpoint(typeof(IOrderProcessor), wsHttpBinding, "msec");
+
+                //Describe for Console output
+                StockTraderUtility.DescribeService(host); 
+                
+                return host;
+            }
+        }
+
+        [STAThread]
+        static void Main(string[] args)
+        {
+            Console.SetWindowSize(Console.LargestWindowWidth - 30, Console.LargestWindowHeight
- 30);
+            Console.Title = ".NET StockTrader Order Processor Service Host";
+            MyHost myHost = new MyHost();
+            myHost.startUp();
+
+            Console.WriteLine(" ORDER_PROCESSING_MODE is currently = {0}\n", Settings.ORDER_PROCESSING_MODE);
+            
+            Console.WriteLine(" {0} is started.\n Press any key to quit. ", Console.Title);
+            Console.ReadLine();
+        }
+    }
+}

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/Properties/AssemblyInfo.cs?rev=728157&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/Properties/AssemblyInfo.cs
(added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/Properties/AssemblyInfo.cs
Fri Dec 19 13:43:24 2008
@@ -0,0 +1,34 @@
+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.OrderProcessorConsoleHost")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct(".NET StockTrader")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2008")]
+[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("bdb9f470-2606-4784-9358-f46b5383964b")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("2.0.2.0")]
+[assembly: AssemblyFileVersion("2.0.2.0")]

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/nettradericon.ico
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/nettradericon.ico?rev=728157&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/nettradericon.ico
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/stocktrader.snk
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/stocktrader.snk?rev=728157&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/OrderProcessorConsoleServiceHost/stocktrader.snk
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message