通过JBOSS-DEPLOYMEMT structure.xml访问Wildfly / App Server库的可能性?
我有一个在Wildfly App Server(22.x)上运行的Web应用程序。它包含一个战争文件,该文件具有(除了实际功能之外),可以通过JMX查询野生蝇本身,并在简单的HTML页面上显示该数字。 最初添加了以下依赖性(通过Maven)来进行这项工作:
<dependency>
<groupId>org.jboss.remotingjmx</groupId>
<artifactId>remoting-jmx</artifactId>
<version>3.0.4.Final</version>
但是,这种依赖性带来了很多其他及物依赖性如jboss-marshalling,xnio,xnio,jboss-threads,jboss-threads,jboss-threads,wildfly-*,(... ) - 无论如何,Wildfly App服务器中确实存在的所有软件包。因此,我想知道是否可以使用这些应用程序服务器软件包,而不是将其捆绑为战争的一部分。我试图将以下内容添加到jboss-deployment structure.xml到耳朵:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.3">
<deployment>
<dependencies>
<system export="true">
<paths>
<path name="sun/reflect"/>
</paths>
</system>
</dependencies>
</deployment>
<sub-deployment name="service.war">
<dependencies>
<module name="org.jboss.remoting3.remoting-jmx" services="import"/>
</dependencies>
</sub-deployment>
但是它不起作用 - 一旦将依赖项从战争文件中删除后,它就停止工作了。我的问题:
是否可以指定/配置部署结构文件以允许从应用程序服务器中访问必要的软件包?(我知道这是一个野生蝇的特定解决方案,但这是打算的)
I have a web application running on a wildfly app server (22.X). It contains a war file which has the ability (besides the actual functionality) to query the wildfly itself for its active running sessions via JMX and display that number on an simple html page.
Originally the following dependency was added (via maven) to make this work:
<dependency>
<groupId>org.jboss.remotingjmx</groupId>
<artifactId>remoting-jmx</artifactId>
<version>3.0.4.Final</version>
However this dependency brings lots of other transitive dependencies along like jboss-marshalling, xnio, jboss-threads, wildfly-*, (...) - all packages which does exist within the wildfly app server anyway. So I was wondering whether it is possible to use those app server packages instead of bundling it as part of the war. I tried to add the following to the jboss-deployment-structure.xml to the EAR:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.3">
<deployment>
<dependencies>
<system export="true">
<paths>
<path name="sun/reflect"/>
</paths>
</system>
</dependencies>
</deployment>
<sub-deployment name="service.war">
<dependencies>
<module name="org.jboss.remoting3.remoting-jmx" services="import"/>
</dependencies>
</sub-deployment>
However it didn't work - as soon as the dependencies were removed from the war file it stopped working. My question:
Is it possible to specify/configure the deployment structure file to allow access to the necessary packages from the application server? (I know that this is a wildfly specific solution but this is intended)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来这个模块已移至
org.jboss.remoting-jmx
。org.jboss.remoting3.remoting-jmx
确实导出了org.jboss.remoting-jmx-jmx
Module in Wildfly 22中的模块,但是服务不导出,这可能是问题。无论哪种方式,最好使用
org.jboss.remoting-jmx
。It looks like this module has moved to
org.jboss.remoting-jmx
. Theorg.jboss.remoting3.remoting-jmx
does export theorg.jboss.remoting-jmx
module in WildFly 22, however the services are not exported which could be the issue.Either way, it's best to use the
org.jboss.remoting-jmx
.