Adding APR to JBoss

From OpenKM Documentation
Revision as of 17:24, 10 March 2011 by Pavila (talk | contribs)

Jump to: navigation, search

Out-of-the-box, JBoss AS 4.2.3 is a 100% pure Java application server, and embeds Tomcat 6 as its servlet container. By default, it will use Java to handle HTTP connections. With a few simple steps you can add the Apache Portable Runtime (APR) to achieve native HTTP processing performance.

If you run JBoss, you can notice certain console output that indicates no APR presence:

 ...
 17:33:23,852 INFO  [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/java-6-sun-1.6.0.24/jre/lib/i386/server:/usr/java/java-6-sun-1.6.0.24/jre/lib/amd64:/usr/java/java-6-sun-1.6.0.24/jre/../lib/amd64
 17:33:23,973 INFO  [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
 17:33:23,974 INFO  [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
 ...
 17:33:30,162 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
 17:33:30,181 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
 17:33:30,202 INFO  [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181439)] Started in 17s:669ms

Stop JBoss and download JBoss Native from http://www.jboss.org/jbossweb/downloads. It is very important that you choose the right native-built libraries for your operating system. Extract the archive into $JBOSS_HOME. Now you have a folder $JBOSS_HOME/bin/native with some dynamic libraries.