简体   繁体   English

如何在JBoss 7中加载APR连接器(本机)

[英]How to load APR Connector (Native) in JBoss 7

I want to use Atmosphere XMPP but i need to load native connector APR. 我想使用Atmosphere XMPP,但我需要加载本机连接器APR。 I am not very familiar as of yet with JBoss 7 so i was wondering if anyone knows how to do this? 我对JBoss 7还不是很熟悉,所以我想知道是否有人知道该怎么做? WIndows x64 or Linux x64 environment. Windows x64或Linux x64环境。 Doesn't matter. 没关系 Thanks 谢谢

Assuming Linux x64 here. 假设Linux x64在这里。 I am using Ubuntu 11.04 x64. 我正在使用Ubuntu 11.04 x64。

  1. Download JBoss7 distribution and unzip it to a suitable directory ( from here I am assuming that you have it in your '/home/myname/tools/jboss701/' folder. 下载JBoss7发行版并将其解压缩到合适的目录(从此处我假设您将其保存在“ / home / myname / tools / jboss701 /”文件夹中)。
  2. Start it using /jboss701/bin/standalone.sh and verify that it started properly ( check localhost:8080 url). 使用/jboss701/bin/standalone.sh启动它,并验证它是否正确启动(检查localhost:8080 url)。 Close the jboss for now. 现在关闭jboss。

  3. Download the native libraries from here http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-9.html . 从此处http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-9.html下载本机库。 I have downloaded this one jboss-native-2.0.9-linux2-x64-ssl.tar.gz 我已经下载了这个jboss-native-2.0.9-linux2-x64-ssl.tar.gz

  4. Unpack it to the '/home/myname/tools/jboss701/' folder. 将其解压缩到“ / home / myname / tools / jboss701 /”文件夹中。 You should see the contents of the archive in '/home/myname/tools/jboss701/bin' folder. 您应该在“ / home / myname / tools / jboss701 / bin”文件夹中看到档案的内容。 Also, verify that you have 'native' folder under the '/home/myname/tools/jboss701/bin' 另外,请验证您在“ / home / myname / tools / jboss701 / bin”下是否具有“ native”文件夹

  5. IMPORTANT: unfortunately, it doesn't work out of the box. 重要提示:不幸的是,它开箱即用。 You must make the following change: add the 您必须进行以下更改:添加

JAVA_OPTS="$JAVA_OPTS -Djava.library.path=/home/myname/tools/jboss701/bin/native:$PATH" JAVA_OPTS =“ $ JAVA_OPTS -Djava.library.path = / home / myname / tools / jboss701 / bin / native:$ PATH”

string to your 'standalone.conf' file. 字符串到“ standalone.conf”文件。

Start JBoss with the 'standalone.sh' script. 使用“ standalone.sh”脚本启动JBoss。 Verify that you have the following line in the console during the JBoss startup: 'org.apache.coyote.http11.Http11AprProtocol'. 验证在JBoss启动过程中控制台中是否有以下行:'org.apache.coyote.http11.Http11AprProtocol'。 If you see 'org.apache.coyote.http11.Http11AprProtocol' instead of 'org.apache.coyote.http11.Http11Protocol' then everything is working as expected. 如果您看到的是“ org.apache.coyote.http11.Http11AprProtocol”而不是“ org.apache.coyote.http11.Http11Protocol”,则说明一切正常。

Thanks man, i got it working. 谢谢男人,我开始工作了。 I do see these lines now in my startup script. 我现在在启动脚本中确实看到了这些行。 `15:13:09,687 INFO [org.apache.catalina.core.AprLifecycleListener] (MSC service thread 1-7) An older version 1.1.20 of the Apache Tomcat Native li brary is installed, while Tomcat recommends version greater then 1.1.21 `15:13:09,687 INFO [org.apache.catalina.core.AprLifecycleListener](MSC服务线程1-7)已安装了Apache Tomcat本机版本1.1.20的较早版本,而Tomcat建议使用1.1以上的版本。 21

15:13:11,110 INFO [org.apache.coyote.http11.Http11AprProtocol] (MSC service thread 1-3) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080` Atmosphere unforunately, is still throwing the same error. 15:13:11,110 INFO [org.apache.coyote.http11.Http11AprProtocol](MSC服务线程1-3)不幸的是,在http--127.0.0.1-8080上启动Coyote HTTP / 1.1时,仍然出现了相同的错误。

java.lang.IllegalStateException: JBoss failed to detect this is a Comet application because the APR Connector is not enabled. Make sure atmosphere-compat-jboss.jar is not under your WEB-INF/lib and there is no context.xml under WEB-INF org.atmosphere.container.JBossWebCometSupport.<clinit>(JBossWebCometSupport.java:66) sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:513) org.atmosphere.cpr.DefaultCometSupportResolver.newCometSupport(DefaultCometSupportResolver.java:178) org.atmosphere.cpr.DefaultCometSupportResolver.resolveWebSocket(DefaultCometSupportResolver.java:223) org.atmosphere.cpr.DefaultCometSupportResolver.resolve(DefaultCometSupportResolver.java:217) org.atmosphere.cpr.AtmosphereServlet.autoDetectContainer(AtmosphereServlet.java:900) org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:530) org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765) org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662)

I've set everything up as in the demos. 我已经按照演示中的说明进行了所有设置。 too

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM