You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@etch.apache.org by sc...@apache.org on 2009/02/10 17:42:11 UTC

svn commit: r743011 - in /incubator/etch/trunk: binding-csharp/compiler/src/main/java/org/apache/etch/bindings/csharp/compiler/ binding-csharp/compiler/src/main/resources/org/apache/etch/bindings/csharp/compiler/ binding-csharp/runtime/src/main/csharp/...

Author: sccomer
Date: Tue Feb 10 16:40:34 2009
New Revision: 743011

URL: http://svn.apache.org/viewvc?rev=743011&view=rev
Log:
fix for ETCH-59: Listener stack is build 1/2 upside down and strange inhibiting name service and other transport filters

Modified:
    incubator/etch/trunk/binding-csharp/compiler/src/main/java/org/apache/etch/bindings/csharp/compiler/CompilerVersion.java
    incubator/etch/trunk/binding-csharp/compiler/src/main/resources/org/apache/etch/bindings/csharp/compiler/helper.vm
    incubator/etch/trunk/binding-csharp/compiler/src/main/resources/org/apache/etch/bindings/csharp/compiler/main.vm
    incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Support/DefaultServerFactory.cs
    incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Support/ServerFactory.cs
    incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Support/TransportFactory.cs
    incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Transport/TcpTransportFactory.cs
    incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Properties/AssemblyInfo.cs
    incubator/etch/trunk/binding-java/compiler/src/main/java/org/apache/etch/bindings/java/compiler/CompilerVersion.java
    incubator/etch/trunk/binding-java/compiler/src/main/resources/org/apache/etch/bindings/java/compiler/helper.vm
    incubator/etch/trunk/binding-java/compiler/src/main/resources/org/apache/etch/bindings/java/compiler/main.vm
    incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/support/DefaultServerFactory.java
    incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/support/ServerFactory.java
    incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/support/TransportFactory.java
    incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/transport/Tcp2TransportFactory.java
    incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/transport/TcpTransportFactory.java
    incubator/etch/trunk/binding-xml/compiler/src/main/java/org/apache/etch/bindings/xml/compiler/CompilerVersion.java
    incubator/etch/trunk/compiler/src/main/java/org/apache/etch/compiler/Version.java
    incubator/etch/trunk/examples/chat/src/main/csharp/etch.examples.chat/MainChatListener.cs
    incubator/etch/trunk/examples/chat/src/main/java/org/apache/etch/examples/chat/MainChatListener.java
    incubator/etch/trunk/examples/chat/src/test/csharp/etch.examples.chat/TestRemoteChatServer.cs
    incubator/etch/trunk/examples/chat/src/test/java/org/apache/etch/examples/chat/TestRemoteChatServer.java
    incubator/etch/trunk/examples/distmap/src/main/csharp/etch.examples.distmap/MainDistributedHashTableListener.cs
    incubator/etch/trunk/examples/distmap/src/main/java/org/apache/etch/examples/distmap/MainDistributedHashTableListener.java
    incubator/etch/trunk/examples/distmap/src/test/csharp/etch.examples.distmap/TestDistributedHashTable.cs
    incubator/etch/trunk/examples/distmap/src/test/java/org/apache/etch/examples/distmap/TestRemoteDistributedHashTableServer.java
    incubator/etch/trunk/examples/example/src/main/csharp/etch.examples.example/MainExampleListener.cs
    incubator/etch/trunk/examples/example/src/main/java/org/apache/etch/examples/example/MainExampleListener.java
    incubator/etch/trunk/examples/example/src/test/csharp/etch.examples.example/TestExampleServer.cs
    incubator/etch/trunk/examples/example/src/test/java/org/apache/etch/examples/example/TestExampleServer.java
    incubator/etch/trunk/examples/perf/src/main/csharp/etch.examples.perf/MainPerfClient.cs
    incubator/etch/trunk/examples/perf/src/main/csharp/etch.examples.perf/MainPerfListener.cs
    incubator/etch/trunk/examples/perf/src/main/java/org/apache/etch/examples/perf/MainPerfClient.java
    incubator/etch/trunk/examples/perf/src/main/java/org/apache/etch/examples/perf/MainPerfListener.java
    incubator/etch/trunk/examples/perf/src/test/csharp/etch.examples.perf/TestPerfServer.cs
    incubator/etch/trunk/examples/perf/src/test/java/org/apache/etch/examples/perf/TestPerfServer.java
    incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainAsyncListener.cs
    incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainClosingListener.cs
    incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainCuaeListener.cs
    incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainFooListener.cs
    incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainInheritanceListener.cs
    incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainTypesListener.cs
    incubator/etch/trunk/tests/src/main/csharp/etch.tests/MyCuaeHelper.cs
    incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainAsyncListener.java
    incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainClosingListener.java
    incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainCuaeListener.java
    incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainFooListener.java
    incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainInheritanceListener.java
    incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainTypesListener.java
    incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MyCuaeHelper.java
    incubator/etch/trunk/tests/src/test/csharp/etch.tests/TestAsyncClient.cs
    incubator/etch/trunk/tests/src/test/csharp/etch.tests/TestInheritance.cs
    incubator/etch/trunk/tests/src/test/csharp/etch.tests/TestTest1Helper.cs
    incubator/etch/trunk/tests/src/test/java/org/apache/etch/tests/TestTest1Helper.java

Modified: incubator/etch/trunk/binding-csharp/compiler/src/main/java/org/apache/etch/bindings/csharp/compiler/CompilerVersion.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-csharp/compiler/src/main/java/org/apache/etch/bindings/csharp/compiler/CompilerVersion.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-csharp/compiler/src/main/java/org/apache/etch/bindings/csharp/compiler/CompilerVersion.java (original)
+++ incubator/etch/trunk/binding-csharp/compiler/src/main/java/org/apache/etch/bindings/csharp/compiler/CompilerVersion.java Tue Feb 10 16:40:34 2009
@@ -26,5 +26,5 @@
 	// of VERSION below with whatever it wants the version string to actually be.
 	
 	/** The version of this Etch backend (compiler) */
-	public String VERSION = "csharp 1.1.0 (LOCAL-0)";
+	public String VERSION = "csharp 1.1.0-incubating (LOCAL-0)";
 }

Modified: incubator/etch/trunk/binding-csharp/compiler/src/main/resources/org/apache/etch/bindings/csharp/compiler/helper.vm
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-csharp/compiler/src/main/resources/org/apache/etch/bindings/csharp/compiler/helper.vm?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-csharp/compiler/src/main/resources/org/apache/etch/bindings/csharp/compiler/helper.vm (original)
+++ incubator/etch/trunk/binding-csharp/compiler/src/main/resources/org/apache/etch/bindings/csharp/compiler/helper.vm Tue Feb 10 16:40:34 2009
@@ -43,45 +43,53 @@
 		/// <returns> an out-of-band source that may be used to control
 		/// the listener.</returns>
 
-		public static Transport<ServerFactory> NewListener( string uri,		
+		public static ServerFactory NewListener( string uri,		
 			Resources resources, ${i}ServerFactory implFactory )
 		{
-			Resources res = InitResources( resources );
-			return TransportFactory.GetListener( uri, res,
-				new MyServerFactory( uri, res, implFactory ) );
+			Resources res = InitResources(resources);
+			Transport<ServerFactory> listener = TransportFactory.GetListener(uri, res);
+			return new MyServerFactory(listener, uri, implFactory);
 		}
 		
 		public class MyServerFactory : DefaultServerFactory
 		{
-			private readonly string _uri;
-			private readonly Resources _resources;
-			private readonly ${i}ServerFactory _implFactory;
-			
-			public MyServerFactory( string uri, Resources resources, ${i}ServerFactory implFactory )
-				: base(implFactory)
+			public MyServerFactory(Transport<ServerFactory> listener, string uri, ${i}ServerFactory implFactory )
+				: base(listener, implFactory)
 			{
+				_listener = listener;
 				_uri = uri;
-				_resources = resources;
 				_implFactory = implFactory;
 			}
-		
-			public override DeliveryService NewServer(TransportMessage m, ValueFactory vf)
+
+		    private readonly Transport<ServerFactory> _listener;
+
+            private readonly string _uri;
+
+            private readonly ${i}ServerFactory _implFactory;
+
+            public override void NewServer(string uri, Resources resources, TransportMessage m)
 			{
-                URL u = new URL(_uri);
-                MailboxManager r = new PlainMailboxManager(m, u, _resources);
-                DeliveryService d = new DefaultDeliveryService(r, u, _resources);
+                ValueFactory vf = (ValueFactory)resources.Get(TransportConsts.VALUE_FACTORY);
+                URL u = new URL(uri);
+                MailboxManager r = new PlainMailboxManager(m, u, resources);
+                DeliveryService d = new DefaultDeliveryService(r, u, resources);
 				Remote${i}Client client = new Remote${i}Client(d, vf);
 				${i}Server server = _implFactory.New${i}Server(client);
-				Pool qp = (Pool)_resources[QUEUED_POOL];
-				Pool fp = (Pool)_resources[FREE_POOL];
+                Pool qp = (Pool)resources[QUEUED_POOL];
+                Pool fp = (Pool)resources[FREE_POOL];
 				new Stub${i}Server(d, server, qp, fp);
-				return d;
+				client._Start();
 			}
 
             public override ValueFactory NewValueFactory()
             {
                 return new ValueFactory${i}(_uri);
             }
+
+            public override string ToString()
+            {
+                return "${i}Helper.ServerFactory/" + _listener;
+            }
 		}
 		
 		/// <summary>

Modified: incubator/etch/trunk/binding-csharp/compiler/src/main/resources/org/apache/etch/bindings/csharp/compiler/main.vm
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-csharp/compiler/src/main/resources/org/apache/etch/bindings/csharp/compiler/main.vm?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-csharp/compiler/src/main/resources/org/apache/etch/bindings/csharp/compiler/main.vm (original)
+++ incubator/etch/trunk/binding-csharp/compiler/src/main/resources/org/apache/etch/bindings/csharp/compiler/main.vm Tue Feb 10 16:40:34 2009
@@ -66,7 +66,7 @@
 			string uri = "tcp://localhost:4001";
 			
 #if ($helper.isServer($mc))
-			Transport<ServerFactory> listener = ${i}Helper.NewListener( uri, null, new Main${i}Listener());
+			ServerFactory listener = ${i}Helper.NewListener( uri, null, new Main${i}Listener());
 			
 			// Start the Listener
 			listener.TransportControl( TransportConsts.START_AND_WAIT_UP, 4000 );

Modified: incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Support/DefaultServerFactory.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Support/DefaultServerFactory.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Support/DefaultServerFactory.cs (original)
+++ incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Support/DefaultServerFactory.cs Tue Feb 10 16:40:34 2009
@@ -23,26 +23,29 @@
 {
     abstract public class DefaultServerFactory : ServerFactory
     {
-        protected DefaultServerFactory(object implFactory)
+        protected DefaultServerFactory(Transport<ServerFactory> listener, object implFactory)
         {
-            this.implFactory = implFactory;
+            this.listener = listener;
+            if (implFactory is Session)
+                SetSession((Session)implFactory);
+            listener.SetSession(this);
         }
 
-        private readonly object implFactory;
+        private readonly Transport<ServerFactory> listener;
 
         public Object SessionQuery(Object query)
         {
-            if (implFactory is Session)
-                return ((Session)implFactory).SessionQuery(query);
+            if (session != null)
+                return session.SessionQuery(query);
 
             throw new NotSupportedException("unknown query " + query);
         }
 
         public void SessionControl(Object control, Object value)
         {
-            if (implFactory is Session)
+            if (session != null)
             {
-                ((Session)implFactory).SessionControl(control, value);
+                session.SessionControl(control, value);
                 return;
             }
 
@@ -51,15 +54,44 @@
 
         public void SessionNotify(Object evnt)
         {
-            if (implFactory is Session)
-                ((Session)implFactory).SessionNotify(evnt);
-            else if (evnt is Exception)
-                throw new Exception("caught exception", (Exception)evnt);
+            if (session != null)
+                session.SessionNotify(evnt);
+        }
+
+        #region Transport Members
+
+        public Session GetSession()
+        {
+            return session;
+        }
+
+        public void SetSession(Session session)
+        {
+            this.session = session;
         }
 
+        private Session session;
+
+        public object TransportQuery(object query)
+        {
+            return listener.TransportQuery(query);
+        }
+
+        public void TransportControl(object control, object value)
+        {
+            listener.TransportControl(control, value);
+        }
+
+        public void TransportNotify(object eventObj)
+        {
+            listener.TransportNotify(eventObj);
+        }
+
+        #endregion
+
         #region ServerFactory Members
 
-        abstract public DeliveryService NewServer( TransportMessage m, ValueFactory vf);
+        abstract public void NewServer(string uri, Resources resources, TransportMessage transport);
 
         abstract public ValueFactory NewValueFactory();
 

Modified: incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Support/ServerFactory.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Support/ServerFactory.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Support/ServerFactory.cs (original)
+++ incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Support/ServerFactory.cs Tue Feb 10 16:40:34 2009
@@ -24,15 +24,15 @@
     /// Interface to use for constructing new server instances by 
     /// TransportHelper
     /// </summary>
-    public interface ServerFactory : Session
+    public interface ServerFactory : Session, Transport<Session>
     {
         /// <summary>
         /// Constructs a new server session.
         /// </summary>
-        /// <param name="m"> the TransportMessage to be used with the new session</param>
-        /// <param name="vf">the value factory to be used with the new session</param>
-        /// <returns>the constructed DeliveryService</returns>
-        DeliveryService NewServer(TransportMessage m, ValueFactory vf);
+        /// <param name="uri"></param>
+        /// <param name="resources"></param>
+        /// <param name="transport"> the TransportMessage to be used with the new session</param>
+        void NewServer(string uri, Resources resources, TransportMessage transport);
 
         /// <summary>
         /// Constructs a new instance of value factory for this session.

Modified: incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Support/TransportFactory.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Support/TransportFactory.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Support/TransportFactory.cs (original)
+++ incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Support/TransportFactory.cs Tue Feb 10 16:40:34 2009
@@ -48,9 +48,9 @@
         /// <returns>the TransportMessage topping the transport stack.</returns>
         public static TransportMessage GetTransport(string uri, Resources resources) 
 	    {
-		    URL u = new URL( uri );
-		    TransportFactory f = GetTransportFactory( u.Scheme );
-		    return f.NewTransport( uri, resources );
+            URL u = new URL(uri);
+            TransportFactory f = GetTransportFactory(u.Scheme);
+            return f.NewTransport(uri, resources);
 	    }
 
         /// <summary>
@@ -59,9 +59,8 @@
         /// </summary>
         /// <param name="uri">listener configuration parameters.</param>
         /// <param name="resources">additional resources needed by the listener.</param>
-        /// <param name="factory">constructs the actual service class instances.</param>
         /// <returns>an out-of-band source which may be used to control the listener.</returns>
-        protected abstract Transport<ServerFactory> NewListener(string uri, Resources resources, ServerFactory factory);
+        protected abstract Transport<ServerFactory> NewListener(string uri, Resources resources);
 
         /// <summary>
         /// Constructs a new Transport Listener which is used to construct
@@ -69,13 +68,12 @@
         /// </summary>
         /// <param name="uri">listener configuration parameters.</param>
         /// <param name="resources">additional resources needed by the listener.</param>
-        /// <param name="factory">constructs the actual service class instances.</param>
         /// <returns>an out-of-band source which may be used to control the listener.</returns>
-        public static Transport<ServerFactory> GetListener( string uri, Resources resources, ServerFactory factory ) 
+        public static Transport<ServerFactory> GetListener(string uri, Resources resources) 
 	    {
-		    URL u = new URL( uri );
-		    TransportFactory f = GetTransportFactory( u.Scheme );
-		    return f.NewListener( uri, resources, factory );
+            URL u = new URL(uri);
+            TransportFactory f = GetTransportFactory(u.Scheme);
+            return f.NewListener(uri, resources);
 	    }
 
         /// <summary>

Modified: incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Transport/TcpTransportFactory.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Transport/TcpTransportFactory.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Transport/TcpTransportFactory.cs (original)
+++ incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Org.Apache.Etch.Bindings.Csharp/Transport/TcpTransportFactory.cs Tue Feb 10 16:40:34 2009
@@ -71,13 +71,10 @@
             return m;
         }
 
-        protected override Transport<ServerFactory> NewListener( string uri, Resources resources,
-            ServerFactory factory )
+        protected override Transport<ServerFactory> NewListener( string uri, Resources resources )
         {
             Transport<SessionListener<Socket>> l = new TcpListener(uri, resources);
-            MySessionListener b = new MySessionListener(this, l, uri, resources);
-            b.SetSession(factory);
-            return b;
+            return new MySessionListener(this, l, uri, resources);
         }
 
         public class MySessionListener : Transport<ServerFactory>, SessionListener<Socket>
@@ -111,11 +108,9 @@
                 ValueFactory vf = session.NewValueFactory();
                 r.Add(TransportConsts.VALUE_FACTORY, vf);
 
-                TransportMessage m = ttf.NewTransport(uri, r);
+                TransportMessage t = ttf.NewTransport(uri, r);
 
-                DeliveryService d = session.NewServer(m, vf);
-
-                d.TransportControl(TransportConsts.START, null);
+                session.NewServer(uri, r, t);
             }
 
             #region Transport<ServerFactory> Members

Modified: incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Properties/AssemblyInfo.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Properties/AssemblyInfo.cs (original)
+++ incubator/etch/trunk/binding-csharp/runtime/src/main/csharp/Properties/AssemblyInfo.cs Tue Feb 10 16:40:34 2009
@@ -5,11 +5,11 @@
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
 [assembly: AssemblyTitle("Etch")]
-[assembly: AssemblyDescription("Etch C# Binding Runtime DLL")]
+[assembly: AssemblyDescription("Apache Etch Csharp Binding Runtime DLL")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Cisco Systems")]
-[assembly: AssemblyProduct("Etch")]
-[assembly: AssemblyCopyright("Copyright © Cisco Systems 2008")]
+[assembly: AssemblyCompany("Apache Software Foundation")]
+[assembly: AssemblyProduct("Apache Etch (incubating)")]
+[assembly: AssemblyCopyright("Copyright © Apache Software Foundation 2009")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
@@ -31,4 +31,4 @@
 // You can specify all the values or you can default the Revision and Build Numbers 
 // by using the '*' as shown below:
 [assembly: AssemblyVersion("1.1.0")]
-[assembly: AssemblyFileVersion("1.1.0")]
+[assembly: AssemblyFileVersion("1.1.0-incubating")]

Modified: incubator/etch/trunk/binding-java/compiler/src/main/java/org/apache/etch/bindings/java/compiler/CompilerVersion.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-java/compiler/src/main/java/org/apache/etch/bindings/java/compiler/CompilerVersion.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-java/compiler/src/main/java/org/apache/etch/bindings/java/compiler/CompilerVersion.java (original)
+++ incubator/etch/trunk/binding-java/compiler/src/main/java/org/apache/etch/bindings/java/compiler/CompilerVersion.java Tue Feb 10 16:40:34 2009
@@ -26,5 +26,5 @@
 	// of VERSION below with whatever it wants the version string to actually be.
 	
 	/** The version of this Etch backend (compiler) */
-	public String VERSION = "java 1.1.0 (LOCAL-0)";
+	public String VERSION = "java 1.1.0-incubating (LOCAL-0)";
 }

Modified: incubator/etch/trunk/binding-java/compiler/src/main/resources/org/apache/etch/bindings/java/compiler/helper.vm
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-java/compiler/src/main/resources/org/apache/etch/bindings/java/compiler/helper.vm?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-java/compiler/src/main/resources/org/apache/etch/bindings/java/compiler/helper.vm (original)
+++ incubator/etch/trunk/binding-java/compiler/src/main/resources/org/apache/etch/bindings/java/compiler/helper.vm Tue Feb 10 16:40:34 2009
@@ -62,33 +62,42 @@
 	 *
 	 * @throws Exception
 	 */
-	public static Transport<ServerFactory> newListener( final String uri,
+	public static ServerFactory newListener( final String uri,
 		Resources resources, final ${i}ServerFactory implFactory )
 		throws Exception
 	{
 		final Resources res = initResources( resources );
 		final URL u = new URL( uri );
 		
-		return TransportFactory.getListener( uri, res,
-			new DefaultServerFactory( implFactory )
+		final Transport<ServerFactory> listener = TransportFactory.getListener( uri, res );
+		
+		return new DefaultServerFactory( listener, implFactory )
+		{
+			public void newServer( String uri, Resources resources,
+				TransportMessage transport ) throws Exception
+			{
+				ValueFactory vf = (ValueFactory) resources.get( Transport.VALUE_FACTORY );
+				MailboxManager x = new PlainMailboxManager( transport, u, res );
+				DeliveryService d = new DefaultDeliveryService( x, u, res );
+				Remote${i}Client client = new Remote${i}Client( d, vf );
+				${i}Server server = implFactory.new${i}Server( client );
+				Pool qp = (Pool) res.get( QUEUED_POOL );
+				Pool fp = (Pool) res.get( FREE_POOL );
+				new Stub${i}Server( d, server, qp, fp );
+				client._start();
+			}
+
+			public ValueFactory newValueFactory()
+			{
+				return new ValueFactory${i}( uri );
+			}
+			
+			@Override
+			public String toString()
 			{
-				public DeliveryService newServer( TransportMessage m, ValueFactory vf ) throws Exception
-				{
-					MailboxManager x = new PlainMailboxManager( m, u, res );
-					DeliveryService d = new DefaultDeliveryService( x, u, res );
-					Remote${i}Client client = new Remote${i}Client( d, vf );
-					${i}Server server = implFactory.new${i}Server( client );
-					Pool qp = (Pool) res.get( QUEUED_POOL );
-					Pool fp = (Pool) res.get( FREE_POOL );
-					new Stub${i}Server( d, server, qp, fp );
-					return d;
-				}
-	
-				public ValueFactory newValueFactory()
-				{
-					return new ValueFactory${i}( uri );
-				}
-			} );
+				return "${i}Helper.ServerFactory/" + listener;
+			}
+		};
 	}
 
 	/**

Modified: incubator/etch/trunk/binding-java/compiler/src/main/resources/org/apache/etch/bindings/java/compiler/main.vm
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-java/compiler/src/main/resources/org/apache/etch/bindings/java/compiler/main.vm?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-java/compiler/src/main/resources/org/apache/etch/bindings/java/compiler/main.vm (original)
+++ incubator/etch/trunk/binding-java/compiler/src/main/resources/org/apache/etch/bindings/java/compiler/main.vm Tue Feb 10 16:40:34 2009
@@ -52,7 +52,7 @@
 		// TODO Change to correct URI
 		String uri = "tcp://0.0.0.0:4001";
 		
-		Transport<ServerFactory> listener = ${i}Helper.newListener( uri, null,
+		ServerFactory listener = ${i}Helper.newListener( uri, null,
 			new Main${i}Listener() );
 
 		// Start the Listener

Modified: incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/support/DefaultServerFactory.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/support/DefaultServerFactory.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/support/DefaultServerFactory.java (original)
+++ incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/support/DefaultServerFactory.java Tue Feb 10 16:40:34 2009
@@ -18,6 +18,7 @@
 package org.apache.etch.bindings.java.support;
 
 import org.apache.etch.util.core.io.Session;
+import org.apache.etch.util.core.io.Transport;
 
 /**
  * Default implementation of ServerFactory. Used by Etch generated Helper files
@@ -28,28 +29,35 @@
 {
 	/**
 	 * Constructs the DefaultServerFactory.
+	 * @param listener 
 	 * @param implFactory
 	 */
-	public DefaultServerFactory( Object implFactory )
+	public DefaultServerFactory( Transport<ServerFactory> listener,
+		Object implFactory )
 	{
-		this.implFactory = implFactory;
+		this.listener = listener;
+		
+		if (implFactory instanceof Session)
+			setSession( (Session) implFactory );
+		
+		listener.setSession( this );
 	}
-
-	private final Object implFactory;
+	
+	private final Transport<ServerFactory> listener;
 
 	public Object sessionQuery( Object query ) throws Exception
 	{
-		if (implFactory instanceof Session)
-			return ((Session) implFactory).sessionQuery( query );
+		if (session != null)
+			return session.sessionQuery( query );
 
 		throw new UnsupportedOperationException( "unknown query " + query );
 	}
 
 	public void sessionControl( Object control, Object value ) throws Exception
 	{
-		if (implFactory instanceof Session)
+		if (session != null)
 		{
-			((Session) implFactory).sessionControl( control, value );
+			session.sessionControl( control, value );
 			return;
 		}
 
@@ -58,9 +66,35 @@
 
 	public void sessionNotify( Object event ) throws Exception
 	{
-		if (implFactory instanceof Session)
-			((Session) implFactory).sessionNotify( event );
-		else if (event instanceof Exception)
-			throw (Exception) event;
+		if (session != null)
+			session.sessionNotify( event );
+	}
+
+	public Session getSession()
+	{
+		return session;
+	}
+
+	public void setSession( Session session )
+	{
+		this.session = session;
+	}
+	
+	private Session session;
+
+	public void transportControl( Object control, Object value )
+		throws Exception
+	{
+		listener.transportControl( control, value );
+	}
+
+	public void transportNotify( Object event ) throws Exception
+	{
+		listener.transportNotify( event );
+	}
+
+	public Object transportQuery( Object query ) throws Exception
+	{
+		return listener.transportQuery( query );
 	}
 }

Modified: incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/support/ServerFactory.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/support/ServerFactory.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/support/ServerFactory.java (original)
+++ incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/support/ServerFactory.java Tue Feb 10 16:40:34 2009
@@ -19,22 +19,25 @@
 
 import org.apache.etch.bindings.java.msg.ValueFactory;
 import org.apache.etch.bindings.java.transport.TransportMessage;
+import org.apache.etch.util.Resources;
 import org.apache.etch.util.core.io.Session;
+import org.apache.etch.util.core.io.Transport;
 
 
 /**
  * Interface to use for constructing new server instances by
  * TransportHelper.
  */
-public interface ServerFactory extends Session
+public interface ServerFactory extends Session, Transport<Session>
 {
 	/**
-	 * @param m the TransportMessage to use with the new server.
-	 * @param vf the value factory to use with the new server.
-	 * @return the constructed DeliveryService
+	 * @param uri 
+	 * @param resources 
+	 * @param transport the TransportMessage to use with the new server.
 	 * @throws Exception
 	 */
-	public DeliveryService newServer( TransportMessage m, ValueFactory vf ) throws Exception;
+	public void newServer( String uri, Resources resources,
+		TransportMessage transport ) throws Exception;
 	
 	/**
 	 * @return a new instance of value factory for this connection.

Modified: incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/support/TransportFactory.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/support/TransportFactory.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/support/TransportFactory.java (original)
+++ incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/support/TransportFactory.java Tue Feb 10 16:40:34 2009
@@ -72,28 +72,26 @@
 	 * server sessions.
 	 * @param uri listener configuration parameters.
 	 * @param resources additional resources needed by the listener.
-	 * @param factory constructs the actual service class instances.
 	 * @return an out-of-band source which may be used to control the listener.
 	 * @throws Exception
 	 */
 	abstract protected Transport<ServerFactory> newListener( String uri,
-		Resources resources, ServerFactory factory ) throws Exception;
+		Resources resources ) throws Exception;
 
 	/**
 	 * Constructs a new Transport Listener which is used to construct
 	 * server sessions.
 	 * @param uri listener configuration parameters.
 	 * @param resources additional resources needed by the listener.
-	 * @param factory constructs the actual service class instances.
 	 * @return an out-of-band source which may be used to control the listener.
 	 * @throws Exception
 	 */
 	static public Transport<ServerFactory> getListener( String uri,
-		Resources resources, ServerFactory factory ) throws Exception
+		Resources resources ) throws Exception
 	{
 		URL u = new URL( uri );
 		TransportFactory f = getTransportFactory( u.getScheme() );
-		return f.newListener( uri, resources, factory );
+		return f.newListener( uri, resources );
 	}
 
 	/**

Modified: incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/transport/Tcp2TransportFactory.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/transport/Tcp2TransportFactory.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/transport/Tcp2TransportFactory.java (original)
+++ incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/transport/Tcp2TransportFactory.java Tue Feb 10 16:40:34 2009
@@ -20,7 +20,6 @@
 import java.nio.channels.SocketChannel;
 
 import org.apache.etch.bindings.java.msg.ValueFactory;
-import org.apache.etch.bindings.java.support.DeliveryService;
 import org.apache.etch.bindings.java.support.ServerFactory;
 import org.apache.etch.bindings.java.support.TransportFactory;
 import org.apache.etch.util.Resources;
@@ -87,17 +86,14 @@
 
 	@Override
 	public Transport<ServerFactory> newListener( final String uri,
-		final Resources resources, final ServerFactory factory )
-		throws Exception
+		final Resources resources ) throws Exception
 	{
 		URL u = new URL( uri );
 		
 		Transport<SessionListener<SocketChannel>> l = new Tcp2Listener( u,
 			resources );
 		
-		MySessionListener b = new MySessionListener( l, uri, resources );
-		b.setSession( factory );
-		return b;
+		return new MySessionListener( l, uri, resources );
 	}
 	
 	private class MySessionListener implements Transport<ServerFactory>,
@@ -168,11 +164,9 @@
 			ValueFactory vf = session.newValueFactory();
 			r.put( Transport.VALUE_FACTORY, vf );
 			
-			TransportMessage m = newTransport( uri, r );
-			
-			DeliveryService d = session.newServer( m, vf );
+			TransportMessage transport = newTransport( uri, r );
 			
-			d.transportControl( Transport.START, null );
+			session.newServer( uri, r, transport );
 		}
 
 		public Object sessionQuery( Object query ) throws Exception

Modified: incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/transport/TcpTransportFactory.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/transport/TcpTransportFactory.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/transport/TcpTransportFactory.java (original)
+++ incubator/etch/trunk/binding-java/runtime/src/main/java/org/apache/etch/bindings/java/transport/TcpTransportFactory.java Tue Feb 10 16:40:34 2009
@@ -22,7 +22,6 @@
 import javax.net.ssl.SSLSocket;
 
 import org.apache.etch.bindings.java.msg.ValueFactory;
-import org.apache.etch.bindings.java.support.DeliveryService;
 import org.apache.etch.bindings.java.support.ServerFactory;
 import org.apache.etch.bindings.java.support.TransportFactory;
 import org.apache.etch.util.Resources;
@@ -94,8 +93,7 @@
 
 	@Override
 	public Transport<ServerFactory> newListener( final String uri,
-		final Resources resources, final ServerFactory factory )
-		throws Exception
+		final Resources resources ) throws Exception
 	{
 		URL u = new URL( uri );
 		
@@ -106,9 +104,7 @@
 		else
 			l = new TcpListener( u, resources );
 		
-		MySessionListener b = new MySessionListener( l, uri, resources );
-		b.setSession( factory );
-		return b;
+		return new MySessionListener( l, uri, resources );
 	}
 	
 	private class MySessionListener implements Transport<ServerFactory>, SessionListener<Socket>
@@ -167,7 +163,8 @@
 			transport.transportNotify( event );
 		}
 
-		public void sessionAccepted( Socket socket ) throws Exception
+		public void sessionAccepted( Socket socket )
+			throws Exception
 		{
 			Resources r = new Resources( resources );
 			r.put( SOCKET, socket );
@@ -175,11 +172,9 @@
 			ValueFactory vf = session.newValueFactory();
 			r.put( Transport.VALUE_FACTORY, vf );
 			
-			TransportMessage m = newTransport( uri, r );
-			
-			DeliveryService d = session.newServer( m, vf );
+			TransportMessage t = newTransport( uri, r );
 			
-			d.transportControl( Transport.START, null );
+			session.newServer( uri, r, t );
 		}
 
 		public Object sessionQuery( Object query ) throws Exception

Modified: incubator/etch/trunk/binding-xml/compiler/src/main/java/org/apache/etch/bindings/xml/compiler/CompilerVersion.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-xml/compiler/src/main/java/org/apache/etch/bindings/xml/compiler/CompilerVersion.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/binding-xml/compiler/src/main/java/org/apache/etch/bindings/xml/compiler/CompilerVersion.java (original)
+++ incubator/etch/trunk/binding-xml/compiler/src/main/java/org/apache/etch/bindings/xml/compiler/CompilerVersion.java Tue Feb 10 16:40:34 2009
@@ -26,5 +26,5 @@
 	// of VERSION below with whatever it wants the version string to actually be.
 	
 	/** The version of this Etch backend (compiler) */
-	public String VERSION = "xml 1.1.0 (LOCAL-0)";
+	public String VERSION = "xml 1.1.0-incubating (LOCAL-0)";
 }

Modified: incubator/etch/trunk/compiler/src/main/java/org/apache/etch/compiler/Version.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/compiler/src/main/java/org/apache/etch/compiler/Version.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/compiler/src/main/java/org/apache/etch/compiler/Version.java (original)
+++ incubator/etch/trunk/compiler/src/main/java/org/apache/etch/compiler/Version.java Tue Feb 10 16:40:34 2009
@@ -23,5 +23,5 @@
 public interface Version
 {
 	/** The version of the Etch frontend (parser) */
-	public String VERSION = "Etch 1.1.0 (LOCAL-0)";
+	public String VERSION = "Apache Etch 1.1.0-incubating (LOCAL-0)";
 }

Modified: incubator/etch/trunk/examples/chat/src/main/csharp/etch.examples.chat/MainChatListener.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/chat/src/main/csharp/etch.examples.chat/MainChatListener.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/chat/src/main/csharp/etch.examples.chat/MainChatListener.cs (original)
+++ incubator/etch/trunk/examples/chat/src/main/csharp/etch.examples.chat/MainChatListener.cs Tue Feb 10 16:40:34 2009
@@ -34,7 +34,7 @@
         public static void Main(String[] args)
         {
             string uri = "tcp://127.0.0.1:4005";
-            Transport<ServerFactory> listener = ChatHelper.NewListener(uri, null, new MainChatListener());
+            ServerFactory listener = ChatHelper.NewListener(uri, null, new MainChatListener());
             listener.TransportControl(TransportConsts.START_AND_WAIT_UP, 4000);
         }
 

Modified: incubator/etch/trunk/examples/chat/src/main/java/org/apache/etch/examples/chat/MainChatListener.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/chat/src/main/java/org/apache/etch/examples/chat/MainChatListener.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/chat/src/main/java/org/apache/etch/examples/chat/MainChatListener.java (original)
+++ incubator/etch/trunk/examples/chat/src/main/java/org/apache/etch/examples/chat/MainChatListener.java Tue Feb 10 16:40:34 2009
@@ -58,7 +58,7 @@
 		
 		MainChatListener implFactory = new MainChatListener();
 		
-		Transport<ServerFactory> listener = ChatHelper.newListener( uri, null,
+		ServerFactory listener = ChatHelper.newListener( uri, null,
 			implFactory );
 
 		listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );

Modified: incubator/etch/trunk/examples/chat/src/test/csharp/etch.examples.chat/TestRemoteChatServer.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/chat/src/test/csharp/etch.examples.chat/TestRemoteChatServer.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/chat/src/test/csharp/etch.examples.chat/TestRemoteChatServer.cs (original)
+++ incubator/etch/trunk/examples/chat/src/test/csharp/etch.examples.chat/TestRemoteChatServer.cs Tue Feb 10 16:40:34 2009
@@ -29,7 +29,7 @@
        
         private static RemoteChatServer fred_server;
 
-        private static Transport<ServerFactory> listener;
+        private static ServerFactory listener;
 
         [TestFixtureSetUp]
         public  void SetupListener()

Modified: incubator/etch/trunk/examples/chat/src/test/java/org/apache/etch/examples/chat/TestRemoteChatServer.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/chat/src/test/java/org/apache/etch/examples/chat/TestRemoteChatServer.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/chat/src/test/java/org/apache/etch/examples/chat/TestRemoteChatServer.java (original)
+++ incubator/etch/trunk/examples/chat/src/test/java/org/apache/etch/examples/chat/TestRemoteChatServer.java Tue Feb 10 16:40:34 2009
@@ -73,7 +73,7 @@
 		}
 	}
 	
-	private static Transport<ServerFactory> listener;
+	private static ServerFactory listener;
 	
 	/**
 	 * testLogin1: Login user

Modified: incubator/etch/trunk/examples/distmap/src/main/csharp/etch.examples.distmap/MainDistributedHashTableListener.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/distmap/src/main/csharp/etch.examples.distmap/MainDistributedHashTableListener.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/distmap/src/main/csharp/etch.examples.distmap/MainDistributedHashTableListener.cs (original)
+++ incubator/etch/trunk/examples/distmap/src/main/csharp/etch.examples.distmap/MainDistributedHashTableListener.cs Tue Feb 10 16:40:34 2009
@@ -31,8 +31,8 @@
 		{
 			// TODO: Change to correct URI
 			string uri = "tcp://localhost:4007";
-			
-			Transport<ServerFactory> listener = DistributedHashTableHelper.NewListener( uri, null, new MainDistributedHashTableListener());
+
+            ServerFactory listener = DistributedHashTableHelper.NewListener(uri, null, new MainDistributedHashTableListener());
 			
 			// Start the Listener
 			listener.TransportControl( TransportConsts.START_AND_WAIT_UP, 4000 );

Modified: incubator/etch/trunk/examples/distmap/src/main/java/org/apache/etch/examples/distmap/MainDistributedHashTableListener.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/distmap/src/main/java/org/apache/etch/examples/distmap/MainDistributedHashTableListener.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/distmap/src/main/java/org/apache/etch/examples/distmap/MainDistributedHashTableListener.java (original)
+++ incubator/etch/trunk/examples/distmap/src/main/java/org/apache/etch/examples/distmap/MainDistributedHashTableListener.java Tue Feb 10 16:40:34 2009
@@ -42,7 +42,7 @@
 	{
 		String uri = "tcp://0.0.0.0:4007";
 		
-		Transport<ServerFactory> listener = DistributedHashTableHelper.newListener( uri, null,
+		ServerFactory listener = DistributedHashTableHelper.newListener( uri, null,
 			new MainDistributedHashTableListener() );
 
 		listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );

Modified: incubator/etch/trunk/examples/distmap/src/test/csharp/etch.examples.distmap/TestDistributedHashTable.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/distmap/src/test/csharp/etch.examples.distmap/TestDistributedHashTable.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/distmap/src/test/csharp/etch.examples.distmap/TestDistributedHashTable.cs (original)
+++ incubator/etch/trunk/examples/distmap/src/test/csharp/etch.examples.distmap/TestDistributedHashTable.cs Tue Feb 10 16:40:34 2009
@@ -31,7 +31,7 @@
     {
         private static RemoteDistributedHashTableServer server;
 
-        private static Transport<ServerFactory> listener;
+        private static ServerFactory listener;
 
         public const bool myBool1 = true;
         public const sbyte myByte1 = 127;

Modified: incubator/etch/trunk/examples/distmap/src/test/java/org/apache/etch/examples/distmap/TestRemoteDistributedHashTableServer.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/distmap/src/test/java/org/apache/etch/examples/distmap/TestRemoteDistributedHashTableServer.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/distmap/src/test/java/org/apache/etch/examples/distmap/TestRemoteDistributedHashTableServer.java (original)
+++ incubator/etch/trunk/examples/distmap/src/test/java/org/apache/etch/examples/distmap/TestRemoteDistributedHashTableServer.java Tue Feb 10 16:40:34 2009
@@ -55,7 +55,7 @@
 		Collections.synchronizedMap( new HashMap<String, Object>() );
 	
 	/** transport */
-	public static Transport<ServerFactory> listener;
+	public static ServerFactory listener;
 
 	/**
 	 * Connect to service

Modified: incubator/etch/trunk/examples/example/src/main/csharp/etch.examples.example/MainExampleListener.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/example/src/main/csharp/etch.examples.example/MainExampleListener.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/example/src/main/csharp/etch.examples.example/MainExampleListener.cs (original)
+++ incubator/etch/trunk/examples/example/src/main/csharp/etch.examples.example/MainExampleListener.cs Tue Feb 10 16:40:34 2009
@@ -31,7 +31,7 @@
 			// TODO: Change to correct URI
 			string uri = "tcp://localhost:4002";
 			
-			Transport<ServerFactory> listener = ExampleHelper.NewListener( uri, null, new MainExampleListener());
+            ServerFactory listener = ExampleHelper.NewListener(uri, null, new MainExampleListener());
 			
 			// Start the Listener
 			listener.TransportControl( TransportConsts.START_AND_WAIT_UP, 4000 );

Modified: incubator/etch/trunk/examples/example/src/main/java/org/apache/etch/examples/example/MainExampleListener.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/example/src/main/java/org/apache/etch/examples/example/MainExampleListener.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/example/src/main/java/org/apache/etch/examples/example/MainExampleListener.java (original)
+++ incubator/etch/trunk/examples/example/src/main/java/org/apache/etch/examples/example/MainExampleListener.java Tue Feb 10 16:40:34 2009
@@ -39,7 +39,7 @@
 		// TODO Change to correct URI
 		String uri = "tcp://0.0.0.0:4002";
 		
-		Transport<ServerFactory> listener = ExampleHelper.newListener( uri, null,
+		ServerFactory listener = ExampleHelper.newListener( uri, null,
 			new MainExampleListener() );
 
 		// Start the Listener

Modified: incubator/etch/trunk/examples/example/src/test/csharp/etch.examples.example/TestExampleServer.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/example/src/test/csharp/etch.examples.example/TestExampleServer.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/example/src/test/csharp/etch.examples.example/TestExampleServer.cs (original)
+++ incubator/etch/trunk/examples/example/src/test/csharp/etch.examples.example/TestExampleServer.cs Tue Feb 10 16:40:34 2009
@@ -31,7 +31,7 @@
     {
         private static RemoteExampleServer server;
 
-        private static Transport<ServerFactory> listener;
+        private static ServerFactory listener;
 
         [TestFixtureSetUp]
         public void StartListener()

Modified: incubator/etch/trunk/examples/example/src/test/java/org/apache/etch/examples/example/TestExampleServer.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/example/src/test/java/org/apache/etch/examples/example/TestExampleServer.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/example/src/test/java/org/apache/etch/examples/example/TestExampleServer.java (original)
+++ incubator/etch/trunk/examples/example/src/test/java/org/apache/etch/examples/example/TestExampleServer.java Tue Feb 10 16:40:34 2009
@@ -37,7 +37,7 @@
 {
 	
 	/** transport */
-	public static Transport<ServerFactory> listener;
+	public static ServerFactory listener;
 	
 	RemoteExampleServer server;
 

Modified: incubator/etch/trunk/examples/perf/src/main/csharp/etch.examples.perf/MainPerfClient.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/perf/src/main/csharp/etch.examples.perf/MainPerfClient.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/perf/src/main/csharp/etch.examples.perf/MainPerfClient.cs (original)
+++ incubator/etch/trunk/examples/perf/src/main/csharp/etch.examples.perf/MainPerfClient.cs Tue Feb 10 16:40:34 2009
@@ -33,7 +33,7 @@
             bool startListener = false;
             const int maxWaitTime = 4000;
 
-            Transport<ServerFactory> listener;
+            ServerFactory listener;
 
             if (startListener)
             {

Modified: incubator/etch/trunk/examples/perf/src/main/csharp/etch.examples.perf/MainPerfListener.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/perf/src/main/csharp/etch.examples.perf/MainPerfListener.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/perf/src/main/csharp/etch.examples.perf/MainPerfListener.cs (original)
+++ incubator/etch/trunk/examples/perf/src/main/csharp/etch.examples.perf/MainPerfListener.cs Tue Feb 10 16:40:34 2009
@@ -30,7 +30,7 @@
 		{
             const string uri = "tcp://localhost:4004";
 			
-			Transport<ServerFactory> listener = PerfHelper.NewListener( uri, null,
+            ServerFactory listener = PerfHelper.NewListener(uri, null,
                 new MainPerfListener());
 			
 			// Start the Listener

Modified: incubator/etch/trunk/examples/perf/src/main/java/org/apache/etch/examples/perf/MainPerfClient.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/perf/src/main/java/org/apache/etch/examples/perf/MainPerfClient.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/perf/src/main/java/org/apache/etch/examples/perf/MainPerfClient.java (original)
+++ incubator/etch/trunk/examples/perf/src/main/java/org/apache/etch/examples/perf/MainPerfClient.java Tue Feb 10 16:40:34 2009
@@ -77,7 +77,7 @@
 
 		implFactory = new MainPerfClient();
 
-		final Transport<ServerFactory> listener;
+		final ServerFactory listener;
 
 		if (startListener)
 		{

Modified: incubator/etch/trunk/examples/perf/src/main/java/org/apache/etch/examples/perf/MainPerfListener.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/perf/src/main/java/org/apache/etch/examples/perf/MainPerfListener.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/perf/src/main/java/org/apache/etch/examples/perf/MainPerfListener.java (original)
+++ incubator/etch/trunk/examples/perf/src/main/java/org/apache/etch/examples/perf/MainPerfListener.java Tue Feb 10 16:40:34 2009
@@ -21,8 +21,6 @@
 import org.apache.etch.util.Log;
 import org.apache.etch.util.core.io.Transport;
 
-
-
 /**
  * Main program for PerfServer. This program makes a listener to accept
  * connections from MainPerfClient.
@@ -42,7 +40,7 @@
 		
 		final String uri = "tcp://localhost:4004";
 		
-		Transport<ServerFactory> listener = PerfHelper.newListener( uri, null,
+		ServerFactory listener = PerfHelper.newListener( uri, null,
 			new MainPerfListener() );
 
 		listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );

Modified: incubator/etch/trunk/examples/perf/src/test/csharp/etch.examples.perf/TestPerfServer.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/perf/src/test/csharp/etch.examples.perf/TestPerfServer.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/perf/src/test/csharp/etch.examples.perf/TestPerfServer.cs (original)
+++ incubator/etch/trunk/examples/perf/src/test/csharp/etch.examples.perf/TestPerfServer.cs Tue Feb 10 16:40:34 2009
@@ -32,7 +32,7 @@
     {
         private static RemotePerfServer server;
 
-        private static Transport<ServerFactory> listener;
+        private static ServerFactory listener;
 
         [TestFixtureSetUp]
         public void StartListener()

Modified: incubator/etch/trunk/examples/perf/src/test/java/org/apache/etch/examples/perf/TestPerfServer.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/perf/src/test/java/org/apache/etch/examples/perf/TestPerfServer.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/examples/perf/src/test/java/org/apache/etch/examples/perf/TestPerfServer.java (original)
+++ incubator/etch/trunk/examples/perf/src/test/java/org/apache/etch/examples/perf/TestPerfServer.java Tue Feb 10 16:40:34 2009
@@ -37,7 +37,7 @@
 {
 
 	/** transport */
-	public static Transport<ServerFactory> listener;
+	public static ServerFactory listener;
 	
 	RemotePerfServer server;
 

Modified: incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainAsyncListener.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainAsyncListener.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainAsyncListener.cs (original)
+++ incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainAsyncListener.cs Tue Feb 10 16:40:34 2009
@@ -38,7 +38,7 @@
 			uri = args[0];
 
 		MainAsyncListener implFactory = new MainAsyncListener();
-        Transport<ServerFactory> listener = AsyncHelper.NewListener(uri, null, implFactory);
+        ServerFactory listener = AsyncHelper.NewListener(uri, null, implFactory);
 
 		listener.TransportControl( TransportConsts.START_AND_WAIT_UP, 4000 );
 	}

Modified: incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainClosingListener.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainClosingListener.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainClosingListener.cs (original)
+++ incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainClosingListener.cs Tue Feb 10 16:40:34 2009
@@ -39,7 +39,7 @@
 			uri = args[0]; */
 
 		MainClosingListener implFactory = new MainClosingListener();
-        Transport<ServerFactory> listener = ClosingHelper.NewListener(uri, null, implFactory);
+        ServerFactory listener = ClosingHelper.NewListener(uri, null, implFactory);
 
 		listener.TransportControl( TransportConsts.START_AND_WAIT_UP, 4000 );
 

Modified: incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainCuaeListener.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainCuaeListener.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainCuaeListener.cs (original)
+++ incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainCuaeListener.cs Tue Feb 10 16:40:34 2009
@@ -38,7 +38,7 @@
 			uri = args[0]; */
 
 		MainCuaeListener implFactory = new MainCuaeListener();
-        Transport<ServerFactory> listener = MyCuaeHelper.NewListener(uri, null, implFactory);
+        ServerFactory listener = MyCuaeHelper.NewListener(uri, null, implFactory);
 
 		listener.TransportControl( TransportConsts.START_AND_WAIT_UP, 4000 );
 	}

Modified: incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainFooListener.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainFooListener.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainFooListener.cs (original)
+++ incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainFooListener.cs Tue Feb 10 16:40:34 2009
@@ -37,7 +37,7 @@
 	
 
 		MainFooListener implFactory = new MainFooListener();
-        Transport<ServerFactory> listener = FooHelper.NewListener(uri, null, implFactory);
+        ServerFactory listener = FooHelper.NewListener(uri, null, implFactory);
 
 		listener.TransportControl( TransportConsts.START_AND_WAIT_UP, 4000 );
 	}

Modified: incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainInheritanceListener.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainInheritanceListener.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainInheritanceListener.cs (original)
+++ incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainInheritanceListener.cs Tue Feb 10 16:40:34 2009
@@ -38,7 +38,7 @@
 			uri = args[0];
 
 		MainInheritanceListener implFactory = new MainInheritanceListener();
-        Transport<ServerFactory> listener = InheritanceHelper.NewListener(uri, null, implFactory);
+        ServerFactory listener = InheritanceHelper.NewListener(uri, null, implFactory);
 
 		listener.TransportControl( TransportConsts.START_AND_WAIT_UP, 4000 );
 	}

Modified: incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainTypesListener.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainTypesListener.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainTypesListener.cs (original)
+++ incubator/etch/trunk/tests/src/main/csharp/etch.tests/MainTypesListener.cs Tue Feb 10 16:40:34 2009
@@ -37,7 +37,7 @@
 		
 
 		MainTypesListener implFactory = new MainTypesListener();
-        Transport<ServerFactory> listener = TypesHelper.NewListener(uri, null, implFactory);
+        ServerFactory listener = TypesHelper.NewListener(uri, null, implFactory);
 
 		listener.TransportControl( TransportConsts.START_AND_WAIT_UP, 4000 );
 	}

Modified: incubator/etch/trunk/tests/src/main/csharp/etch.tests/MyCuaeHelper.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/main/csharp/etch.tests/MyCuaeHelper.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/main/csharp/etch.tests/MyCuaeHelper.cs (original)
+++ incubator/etch/trunk/tests/src/main/csharp/etch.tests/MyCuaeHelper.cs Tue Feb 10 16:40:34 2009
@@ -24,36 +24,37 @@
 {
     abstract public class MyCuaeHelper : CuaeHelper
     {
-        public static Transport<ServerFactory> NewListener(string uri,
+        public static ServerFactory NewListener(string uri,
             Resources resources, MyCuaeServerFactory implFactory)
         {
             Resources res = InitResources(resources);
-            return TransportFactory.GetListener(uri, res, new MyServerFactory(uri, res, implFactory));
+            Transport<ServerFactory> listener = TransportFactory.GetListener(uri, res);
+            return new MyServerFactory(listener, uri, implFactory);
         }
 
         public new class MyServerFactory : DefaultServerFactory
         {
-            private string _uri;
-            private Resources _resources;
-            private MyCuaeServerFactory _implFactory;
-
-            public MyServerFactory(string uri, Resources resources, MyCuaeServerFactory implFactory)
-                : base(implFactory)
+            public MyServerFactory(Transport<ServerFactory> listener, string uri, MyCuaeServerFactory implFactory)
+                : base(listener, implFactory)
             {
                 _uri = uri;
-                _resources = resources;
                 _implFactory = implFactory;
             }
 
-            public override DeliveryService NewServer(TransportMessage m, ValueFactory vf)
+            private readonly string _uri;
+
+            private readonly MyCuaeServerFactory _implFactory;
+
+            public override void NewServer(string uri, Resources resources, TransportMessage m)
             {
-                URL u = new URL(_uri);
-                MailboxManager x = new PlainMailboxManager(m, u, _resources);
-                DeliveryService d = new DefaultDeliveryService(x, u, _resources);
-                Pool qp = (Pool)_resources[QUEUED_POOL];
-                Pool fp = (Pool)_resources[FREE_POOL];
+                ValueFactory vf = (ValueFactory)resources.Get(TransportConsts.VALUE_FACTORY);
+                URL u = new URL(uri);
+                MailboxManager x = new PlainMailboxManager(m, u, resources);
+                DeliveryService d = new DefaultDeliveryService(x, u, resources);
+                Pool qp = (Pool)resources[QUEUED_POOL];
+                Pool fp = (Pool)resources[FREE_POOL];
                 _implFactory.NewMyCuaeServer(d, qp, fp, (MyValueFactoryCuae)vf);
-                return d;
+                d.TransportControl(TransportConsts.START, null);
             }
 
             public override ValueFactory NewValueFactory()

Modified: incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainAsyncListener.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainAsyncListener.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainAsyncListener.java (original)
+++ incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainAsyncListener.java Tue Feb 10 16:40:34 2009
@@ -42,7 +42,7 @@
 		
 		String uri = "tcp://0.0.0.0:4003";
 
-		Transport<ServerFactory> listener = AsyncHelper.newListener( uri, null,
+		ServerFactory listener = AsyncHelper.newListener( uri, null,
 			new MainAsyncListener() );
 
 		listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );

Modified: incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainClosingListener.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainClosingListener.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainClosingListener.java (original)
+++ incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainClosingListener.java Tue Feb 10 16:40:34 2009
@@ -41,7 +41,7 @@
 	{
 		String uri = "tcp://0.0.0.0:4006";
 		
-		Transport<ServerFactory> listener = ClosingHelper.newListener( uri, null, new MainClosingListener() );
+		ServerFactory listener = ClosingHelper.newListener( uri, null, new MainClosingListener() );
 
 		listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );
 		

Modified: incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainCuaeListener.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainCuaeListener.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainCuaeListener.java (original)
+++ incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainCuaeListener.java Tue Feb 10 16:40:34 2009
@@ -40,7 +40,7 @@
 	{
 		String uri = "tcp://0.0.0.0:4006";
 
-		Transport<ServerFactory> listener = MyCuaeHelper.newListener( uri, null, new MainCuaeListener() );
+		ServerFactory listener = MyCuaeHelper.newListener( uri, null, new MainCuaeListener() );
 
 		listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );
 	}

Modified: incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainFooListener.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainFooListener.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainFooListener.java (original)
+++ incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainFooListener.java Tue Feb 10 16:40:34 2009
@@ -37,7 +37,7 @@
 	{
 		String uri = "tcp://0.0.0.0:4001";
 
-		Transport<ServerFactory> listener = FooHelper.newListener( uri, null, new MainFooListener() );
+		ServerFactory listener = FooHelper.newListener( uri, null, new MainFooListener() );
 
 		listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );
 	}

Modified: incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainInheritanceListener.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainInheritanceListener.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainInheritanceListener.java (original)
+++ incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainInheritanceListener.java Tue Feb 10 16:40:34 2009
@@ -42,7 +42,7 @@
 	{
 		String uri = args.length > 0 ? args[0] : "tcp://0.0.0.0:4001";
 		
-		Transport<ServerFactory> listener = InheritanceHelper.newListener( uri, null,
+		ServerFactory listener = InheritanceHelper.newListener( uri, null,
 			new MainInheritanceListener() );
 
 		listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );

Modified: incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainTypesListener.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainTypesListener.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainTypesListener.java (original)
+++ incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MainTypesListener.java Tue Feb 10 16:40:34 2009
@@ -38,7 +38,7 @@
 	{
 		String uri = "tcp://0.0.0.0:4001";
 		
-		Transport<ServerFactory> listener = TypesHelper.newListener( uri, null,
+		ServerFactory listener = TypesHelper.newListener( uri, null,
 			new MainTypesListener() );
 
 		listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );

Modified: incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MyCuaeHelper.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MyCuaeHelper.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MyCuaeHelper.java (original)
+++ incubator/etch/trunk/tests/src/main/java/org/apache/etch/tests/MyCuaeHelper.java Tue Feb 10 16:40:34 2009
@@ -58,31 +58,33 @@
 	 *
 	 * @throws Exception
 	 */
-	public static Transport<ServerFactory> newListener( final String uri, Resources resources,
+	public static ServerFactory newListener( final String uri, Resources resources,
 		final MyCuaeServerFactory implFactory ) throws Exception
 	{
 		final Resources res = initResources( resources );
-		if (!res.containsKey( Transport.VALUE_FACTORY ))
-			res.put( Transport.VALUE_FACTORY, new MyValueFactoryCuae( "tcp:" ) );
-		final URL u = new URL( uri );
 
-		return TransportFactory.getListener( uri, res, new DefaultServerFactory( implFactory )
+		Transport<ServerFactory> listener =  TransportFactory.getListener( uri, res );
+		
+		return new DefaultServerFactory( listener, implFactory )
 		{
-			public DeliveryService newServer( TransportMessage m, ValueFactory vf ) throws Exception
+			public void newServer( String uri, Resources resources,
+				TransportMessage transport ) throws Exception
 			{
-				MailboxManager x = new PlainMailboxManager( m, u, res );
-				DeliveryService d = new DefaultDeliveryService( x, u, res );
-				Pool qp = (Pool) res.get( QUEUED_POOL );
-				Pool fp = (Pool) res.get( FREE_POOL );
+				ValueFactory vf = (ValueFactory) resources.get( Transport.VALUE_FACTORY );
+				URL u = new URL( uri );
+				MailboxManager x = new PlainMailboxManager( transport, u, resources );
+				DeliveryService d = new DefaultDeliveryService( x, u, resources );
+				Pool qp = (Pool) resources.get( QUEUED_POOL );
+				Pool fp = (Pool) resources.get( FREE_POOL );
 				implFactory.newMyCuaeServer( d, qp, fp, (MyValueFactoryCuae) vf );
-				return d;
+				d.transportControl( START, null );
 			}
 
 			public ValueFactory newValueFactory()
 			{
 				return new MyValueFactoryCuae( uri );
 			}
-		} );
+		};
 	}
 
 	/**

Modified: incubator/etch/trunk/tests/src/test/csharp/etch.tests/TestAsyncClient.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/test/csharp/etch.tests/TestAsyncClient.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/test/csharp/etch.tests/TestAsyncClient.cs (original)
+++ incubator/etch/trunk/tests/src/test/csharp/etch.tests/TestAsyncClient.cs Tue Feb 10 16:40:34 2009
@@ -27,7 +27,7 @@
     {
 
         private static RemoteAsyncServer server;
-        private static Transport<ServerFactory> listener;
+        private static ServerFactory listener;
 
         [TestFixtureSetUp]
         public void Setup()

Modified: incubator/etch/trunk/tests/src/test/csharp/etch.tests/TestInheritance.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/test/csharp/etch.tests/TestInheritance.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/test/csharp/etch.tests/TestInheritance.cs (original)
+++ incubator/etch/trunk/tests/src/test/csharp/etch.tests/TestInheritance.cs Tue Feb 10 16:40:34 2009
@@ -27,7 +27,7 @@
     public class TestInheritance
     {
         private static RemoteInheritanceServer server;
-        private static Transport<ServerFactory> listener;
+        private static ServerFactory listener;
         
         [TestFixtureSetUp]
         public void Setup()

Modified: incubator/etch/trunk/tests/src/test/csharp/etch.tests/TestTest1Helper.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/test/csharp/etch.tests/TestTest1Helper.cs?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/test/csharp/etch.tests/TestTest1Helper.cs (original)
+++ incubator/etch/trunk/tests/src/test/csharp/etch.tests/TestTest1Helper.cs Tue Feb 10 16:40:34 2009
@@ -26,7 +26,7 @@
     [TestFixture]
     public class TestTest1Helper
     {
-        public static Transport<ServerFactory> listener;
+        public static ServerFactory listener;
         
         [TestFixtureSetUp]
         public void First()

Modified: incubator/etch/trunk/tests/src/test/java/org/apache/etch/tests/TestTest1Helper.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/tests/src/test/java/org/apache/etch/tests/TestTest1Helper.java?rev=743011&r1=743010&r2=743011&view=diff
==============================================================================
--- incubator/etch/trunk/tests/src/test/java/org/apache/etch/tests/TestTest1Helper.java (original)
+++ incubator/etch/trunk/tests/src/test/java/org/apache/etch/tests/TestTest1Helper.java Tue Feb 10 16:40:34 2009
@@ -29,7 +29,7 @@
 /** Test of Test1Helper */
 public class TestTest1Helper
 {
-	private static Transport<ServerFactory> listener;
+	private static ServerFactory listener;
 	
 	/** @throws Exception */
 	@BeforeClass