activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r425922 - in /incubator/activemq/branches/activemq-4.0/activemq-core/src: main/java/org/apache/activemq/ main/java/org/apache/activemq/broker/ main/java/org/apache/activemq/broker/region/ main/java/org/apache/activemq/thread/ test/resources...
Date Thu, 27 Jul 2006 00:44:18 GMT
Author: chirino
Date: Wed Jul 26 17:44:17 2006
New Revision: 425922

URL: http://svn.apache.org/viewvc?rev=425922&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQ-847

Modified:
    incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
    incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
    incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java
    incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java
    incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker1.xml
    incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker2.xml
    incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker1.xml
    incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker2.xml

Modified: incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java?rev=425922&r1=425921&r2=425922&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
(original)
+++ incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
Wed Jul 26 17:44:17 2006
@@ -535,6 +535,8 @@
             if (!closed.get()) {
                 closing.set(true);
 
+                this.factoryStats.removeConnection(this);
+                
                 if( advisoryConsumer!=null ) {
                     advisoryConsumer.dispose();
                     advisoryConsumer=null;

Modified: incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java?rev=425922&r1=425921&r2=425922&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
(original)
+++ incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
Wed Jul 26 17:44:17 2006
@@ -389,6 +389,13 @@
     }
 
     public Response processBrokerInfo(BrokerInfo info) {
+    	
+    	// We only expect to get one broker info command per connection
+    	if( this.brokerInfo!=null ) {
+    		log.warn("Unexpected extra broker info command received: "+info);
+    	}
+    	
+        this.brokerInfo = info;
         broker.addBroker(this, info);
         return null;
     }

Modified: incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java?rev=425922&r1=425921&r2=425922&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java
(original)
+++ incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java
Wed Jul 26 17:44:17 2006
@@ -146,6 +146,7 @@
     
     synchronized public void drop() {
         dropped=true;
+        lockOwner = null;
         if( !persistent && message!=null ) {
             message.decrementReferenceCount();
             message=null;
@@ -156,7 +157,7 @@
         if( !regionDestination.lock(this, subscription) )
             return false;        
         synchronized (this) {
-            if( lockOwner!=null && lockOwner!=subscription )
+            if( dropped || (lockOwner!=null && lockOwner!=subscription) )
                 return false;
             lockOwner = subscription;
             return true;

Modified: incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java?rev=425922&r1=425921&r2=425922&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java
(original)
+++ incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java
Wed Jul 26 17:44:17 2006
@@ -51,6 +51,7 @@
         ScheduledFuture ticket = (ScheduledFuture) clockTickets.remove(task);
         if( ticket!=null ) {
             ticket.cancel(true);
+        	clockDaemon.remove(task);
         }
     }
 

Modified: incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker1.xml
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker1.xml?rev=425922&r1=425921&r2=425922&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker1.xml
(original)
+++ incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker1.xml
Wed Jul 26 17:44:17 2006
@@ -19,6 +19,18 @@
 
   <broker brokerName="broker1" persistent="false" useShutdownHook="false" useJmx="false">
 
+    <!-- disabling the subscription recovery policy allows us take memory leaks easier
-->
+    <destinationPolicy>
+      <policyMap>
+        <policyEntries>
+          <policyEntry topic=">">
+            <subscriptionRecoveryPolicy>
+              <noSubscriptionRecoveryPolicy />
+            </subscriptionRecoveryPolicy>
+          </policyEntry>
+      </policyEntries></policyMap>
+    </destinationPolicy>
+    
     <transportConnectors>
       <transportConnector uri="tcp://localhost:61616"/>
       <transportConnector uri="vm://broker1"/>

Modified: incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker2.xml
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker2.xml?rev=425922&r1=425921&r2=425922&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker2.xml
(original)
+++ incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker2.xml
Wed Jul 26 17:44:17 2006
@@ -19,6 +19,18 @@
 
   <broker brokerName="broker2" persistent="false" useShutdownHook="false" useJmx="false">
 
+    <!-- disabling the subscription recovery policy allows us take memory leaks easier
-->
+    <destinationPolicy>
+      <policyMap>
+        <policyEntries>
+          <policyEntry topic=">">
+            <subscriptionRecoveryPolicy>
+              <noSubscriptionRecoveryPolicy />
+            </subscriptionRecoveryPolicy>
+          </policyEntry>
+      </policyEntries></policyMap>
+    </destinationPolicy>
+
     <transportConnectors>
       <transportConnector uri="tcp://localhost:61617"/>
       <transportConnector uri="vm://broker2"/>

Modified: incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker1.xml
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker1.xml?rev=425922&r1=425921&r2=425922&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker1.xml
(original)
+++ incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker1.xml
Wed Jul 26 17:44:17 2006
@@ -19,6 +19,18 @@
 
   <broker brokerName="broker1" persistent="false" useShutdownHook="false" useJmx="false">
 
+    <!-- disabling the subscription recovery policy allows us take memory leaks easier
-->
+    <destinationPolicy>
+      <policyMap>
+        <policyEntries>
+          <policyEntry topic=">">
+            <subscriptionRecoveryPolicy>
+              <noSubscriptionRecoveryPolicy />
+            </subscriptionRecoveryPolicy>
+          </policyEntry>
+      </policyEntries></policyMap>
+    </destinationPolicy>
+    
     <transportConnectors>
       <transportConnector uri="tcp://localhost:61616"/>
       <transportConnector uri="vm://broker1"/>

Modified: incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker2.xml
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker2.xml?rev=425922&r1=425921&r2=425922&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker2.xml
(original)
+++ incubator/activemq/branches/activemq-4.0/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker2.xml
Wed Jul 26 17:44:17 2006
@@ -19,6 +19,18 @@
 
   <broker brokerName="broker2" persistent="false" useShutdownHook="false" useJmx="false">
 
+    <!-- disabling the subscription recovery policy allows us take memory leaks easier
-->
+    <destinationPolicy>
+      <policyMap>
+        <policyEntries>
+          <policyEntry topic=">">
+            <subscriptionRecoveryPolicy>
+              <noSubscriptionRecoveryPolicy />
+            </subscriptionRecoveryPolicy>
+          </policyEntry>
+      </policyEntries></policyMap>
+    </destinationPolicy>
+    
     <transportConnectors>
       <transportConnector uri="tcp://localhost:61617"/>
       <transportConnector uri="vm://broker2"/>



Mime
View raw message