Author: aidanskinner
Date: 2008-10-14 05:39:26 -0400 (Tue, 14 Oct 2008)
New Revision: 2631
Modified:
store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
Log:
Remove cursor from dequeue message since it didn't address the problem
Modified:
store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
===================================================================
---
store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2008-10-13
18:03:42 UTC (rev 2630)
+++
store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2008-10-14
09:39:26 UTC (rev 2631)
@@ -993,19 +993,15 @@
_log.debug("Message Id: " + messageId + " Dequeue");
}
- Cursor cursor = null;
try
{
- cursor = _deliveryDb.openCursor(tx, null);
- DatabaseEntry data = new DatabaseEntry();
- OperationStatus status = cursor.getSearchKey(key, data, null);
+ OperationStatus status = _deliveryDb.delete(tx, key);
if (status == OperationStatus.NOTFOUND)
{
throw new AMQException("Unable to find message with id " +
messageId + " on queue " + name);
- }
- status = cursor.delete();
- if (status != OperationStatus.SUCCESS)
+ }
+ else if (status != OperationStatus.SUCCESS)
{
throw new AMQException("Unable to remove message with id " +
messageId + " on queue " + name);
}
@@ -1042,20 +1038,6 @@
throw new AMQException("Error accessing database while dequeuing
message: " + e, e);
}
- finally
- {
- if (cursor != null)
- {
- try
- {
- cursor.close();
- }
- catch (DatabaseException e)
- {
- throw new AMQException("Error closing cursor while dequeuing
message: " + e, e);
- }
- }
- }
}
private boolean isLocalTransaction(StoreContext context)
Show replies by date