java 我们在哪里可以找到 Jboss EAP 6 中的 Server.xml?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17987181/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-01 19:45:50  来源:igfitidea点击:

Where can we find Server.xml in Jboss EAP 6?

javadeploymentjbosssettingjboss-eap-6

提问by newProgramer

I am trying some performance tuning and following Jboss performance tuning guide. so i read chapter 3, and i want to turn of Cached Connection Manager. but there is mentioned its configuration is in server.xml. I can't find server.xml anywhere. I am using jboss-eap-6.1 on windows 7. So my question where i will find server.xml or how can i turn off Cached Connection Manager ??

我正在尝试一些性能调优并遵循 Jboss 性能调优指南。所以我读了第 3 章,我想关闭缓存连接管理器。但有提到它的配置在 server.xml 中。我在任何地方都找不到 server.xml。我在 Windows 7 上使用 jboss-eap-6.1。所以我的问题是在哪里可以找到 server.xml 或如何关闭缓存连接管理器?

here is the text from tunning guide :

这是调优指南中的文字:

The configuration is in the file server.xml in the directory JBOSS_EAP_DIST/jboss-as/server//deploy/jbossweb.sar. Note that the minimal configuration does not include JBoss Web. Below is an extract from server.xml in which the CachedConnectionManager is enabled.

配置位于 JBOSS_EAP_DIST/jboss-as/server//deploy/jbossweb.sar 目录下的 server.xml 文件中。请注意,最低配置不包括 JBoss Web。下面是 server.xml 的摘录,其中启用了 CachedConnectionManager。

 <!-- Check for unclosed connections and transaction terminated checks in servlets/jsps.   Important: The dependency on the CachedConnectionManager in META-INF/jboss-service.xml must be  uncommented, too -->

 <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"  cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager" transactionManagerObjectName="jboss:service=TransactionManager" />

To disable the CachedConnectionManager, comment the last three lines, as per the following example:

要禁用 CachedConnectionManager,请按照以下示例注释最后三行:

 <!-- Check for unclosed connections and transaction terminated checks in servlets/jsps. Important: The dependency on the CachedConnectionManager in META-INF/jboss-service.xml must be uncommented, too
 <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve" cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager" transactionManagerObjectName="jboss:service=TransactionManager" /> -->

Another configuration file also needs to be edited: jboss-beans.xml in the JBOSS_EAP_DIST/jboss-as/server//deploy/jbossweb.sar/META-INF directory. Note that the minimal configuration does not include JBoss Web. This file is used by the micro-container for JBoss Web's integration with it, and it specifies the connections between the dependent components. In this case, the CachedConnectionManager's valve is dependent on the transaction manager. So, in order to get rid of the valve properly, we have to remove the dependency information from this configuration file. The pertinent information is at the top of the file, and it looks like the following:

另一个配置文件也需要编辑:JBOSS_EAP_DIST/jboss-as/server//deploy/jbossweb.sar/META-INF目录下的jboss-beans.xml。请注意,最低配置不包括 JBoss Web。这个文件被微容器用于 JBoss Web 与它的集成,它指定了依赖组件之间的连接。在这种情况下,CachedConnectionManager 的阀依赖于事务管理器。所以,为了正确地摆脱阀门,我们必须从这个配置文件中删除依赖信息。相关信息位于文件顶部,如下所示:

 <!-- Only needed if the org.jboss.web.tomcat.service.jca.CachedConnectionValve is enabled in the tomcat server.xml file. -? 
  <depends>jboss.jca:service=CachedConnectionManager</depends>

 <!-- Transaction manager for unfinished transaction checking in the CachedConnectionValve -->
  <depends>jboss:service=TransactionManager</depends>

Comment these lines as in the following example: jboss.jca:service=CachedConnectionManager -? jboss:service=TransactionManager</depends>-->

注释这些行,如下例所示: jboss.jca:service=CachedConnectionManager -? jboss:service=TransactionManager</depends>-->

回答by codethulhu

The version of EAP you are using has a different file structure from what your configuration guide is telling you. Are you using a configuration guide for JBoss AS 6 to configure JBoss EAP 6? If so, this is the source of your frustration. The instructions you have are for what looks like an EAP 5 file structure. You can find EAP 6 documentation here.

您使用的 EAP 版本的文件结构与您的配置指南告诉您的文件结构不同。您是否使用 JBoss AS 6 的配置指南来配置 JBoss EAP 6?如果是这样,这就是您沮丧的根源。您所拥有的说明适用于看起来像 EAP 5 文件结构的内容。您可以在此处找到 EAP 6 文档。

If you are running in standalone mode, your config will be found at ${JBOSS_HOME}/standalone/configuration/standalone.xml

如果您在独立模式下运行,您的配置将在 ${JBOSS_HOME}/standalone/configuration/standalone.xml 中找到