JBoss 7.1.1 和 JBoss Web Native

标签 jboss jboss7.x apr

我正在尝试启用 JBoss Web Native libraries在 JBoss 7.1.1 中。我已阅读 this问题和答案,并尝试了以下步骤来启用 JBoss 中的 native 库,但到目前为止还没有奏效。我在 OS X 上:

  • http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-10 下载了 macosx 存档
  • 将其解压到 JBoss 目录中,因此归档的内容在 bin/native 中可用。 .
  • 更新 bin/standalone.conf包含库路径:JAVA_OPTS="$JAVA_OPTS -Djava.library.path=/path/to/jboss-as-7.1.1.Final-native/bin/native:$PATH"

  • 启动 JBoss,我仍然可以在日志文件中看到以下内容:
    [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
    

    而不是预期的 Http11AprProtocol .

    我错过了什么?

    最佳答案

    事实证明,JBoss 7.1.1 不再需要上述步骤,因为 native 库现在捆绑在 modules/org/jboss/as/web/main/lib 下。 .

    为了启用它们,我必须在 standalone.xml 中的 web 子系统中将 native 属性设置为 true。 .出于某种原因,它在默认配置中设置为 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>
    

    关于JBoss 7.1.1 和 JBoss Web Native,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10227993/

    相关文章:

    Spring Controller 和拦截器之间是什么

    c - apache 可移植运行时库中的文件 IO

    c - 如何使用 apr_file_open() 创建文件

    java - 使用自定义版本的 Artifact 而不是 repo 中的 Artifact 构建 Maven 项目

    java - JBoss 7.1.1 Final、Weld 和 Seam 3 上的 Hibernate Search

    eclipse - JBoss AS 7 中的 FileNotFoundException

    java - 如何使用 Maven 构建和部署远程 EJB?

    web-applications - 如何在 JBoss 中使用服务器的主机名而不是 localhost?

    java - 从 Eclipse : Service service jboss. 部署 jbpm-console.war 未找到 ejb.default-resource-adapter-name-service

    HttpServletRequest 中的 JSP 参数名称