mirror of https://github.com/apache/activemq.git
fine tuning, client control commands etc.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@393913 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ef0734bccf
commit
6d366dcc85
|
@ -28,6 +28,7 @@ import org.apache.activemq.broker.region.ConnectionStatistics;
|
|||
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 @@ public abstract class AbstractConnection implements Service, Connection, Task, C
|
|||
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 @@ public abstract class AbstractConnection implements Service, Connection, Task, C
|
|||
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;
|
||||
}
|
||||
|
||||
|
@ -633,6 +643,10 @@ public abstract class AbstractConnection implements Service, Connection, Task, C
|
|||
public void setMessageAuthorizationPolicy(MessageAuthorizationPolicy messageAuthorizationPolicy) {
|
||||
this.messageAuthorizationPolicy = messageAuthorizationPolicy;
|
||||
}
|
||||
|
||||
public boolean isManageable(){
|
||||
return manageable;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue