为什么不通过 sar/META.INF/jboss-service.xml 中的 SystemPropertiesService 配置 JBoss 系统属性

发布于 2025-01-06 21:18:39 字数 534 浏览 7 评论 0原文

在 JBoss 5.0.1 上,我已配置deploy/properties-service.xml 来引用这样的属性文件...

<属性名称=“URLList”> ${jboss.server.config.url}myconfig.properties

myconfig.properties 文件中配置的属性适用于某些文件(例如:deploy/postgres-ds.xml)。但是这些属性在deploy/my.sar/META-INF/jboss-service.xml中没有被正确替换

我也尝试将属性添加到properties-service.xml中,如下所示

<属性名称=“属性”> my.property=值 这是行不通的。

但是如果我在 run.conf 中添加 -Dmy.property=value ,该属性将在 jboss-service 中被替换。有人有什么建议吗?

On JBoss 5.0.1 I have configured the deploy/properties-service.xml to reference a properties file like this...


<attribute name="URLList">
${jboss.server.config.url}myconfig.properties
</attribute>

The properties that are configured in the myconfig.properties file work some files (ex: deploy/postgres-ds.xml). But the properties are not properly substituted within a deploy/my.sar/META-INF/jboss-service.xml

I also tried adding the properties to the properties-service.xml like so


<attribute name="Properties">
my.property=value
</attribute>

which doesn't work.

But if I add -Dmy.property=value in the run.conf the property IS substituted in the jboss-service. Any one have any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乱世争霸 2025-01-13 21:18:39

我猜您的 my.sar 是在 properties-service.xml 之前加载的。
尝试在第二个上添加第一个的 mbean 依赖关系。

jboss 还有一个 -p 命令行选项,可以在早期启动时加载 *.properties 文件。

I guess your my.sar get's loaded before properties-service.xml.
Try to add mbean-dependency for the first on the second.

There is also a -p command line option for jboss to load *.properties file on early startup.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文