在jboss域配置中组织大量配置文件

时间:2016-04-25 12:31:06

标签: jboss jboss-eap-6

我有一个包含10-20个配置文件的jboss域服务器。

基本上我有10-20个相同应用程序的实例在不同的端口上运行。

配置文件上的设置是90%相同,唯一的区别是数据源和日志记录配置。

我正在为每个应用程序实例复制/粘贴一个配置文件,因此我的 domain.xml 正在迅速变得越来越大,并且大多数设置都是重复的。

如果我可以做以下两件事之一,那将有助于我更容易维护:

  1. 有没有办法重用配置文件并从服务器组传递参数,以便更改一些配置。
  2. 示例:

        <server-group name="instance1-group" profile="common_template-ha">
              <!-- This are the bits and pieces that are different between instances  -->
              <datasource>
                   .... configuration
              </datasource>
              <logging>
                   .... configuration
              </logging>
        </server-group>
    
    1. 我可以将 domain.xml 文件拆分成几个不同的小文件,每个文件都包含一个配置文件配置吗?
    2. 示例:

      <profiles>
          <!-- profiles would be imported from 3 other files -->
          <profile source="profile-instance1.xml />
          <profile source="profile-instance2.xml />
          <profile source="profile-instance3.xml />
      </profiles>
      

0 个答案:

没有答案
相关问题