Author: rajdavies
Date: Fri Mar 9 08:34:32 2007
New Revision: 516450
URL: http://svn.apache.org/viewvc?view=rev&rev=516450
Log:
set duplex property
Modified:
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java
Modified:
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java?view=diff&rev=516450&r1=516449&r2=516450
==============================================================================
---
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
(original)
+++
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
Fri Mar 9 08:34:32 2007
@@ -108,6 +108,7 @@
protected int networkTTL = 1;
protected final AtomicBoolean remoteInterupted = new AtomicBoolean(false);
protected final AtomicBoolean lastConnectSucceeded = new
AtomicBoolean(false);
+ protected boolean duplex = false;
public DemandForwardingBridgeSupport(final Transport localBroker, final
Transport remoteBroker) {
@@ -269,6 +270,8 @@
BrokerInfo brokerInfo=new BrokerInfo();
brokerInfo.setBrokerName(localBrokerName);
+ brokerInfo.setNetworkConnection(true);
+ brokerInfo.setDuplexConnection(isDuplex());
remoteBroker.oneway(brokerInfo);
SessionInfo remoteSessionInfo=new
SessionInfo(remoteConnectionInfo,1);
@@ -898,5 +901,13 @@
public void setBridgeTempDestinations(boolean bridgeTempDestinations) {
this.bridgeTempDestinations = bridgeTempDestinations;
}
+
+ public boolean isDuplex(){
+ return this.duplex;
+ }
+
+ public void setDuplex(boolean duplex){
+ this.duplex=duplex;
+ }
}
Modified:
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java?view=diff&rev=516450&r1=516449&r2=516450
==============================================================================
---
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java
(original)
+++
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java
Fri Mar 9 08:34:32 2007
@@ -55,6 +55,7 @@
private String userName;
private String password;
private boolean bridgeTempDestinations=true;
+ private boolean duplex = false;
protected ConnectionFilter connectionFilter;
@@ -246,6 +247,7 @@
result.setPrefetchSize(prefetchSize);
result.setDispatchAsync(dispatchAsync);
result.setDecreaseNetworkConsumerPriority(isDecreaseNetworkConsumerPriority());
+ result.setDuplex(isDuplex());
List destsList = getDynamicallyIncludedDestinations();
ActiveMQDestination dests[] = (ActiveMQDestination[])
destsList.toArray(new ActiveMQDestination[destsList.size()]);
@@ -333,4 +335,20 @@
public void setBridgeTempDestinations(boolean bridgeTempDestinations) {
this.bridgeTempDestinations = bridgeTempDestinations;
}
+
+
+ /**
+ * @return the duplex
+ */
+ public boolean isDuplex(){
+ return this.duplex;
+ }
+
+
+ /**
+ * @param duplex the duplex to set
+ */
+ public void setDuplex(boolean duplex){
+ this.duplex=duplex;
+ }
}