activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1054106 - in /activemq/trunk: activemq-core/src/main/java/org/apache/activemq/advisory/ activemq-core/src/main/java/org/apache/activemq/broker/ activemq-core/src/main/java/org/apache/activemq/network/ activemq-core/src/test/java/org/apache...
Date Fri, 31 Dec 2010 12:53:07 GMT
Author: dejanb
Date: Fri Dec 31 12:53:07 2010
New Revision: 1054106

URL: http://svn.apache.org/viewvc?rev=1054106&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3109 - show 'createdByDuplex' in advisories and
web console

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFilter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/EmptyBroker.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ErrorBroker.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MutableBrokerFilter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryDuplexNetworkBridgeTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryNetworkBridgeTest.java
    activemq/trunk/activemq-web-console/src/main/webapp/network.jsp

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java?rev=1054106&r1=1054105&r2=1054106&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
Fri Dec 31 12:53:07 2010
@@ -392,11 +392,12 @@ public class AdvisoryBroker extends Brok
     }
 
     @Override
-    public void networkBridgeStarted(BrokerInfo brokerInfo) {
+    public void networkBridgeStarted(BrokerInfo brokerInfo, boolean createdByDuplex) {
         try {
          if (brokerInfo != null) {
              ActiveMQMessage advisoryMessage = new ActiveMQMessage();
              advisoryMessage.setBooleanProperty("started", true);
+             advisoryMessage.setBooleanProperty("createdByDuplex", createdByDuplex);
 
              ActiveMQTopic topic = AdvisorySupport.getNetworkBridgeAdvisoryTopic();
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java?rev=1054106&r1=1054105&r2=1054106&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java Fri
Dec 31 12:53:07 2010
@@ -380,7 +380,7 @@ public interface Broker extends Region, 
     
     ThreadPoolExecutor getExecutor();
 
-    void networkBridgeStarted(BrokerInfo brokerInfo);
+    void networkBridgeStarted(BrokerInfo brokerInfo, boolean createdByDuplex);
 
     void networkBridgeStopped(BrokerInfo brokerInfo);
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFilter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFilter.java?rev=1054106&r1=1054105&r2=1054106&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFilter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFilter.java
Fri Dec 31 12:53:07 2010
@@ -312,8 +312,8 @@ public class BrokerFilter implements Bro
        return next.getExecutor();
     }
 
-    public void networkBridgeStarted(BrokerInfo brokerInfo) {
-        next.networkBridgeStarted(brokerInfo);
+    public void networkBridgeStarted(BrokerInfo brokerInfo, boolean createdByDuplex) {
+        next.networkBridgeStarted(brokerInfo, createdByDuplex);
     }
 
     public void networkBridgeStopped(BrokerInfo brokerInfo) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/EmptyBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/EmptyBroker.java?rev=1054106&r1=1054105&r2=1054106&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/EmptyBroker.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/EmptyBroker.java
Fri Dec 31 12:53:07 2010
@@ -282,7 +282,7 @@ public class EmptyBroker implements Brok
     public void nowMasterBroker() {        
     }
 
-    public void networkBridgeStarted(BrokerInfo brokerInfo) {
+    public void networkBridgeStarted(BrokerInfo brokerInfo, boolean createdByDuplex) {
     }
 
     public void networkBridgeStopped(BrokerInfo brokerInfo) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ErrorBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ErrorBroker.java?rev=1054106&r1=1054105&r2=1054106&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ErrorBroker.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ErrorBroker.java
Fri Dec 31 12:53:07 2010
@@ -313,7 +313,7 @@ public class ErrorBroker implements Brok
         throw new BrokerStoppedException(this.message);
     }
 
-    public void networkBridgeStarted(BrokerInfo brokerInfo) {
+    public void networkBridgeStarted(BrokerInfo brokerInfo, boolean createdByDuplex) {
         throw new BrokerStoppedException(this.message);
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MutableBrokerFilter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MutableBrokerFilter.java?rev=1054106&r1=1054105&r2=1054106&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MutableBrokerFilter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MutableBrokerFilter.java
Fri Dec 31 12:53:07 2010
@@ -322,8 +322,8 @@ public class MutableBrokerFilter impleme
        return getNext().getExecutor();
     }
 
-    public void networkBridgeStarted(BrokerInfo brokerInfo) {
-        getNext().networkBridgeStarted(brokerInfo);
+    public void networkBridgeStarted(BrokerInfo brokerInfo, boolean createdByDuplex) {
+        getNext().networkBridgeStarted(brokerInfo, createdByDuplex);
     }
 
     public void networkBridgeStopped(BrokerInfo brokerInfo) {

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?rev=1054106&r1=1054105&r2=1054106&view=diff
==============================================================================
--- 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 Dec 31 12:53:07 2010
@@ -308,8 +308,7 @@ public abstract class DemandForwardingBr
 
                     localSessionInfo = new SessionInfo(localConnectionInfo, 1);
                     localBroker.oneway(localSessionInfo);
-
-                    brokerService.getBroker().networkBridgeStarted(remoteBrokerInfo);
+                    brokerService.getBroker().networkBridgeStarted(remoteBrokerInfo, this.createdByDuplex);
                     LOG.info("Network connection between " + localBroker + " and " + remoteBroker
+ "(" + remoteBrokerName + ") has been established.");
 
                 } else {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryDuplexNetworkBridgeTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryDuplexNetworkBridgeTest.java?rev=1054106&r1=1054105&r2=1054106&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryDuplexNetworkBridgeTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryDuplexNetworkBridgeTest.java
Fri Dec 31 12:53:07 2010
@@ -40,4 +40,8 @@ public class AdvisoryDuplexNetworkBridge
         broker2.start();
         broker2.waitUntilStarted();
     }
+
+    public void assertCreatedByDuplex(boolean createdByDuplex) {
+        assertTrue(createdByDuplex);
+    }
 }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryNetworkBridgeTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryNetworkBridgeTest.java?rev=1054106&r1=1054105&r2=1054106&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryNetworkBridgeTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryNetworkBridgeTest.java
Fri Dec 31 12:53:07 2010
@@ -52,6 +52,7 @@ public class AdvisoryNetworkBridgeTest e
         assertNotNull(advisory);
         assertTrue(advisory.getDataStructure() instanceof BrokerInfo);
         assertTrue(advisory.getBooleanProperty("started"));
+        assertCreatedByDuplex(advisory.getBooleanProperty("createdByDuplex"));
         
         broker2.stop();
         broker2.waitUntilStopped();
@@ -60,7 +61,10 @@ public class AdvisoryNetworkBridgeTest e
         assertNotNull(advisory);
         assertTrue(advisory.getDataStructure() instanceof BrokerInfo);
         assertFalse(advisory.getBooleanProperty("started"));
+    }
 
+    public void assertCreatedByDuplex(boolean createdByDuplex) {
+        assertFalse(createdByDuplex);
     }
 
     public void createBroker1() throws Exception {

Modified: activemq/trunk/activemq-web-console/src/main/webapp/network.jsp
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-console/src/main/webapp/network.jsp?rev=1054106&r1=1054105&r2=1054106&view=diff
==============================================================================
--- activemq/trunk/activemq-web-console/src/main/webapp/network.jsp (original)
+++ activemq/trunk/activemq-web-console/src/main/webapp/network.jsp Fri Dec 31 12:53:07 2010
@@ -28,6 +28,7 @@
 <tr>
     <th>Remote Broker</th>
     <th>Remote Address</th>
+    <th>Created By Duplex</th>
     <th>Messages Enqueued</th>
     <th>Messages Dequeued</th>
 </tr>
@@ -37,6 +38,7 @@
 <tr>
 	<td>${nb.remoteBrokerName}</td>
 	<td>${nb.remoteAddress}</td>
+	<td>${nb.createdByDuplex}</td>
 	<td>${nb.enqueueCounter}</td>
 	<td>${nb.dequeueCounter}</td>
 </tr>



Mime
View raw message