Author: borges
Date: 2011-10-10 09:35:00 -0400 (Mon, 10 Oct 2011)
New Revision: 11500
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
Log:
HORNETQ-720 Close synchronization file when done
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java 2011-10-10
13:34:43 UTC (rev 11499)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java 2011-10-10
13:35:00 UTC (rev 11500)
@@ -469,8 +469,15 @@
if (enabled)
{
SequentialFile file = jf.getFile().copy();
+ try {
log.info("Replication: sending " + jf + " (size=" +
file.size() + ") to backup. " + file);
sendLargeFile(content, null, jf.getFileID(), file, Long.MAX_VALUE);
+ }
+ finally
+ {
+ if (file.isOpen())
+ file.close();
+ }
}
}