Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

Файл standalone.xml

Добавить, если не указано, расширение 

Блок кода
themeEclipse
extension module="org.jboss.as.weld" и сам модуль <subsystem xmlns="urn:jboss:domain:weld:4.0"/>

(Можно скопировать из стандартного конфига standalone.xml WF)

Добавить ссылку на server.properties

Блок кода
themeEclipse
<system-properties>
    .
    <property name="jboss.as.management.blocking.timeout" value="7200"/>
    <property name="server.properties.location" value="/opt/cm-data/"/>
</system-properties>

Добавить подключение к СУБД (база и пользователь должны быть предварительно созданы)

Блок кода
<datasource jta="true" jndi-name="java:jboss/datasources/AM" pool-name="AMDatasource" enabled="true" use-ccm="false">
    <connection-url>jdbc:postgresql://DBSERVER:5432/amdb</connection-url>
    <driver-class>org.postgresql.Driver</driver-class>
    <driver>postgresql-42.2.5.jar</driver>
    <pool>
        <min-pool-size>2</min-pool-size>
        <initial-pool-size>5</initial-pool-size>
        <max-pool-size>10</max-pool-size>
        <use-strict-min>true</use-strict-min>
        <flush-strategy>IdleConnections</flush-strategy>
    </pool>
    <security>
        <user-name>USER</user-name>
        <password>PASSWORD</password>
    </security>
    <timeout>
        <set-tx-query-timeout>true</set-tx-query-timeout>
        <idle-timeout-minutes>5</idle-timeout-minutes>
    </timeout>
</datasource>

Модуль domain:security

Добавить security-domain AM

Блок кода
themeEclipse
<security-domain name="AM">
        <authentication>
            <login-module code="org.jboss.security.ClientLoginModule" flag="optional"/>
            <login-module code="Remoting" flag="optional">
                <module-option name="password-stacking" value="useFirstPass"/>
            </login-module>
            <login-module code="Database" flag="required">
                <module-option name="dsJndiName" value="java:jboss/datasources/AM"/>
                <module-option name="hashAlgorithm" value="MD5"/>
                <module-option name="hashEncoding" value="hex"/>
                <module-option name="principalsQuery" value="SELECT info.password from authentication_info info where info.user_uid = ?"/>
                <module-option name="rolesQuery" value="SELECT 'cm_user', 'Roles' from authentication_info where user_uid = ?"/>
            </login-module>
        </authentication>
    </security-domain>
</security-domains>

Модуль subsystem xmlns="urn:jboss:domain:ejb

Добавить блок mdb, если нет

Блок кода
themeEclipse
<mdb>
    <resource-adapter-ref resource-adapter-name="RemoteConnectionFactory"/>
    <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>

Добавить max-threads count и keepalive-time

Блок кода
themeEclipse
<thread-pools>
    .
    .
    <thread-pool name="timer-pool">
        <max-threads count="10"/>
        <keepalive-time time="100" unit="milliseconds"/>
    </thread-pool>
</thread-pools>

Разрешить выполнение методов между модулями приложения

Блок кода
themeEclipse
<default-missing-method-permissions-deny-access value="false"/>

Модуль messaging-activemq

Добавить топики, фабрики и коннекторы, по аналогии с указанным ниже:

Блок кода
themeEclipse
<subsystem xmlns="urn:jboss:domain:messaging-activemq:9.0">
    <remote-connector name="remote-artemis" socket-binding="remote-artemis"/>
    <connection-factory name="AmConnectionFactory" connectors="remote-artemis" entries="java:/ConnectionFactory java:/AmConnectionFactory"/>
    <pooled-connection-factory name="RemoteConnectionFactory" entries="java:/JmsXA java:/jms/cm/connection-factory java:/LocalConnectionFactory java:/RemoteConnectionFactory java:/AmPooledConnectionFactory" connectors="remote-artemis" connection-ttl="60000" confirmation-window-size="1048576" transaction="xa" max-pool-size="200"/>
    <external-jms-queue name="to-am" entries="java:/jms/cm/am/queue/to-am"/>
    <external-jms-queue name="am-to-any" entries="java:/jms/cm/am/queue/am-to-any"/>
    <external-jms-topic name="ConfigurationUpdateTopic" entries="topic/ConfigurationUpdateTopic"/>
    <external-jms-topic name="ClusterNotificationTopic" entries="topic/ClusterNotificationTopic"/>
    <external-jms-topic name="am-to-many" entries="java:/jms/cm/am/topic/am-to-many"/>
    <external-jms-topic name="chlog" entries="java:/jms/cm/topic/chlog"/>
</subsystem>

Модуль socket-binding-group

Добавить адрес Artemis для подключения

Блок кода
themeEclipse
<outbound-socket-binding name="remote-artemis">
    <remote-destination host="ARTEMIS.server" port="61616"/>
</outbound-socket-binding>

Содержание

Оглавление

Файл server.properties

Пример server.properties - единственная специфика, это указание свойства datasource.master

Блок кода
themeEclipse
########################################
# Attachment storage
########################################
attachment.storage=/opt/cm-data/temp/attachments
attachment.temp.storage=/opt/cm-data/temp/attachments-temp
datasource.master=java:jboss/datasources/AM
attachments.strict.mode=false
########################################
# Solr search engine settings
########################################
# Uncommenting "search.solr.url" property causes using of external Solr engine!
#search.solr.url=http://localhost:8080/solr
#Configures the home directory of Solr. Configure this property only for external Solr.
search.solr.home=/opt/cm-data/temp/solr-home
# Following properties are used for embedded Solr engine only
search.solr.data=/opt/cm-data/temp/solr-data
#search.solr.collection=collection1
notification.service.enableOnStart=false
schedule.service.enableOnStart=true
server.name=agent-manager
cluster.manager=true
########################################
# Mail server configuration
########################################
mail.server.host=mail.example.com
mail.username=admin
mail.password=PassWord345
mail.default.sender=Company Media<cm@intertrust.ru>
########################################
# SQL logger
########################################
# Log SQL query with WARN level if SQL run duration more than specified milliseconds
sql.trace.warn.minTime=10000
# Log SQL query with WARN level if SQL resultset has more than specified rows
sql.trace.warn.minRows=50000
# Show SQL parameters in log. Makes log write slower.
sql.trace.resolveParams=false
report.template.cache=/opt/cm-data/temp/report-template-cache


При необходимости имена очередей и фабрик соединений можно переконфигурировать в файле server.properties и дать им произвольные имена. Список свойств, которые можно задать, чтобы изменить имена очередей и их значения по-умолчанию:

Блок кода
themeEclipse
# имя pooled-фабрики соединений, по умолчанию значение: java:/JmsXA
am.jndi.jms.connection.factory.pooled=java:/JmsXA
  
# имя nonpooled-фабрики соединений
am.jndi.jms.connection.factory.non-pooled=java:/ConnectionFactory
  
# имя топика для служебных сообщений от МА к КМА
am.jndi.jms.am-to-many = java:/jms/cm/am/topic/am-to-many
  
  
# имя очереди для служебных сообщений от МА к КМА
# am.jndi.jms.am-to-any=java:/jms/cm/am/queue/am-to-any
  
# имя очереди для служебных сообщений от КМА к МА
am.jndi.jms.to-am=java:/jms/cm/am/queue/to-am