1) Modified proxy generator to generate web service proxies that can work with WSDK

rg2023 [2002-12-09 20:49:32]
1) Modified proxy generator to generate web service proxies that can work with WSDK
2) Modified DynamicRequest class, no need to specify base url property
3) Refactored *DAO.cs, changed SQL querystring building use StringBuilder not string
4) Added GatekeeperSettings class
5) Modified Gatekeeper to integrate with PSL.AsyncCore classes added new ExecuteMultipleServiceMethods method
6) Removed DConst.cs this is now Constants.cs
Filename
csharpsrc/DISCUS/AssemblyInfo.cs
csharpsrc/DISCUS/Constants.cs
csharpsrc/DISCUS/DConst.cs
csharpsrc/DISCUS/DISCUS.csproj
csharpsrc/DISCUS/DISCUS.suo
csharpsrc/DISCUS/DynamicRequest.cs
csharpsrc/DISCUS/EvtLoggerImpl.cs
csharpsrc/DISCUS/EvtTracerImpl.cs
csharpsrc/DISCUS/GateKeeper.cs
csharpsrc/DISCUS/GatekeeperSettings.cs
csharpsrc/DISCUS/ILogger.cs
csharpsrc/DISCUS/ITracer.cs
csharpsrc/DISCUS/InternalRegistry.cs
csharpsrc/DISCUS/LogTraceContext.cs
csharpsrc/DISCUS/LoggerImpl.cs
csharpsrc/DISCUS/ProxyGen.cs
csharpsrc/DISCUS/RegServiceDAO.cs
csharpsrc/DISCUS/ServiceSpaceDAO.cs
csharpsrc/DISCUS/TracerImpl.cs
csharpsrc/DISCUS/UrlLoggerImpl.cs
csharpsrc/DISCUS/UrlTracerImpl.cs
diff --git a/csharpsrc/DISCUS/AssemblyInfo.cs b/csharpsrc/DISCUS/AssemblyInfo.cs
index 8c3b60b..e37a7f6 100644
--- a/csharpsrc/DISCUS/AssemblyInfo.cs
+++ b/csharpsrc/DISCUS/AssemblyInfo.cs
@@ -28,7 +28,23 @@ using System.Runtime.CompilerServices;
 // You can specify all the values or you can default the Revision and Build Numbers
 // by using the '*' as shown below:

-[assembly: AssemblyVersion("1.0.917.28228")]
+[assembly: AssemblyVersion("1.1.1030.33055")]
+
+/// Initial version 1.0.917.28228
+///
+/// Changed 10/27/02 to 1.1.1030.33055
+/// Main Changes: 1) Integration with of Async library PSL.Async
+///				  2) Bulk operation interfaces ExecuteMultipleServiceMethods
+///				  3) New protocol for ExecuteServiceMethod and
+///					 ExecuteMultipleServiceMethods returns an array of strings
+///					 where the first two array positions contain a status code
+///					 and a status message.
+///				  4) Added new web service proxy generator and proxy mutator objects
+///
+///	Breaking changes from previous version
+///	1)	Change of protocol for ExecuteServiceMethod now returns string[] instead of
+///		string.
+

 //
 // In order to sign your assembly you must specify a key to use. Refer to the
diff --git a/csharpsrc/DISCUS/Constants.cs b/csharpsrc/DISCUS/Constants.cs
new file mode 100644
index 0000000..e43b1d9
--- /dev/null
+++ b/csharpsrc/DISCUS/Constants.cs
@@ -0,0 +1,37 @@
+
+using System;
+using PSL.DISCUS.Logging;
+
+// DISCUS system constants
+namespace PSL.DISCUS
+{
+	/// <summary>
+	/// DISCUS Constants (system wide constants)
+	/// </summary>
+	public abstract class Constants
+	{
+		// Set System Defaults
+
+		public const string DEFAULT_GATEKEEPER_NAME = "Gatekeeper";
+		public const string DEFAULT_PROXY_CACHE = "PxyCache";
+		public const string DEFAULT_DBASE_CONNECT = "DSN=DISCUS";
+		public const bool DEFAULT_TRACE_ON = false;
+		public const enuLoggingType DEFAULT_LOGGING_TYPE = enuLoggingType.EventLog;
+		public const enuTracingType DEFAULT_TRACING_TYPE = enuTracingType.None;
+
+		// Logging Constants
+		public const string EVENT_LOGGING = "EventLog";
+		public const string URL_LOGGING = "UrlLog";
+		public const string WEB_SERVICE_LOGGING = "WebServiceLog";
+
+		// Tracing Constants
+		public const string EVENT_TRACING = "EventTrace";
+		public const string URL_TRACING = "UrlTrace";
+		public const string WEB_SERVICE_TRACING = "WebServiceTrace";
+
+		// Logging/Tracing Message constants
+		public const string ERROR_MSG_TYPE = "Error";
+		public const string INFO_MSG_TYPE = "Info";
+		public const string WARNING_MSG_TYPE = "Warning";
+	}
+}
diff --git a/csharpsrc/DISCUS/DConst.cs b/csharpsrc/DISCUS/DConst.cs
deleted file mode 100644
index ad3f75b..0000000
--- a/csharpsrc/DISCUS/DConst.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-
-using System;
-// DISCUS system constants
-namespace PSL.DISCUS
-{
-	/// <summary>
-	/// DISCUS Constants (system wide constants)
-	/// </summary>
-	public abstract class DConst
-	{
-		// Contains system wide settings e.g location of
-		// Dynamic Proxy Cache
-		public static string DISCUSCONFIG_FILE = "DiscusConf.xml";
-		public static string DEFAULT_PXY_DIR = "PxyCache";
-		// Database configuration file, contains dbase connection
-		// string etc.
-		public static string DBASECONFIG_FILE = "DataConfig.xml";
-
-		// Logging Constants
-		public static string EVENT_LOGGING = "EventLog";
-		public static string URL_LOGGING = "UrlLog";
-		public static string WEB_SERVICE_LOGGING = "WebServiceLog";
-
-		// Tracing Constants
-		public static string EVENT_TRACING = "EventTrace";
-		public static string URL_TRACING = "UrlTrace";
-		public static string WEB_SERVICE_TRACING = "WebServiceTrace";
-
-		// Logging/Tracing Message constants
-		public static string ERROR_MSG_TYPE = "Error";
-		public static string INFO_MSG_TYPE = "Info";
-		public static string WARNING_MSG_TYPE = "Warning";
-
-	}
-}
diff --git a/csharpsrc/DISCUS/DISCUS.csproj b/csharpsrc/DISCUS/DISCUS.csproj
index eb7242c..387ef46 100644
--- a/csharpsrc/DISCUS/DISCUS.csproj
+++ b/csharpsrc/DISCUS/DISCUS.csproj
@@ -102,22 +102,17 @@
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "DataConfig.xml"
-                    Link = "..\..\bin\DataConfig.xml"
-                    BuildAction = "Content"
-                />
-                <File
-                    RelPath = "DbaseConstants.cs"
+                    RelPath = "Constants.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "DBUtil.cs"
+                    RelPath = "DbaseConstants.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "DConst.cs"
+                    RelPath = "DBUtil.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
@@ -127,11 +122,6 @@
                     BuildAction = "Content"
                 />
                 <File
-                    RelPath = "DiscusConf.xml"
-                    Link = "..\..\bin\DiscusConf.xml"
-                    BuildAction = "Content"
-                />
-                <File
                     RelPath = "DynamicRequest.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
@@ -167,6 +157,11 @@
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "GatekeeperSettings.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "IDataObj.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
@@ -257,10 +252,6 @@
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "SampleDAMLWF.xml"
-                    BuildAction = "Content"
-                />
-                <File
                     RelPath = "ServiceSpaceDAO.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
diff --git a/csharpsrc/DISCUS/DISCUS.suo b/csharpsrc/DISCUS/DISCUS.suo
index bb8be69..d4126fd 100644
Binary files a/csharpsrc/DISCUS/DISCUS.suo and b/csharpsrc/DISCUS/DISCUS.suo differ
diff --git a/csharpsrc/DISCUS/DynamicRequest.cs b/csharpsrc/DISCUS/DynamicRequest.cs
index 0d4b7c3..d3ead81 100644
--- a/csharpsrc/DISCUS/DynamicRequest.cs
+++ b/csharpsrc/DISCUS/DynamicRequest.cs
@@ -8,69 +8,55 @@ namespace PSL.DISCUS.DynamicProxy
 	/// </summary>
 	public class DynamicRequest
 	{
-		private string m_strWSDLFile; // URL to WSDL file
-		private string m_strServiceName; // Name of service (class)
-		private string m_strDynNamespace; // Namespace to use
-		private string m_strFilenameSource; // Code file to generate
-		private string m_strProtocol; // Protocol to use (SOAP, HTTP Get or HTTP Post )
-		private string m_strProxyPath; // Path where proxy generated
-		private string m_strBaseURL;
-		public static string DEFAULT_PROXY_NAMESPACE = "DynamicPxy";
-
+		private string m_strWSDLFile = ""; // URL to WSDL file
+		private string m_strServiceName = ""; // Name of service (class)
+		private string m_strDynNamespace = DEFAULT_PROXY_NAMESPACE; // Namespace to use
+		private string m_strFilenameSource = ""; // Code file to generate
+		private string m_strProtocol = SOAPProtocol; // Protocol to use (SOAP, HTTP Get or HTTP Post )
+		private string m_strProxyPath = ""; // Path where proxy generated
+
+		public const string DEFAULT_PROXY_NAMESPACE = "DynamicPxy";
 		// Request protocols, Default = SOAPProtocol
-		public static string SOAPProtocol = "SOAP";
-		public static string HTTPGetProtocol = "HTTP GET";
-		public static string HTTPPostProtocol = "HTTP POST";
+		public const string SOAPProtocol = "SOAP";
+		public const string HTTPGetProtocol = "HTTP GET";
+		public const string HTTPPostProtocol = "HTTP POST";

 		public DynamicRequest()
 		{
-			m_strWSDLFile = "";
-			m_strServiceName = "";
-			m_strDynNamespace = DEFAULT_PROXY_NAMESPACE; // Default namespace
-			m_strFilenameSource = "";
-			m_strProtocol = DynamicRequest.SOAPProtocol; // Default request protocol
-			m_strBaseURL = "";
 		}
-

 		// Properties (gets and sets)
-		public string wsdlFile
+		public string WsdlFile
 		{
 			get { return m_strWSDLFile; }
 			set { m_strWSDLFile = value; }
 		}

-		public string baseURL
-		{
-			get { return m_strBaseURL; }
-			set { m_strBaseURL = value; }
-		}
-
-		public string serviceName
+		public string ServiceName
 		{
 			get { return m_strServiceName; }
 			set { m_strServiceName = value; }
 		}

-		public string dynNamespace
+		public string DynNamespace
 		{
 			get { return m_strDynNamespace; }
 			set { m_strDynNamespace = value; }
 		}

-		public string filenameSource
+		public string FilenameSource
 		{
 			get { return m_strFilenameSource; }
 			set { m_strFilenameSource = value; }
 		}

-		public string proxyPath
+		public string ProxyPath
 		{
 			get { return m_strProxyPath; }
 			set { m_strProxyPath = value; }
 		}

-		public string protocol
+		public string Protocol
 		{
 			get { return m_strProtocol; }
 			set { m_strProtocol = value; }
diff --git a/csharpsrc/DISCUS/EvtLoggerImpl.cs b/csharpsrc/DISCUS/EvtLoggerImpl.cs
index ced905a..6bdeede 100644
--- a/csharpsrc/DISCUS/EvtLoggerImpl.cs
+++ b/csharpsrc/DISCUS/EvtLoggerImpl.cs
@@ -8,56 +8,38 @@ namespace PSL.DISCUS.Logging
 	/// </summary>
 	public class EvtLoggerImpl:LoggerImpl
 	{
-		private EventLog m_EvtLogger;
-
-		public override string Source
-		{
-			get
-			{ return m_strSource; }
-
-			set
-			{
-				m_strSource = value;
-				if( m_strSource.Length == 0 )
-					throw new Exception( "Invalid Logging Source Specified" );
-				m_EvtLogger.Source = m_strSource;
-			}
-		}
-
 		public EvtLoggerImpl( LogTraceContext ctx )
 		{
-			// Create new Application Event Log instance
-			m_EvtLogger = new EventLog( "Application" );
 		}

-		public override void LogError( string strMsg )
+		public override void LogError( string strSource, string strMsg )
 		{
 			// If no source specified throw exception
-			if( m_strSource.Length == 0 )
+			if( strSource.Length == 0 )
 				throw new Exception( "No Logging Source Specified" );

 			// Write to event log
-			m_EvtLogger.WriteEntry( strMsg, EventLogEntryType.Error );
+			EventLog.WriteEntry( strSource, strMsg, EventLogEntryType.Error );
 		}

-		public override void LogInfo( string strMsg )
+		public override void LogInfo( string strSource, string strMsg )
 		{
 			// If no source specified throw exception
-			if( m_strSource.Length == 0 )
+			if( strSource.Length == 0 )
 				throw new Exception( "No Logging Source Specified" );

 			// Write to event log
-			m_EvtLogger.WriteEntry( strMsg, EventLogEntryType.Information );
+			EventLog.WriteEntry( strSource, strMsg, EventLogEntryType.Information );
 		}

-		public override void LogWarning( string strMsg )
+		public override void LogWarning( string strSource, string strMsg )
 		{
 			// If no source specified throw exception
-			if( m_strSource.Length == 0 )
+			if( strSource.Length == 0 )
 				throw new Exception( "No Logging Source Specified" );

 			// Write to event log
-			m_EvtLogger.WriteEntry( strMsg, EventLogEntryType.Warning );
+			EventLog.WriteEntry( strSource, strMsg, EventLogEntryType.Warning );
 		}
 	}
 }
diff --git a/csharpsrc/DISCUS/EvtTracerImpl.cs b/csharpsrc/DISCUS/EvtTracerImpl.cs
index 0762711..acb5034 100644
--- a/csharpsrc/DISCUS/EvtTracerImpl.cs
+++ b/csharpsrc/DISCUS/EvtTracerImpl.cs
@@ -8,55 +8,38 @@ namespace PSL.DISCUS.Logging
 	/// </summary>
 	public class EvtTracerImpl:TracerImpl
 	{
-		private EventLog m_EvtLogger;
-
-		public override string Source
-		{
-			get
-			{ return m_strSource; }
-
-			set
-			{
-				m_strSource = value;
-				if( m_strSource.Length == 0 )
-					throw new Exception( "Invalid Tracing Source Specified" );
-				m_EvtLogger.Source = m_strSource;
-			}
-		}
-
 		public EvtTracerImpl( LogTraceContext ctx )
 		{
-			m_EvtLogger = new EventLog( "Application" );
 		}

-		public override void TraceError( string strMsg )
+		public override void TraceError( string strSource, string strMsg )
 		{
 			// If no source specified throw exception
-			if( m_strSource.Length == 0 )
+			if( strSource.Length == 0 )
 				throw new Exception( "No Tracing Source Specified" );

 			// Write to event log
-			m_EvtLogger.WriteEntry( strMsg, EventLogEntryType.Error );
+			EventLog.WriteEntry( strSource, strMsg, EventLogEntryType.Error );
 		}

-		public override void TraceInfo( string strMsg )
+		public override void TraceInfo( string strSource, string strMsg )
 		{
 			// If no source specified throw exception
-			if( m_strSource.Length == 0 )
+			if( strSource.Length == 0 )
 				throw new Exception( "No Tracing Source Specified" );

 			// Write to event log
-			m_EvtLogger.WriteEntry( strMsg, EventLogEntryType.Information );
+			EventLog.WriteEntry( strSource, strMsg, EventLogEntryType.Information );
 		}

-		public override void TraceWarning( string strMsg )
+		public override void TraceWarning( string strSource, string strMsg )
 		{
 			// If no source specified throw exception
-			if( m_strSource.Length == 0 )
+			if( strSource.Length == 0 )
 				throw new Exception( "No Tracing Source Specified" );

 			// Write to event log
-			m_EvtLogger.WriteEntry( strMsg, EventLogEntryType.Warning );
+			EventLog.WriteEntry( strSource, strMsg, EventLogEntryType.Warning );
 		}

 	}
diff --git a/csharpsrc/DISCUS/GateKeeper.cs b/csharpsrc/DISCUS/GateKeeper.cs
index 84f69eb..ed92529 100644
--- a/csharpsrc/DISCUS/GateKeeper.cs
+++ b/csharpsrc/DISCUS/GateKeeper.cs
@@ -11,8 +11,6 @@ using PSL.DISCUS.Interfaces;
 using PSL.DISCUS.DataAccess;
 using PSL.DISCUS.DynamicProxy;
 using PSL.DISCUS.Logging;
-
-using System.Threading;
 using PSL.AsyncCore;

 // DISCUS GateKeeper package
@@ -112,35 +110,13 @@ namespace PSL.DISCUS
 		// Fields

 		/// <summary>
-		/// get/set Gatekeeper name
-		/// </summary>
-		private string m_strName = "";
-
-		/// <summary>
-		/// get/set Location where dynamically generated proxies are stored
+		/// Threadsafe settings object
 		/// </summary>
-		private string m_strPxyCacheDir = "";
-
-		/// <summary>
-		/// get/set Config file name
-		/// </summary>
-		private string CONFIG = DConst.DISCUSCONFIG_FILE;
-
-		/// <summary>
-		/// get/set(true/false) tracing
-		/// </summary>
-		private bool m_bTraceOn = false;
-
-		/// <summary>
-		/// LogTrace context
-		/// </summary>
-		private LogTraceContext m_logCtx = new LogTraceContext();
-
-		/// <summary>
-		/// LogTrace context
-		/// </summary>
-		private LogTraceContext m_traceCtx = new LogTraceContext();
+		private GatekeeperSettings m_settings = new GatekeeperSettings();

+		/*****************************************************************/
+		// Clean up log trace infrastructure - objects need to be threadsafe
+
 		/// <summary>
 		/// Logger object
 		/// </summary>
@@ -151,22 +127,14 @@ namespace PSL.DISCUS
 		/// </summary>
 		private TracerImpl m_objTracer;

-		/// <summary>
-		/// get/set (true/false) Async facility setting
-		/// </summary>
-		private bool m_bUseAsync = false;
-
+		/*****************************************************************/
+
 		// Properties

-		/// <summary>
-		/// get/set (true/false) Async facility setting
-		/// </summary>
-		public bool UseAsync
+		public string CurrentDirectoryFromCodebase
 		{
 			get
-			{ return m_bUseAsync; }
-			set
-			{ m_bUseAsync = value; }
+			{ return Assembly.GetExecutingAssembly().CodeBase; }
 		}

 		/// <summary>
@@ -175,14 +143,11 @@ namespace PSL.DISCUS
 		public string Name
 		{
 			get
-			{ return m_strName; }
+			{ return m_settings.GatekeeperName; }
 			set
 			{
 				// Set GK name
-				m_strName = value;
-				// Update logging & tracing facilities
-				m_objLogger.Source = m_strName;
-				m_objTracer.Source = m_strName;
+				m_settings.GatekeeperName = value;
 			}
 		}

@@ -192,31 +157,79 @@ namespace PSL.DISCUS
 		public string ProxyCache
 		{
 			get
-			{ return m_strPxyCacheDir; }
+			{ return m_settings.ProxyCache; }
 			set
-			{ m_strPxyCacheDir = value; }
+			{ m_settings.ProxyCache = value; }
 		}

 		/// <summary>
-		/// get/set Config file name
+		/// get/set(true/false) tracing
 		/// </summary>
-		public string ConfigFile
+		public bool TraceOn
 		{
 			get
-			{ return CONFIG; }
+			{ return m_settings.TraceOn; }
 			set
-			{ CONFIG = value; }
+			{ m_settings.TraceOn = value; }
 		}

 		/// <summary>
-		/// get/set(true/false) tracing
+		/// get/set the database connection string
 		/// </summary>
-		public bool TraceOn
+		public string DatabaseConnectString
+		{
+			get
+			{ return this.m_settings.DatabaseConnectString; }
+			set
+			{ this.m_settings.DatabaseConnectString = value; }
+		}
+
+		public enuLoggingType LoggingType
+		{
+			get
+			{ return this.m_settings.LoggingType; }
+			set
+			{ this.m_settings.LoggingType = value; }
+		}
+
+		public enuTracingType TracingType
+		{
+			get
+			{ return this.m_settings.TracingType; }
+			set
+			{ this.m_settings.TracingType = value; }
+		}
+
+		public string UrlLoggingHostname
+		{
+			get
+			{ return this.m_settings.UrlLoggingHostname; }
+			set
+			{ this.m_settings.UrlLoggingHostname = value; }
+		}
+
+		public int UrlLoggingPort
+		{
+			get
+			{ return this.m_settings.UrlLoggingPort; }
+			set
+			{ this.m_settings.UrlLoggingPort = value; }
+		}
+
+		public string UrlTracingHostname
+		{
+			get
+			{ return this.m_settings.UrlTracingHostname; }
+			set
+			{ this.m_settings.UrlTracingHostname = value; }
+		}
+
+		public int UrlTracingPort
 		{
 			get
-			{ return m_bTraceOn; }
+			{ return this.m_settings.UrlTracingPort; }
 			set
-			{ m_bTraceOn = value; }
+			{ this.m_settings.UrlTracingPort = value; }
 		}

 		// Private inner class representing an AlphaProtocol execution
@@ -256,129 +269,112 @@ namespace PSL.DISCUS
 		{
 			try
 			{
-				//string strLoc = Assembly.GetExecutingAssembly().Location;
-
-
-
-				//string strCodebase = Assembly.GetExecutingAssembly().CodeBase;
-
-				// Read DISCUS config file
-				FileStream fs = File.Open( CONFIG, FileMode.Open );
-				TextReader tr = new StreamReader( fs );
-				string strConfigFile = tr.ReadToEnd();
-
-				// Load config file into XML document
-				XmlDocument doc = new XmlDocument();
-				doc.LoadXml( strConfigFile );
-
-				// Use XPath to extract what info we need
-				XmlNode root =  doc.DocumentElement;
-				// Get specific GateKeeper name
-				XmlNode currentNode = root.SelectSingleNode( "GateKeeperName" );
+				string strLocalPath = new Uri( Assembly.GetExecutingAssembly().CodeBase ).LocalPath;
+				this.m_settings.ProxyCache = new FileInfo( strLocalPath ).Directory.FullName + "\\" + Constants.DEFAULT_PROXY_CACHE;
+
+				// GatekeeperSettings object sets appropriate defaults
+				// Create logging and tracing objects based on appsettings data
+				LogTraceContext logCtx = new LogTraceContext();

-				if( currentNode != null )
-					m_strName = currentNode.InnerText;
-
-				// Set logging and tracing contexts
-
-				// Logging context info
-				currentNode = root.SelectSingleNode( "Logging/UrlLogging/Hostname" );
-				if( currentNode != null )
-					m_logCtx.Hostname = currentNode.InnerText;
-
-				currentNode = root.SelectSingleNode( "Logging/UrlLogging/Port" );
-				if( currentNode != null )
-					m_logCtx.Port = Int32.Parse( currentNode.InnerText );
+				// This data may or may not be set let the factory method
+				// CreateLoggingInstance handle it
+				logCtx.Hostname = this.UrlLoggingHostname;
+				logCtx.Port = this.UrlLoggingPort;

-				currentNode = root.SelectSingleNode( "Logging/WebServiceLogging/WSDL" );
-				if( currentNode != null )
-					m_logCtx.WebServiceWSDL = currentNode.InnerText;
+				this.m_objLogger = CreateLoggingInstance( this.LoggingType, logCtx );

-				currentNode = root.SelectSingleNode( "Logging/WebServiceLogging/AccessPoint" );
-				if( currentNode != null )
-					m_logCtx.WebServiceAccessPoint = currentNode.InnerText;
-
-				// Tracing context info
-				currentNode = root.SelectSingleNode( "Tracing/TraceOn" );
-				if( currentNode != null )
-					m_bTraceOn = ( currentNode.InnerText.ToLower().CompareTo( "true" ) == 0 );
-
-				currentNode = root.SelectSingleNode( "Tracing/UrlTracing/Hostname" );
-				if( currentNode != null )
-					m_traceCtx.Hostname = currentNode.InnerText;
-
-				currentNode = root.SelectSingleNode( "Tracing/UrlTracing/Port" );
-				if( currentNode != null )
-					m_traceCtx.Port = Int32.Parse( currentNode.InnerText );
-
-				currentNode = root.SelectSingleNode( "Tracing/WebServiceTracing/WSDL" );
-				if( currentNode != null )
-					m_traceCtx.WebServiceWSDL = currentNode.InnerText;
-
-				currentNode = root.SelectSingleNode( "Tracing/WebServiceTracing/AccessPoint" );
-				if( currentNode != null )
-					m_traceCtx.WebServiceAccessPoint = currentNode.InnerText;
-
-
-				// Determine the type of logging anf tracing facilities to use
-                string strLoggingType = "";
-				currentNode = root.SelectSingleNode( "Logging/LoggingType" );
-				if( currentNode == null || currentNode.InnerText.Length == 0 )
-					strLoggingType = DConst.EVENT_LOGGING;
-				else strLoggingType = currentNode.InnerText;
-
-				string strTracingType = "";
-				currentNode = root.SelectSingleNode( "Tracing/TracingType" );
-				if( currentNode == null || currentNode.InnerText.Length == 0 )
-					strTracingType = DConst.EVENT_TRACING;
-				else strTracingType = currentNode.InnerText;
-
-				// Gaurantees that some logging and tracing facility is available
-				m_objLogger = CreateLoggingInstance( strLoggingType, m_logCtx );
-				m_objTracer = CreateTracingInstance( strTracingType, m_traceCtx );
-
-				// Specific sourcename
-				if( m_strName.Length > 0 )
+				if( this.TraceOn )
 				{
-					m_objLogger.Source = m_strName;
-					m_objTracer.Source = m_strName;
+					LogTraceContext traceCtx = new LogTraceContext();
+
+					// This data may or may not be set let the factory method
+					// CreateTracingInstance handle it
+					traceCtx.Hostname = this.UrlTracingHostname;
+					traceCtx.Port = this.UrlTracingPort;
+
+					// Turn off tracing if invalid data passed in
+					if( traceCtx.Hostname.Length == 0 || this.UrlTracingPort == -1 )
+						this.TracingType = enuTracingType.None;
+
+					this.m_objTracer = CreateTracingInstance( this.TracingType, traceCtx );
 				}
-				else
+
+				// Determine whether ProxyCache Directory exists
+				// If it does not exist then we try to create it
+				bool bStatus = InitializeProxyCacheDir();
+				if( this.TraceOn )
 				{
-					m_objLogger.Source = "Gatekeeper";
-					m_objTracer.Source = "Gatekeeper";
+					if( bStatus )
+						TraceInfo( this.Name, "ProxyCache Initialized" );
+					else TraceError( this.Name, "ProxyCache NOT Initialized" );
 				}
+			}
+			catch( System.Exception e ) // Catch exception
+			{
+				// Report error
+				LogError( this.Name, e.Message );
+			}
+		}
+
+		/// <summary>
+		/// Ctor.
+		/// </summary>
+		/// <param name="settings">GatekeeperSettings object used to configure
+		/// the Gatekeeper</param>
+		public Gatekeeper( GatekeeperSettings settings )
+		{
+			// Set the Gatekeeper settings instance, this sets all the Gatekeeper
+			// public properties
+			if( settings == null )
+				LogInfo( this.Name, "settings parameter is null, creating Gatekeeper using defaults" );
+			else this.m_settings = settings;
+
+			try
+			{
+				// GatekeeperSettings object sets appropriate defaults
+				// Create logging and tracing objects based on appsettings data
+				LogTraceContext logCtx = new LogTraceContext();

-				// Find out where we store dynamic proxies
-				// if no dir specified create default
-				// proxy cache directory under the current directory
-				currentNode = root.SelectSingleNode( "ProxyCache" );
-
-				if( currentNode != null )
-					m_strPxyCacheDir = currentNode.InnerText;
-
-				if( m_strPxyCacheDir.Length == 0 )
-					m_strPxyCacheDir = DConst.DEFAULT_PXY_DIR;
+				// This data may or may not be set let the factory method
+				// CreateLoggingInstance handle it
+				logCtx.Hostname = this.UrlLoggingHostname;
+				logCtx.Port = this.UrlLoggingPort;
+
+				this.m_objLogger = CreateLoggingInstance( this.LoggingType, logCtx );

-				fs.Close(); // Close file stream
+				if( this.TraceOn )
+				{
+					LogTraceContext traceCtx = new LogTraceContext();
+
+					// This data may or may not be set let the factory method
+					// CreateTracingInstance handle it
+					traceCtx.Hostname = this.UrlTracingHostname;
+					traceCtx.Port = this.UrlTracingPort;
+
+					// Turn off tracing if invalid data passed in
+					if( traceCtx.Hostname.Length == 0 || this.UrlTracingPort == -1 )
+						this.TracingType = enuTracingType.None;
+
+					this.m_objTracer = CreateTracingInstance( this.TracingType, traceCtx );
+				}

 				// Determine whether ProxyCache Directory exists
 				// If it does not exist then we try to create it
 				bool bStatus = InitializeProxyCacheDir();
-				if( m_bTraceOn )
+				if( this.TraceOn )
 				{
 					if( bStatus )
-						TraceInfo( "ProxyCache Initialized" );
-					else TraceError( "ProxyCache NOT Initialized" );
+						TraceInfo( this.Name, "ProxyCache Initialized" );
+					else TraceError( this.Name, "ProxyCache NOT Initialized" );
 				}
 			}
 			catch( System.Exception e ) // Catch exception
 			{
 				// Report error
-				LogError( e.Message );
+				LogError( this.Name, e.Message );
 			}
 		}
-
+
 		/// <summary>
 		/// Function builds an Execution Queue (sequence of steps)
 		/// from an Alpha protocol
@@ -392,8 +388,8 @@ namespace PSL.DISCUS

 			try
 			{
-				if( m_bTraceOn )
-					TraceInfo( "About to build execQ from Alpha-Protocol" );// + strAlphaProtocol );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "About to build execQ from Alpha-Protocol" );// + strAlphaProtocol );

 				// Stage 1 - Verify alpha-protocol is valid
 				// Create XML text reader
@@ -485,11 +481,11 @@ namespace PSL.DISCUS
 			}
 			catch( Exception e )
 			{
-				LogError( e.Message );
+				LogError( this.Name, e.Message );
 			}

-			if( m_bTraceOn )
-				TraceInfo( "Built execQ: " + execQ.Count + " actions to perform" );
+			if( this.TraceOn )
+				TraceInfo( this.Name, "Built execQ: " + execQ.Count + " actions to perform" );

 			return execQ; // return Execution Queue
 		}// End BuildAlphaProtocolExecutionQ
@@ -509,8 +505,8 @@ namespace PSL.DISCUS
 			if( stkProviders.Count == 0 )
 				return null;

-			if( m_bTraceOn )
-				TraceInfo( "About to build treaty" );
+			if( this.TraceOn )
+				TraceInfo( this.Name, "About to build treaty" );

 			// Treaty to be returned
 			TreatyType treaty = null;
@@ -522,7 +518,7 @@ namespace PSL.DISCUS
 				// Get Client Service Space name
 				treaty.ClientServiceSpace = DEFAULT_CLIENT_SERVICE_SPACE;
 				// Get Provider Service Space name
-				treaty.ProviderServiceSpace = ( (AlphaRequest) stkProviders.Peek() ).Provider; //DEFAULT_PROVIDER_SERVICE_SPACE;
+				treaty.ProviderServiceSpace = ( (AlphaRequest) stkProviders.Peek() ).Provider;
 				// Count the number of services requested
 				int nServiceCount = 0;
 				// Create entries for each service to be requested
@@ -555,12 +551,12 @@ namespace PSL.DISCUS
 				// Debugging to verify serialization to Xml
 				strCheck = treaty.ToXml();

-				if( m_bTraceOn )
-					TraceInfo( "Built treaty" );// + treaty.ToXml() );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "Built treaty" );// + treaty.ToXml() );
 			}
 			catch( Exception e )
 			{
-				LogError( e.Message );
+				LogError( this.Name, e.Message );
 			}
 			return treaty; // return the Treaty we create from the stack
 		}// End BuildTreaty
@@ -584,8 +580,8 @@ namespace PSL.DISCUS

 			bool bRetVal = false;

-			if( m_bTraceOn )
-				TraceInfo( "Checking whether we can execute all requested service methods" );
+			if( this.TraceOn )
+				TraceInfo( this.Name, "Checking whether we can execute all requested service methods" );

 			try
 			{
@@ -608,7 +604,7 @@ namespace PSL.DISCUS
 			}
 			catch( Exception e )
 			{
-				LogError( e.Message );
+				LogError( this.Name, e.Message );
 			}
 			return bRetVal;
 		}
@@ -616,36 +612,31 @@ namespace PSL.DISCUS
 		/// <summary>
 		/// Function creates a logging instance.
 		/// </summary>
-		/// <param name="strLoggingType">The type of logging instance to create
-		/// EvtLoggerImpl, UrlLoggerImpl or WebServiceLoggerImpl
-		/// based on the names: "EventLog", "UrlLog", "WebServiceLog"
+		/// <param name="logType">The type of logging instance to create
+		/// EvtLoggerImpl or UrlLoggerImpl
+		/// based on the logging types
 		/// </param>
 		/// <param name="logCtx"></param>
-		/// <returns>An instance of the named logging implementation OR
+		/// <returns>An instance of the specified logging implementation OR
 		/// an instance of the default logging implementation, EvtLoggerImpl
 		/// </returns>
-		private LoggerImpl CreateLoggingInstance( string strLoggingType, LogTraceContext logCtx )
+		private LoggerImpl CreateLoggingInstance( enuLoggingType logType, LogTraceContext logCtx )
 		{
 			LoggerImpl objLoggingInst = null;

 			try
 			{
-				if( strLoggingType.ToLower().CompareTo( DConst.URL_LOGGING.ToLower() ) == 0 )
+				if( logType == enuLoggingType.UrlLog )
 				{
 					// UrlLoggerImpl
 					objLoggingInst = new UrlLoggerImpl( logCtx );
 				}
-				else if( strLoggingType.ToLower().CompareTo( DConst.WEB_SERVICE_LOGGING.ToLower() ) == 0 )
-				{
-					// WebServiceLoggerImpl
-					objLoggingInst = new EvtLoggerImpl( logCtx );
-				}
 				else objLoggingInst = new EvtLoggerImpl( logCtx );
 			}
 			catch( Exception e )
 			{
 				objLoggingInst = new EvtLoggerImpl( logCtx );
-				objLoggingInst.LogError( e.Message );
+				objLoggingInst.LogError( this.Name, e.Message );
 			}

 			return objLoggingInst;
@@ -654,36 +645,36 @@ namespace PSL.DISCUS
 		/// <summary>
 		/// Function creates a tracing instance.
 		/// </summary>
-		/// <param name="strTracingType">The type of logging instance to create
-		/// EvtTracerImpl, UrlTracerImpl or WebServiceTracerImpl
-		/// based on the names: "EventTrace", "UrlTrace", "WebServiceTrace"
+		/// <param name="traceType">The type of tracing instance to create
+		/// EvtTracerImpl or UrlTracerImpl
+		/// based on the tracing types
 		/// </param>
 		/// <param name="traceCtx"></param>
-		/// <returns>An instance of the named tracing implementation OR
+		/// <returns>An instance of the specified tracing implementation OR
 		/// an instance of the default tracing implementation, EvtTracerImpl
 		/// </returns>
-		private TracerImpl CreateTracingInstance( string strTracingType, LogTraceContext traceCtx )
+		private TracerImpl CreateTracingInstance( enuTracingType traceType, LogTraceContext traceCtx )
 		{
 			TracerImpl objTracingInst = null;

 			try
 			{
-				if( strTracingType.ToLower().CompareTo( DConst.URL_TRACING.ToLower() ) == 0 )
+				if( traceType == enuTracingType.None )
 				{
-					// UrlTracerImpl
-					objTracingInst = new UrlTracerImpl( traceCtx );
+					this.TraceOn = false;
+					return null;
 				}
-				else if( strTracingType.ToLower().CompareTo( DConst.WEB_SERVICE_TRACING.ToLower() ) == 0 )
+				else if( traceType ==  enuTracingType.UrlTrace )
 				{
-					// WebServiceTracerImpl
-					objTracingInst = new EvtTracerImpl( traceCtx );
+					// UrlTracerImpl
+					objTracingInst = new UrlTracerImpl( traceCtx );
 				}
 				else objTracingInst = new EvtTracerImpl( traceCtx );
 			}
 			catch( Exception e )
 			{
 				objTracingInst = new EvtTracerImpl( traceCtx );
-				objTracingInst.TraceError( e.Message );
+				objTracingInst.TraceError( this.Name, e.Message );
 			}

 			return objTracingInst;
@@ -695,12 +686,35 @@ namespace PSL.DISCUS
 		/// <param name="nTreatyID">The treaty to be dissolved</param>
 		public void DissolveTreaty( int nTreatyID )
 		{
-			if( m_bTraceOn )
-				TraceInfo( "Dissolving Treaty " + nTreatyID );
+			if( this.TraceOn )
+				TraceInfo( this.Name, "Dissolving Treaty " + nTreatyID );

 		}// End DissolveTreaty

-
+		/*
+		// Async version
+		private string[] DoRequestCheck( string[] strXmlExecRequest, bool bSigned )
+		{
+			ArrayList lstResults = new ArrayList();
+
+			try
+			{
+				if( this.TraceOn )
+					TraceInfo( "Doing request check - Async" );
+
+				// Resolve SecurityManager location first, in the event that
+				// a proxy has to be generated
+
+			}
+			catch( System.Exception e )
+			{
+				LogError( e.Message );
+			}
+
+			return (string[]) lstResults.ToArray( typeof(System.String) );
+		}
+		*/
+
 		/// <summary>
 		/// Function uses the SecurityManagerService to check whether
 		/// a request for service use is allowed or not.
@@ -714,40 +728,39 @@ namespace PSL.DISCUS
 		{
 			string[] arrRetVal = null;

-			// Workaround Security Manager
-			//*****************************************************************************
-			/*arrRetVal = new string[2];
-			arrRetVal[0] = "1";
-			arrRetVal[1] = strXMLExecRequest;
-			int c = 9;
-			if( c == 9 )
-				return arrRetVal;*/
-			//*****************************************************************************
-
 			try
 			{
-				if( m_bTraceOn )
-					TraceInfo( "Doing request check" );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "Doing request check" );

-				// Interact with SecurityManagerService via reflection
-				InternalRegistry ireg = new InternalRegistry();
-				string strLocation = ireg.GetServiceLocation( SECURITY_MANAGER );
-				if( strLocation.Length == 0 )
+				WSDetails details = ServiceDetails( SECURITY_MANAGER );
+				ResolveServiceLocation( ref details );
+
+				if( details.Location.Length == 0  )
 					throw new Exception( "Cannot Find Security Manager" );

 				// Create array of parameters to pass to SecurityManagerService
-				object[] objParams = new Object[2];
+				object[] objParams = new object[2];
 				objParams[0] = strXmlExecRequest;
-				objParams[1] = false;//bSigned; //Request not signed (yet)
+				objParams[1] = bSigned;
+
+				ExecServiceContext ctx = new ExecServiceContext();
+				ctx.AccessPointUrl = details.AccessPoint;
+				ctx.Assembly = details.Location;
+				ctx.ServiceName = details.Name;
+				ctx.MethodName = REQUEST_CHECK_METHOD;
+				ctx.Parameters.AddRange( objParams );
+
 				// Execute Request Check method of security manager
-				object objExecResult = ExecuteService( SECURITY_MANAGER, REQUEST_CHECK_METHOD, objParams );
+				object objExecResult = ExecuteServiceDirect( ctx );
+
 				// Convert result to string[]
 				if( objExecResult != null )
 					arrRetVal = objExecResult as string[];
 			}
 			catch( System.Exception e )
 			{
-				LogError( e.Message );
+				LogError( this.Name, e.Message );
 			}
 			return arrRetVal; // return SecurityManagerService response
 		}//End DoRequestCheck
@@ -762,8 +775,8 @@ namespace PSL.DISCUS
 			string strRetVal = "";
 			try
 			{
-				if( m_bTraceOn )
-					TraceInfo( "Received treaty request, passing to SecurityManager to verify" );// + strXmlTreatyReq );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "Received treaty request, passing to SecurityManager to verify" );// + strXmlTreatyReq );

 				// Create array of params to pass to VerifyTreaty
 				// of SecurityManagerService
@@ -773,11 +786,25 @@ namespace PSL.DISCUS
 				object objRes = null; // return value

 				//TODO: Remove later...for demo only
-				if( m_bTraceOn )
-					TraceInfo( "EXECGUI_5" );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "EXECGUI_5" );
+
+				WSDetails details = ServiceDetails( SECURITY_MANAGER );
+				ResolveServiceLocation( ref details );
+
+				if( details.Location.Length == 0  )
+					throw new Exception( "Cannot Find Security Manager" );
+
+				ExecServiceContext ctx = new ExecServiceContext();
+				ctx.AccessPointUrl = details.AccessPoint;
+				ctx.Assembly = details.Location;
+				ctx.ServiceName = details.Name;
+				ctx.MethodName = VERIFY_TREATY_METHOD;
+				ctx.Parameters.AddRange( objParams );

 				// Execute method
-				objRes = ExecuteService( SECURITY_MANAGER, VERIFY_TREATY_METHOD, objParams );
+				objRes = ExecuteServiceDirect( ctx );
+
 				// Check whether execution returned something
 				if( objRes != null )
 				{
@@ -790,18 +817,18 @@ namespace PSL.DISCUS

 					if( strRetVal.Length > 0 )
 					{
-						if( m_bTraceOn )
+						if( this.TraceOn )
 						{
 							//TraceInfo( "SecurityManager verification returned: " + strRetVal );
 							//TODO: Remove later...for demo only
-							TraceInfo( "EXECGUI_6" );
+							TraceInfo( this.Name, "EXECGUI_6" );
 						}
 					}
 				}
 			}
 			catch( Exception e )
 			{
-				LogError( e.Message );
+				LogError( this.Name, e.Message );
 			}
 			return strRetVal;
 		}// End EnlistServicesByName
@@ -819,27 +846,28 @@ namespace PSL.DISCUS
 				return null;

 			// TODO: Remove later...for demo only
-			if( m_bTraceOn )
-				TraceInfo( "EXECGUI_2" );
+			if( this.TraceOn )
+				TraceInfo( this.Name, "EXECGUI_2" );
+
+			ArrayList lstResults = new ArrayList();
+			ArrayList lstTaskIDs = new ArrayList();

 			// 4 stage execution
 			// 1) Build the execution queue (steps to perform)
 			// 2) Create nec treaties with other GKs - Resource Acquire stage
 			// 3) Ensure that all requested service authorized
 			// 4) Execution stage
-			string [] arrRetVal = null; // Holds returned values
+
 			try
 			{
 				// Stage 1 - Build Execution queue (steps to execute)
-				if( m_bTraceOn )
-					TraceInfo( "MESSAGE " + "Executing Alpha Protocol Stage 1 - Building ExecutionQ" );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "MESSAGE " + "Executing Alpha Protocol Stage 1 - Building ExecutionQ" );

 				Queue execQ = BuildAlphaProtocolExecutionQ( strAlphaProtocol );
 				if( execQ == null || execQ.Count == 0 )
 					throw new Exception( "Error obtaining sequence of actions to perform" );

-				// Create appropriate sized array to hold results
-				arrRetVal = new string[execQ.Count];
 				// Create an array of requests
 				AlphaRequest[] arrReqs = new AlphaRequest[execQ.Count];
 				// Copy values from execQ
@@ -853,26 +881,25 @@ namespace PSL.DISCUS
 				// request all the services we need from a GK
 				// in one go.
 				Array.Sort( arrReqs );
-
-
+
 				// Stage 2 - Create the necessary treaties and return a hashtable
 				// of treatyIDs to be used with each GK.
-				if( m_bTraceOn )
-					TraceInfo( "MESSAGE " + "Executing Alpha Protocol Stage 2 - Creating Treaties" );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "MESSAGE " + "Executing Alpha Protocol Stage 2 - Creating Treaties" );

 				Hashtable mapping = FormTreaties( arrReqs );
 				if( mapping == null || mapping.Count == 0 )
 					throw new Exception( "Resource Acquire Failed, Error Creating Treaties" );

-				if( m_bTraceOn )
-					TraceInfo( "Executing Alpha Protocol Stage 3 - Analyzing Treaty Responses" );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "Executing Alpha Protocol Stage 3 - Analyzing Treaty Responses" );
 				// Stage 3 - Analyze mapping to make sure all requested methods authorized
 				// if not then we report the failure and exit
 				if( !CanExecuteAllSteps( mapping ) )
 				{
 					// TODO: Edit later...for demo only
-					if( m_bTraceOn )
-						TraceError( "All Necessary Resources NOT Acquired" );
+					if( this.TraceOn )
+						TraceError( this.Name, "All Necessary Resources NOT Acquired" );

 					// Write Treaties to event log for analysis later
 					throw new Exception( "Resource Acquire Failed, All Requests NOT Authorized" );
@@ -880,24 +907,24 @@ namespace PSL.DISCUS
 				else
 				{
 					// TODO: Edit later...for demo only
-					if( m_bTraceOn )
+					if( this.TraceOn )
 					{
-						TraceInfo( "MESSAGE " + "Acquired All Necessary Resources" );
-						TraceInfo( "EXECGUI_7" );
+						TraceInfo( this.Name, "MESSAGE " + "Acquired All Necessary Resources" );
+						TraceInfo( this.Name, "EXECGUI_7" );
 					}
 				}

 				// Stage 4 - Execution stage
-				if( m_bTraceOn )
-					TraceInfo( "MESSAGE " + "Executing Alpha Protocol Stage 4 - Execution" );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "MESSAGE " + "Executing Alpha Protocol Stage 4 - Execution" );

 				IEnumerator it = execQ.GetEnumerator();
-				InternalRegistry ireg = new InternalRegistry();
-				int nIndex = 0;
+				InternalRegistry ireg = new InternalRegistry( this.DatabaseConnectString );
+				TaskProxy pxy = new TaskProxy();

 				// TODO: Edit later...for demo only
-				if( m_bTraceOn )
-					TraceInfo( "EXECGUI_8" );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "EXECGUI_8" );

 				while( it.MoveNext() )
 				{
@@ -905,6 +932,7 @@ namespace PSL.DISCUS
 					// GK expects one parameter - an XML document
 					// representing a request
 					object[] objParams = new object[1];
+					objParams[0] = actionReq.m_Req.ToXml();
 					// Retrieve current treaty (applicable for provider)
 					TreatyType currentTreaty = (TreatyType) mapping[actionReq.Provider];
 					if( currentTreaty == null )
@@ -915,36 +943,53 @@ namespace PSL.DISCUS
 					// Resolve method implementation as specified by treaty
 					actionReq.m_Req.MethodName = ResolveMethodImplementation( actionReq, currentTreaty );

-					// Can use TaskProxy here to have
+					WSDetails details = GatekeeperDetails( actionReq.Provider );
+					ResolveGatekeeperLocation( ref details );

-					// Ideally request should be signed first
-					objParams[0] = actionReq.m_Req.ToXml();
-					// Execute against provider GK
-					object objRes = ExecuteGatekeeper( actionReq.Provider, GK_EXECUTE_SERVICE_METHOD , objParams );
-					if( objRes != null )
+					ExecServiceContext ctx = new ExecServiceContext();
+					ctx.AccessPointUrl = details.AccessPoint;
+					ctx.Assembly = details.Location;
+					ctx.ServiceName = details.Name;
+					ctx.MethodName = GK_EXECUTE_SERVICE_METHOD;
+					ctx.Parameters.AddRange( objParams );
+
+                    lstTaskIDs.Add( pxy.AddTaskRequest( new TaskRequest( new TaskRequest.TaskCallback(ExecuteServiceDirect), ctx ) ) );
+				}// End while it.MoveNext()
+
+				// Start proxy wait
+				pxy.StartWait();
+
+				// Do Something here
+
+				// Wait on proxy signal
+				pxy.WaitOnProxySignal();
+
+				for( int i = 0; i < lstTaskIDs.Count; i++ )
+				{
+					TPTaskCompleteEventArgs tceArg = pxy.QueryResult( (Guid) lstTaskIDs[i] );
+
+					if( tceArg != null )
 					{
-						// save results returned
-						string strTemp = (string) objRes;
+						string strTemp = (string) tceArg.Result;
 						string strVerify = VerifyDocument( strTemp );
 						if( strVerify.Length > 0 )
-							arrRetVal[nIndex] = strVerify;
-						else arrRetVal[nIndex] = strTemp;
+							lstResults.Add( strVerify );
+						else lstResults.Add( strTemp );
 					}
-					nIndex++;
-				}// End while it.MoveNext()
+				}
 			}
 			catch( System.Exception e )
 			{
-				LogError( e.Message );
+				LogError( this.Name, e.Message );
 			}

-			if( m_bTraceOn )
+			if( this.TraceOn )
 			{
-				TraceInfo( "Finished Executing Alpha Protocol" );
-				TraceInfo( "EXECGUI_9" );
+				TraceInfo( this.Name, "Finished Executing Alpha Protocol" );
+				TraceInfo( this.Name, "EXECGUI_9" );
 			}

-			return arrRetVal;
+			return (string[]) lstResults.ToArray( typeof(System.String) );
 		}//End ExecuteAlphaProtocol

 		/// <summary>
@@ -954,12 +999,12 @@ namespace PSL.DISCUS
 		/// <param name="strGKMethod">Name of method to execute</param>
 		/// <param name="objParams">Array of parameters to pass to proxy method</param>
 		/// <returns></returns>
-		private object ExecuteGatekeeper( string strGKName, string strGKMethod, object[] objParams )
+		/*private object ExecuteGatekeeper( string strGKName, string strGKMethod, object[] objParams )
 		{
 			object objInvokeResult = null;
 			try
 			{
-				if( m_bTraceOn )
+				if( this.TraceOn )
 					TraceInfo( "Executing method " + strGKMethod + " against GK " + strGKName  );

 				// Check that we have been given a GK name and a method name to execute
@@ -991,7 +1036,7 @@ namespace PSL.DISCUS
 				execCtx.ServiceName = details.Name;
 				execCtx.Parameters.AddRange( objParams );

-				/*// Use Async invocation
+				// Use Async invocation
 				if( m_bUseAsync )
 				{
 					// Create condition variable, set to non-signaled state
@@ -1014,7 +1059,7 @@ namespace PSL.DISCUS
 					else throw new Exception( pxy.QueryResult( execTaskId ).ExceptionMessage );
 				}
 				else
-				*/
+

 				objInvokeResult = ExecuteServiceDirect( execCtx );
 			}
@@ -1025,7 +1070,7 @@ namespace PSL.DISCUS

 			return objInvokeResult;
 		}//End ExecuteGatekeeper
-
+		*/

 		/// <summary>
 		/// Function takes an array of AlphaRequests and attempts
@@ -1047,9 +1092,9 @@ namespace PSL.DISCUS
 			Hashtable mapping = null;
 			try
 			{
-				if( m_bTraceOn )
+				if( this.TraceOn )
 				{
-					TraceInfo( "Forming Treaties for " + arrReqs.Length + " requests" );
+					TraceInfo( this.Name, "Forming Treaties for " + arrReqs.Length + " requests" );

 					//  TODO: Remove later...for demo only
 					string strServicesTraceMsg = "SERVICE ";
@@ -1060,7 +1105,7 @@ namespace PSL.DISCUS
 							strServicesTraceMsg += ";";
 					}
 					// Send Trace message
-					TraceInfo( strServicesTraceMsg );
+					TraceInfo( this.Name, strServicesTraceMsg );
 				}

 				mapping = new Hashtable();
@@ -1073,7 +1118,10 @@ namespace PSL.DISCUS
 				else return null;
 				// Add request to stack
 				stkProviders.Push( currReq );
-
+
+				TaskProxy pxy = new TaskProxy();
+				Hashtable providers = new Hashtable();
+
 				// Create a stack that contains all the requests
 				// going to one Gatekeeper so that we can create
 				// a consolidated treaty to request all the services
@@ -1090,8 +1138,8 @@ namespace PSL.DISCUS
 					if( stkProviders.Count > 0 )
 					{
 						// TODO: Remove later...for demo only
-						if( m_bTraceOn )
-							TraceInfo( "EXECGUI_3" );
+						if( this.TraceOn )
+							TraceInfo( this.Name, "EXECGUI_3" );

 						// Build treaty
 						TreatyType treaty = BuildTreaty( stkProviders );
@@ -1101,31 +1149,26 @@ namespace PSL.DISCUS
 						objParams[0] = treaty.ToXml();

 						//  TODO: Remove later...for demo only
-						if( m_bTraceOn )
+						if( this.TraceOn )
 						{
-							TraceInfo( "EXECGUI_4" );
+							TraceInfo( this.Name, "EXECGUI_4" );
 						}

-						object objRes = ExecuteGatekeeper( treaty.ProviderServiceSpace, GK_ENLIST_SERVICES_BY_NAME_METHOD, objParams );
-
-						if( objRes != null && ((string) objRes).Length > 0 )
-						{
-							//Deserialize into TreatyType
-							TreatyType returnedTreaty = null;
-							string strTreaty = (string) objRes;
-
-							XmlSerializer ser = new XmlSerializer( typeof(TreatyType) );
-
-							XmlReader xt = new XmlTextReader( strTreaty, XmlNodeType.Document, null );
-							xt.Read();
-							object objInst = ser.Deserialize( xt );
-							returnedTreaty = objInst as TreatyType;
-
-							// Store the Treaty assoc with the ProviderServiceSpace
-							mapping.Add( returnedTreaty.ProviderServiceSpace, returnedTreaty );
-						}
-						else throw new Exception( "Error Creating Treaty with " + treaty.ProviderServiceSpace );
+						// Give operation to TaskProxy
+						WSDetails details = GatekeeperDetails( treaty.ProviderServiceSpace );
+						ResolveGatekeeperLocation( ref details );
+
+						ExecServiceContext ctx = new ExecServiceContext();
+						ctx.ServiceName = details.Name;
+						ctx.MethodName = GK_ENLIST_SERVICES_BY_NAME_METHOD;
+						ctx.Parameters.AddRange( objParams );
+						ctx.AccessPointUrl = details.AccessPoint;
+						ctx.Assembly = details.Location;

+						Guid taskID = pxy.AddTaskRequest( new TaskRequest( new TaskRequest.TaskCallback(ExecuteServiceDirect), ctx ) );
+						// Map the taskIDs to specific provider service spaces
+						providers.Add( treaty.ProviderServiceSpace, taskID );
+
 						// Clear stack
 						stkProviders.Clear();
 						// If no nore requests then exit otherwise get the next one
@@ -1136,11 +1179,47 @@ namespace PSL.DISCUS

 					stkProviders.Push( (AlphaRequest) it.Current );
 					currReq = (AlphaRequest) it.Current;
+				}// End While true
+
+				// Start proxy waiting
+				pxy.StartWait();
+
+				// Do something here
+
+				// Wait on proxy signal
+				pxy.WaitOnProxySignal();
+
+				IDictionaryEnumerator ide = providers.GetEnumerator();
+
+				while( ide.MoveNext() )
+				{
+					Guid task = (Guid) ide.Value;
+					string strProvider = (string) ide.Key;
+
+					object objRes = pxy.QueryResult( task ).Result;
+
+					if( objRes != null && ((string) objRes).Length > 0 )
+					{
+						// Deserialize into TreatyType
+						TreatyType returnedTreaty = null;
+						string strTreaty = (string) objRes;
+
+						XmlSerializer ser = new XmlSerializer( typeof(TreatyType) );
+
+						XmlReader xt = new XmlTextReader( strTreaty, XmlNodeType.Document, null );
+						xt.Read();
+						object objInst = ser.Deserialize( xt );
+						returnedTreaty = objInst as TreatyType;
+
+						// Store the Treaty assoc with the ProviderServiceSpace
+						mapping.Add( returnedTreaty.ProviderServiceSpace, returnedTreaty );
+					}
+					else throw new Exception( "Error Creating Treaty with " + strProvider );
 				}
 			}
 			catch( Exception e )
 			{
-				LogError( e.Message );
+				LogError( this.Name, e.Message );
 			}
 			return mapping;
 		}// End FormTreaties
@@ -1158,15 +1237,15 @@ namespace PSL.DISCUS

 			try
 			{
-				if( m_bTraceOn )
-					TraceInfo( "Initizlize Proxy Cache Dir" );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "Initizlize Proxy Cache Dir" );

 				// Determine if directory name of the proxy cache
 				// read from the system config file is NOT Fully
 				// Quallified i.e <drive letter>:\<path>
 				// If not Fully Qualified then we must prefix
 				// with Current Directory
-				if( m_strPxyCacheDir.IndexOf( ":" ) == -1 )
+				if( m_settings.ProxyCache.IndexOf( ":" ) == -1 )
 				{
 					// Link to current dir
 					DirectoryInfo temp = new DirectoryInfo( "." );
@@ -1174,13 +1253,13 @@ namespace PSL.DISCUS
 					string strPath = temp.FullName;
 					// Append proxy cache sub dir
 					strPath += "\\";
-					strPath += m_strPxyCacheDir;
-					m_strPxyCacheDir = strPath;
+					strPath += m_settings.ProxyCache;
+					m_settings.ProxyCache = strPath;
 					temp = null;
 				}

 				// Try to access DirectoryInfo of ProxyCache
-				DirectoryInfo dirInfo = new DirectoryInfo( m_strPxyCacheDir );
+				DirectoryInfo dirInfo = new DirectoryInfo( m_settings.ProxyCache );
 				// If the directory does not exist then try creating it
 				if( !dirInfo.Exists )
 					Directory.CreateDirectory( dirInfo.FullName );
@@ -1194,7 +1273,7 @@ namespace PSL.DISCUS
 				try
 				{
 					string strTemp = e.Message;
-					Directory.CreateDirectory( m_strPxyCacheDir );
+					Directory.CreateDirectory( m_settings.ProxyCache );
 					bRetVal = true;
 				}
 				catch( System.Exception sysE )
@@ -1202,7 +1281,7 @@ namespace PSL.DISCUS
 					// Report Error
 					string strError = "Error Creating ProxyCache ";
 					strError += sysE.Message;
-					LogError( strError );
+					LogError( this.Name, strError );
 				}
 			}
 			return bRetVal;
@@ -1212,27 +1291,27 @@ namespace PSL.DISCUS
 		/// Procedure writes an error message
 		/// </summary>
 		/// <param name="strMsg">The messsage to write</param>
-		public void LogError( string strMsg )
+		public void LogError( string strSource, string strMsg )
 		{
-			m_objLogger.LogError( strMsg );
+			m_objLogger.LogError( strSource, strMsg );
 		}

 		/// <summary>
 		/// Procedure writes an info message
 		/// </summary>
 		/// <param name="strMsg">The messsage to write</param>
-		public void LogInfo( string strMsg )
+		public void LogInfo( string strSource, string strMsg )
 		{
-			m_objLogger.LogInfo( strMsg );
+			m_objLogger.LogInfo( strSource, strMsg );
 		}

 		/// <summary>
 		/// Procedure writes a warning message
 		/// </summary>
 		/// <param name="strMsg">The messsage to write</param>
-		public void LogWarning( string strMsg )
+		public void LogWarning( string strSource, string strMsg )
 		{
-			m_objLogger.LogWarning( strMsg );
+			m_objLogger.LogWarning( strSource, strMsg );
 		}

 		/// <summary>
@@ -1266,7 +1345,7 @@ namespace PSL.DISCUS
 			}
 			catch( Exception e )
 			{
-				LogError( e.Message );
+				LogError( this.Name, e.Message );
 			}
 			return strRetVal;
 		}
@@ -1278,8 +1357,8 @@ namespace PSL.DISCUS
 		/// <param name="nTreatyID">The treaty to revoke</param>
 		public void RevokeTreaty( int nTreatyID )
 		{
-			if( m_bTraceOn )
-				TraceInfo( "Revoking Treaty " + nTreatyID );
+			if( this.TraceOn )
+				TraceInfo( this.Name, "Revoking Treaty " + nTreatyID );

 		}//End RevokeTreaty

@@ -1287,27 +1366,27 @@ namespace PSL.DISCUS
 		/// Procedure writes an error message
 		/// </summary>
 		/// <param name="strMsg">The message to write</param>
-		public void TraceError( string strMsg )
+		public void TraceError( string strSource, string strMsg )
 		{
-			m_objTracer.TraceError( strMsg );
+			m_objTracer.TraceError( strSource, strMsg );
 		}

 		/// <summary>
 		/// Procedure writes an Info message
 		/// </summary>
 		/// <param name="strMsg">The message to write</param>
-		public void TraceInfo( string strMsg )
+		public void TraceInfo( string strSource, string strMsg )
 		{
-			m_objTracer.TraceInfo( strMsg );
+			m_objTracer.TraceInfo( strSource, strMsg );
 		}

 		/// <summary>
 		/// Procedure writes a Warning trace message
 		/// </summary>
 		/// <param name="strMsg">The message to write</param>
-		public void TraceWarning( string strMsg )
+		public void TraceWarning( string strSource, string strMsg )
 		{
-			m_objTracer.TraceWarning( strMsg );
+			m_objTracer.TraceWarning( strSource, strMsg );
 		}


@@ -1325,14 +1404,18 @@ namespace PSL.DISCUS
 		public string[] ExecuteServiceMethod( string strXmlExecRequest )
 		{
 			ArrayList lstRetVal = new ArrayList();
+			object[] arrStatus = new object[2];
 			string strRetVal = "";
 			ExecServiceMethodRequestType execReq = null;
-			InternalRegistry ireg = new InternalRegistry();
+			InternalRegistry ireg = new InternalRegistry( this.DatabaseConnectString );

 			try
 			{
-				if( m_bTraceOn )
-					TraceInfo( "Received ExecServiceMethodRequest" );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "Received ExecServiceMethodRequest" );
+
+				arrStatus[Gatekeeper.GK_STATUS_FIELD] = enuGatekeeperStatus.Ok.ToString();
+				arrStatus[Gatekeeper.GK_STATUS_MSG_FIELD] = Gatekeeper.GK_SUCCESS_STATE_MSG;

 				// 6 stages for execution
 				// 1) Do Security check
@@ -1346,22 +1429,22 @@ namespace PSL.DISCUS
 				// Contact SecurityManageService
 				// Pass request, get back string []
 				// Status code and actual XML request
-				if( m_bTraceOn )
-					TraceInfo( "Stage 1 - Do Security Check" );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "Stage 1 - Do Security Check" );

 				// TODO: Ignoring SecurityManager for now
 				//string[] arrSecurityManagerResponse = DoRequestCheck( strXmlExecRequest, false );
 				//if( arrSecurityManagerResponse == null || arrSecurityManagerResponse[SECURITY_MANAGER_STATUS_FIELD].CompareTo( SECURITY_MANAGER_ERROR_CODE ) == 0 )
 				//	throw new System.Exception( "Security Exception: Request Not Verified - Reason: " + arrSecurityManagerResponse[1] );

-				if( m_bTraceOn )
-					TraceInfo( "Passed Security Check" );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "Passed Security Check" );

 				try
 				{
 					// Stage 2 - Deserialize Execution request
-					if( m_bTraceOn )
-						TraceInfo( "Stage 2 - Deserialize Execution Request" );
+					if( this.TraceOn )
+						TraceInfo( this.Name, "Stage 2 - Deserialize Execution Request" );

 					execReq = new ExecServiceMethodRequestType();
 					XmlSerializer ser = new XmlSerializer( execReq.GetType() );
@@ -1376,8 +1459,8 @@ namespace PSL.DISCUS
 				}

 				// Stage 3 - Resolve Web Service Proxy Location
-				if( m_bTraceOn )
-					TraceInfo( "Stage 3 - Resolve Web Service Proxy Location" );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "Stage 3 - Resolve Web Service Proxy Location" );

 				WSDetails details = ServiceDetails( execReq.ServiceName );
 				// Fill in method details
@@ -1407,57 +1490,29 @@ namespace PSL.DISCUS
 				execCtx.AccessPointUrl = details.AccessPoint;
 				execCtx.Parameters = execReq.m_ParamValue;

-				/*****************************************************************/
-				/*
-				// Async invocation
-				if( m_bUseAsync )
-				{
-					// Create condition variable, set to non-signaled state
-					AutoResetEvent cond = new AutoResetEvent( false );
-					// Create a task proxy with the condition variable
-					TaskProxy pxy = new TaskProxy( ref cond );
-					// Give tasks to the TaskProxy
-					Guid execTaskId = pxy.AddTaskRequest( new TaskRequest( new TaskRequest.TaskCallback( ExecuteServiceRequest ), execCtx ) );
-					// Let the TaskProxy wait on them
-					pxy.WaitOnTasks();
-
-					// TODO: Find stuff to do here while waiting on task(s) to finish
-					// Could do logging, context save etc.
-
-					// Sit and wait for proxy to signal tasks done
-					pxy.Condition.WaitOne();
-
-					strRetVal = (string) pxy.QueryResult( execTaskId ).Result;
-				}
-				// Sync invocation
-				else
-				*/
-
 				strRetVal = (string) ExecuteServiceRequest( execCtx );
 				if( strRetVal.Length == 0 )
 					throw new Exception( "Executing request returned no results" );

 				// New protocol to give clients more info
-				lstRetVal.Insert( Gatekeeper.GK_STATUS_FIELD, enuGatekeeperStatus.Ok.ToString() );
-				lstRetVal.Insert( Gatekeeper.GK_STATUS_MSG_FIELD, Gatekeeper.GK_SUCCESS_STATE_MSG );
-				lstRetVal.Insert( lstRetVal.Count - 1, strRetVal );
-
-				/*****************************************************************/
+				lstRetVal.Add( strRetVal );
 			}
 			catch( System.Exception e )
 			{
-				LogError( e.Message );
-
-				lstRetVal.Clear();
-
-				// New protocol to give clients more info
-				lstRetVal.Insert( Gatekeeper.GK_STATUS_FIELD, enuGatekeeperStatus.Error.ToString() );
-				lstRetVal.Insert( Gatekeeper.GK_STATUS_MSG_FIELD, Gatekeeper.GK_ERROR_STATE_MSG );
-				lstRetVal.Insert( lstRetVal.Count - 1, e.Message );
+				LogError( this.Name, e.Message );
+				// Update status data
+				arrStatus[Gatekeeper.GK_STATUS_FIELD] = enuGatekeeperStatus.Error.ToString();
+				arrStatus[Gatekeeper.GK_STATUS_MSG_FIELD] = Gatekeeper.GK_ERROR_STATE_MSG;
+				lstRetVal.Add( e.Message );
+			}
+			finally
+			{
+				// put arrStatus at the start of lstResults
+				lstRetVal.InsertRange( 0, arrStatus );
 			}

-			if( m_bTraceOn )
-				TraceInfo( "Finished Executing Service Method Request" );
+			if( this.TraceOn )
+				TraceInfo( this.Name, "Finished Executing Service Method Request" );

 			return (string[]) lstRetVal.ToArray( typeof(System.String) );
 		}//End ExecuteServiceMethod
@@ -1480,10 +1535,8 @@ namespace PSL.DISCUS
 			// Stores the names of services for which we must generate
 			// proxy assemblies
 			Hashtable proxiesToGen = new Hashtable();
-			// Create a condition variable to use with the TaskProxy
-			AutoResetEvent cond = new AutoResetEvent( false );
 			// Create a TaskProxy to give tasks to
-			TaskProxy pxy = new TaskProxy( ref cond );
+			TaskProxy pxy = new TaskProxy();

 			try
 			{
@@ -1516,8 +1569,6 @@ namespace PSL.DISCUS

 					// Reset proxy
 					pxy.Reset();
-					// Reset condition variable to non-signaled state
-					cond.Reset();
 					// Reset taskIDs list
 					lstTaskIDs.Clear();
 				}
@@ -1544,11 +1595,11 @@ namespace PSL.DISCUS
 				if( pxy.TasksPending > 0 )
 				{
 					// Let proxy wait on tasks
-					pxy.WaitOnTasks();
+					pxy.StartWait();
 					// Do stuff here

 					// Wait on proxy
-					pxy.Condition.WaitOne();
+					pxy.WaitOnProxySignal();


 					// Get results
@@ -1561,8 +1612,6 @@ namespace PSL.DISCUS

 					// Reset proxy
 					pxy.Reset();
-					// Reset condition variable to non-signaled state
-					cond.Reset();
 					// Reset taskIDs list
 					lstTaskIDs.Clear();
 				}
@@ -1591,7 +1640,8 @@ namespace PSL.DISCUS
 				}

 				IDictionaryEnumerator it = proxiesToGen.GetEnumerator();
-
+				Hashtable wsLocationUpdates = new Hashtable();
+
 				while( it.MoveNext() )
 				{
 					// Create WSProxyGenContext
@@ -1601,7 +1651,10 @@ namespace PSL.DISCUS
 					ctx.AccessPointUrl = svcDetails.AccessPoint;
 					ctx.Name = svcDetails.Name;
 					ctx.WsdlUrl = svcDetails.Location;
-					lstTaskIDs.Add( pxy.AddTaskRequest( new TaskRequest( new TaskRequest.TaskCallback( GenerateWSProxy ), ctx ) ) );
+					Guid taskID = pxy.AddTaskRequest( new TaskRequest( new TaskRequest.TaskCallback( GenerateWSProxy ), ctx ) );
+					lstTaskIDs.Add( taskID );
+					// Link taskID to the service for which proxy is going to be generated
+					wsLocationUpdates.Add( taskID, ctx.Name );
 				}

 				if( pxy.TasksPending > 0 )
@@ -1619,17 +1672,22 @@ namespace PSL.DISCUS
 						TPTaskCompleteEventArgs tce = pxy.QueryResult( (Guid) lstTaskIDs[i] );
 						if( tce.HasErrors )
 							throw new Exception( "Proxy generation failed error message: " + tce.ExceptionMessage );
+
+						// Update web service location
+						string strAssembly = (string) tce.Result;
+						string strServiceName = (string) wsLocationUpdates[tce.TaskID];
+						InternalRegistry ireg = new InternalRegistry( this.DatabaseConnectString );
+						ireg.UpdateServiceLocation( strServiceName, strAssembly );
 					}

 					// Reset proxy
 					pxy.Reset();
-					// Reset condition variable to non-signaled state
-					cond.Reset();
 					// Reset taskIDs list
 					lstTaskIDs.Clear();
 				}//End-if pxy.TasksPending > 0

-
+				// Clear list of web service location updates
+				wsLocationUpdates.Clear();
 				// Stage 4 - Execution
 				pxy.Reset();
 				lstTaskIDs.Clear();
@@ -1703,97 +1761,6 @@ namespace PSL.DISCUS
 			return (string[]) lstResults.ToArray( typeof(System.String) );
 		}

-
-		/// <summary>
-		///	Function executes a method against a web service proxy via reflection.
-		/// </summary>
-		/// <param name="strServiceName">Name of web service proxy to execute against</param>
-		/// <param name="strServiceMethod">Name of method to execute</param>
-		/// <param name="objParams">Array of parameters to pass to proxy method</param>
-		/// <returns>The results of execution against the web service</returns>
-		public object ExecuteService( string strServiceName, string strServiceMethod, object[] objParams )
-		{
-			TraceInfo( "Started ExecuteService" );
-
-			object objInvokeResult = null;
-			try
-			{
-				if( m_bTraceOn )
-					TraceInfo( "Executing " + strServiceMethod + " against service " + strServiceName );
-
-				if( strServiceName.Length == 0 || strServiceMethod.Length == 0 )
-					throw new System.Exception( "Invalid Arguments Passed to Execute" );
-
-				// Get service details
-				WSDetails details = ServiceDetails( strServiceName );
-				// Fill in method details
-				details.Method = strServiceMethod;
-				InternalRegistry ireg = new InternalRegistry();
-				details.MethodExists = ireg.MethodExists( details.Name, details.Method );
-
-				// Quick checks for valid data returned from database
-				if( details.Location.Length == 0 )
-					throw new Exception( "Cannot Find Location of Service: " + details.Name );
-				// Verify that service supports method
-				if( !details.MethodExists )
-					throw new Exception( "Service: " + details.Name + " does not support method: " + details.Method );
-
-				// Resolve Web Service Proxy Location
-				// Do Runtime ProxyGeneration if necessary
-				// If service location is a link to a WSDL file
-				// then we must generate a proxy to the webservice,
-				// store the proxy in the proxy cache, update our
-				// database and set the Location to the generated
-				// proxy. Must also change service namespace in dbase
-				ResolveServiceLocation( ref details );
-
-				// Set execution context
-				ExecServiceContext execCtx = new ExecServiceContext();
-				execCtx.AccessPointUrl = details.AccessPoint;
-				execCtx.Assembly = details.Location;
-				execCtx.MethodName = details.Method;
-				execCtx.ServiceName = details.Name;
-				execCtx.Parameters.AddRange( objParams );
-
-				/*****************************************************************/
-				// Async invocation
-				/*
-				if( m_bUseAsync )
-				{
-					// Create condition variable, set to non-signaled state
-					AutoResetEvent cond = new AutoResetEvent( false );
-					// Create a task proxy with the condition variable
-					TaskProxy pxy = new TaskProxy( ref cond );
-					// Give tasks to the TaskProxy
-					Guid execTaskId = pxy.AddTaskRequest( new TaskRequest( new TaskRequest.TaskCallback( ExecuteServiceDirect ), execCtx ) );
-					// Let the TaskProxy wait on them
-					pxy.WaitOnTasks();
-
-					// TODO: Find stuff to do here while waiting on task(s) to finish
-					// Could do logging, context save etc.
-
-					// Sit and wait for proxy to signal tasks done
-					pxy.Condition.WaitOne();
-
-					if( !pxy.QueryResult( execTaskId ).HasErrors )
-						objInvokeResult = pxy.QueryResult( execTaskId ).Result;
-					else throw new Exception( pxy.QueryResult( execTaskId ).ExceptionMessage );
-				}
-				// Sync invocation
-				else
-				*/
-
-				objInvokeResult = ExecuteServiceDirect( execCtx );
-				/*****************************************************************/
-			}
-			catch( System.Exception e )
-			{
-				LogError( e.Message );
-			}
-			return objInvokeResult;
-
-		}//End-ExecuteService
-
 		/// <summary>
 		/// Function uses the SecurityManagerService to sign xml documents.
 		/// </summary>
@@ -1804,12 +1771,15 @@ namespace PSL.DISCUS
 			string strRetVal = "";
 			try
 			{
-				if( m_bTraceOn )
-					TraceInfo( "Signing document" );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "Signing document" );

 				string[] arrSecurityManagerResponse = null;
+
 				// Interact with SecurityManagerService via reflection
 				WSDetails details = ServiceDetails( SECURITY_MANAGER );
+				ResolveServiceLocation( ref details );
+
 				if( details.Location.Length == 0 )
 					throw new System.Exception( "Cannot Find Security Manager" );

@@ -1817,25 +1787,29 @@ namespace PSL.DISCUS
 				object[] objParams = new Object[1];
 				objParams[0] = strXmlDoc;

-				// Only do this method async if a proxy does not have to be generated
-				// otherwise there may be file locking issues with the proxy assembly
-				// if multiple threads try to generate and load the web service proxy
-				object objExecResult = ExecuteService( SECURITY_MANAGER, SIGN_DOCUMENT_METHOD, objParams );
+				ExecServiceContext ctx = new ExecServiceContext();
+				ctx.AccessPointUrl = details.AccessPoint;
+				ctx.Assembly = details.Location;
+				ctx.ServiceName = details.Name;
+				ctx.MethodName = SIGN_DOCUMENT_METHOD;
+				ctx.Parameters.AddRange( objParams );
+
+				object objExecResult = ExecuteServiceDirect( ctx );

 				if( objExecResult != null )
 				{
 					// SecurityManagerService returns a string array
 					arrSecurityManagerResponse = objExecResult as string[];
 						strRetVal = arrSecurityManagerResponse[SECURITY_MANAGER_RETURNED_SIGNATURE_INDEX];
-					if( strRetVal.Length > 0 && m_bTraceOn )
+					if( strRetVal.Length > 0 && this.TraceOn )
 					{
-						LogInfo( "Signed doc" );
+						LogInfo( this.Name, "Signed doc" );
 					}
 				}
 			}
 			catch( System.Exception e )
 			{
-				LogError( e.Message );
+				LogError( this.Name, e.Message );
 			}
 			return strRetVal;
 		}//End SignDocument
@@ -1851,23 +1825,29 @@ namespace PSL.DISCUS
 			string strRetVal = "";
 			try
 			{
-				if( m_bTraceOn )
-					TraceInfo( "Verifying Document " );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "Verifying Document " );

 				string[] arrSecurityManagerResponse = null;
 				// Interact with SecurityManagerService via reflection
 				WSDetails details = ServiceDetails( SECURITY_MANAGER );
+				ResolveServiceLocation( ref details );
+
 				if( details.Location.Length == 0 )
 					throw new System.Exception( "Cannot Find Security Manager" );

 				// Pass document to verify to SecurityManagerService
-				object[] objParams = new Object[1];
+				object[] objParams = new object[1];
 				objParams[0] = strXmlDoc;

-				// Only do this method async if a proxy does not have to be generated
-				// otherwise there may be file locking issues with the proxy assembly
-				// if multiple threads try to generate and load the web service proxy
-				object objExecResult = ExecuteService( SECURITY_MANAGER, VERIFY_DOCUMENT_METHOD, objParams );
+				ExecServiceContext ctx = new ExecServiceContext();
+				ctx.AccessPointUrl = details.AccessPoint;
+				ctx.Assembly = details.Location;
+				ctx.ServiceName = details.Name;
+				ctx.MethodName = VERIFY_DOCUMENT_METHOD;
+				ctx.Parameters.AddRange( objParams );
+
+				object objExecResult = ExecuteServiceDirect( ctx );

 				if( objExecResult != null )
 				{
@@ -1875,15 +1855,15 @@ namespace PSL.DISCUS
 					arrSecurityManagerResponse = objExecResult as string[];
 					strRetVal = arrSecurityManagerResponse[SECURITY_MANAGER_RETURNED_VERIFICATION_INDEX];

-					if( strRetVal.Length > 0 && m_bTraceOn )
+					if( strRetVal.Length > 0 && this.TraceOn )
 					{
-						LogInfo( "Verified doc" );
+						LogInfo( this.Name, "Verified doc" );
 					}
 				}
 			}
 			catch( System.Exception e )
 			{
-				LogError( e.Message );
+				LogError( this.Name, e.Message );
 			}
 			return strRetVal;
 		}//End-VerifyDocument
@@ -2104,14 +2084,13 @@ namespace PSL.DISCUS
 			WSProxyGenContext ctx = objCtx as WSProxyGenContext;
 			if( ctx == null )
 				throw new Exception( "Invalid context passed" );
-			// Verify context object valid
-
+
 			DynamicRequest req = new DynamicRequest();
-			req.serviceName = ctx.Name;
-			req.proxyPath = ctx.ProxyCache;
-			req.wsdlFile = ctx.WsdlUrl;
-			req.baseURL = ctx.AccessPointUrl;
-
+			req.FilenameSource = ctx.Name;
+			req.ServiceName = ctx.Name;
+			req.ProxyPath = ctx.ProxyCache;
+			req.WsdlFile = ctx.WsdlUrl;
+
 			// Create a proxy generator
 			ProxyGen pxyGen = new ProxyGen();
 			// Set mutator
@@ -2129,7 +2108,7 @@ namespace PSL.DISCUS
 		/// <returns>WSDetails instance</returns>
 		private WSDetails ServiceDetails( string strName )
 		{
-			InternalRegistry ireg = new InternalRegistry();
+			InternalRegistry ireg = new InternalRegistry( this.DatabaseConnectString );
 			WSDetails details = new WSDetails();

 			details.Location = ireg.GetServiceLocation( strName );
@@ -2149,7 +2128,7 @@ namespace PSL.DISCUS
 		/// <returns>WSDetails instance</returns>
 		private WSDetails GatekeeperDetails( string strName )
 		{
-			InternalRegistry ireg = new InternalRegistry();
+			InternalRegistry ireg = new InternalRegistry( this.DatabaseConnectString );
 			WSDetails details = new WSDetails();

 			details.Location = ireg.GetGateKeeperLocation( strName );
@@ -2173,8 +2152,8 @@ namespace PSL.DISCUS

 			if( details.Location.ToLower().StartsWith( "http" ) )
 			{
-				if( m_bTraceOn )
-					TraceInfo( "Generating Proxy to " + details.Name + " located at " + details.Location + " AccessPoint: " + details.AccessPoint );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "Generating Proxy to " + details.Name + " located at " + details.Location + " AccessPoint: " + details.AccessPoint );

 				// Set context for proxy generation
 				WSProxyGenContext ctx = new WSProxyGenContext();
@@ -2192,7 +2171,7 @@ namespace PSL.DISCUS
 				// Do not update location of security manager
 				if( details.Name.CompareTo( SECURITY_MANAGER ) != 0 )
 				{
-					InternalRegistry ireg = new InternalRegistry();
+					InternalRegistry ireg = new InternalRegistry( this.DatabaseConnectString );
 					// Update database location of service, point to
 					// dynamic proxy, change namespace the dynamic proxy namespace
 					ireg.UpdateServiceLocation( details.Name, details.Location );
@@ -2222,8 +2201,8 @@ namespace PSL.DISCUS

 			if( details.Location.ToLower().StartsWith( "http" ) )
 			{
-				if( m_bTraceOn )
-					TraceInfo( "Generating Proxy to " + details.Name + " located at " + details.Location + " AccessPoint: " + details.AccessPoint );
+				if( this.TraceOn )
+					TraceInfo( this.Name, "Generating Proxy to " + details.Name + " located at " + details.Location + " AccessPoint: " + details.AccessPoint );

 				// Set context for proxy generation
 				WSProxyGenContext ctx = new WSProxyGenContext();
@@ -2241,7 +2220,7 @@ namespace PSL.DISCUS
 				// Do not update location of security manager
 				if( details.Name.CompareTo( SECURITY_MANAGER ) != 0 )
 				{
-					InternalRegistry ireg = new InternalRegistry();
+					InternalRegistry ireg = new InternalRegistry( this.DatabaseConnectString );
 					// Update database location of service, point to
 					// dynamic proxy, change namespace the dynamic proxy namespace
 					ireg.UpdateGateKeeperLocation( details.Name, details.Location );
diff --git a/csharpsrc/DISCUS/GatekeeperSettings.cs b/csharpsrc/DISCUS/GatekeeperSettings.cs
new file mode 100644
index 0000000..ae360b6
--- /dev/null
+++ b/csharpsrc/DISCUS/GatekeeperSettings.cs
@@ -0,0 +1,182 @@
+using System;
+using System.Threading;
+using System.Reflection;
+using System.IO;
+using PSL.DISCUS.Logging;
+
+namespace PSL.DISCUS
+{
+	/// <summary>
+	/// Summary description for GatekeeperSettings.
+	/// </summary>
+	public class GatekeeperSettings
+	{
+		// Settings with acceptable defaults
+		private string m_strDatabaseConnectionString = Constants.DEFAULT_DBASE_CONNECT;
+		private string m_strGatekeeperName = Constants.DEFAULT_GATEKEEPER_NAME;
+		private string m_strProxyCache = Constants.DEFAULT_PROXY_CACHE;
+		private enuLoggingType m_loggingType = Constants.DEFAULT_LOGGING_TYPE;
+		private enuTracingType m_tracingType = Constants.DEFAULT_TRACING_TYPE;
+		private bool m_bTraceOn = Constants.DEFAULT_TRACE_ON;
+
+		// Settings with no acceptable defaults
+		private string m_strUrlLoggingHostname = "";
+		private int m_nUrlLoggingPort = -1;
+		private string m_strUrlTracingHostname = "";
+		private int m_nUrlTracingPort = -1;
+
+		public GatekeeperSettings()
+		{
+			// Set Fully Qualified name of ProxyCache
+			string strLocalPath = new Uri( Assembly.GetExecutingAssembly().CodeBase ).LocalPath;
+			this.m_strProxyCache = new FileInfo( strLocalPath ).Directory.FullName + "\\" + Constants.DEFAULT_PROXY_CACHE;
+		}
+
+		// Properties
+		public string DatabaseConnectString
+		{
+			get
+			{ return this.m_strDatabaseConnectionString; }
+			set
+			{
+				// Make no changes
+				if( value == null || value.Length == 0 )
+					return;
+
+				lock( m_strDatabaseConnectionString )
+				{
+					this.m_strDatabaseConnectionString = value;
+				}
+			}
+		}
+
+		public string GatekeeperName
+		{
+			get
+			{ return this.m_strGatekeeperName; }
+			set
+			{
+				// Make no changes
+				if( value == null || value.Length == 0 )
+					return;
+
+				lock( m_strGatekeeperName )
+				{
+					this.m_strGatekeeperName = value;
+				}
+			}
+		}
+		public string ProxyCache
+		{
+			get
+			{ return this.m_strProxyCache; }
+			set
+			{
+				// Make no changes
+				if( value == null || value.Length == 0 )
+					return;
+
+				lock( m_strProxyCache )
+				{
+					this.m_strProxyCache = value;
+				}
+			}
+		}
+		public enuLoggingType LoggingType
+		{
+			get
+			{ return this.m_loggingType; }
+			set
+			{
+				lock( (object) m_loggingType )
+				{
+					this.m_loggingType = value;
+				}
+			}
+		}
+
+		public enuTracingType TracingType
+		{
+			get
+			{ return this.m_tracingType; }
+			set
+			{
+				lock( (object) m_tracingType )
+				{
+					this.m_tracingType = value;
+				}
+			}
+		}
+
+		public bool TraceOn
+		{
+			get
+			{ return this.m_bTraceOn; }
+			set
+			{
+				lock( (object) m_bTraceOn )
+				{
+					this.m_bTraceOn = value;
+				}
+			}
+		}
+
+		public string UrlLoggingHostname
+		{
+			get
+			{ return this.m_strUrlLoggingHostname; }
+			set
+			{
+				if( value == null || value.Length == 0 )
+					return;
+
+				lock( m_strUrlLoggingHostname )
+				{
+					this.m_strUrlLoggingHostname = value;
+				}
+			}
+		}
+
+		public int UrlLoggingPort
+		{
+			get
+			{ return this.m_nUrlLoggingPort; }
+			set
+			{
+				lock( (object) m_nUrlLoggingPort )
+				{
+					this.m_nUrlLoggingPort = value;
+				}
+			}
+		}
+
+		public string UrlTracingHostname
+		{
+			get
+			{ return this.m_strUrlTracingHostname; }
+			set
+			{
+				if( value == null || value.Length == 0 )
+					return;
+
+				lock( m_strUrlTracingHostname )
+				{
+					this.m_strUrlTracingHostname = value;
+				}
+			}
+		}
+
+		public int UrlTracingPort
+		{
+			get
+			{ return this.m_nUrlTracingPort; }
+			set
+			{
+				lock( (object) m_nUrlTracingPort )
+				{
+					this.m_nUrlTracingPort = value;
+				}
+			}
+		}
+	}
+}
diff --git a/csharpsrc/DISCUS/ILogger.cs b/csharpsrc/DISCUS/ILogger.cs
index b9286a1..926444a 100644
--- a/csharpsrc/DISCUS/ILogger.cs
+++ b/csharpsrc/DISCUS/ILogger.cs
@@ -7,8 +7,8 @@ namespace PSL.DISCUS.Interfaces
 	/// </summary>
 	public interface ILogger
 	{
-		void LogError( string strMsg );
-		void LogInfo( string strMsg );
-		void LogWarning( string strMsg );
+		void LogError( string strSource, string strMsg );
+		void LogInfo( string strSource, string strMsg );
+		void LogWarning( string strSource, string strMsg );
 	}
 }
diff --git a/csharpsrc/DISCUS/ITracer.cs b/csharpsrc/DISCUS/ITracer.cs
index 48859e2..f74b163 100644
--- a/csharpsrc/DISCUS/ITracer.cs
+++ b/csharpsrc/DISCUS/ITracer.cs
@@ -7,8 +7,8 @@ namespace PSL.DISCUS.Interfaces
 	/// </summary>
 	public interface ITracer
 	{
-		void TraceError( string strMsg );
-		void TraceInfo( string strMsg );
-		void TraceWarning( string strMsg );
+		void TraceError( string strSource, string strMsg );
+		void TraceInfo( string strSource, string strMsg );
+		void TraceWarning( string strSource, string strMsg );
 	}
 }
diff --git a/csharpsrc/DISCUS/InternalRegistry.cs b/csharpsrc/DISCUS/InternalRegistry.cs
index f1f6c2d..942e97b 100644
--- a/csharpsrc/DISCUS/InternalRegistry.cs
+++ b/csharpsrc/DISCUS/InternalRegistry.cs
@@ -12,10 +12,10 @@ namespace PSL.DISCUS.DataAccess
 		private RegServiceDAO m_svcDAO;
 		private ServiceSpaceDAO m_svcSpaceDAO;

-		public InternalRegistry()
+		public InternalRegistry( string strDBConnect )
 		{
-			m_svcDAO = new RegServiceDAO();
-			m_svcSpaceDAO = new ServiceSpaceDAO();
+			m_svcDAO = new RegServiceDAO( strDBConnect );
+			m_svcSpaceDAO = new ServiceSpaceDAO( strDBConnect );
 		}

 		/* RegisteredServices interactions */
diff --git a/csharpsrc/DISCUS/LogTraceContext.cs b/csharpsrc/DISCUS/LogTraceContext.cs
index a1d532e..ac182d7 100644
--- a/csharpsrc/DISCUS/LogTraceContext.cs
+++ b/csharpsrc/DISCUS/LogTraceContext.cs
@@ -1,55 +1,56 @@
 using System;
+using System.Threading;

 namespace PSL.DISCUS.Logging
 {
+	public enum enuLoggingType
+	{
+		None = 0,
+		EventLog,
+		UrlLog
+	}
+
+	public enum enuTracingType
+	{
+		None = 0,
+		EventTrace,
+		UrlTrace,
+	}
+
 	/// <summary>
 	/// Summary description for LogTraceContext.
 	/// </summary>
 	public class LogTraceContext
 	{
-		// All contextual info needed by logging and tracing implementations
-		// Event Logging info = none
-
-		// UrlLogging info = hostname and port
 		private string m_strHostname = "";
+		private int m_nPort = -1;
+
 		public string Hostname
 		{
 			get
 			{ return m_strHostname; }
 			set
-			{ m_strHostname = value; }
+			{
+				lock( m_strHostname )
+				{
+					m_strHostname = value;
+				}
+			}
 		}
-
-		private int m_nPort = -1;
+
 		public int Port
 		{
 			get
 			{ return m_nPort; }
 			set
-			{ m_nPort = value; }
-		}
-
-		// WebServiceLogging info = WSDL file location of web service and access point
-		// useful for using a pub/sub event system via a web sevice interface to
-		// facilitate publishing on the event system
-		private string m_strWebServiceWSDL = "";
-		public string WebServiceWSDL
-		{
-			get
-			{ return m_strWebServiceWSDL; }
-			set
-			{ m_strWebServiceWSDL = value; }
-		}
-
-		private string m_strWebServiceAccessPoint = "";
-		public string WebServiceAccessPoint
-		{
-			get
-			{ return m_strWebServiceAccessPoint; }
-			set
-			{ m_strWebServiceAccessPoint = value; }
+			{
+				lock( (object) m_nPort )
+				{
+					m_nPort = value;
+				}
+			}
 		}
-
+
 		public LogTraceContext()
 		{
 		}
diff --git a/csharpsrc/DISCUS/LoggerImpl.cs b/csharpsrc/DISCUS/LoggerImpl.cs
index ad4cefc..b4bbb7f 100644
--- a/csharpsrc/DISCUS/LoggerImpl.cs
+++ b/csharpsrc/DISCUS/LoggerImpl.cs
@@ -8,24 +8,16 @@ namespace PSL.DISCUS.Logging
 	/// </summary>
 	public abstract class LoggerImpl:ILogger
 	{
-		protected string m_strSource = "";
-		public virtual string Source
-		{
-			get{ return m_strSource; }
-			set{ m_strSource = value; }
-		}
-
-
 		public LoggerImpl()
 		{}

-		public virtual void LogError( string strMsg )
+		public virtual void LogError( string strSource, string strMsg )
 		{}

-		public virtual void LogInfo( string strMsg )
+		public virtual void LogInfo( string strSource, string strMsg )
 		{}

-		public virtual void LogWarning( string strMsg )
+		public virtual void LogWarning( string strSource, string strMsg )
 		{}
 	}
 }
diff --git a/csharpsrc/DISCUS/ProxyGen.cs b/csharpsrc/DISCUS/ProxyGen.cs
index 95519c5..228317c 100644
--- a/csharpsrc/DISCUS/ProxyGen.cs
+++ b/csharpsrc/DISCUS/ProxyGen.cs
@@ -23,7 +23,6 @@ namespace PSL.DISCUS.DynamicProxy
 	{
 		// Source name used for event logging
 		private const string SOURCENAME = "DynamicProxy.ProxyGen";
-		private EventLog m_EvtLog;
 		private ProxyMutator m_mutator = null;

 		// Set mutator
@@ -46,9 +45,6 @@ namespace PSL.DISCUS.DynamicProxy

 		public ProxyGen()
 		{
-			// Inititalize event logging facility
-			m_EvtLog = new EventLog( "Application" );
-			m_EvtLog.Source = SOURCENAME;
 		}

 		/*	Function generates an assembly based on a dynamic
@@ -64,15 +60,12 @@ namespace PSL.DISCUS.DynamicProxy
 			{
 				ServiceDescriptionImporter sdImport = new ServiceDescriptionImporter();
 				// Read Service description from WSDL file
-				ServiceDescription svcDesc = ServiceDescription.Read( Util.DynProxyUtil.GetHttpStream( req.wsdlFile ) );
+				ServiceDescription svcDesc = ServiceDescription.Read( Util.DynProxyUtil.GetHttpStream( req.WsdlFile ) );
 				// Set Protocol
-				sdImport.ProtocolName = req.protocol;
-				// Add service description
-				if( req.baseURL.Length > 0 )
-					sdImport.AddServiceDescription( svcDesc, null, req.baseURL );
-				else sdImport.AddServiceDescription( svcDesc, null, null );
+				sdImport.ProtocolName = req.Protocol;
+				sdImport.AddServiceDescription( svcDesc, null, null );
 				// Set namespace for generated proxy
-				CodeNamespace cnSpace = new CodeNamespace( req.dynNamespace );
+				CodeNamespace cnSpace = new CodeNamespace( req.DynNamespace );
 				// Create new code compiled unit
 				CodeCompileUnit ccUnit = new CodeCompileUnit();
 				ServiceDescriptionImportWarnings sdiWarning = sdImport.Import( cnSpace, ccUnit );
@@ -88,8 +81,18 @@ namespace PSL.DISCUS.DynamicProxy
 					m_mutator.Mutate( ref cnSpace );

 				// Construct paths to source code and assembly
-				string strFilenameSource = req.proxyPath + "\\" + req.filenameSource + ".cs";
-				string strAssemblyFilename = req.proxyPath + "\\" + req.filenameSource + ".dll";
+				string strFilenameSource = "";
+
+				if( req.ProxyPath.Length > 0 )
+					strFilenameSource = req.ProxyPath + "\\" + req.FilenameSource + ".cs";
+				else strFilenameSource = req.FilenameSource + ".cs";
+
+				string strAssemblyFilename = "";
+
+				if( req.ProxyPath.Length > 0 )
+					strAssemblyFilename = req.ProxyPath + "\\" + req.FilenameSource + ".dll";
+				else strAssemblyFilename = req.FilenameSource + ".dll";
+
 				// Create an output stream associated with assembly
 				StreamWriter sw = new StreamWriter( strFilenameSource );

@@ -105,7 +108,7 @@ namespace PSL.DISCUS.DynamicProxy

 				cparams.GenerateExecutable = false;
 				cparams.GenerateInMemory = false;
-				cparams.MainClass = req.serviceName;
+				cparams.MainClass = req.ServiceName;
 				cparams.OutputAssembly = strAssemblyFilename;
 				cparams.IncludeDebugInformation = true;

@@ -120,7 +123,7 @@ namespace PSL.DISCUS.DynamicProxy
 			catch( System.Exception e )
 			{
 				// Report Error
-				m_EvtLog.WriteEntry( e.Message, EventLogEntryType.Error );
+				EventLog.WriteEntry( SOURCENAME, e.Message, EventLogEntryType.Error );
 			}

 			return strAssemblyLoc;
diff --git a/csharpsrc/DISCUS/RegServiceDAO.cs b/csharpsrc/DISCUS/RegServiceDAO.cs
index 59fb4b4..f8f3dc2 100644
--- a/csharpsrc/DISCUS/RegServiceDAO.cs
+++ b/csharpsrc/DISCUS/RegServiceDAO.cs
@@ -3,6 +3,7 @@ using System.Data;
 using System.IO;
 using System.Xml;
 using System.Xml.XPath;
+using System.Text;
 using System.Diagnostics;
 using Microsoft.Data.Odbc;
 using PSL.DISCUS.Interfaces.DataAccess;
@@ -18,44 +19,15 @@ namespace PSL.DISCUS.DataAccess
 	/// </summary>
 	public class RegServiceDAO:IDataObj
 	{
-		// Database configuration file
-		private string DATACONFIG = DConst.DBASECONFIG_FILE;
 		// Source name used for event logging
 		private const string SOURCENAME = "DataAccess.RegServiceDAO";
-		private EventLog m_EvtLog;
 		// Database connection string
 		private string m_strConnect = "";

 		/* Constructor */
-		public RegServiceDAO()
+		public RegServiceDAO( string strDBConnect )
 		{
-			try
-			{
-				// Initialize event logging facility
-				m_EvtLog = new EventLog( "Application" );
-				m_EvtLog.Source = SOURCENAME;
-
-				// Load config info, dbase, connection info etc.
-				FileStream fs = File.Open( DATACONFIG, FileMode.Open );
-				TextReader tr = new StreamReader( fs );
-				string strConfigFile = tr.ReadToEnd();
-
-				// Load config file
-				XmlDocument doc = new XmlDocument();
-				doc.LoadXml( strConfigFile );
-
-				// Use XPath to extract what info we need
-				XmlNode root =  doc.DocumentElement;
-				// Get dbase connection info
-				m_strConnect = root.SelectSingleNode( "ConnectionString" ).InnerText;
-
-				fs.Close(); // Close file stream
-			}
-			catch( System.Exception e )
-			{
-				// Report error
-				m_EvtLog.WriteEntry( e.Message, EventLogEntryType.Error );
-			}
+			m_strConnect = strDBConnect;
 		}// End constructor

 		/* Implementation IDataObj ExecuteCommandText method
@@ -88,7 +60,7 @@ namespace PSL.DISCUS.DataAccess
 				// Report error
 				string strError = e.Message;
 				strError += " LAST QUERY: " + strCmd;
-				m_EvtLog.WriteEntry( strError, EventLogEntryType.Error );
+				EventLog.WriteEntry( SOURCENAME, strError, EventLogEntryType.Error );
 			}
 			return bRetVal;
 		}
@@ -116,7 +88,7 @@ namespace PSL.DISCUS.DataAccess
 				// Report error
 				string strError = e.Message;
 				strError += " LAST QUERY: " + strCmd;
-				m_EvtLog.WriteEntry( strError, EventLogEntryType.Error );
+				EventLog.WriteEntry( SOURCENAME, strError, EventLogEntryType.Error );
 			}
 			return dr;
 		}
@@ -138,30 +110,32 @@ namespace PSL.DISCUS.DataAccess
 				return 0;

 			int nServiceID = -1;
-			string strSQL = "INSERT INTO ";
-			strSQL += DBC.REGISTERED_SERVICES_TABLE;
-			strSQL += " (" + DBC.RS_SERVICE_NAME + ",";
+			StringBuilder strSQL = new StringBuilder();
+
+			strSQL.Append( "INSERT INTO " );
+			strSQL.Append( DBC.REGISTERED_SERVICES_TABLE );
+			strSQL.Append( " (" + DBC.RS_SERVICE_NAME + "," );
 			// Add namespace if supplied
 			if( strServiceNamespace.Length > 0 )
-				strSQL += DBC.RS_SERVICENAMESPACE + ",";
+				strSQL.Append( DBC.RS_SERVICENAMESPACE + "," );

 			if( strServiceAccessPoint.Length > 0 )
-				strSQL += DBC.RS_SERVICE_ACCESSPOINT + ",";
+				strSQL.Append( DBC.RS_SERVICE_ACCESSPOINT + "," );

-			strSQL += DBC.RS_SERVICE_LOCATION + ")";
+			strSQL.Append( DBC.RS_SERVICE_LOCATION + ")" );

-			strSQL += " VALUES(" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'" + ",";
+			strSQL.Append( " VALUES(" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'" + "," );

 			if( strServiceNamespace.Length > 0 )
-				strSQL += "'" + DBUtil.MakeStringSafe( strServiceNamespace ) + "'" + ",";
+				strSQL.Append( "'" + DBUtil.MakeStringSafe( strServiceNamespace ) + "'" + "," );

 			if( strServiceAccessPoint.Length > 0 )
-				strSQL += "'" + DBUtil.MakeStringSafe(strServiceAccessPoint) + "'" + ",";
+				strSQL.Append( "'" + DBUtil.MakeStringSafe(strServiceAccessPoint) + "'" + "," );

-			strSQL += "'" + DBUtil.MakeStringSafe(strServiceLocation) + "'" + ")";
+			strSQL.Append( "'" + DBUtil.MakeStringSafe(strServiceLocation) + "'" + ")" );


-			if( ExecuteCommandText( strSQL ) )
+			if( ExecuteCommandText( strSQL.ToString() ) )
 				nServiceID = GetServiceID( strServiceName );

 			return nServiceID;
@@ -178,11 +152,12 @@ namespace PSL.DISCUS.DataAccess
 			if( strServiceName.Length == 0 )
 				return false;

-			string strSQL = "DELETE FROM ";
-			strSQL += DBC.REGISTERED_SERVICES_TABLE;
-			strSQL += " WHERE " + DBUtil.MakeStringSafe(DBC.RS_SERVICE_NAME) + "=" + "'" + strServiceName + "'";
+			StringBuilder strSQL = new StringBuilder();
+			strSQL.Append( "DELETE FROM " );
+			strSQL.Append( DBC.REGISTERED_SERVICES_TABLE );
+			strSQL.Append( " WHERE " + DBUtil.MakeStringSafe(DBC.RS_SERVICE_NAME) + "=" + "'" + strServiceName + "'" );

-			bRetVal = ExecuteCommandText( strSQL );
+			bRetVal = ExecuteCommandText( strSQL.ToString() );

 			return bRetVal;
 		}
@@ -199,11 +174,13 @@ namespace PSL.DISCUS.DataAccess
 			if( strServiceName.Length == 0 || strServiceAccessPoint.Length == 0 )
 				return false;

-			string strSQL = "UPDATE " + DBC.REGISTERED_SERVICES_TABLE;
-			strSQL += " SET " + DBC.RS_SERVICE_ACCESSPOINT + "=" + "'" + DBUtil.MakeStringSafe(strServiceAccessPoint) + "'";
-			strSQL += " WHERE " + DBC.RS_SERVICE_NAME + "=" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'";
+			StringBuilder strSQL = new StringBuilder();
+
+			strSQL.Append( "UPDATE " + DBC.REGISTERED_SERVICES_TABLE );
+			strSQL.Append( " SET " + DBC.RS_SERVICE_ACCESSPOINT + "=" + "'" + DBUtil.MakeStringSafe(strServiceAccessPoint) + "'" );
+			strSQL.Append( " WHERE " + DBC.RS_SERVICE_NAME + "=" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'" );

-			bRetVal = ExecuteCommandText( strSQL );
+			bRetVal = ExecuteCommandText( strSQL.ToString() );

 			return bRetVal;
 		}
@@ -220,11 +197,13 @@ namespace PSL.DISCUS.DataAccess
 			if( strServiceName.Length == 0 || strServiceNamespace.Length == 0 )
 				return false;

-			string strSQL = "UPDATE " + DBC.REGISTERED_SERVICES_TABLE;
-			strSQL += " SET " + DBC.RS_SERVICENAMESPACE + "=" + "'" + DBUtil.MakeStringSafe(strServiceNamespace) + "'";
-			strSQL += " WHERE " + DBC.RS_SERVICE_NAME + "=" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'";
+			StringBuilder strSQL = new StringBuilder();

-			bRetVal = ExecuteCommandText( strSQL );
+			strSQL.Append( "UPDATE " + DBC.REGISTERED_SERVICES_TABLE );
+			strSQL.Append( " SET " + DBC.RS_SERVICENAMESPACE + "=" + "'" + DBUtil.MakeStringSafe(strServiceNamespace) + "'" );
+			strSQL.Append( " WHERE " + DBC.RS_SERVICE_NAME + "=" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'" );
+
+			bRetVal = ExecuteCommandText( strSQL.ToString() );

 			return bRetVal;
 		}
@@ -235,11 +214,13 @@ namespace PSL.DISCUS.DataAccess
 			if( strServiceName.Length == 0 || strServiceLocation.Length == 0 )
 				return false;

-			string strSQL = "UPDATE " + DBC.REGISTERED_SERVICES_TABLE;
-			strSQL += " SET " + DBC.RS_SERVICE_LOCATION + "=" + "'" + DBUtil.MakeStringSafe(strServiceLocation) + "'";
-			strSQL += " WHERE " + DBC.RS_SERVICE_NAME + "=" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'";
+			StringBuilder strSQL = new StringBuilder();
+
+			strSQL.Append( "UPDATE " + DBC.REGISTERED_SERVICES_TABLE );
+			strSQL.Append( " SET " + DBC.RS_SERVICE_LOCATION + "=" + "'" + DBUtil.MakeStringSafe(strServiceLocation) + "'" );
+			strSQL.Append( " WHERE " + DBC.RS_SERVICE_NAME + "=" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'" );

-			bRetVal = ExecuteCommandText( strSQL );
+			bRetVal = ExecuteCommandText( strSQL.ToString() );

 			return bRetVal;
 		}
@@ -262,12 +243,13 @@ namespace PSL.DISCUS.DataAccess
 			int nServiceID = GetServiceID( strServiceName );
 			if( nServiceID != -1 )
 			{
-				string strSQL = "INSERT INTO ";
-				strSQL += DBC.SERVICE_METHODS_TABLE;
-				strSQL += "(" + DBC.RS_SERVICE_ID + "," + DBC.SM_METHODNAME + ")";
-				strSQL += " VALUES(" + nServiceID.ToString() + "," + "'" + DBUtil.MakeStringSafe( strMethod ) + "'" + ")";
+				StringBuilder strSQL = new StringBuilder();
+				strSQL.Append( "INSERT INTO " );
+				strSQL.Append( DBC.SERVICE_METHODS_TABLE );
+				strSQL.Append( "(" + DBC.RS_SERVICE_ID + "," + DBC.SM_METHODNAME + ")" );
+				strSQL.Append( " VALUES(" + nServiceID.ToString() + "," + "'" + DBUtil.MakeStringSafe( strMethod ) + "'" + ")" );

-				bRetVal = ExecuteCommandText( strSQL );
+				bRetVal = ExecuteCommandText( strSQL.ToString() );
 			}

 			return bRetVal;
@@ -290,12 +272,13 @@ namespace PSL.DISCUS.DataAccess
 			int nServiceID = GetServiceID( strServiceName );
 			if( nServiceID != -1 )
 			{
-				string strSQL = "DELETE FROM ";
-				strSQL += DBC.SERVICE_METHODS_TABLE;
-				strSQL += " WHERE " + DBC.RS_SERVICE_ID + "=" + nServiceID.ToString();
-				strSQL += " AND " + DBC.SM_METHODNAME + "=" + "'" + DBUtil.MakeStringSafe( strMethod ) + "'";
+				StringBuilder strSQL = new StringBuilder();
+				strSQL.Append( "DELETE FROM " );
+				strSQL.Append( DBC.SERVICE_METHODS_TABLE );
+				strSQL.Append( " WHERE " + DBC.RS_SERVICE_ID + "=" + nServiceID.ToString() );
+				strSQL.Append( " AND " + DBC.SM_METHODNAME + "=" + "'" + DBUtil.MakeStringSafe( strMethod ) + "'" );

-				bRetVal = ExecuteCommandText( strSQL );
+				bRetVal = ExecuteCommandText( strSQL.ToString() );
 			}

 			return bRetVal;
@@ -319,12 +302,13 @@ namespace PSL.DISCUS.DataAccess
 			int nServiceID = GetServiceID( strServiceName );
 			if( nServiceID != -1 )
 			{
-				string strSQL = "UPDATE " + DBC.SERVICE_METHODS_TABLE;
-				strSQL += " SET " + DBC.SM_METHODNAME + "=" + "'" + DBUtil.MakeStringSafe( strNewMethod ) + "'";
-				strSQL += " WHERE " + DBC.RS_SERVICE_ID + "=" + nServiceID.ToString();
-				strSQL += " AND " + DBC.SM_METHODNAME + "=" + "'" + DBUtil.MakeStringSafe( strOldMethod ) + "'";
+				StringBuilder strSQL = new StringBuilder();
+				strSQL.Append( "UPDATE " + DBC.SERVICE_METHODS_TABLE );
+				strSQL.Append( " SET " + DBC.SM_METHODNAME + "=" + "'" + DBUtil.MakeStringSafe( strNewMethod ) + "'" );
+				strSQL.Append( " WHERE " + DBC.RS_SERVICE_ID + "=" + nServiceID.ToString() );
+				strSQL.Append( " AND " + DBC.SM_METHODNAME + "=" + "'" + DBUtil.MakeStringSafe( strOldMethod ) + "'" );

-				bRetVal = ExecuteCommandText( strSQL );
+				bRetVal = ExecuteCommandText( strSQL.ToString() );
 			}

 			return bRetVal;
@@ -341,11 +325,12 @@ namespace PSL.DISCUS.DataAccess

 			try
 			{
-				string strSQL = "SELECT " + DBC.RS_SERVICE_ID;
-				strSQL += " FROM " + DBC.REGISTERED_SERVICES_TABLE;
-				strSQL += " WHERE " + DBC.RS_SERVICE_NAME + "=" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'";
+				StringBuilder strSQL = new StringBuilder();
+				strSQL.Append( "SELECT " + DBC.RS_SERVICE_ID );
+				strSQL.Append( " FROM " + DBC.REGISTERED_SERVICES_TABLE );
+				strSQL.Append( " WHERE " + DBC.RS_SERVICE_NAME + "=" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'" );

-				dr = ExecuteReader( strSQL );
+				dr = ExecuteReader( strSQL.ToString() );
 				if( dr != null )
 				{
 					dr.Read(); // move reader past BOF to first record
@@ -358,7 +343,7 @@ namespace PSL.DISCUS.DataAccess
 			catch( System.Exception e )
 			{
 				// Report error
-				m_EvtLog.WriteEntry( e.Message, EventLogEntryType.Error );
+				EventLog.WriteEntry( SOURCENAME, e.Message, EventLogEntryType.Error );
 			}
 			finally // cleanup after exception handled
 			{
@@ -383,11 +368,12 @@ namespace PSL.DISCUS.DataAccess

 			try
 			{
-				string strSQL = "SELECT " + DBC.RS_SERVICE_ACCESSPOINT;
-				strSQL += " FROM " + DBC.REGISTERED_SERVICES_TABLE;
-				strSQL += " WHERE " + DBC.RS_SERVICE_NAME + "=" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'";
+				StringBuilder strSQL = new StringBuilder();
+				strSQL.Append( "SELECT " + DBC.RS_SERVICE_ACCESSPOINT );
+				strSQL.Append( " FROM " + DBC.REGISTERED_SERVICES_TABLE );
+				strSQL.Append( " WHERE " + DBC.RS_SERVICE_NAME + "=" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'" );

-				dr = ExecuteReader( strSQL );
+				dr = ExecuteReader( strSQL.ToString() );
 				if( dr != null )
 				{
 					dr.Read(); // move reader past BOF to first record
@@ -400,7 +386,7 @@ namespace PSL.DISCUS.DataAccess
 			catch( System.Exception e )
 			{
 				// Report error
-				m_EvtLog.WriteEntry( e.Message, EventLogEntryType.Error );
+				EventLog.WriteEntry( SOURCENAME, e.Message, EventLogEntryType.Error );
 			}
 			finally // cleanup after exception handled
 			{
@@ -427,11 +413,12 @@ namespace PSL.DISCUS.DataAccess

 			try
 			{
-				string strSQL = "SELECT " + DBC.RS_SERVICENAMESPACE;
-				strSQL += " FROM " + DBC.REGISTERED_SERVICES_TABLE;
-				strSQL += " WHERE " + DBC.RS_SERVICE_NAME + "=" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'";
+				StringBuilder strSQL = new StringBuilder();
+				strSQL.Append( "SELECT " + DBC.RS_SERVICENAMESPACE );
+				strSQL.Append( " FROM " + DBC.REGISTERED_SERVICES_TABLE );
+				strSQL.Append( " WHERE " + DBC.RS_SERVICE_NAME + "=" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'" );

-				dr = ExecuteReader( strSQL );
+				dr = ExecuteReader( strSQL.ToString() );
 				if( dr != null )
 				{
 					dr.Read(); // move reader past BOF to first record
@@ -444,7 +431,7 @@ namespace PSL.DISCUS.DataAccess
 			catch( System.Exception e )
 			{
 				// Report error
-				m_EvtLog.WriteEntry( e.Message, EventLogEntryType.Error );
+				EventLog.WriteEntry( SOURCENAME, e.Message, EventLogEntryType.Error );
 			}
 			finally // cleanup after exception handled
 			{
@@ -470,11 +457,12 @@ namespace PSL.DISCUS.DataAccess

 			try
 			{
-				string strSQL = "SELECT " + DBC.RS_SERVICE_LOCATION;
-				strSQL += " FROM " + DBC.REGISTERED_SERVICES_TABLE;
-				strSQL += " WHERE " + DBC.RS_SERVICE_NAME + "=" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'";
+				StringBuilder strSQL = new StringBuilder();
+				strSQL.Append( "SELECT " + DBC.RS_SERVICE_LOCATION );
+				strSQL.Append( " FROM " + DBC.REGISTERED_SERVICES_TABLE );
+				strSQL.Append( " WHERE " + DBC.RS_SERVICE_NAME + "=" + "'" + DBUtil.MakeStringSafe(strServiceName) + "'" );

-				dr = ExecuteReader( strSQL );
+				dr = ExecuteReader( strSQL.ToString() );
 				if( dr != null )
 				{
 					dr.Read(); // move reader past BOF to first record
@@ -487,7 +475,7 @@ namespace PSL.DISCUS.DataAccess
 			catch( System.Exception e )
 			{
 				// Report error
-				m_EvtLog.WriteEntry( e.Message, EventLogEntryType.Error );
+				EventLog.WriteEntry( SOURCENAME, e.Message, EventLogEntryType.Error );
 			}
 			finally // cleanup after exception handled
 			{
@@ -520,12 +508,13 @@ namespace PSL.DISCUS.DataAccess
 				if( nServiceID == -1 )
 					return false;

-				string strSQL = "SELECT COUNT(*) FROM ";
-				strSQL += DBC.SERVICE_METHODS_TABLE;
-				strSQL += " WHERE " + DBC.RS_SERVICE_ID + "=" + nServiceID.ToString();
-				strSQL += " AND " + DBC.SM_METHODNAME + "=" + "'" + strMethod + "'";
+				StringBuilder strSQL = new StringBuilder();
+				strSQL.Append( "SELECT COUNT(*) FROM " );
+				strSQL.Append( DBC.SERVICE_METHODS_TABLE );
+				strSQL.Append( " WHERE " + DBC.RS_SERVICE_ID + "=" + nServiceID.ToString() );
+				strSQL.Append( " AND " + DBC.SM_METHODNAME + "=" + "'" + strMethod + "'" );

-				dr = ExecuteReader( strSQL );
+				dr = ExecuteReader( strSQL.ToString() );
 				if( dr != null )
 				{
 					dr.Read();
@@ -542,7 +531,7 @@ namespace PSL.DISCUS.DataAccess
 			catch( System.Exception e )
 			{
 				// Report error
-				m_EvtLog.WriteEntry( e.Message, EventLogEntryType.Error );
+				EventLog.WriteEntry( SOURCENAME, e.Message, EventLogEntryType.Error );
 			}
 			finally // cleanup after exception handled
 			{
diff --git a/csharpsrc/DISCUS/ServiceSpaceDAO.cs b/csharpsrc/DISCUS/ServiceSpaceDAO.cs
index e7c7fc8..b1bea35 100644
--- a/csharpsrc/DISCUS/ServiceSpaceDAO.cs
+++ b/csharpsrc/DISCUS/ServiceSpaceDAO.cs
@@ -3,12 +3,12 @@ using System.Data;
 using System.IO;
 using System.Xml;
 using System.Xml.XPath;
+using System.Text;
 using System.Diagnostics;
 using Microsoft.Data.Odbc;
 using PSL.DISCUS.Interfaces.DataAccess;
 using PSL.DISCUS.DynamicProxy;

-
 namespace PSL.DISCUS.DataAccess
 {
 	/// <summary>
@@ -18,44 +18,15 @@ namespace PSL.DISCUS.DataAccess
 	/// </summary>
 	public class ServiceSpaceDAO:IDataObj
 	{
-		// Database configuration file
-		private string DATACONFIG = DConst.DBASECONFIG_FILE;
 		// Source name for event logging
 		private const string SOURCENAME = "DataAccess.ServiceSpaceDAO";
-		private EventLog m_EvtLog;
 		// Database connection string
 		private string m_strConnect = "";

 		/* Constructor */
-		public ServiceSpaceDAO()
+		public ServiceSpaceDAO( string strDBConnect )
 		{
-			try
-			{
-				// Initialize event logging facility
-				m_EvtLog = new EventLog( "Application" );
-				m_EvtLog.Source = SOURCENAME;
-
-				// Load config info, dbase, connection info etc.
-				FileStream fs = File.Open( DATACONFIG, FileMode.Open );
-				TextReader tr = new StreamReader( fs );
-				string strConfigFile = tr.ReadToEnd();
-
-				// Load config file
-				XmlDocument doc = new XmlDocument();
-				doc.LoadXml( strConfigFile );
-
-				// Use XPath to extract what info we need
-				XmlNode root =  doc.DocumentElement;
-				// Get dbase connection info
-				m_strConnect = root.SelectSingleNode( "ConnectionString" ).InnerText;
-
-				fs.Close();
-			}
-			catch( System.Exception e )
-			{
-				// Report error
-				m_EvtLog.WriteEntry( e.Message, EventLogEntryType.Error );
-			}
+				m_strConnect = strDBConnect;
 		}

 		/* Implementation IDataObj ExecuteCommandText method
@@ -88,7 +59,7 @@ namespace PSL.DISCUS.DataAccess
 				// Report error
 				string strError = e.Message;
 				strError += " LAST QUERY: " + strCmd;
-				m_EvtLog.WriteEntry( strError, EventLogEntryType.Error );
+				EventLog.WriteEntry( SOURCENAME, strError, EventLogEntryType.Error );
 			}
 			return bRetVal;
 		}
@@ -116,7 +87,7 @@ namespace PSL.DISCUS.DataAccess
 				// Report error
 				string strError = e.Message;
 				strError += " LAST QUERY: " + strCmd;
-				m_EvtLog.WriteEntry( strError, EventLogEntryType.Error );
+				EventLog.WriteEntry( SOURCENAME, strError, EventLogEntryType.Error );
 			}
 			return dr;
 		}// End ExecuteReader
@@ -136,31 +107,32 @@ namespace PSL.DISCUS.DataAccess
 			if( strGKName.Length == 0 || strGKLocation.Length == 0 )
 				return false;

-			string strSQL = "INSERT INTO ";
-			strSQL += DBC.SERVICE_SPACES_TABLE;
+			StringBuilder strSQL = new StringBuilder();
+			strSQL.Append( "INSERT INTO " );
+			strSQL.Append( DBC.SERVICE_SPACES_TABLE );

-			strSQL += "(" + DBC.SS_GK_NAME + ",";
+			strSQL.Append( "(" + DBC.SS_GK_NAME + "," );

 			if( strGKNamespace.Length > 0 )
-				strSQL += DBC.SS_GK_NAMESPACE + ",";
+				strSQL.Append( DBC.SS_GK_NAMESPACE + "," );

 			if( strGKAccessPoint.Length > 0 )
-				strSQL += DBC.SS_GK_ACCESSPOINT + ",";
+				strSQL.Append( DBC.SS_GK_ACCESSPOINT + "," );

-			strSQL += DBC.SS_GK_LOCATION + ")";
+			strSQL.Append( DBC.SS_GK_LOCATION + ")" );

-			strSQL += " VALUES(";
-			strSQL += "'" + DBUtil.MakeStringSafe( strGKName ) + "'" + ",";
+			strSQL.Append( " VALUES(" );
+			strSQL.Append( "'" + DBUtil.MakeStringSafe( strGKName ) + "'" + "," );

 			if( strGKNamespace.Length > 0 )
-				strSQL += "'" + DBUtil.MakeStringSafe( strGKNamespace ) + "'" + ",";
+				strSQL.Append( "'" + DBUtil.MakeStringSafe( strGKNamespace ) + "'" + "," );

 			if( strGKAccessPoint.Length > 0 )
-				strSQL += "'" + DBUtil.MakeStringSafe( strGKAccessPoint ) + "'" + ",";
+				strSQL.Append( "'" + DBUtil.MakeStringSafe( strGKAccessPoint ) + "'" + "," );

-			strSQL += "'" + DBUtil.MakeStringSafe( strGKLocation ) + "'" + ")";
+			strSQL.Append( "'" + DBUtil.MakeStringSafe( strGKLocation ) + "'" + ")" );

-			bRetVal = ExecuteCommandText( strSQL );
+			bRetVal = ExecuteCommandText( strSQL.ToString() );

 			return bRetVal;
 		}
@@ -175,11 +147,12 @@ namespace PSL.DISCUS.DataAccess
 		{
 			bool bRetVal = false;

-			string strSQL = "DELETE FROM ";
-			strSQL += DBC.SERVICE_SPACES_TABLE;
-			strSQL += " WHERE " + DBC.SS_GK_NAME + "=" + "'" + DBUtil.MakeStringSafe( strGKName ) + "'";
+			StringBuilder strSQL = new StringBuilder();
+			strSQL.Append( "DELETE FROM " );
+			strSQL.Append( DBC.SERVICE_SPACES_TABLE );
+			strSQL.Append( " WHERE " + DBC.SS_GK_NAME + "=" + "'" + DBUtil.MakeStringSafe( strGKName ) + "'" );

-			bRetVal = ExecuteCommandText( strSQL );
+			bRetVal = ExecuteCommandText( strSQL.ToString() );

 			return bRetVal;
 		}
@@ -191,12 +164,13 @@ namespace PSL.DISCUS.DataAccess
 			if( strGKAccessPoint.Length == 0 )
 				return false;

-			string strSQL = "UPDATE ";
-			strSQL += DBC.SERVICE_SPACES_TABLE;
-			strSQL += " SET " + DBC.SS_GK_ACCESSPOINT + "=" + "'" + DBUtil.MakeStringSafe( strGKAccessPoint ) + "'";
-			strSQL += " WHERE " + DBC.SS_GK_NAME + "=" + "'" + DBUtil.MakeStringSafe( strGKName ) + "'";
+			StringBuilder strSQL = new StringBuilder();
+			strSQL.Append( "UPDATE " );
+			strSQL.Append( DBC.SERVICE_SPACES_TABLE );
+			strSQL.Append( " SET " + DBC.SS_GK_ACCESSPOINT + "=" + "'" + DBUtil.MakeStringSafe( strGKAccessPoint ) + "'" );
+			strSQL.Append( " WHERE " + DBC.SS_GK_NAME + "=" + "'" + DBUtil.MakeStringSafe( strGKName ) + "'" );

-			bRetVal = ExecuteCommandText( strSQL );
+			bRetVal = ExecuteCommandText( strSQL.ToString() );

 			return bRetVal;
 		}
@@ -215,12 +189,13 @@ namespace PSL.DISCUS.DataAccess
 			if( strGKLocation.Length == 0 )
 				return false;

-			string strSQL = "UPDATE ";
-			strSQL += DBC.SERVICE_SPACES_TABLE;
-			strSQL += " SET " + DBC.SS_GK_LOCATION + "=" + "'" + DBUtil.MakeStringSafe( strGKLocation ) + "'";
-			strSQL += " WHERE " + DBC.SS_GK_NAME + "=" + "'" + DBUtil.MakeStringSafe( strGKName ) + "'";
+			StringBuilder strSQL = new StringBuilder();
+			strSQL.Append( "UPDATE " );
+			strSQL.Append( DBC.SERVICE_SPACES_TABLE );
+			strSQL.Append( " SET " + DBC.SS_GK_LOCATION + "=" + "'" + DBUtil.MakeStringSafe( strGKLocation ) + "'" );
+			strSQL.Append( " WHERE " + DBC.SS_GK_NAME + "=" + "'" + DBUtil.MakeStringSafe( strGKName ) + "'" );

-			bRetVal = ExecuteCommandText( strSQL );
+			bRetVal = ExecuteCommandText( strSQL.ToString() );

 			return bRetVal;
 		}
@@ -232,12 +207,13 @@ namespace PSL.DISCUS.DataAccess
 			if( strGKNamespace.Length == 0 )
 				return false;

-			string strSQL = "UPDATE ";
-			strSQL += DBC.SERVICE_SPACES_TABLE;
-			strSQL += " SET " + DBC.SS_GK_NAMESPACE + "=" + "'" + DBUtil.MakeStringSafe( strGKNamespace ) + "'";
-			strSQL += " WHERE " + DBC.SS_GK_NAME + "=" + "'" + DBUtil.MakeStringSafe( strGKName ) + "'";
+			StringBuilder strSQL = new StringBuilder();
+			strSQL.Append( "UPDATE " );
+			strSQL.Append( DBC.SERVICE_SPACES_TABLE );
+			strSQL.Append( " SET " + DBC.SS_GK_NAMESPACE + "=" + "'" + DBUtil.MakeStringSafe( strGKNamespace ) + "'" );
+			strSQL.Append( " WHERE " + DBC.SS_GK_NAME + "=" + "'" + DBUtil.MakeStringSafe( strGKName ) + "'" );

-			bRetVal = ExecuteCommandText( strSQL );
+			bRetVal = ExecuteCommandText( strSQL.ToString() );

 			return bRetVal;
 		}
@@ -249,11 +225,12 @@ namespace PSL.DISCUS.DataAccess

 			try
 			{
-				string strSQL = "SELECT " + DBC.SS_GK_ACCESSPOINT;
-				strSQL += " FROM " + DBC.SERVICE_SPACES_TABLE;
-				strSQL += " WHERE " + DBC.SS_GK_NAME + "=" + "'" + DBUtil.MakeStringSafe( strGKName ) + "'";
+				StringBuilder strSQL = new StringBuilder();
+				strSQL.Append( "SELECT " + DBC.SS_GK_ACCESSPOINT );
+				strSQL.Append( " FROM " + DBC.SERVICE_SPACES_TABLE );
+				strSQL.Append( " WHERE " + DBC.SS_GK_NAME + "=" + "'" + DBUtil.MakeStringSafe( strGKName ) + "'" );

-				dr = ExecuteReader( strSQL );
+				dr = ExecuteReader( strSQL.ToString() );
 				if( dr != null )
 				{
 					dr.Read(); // move reader past BOF to first record
@@ -266,7 +243,7 @@ namespace PSL.DISCUS.DataAccess
 			catch( System.Exception e )
 			{
 				// Report error
-				m_EvtLog.WriteEntry( e.Message, EventLogEntryType.Error );
+				EventLog.WriteEntry( SOURCENAME, e.Message, EventLogEntryType.Error );
 			}
 			finally // cleanup after exception handled
 			{
@@ -291,11 +268,12 @@ namespace PSL.DISCUS.DataAccess

 			try
 			{
-				string strSQL = "SELECT " + DBC.SS_GK_LOCATION;
-				strSQL += " FROM " + DBC.SERVICE_SPACES_TABLE;
-				strSQL += " WHERE " + DBC.SS_GK_NAME + "=" + "'" + DBUtil.MakeStringSafe( strGKName ) + "'";
+				StringBuilder strSQL = new StringBuilder();
+				strSQL.Append( "SELECT " + DBC.SS_GK_LOCATION );
+				strSQL.Append( " FROM " + DBC.SERVICE_SPACES_TABLE );
+				strSQL.Append( " WHERE " + DBC.SS_GK_NAME + "=" + "'" + DBUtil.MakeStringSafe( strGKName ) + "'" );

-				dr = ExecuteReader( strSQL );
+				dr = ExecuteReader( strSQL.ToString() );
 				if( dr != null )
 				{
 					dr.Read(); // move reader past BOF to first record
@@ -308,7 +286,7 @@ namespace PSL.DISCUS.DataAccess
 			catch( System.Exception e )
 			{
 				// Report error
-				m_EvtLog.WriteEntry( e.Message, EventLogEntryType.Error );
+				EventLog.WriteEntry( SOURCENAME, e.Message, EventLogEntryType.Error );
 			}
 			finally // cleanup after exception handled
 			{
@@ -329,11 +307,12 @@ namespace PSL.DISCUS.DataAccess

 			try
 			{
-				string strSQL = "SELECT " + DBC.SS_GK_NAMESPACE;
-				strSQL += " FROM " + DBC.SERVICE_SPACES_TABLE;
-				strSQL += " WHERE " + DBC.SS_GK_NAME + "=" + "'" + DBUtil.MakeStringSafe( strGKName ) + "'";
+				StringBuilder strSQL = new StringBuilder();
+				strSQL.Append( "SELECT " + DBC.SS_GK_NAMESPACE );
+				strSQL.Append( " FROM " + DBC.SERVICE_SPACES_TABLE );
+				strSQL.Append( " WHERE " + DBC.SS_GK_NAME + "=" + "'" + DBUtil.MakeStringSafe( strGKName ) + "'" );

-				dr = ExecuteReader( strSQL );
+				dr = ExecuteReader( strSQL.ToString() );
 				if( dr != null )
 				{
 					dr.Read(); // move reader past BOF to first record
@@ -346,7 +325,7 @@ namespace PSL.DISCUS.DataAccess
 			catch( System.Exception e )
 			{
 				// Report error
-				m_EvtLog.WriteEntry( e.Message, EventLogEntryType.Error );
+				EventLog.WriteEntry( SOURCENAME, e.Message, EventLogEntryType.Error );
 			}
 			finally // cleanup after exception handled
 			{
diff --git a/csharpsrc/DISCUS/TracerImpl.cs b/csharpsrc/DISCUS/TracerImpl.cs
index 8b5e3ae..2f63396 100644
--- a/csharpsrc/DISCUS/TracerImpl.cs
+++ b/csharpsrc/DISCUS/TracerImpl.cs
@@ -8,23 +8,16 @@ namespace PSL.DISCUS.Logging
 	/// </summary>
 	public abstract class TracerImpl:ITracer
 	{
-		protected string m_strSource = "";
-		public virtual string Source
-		{
-			get{ return m_strSource; }
-			set{ m_strSource = value; }
-		}
-
 		public TracerImpl()
 		{}

-		public virtual void TraceError( string strMsg )
+		public virtual void TraceError( string strSource, string strMsg )
 		{}

-		public virtual void TraceInfo( string strMsg )
+		public virtual void TraceInfo( string strSource, string strMsg )
 		{}

-		public virtual void TraceWarning( string strMsg )
+		public virtual void TraceWarning( string strSource, string strMsg )
 		{}
 	}
 }
diff --git a/csharpsrc/DISCUS/UrlLoggerImpl.cs b/csharpsrc/DISCUS/UrlLoggerImpl.cs
index f5b5f71..1050dc7 100644
--- a/csharpsrc/DISCUS/UrlLoggerImpl.cs
+++ b/csharpsrc/DISCUS/UrlLoggerImpl.cs
@@ -10,9 +10,7 @@ namespace PSL.DISCUS.Logging
 	/// </summary>
 	public class UrlLoggerImpl:LoggerImpl
 	{
-		// In the event that something goes wrong sending data over the network
-		// record error in local event log
-		private EventLog m_EvtLogger;
+		private const string SOURCENAME = "PSL.DISCUS.Impl.Logging.UrlLoggerImpl";
 		private string m_strHostname = "";
 		public string Hostname
 		{
@@ -40,34 +38,17 @@ namespace PSL.DISCUS.Logging
 					throw new Exception( "Invalid Logging Port" );
 			}
 		}
-
-		public override string Source
-		{
-			get
-			{ return m_strSource; }
-
-			set
-			{
-				m_strSource = value;
-
-				if( m_strSource.Length == 0 )
-					throw new Exception( "Invalid Logging Source" );
-			}
-		}

 		public UrlLoggerImpl( LogTraceContext logCtx )
 		{
-			m_EvtLogger = new EventLog( "Application" );
-			m_EvtLogger.Source = "PSL.DISCUS.Impl.Logging.UrlLoggerImpl";
+			if( logCtx.Hostname.Length == 0 || logCtx.Port <= 0 )
+				throw new Exception( "Invalid Logging Hostname and/or Port" );

 			m_strHostname = logCtx.Hostname;
 			m_nPort = logCtx.Port;
-
-			if( m_strHostname.Length == 0 || m_nPort <= 0 )
-				throw new Exception( "Invalid Logging Hostname and/or Port" );
 		}

-		public override void LogError( string strMsg )
+		public override void LogError( string strSource, string strMsg )
 		{
 			string strXmlMsg = "";
 			try
@@ -79,7 +60,7 @@ namespace PSL.DISCUS.Logging
 				// strXmlMsg += "<Message><![CDATA[" + strMsg + "]]></Message>\n"; // Set message

 				// TODO: Remove later...For Demo only
-				strXmlMsg += "LOG_" + m_strSource + " " + strMsg;
+				strXmlMsg += "LOG_" + strSource + " " + strMsg;

 				// Send message (using TCP)
 				TcpClient clientSocket = new TcpClient( m_strHostname, m_nPort );
@@ -91,11 +72,11 @@ namespace PSL.DISCUS.Logging
 			}
 			catch( Exception e )
 			{
-				m_EvtLogger.WriteEntry( "Error: " + e.Message + " occurred while sending data: " + strXmlMsg, EventLogEntryType.Error );
+				EventLog.WriteEntry( strSource, "Error: " + e.Message + " occurred while sending data: " + strXmlMsg, EventLogEntryType.Error );
 			}
 		}

-		public override void LogInfo( string strMsg )
+		public override void LogInfo( string strSource, string strMsg )
 		{
 			string strXmlMsg = "";
 			try
@@ -107,7 +88,7 @@ namespace PSL.DISCUS.Logging
 				// strXmlMsg += "<Message><![CDATA[" + strMsg + "]]></Message>\n"; // Set message

 				// TODO: Remove later...For Demo only
-				strXmlMsg += "LOG_" + m_strSource + " " + strMsg;
+				strXmlMsg += "LOG_" + strSource + " " + strMsg;

 				// Send message (using TCP)
 				TcpClient clientSocket = new TcpClient( m_strHostname, m_nPort );
@@ -119,11 +100,11 @@ namespace PSL.DISCUS.Logging
 			}
 			catch( Exception e )
 			{
-				m_EvtLogger.WriteEntry( e.Message, EventLogEntryType.Error );
+				EventLog.WriteEntry( strSource, e.Message, EventLogEntryType.Error );
 			}
 		}

-		public override void LogWarning( string strMsg )
+		public override void LogWarning( string strSource, string strMsg )
 		{
 			string strXmlMsg = "";
 			try
@@ -135,7 +116,7 @@ namespace PSL.DISCUS.Logging
 				// strXmlMsg += "<Message><![CDATA[" + strMsg + "]]></Message>\n"; // Set message

 				// TODO: Remove later...For Demo only
-				strXmlMsg += "LOG_" + m_strSource + " " + strMsg;
+				strXmlMsg += "LOG_" + strSource + " " + strMsg;

 				// Send message (using TCP)
 				TcpClient clientSocket = new TcpClient( m_strHostname, m_nPort );
@@ -147,7 +128,7 @@ namespace PSL.DISCUS.Logging
 			}
 			catch( Exception e )
 			{
-				m_EvtLogger.WriteEntry( e.Message, EventLogEntryType.Error );
+				EventLog.WriteEntry( strSource, e.Message, EventLogEntryType.Error );
 			}
 		}
 	}
diff --git a/csharpsrc/DISCUS/UrlTracerImpl.cs b/csharpsrc/DISCUS/UrlTracerImpl.cs
index cbf80c2..7a782cd 100644
--- a/csharpsrc/DISCUS/UrlTracerImpl.cs
+++ b/csharpsrc/DISCUS/UrlTracerImpl.cs
@@ -10,9 +10,6 @@ namespace PSL.DISCUS.Logging
 	/// </summary>
 	public class UrlTracerImpl:TracerImpl
 	{
-		// In the event that something goes wrong sending data over the network
-		// record error in local event log
-		private EventLog m_EvtLogger;
 		private string m_strHostname = "";
 		public string Hostname
 		{
@@ -41,33 +38,16 @@ namespace PSL.DISCUS.Logging
 			}
 		}

-		public override string Source
-		{
-			get
-			{ return m_strSource; }
-
-			set
-			{
-				m_strSource = value;
-
-				if( m_strSource.Length == 0 )
-					throw new Exception( "Invalid Tracing Source" );
-			}
-		}
-
 		public UrlTracerImpl( LogTraceContext traceCtx )
 		{
-			m_EvtLogger = new EventLog( "Application" );
-			m_EvtLogger.Source = "PSL.DISCUS.Impl.Logging.UrlTracerImpl";
+			if( traceCtx.Hostname.Length == 0 || traceCtx.Port <= 0 )
+				throw new Exception( "Invalid Tracing Hostname and/or Port" );

 			m_strHostname = traceCtx.Hostname;
 			m_nPort = traceCtx.Port;
-
-			if( m_strHostname.Length == 0 || m_nPort <= 0 )
-				throw new Exception( "Invalid Tracing Hostname and/or Port" );
 		}

-		public override void TraceError( string strMsg )
+		public override void TraceError( string strSource, string strMsg )
 		{
 			string strXmlMsg = "";
 			try
@@ -79,7 +59,7 @@ namespace PSL.DISCUS.Logging
 				// strXmlMsg += "<Message><![CDATA[" + strMsg + "]]></Message>\n"; // Set message

 				// TODO: Remove later...for demo only
-				strXmlMsg += "TRACE_" + m_strSource + " " + strMsg;
+				strXmlMsg += "TRACE_" + strSource + " " + strMsg;

 				// Send message (using TCP)
 				TcpClient clientSocket = new TcpClient( m_strHostname, m_nPort );
@@ -91,11 +71,11 @@ namespace PSL.DISCUS.Logging
 			}
 			catch( Exception e )
 			{
-				m_EvtLogger.WriteEntry( "Error: " + e.Message + " occurred while sending data: " + strXmlMsg, EventLogEntryType.Error );
+				EventLog.WriteEntry( strSource, "Error: " + e.Message + " occurred while sending data: " + strXmlMsg, EventLogEntryType.Error );
 			}
 		}

-		public override void TraceInfo( string strMsg )
+		public override void TraceInfo( string strSource, string strMsg )
 		{
 			string strXmlMsg = "";
 			try
@@ -107,7 +87,7 @@ namespace PSL.DISCUS.Logging
 				// strXmlMsg += "<Message><![CDATA[" + strMsg + "]]></Message>\n"; // Set message

 				// TODO: Remove later...for demo only
-				strXmlMsg += "TRACE_" + m_strSource + " " + strMsg;
+				strXmlMsg += "TRACE_" + strSource + " " + strMsg;

 				// Send message (using TCP)
 				TcpClient clientSocket = new TcpClient( m_strHostname, m_nPort );
@@ -119,11 +99,11 @@ namespace PSL.DISCUS.Logging
 			}
 			catch( Exception e )
 			{
-				m_EvtLogger.WriteEntry( e.Message, EventLogEntryType.Error );
+				EventLog.WriteEntry( strSource, e.Message, EventLogEntryType.Error );
 			}
 		}

-		public override void TraceWarning( string strMsg )
+		public override void TraceWarning( string strSource, string strMsg )
 		{
 			string strXmlMsg = "";
 			try
@@ -135,7 +115,7 @@ namespace PSL.DISCUS.Logging
 				// strXmlMsg += "<Message><![CDATA[" + strMsg + "]]></Message>\n"; // Set message

 				// TODO: Remove later...for demo only
-				strXmlMsg += "TRACE_" + m_strSource + " " + strMsg;
+				strXmlMsg += "TRACE_" + strSource + " " + strMsg;

 				// Send message (using TCP)
 				TcpClient clientSocket = new TcpClient( m_strHostname, m_nPort );
@@ -147,7 +127,7 @@ namespace PSL.DISCUS.Logging
 			}
 			catch( Exception e )
 			{
-				m_EvtLogger.WriteEntry( e.Message, EventLogEntryType.Error );
+				EventLog.WriteEntry( strSource, e.Message, EventLogEntryType.Error );
 			}
 		}
 	}