I have installed libaio on ubuntu, and running HornetQ embedded, with programmatic config, I am doing this to use AIO on journal, but I see on startup, it's not getting AIO, always using NIO. Any way to determine why it would be failing?
Configuration configuration = new ConfigurationImpl();
boolean supportsAIO = AIOSequentialFileFactory.isSupported();
if (supportsAIO) {
configuration.setJournalType(JournalType.ASYNCIO);
log.info("** using AIO **");
} else {
configuration.setJournalType(JournalType.NIO);
log.info("** using NIO **");
}
You have to define -Djava.library.path=PathToYourBinaries
and you should have these files at PathToYourBinaries:
if you still can't load it then it will be a matter of recompiling the natives at your system, but most likely you just need to define java.library.path.