Show Table of Contents
9.4. 安装 Global Valve
全局 Valve 必须打包和安装为 JBoss EAP 6 里的静态模块。这个任务展示了如何安装模块。
预备条件:
- Valve 必须已被创建且打包在 JAR 文件里。
- 必须为这个模块创建一个
module.xml文件。关于module.xml文件的例子,请参考 第 7.1.1 节 “模块”。
过程 9.1. 安装全局模块(Global Module)
创建模块安装目录
在应用服务器的 modules 目录里必须创建一个安装模块的目录。EAP_HOME/modules/system/layers/base/MODULENAME/main
$ mkdir -P EAP_HOME/modules/system/layers/base/MODULENAME/main
复制文件
复制 JAR 和module.xml文件到步骤 1 创建的目录里。$ cp MyValves.jar module.xml EAP_HOME/modules/system/layers/base/MODULENAME/main
模块里声明的 Valve 类现在可在 web 子系统里进行配置。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.