JBoss.orgCommunity Documentation

Chapter 40. Libaio Native Libraries

40.1. Compiling the native libraries
40.1.1. Install requirements
40.1.2. Invoking the compilation

HornetQ distributes a native library, used as a bridge between HornetQ and linux libaio.

libaio is a library, developed as part of the linux kernel project. With libaio we submit writes to the operating system where they are processed asynchronously. Some time later the OS will call our code back when they have been processed.

We use this in our high performance journal if configured to do so, please see Chapter 15, Persistence.

These are the native libraries distributed by HornetQ:

When using libaio, HornetQ will always try loading these files as long as they are on the library path.

In the case that you are using Linux on a platform other than x86_32 or x86_64 (for example Itanium 64 bits or IBM Power) you may need to compile the native library, since we do not distribute binaries for those platforms with the release.

The native library uses autoconf what makes the compilation process easy, however you need to install extra packages as a requirement for compilation:

  • gcc - C Compiler

  • gcc-c++ or g++ - Extension to gcc with support for C++

  • autoconf - Tool for automating native build process

  • make - Plain old make

  • automake - Tool for automating make generation

  • libtool - Tool for link editing native libraries

  • libaio - library to disk asynchronous IO kernel functions

  • libaio-dev - Compilation support for libaio

  • A full JDK installed with the environment variable JAVA_HOME set to its location

To perform this installation on RHEL or Fedora, you can simply type this at a command line:

sudo yum install automake libtool autoconf gcc-g++ gcc libaio libaio-dev make

Or on debian systems:

sudo apt-get install automake libtool autoconf gcc-g++ gcc libaio libaio-dev make


You could find a slight variation of the package names depending on the version and linux distribution. (for example gcc-c++ on Fedora versus g++ on Debian systems)