我在使用 jboss 上部署的 jar 作为模块时遇到问题。
我知道我应该通过以下方式创建一个全局模块:创建 JBOSS_HOME/modules 的子文件夹,复制 jar 并创建 module.xml 文件,但这里http://blog.tier2consulting.com/2013/04/02/understanding- modules-in-jboss-enterprise-application-platform-6/,更正式地说,这里是https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Development_Guide/chap-Class_Loading_and_Modules.html,我逐字阅读,
Dynamic Modules are created and loaded by the application server for each JAR or WAR deployment (or subdeployment in an EAR). The name of a dynamic module is derived from the name of the deployed archive.
不过,当我部署 JAR 时,我只能在 JBOSS 日志文件中看到:
16:06:18,698 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "Test.jar"
16:06:18,964 INFO [org.jboss.as.server] (HttpManagementService-threads - 14) JBAS018559: Deployed "Test.jar"
而在我链接的第一个站点上示例的日志文件中,还有一行,即:
Register module: Module "deployment.utils.jar:main" from Service Module Loader
它是仅在 EAP 6 上可用的东西,还是在 JBOSS AS 7.1.1-Final 或 JBOSS AS 7.1.1-Final 上也有可能实现这样的结果,您不得不使用文件夹 JBOSS_HOME/modules?