Skip to content

Commit

Permalink
fixing tests / accidental commit
Browse files Browse the repository at this point in the history
  • Loading branch information
clebertsuconic committed Feb 16, 2011
1 parent fe794e2 commit 72cb6f4
Showing 1 changed file with 9 additions and 18 deletions.
Expand Up @@ -173,7 +173,7 @@ private void checkDelete() throws Exception
// This file is linked to another message, deleting the reference where it belongs on this case
linkMessage.decrementDelayDeletionCount();
}
else if (delayDeletionCount.get() <= 0)
else
{
if (LargeServerMessageImpl.isTrace)
{
Expand All @@ -192,27 +192,18 @@ else if (delayDeletionCount.get() <= 0)
}
}

public int incrementRefCount() throws Exception
{
int value = super.incrementRefCount();

// new Exception("increment, value=" + value +
// " on msgCount = " +
// this.getIntProperty("counter-message") +
// " messageID=" +
// this.getMessageID()).printStackTrace();

return value;
}

static int deleted = 0;

@Override
public synchronized int decrementRefCount() throws Exception
{
int currentRefCount = super.decrementRefCount();

checkDelete();
// We use <= as this could be used by load.
// because of a failure, no references were loaded, so we have 0... and we still need to delete the associated
// files
if (delayDeletionCount.get() <= 0)
{
checkDelete();
}

return currentRefCount;
}
Expand Down Expand Up @@ -324,7 +315,7 @@ private synchronized void validateFile() throws HornetQException
file = storageManager.createFileForLargeMessage(getMessageID(), durable);

file.open();

bodySize = file.size();
}
}
Expand Down

0 comments on commit 72cb6f4

Please sign in to comment.