activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r393913 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
Date Thu, 13 Apr 2006 20:16:26 GMT
Author: rajdavies
Date: Thu Apr 13 13:16:24 2006
New Revision: 393913

URL: http://svn.apache.org/viewcvs?rev=393913&view=rev
Log:
fine tuning, client control commands etc.

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java?rev=393913&r1=393912&r2=393913&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
Thu Apr 13 13:16:24 2006
@@ -28,6 +28,7 @@
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.BrokerInfo;
 import org.apache.activemq.command.Command;
+import org.apache.activemq.command.ConnectionControl;
 import org.apache.activemq.command.ConnectionError;
 import org.apache.activemq.command.ConnectionId;
 import org.apache.activemq.command.ConnectionInfo;
@@ -85,6 +86,7 @@
     protected BrokerInfo brokerInfo;
     private ConnectionStatistics statistics = new ConnectionStatistics();
     private boolean inServiceException=false;
+    private boolean manageable;
 
     protected final ConcurrentHashMap connectionStates = new ConcurrentHashMap();
     
@@ -495,9 +497,17 @@
         context.setUserName(info.getUserName());
         context.setConnectionId(info.getConnectionId());
         context.setWireFormatInfo(wireFormatInfo);
+        this.manageable = info.isManageable();
         connectionStates.put(info.getConnectionId(), new ConnectionState(info, context));
+       
         
         broker.addConnection(context, info);
+        if (info.isManageable() && broker.isFaultTolerantConfiguration()){
+            //send ConnectionCommand
+            ConnectionControl command = new ConnectionControl();
+            command.setFaultTolerant(broker.isFaultTolerantConfiguration());
+            dispatchAsync(command);
+        }
         return null;
     }
     
@@ -632,6 +642,10 @@
 
     public void setMessageAuthorizationPolicy(MessageAuthorizationPolicy messageAuthorizationPolicy)
{
         this.messageAuthorizationPolicy = messageAuthorizationPolicy;
+    }
+    
+    public boolean isManageable(){
+        return manageable;
     }
 
     



Mime
View raw message