qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject svn commit: r1062722 - in /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server: protocol/ProtocolEngine_0_10.java transport/ServerConnection.java transport/ServerConnectionDelegate.java
Date Mon, 24 Jan 2011 10:36:17 GMT
Author: robbie
Date: Mon Jan 24 10:36:16 2011
New Revision: 1062722

URL: http://svn.apache.org/viewvc?rev=1062722&view=rev
Log:
QPID-3014: create and use a connection actor directly, it doesnt need to be put on the CurrentActor
stack for the open messages

Modified:
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_0_10.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnection.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnectionDelegate.java

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_0_10.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_0_10.java?rev=1062722&r1=1062721&r2=1062722&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_0_10.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_0_10.java
Mon Jan 24 10:36:16 2011
@@ -58,8 +58,8 @@ public class ProtocolEngine_0_10  extend
         _appRegistry = appRegistry;
 
         // FIXME Two log messages to maintain compatinbility with earlier protocol versions
-        CurrentActor.get().message(ConnectionMessages.OPEN(null, null, false, false));
-        CurrentActor.get().message(ConnectionMessages.OPEN(null, "0-10", false, true));
+        _connection.getLogActor().message(ConnectionMessages.OPEN(null, null, false, false));
+        _connection.getLogActor().message(ConnectionMessages.OPEN(null, "0-10", false, true));
     }
 
     public void setNetworkDriver(NetworkDriver driver)

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnection.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnection.java?rev=1062722&r1=1062721&r2=1062722&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnection.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnection.java
Mon Jan 24 10:36:16 2011
@@ -27,6 +27,7 @@ import java.text.MessageFormat;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.protocol.AMQConstant;
 import org.apache.qpid.server.configuration.ConnectionConfig;
+import org.apache.qpid.server.logging.LogActor;
 import org.apache.qpid.server.logging.LogSubject;
 import org.apache.qpid.server.logging.actors.CurrentActor;
 import org.apache.qpid.server.logging.actors.GenericActor;
@@ -43,10 +44,11 @@ public class ServerConnection extends Co
 {
     private ConnectionConfig _config;
     private Runnable _onOpenTask;
+    private LogActor _actor = GenericActor.getInstance(this);
 
     public ServerConnection()
     {
-        CurrentActor.set(GenericActor.getInstance(this));
+
     }
 
     @Override
@@ -66,7 +68,7 @@ public class ServerConnection extends Co
             {
                 _onOpenTask.run();    
             }
-            CurrentActor.get().message(ConnectionMessages.OPEN(getClientId(), "0-10", true,
true));
+            _actor.message(ConnectionMessages.OPEN(getClientId(), "0-10", true, true));
         }
         
         if (state == State.CLOSED)
@@ -167,4 +169,8 @@ public class ServerConnection extends Co
         }
     }
 
+    public LogActor getLogActor()
+    {
+        return _actor;
+    }
 }

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnectionDelegate.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnectionDelegate.java?rev=1062722&r1=1062721&r2=1062722&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnectionDelegate.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnectionDelegate.java
Mon Jan 24 10:36:16 2011
@@ -114,7 +114,6 @@ public class ServerConnectionDelegate ex
             else
             {
 	            sconn.invoke(new ConnectionOpenOk(Collections.emptyList()));
-                CurrentActor.set(GenericActor.getInstance(sconn));
 	            sconn.setState(Connection.State.OPEN);
             }
         }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message