ARTEMIS-321 - server should stop if no more journal fil can be created.

https://issues.apache.org/jira/browse/ARTEMIS-321
This commit is contained in:
Andy Taylor 2015-12-14 16:56:20 +00:00
parent 8fa5bb2a07
commit b7be2af8a9
2 changed files with 5 additions and 1 deletions

View File

@ -33,6 +33,7 @@ import java.util.concurrent.atomic.AtomicLong;
import org.apache.activemq.artemis.core.io.SequentialFile;
import org.apache.activemq.artemis.core.io.SequentialFileFactory;
import org.apache.activemq.artemis.journal.ActiveMQJournalBundle;
import org.apache.activemq.artemis.journal.ActiveMQJournalLogger;
/**
@ -435,7 +436,7 @@ public class JournalFilesRepository {
while (nextFile == null) {
nextFile = openedFiles.poll(5, TimeUnit.SECONDS);
if (nextFile == null) {
ActiveMQJournalLogger.LOGGER.errorOpeningFile(new Exception("trace"));
fileFactory.onIOError(ActiveMQJournalBundle.BUNDLE.fileNotOpened(), "unable to open ", null);
}
}

View File

@ -44,4 +44,7 @@ public interface ActiveMQJournalBundle {
@Message(id = 149003, value = "File not opened")
ActiveMQIOErrorException fileNotOpened();
@Message(id = 149004, value = "unable to open file")
String unableToOpenFile();
}