Author: ritchiem
Date: Fri Dec 11 16:27:09 2009
New Revision: 889687
URL: http://svn.apache.org/viewvc?rev=889687&view=rev
Log:
QPID-2263 : Stop Exceptions killing the HouseKeeping thread. Also prevented
Deleted Messages from being processed by the notification checks.
merged from trunk r889645
Modified:
qpid/branches/0.5.x-dev/qpid/java/ (props changed)
qpid/branches/0.5.x-dev/qpid/java/broker/ (props changed)
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
Propchange: qpid/branches/0.5.x-dev/qpid/java/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 11 16:27:09 2009
@@ -1,2 +1,2 @@
/qpid/branches/java-broker-0-10/qpid/java:829414,829575
-/qpid/trunk/qpid/java:835115,884634-884635,884838,885765,887948,887950-887952,887994,888246,888248,888250,888345,888348
+/qpid/trunk/qpid/java:835115,884634-884635,884838,885765,887948,887950-887952,887994,888246,888248,888250,888345,888348,889645
Propchange: qpid/branches/0.5.x-dev/qpid/java/broker/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 11 16:27:09 2009
@@ -1,3 +1,3 @@
/qpid/branches/java-broker-0-10/qpid/java/broker:829414,829575
/qpid/branches/jmx_mc_gsoc09/qpid/java/broker:787599
-/qpid/trunk/qpid/java/broker:742626,743015,743028-743029,743304,743306,743311,743357,744113,747363,747367,747369-747370,747376,747783,747868-747870,747875,748561,748591,748641,748680,748686,749149,749282,749285,749315,749340,749572,753219-753220,753253,754934,754958,755256,757258,757270,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790,835115,884634-884635,884838,885765,887952,888246,888248,888250,888348
+/qpid/trunk/qpid/java/broker:742626,743015,743028-743029,743304,743306,743311,743357,744113,747363,747367,747369-747370,747376,747783,747868-747870,747875,748561,748591,748641,748680,748686,749149,749282,749285,749315,749340,749572,753219-753220,753253,754934,754958,755256,757258,757270,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790,835115,884634-884635,884838,885765,887952,888246,888248,888250,888348,889645
Modified:
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
URL:
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java?rev=889687&r1=889686&r2=889687&view=diff
==============================================================================
---
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
(original)
+++
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
Fri Dec 11 16:27:09 2009
@@ -1618,13 +1618,29 @@
while (queueListIterator.advance())
{
QueueEntry node = queueListIterator.getNode();
- if (!node.isDeleted() && node.expired() && node.acquire())
+ // Only process nodes that are not currently deleted
+ if (!node.isDeleted())
{
- node.discard(storeContext);
- }
- else
- {
- _managedObject.checkForNotification(node.getMessage());
+ // If the node has exired then aquire it
+ if (node.expired() && node.acquire())
+ {
+ // Then dequeue it.
+ node.discard(storeContext);
+ }
+ else
+ {
+ if (_managedObject != null)
+ {
+ // There is a chance that the node could be deleted by
+ // the time the check actually occurs. So verify we
+ // can actually get the message to perform the check.
+ AMQMessage msg = node.getMessage();
+ if (msg != null)
+ {
+ _managedObject.checkForNotification(msg);
+ }
+ }
+ }
}
}
Modified:
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
URL:
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java?rev=889687&r1=889686&r2=889687&view=diff
==============================================================================
---
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
(original)
+++
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
Fri Dec 11 16:27:09 2009
@@ -263,10 +263,11 @@
{
q.checkMessageStatus();
}
- catch (AMQException e)
+ catch (Exception e)
{
_logger.error("Exception in housekeeping for
queue: " + q.getName().toString(), e);
- throw new RuntimeException(e);
+ //Don't throw exceptions as this will stop the
+ // house keeping task from running.
}
}
}
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]