JBoss 如何选择使用哪个 AJP 端口?
在 JBoss 5.1.0 中,有一个名为
的文件,其中包含一些用于将偏移量应用到端口号。这用于使多个实例能够在同一机器上运行,而无需为每个实例进行痛苦的端口重新配置。同一文件中还有一些 XSLT 也修改了 AJP 端口。
此外,还有
可以让您显式设置端口。
我在同一个机器上运行两个 JBoss 实例。
- 实例 1:
server.xml
设置为对 AJP 使用端口 8009,并且bindings-jboss-beans.xml
的偏移量为零。 - 实例 2:
server.xml
设置为对 AJP 使用端口 8109,并且bindings-jboss-beans.xml
的偏移量为 100。XSLT
似乎配置为当端口设置为默认 (8009) 时,更改 AJP 端口号。然而,这似乎并没有发生。
据我所知,AJP 端口是由 server.xml
中的值而不是 bindings-jboss-beans.xml
中的任何值选择的。确实是这样吗? bindings-jboss-beans.xml 中的 XSLT 是 JBoss 4 的遗留物吗?
谢谢
里奇
In JBoss 5.1.0, there is a file called <INSTANCE>/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
which includes some settings for applying an offset to the port numbers. This is used to enable multiple instances to run on the same box without going through painful reconfiguration of the ports for each instance. There is also some XSLT in the same file which also modifies the AJP port.
In addition, there is <INSTANCE>/deploy/jbossweb.sar/server.xml
which lets you set the ports explicitly.
I am running two instances of JBoss on the same box.
- Instance 1:
server.xml
is set to use port 8009 for AJP, andbindings-jboss-beans.xml
has a zero offset. - Instance 2:
server.xml
is set to use port 8109 for AJP, andbindings-jboss-beans.xml
has an offset of 100.
The XSLT seems to be configured to change the AJP port number when the port is set to be the default (8009). However, that doesn't seem to be happening.
From what I can see, the AJP port is chosen by the value in server.xml
rather than any value in bindings-jboss-beans.xml
. Is this definitely the case? Is the XSLT inside bindings-jboss-beans.xml a relic from JBoss 4?
Thanks
Rich
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我终于抽出时间进行一些实验,现在可以回答我自己的问题了。
如果
server.xml
中的端口设置为 8009,则应用bindings-jboss-beans.xml
中的偏移量,否则采用server.xml 中设置的端口。使用 xml
。I finally got round to running a few experiments, and can now answer my own question.
If the port is set to 8009 in
server.xml
, then the offset inbindings-jboss-beans.xml
is applied, otherwise the port set inserver.xml
is used.