JBoss 7.1.1 and JBoss Web Native

I am trying to enable JBoss Web Native libraries in JBoss 7.1.1. I read this question and answers and tried the following steps to include my own libraries in JBoss, but so far this has not worked. I'm on OS X:

  • Download the macosx archive from http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-10
  • Unzip it to the JBoss directory, so the contents of the archive are available in bin/native .
  • Updated bin/standalone.conf to include the library path: JAVA_OPTS="$JAVA_OPTS -Djava.library.path=/path/to/jboss-as-7.1.1.Final-native/bin/native:$PATH"

Starting JBoss, I still see the following in the log file:

 [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080 

instead of the expected Http11AprProtocol .

What am I missing?

+7
source share
2 answers

It turns out that the above steps are no longer needed for JBoss 7.1.1, since the native libraries are now linked in modules/org/jboss/as/web/main/lib .

To enable their use, I had to set the native attribute to true in the web subsystem in standalone.xml . For some reason, in the default setting, it was set to false:

 <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="true"> <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/> <virtual-server name="default-host" enable-welcome-root="true"> <alias name="localhost"/> <alias name="example.com"/> </virtual-server> </subsystem> 
+15
source

JBOSS EAP 6.0

Check if you have modules / org / jboss / as / web / main / lib in JBOSS_HOME. If not like in my version of JBoss EAP 6.0.

first: yum install tomcat-native.x86_64

Your system now has a native tomcat library in the / usr / lib 64 directory, which is usually located in java.library.path then set native = true on the network of the subsystem, as nwinkler suggested:

 <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="true"> <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/> <virtual-server name="default-host" enable-welcome-root="true"> <alias name="localhost"/> <alias name="example.com"/> </virtual-server> 

and now restart jboss.

Without the built-in tomcat libraries you have in the log:

 10:12:31,700 INFO [org.apache.catalina.core.AprLifecycleListener] (MSC service thread 1-1) The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_37/jre/lib/amd64/server:/usr/java/jdk1.6.0_37/jre/lib/amd64:/usr/java/jdk1.6.0_37/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 10:12:32,203 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-8) Starting Coyote HTTP/1.1 on http-/127.0.0.1:8080 

With tomcat native libraries, your log writes:

 10:22:56,147 INFO [org.apache.coyote.http11.Http11AprProtocol] (MSC service thread 1-5) Starting Coyote HTTP/1.1 on http-/127.0.0.1:8080 

ALTERNATIVE

1) Download your own library from JBoss websites:

 wget http://downloads.jboss.org/jbossnative/2.0.10.GA/jboss-native-2.0.10-linux2-x64-ssl.tar.gz 

2) untar

 tar xvzf jboss-native-2.0.10-linux2-x64-ssl.tar.gz 

3) Create a folder for your native libraries:

  mkdir -p tomcat-native 

4) Move bin / native to a new folder

  mv bin/native tomcat-native 

5) Make your folder visible java. Add this to standalone.conf or domain.conf

  JAVA_OPTS="$JAVA_OPTS -Djava.library.path=[the tomcat-native folder path] 
+2
source

All Articles