2015/07/26 - Apache DirectMemory has been retired.

For more information, please explore the Attic.

Create your server instance

In order to create a war file to serve a DirectMemory instance, you can:

  • package in a maven war project type
  • create it from the archetype

Server Configuration

In the first release, the DirectMemory Server use a single instance of DirectMemory cache and configured via System Properties:

  • numberOfBuffers: "directMemory.numberOfBuffers" (default: 10)
  • size: "directMemory.size" (default: 1000)
  • initialCapacity: "directMemory.initialCapacity" (default: 100000)
  • concurrencyLevel: "directMemory.concurrencyLevel" (default: 4)

Maven War project

Add a dependency to the server core artifact:


Map the DirectMemory servlet in your web.xml:



Create from archetype

Use the following command line.

mvn archetype:generate \
   -DarchetypeGroupId=org.apache.directmemory.server \
   -DarchetypeArtifactId=server-example-archetype \

If you want to use a SNAPSHOT version you must add: -DarchetypeRepository=https://repository.apache.org/content/repositories/snapshots/

Now you have a simple war project configured to be a DirectMemory Server.

Try the provided sample with running mvn tomcat7:run and hit your browser to http://localhost:9091/dm/