incubator-stonehenge-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drew...@apache.org
Subject svn commit: r770687 - in /incubator/stonehenge/trunk/stocktrader/dotnet: business_service/BusinessServiceConsole/ business_service/BusinessServiceImplementation/ business_service/OrderProcessorASyncClient/ common/BasicClient/
Date Fri, 01 May 2009 14:09:17 GMT
Author: drewbai
Date: Fri May  1 14:09:16 2009
New Revision: 770687

URL: http://svn.apache.org/viewvc?rev=770687&view=rev
Log:
[jira] Reopened: (STONEHENGE-39) Allow restart on .NET WCF Service Hosts

Apply V2 patch. 

Modified:
    incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/Program.cs
    incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceImplementation/TradeServiceFacadeWcf.cs
    incubator/stonehenge/trunk/stocktrader/dotnet/business_service/OrderProcessorASyncClient/OrderProcessorAsyncClient.cs
    incubator/stonehenge/trunk/stocktrader/dotnet/common/BasicClient/BasicClient.cs

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/Program.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/Program.cs?rev=770687&r1=770686&r2=770687&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/Program.cs
(original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/Program.cs
Fri May  1 14:09:16 2009
@@ -81,9 +81,10 @@
                 ////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)
});
 
-                Trade.BusinessServiceConfigurationSettings.Settings thisSettings = new Trade.BusinessServiceConfigurationSettings.Settings();
-                Trade.OrderProcessorServiceConfigurationSettings.Settings thisOPSSettings
= new Trade.OrderProcessorServiceConfigurationSettings.Settings();
-
+                // Initialize the Settings and Service
+                var thisSettings = new Trade.BusinessServiceConfigurationSettings.Settings();
+                var thisOPSSettings = new Trade.OrderProcessorServiceConfigurationSettings.Settings();
+                TradeServiceWcf.Initialize();
 
                 Uri TradeServiceUriBase = new Uri("http://" + myName + ":9000/tradebusinessservice");
 
@@ -161,9 +162,6 @@
                 if ((key.Modifiers & ConsoleModifiers.Control) != 0
                     && key.Key == ConsoleKey.R)
                 {
-                    // create a new object to reload the static data.
-                    var settings =
-                        new Trade.BusinessServiceConfigurationSettings.Settings();
                     return true;
                 }
                 if (key.Key == ConsoleKey.Enter || key.Key == ConsoleKey.Escape)

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceImplementation/TradeServiceFacadeWcf.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceImplementation/TradeServiceFacadeWcf.cs?rev=770687&r1=770686&r2=770687&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceImplementation/TradeServiceFacadeWcf.cs
(original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceImplementation/TradeServiceFacadeWcf.cs
Fri May  1 14:09:16 2009
@@ -36,6 +36,7 @@
 using Trade.BusinessServiceConfigurationSettings;
 using Trade.BusinessServiceDataContract;
 using Trade.BusinessServiceContract;
+using Trade.OrderProcessorAsyncClient;
 using Trade.Utility;
 
 namespace Trade.BusinessServiceImplementation
@@ -188,5 +189,10 @@
             }
             return inputString;
         }
+
+        public static void Initialize()
+        {
+            TradeOrderServiceAsyncClient.Initialize();
+        }
     }
 }
\ No newline at end of file

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/business_service/OrderProcessorASyncClient/OrderProcessorAsyncClient.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/business_service/OrderProcessorASyncClient/OrderProcessorAsyncClient.cs?rev=770687&r1=770686&r2=770687&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/business_service/OrderProcessorASyncClient/OrderProcessorAsyncClient.cs
(original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/business_service/OrderProcessorASyncClient/OrderProcessorAsyncClient.cs
Fri May  1 14:09:16 2009
@@ -184,5 +184,13 @@
                 throw;
             }
         }
+
+        /// <summary>
+        /// A Static method that clears the cache of the Client Service
+        /// </summary>
+        public static void Initialize()
+        {
+            Client.Client.ClearCache();
+        }
     }
 }
\ No newline at end of file

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/common/BasicClient/BasicClient.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/common/BasicClient/BasicClient.cs?rev=770687&r1=770686&r2=770687&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/common/BasicClient/BasicClient.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/common/BasicClient/BasicClient.cs Fri May
 1 14:09:16 2009
@@ -248,7 +248,7 @@
     /// </summary>
     public class Client
     {
-        public static Dictionary<string, ClientList> connectionDictionary;
+        private static Dictionary<string, ClientList> connectionDictionary;
         public ClientList connection;
         private string _clientConfig;
         private Type _type;
@@ -315,7 +315,11 @@
                 connection._connection.Channel = value;
             }
         }
+
+        public static void ClearCache()
+        {
+            connectionDictionary = null;
+        }
     }
 }
 
-
Mime
View raw message