为什么不通过 sar/META.INF/jboss-service.xml 中的 SystemPropertiesService 配置 JBoss 系统属性
在 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我猜您的
my.sar
是在properties-service.xml
之前加载的。尝试在第二个上添加第一个的 mbean 依赖关系。
jboss 还有一个
-p
命令行选项,可以在早期启动时加载 *.properties 文件。I guess your
my.sar
get's loaded beforeproperties-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.