Configuration configuration = createDefaultConfig();
PostOffice postOffice = new FakePostOffice();
final JournalStorageManager journal = new JournalStorageManager(configuration, execFactory);
try
{
journal.start();
List<QueueBindingInfo> queueBindingInfos = new ArrayList<QueueBindingInfo>();
journal.loadBindingJournal(queueBindingInfos, new ArrayList<GroupingInfo>());
Map<Long, Queue> queues = new HashMap<Long, Queue>();
journal.loadMessageJournal(postOffice, null, null, queues, null, null, null);
journal.stop();
deleteDirectory(testdir);
journal.start();
queues = new HashMap<Long, Queue>();
journal.loadMessageJournal(postOffice, null, null, queues, null, null, null);
queueBindingInfos = new ArrayList<QueueBindingInfo>();
journal.loadBindingJournal(queueBindingInfos, new ArrayList<GroupingInfo>());
journal.start();
}
finally
{
try
{
journal.stop();
}
catch (Exception ex)
{
RestartSMTest.log.warn(ex.getMessage(), ex);
}