<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>IServiceOriented.ServiceBus.Samples.Chat/ChatServiceTransformer.cs</filename>
    </added>
    <added>
      <filename>IServiceOriented.ServiceBus.Samples.Chat/IChatService2.cs</filename>
    </added>
    <added>
      <filename>IServiceOriented.ServiceBus/PublishRequest.cs</filename>
    </added>
    <added>
      <filename>IServiceOriented.ServiceBus/TransformationDispatcher.cs</filename>
    </added>
    <added>
      <filename>IServiceOriented.ServiceBus/iServiceOriented.snk</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -15,12 +15,17 @@
     &lt;/behaviors&gt;
     &lt;client&gt;
       &lt;endpoint name=&quot;ChatClient&quot; contract=&quot;IServiceOriented.ServiceBus.Samples.Chat.IChatService&quot; binding=&quot;netNamedPipeBinding&quot; bindingConfiguration=&quot;namedPipe&quot; address=&quot;net.pipe://localhost/chatServer&quot; /&gt;
+      &lt;endpoint name=&quot;ChatClient2&quot; contract=&quot;IServiceOriented.ServiceBus.Samples.Chat.IChatService2&quot; binding=&quot;netNamedPipeBinding&quot; bindingConfiguration=&quot;namedPipe&quot; address=&quot;net.pipe://localhost/chatServer2&quot; /&gt;
       &lt;endpoint contract=&quot;IServiceOriented.ServiceBus.IServiceBusManagementService&quot; binding=&quot;netNamedPipeBinding&quot; bindingConfiguration=&quot;namedPipe&quot; address=&quot;net.pipe://localhost/serviceBusManagement&quot; /&gt;
     &lt;/client&gt;
     &lt;services&gt;
       &lt;service name=&quot;ChatServer&quot; behaviorConfiguration=&quot;debug&quot; &gt;
         &lt;endpoint name=&quot;NamedPipeListener&quot; contract=&quot;IServiceOriented.ServiceBus.Samples.Chat.IChatService&quot; binding=&quot;netNamedPipeBinding&quot; bindingConfiguration=&quot;namedPipe&quot; address=&quot;send&quot; /&gt;
       &lt;/service&gt;
+      &lt;service name=&quot;ChatServer2&quot; behaviorConfiguration=&quot;debug&quot; &gt;
+        &lt;endpoint name=&quot;NamedPipeListener&quot; contract=&quot;IServiceOriented.ServiceBus.Samples.Chat.IChatService2&quot; binding=&quot;netNamedPipeBinding&quot; bindingConfiguration=&quot;namedPipe&quot; address=&quot;send&quot; /&gt;
+      &lt;/service&gt;
+
       &lt;service name=&quot;IServiceOriented.ServiceBus.Samples.Chat.ChatService&quot; behaviorConfiguration=&quot;debug&quot; &gt;
         &lt;endpoint name=&quot;NamedPipe&quot; contract=&quot;IServiceOriented.ServiceBus.Samples.Chat.IChatService&quot; binding=&quot;netNamedPipeBinding&quot; bindingConfiguration=&quot;namedPipe&quot; address=&quot;net.pipe://localhost/chatServer&quot; /&gt;
       &lt;/service&gt;</diff>
      <filename>IServiceOriented.ServiceBus.Samples.Chat/App.config</filename>
    </modified>
    <modified>
      <diff>@@ -9,33 +9,61 @@ namespace IServiceOriented.ServiceBus.Samples.Chat
 {
     public class ChatClient
     {
-        public ChatClient(string name)
+        public ChatClient(string name, bool version2)
         {
             _from = name;
-            _handler = new IncomingHandler();
-            _host = new ServiceHost(_handler, new Uri(&quot;net.pipe://localhost/chat/&quot;+_from));
+
+            if (version2)
+            {
+                _host = new ServiceHost(new IncomingHandler2(), new Uri(&quot;net.pipe://localhost/chat/&quot; + _from));
+            }
+            else
+            {
+                _host = new ServiceHost(new IncomingHandler(), new Uri(&quot;net.pipe://localhost/chat/&quot; + _from));
+            }
+
+            _version2 = version2;
         }
 
+        bool _version2;
+
         public void Start()
         {
             _host.Open();
 
             Service.Use&lt;IServiceBusManagementService&gt;(serviceBus =&gt;
                 {
-                    serviceBus.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), _from, &quot;ChatClient&quot;, &quot;net.pipe://localhost/chat/&quot;+_from+&quot;/send&quot;, typeof(IChatService), typeof(WcfDispatcher&lt;IChatService&gt;), new ChatFilter(_from)));
+
+                    if (_version2)
+                    {
+                        serviceBus.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), _from, &quot;ChatClient2&quot;, &quot;net.pipe://localhost/chat/&quot; + _from + &quot;/send&quot;, typeof(IChatService2), new WcfDispatcher&lt;IChatService2&gt;(), new ChatFilter2(_from)));                        
+                    }
+                    else
+                    {
+                        serviceBus.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), _from, &quot;ChatClient&quot;, &quot;net.pipe://localhost/chat/&quot; + _from + &quot;/send&quot;, typeof(IChatService), new WcfDispatcher&lt;IChatService&gt;(), new ChatFilter(_from)));
+                    }
                 });
         }
 
-        string _from;
-
-        IncomingHandler _handler;        
+        string _from;   
 
+        
         public void Send(string to, string message)
         {
-            Service.Use&lt;IChatService&gt;(&quot;ChatClient&quot;, chatService =&gt;
+            if (_version2)
+            {
+                Service.Use&lt;IChatService2&gt;(&quot;ChatClient2&quot;, chatService =&gt;
+                {
+                    chatService.SendMessage(new SendMessageRequest2(&quot;Title&quot;, _from, to, message));
+                });
+            }
+            else
             {
-                chatService.SendMessage(new SendMessageRequest(_from, to, message));
-            });
+                Service.Use&lt;IChatService&gt;(&quot;ChatClient&quot;, chatService =&gt;
+                {
+                    chatService.SendMessage(new SendMessageRequest(_from, to, message));
+                });
+            }
         }
 
         ServiceHost _host;
@@ -55,6 +83,18 @@ namespace IServiceOriented.ServiceBus.Samples.Chat
                 Console.WriteLine(request.From + &quot;: &quot; + request.Message);
             }
             #endregion
+        }
+
+        [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConfigurationName = &quot;ChatServer2&quot;)]
+        public class IncomingHandler2 : IChatService2
+        {
+            #region IChatService Members
+            [OperationBehavior]
+            public void SendMessage(SendMessageRequest2 request)
+            {
+                Console.WriteLine(request.From + &quot;: &quot; + request.Title + &quot;\r\n&quot;+request.Message);
+            }
+            #endregion
         }       
 
     }
@@ -73,23 +113,40 @@ namespace IServiceOriented.ServiceBus.Samples.Chat
         }
         [DataMember]
         public string To;
+        
+        public override bool Include(string action, object message)
+        {
+            SendMessageRequest request = message as SendMessageRequest;
+            if (request != null)
+            {
+                return String.Compare(request.To, To, true) == 0;
+            }
+            return false;
+        }
+    }
 
-        protected override string CreateInitString()
+
+
+    [DataContract]
+    public class ChatFilter2 : MessageFilter
+    {
+        public ChatFilter2()
         {
-            return To;
         }
 
-        protected override void InitFromString(string data)
+        public ChatFilter2(string to)
         {
-            To = data;
+            To = to;
         }
+        [DataMember]
+        public string To;
 
         public override bool Include(string action, object message)
-        {
-            SendMessageRequest request = message as SendMessageRequest;
-            if (request != null)
+        {            
+            SendMessageRequest2 request2 = message as SendMessageRequest2;
+            if (request2 != null)
             {
-                return String.Compare(request.To, To, true) == 0;
+                return String.Compare(request2.To, To, true) == 0;
             }
             return false;
         }</diff>
      <filename>IServiceOriented.ServiceBus.Samples.Chat/ChatClient.cs</filename>
    </modified>
    <modified>
      <diff>@@ -10,17 +10,16 @@ namespace IServiceOriented.ServiceBus.Samples.Chat
         public ChatServer()
         {            
             _serviceBus = new ServiceBusRuntime(new MsmqMessageDeliveryQueue(&quot;.\\private$\\chat_deliver&quot;, true), new MsmqMessageDeliveryQueue(&quot;.\\private$\\chat_retry&quot;, true), new MsmqMessageDeliveryQueue(&quot;.\\private$\\chat_fail&quot;, true));
-            _serviceBus.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;Chat Service&quot;, &quot;ChatServer&quot;, &quot;net.pipe://localhost/chatServer&quot;, typeof(IChatService), typeof(WcfListener&lt;IChatService&gt;)));
+            _serviceBus.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;Chat Service&quot;, &quot;ChatServer&quot;, &quot;net.pipe://localhost/chatServer&quot;, typeof(IChatService),  new WcfListener&lt;IChatService&gt;()));
+            _serviceBus.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;Chat Service2&quot;, &quot;ChatServer2&quot;, &quot;net.pipe://localhost/chatServer2&quot;, typeof(IChatService2), new WcfListener&lt;IChatService2&gt;()));
+            _serviceBus.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;Chat Service Transformer&quot;, null, null, typeof(IChatService), new ChatServiceTransformer(), new TypedMessageFilter(typeof(SendMessageRequest))));
+            _serviceBus.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;No subscribers&quot;, &quot;ChatClient&quot;, &quot;&quot;, typeof(IChatService), new MethodDispatcher&lt;IChatService&gt;(new UnhandledReplyHandler(_serviceBus)), new UnhandledMessageFilter(typeof(SendMessageRequest))));
             _serviceBus.RegisterService(new WcfManagementService());
             _serviceBus.UnhandledException+= (o, ex) =&gt;
                 {
                     Console.WriteLine(&quot;Unhandled Exception: &quot;+ex.ExceptionObject);
                 };
-            
-            IChatService noListenerReply = new UnhandledReplyHandler(_serviceBus);
-            MethodDispatcherConfiguration.For(_serviceBus).RegisterTarget(typeof(IChatService), noListenerReply);
-
-            _serviceBus.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;No subscribers&quot;, &quot;ChatClient&quot;, &quot;&quot;, typeof(IChatService), typeof(MethodDispatcher&lt;IChatService&gt;), new UnhandledMessageFilter(typeof(SendMessageRequest))));
+                        
         }
 
         class UnhandledReplyHandler : IChatService
@@ -33,7 +32,7 @@ namespace IServiceOriented.ServiceBus.Samples.Chat
             ServiceBusRuntime _serviceBus;
             public void SendMessage(SendMessageRequest request)
             {
-                _serviceBus.Publish(typeof(IChatService), &quot;SendMessage&quot;, new SendMessageRequest(&quot;System&quot;, request.From, request.To + &quot; is an invalid user&quot;));
+                _serviceBus.Publish(new PublishRequest(typeof(IChatService), &quot;SendMessage&quot;, new SendMessageRequest(&quot;System&quot;, request.From, request.To + &quot; is an invalid user&quot;)));
             }
         }
         </diff>
      <filename>IServiceOriented.ServiceBus.Samples.Chat/ChatServer.cs</filename>
    </modified>
    <modified>
      <diff>@@ -54,7 +54,9 @@
   &lt;ItemGroup&gt;
     &lt;Compile Include=&quot;ChatClient.cs&quot; /&gt;
     &lt;Compile Include=&quot;ChatServer.cs&quot; /&gt;
+    &lt;Compile Include=&quot;ChatServiceTransformer.cs&quot; /&gt;
     &lt;Compile Include=&quot;IChatService.cs&quot; /&gt;
+    &lt;Compile Include=&quot;IChatService2.cs&quot; /&gt;
     &lt;Compile Include=&quot;Program.cs&quot; /&gt;
     &lt;Compile Include=&quot;Properties\AssemblyInfo.cs&quot; /&gt;
   &lt;/ItemGroup&gt;</diff>
      <filename>IServiceOriented.ServiceBus.Samples.Chat/IServiceOriented.ServiceBus.Samples.Chat.csproj</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,9 @@ namespace IServiceOriented.ServiceBus.Samples.Chat
         static void Main(string[] args)
         {
             MessageDelivery.RegisterKnownType(typeof(ChatFilter));
+            MessageDelivery.RegisterKnownType(typeof(ChatFilter2));
             MessageDelivery.RegisterKnownType(typeof(SendMessageRequest));
+            MessageDelivery.RegisterKnownType(typeof(SendMessageRequest2));
             
             if(args.Length == 0)
             {
@@ -28,13 +30,13 @@ namespace IServiceOriented.ServiceBus.Samples.Chat
 
                 server.Stop();
             }
-            else if(args[0] == &quot;client&quot;)
+            else if (args[0] == &quot;client&quot; || args[0] == &quot;client2&quot;)
             {
                 Console.WriteLine(&quot;Starting client...&quot;);
 
                 Console.Write(&quot;Enter name: &quot;);
 
-                ChatClient client = new ChatClient(Console.ReadLine());
+                ChatClient client = new ChatClient(Console.ReadLine(), args[0] == &quot;client2&quot;);
                 client.Start();
 
                 while (true)</diff>
      <filename>IServiceOriented.ServiceBus.Samples.Chat/Program.cs</filename>
    </modified>
    <modified>
      <diff>@@ -19,15 +19,6 @@ namespace IServiceOriented.ServiceBus.UnitTests
         {
             return _messageFilter;
         }
-
-        protected override void InitFromString(string data)
-        {
-            _messageFilter = Convert.ToBoolean(data);
-        }
-
-        protected override string CreateInitString()
-        {
-            return _messageFilter.ToString();
-        }
+        
     }
 }</diff>
      <filename>IServiceOriented.ServiceBus.UnitTests/BooleanMessageFilter.cs</filename>
    </modified>
    <modified>
      <diff>@@ -130,7 +130,7 @@ namespace IServiceOriented.ServiceBus.UnitTests
         {
             MsmqMessageDeliveryQueue queue = new MsmqMessageDeliveryQueue(_testQueuePath);
 
-            SubscriptionEndpoint endpoint = new SubscriptionEndpoint(Guid.NewGuid(), &quot;SubscriptionName&quot;, &quot;http://localhost/test&quot;, &quot;SubscriptionConfigName&quot;, typeof(IContract), typeof(WcfDispatcher&lt;IContract&gt;), new PassThroughMessageFilter());
+            SubscriptionEndpoint endpoint = new SubscriptionEndpoint(Guid.NewGuid(), &quot;SubscriptionName&quot;, &quot;http://localhost/test&quot;, &quot;SubscriptionConfigName&quot;, typeof(IContract), new WcfDispatcher&lt;IContract&gt;(), new PassThroughMessageFilter());
 
             MessageDelivery enqueued = new MessageDelivery(endpoint.Id, &quot;randomAction&quot;,&quot;randomMessageData&quot;, 3);
             Assert.IsNull(queue.Peek(TimeSpan.FromSeconds(1)), &quot;Queue must be empty to start transaction test&quot;);
@@ -194,7 +194,7 @@ namespace IServiceOriented.ServiceBus.UnitTests
         {
             MsmqMessageDeliveryQueue queue = new MsmqMessageDeliveryQueue(_testQueuePath);
 
-            SubscriptionEndpoint endpoint = new SubscriptionEndpoint(Guid.NewGuid(), &quot;SubscriptionName&quot;, &quot;http://localhost/test&quot;, &quot;SubscriptionConfigName&quot;, typeof(IContract), typeof(WcfDispatcher&lt;IContract&gt;), new PassThroughMessageFilter());
+            SubscriptionEndpoint endpoint = new SubscriptionEndpoint(Guid.NewGuid(), &quot;SubscriptionName&quot;, &quot;http://localhost/test&quot;, &quot;SubscriptionConfigName&quot;, typeof(IContract), new WcfDispatcher&lt;IContract&gt;(), new PassThroughMessageFilter());
 
             MessageDelivery enqueued = new MessageDelivery(endpoint.Id, messageAction, messageData, 3);
                 </diff>
      <filename>IServiceOriented.ServiceBus.UnitTests/MsmqMessageDeliveryQueueTest.cs</filename>
    </modified>
    <modified>
      <diff>@@ -14,18 +14,6 @@ namespace IServiceOriented.ServiceBus.UnitTests
             return true;
         }
 
-        protected override void InitFromString(string data)
-        {
-            if (data != &quot;passthrough&quot;)
-            {
-                throw new Exception(&quot;Data was invalid&quot;);
-            }
-        }
-
-        protected override string CreateInitString()
-        {
-            return &quot;passthrough&quot;;
-        }
     }
 
 }</diff>
      <filename>IServiceOriented.ServiceBus.UnitTests/PassThroughMessageFilter.cs</filename>
    </modified>
    <modified>
      <diff>@@ -64,7 +64,7 @@ namespace IServiceOriented.ServiceBus.UnitTests
 
         void putMessageAndGet(object message)
         {
-            SubscriptionEndpoint subscription = new SubscriptionEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;configurationName&quot;, &quot;address&quot;, typeof(IServiceBusManagementService), typeof(WcfDispatcher&lt;IServiceBusManagementService&gt;), null);
+            SubscriptionEndpoint subscription = new SubscriptionEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;configurationName&quot;, &quot;address&quot;, typeof(IServiceBusManagementService), new WcfDispatcher&lt;IServiceBusManagementService&gt;(), null);
             MessageDelivery failure = new MessageDelivery(subscription.Id, &quot;action&quot;, message, 3);
             
             NonTransactionalMemoryQueue failureQueue = new NonTransactionalMemoryQueue();</diff>
      <filename>IServiceOriented.ServiceBus.UnitTests/ServiceBusManagementTest.cs</filename>
    </modified>
    <modified>
      <diff>@@ -111,14 +111,13 @@ namespace IServiceOriented.ServiceBus.UnitTests
             serviceBusRuntime.MaxRetries = 1;
 
 
-            serviceBusRuntime.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;NamedPipeListener&quot;, &quot;net.pipe://localhost/servicebus/test&quot;, typeof(IContract), typeof(WcfListener&lt;IContract&gt;)));
+            serviceBusRuntime.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;NamedPipeListener&quot;, &quot;net.pipe://localhost/servicebus/test&quot;, typeof(IContract), new WcfListener&lt;IContract&gt;()));
             string message = &quot;Publish this message&quot;;
-            serviceBusRuntime.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;&quot;, &quot;&quot;, typeof(IContract), typeof(MethodDispatcher&lt;IContract&gt;), new BooleanMessageFilter(false)));
-
             ContractImplementation ci = new ContractImplementation();
             ci.SetFailCount(1);
 
-            MethodDispatcherConfiguration.For(serviceBusRuntime).RegisterTarget(typeof(IContract), ci);
+            serviceBusRuntime.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;&quot;, &quot;&quot;, typeof(IContract), new MethodDispatcher&lt;IContract&gt;(ci), new BooleanMessageFilter(false)));
+
 
             AutoResetEvent wait = new AutoResetEvent(false);
             serviceBusRuntime.MessageDelivered += (o, mdea) =&gt; { wait.Set(); };
@@ -126,7 +125,7 @@ namespace IServiceOriented.ServiceBus.UnitTests
 
             serviceBusRuntime.Start();
 
-            serviceBusRuntime.Publish(typeof(IContract), &quot;PublishThis&quot;, message);
+            serviceBusRuntime.Publish(new PublishRequest(typeof(IContract), &quot;PublishThis&quot;, message));
 
             try
             {
@@ -161,14 +160,12 @@ namespace IServiceOriented.ServiceBus.UnitTests
             serviceBusRuntime.RetryDelay = 1000;
             serviceBusRuntime.MaxRetries = 1;
 
-            serviceBusRuntime.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;NamedPipeListener&quot;, &quot;net.pipe://localhost/servicebus/test&quot;, typeof(IContract), typeof(WcfListener&lt;IContract&gt;)));
+            serviceBusRuntime.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;NamedPipeListener&quot;, &quot;net.pipe://localhost/servicebus/test&quot;, typeof(IContract), new WcfListener&lt;IContract&gt;()));
             string message = &quot;Publish this message&quot;;
-            serviceBusRuntime.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;&quot;, &quot;&quot;, typeof(IContract), typeof(MethodDispatcher&lt;IContract&gt;), new BooleanMessageFilter(true)));
-
             ContractImplementation ci = new ContractImplementation();
             ci.SetFailCount(0);
 
-            MethodDispatcherConfiguration.For(serviceBusRuntime).RegisterTarget(typeof(IContract), ci);
+            serviceBusRuntime.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;&quot;, &quot;&quot;, typeof(IContract), new MethodDispatcher&lt;IContract&gt;(ci), new BooleanMessageFilter(true)));
 
             AutoResetEvent wait = new AutoResetEvent(false);
             serviceBusRuntime.MessageDelivered += (o, mdea) =&gt; { wait.Set(); };
@@ -176,7 +173,7 @@ namespace IServiceOriented.ServiceBus.UnitTests
 
             serviceBusRuntime.Start();
 
-            serviceBusRuntime.Publish(typeof(IContract), &quot;PublishThis&quot;, message);
+            serviceBusRuntime.Publish(new PublishRequest(typeof(IContract), &quot;PublishThis&quot;, message));
 
             // Wait for delivery
             wait.WaitOne(TimeSpan.FromMinutes(1), false); // give it a minute
@@ -202,14 +199,12 @@ namespace IServiceOriented.ServiceBus.UnitTests
 
             ServiceBusRuntime serviceBusRuntime = new ServiceBusRuntime(testQueue, retryQueue, failQueue);
 
-            serviceBusRuntime.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;NamedPipeListener&quot;, &quot;net.pipe://localhost/servicebus/test&quot;, typeof(IContract), typeof(WcfListener&lt;IContract&gt;)));
+            serviceBusRuntime.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;NamedPipeListener&quot;, &quot;net.pipe://localhost/servicebus/test&quot;, typeof(IContract), new WcfListener&lt;IContract&gt;()));
             string message = &quot;Publish this message&quot;;
-            serviceBusRuntime.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;&quot;, &quot;&quot;, typeof(IContract), typeof(MethodDispatcher&lt;IContract&gt;), new PassThroughMessageFilter()));
 
             ContractImplementation ci = new ContractImplementation();
             ci.SetFailCount(0);
-
-            MethodDispatcherConfiguration.For(serviceBusRuntime).RegisterTarget(typeof(IContract), ci);
+            serviceBusRuntime.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;&quot;, &quot;&quot;, typeof(IContract), new MethodDispatcher&lt;IContract&gt;(ci), new PassThroughMessageFilter()));
 
             AutoResetEvent wait = new AutoResetEvent(false);
             serviceBusRuntime.MessageDelivered += (o, mdea) =&gt; { wait.Set(); };
@@ -217,7 +212,7 @@ namespace IServiceOriented.ServiceBus.UnitTests
 
             serviceBusRuntime.Start();
 
-            serviceBusRuntime.Publish(typeof(IContract), &quot;PublishThis&quot;, message);
+            serviceBusRuntime.Publish(new PublishRequest(typeof(IContract), &quot;PublishThis&quot;, message));
 
             // Wait for delivery
             wait.WaitOne(TimeSpan.FromMinutes(1), false); // give it a minute
@@ -244,20 +239,19 @@ namespace IServiceOriented.ServiceBus.UnitTests
             ServiceBusRuntime serviceBusRuntime = new ServiceBusRuntime(testQueue, retryQueue, failQueue);
             serviceBusRuntime.RegisterService(new PerformanceMonitorRuntimeService());
 
-            serviceBusRuntime.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;NamedPipeListener&quot;, &quot;net.pipe://localhost/servicebus/test&quot;, typeof(IContract), typeof(WcfListener&lt;IContract&gt;)));
-            serviceBusRuntime.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;&quot;, &quot;&quot;, typeof(IContract), typeof(MethodDispatcher&lt;IContract&gt;), new PassThroughMessageFilter()));
-
             ContractImplementation ci = new ContractImplementation();
             ci.SetFailCount(0);
 
+            serviceBusRuntime.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;NamedPipeListener&quot;, &quot;net.pipe://localhost/servicebus/test&quot;, typeof(IContract), new WcfListener&lt;IContract&gt;()));
+            serviceBusRuntime.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;&quot;, &quot;&quot;, typeof(IContract), new MethodDispatcher&lt;IContract&gt;(ci), new PassThroughMessageFilter()));
+
+
             int messageCount = 10000;
 
             DateTime start = DateTime.Now;
 
             CountdownLatch countDown = new CountdownLatch(messageCount);
-
-            MethodDispatcherConfiguration.For(serviceBusRuntime).RegisterTarget(typeof(IContract), ci);
-
+            
             AutoResetEvent wait = new AutoResetEvent(false);
             serviceBusRuntime.MessageDelivered += (o, mdea) =&gt; { countDown.Tick();  };
             serviceBusRuntime.MessageDeliveryFailed += (o, mdfea) =&gt; { countDown.Tick(); };
@@ -265,7 +259,7 @@ namespace IServiceOriented.ServiceBus.UnitTests
             for (int i = 0; i &lt; messageCount; i++)
             {
                 string message = i.ToString();
-                serviceBusRuntime.Publish(typeof(IContract), &quot;PublishThis&quot;, message);
+                serviceBusRuntime.Publish(new PublishRequest(typeof(IContract), &quot;PublishThis&quot;, message));
             }
 
             serviceBusRuntime.Start();            
@@ -314,21 +308,21 @@ namespace IServiceOriented.ServiceBus.UnitTests
 
             serviceBusRuntime.RegisterService(new PerformanceMonitorRuntimeService());
 
-            serviceBusRuntime.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;NamedPipeListener&quot;, &quot;net.pipe://localhost/servicebus/test&quot;, typeof(IContract), typeof(WcfListener&lt;IContract&gt;)));
-            serviceBusRuntime.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;&quot;, &quot;&quot;, typeof(IContract), typeof(MethodDispatcher&lt;IContract&gt;), new PassThroughMessageFilter()));
-
             ContractImplementation ci = new ContractImplementation();
             ci.SetFailCount(0);
             ci.SetFailInterval(10);
 
+            serviceBusRuntime.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;NamedPipeListener&quot;, &quot;net.pipe://localhost/servicebus/test&quot;, typeof(IContract), new WcfListener&lt;IContract&gt;()));
+            serviceBusRuntime.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;&quot;, &quot;&quot;, typeof(IContract), new MethodDispatcher&lt;IContract&gt;(ci), new PassThroughMessageFilter()));
+
+
             int messageCount = 1000;
 
             DateTime start = DateTime.Now;
 
             CountdownLatch countDown = new CountdownLatch(messageCount);
 
-            MethodDispatcherConfiguration.For(serviceBusRuntime).RegisterTarget(typeof(IContract), ci);
-
+            
             AutoResetEvent wait = new AutoResetEvent(false);
             serviceBusRuntime.MessageDelivered += (o, mdea) =&gt; { countDown.Tick(); };
 
@@ -338,7 +332,7 @@ namespace IServiceOriented.ServiceBus.UnitTests
             for (int i = 0; i &lt; messageCount; i++)
             {
                 string message = i.ToString();
-                serviceBusRuntime.Publish(typeof(IContract), &quot;PublishThis&quot;, message);
+                serviceBusRuntime.Publish(new PublishRequest(typeof(IContract), &quot;PublishThis&quot;, message));
             }
 
             bool[] results = new bool[messageCount];
@@ -383,14 +377,12 @@ namespace IServiceOriented.ServiceBus.UnitTests
             serviceBusRuntime.RetryDelay = 1000;
             serviceBusRuntime.MaxRetries = 1;
 
-            serviceBusRuntime.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;NamedPipeListener&quot;, &quot;net.pipe://localhost/servicebus/test&quot;, typeof(IContract), typeof(WcfListener&lt;IContract&gt;)));
+            serviceBusRuntime.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;NamedPipeListener&quot;, &quot;net.pipe://localhost/servicebus/test&quot;, typeof(IContract), new WcfListener&lt;IContract&gt;()));
             string message = &quot;Publish this message&quot;;
-            serviceBusRuntime.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;&quot;, &quot;&quot;, typeof(IContract), typeof(MethodDispatcher&lt;IContract&gt;), new PassThroughMessageFilter()));
-
             ContractImplementation ci = new ContractImplementation();
             ci.SetFailCount(1);
+            serviceBusRuntime.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;&quot;, &quot;&quot;, typeof(IContract), new MethodDispatcher&lt;IContract&gt;(ci), new PassThroughMessageFilter()));
 
-            MethodDispatcherConfiguration.For(serviceBusRuntime).RegisterTarget(typeof(IContract), ci);
 
             CountdownLatch latch = new CountdownLatch(2);
 
@@ -406,7 +398,7 @@ namespace IServiceOriented.ServiceBus.UnitTests
 
             serviceBusRuntime.Start();
 
-            serviceBusRuntime.Publish(typeof(IContract), &quot;PublishThis&quot;, message);
+            serviceBusRuntime.Publish(new PublishRequest(typeof(IContract), &quot;PublishThis&quot;, message));
 
             // Wait for delivery
             latch.Handle.WaitOne(TimeSpan.FromMinutes(1), false); // give it a minute
@@ -440,14 +432,11 @@ namespace IServiceOriented.ServiceBus.UnitTests
             serviceBusRuntime.RetryDelay = 1000;
             serviceBusRuntime.MaxRetries = 1;
 
-            serviceBusRuntime.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;NamedPipeListener&quot;, &quot;net.pipe://localhost/servicebus/test&quot;, typeof(IContract), typeof(WcfListener&lt;IContract&gt;)));
+            serviceBusRuntime.AddListener(new ListenerEndpoint(Guid.NewGuid(), &quot;test&quot;, &quot;NamedPipeListener&quot;, &quot;net.pipe://localhost/servicebus/test&quot;, typeof(IContract), new WcfListener&lt;IContract&gt;()));
             string message = &quot;Publish this message&quot;;
-            serviceBusRuntime.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;&quot;, &quot;&quot;, typeof(IContract), typeof(MethodDispatcher&lt;IContract&gt;), new PassThroughMessageFilter()));
-
             ContractImplementation ci = new ContractImplementation();
             ci.SetFailCount(3);
-
-            MethodDispatcherConfiguration.For(serviceBusRuntime).RegisterTarget(typeof(IContract), ci);
+            serviceBusRuntime.Subscribe(new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;&quot;, &quot;&quot;, typeof(IContract), new MethodDispatcher&lt;IContract&gt;(ci), new PassThroughMessageFilter()));
 
             CountdownLatch latch = new CountdownLatch(3);
             
@@ -462,7 +451,7 @@ namespace IServiceOriented.ServiceBus.UnitTests
 
             serviceBusRuntime.Start();
 
-            serviceBusRuntime.Publish(typeof(IContract), &quot;PublishThis&quot;, message);
+            serviceBusRuntime.Publish(new PublishRequest(typeof(IContract), &quot;PublishThis&quot;, message));
 
             // Wait for delivery
             latch.Handle.WaitOne(TimeSpan.FromMinutes(1), false); // give it a minute</diff>
      <filename>IServiceOriented.ServiceBus.UnitTests/ServiceBusRuntimeTest.cs</filename>
    </modified>
    <modified>
      <diff>@@ -59,12 +59,12 @@ namespace IServiceOriented.ServiceBus.UnitTests
         [TestMethod]
         public void TestCrud()
         {
-            SqlSubscriptionDB db = new SqlSubscriptionDB(_connectionString);
+            SqlSubscriptionDB db = new SqlSubscriptionDB(_connectionString, new Type[] { typeof(WcfDispatcher&lt;IContract&gt;) }, new Type[] { typeof(WcfListener&lt;IContract&gt;)  }, new Type[] { typeof(PassThroughMessageFilter) });
 
             Assert.AreEqual(0, db.LoadListenerEndpoints().Count(), &quot;Listener endpoints count should be zero&quot;);
             Assert.AreEqual(0, db.LoadSubscriptionEndpoints().Count(), &quot;Subscription endpoints count should be zero&quot;);
 
-            ListenerEndpoint listener = new ListenerEndpoint(Guid.NewGuid(), &quot;listener&quot;, &quot;ListenerConfig&quot;,  &quot;http://localhost/test&quot;, typeof(IContract), typeof(WcfListener&lt;IContract&gt;));
+            ListenerEndpoint listener = new ListenerEndpoint(Guid.NewGuid(), &quot;listener&quot;, &quot;ListenerConfig&quot;,  &quot;http://localhost/test&quot;, typeof(IContract), new WcfListener&lt;IContract&gt;());
             db.CreateListener(listener);
 
             IEnumerable&lt;ListenerEndpoint&gt; listeners = db.LoadListenerEndpoints();
@@ -78,7 +78,7 @@ namespace IServiceOriented.ServiceBus.UnitTests
             Assert.AreEqual(listener.ConfigurationName, savedListener.ConfigurationName, &quot;Configuration name does not match&quot;);
             Assert.AreEqual(listener.Address, savedListener.Address, &quot;Address does not match&quot;);
 
-            SubscriptionEndpoint subscription = new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;SubscriptionConfig&quot;, &quot;http://localhost/test/subscription&quot;, typeof(IContract), typeof(WcfDispatcher&lt;IContract&gt;), new PassThroughMessageFilter());            
+            SubscriptionEndpoint subscription = new SubscriptionEndpoint(Guid.NewGuid(), &quot;subscription&quot;, &quot;SubscriptionConfig&quot;, &quot;http://localhost/test/subscription&quot;, typeof(IContract), new WcfDispatcher&lt;IContract&gt;(), new PassThroughMessageFilter());            
             db.CreateSubscription(subscription);
             
             IEnumerable&lt;SubscriptionEndpoint&gt; subscriptions = db.LoadSubscriptionEndpoints();
@@ -90,7 +90,7 @@ namespace IServiceOriented.ServiceBus.UnitTests
             Assert.AreEqual(subscription.Address, savedSubscription.Address, &quot;Address does not match&quot;);
             Assert.AreEqual(subscription.ConfigurationName, savedSubscription.ConfigurationName, &quot;ConfigurationName does not match&quot;);
             Assert.AreEqual(subscription.ContractType, savedSubscription.ContractType, &quot;ContractType does not match&quot;);
-            Assert.AreEqual(subscription.DispatcherType, savedSubscription.DispatcherType, &quot;DispatcherType does not match&quot;);
+            // TODO: Compare dispatchers
             Assert.AreEqual(subscription.Id, savedSubscription.Id, &quot;Id does not match&quot;);
             Assert.AreEqual(subscription.Filter.GetType(), savedSubscription.Filter.GetType(), &quot;Id does not match&quot;);
             </diff>
      <filename>IServiceOriented.ServiceBus.UnitTests/SqlSubscriptionDbUnitTest.cs</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,12 @@
-&#65279;create table listener (id uniqueidentifier primary key, name nvarchar(max), address nvarchar(max) not null, contract_type nvarchar(max) not null, configuration_name nvarchar(max) not null, listener_type nvarchar(max) not null)
+&#65279;create table listener (id uniqueidentifier primary key, name nvarchar(max), address nvarchar(max) not null, contract_type nvarchar(max) not null, configuration_name nvarchar(max) not null, listener_data varbinary(max) not null)
 go
 
-create table subscription (id uniqueidentifier primary key, filter_type nvarchar(max), filter_data nvarchar(max), name nvarchar(max), address nvarchar(max) not null, contract_type nvarchar(max) not null, configuration_name nvarchar(max) not null, dispatcher_type nvarchar(max))
+create table subscription (id uniqueidentifier primary key, filter_data varbinary(max), name nvarchar(max), address nvarchar(max) not null, contract_type nvarchar(max) not null, configuration_name nvarchar(max) not null, dispatcher_data varbinary(max))
 go
 
-create proc sp_listener_create (@id as uniqueidentifier, @name as nvarchar(max), @address as nvarchar(max), @contract_type as nvarchar(max), @configuration_name as nvarchar(max), @listener_type as nvarchar(max))
+create proc sp_listener_create (@id as uniqueidentifier, @name as nvarchar(max), @address as nvarchar(max), @contract_type as nvarchar(max), @configuration_name as nvarchar(max), @listener_data as varbinary(max))
 as
-insert into listener (id, name, address, contract_type, configuration_name, listener_type) values (@id, @name, @address, @contract_type, @configuration_name, @listener_type)
+insert into listener (id, name, address, contract_type, configuration_name, listener_data) values (@id, @name, @address, @contract_type, @configuration_name, @listener_data)
 
 go
 
@@ -16,9 +16,9 @@ delete from listener where id = @id
 
 go
 
-create proc sp_subscription_create (@id as uniqueidentifier, @name as nvarchar(max), @address as nvarchar(max), @contract_type as nvarchar(max), @configuration_name as nvarchar(max), @filter_type as nvarchar(max), @filter_data as nvarchar(max), @dispatcher_type as nvarchar(max))
+create proc sp_subscription_create (@id as uniqueidentifier, @name as nvarchar(max), @address as nvarchar(max), @contract_type as nvarchar(max), @configuration_name as nvarchar(max), @filter_data as varbinary(max), @dispatcher_data as varbinary(max))
 as
-insert into subscription (id, name, address, contract_type, configuration_name, filter_type, filter_data, dispatcher_type) values (@id, @name, @address, @contract_type, @configuration_name, @filter_type, @filter_data, @dispatcher_type)
+insert into subscription (id, name, address, contract_type, configuration_name, filter_data, dispatcher_data) values (@id, @name, @address, @contract_type, @configuration_name, @filter_data, @dispatcher_data)
 
 go
 </diff>
      <filename>IServiceOriented.ServiceBus/CreateSqlSubscriptionPersistenceServiceDb.sql</filename>
    </modified>
    <modified>
      <diff>@@ -3,56 +3,54 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 
+using System.Runtime.Serialization;
+
+
 namespace IServiceOriented.ServiceBus
-{
+{    
+    [Serializable]
+    [DataContract]
     public abstract class Dispatcher : IDisposable
     {
+        [NonSerialized]
+        ServiceBusRuntime _runtime;
         public ServiceBusRuntime Runtime
         {
-            get;
-            private set;
+            get
+            {
+                return _runtime;
+            }
+            internal set
+            {
+                _runtime = value;
+            }
         }
 
+        [NonSerialized]
+        SubscriptionEndpoint _endpoint;        
         public SubscriptionEndpoint Endpoint
         {
-            get;
-            private set;
-        }
-
-        internal void StartInternal(ServiceBusRuntime runtime, SubscriptionEndpoint endpoint)
-        {
-            try
+            get
             {
-                Runtime = runtime;
-                Endpoint = endpoint;
-
-                OnStart();
-
-                Started = true;
+                return _endpoint;
             }
-            finally
+            internal set
             {
-                if (!Started)
-                {
-                    Runtime = null;
-                    Endpoint = null;
-                }
+                _endpoint = value;
             }
         }
 
-        internal void StopInternal()
+        internal void StartInternal()
         {
-            try
-            {
-                OnStop();
-            }
-            finally
-            {
-                Runtime = null;
-                Endpoint = null;
+            OnStart();
 
-                Started = false;
-            }
+            Started = true;
+        }
+
+        internal void StopInternal()
+        {
+            OnStop();
+            Started = false;        
         }
 
         protected virtual void OnStart()
@@ -69,7 +67,7 @@ namespace IServiceOriented.ServiceBus
             private set;
         }
 
-        [ThreadStatic]
+        [ThreadStatic, NonSerialized]
         static DispatchContext _dispatchContext;
         /// &lt;summary&gt;
         /// Contains information about the message that is currently being dispatched.</diff>
      <filename>IServiceOriented.ServiceBus/Dispatcher.cs</filename>
    </modified>
    <modified>
      <diff>@@ -114,6 +114,20 @@ namespace IServiceOriented.ServiceBus
                 _name = value;
             }
         }
+
+        bool _transient;
+        [DataMember]
+        public bool Transient
+        {
+            get
+            {
+                return _transient;
+            }
+            set
+            {
+                _transient = value;
+            }
+        }
     }
 
 </diff>
      <filename>IServiceOriented.ServiceBus/Endpoint.cs</filename>
    </modified>
    <modified>
      <diff>@@ -68,6 +68,11 @@
     &lt;Compile Include=&quot;InvalidContractException.cs&quot; /&gt;
     &lt;Compile Include=&quot;ListenerEndpoint.cs&quot; /&gt;
     &lt;Compile Include=&quot;IMessageDeliveryQueue.cs&quot; /&gt;
+    &lt;Compile Include=&quot;PublishRequest.cs&quot; /&gt;
+    &lt;Compile Include=&quot;SqlSubscriptionPersistenceService.cs&quot;&gt;
+      &lt;SubType&gt;Code&lt;/SubType&gt;
+    &lt;/Compile&gt;
+    &lt;Compile Include=&quot;TransformationDispatcher.cs&quot; /&gt;
     &lt;Compile Include=&quot;ReaderWriterLockedObject.cs&quot; /&gt;
     &lt;Compile Include=&quot;UnhandledMessageFilter.cs&quot; /&gt;
     &lt;Compile Include=&quot;PerformanceMonitorRuntimeService.cs&quot; /&gt;
@@ -81,7 +86,6 @@
     &lt;Compile Include=&quot;Properties\AssemblyInfo.cs&quot; /&gt;
     &lt;Compile Include=&quot;Service.cs&quot; /&gt;
     &lt;Compile Include=&quot;ServiceBusRuntime.cs&quot; /&gt;
-    &lt;Compile Include=&quot;SqlSubscriptionPersistenceService.cs&quot; /&gt;
     &lt;Compile Include=&quot;SubscriptionEndpoint.cs&quot; /&gt;
     &lt;Compile Include=&quot;SubscriptionNotFoundException.cs&quot; /&gt;
     &lt;Compile Include=&quot;SubscriptionPersistenceService.cs&quot; /&gt;
@@ -92,7 +96,6 @@
     &lt;Compile Include=&quot;WcfManagementService.cs&quot; /&gt;
   &lt;/ItemGroup&gt;
   &lt;ItemGroup&gt;
-    &lt;None Include=&quot;ClassDiagram.cd&quot; /&gt;
     &lt;None Include=&quot;iServiceOriented.snk&quot; /&gt;
     &lt;EmbeddedResource Include=&quot;CreateSqlSubscriptionPersistenceServiceDb.sql&quot; /&gt;
   &lt;/ItemGroup&gt;</diff>
      <filename>IServiceOriented.ServiceBus/IServiceOriented.ServiceBus.csproj</filename>
    </modified>
    <modified>
      <diff>@@ -2,63 +2,66 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
+using System.Runtime.Serialization;
 
 namespace IServiceOriented.ServiceBus
-{
+{    
+    [Serializable]
+    [DataContract]
     public abstract class Listener : IDisposable
     {
+        [NonSerialized]
+        ServiceBusRuntime _runtime;
         public ServiceBusRuntime Runtime
         {
-            get;
-            private set;
+            get
+            {
+                return _runtime;
+            }
+            internal set
+            {                
+                _runtime = value;
+            }
         }
 
+        [NonSerialized]
+        ListenerEndpoint _endpoint;
         public ListenerEndpoint Endpoint
         {
-            get;
-            private set;
+            get
+            {
+                return _endpoint;
+            }
+            internal set
+            {
+                _endpoint = value;
+            }
         }
 
+        [NonSerialized]
+        bool _started;
         public bool Started
         {
-            get;
-            private set;
-        }
-
-        internal void StartInternal(ServiceBusRuntime host, ListenerEndpoint endpoint)
-        {
-            try
+            get
             {
-                Runtime = host;
-                Endpoint = endpoint;
-
-                OnStart();
-
-                Started = true;
+                return _started;
             }
-            finally
+            private set
             {
-                if (!Started)
-                {
-                    Runtime = null;
-                    Endpoint = null;
-                }                
+                _started = value;
             }
         }
 
+        internal void StartInternal()
+        {            
+            OnStart();
+            Started = true;        
+        }
+
         internal void StopInternal()
         {
-            try
-            {
-                OnStop();
-            }
-            finally
-            {
-                Started = false;
-
-                Runtime = null;
-                Endpoint = null;
-            }
+            OnStop();
+            Started = false;
         }
 
         protected virtual void OnStart()</diff>
      <filename>IServiceOriented.ServiceBus/Listener.cs</filename>
    </modified>
    <modified>
      <diff>@@ -6,47 +6,35 @@ using System.Runtime.Serialization;
 
 namespace IServiceOriented.ServiceBus
 {
-    [Serializable]
     [DataContract]
     public sealed class ListenerEndpoint : Endpoint
     {
-        public ListenerEndpoint(Guid id, string name, string configurationName, string address, Type contractType, Type listenerType) : base(id, name, configurationName, address, contractType)
+        public ListenerEndpoint(Guid id, string name, string configurationName, string address, Type contractType, Listener listener) : base(id, name, configurationName, address, contractType)
         {
-            ListenerType = listenerType;
-        }
-
-        public Type ListenerType
-        {
-            get;
-            set;
+            Listener = listener;
         }
 
+        Listener _listener;
         [DataMember]
-        public string ListenerTypeName
+        public Listener Listener
         {
             get
             {
-                if (ListenerType == null) return null;
-                return ListenerType.AssemblyQualifiedName;
+                return _listener;
             }
-            set
+            private set
             {
-                if (value == null)
+                if (value != null &amp;&amp; value.Endpoint != null)
                 {
-                    ListenerType = null;
+                    throw new InvalidOperationException(&quot;Endpoint is attached to another listener&quot;);
                 }
-                else
+                if (_listener != null)
                 {
-                    Type type = Type.GetType(value);
-                    if (type == null)
-                    {
-                        throw new InvalidOperationException(&quot;Unknown type&quot;);
-                    }
-                    ListenerType = type;
-
+                    _listener.Endpoint = null;
                 }
+                _listener = value;
+                if(value != null) value.Endpoint = this;
             }
         }
-        
     }
 }</diff>
      <filename>IServiceOriented.ServiceBus/ListenerEndpoint.cs</filename>
    </modified>
    <modified>
      <diff>@@ -8,11 +8,7 @@ namespace IServiceOriented.ServiceBus
     [Serializable]
     public abstract class MessageFilter
     {
-        public abstract bool Include(string action, object message);
-
-        protected internal abstract void InitFromString(string data);
-        protected internal abstract string CreateInitString();
-
+        public abstract bool Include(string action, object message);        
     }
 	
 		</diff>
      <filename>IServiceOriented.ServiceBus/MessageFilter.cs</filename>
    </modified>
    <modified>
      <diff>@@ -5,69 +5,21 @@ using System.Linq;
 using System.Text;
 
 namespace IServiceOriented.ServiceBus
-{
-    public class MethodDispatcherConfiguration
+{    
+    public sealed class MethodDispatcher&lt;T&gt; : Dispatcher 
     {
-        Dictionary&lt;Type, object&gt; _targets = new Dictionary&lt;Type, object&gt;();
-
-        public void RegisterTarget(Type type, object target)
-        {            
-            _targets.Add(type, target);
-        }
-        public void UnregisterTarget(Type type)
+        private MethodDispatcher()
         {
-            _targets.Remove(type);
-        }
 
-        public object GetTarget(Type type)
-        {
-            return _targets[type];
         }
-
-        static Dictionary&lt;WeakReference, MethodDispatcherConfiguration&gt; _configs = new Dictionary&lt;WeakReference, MethodDispatcherConfiguration&gt;();
-
-
-        // Note: this is not optimized
-        public static MethodDispatcherConfiguration For(ServiceBusRuntime runtime)
-        {            
-            lock (_configs)
+        public MethodDispatcher(object target) 
+        {
+            if (target == null)
             {
-                List&lt;WeakReference&gt; kill = new List&lt;WeakReference&gt;(); // remove invalid references
-                foreach (WeakReference wr in _configs.Keys)
-                {
-                    if (wr.IsAlive)
-                    {
-                        if (wr.Target == runtime)
-                        {
-                            return _configs[wr];
-                        }
-                    }
-                    else
-                    {
-                        kill.Add(wr);
-                    }
-                }
+                throw new ArgumentNullException(&quot;target&quot;);
+            }
 
-                foreach (WeakReference wr in kill) 
-                {
-                    _configs.Remove(wr);
-                }
-                
-                // Configuration not found
-                WeakReference newRef = new WeakReference(runtime);
-                MethodDispatcherConfiguration config = new MethodDispatcherConfiguration();
-                _configs.Add(newRef, config);
-                return config;
-            }        
-        }
-        
-    }
-    
-    public class MethodDispatcher&lt;T&gt; : Dispatcher 
-    {
-        
-        public MethodDispatcher() 
-        {
+            Target = target;
             foreach (MethodInfo method in typeof(T).GetMethods())
             {
                 if (_actionLookup.ContainsKey(method.Name))
@@ -78,6 +30,12 @@ namespace IServiceOriented.ServiceBus
             }            
         }
 
+        public object Target
+        {
+            get;
+            private set;
+        }
+
         protected override void Dispatch(SubscriptionEndpoint endpoint, string action, object message)
         {            
             MethodInfo methodInfo;
@@ -95,13 +53,12 @@ namespace IServiceOriented.ServiceBus
 
             if (methodInfo != null)
             {
-                methodInfo.Invoke(MethodDispatcherConfiguration.For(DispatchContext.Runtime).GetTarget(typeof(T)), new object[] { message });
+                methodInfo.Invoke(Target, new object[] { message });
             }
             else
             {
                 throw new InvalidOperationException(&quot;Matching action not found&quot;);
             }
-
         }
 
         Dictionary&lt;string, MethodInfo&gt; _actionLookup = new Dictionary&lt;string, MethodInfo&gt;();</diff>
      <filename>IServiceOriented.ServiceBus/MethodDispatcher.cs</filename>
    </modified>
    <modified>
      <diff>@@ -112,45 +112,7 @@ namespace IServiceOriented.ServiceBus
 		
         ReaderWriterLockedObject&lt;ReadOnlyCollection&lt;RuntimeService&gt;, IList&lt;RuntimeService&gt;&gt; _runtimeServices = new ReaderWriterLockedObject&lt;ReadOnlyCollection&lt;RuntimeService&gt;, IList&lt;RuntimeService&gt;&gt;(new List&lt;RuntimeService&gt;(), l =&gt; new ReadOnlyCollection&lt;RuntimeService&gt;(l));
 
-        Dictionary&lt;ListenerEndpoint, Listener&gt; _listeners = new Dictionary&lt;ListenerEndpoint,Listener&gt;();
-
-        void startDispatching(SubscriptionEndpoint se)
-        {
-            Dispatcher dispatcher = (Dispatcher)Activator.CreateInstance(se.DispatcherType);
-            dispatcher.StartInternal(this, se);
-            lock (_dispatchers)
-            {
-                _dispatchers.Add(se, dispatcher);
-            }
-        }
-
-        void stopDispatching(SubscriptionEndpoint se)
-        {
-            lock (_dispatchers)
-            {
-                _dispatchers[se].StopInternal();
-                _dispatchers.Remove(se);
-            }
-        }
-
-        void startListening(ListenerEndpoint le)
-        {
-            Listener listener = (Listener)Activator.CreateInstance(le.ListenerType);
-            listener.StartInternal(this, le);
-            lock (_listeners)
-            {
-                _listeners.Add(le, listener);
-            }
-        }
-
-        void stopListening(ListenerEndpoint le)
-        {
-            lock (_listeners)
-            {
-                _listeners[le].StopInternal();
-                _listeners.Remove(le);
-            }
-        }
+        
         
 		public void Start()
 		{
@@ -178,7 +140,7 @@ namespace IServiceOriented.ServiceBus
                 {
                     foreach (SubscriptionEndpoint se in subscriptions)
                     {
-                        startDispatching(se);
+                        se.Dispatcher.StartInternal();
                     }
                 });                   
 
@@ -186,7 +148,7 @@ namespace IServiceOriented.ServiceBus
                 {
                     foreach(ListenerEndpoint le in _listenerEndpoints)
                     {
-                        startListening(le);
+                        le.Listener.StopInternal();
                     }
                 }
                 
@@ -342,7 +304,7 @@ namespace IServiceOriented.ServiceBus
                 {
                     foreach (ListenerEndpoint le in _listenerEndpoints)
                     {
-                        stopListening(le);
+                        le.Listener.StopInternal();
                     }                
                 }
 
@@ -350,7 +312,7 @@ namespace IServiceOriented.ServiceBus
                 {
                     foreach (SubscriptionEndpoint se in subscriptions)
                     {
-                        stopDispatching(se);
+                        se.Dispatcher.StopInternal();
                     }
                 });
 
@@ -362,7 +324,6 @@ namespace IServiceOriented.ServiceBus
                     }
                 });
 
-                _dispatchers.Clear();
 			
                 _started = false;
 			}
@@ -439,6 +400,11 @@ namespace IServiceOriented.ServiceBus
 
             if (endpoint == null) throw new ArgumentNullException(&quot;endpoint&quot;);
 
+            if (endpoint.Listener.Runtime != null)
+            {
+                throw new InvalidOperationException(&quot;Listener is attached to a bus already&quot;);
+            }
+
             VerifyContract(endpoint.ContractType);
 
             bool added = false;
@@ -448,7 +414,8 @@ namespace IServiceOriented.ServiceBus
                 {
                     lock (_listenerEndpointsLock)
                     {
-                        _listenerEndpoints.Add(endpoint);
+                        endpoint.Listener.Runtime = this;
+                        _listenerEndpoints.Add(endpoint);                        
                         added = true;
                     }
                     
@@ -465,7 +432,7 @@ namespace IServiceOriented.ServiceBus
 
                     if (_started)
                     {
-                        startListening(endpoint);
+                        endpoint.Listener.StartInternal();
                     }
 
                     ts.Complete();
@@ -496,7 +463,7 @@ namespace IServiceOriented.ServiceBus
                 {
                     if (_started)
                     {
-                        stopListening(endpoint);
+                        endpoint.Listener.StopInternal();
                     }
                     RemoveListener(endpoint);
 
@@ -527,6 +494,7 @@ namespace IServiceOriented.ServiceBus
 
             if (endpoint == null) throw new ArgumentNullException(&quot;endpoint&quot;);
 
+
             bool removed = false;
             try
             {
@@ -535,6 +503,7 @@ namespace IServiceOriented.ServiceBus
 				    lock(_listenerEndpointsLock)
 				    {
 					    _listenerEndpoints.Remove(endpoint);
+                        endpoint.Listener.Runtime = null;
 				    }
 
                     _runtimeServices.Read(runtimeServices =&gt;
@@ -681,11 +650,12 @@ namespace IServiceOriented.ServiceBus
 
                         try
                         {
-                            Dispatcher dispatcher;
                             SubscriptionEndpoint endpoint = GetSubscription(delivery.SubscriptionEndpointId);
+                            Dispatcher dispatcher = endpoint.Dispatcher;
+                            
                             if (endpoint != null) // subscriber might have been removed since enqueue
                             {
-                                _dispatchers.TryGetValue(endpoint, out dispatcher);
+                                
 
                                 if (dispatcher != null)
                                 {
@@ -737,9 +707,7 @@ namespace IServiceOriented.ServiceBus
                 }
             }
 		}
-		
-		Dictionary&lt;SubscriptionEndpoint, Dispatcher&gt; _dispatchers = new Dictionary&lt;SubscriptionEndpoint, Dispatcher&gt;();
-
+				
         /// &lt;summary&gt;
         /// Execute a block of code, passing any unhandled exceptions to the unhandled exception handler
         /// &lt;/summary&gt;
@@ -805,20 +773,11 @@ namespace IServiceOriented.ServiceBus
             return ForEachSafely(list, d =&gt; d.DynamicInvoke(parameters));
         }
         
-		public void Publish(Type contract, string action, object message)
+		public void Publish(PublishRequest dispatchInformation)
 		{
             if (_disposed) throw new ObjectDisposedException(&quot;ServiceBusRuntime&quot;);
 
-            if (contract == null)
-            {
-                throw new ArgumentNullException(&quot;contract&quot;);
-            }
-            
-            if (message == null)
-            {
-                throw new ArgumentNullException(&quot;message&quot;);
-            }
-            VerifyContract(contract);
+            VerifyContract(dispatchInformation.Contract);
 
             _subscriptions.Read(subscriptions =&gt;
             {
@@ -835,7 +794,7 @@ namespace IServiceOriented.ServiceBus
                             if (subscription.Filter is UnhandledMessageFilter)
                             {
                                 include = false;
-                                if (subscription.Filter.Include(action, message))
+                                if (subscription.Filter.Include(dispatchInformation.Action, dispatchInformation.Message))
                                 {
                                     unhandledFilters.Add(subscription);
                                 }
@@ -843,7 +802,7 @@ namespace IServiceOriented.ServiceBus
                             }
                             else
                             {
-                                include = subscription.Filter.Include(action, message);
+                                include = subscription.Filter.Include(dispatchInformation.Action, dispatchInformation.Message);
                             }
                         }
                         else
@@ -853,7 +812,7 @@ namespace IServiceOriented.ServiceBus
 
                         if (include)
                         {
-                            QueueDelivery(subscription.Id, action, message);
+                            QueueDelivery(subscription.Id, dispatchInformation.Action, dispatchInformation.Message);
                             handled = true;
                         }
                     }
@@ -863,7 +822,7 @@ namespace IServiceOriented.ServiceBus
                     {
                         foreach (SubscriptionEndpoint subscription in unhandledFilters)
                         {
-                            QueueDelivery(subscription.Id, action, message);
+                            QueueDelivery(subscription.Id, dispatchInformation.Action, dispatchInformation.Message);
                         }
                     }
 
@@ -912,6 +871,11 @@ namespace IServiceOriented.ServiceBus
 
             if (subscription == null) throw new ArgumentNullException(&quot;subscription&quot;);
 
+            if (subscription.Dispatcher != null)
+            {
+                throw new InvalidOperationException(&quot;Subscription is attached to another bus&quot;);
+            }
+
             VerifyContract(subscription.ContractType);
 
             bool added = false;
@@ -922,12 +886,13 @@ namespace IServiceOriented.ServiceBus
                     _subscriptions.Write(subscriptions =&gt;
                     {
                         subscriptions.Add(subscription);
+                        subscription.Dispatcher.Runtime = this;
                         added = true;
                     });
 
                     if (_started)
                     {
-                        startDispatching(subscription);
+                        subscription.Dispatcher.StopInternal() ;
                     }
 
                     _runtimeServices.Read(runtimeServices =&gt;
@@ -987,12 +952,13 @@ namespace IServiceOriented.ServiceBus
             try
             {
                 using (TransactionScope ts = new TransactionScope())
-                {                   
-                    stopDispatching(subscription);
+                {
+                    subscription.Dispatcher.StopInternal();
 
                     _subscriptions.Write(subscriptions =&gt;
                     {
                         subscriptions.Remove(subscription);
+                        subscription.Dispatcher.Runtime = null;
                         removed = true;
                     });                    
                     </diff>
      <filename>IServiceOriented.ServiceBus/ServiceBusRuntime.cs</filename>
    </modified>
    <modified>
      <diff>@@ -12,12 +12,67 @@ using System.Data.SqlClient;
 using Microsoft.SqlServer.Management.Common;
 using Microsoft.SqlServer.Management.Smo;
 
+using System.Runtime.Serialization;
+
 
 namespace IServiceOriented.ServiceBus
 {
     public class SqlSubscriptionDB
     {
-        public SqlSubscriptionDB(string connectionString)
+        public SqlSubscriptionDB(Type[] knownDispatcherTypes, Type[] knownListenerTypes, Type[] knownFilterTypes)
+        {
+            _dispatcherSerializer = new DataContractSerializer(typeof(Dispatcher), knownDispatcherTypes);
+            _listenerSerializer = new DataContractSerializer(typeof(Listener), knownListenerTypes);
+            _filterSerializer = new DataContractSerializer(typeof(MessageFilter), knownFilterTypes);
+        }
+
+        DataContractSerializer _dispatcherSerializer;
+        DataContractSerializer _listenerSerializer;
+        DataContractSerializer _filterSerializer;
+
+        Listener getListenerFromPersistenceData(byte[] data)
+        {
+            MemoryStream ms = new MemoryStream(data);
+            ms.Position = 0;
+            return (Listener)_listenerSerializer.ReadObject(ms);
+        }
+
+        byte[] getListenerPersistenceData(Listener obj)        
+        {
+            MemoryStream ms = new MemoryStream();
+            _listenerSerializer.WriteObject(ms,obj);
+            return ms.ToArray();
+        }
+
+        MessageFilter getFilterFromPersistenceData(byte[] data)
+        {
+            MemoryStream ms = new MemoryStream(data);
+            ms.Position = 0;
+            return (MessageFilter)_filterSerializer.ReadObject(ms);
+        }
+
+        byte[] getFilterPersistenceData(MessageFilter obj)
+        {
+            MemoryStream ms = new MemoryStream();
+            _filterSerializer.WriteObject(ms, obj);
+            return ms.ToArray();
+        }
+
+
+        Dispatcher getDispatcherFromPersistenceData(byte[] data)
+        {
+            MemoryStream ms = new MemoryStream(data);
+            ms.Position = 0;
+            return (Dispatcher)_dispatcherSerializer.ReadObject(ms);
+        }
+
+        byte[] getDispatcherPersistenceData(Dispatcher obj)
+        {
+            MemoryStream ms = new MemoryStream();
+            _dispatcherSerializer.WriteObject(ms, obj);
+            return ms.ToArray();
+        }
+        public SqlSubscriptionDB(string connectionString, Type[] knownDispatcherTypes, Type[] knownListenerTypes, Type[] knownFilterTypes) : this(knownDispatcherTypes, knownListenerTypes, knownFilterTypes)
         {
             _connectionString = connectionString;
         }
@@ -58,33 +113,16 @@ namespace IServiceOriented.ServiceBus
         }
 
 
-        static SubscriptionEndpoint getSubscription(IDataReader dr)
-        {
-            MessageFilter filter = null;
-
-            string filterData = dr[&quot;filter_data&quot;] as string;
-            string filterTypeString = dr[&quot;filter_type&quot;] as string;
-
-            if (filterTypeString != null)
-            {
-                Type filterType = Type.GetType(filterTypeString);
-                if (filterType == null)
-                {
-                    throw new InvalidOperationException(&quot;Filter type could not be loaded&quot;);
-                }
-
-                filter = (MessageFilter)Activator.CreateInstance(filterType);
-                filter.InitFromString(filterData);
-            }
-
+        SubscriptionEndpoint getSubscription(IDataReader dr)
+        {            
             SubscriptionEndpoint endpoint = new SubscriptionEndpoint(
                 (Guid)dr[&quot;id&quot;],
                 dr[&quot;name&quot;] as string,
                 dr[&quot;configuration_name&quot;] as string,
                 dr[&quot;address&quot;] as string,
                 Type.GetType(dr[&quot;contract_type&quot;] as string),
-                Type.GetType(dr[&quot;dispatcher_type&quot;] as string),
-                filter)
+                getDispatcherFromPersistenceData((byte[])dr[&quot;dispatcher_data&quot;]),
+                getFilterFromPersistenceData((byte[])dr[&quot;filter_data&quot;]) )
             ;
 
             if (endpoint.ContractType == null)
@@ -95,7 +133,7 @@ namespace IServiceOriented.ServiceBus
             return endpoint;
         }
 
-        static ListenerEndpoint getListener(IDataReader dr)
+        ListenerEndpoint getListener(IDataReader dr)
         {
             ListenerEndpoint endpoint = new ListenerEndpoint(            
                 (Guid)dr[&quot;id&quot;],
@@ -103,8 +141,7 @@ namespace IServiceOriented.ServiceBus
                 dr[&quot;configuration_name&quot;] as string,
                 dr[&quot;address&quot;] as string,
                 Type.GetType(dr[&quot;contract_type&quot;] as string),
-                Type.GetType(dr[&quot;listener_type&quot;] as string)
-            );
+                getListenerFromPersistenceData((byte[])dr[&quot;listener_data&quot;]));
 
             if (endpoint.ContractType == null)
             {
@@ -169,7 +206,7 @@ namespace IServiceOriented.ServiceBus
                     command.Parameters.AddWithValue(&quot;@configuration_name&quot;, endpoint.ConfigurationName);
                     command.Parameters.AddWithValue(&quot;@contract_type&quot;, endpoint.ContractTypeName);
                     command.Parameters.AddWithValue(&quot;@name&quot;, endpoint.Name);
-                    command.Parameters.AddWithValue(&quot;@listener_type&quot;, endpoint.ListenerTypeName);
+                    command.Parameters.AddWithValue(&quot;@listener_data&quot;, getListenerPersistenceData(endpoint.Listener));
                     command.ExecuteNonQuery();
                 }
             }
@@ -183,13 +220,12 @@ namespace IServiceOriented.ServiceBus
                 {
                     command.CommandType = CommandType.StoredProcedure;
                     command.Parameters.AddWithValue(&quot;@id&quot;, subscription.Id);
-                    command.Parameters.AddWithValue(&quot;@filter_type&quot;, subscription.Filter == null ? DBNull.Value : (object)subscription.Filter.GetType().AssemblyQualifiedName);
-                    command.Parameters.AddWithValue(&quot;@filter_data&quot;, subscription.Filter == null ? DBNull.Value :  (object)subscription.Filter.CreateInitString());
+                    command.Parameters.AddWithValue(&quot;@filter_data&quot;, getFilterPersistenceData(subscription.Filter));
                     command.Parameters.AddWithValue(&quot;@address&quot;, subscription.Address);
                     command.Parameters.AddWithValue(&quot;@configuration_name&quot;, subscription.ConfigurationName);
                     command.Parameters.AddWithValue(&quot;@contract_type&quot;, subscription.ContractTypeName);
                     command.Parameters.AddWithValue(&quot;@name&quot;, subscription.Name);
-                    command.Parameters.AddWithValue(&quot;@dispatcher_type&quot;, subscription.DispatcherTypeName);
+                    command.Parameters.AddWithValue(&quot;@dispatcher_data&quot;, getDispatcherPersistenceData(subscription.Dispatcher));
                     command.ExecuteNonQuery();
                 }
             }
@@ -230,13 +266,12 @@ namespace IServiceOriented.ServiceBus
 
     public class SqlSubscriptionPersistenceService : SubscriptionPersistenceService
     {
-        public SqlSubscriptionPersistenceService(string connectionString)
+        public SqlSubscriptionPersistenceService(string connectionString, Type[] knownDispatcherTypes,  Type[] knownListenerTypes, Type[] knownFilterTypes)
         {
-            _db = new SqlSubscriptionDB(connectionString);
+            _db = new SqlSubscriptionDB(connectionString, knownDispatcherTypes, knownListenerTypes, knownFilterTypes);
         }
 
         SqlSubscriptionDB _db;        
-
         
         protected override IEnumerable&lt;Endpoint&gt; LoadEndpoints()
         {
@@ -249,22 +284,34 @@ namespace IServiceOriented.ServiceBus
 
         protected override void CreateListener(ListenerEndpoint endpoint)
         {
-            _db.CreateListener(endpoint);
+            if (!endpoint.Transient)
+            {
+                _db.CreateListener(endpoint);
+            }
         }
 
         protected override void CreateSubscription(SubscriptionEndpoint subscription)
         {
-            _db.CreateSubscription(subscription);
+            if (!subscription.Transient)
+            {
+                _db.CreateSubscription(subscription);
+            }
         }
 
         protected override void DeleteListener(ListenerEndpoint endpoint)
         {
-            _db.DeleteListener(endpoint.Id);
+            if (!endpoint.Transient)
+            {
+                _db.DeleteListener(endpoint.Id);
+            }
         }
 
         protected override void DeleteSubscription(SubscriptionEndpoint subscription)
         {
-            _db.DeleteSubscription(subscription.Id);
+            if (!subscription.Transient)
+            {
+                _db.DeleteSubscription(subscription.Id);
+            }
         }
     }
 }</diff>
      <filename>IServiceOriented.ServiceBus/SqlSubscriptionPersistenceService.cs</filename>
    </modified>
    <modified>
      <diff>@@ -11,18 +11,18 @@ namespace IServiceOriented.ServiceBus
     [DataContract]
     public sealed class SubscriptionEndpoint : Endpoint
     {
-        public SubscriptionEndpoint(Guid id, string name, string configurationName, string address, Type contractType, Type dispatcherType, MessageFilter filter) 
-            : base(id,  name, configurationName, address, contractType)
+        public SubscriptionEndpoint(Guid id, string name, string configurationName, string address, Type contractType, Dispatcher dispatcher, MessageFilter filter)
+            : base(id, name, configurationName, address, contractType)
         {
             Filter = filter;
-            DispatcherType = dispatcherType;
+            Dispatcher = dispatcher;
         }
-
-        public SubscriptionEndpoint(Guid id, string name, string configurationName, string address, string contractTypeName, string dispatcherTypeName, MessageFilter filter)
+        
+        public SubscriptionEndpoint(Guid id, string name, string configurationName, string address, string contractTypeName, Dispatcher dispatcher, MessageFilter filter)
             : base(id, name, configurationName, address, contractTypeName)
         {
             Filter = filter;
-            DispatcherTypeName = dispatcherTypeName;
+            Dispatcher = dispatcher;
         }
         
         MessageFilter _filter;
@@ -38,34 +38,27 @@ namespace IServiceOriented.ServiceBus
                 _filter = value;
             }
         }
-        
-        Type _dispatcherType;        
-        public Type DispatcherType
-        {
-            get
-            {
-                return _dispatcherType;
-            }
-            private set
-            {
-                _dispatcherType = value;
-            }
-        }
 
+        Dispatcher _dispatcher;
         [DataMember]
-        public string DispatcherTypeName
+        public Dispatcher Dispatcher
         {
             get
             {
-                return _dispatcherType.AssemblyQualifiedName;
+                return _dispatcher;
             }
             private set
             {
-                _dispatcherType = Type.GetType(value);
-                if (_dispatcherType == null)
+                if (value != null &amp;&amp; value.Endpoint != null)
+                {
+                    throw new InvalidOperationException(&quot;Endpoint is attached to another dispatcher&quot;);
+                }
+                if (_dispatcher != null)
                 {
-                    throw new InvalidOperationException(value + &quot; is an invalid type&quot;);
+                    _dispatcher.Endpoint = null;
                 }
+                _dispatcher = value;
+                if (value != null) value.Endpoint = this;
             }
         }
     }	    </diff>
      <filename>IServiceOriented.ServiceBus/SubscriptionEndpoint.cs</filename>
    </modified>
    <modified>
      <diff>@@ -23,34 +23,7 @@ namespace IServiceOriented.ServiceBus
         }
 
         const char TYPE_SEPERATOR = ':';
-
-        protected internal override string CreateInitString()
-        {
-            StringBuilder sb = new StringBuilder();
-            for (int i = 0; i &lt; _messageTypes.Length; i++)
-            {
-                if (i &gt; 0)
-                {
-                    sb.Append(TYPE_SEPERATOR);
-                }
-                sb.Append(_messageTypes[i]);
-            }
-            return sb.ToString();
-        }
-
-        protected internal override void InitFromString(string data)
-        {
-            string[] typeNames = data.Split(TYPE_SEPERATOR);
-            Type[] types = new Type[typeNames.Length];
-            for (int i = 0; i &lt; typeNames.Length; i++)
-            {
-                Type t = Type.GetType(typeNames[i]);
-                if(t == null) throw new InvalidOperationException(&quot;Unknown type&quot;);
-                types[i] = t;
-            }
-            _messageTypes = types;            
-        }
-
+        
         [DataMember]
         protected IEnumerable&lt;string&gt; MessageTypeNames
         {</diff>
      <filename>IServiceOriented.ServiceBus/TypedMessageFilter.cs</filename>
    </modified>
    <modified>
      <diff>@@ -17,16 +17,7 @@ namespace IServiceOriented.ServiceBus
             : base(messageType)
         {
         }
-        protected internal override string CreateInitString()
-        {
-            return null;            
-        }
-
-        protected internal override void InitFromString(string data)
-        {
-            
-        }
-
+        
         public override bool Include(string action, object message)
         {
             return base.Include(action, message);</diff>
      <filename>IServiceOriented.ServiceBus/UnhandledMessageFilter.cs</filename>
    </modified>
    <modified>
      <diff>@@ -5,12 +5,21 @@ using System.Text;
 using System.ServiceModel;
 using System.Reflection;
 
+using System.Runtime.Serialization;
+
 namespace IServiceOriented.ServiceBus
 {    
+    [Serializable]
+    [DataContract]
     public class WcfDispatcher&lt;T&gt; : Dispatcher
     {
         public WcfDispatcher()
         {
+            initActionLookup();
+        }
+
+        void initActionLookup()
+        {
             foreach (MethodInfo method in typeof(T).GetMethods())
             {
                 object[] attributes = method.GetCustomAttributes(typeof(OperationContractAttribute), false);
@@ -56,6 +65,7 @@ namespace IServiceOriented.ServiceBus
             }
         }
 
+        [NonSerialized]
         Dictionary&lt;string, MethodInfo&gt; _actionLookup = new Dictionary&lt;string, MethodInfo&gt;();
 
     }</diff>
      <filename>IServiceOriented.ServiceBus/WcfDispatcher.cs</filename>
    </modified>
    <modified>
      <diff>@@ -5,8 +5,12 @@ using System.Linq;
 using System.Text;
 using System.ServiceModel;
 
+using System.Runtime.Serialization;
+
 namespace IServiceOriented.ServiceBus
 {
+    [Serializable]
+    [DataContract]
     public class WcfListener&lt;T&gt; : Listener
     {
         protected override void OnStart()
@@ -21,6 +25,7 @@ namespace IServiceOriented.ServiceBus
             _host = null;            
         }
 
+        [NonSerialized]
         ServiceHost _host;
 
         protected override void Dispose(bool disposing)</diff>
      <filename>IServiceOriented.ServiceBus/WcfListener.cs</filename>
    </modified>
    <modified>
      <diff>@@ -11,6 +11,7 @@ Project(&quot;{2150E333-8FDC-42A3-9474-1A3956D46DE8}&quot;) = &quot;Solution Items&quot;, &quot;Solution
 		IServiceOriented1.vsmdi = IServiceOriented1.vsmdi
 		IServiceOriented2.vsmdi = IServiceOriented2.vsmdi
 		IServiceOriented3.vsmdi = IServiceOriented3.vsmdi
+		IServiceOriented4.vsmdi = IServiceOriented4.vsmdi
 		LocalTestRun.testrunconfig = LocalTestRun.testrunconfig
 	EndProjectSection
 EndProject
@@ -19,6 +20,9 @@ EndProject
 Project(&quot;{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}&quot;) = &quot;IServiceOriented.ServiceBus.Samples.Chat&quot;, &quot;IServiceOriented.ServiceBus.Samples.Chat\IServiceOriented.ServiceBus.Samples.Chat.csproj&quot;, &quot;{4587E682-FDB8-4C34-8448-48F1F6921591}&quot;
 EndProject
 Global
+	GlobalSection(TestCaseManagementSettings) = postSolution
+		CategoryFile = IServiceOriented4.vsmdi
+	EndGlobalSection
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
 		Release|Any CPU = Release|Any CPU</diff>
      <filename>IServiceOriented.sln</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cd00bc4b636e93f9bc69fdc77fda18fd8442a95a</id>
    </parent>
  </parents>
  <author>
    <name>JEzell</name>
    <email>jezell@gmail.com</email>
  </author>
  <url>http://github.com/jezell/iserviceoriented/commit/ede51630428ab6d1174ebcaf06d5c7306b051862</url>
  <id>ede51630428ab6d1174ebcaf06d5c7306b051862</id>
  <committed-date>2008-08-30T15:52:13-07:00</committed-date>
  <authored-date>2008-08-30T15:52:13-07:00</authored-date>
  <message>Message transforms / Useability improvements</message>
  <tree>2ed512ddf554061d44295e3f4896851c7cd7156d</tree>
  <committer>
    <name>JEzell</name>
    <email>jezell@gmail.com</email>
  </committer>
</commit>
