From 1afca08c23997ce015ffda54ec13e3355257a947 Mon Sep 17 00:00:00 2001 From: Ivo Studensky Date: Mon, 22 Mar 2021 08:36:46 +0100 Subject: [PATCH] [CLOUD-3648] added pool initial size, pool fair, pool use strict min, incrementer class, decrementer class and admin object properties configuration via env variables --- .../added/launch/resource-adapters-common.sh | 166 ++++++++++++++++-- .../launch/resource-adapters/module.yaml | 26 ++- .../test/resource-adapters.bats | 41 ++++- 3 files changed, 211 insertions(+), 22 deletions(-) diff --git a/jboss/container/wildfly/launch/resource-adapters/added/launch/resource-adapters-common.sh b/jboss/container/wildfly/launch/resource-adapters/added/launch/resource-adapters-common.sh index 27ac5ce3..d924712a 100644 --- a/jboss/container/wildfly/launch/resource-adapters/added/launch/resource-adapters-common.sh +++ b/jboss/container/wildfly/launch/resource-adapters/added/launch/resource-adapters-common.sh @@ -18,11 +18,23 @@ function clearResourceAdapterEnv() { unset ${prefix}_RECOVERY_PASSWORD unset ${prefix}_ADMIN_OBJECTS unset ${prefix}_TRACKING + unset ${prefix}_POOL_INITIAL_SIZE + unset ${prefix}_POOL_FAIR + unset ${prefix}_POOL_USE_STRICT_MIN + unset ${prefix}_POOL_CAPACITY_INCREMENTER_CLASS + unset ${prefix}_POOL_CAPACITY_DECREMENTER_CLASS for xa_prop in $(compgen -v | grep -s "${prefix}_PROPERTY_"); do unset ${xa_prop} done + for inc_prop in $(compgen -v | grep -s "${prefix}_POOL_CAPACITY_INCREMENTER_PROPERTY_"); do + unset ${inc_prop} + done + for dec_prop in $(compgen -v | grep -s "${prefix}_POOL_CAPACITY_DECREMENTER_PROPERTY_"); do + unset ${dec_prop} + done + for admin_object in $(compgen -v | grep -s "${prefix}_ADMIN_OBJECT_"); do unset ${admin_object} done @@ -183,7 +195,6 @@ function add_connection_definitions() { local ra_addr="${3}" tracking=$(find_env "${ra_prefix}_TRACKING") - ra_props=$(compgen -v | grep -s "${ra_prefix}_PROPERTY_") ra_pool_min_size=$(find_env "${ra_prefix}_POOL_MIN_SIZE") ra_pool_max_size=$(find_env "${ra_prefix}_POOL_MAX_SIZE") ra_pool_prefill=$(find_env "${ra_prefix}_POOL_PREFILL") @@ -192,6 +203,11 @@ function add_connection_definitions() { recovery_username=$(find_env "${ra_prefix}_RECOVERY_USERNAME") recovery_password=$(find_env "${ra_prefix}_RECOVERY_PASSWORD") ra_pool_xa=$(find_env "${ra_prefix}_POOL_XA") + ra_pool_initial_size=$(find_env "${ra_prefix}_POOL_INITIAL_SIZE") + ra_pool_fair=$(find_env "${ra_prefix}_POOL_FAIR") + ra_pool_use_strict_min=$(find_env "${ra_prefix}_POOL_USE_STRICT_MIN") + ra_pool_capacity_incrementer_class=$(find_env "${ra_prefix}_POOL_CAPACITY_INCREMENTER_CLASS") + ra_pool_capacity_decrementer_class=$(find_env "${ra_prefix}_POOL_CAPACITY_DECREMENTER_CLASS") if [ "${mode}" = "xml" ]; then resource_adapter="${resource_adapter}" + ra_props="$(add_config_properties ${mode} "${ra_prefix}_PROPERTY_" "" "")" if [ -n "$ra_props" ]; then - for ra_prop in $(echo $ra_props); do - prop_name=$(echo "${ra_prop}" | sed -e "s/${ra_prefix}_PROPERTY_//g") - prop_val=$(find_env $ra_prop) - - resource_adapter="${resource_adapter}${prop_val}" - done + resource_adapter="${resource_adapter}${ra_props}" fi - if [ -n "$ra_pool_min_size" ] || [ -n "$ra_pool_max_size" ] || [ -n "$ra_pool_prefill" ] || [ -n "$ra_pool_flush_strategy" ]; then + if [ -n "$ra_pool_min_size" ] || [ -n "$ra_pool_max_size" ] || [ -n "$ra_pool_prefill" ] || [ -n "$ra_pool_flush_strategy" ]; + || [ -n "$ra_pool_is_same_rm_override" ]; || [ -n "$ra_pool_capacity_incrementer_class" ]; || [ -n "$ra_pool_capacity_decrementer_class" ]; + || [ -n "$ra_pool_initial_size" ]; || [ -n "$ra_pool_fair" ]; || [ -n "$ra_pool_use_strict_min" ]; then if [ -n "$ra_pool_xa" ] && [ "$ra_pool_xa" == "true" ]; then resource_adapter="${resource_adapter}" else @@ -222,6 +236,10 @@ function add_connection_definitions() { resource_adapter="${resource_adapter}${ra_pool_min_size}" fi + if [ -n "$ra_pool_initial_size" ]; then + resource_adapter="${resource_adapter}${ra_pool_initial_size}" + fi + if [ -n "$ra_pool_max_size" ]; then resource_adapter="${resource_adapter}${ra_pool_max_size}" fi @@ -230,6 +248,14 @@ function add_connection_definitions() { resource_adapter="${resource_adapter}${ra_pool_prefill}" fi + if [ -n "$ra_pool_fair" ]; then + resource_adapter="${resource_adapter}${ra_pool_fair}" + fi + + if [ -n "$ra_pool_use_strict_min" ]; then + resource_adapter="${resource_adapter}${ra_pool_use_strict_min}" + fi + if [ -n "$ra_pool_flush_strategy" ]; then resource_adapter="${resource_adapter}${ra_pool_flush_strategy}" fi @@ -238,6 +264,27 @@ function add_connection_definitions() { resource_adapter="${resource_adapter}${ra_pool_is_same_rm_override}" fi + if [ -n "$ra_pool_capacity_incrementer_class" ] || [ -n "$ra_pool_capacity_decrementer_class" ]; then + resource_adapter="${resource_adapter}" + if [ -n "$ra_pool_capacity_incrementer_class" ]; then + resource_adapter="${resource_adapter}" + incrementer_props="$(add_config_properties ${mode} "${ra_prefix}_POOL_CAPACITY_INCREMENTER_PROPERTY_" "" "")" + if [ -n "$incrementer_props" ]; then + resource_adapter="${resource_adapter}${incrementer_props}" + fi + resource_adapter="${resource_adapter}" + fi + if [ -n "$ra_pool_capacity_decrementer_class" ]; then + resource_adapter="${resource_adapter}" + decrementer_props="$(add_config_properties ${mode} "${ra_prefix}_POOL_CAPACITY_DECREMENTER_PROPERTY_" "" "")" + if [ -n "$decrementer_props" ]; then + resource_adapter="${resource_adapter}${decrementer_props}" + fi + resource_adapter="${resource_adapter}" + fi + resource_adapter="${resource_adapter}" + fi + if [ -n "$ra_pool_xa" ] && [ "$ra_pool_xa" == "true" ]; then resource_adapter="${resource_adapter}" else @@ -283,7 +330,10 @@ function add_connection_definitions() { conn_def_add="${conn_def_add}, tracking=\"${tracking}\"" fi - if [ -n "$ra_pool_min_size" ] || [ -n "$ra_pool_max_size" ] || [ -n "$ra_pool_prefill" ] || [ -n "$ra_pool_flush_strategy" ]; then + pool_capacity_properties= + if [ -n "$ra_pool_min_size" ] || [ -n "$ra_pool_max_size" ] || [ -n "$ra_pool_prefill" ] || [ -n "$ra_pool_flush_strategy" ]; + || [ -n "$ra_pool_is_same_rm_override" ]; || [ -n "$ra_pool_capacity_incrementer_class" ]; || [ -n "$ra_pool_capacity_decrementer_class" ]; + || [ -n "$ra_pool_initial_size" ]; || [ -n "$ra_pool_fair" ]; || [ -n "$ra_pool_use_strict_min" ]; then # Whether the pool is written out again as an xa-pool depends on if the RA has transaction-support=="XATransaction" # from the model point of view $pool_xa which for the xml case chooses between and seems to have no effect @@ -291,6 +341,10 @@ function add_connection_definitions() { conn_def_add="${conn_def_add}, min-pool-size=${ra_pool_min_size}" fi + if [ -n "$ra_pool_initial_size" ]; then + conn_def_add="${conn_def_add}, initial-pool-size=${ra_pool_initial_size}" + fi + if [ -n "$ra_pool_max_size" ]; then conn_def_add="${conn_def_add}, max-pool-size=${ra_pool_max_size}" fi @@ -299,6 +353,14 @@ function add_connection_definitions() { conn_def_add="${conn_def_add}, pool-prefill=${ra_pool_prefill}" fi + if [ -n "$ra_pool_fair" ]; then + conn_def_add="${conn_def_add}, pool-fair=${ra_pool_fair}" + fi + + if [ -n "$ra_pool_use_strict_min" ]; then + conn_def_add="${conn_def_add}, pool-use-strict-min=${ra_pool_use_strict_min}" + fi + if [ -n "$ra_pool_flush_strategy" ]; then conn_def_add="${conn_def_add}, flush-strategy=${ra_pool_flush_strategy}" fi @@ -306,6 +368,24 @@ function add_connection_definitions() { if [ -n "$ra_pool_is_same_rm_override" ]; then conn_def_add="${conn_def_add}, same-rm-override=${ra_pool_is_same_rm_override}" fi + + if [ -n "$ra_pool_capacity_incrementer_class" ] || [ -n "$ra_pool_capacity_decrementer_class" ]; then + if [ -n "$ra_pool_capacity_incrementer_class" ]; then + conn_def_add="${resource_adapter}, capacity-incrementer-class=${ra_pool_capacity_incrementer_class}" + incrementer_props="$(add_config_properties ${mode} "${ra_prefix}_POOL_CAPACITY_INCREMENTER_PROPERTY_" "${conn_def_addr}" "capacity-incrementer-properties")" + if [ -n "$incrementer_props" ]; then + pool_capacity_properties="${pool_capacity_properties}${incrementer_props}" + fi + fi + if [ -n "$ra_pool_capacity_decrementer_class" ]; then + conn_def_add="${resource_adapter}, capacity-decrementer-class=${ra_pool_capacity_decrementer_class}" + decrementer_props="$(add_config_properties ${mode} "${ra_prefix}_POOL_CAPACITY_DECREMENTER_PROPERTY_" "${conn_def_addr}" "capacity-decrementer-properties")" + if [ -n "$decrementer_props" ]; then + pool_capacity_properties="${pool_capacity_properties}${decrementer_props}" + fi + fi + fi + fi if [ -n "$recovery_username" ] && [ -n "$recovery_password" ]; then @@ -317,19 +397,53 @@ function add_connection_definitions() { ${conn_def_add} " + if [ -n "${pool_capacity_properties}" ]; then + resource_adapter="${resource_adapter} + ${pool_capacity_properties} + " + fi + + ra_props="$(add_config_properties ${mode} "${ra_prefix}_PROPERTY_" "${conn_def_addr}" "")" if [ -n "$ra_props" ]; then - for ra_prop in $(echo $ra_props); do - prop_name=$(echo "${ra_prop}" | sed -e "s/${ra_prefix}_PROPERTY_//g") - prop_val=$(find_env $ra_prop) - resource_adapter="${resource_adapter} - ${conn_def_addr}/config-properties=${prop_name}:add(value=\"${prop_val}\") - " - done + resource_adapter="${resource_adapter} + ${ra_props} + " fi fi } +function add_config_properties() { + local mode="${1}" + local prefix="${2}" + local addr="${3}" + local attribute_name="${4}" + + local props=$(compgen -v | grep -s "${prefix}") + + local config_properties= + if [ -n "${props}" ]; then + for prop in $(echo ${props}); do + prop_name=$(echo "${prop}" | sed -e "s/${prefix}//g") + prop_val=$(find_env ${prop}) + + if [ "${mode}" = "xml" ]; then + config_properties="${config_properties}${prop_val}" + elif [ "${mode}" = "cli" ]; then + if [ -n "${attribute_name}" ]; then + config_properties="${config_properties} + ${addr}:write-attribute(name=${attribute_name}.${prop_name}, value=\"${prop_val}\") + " + else + config_properties="${config_properties} + ${addr}/config-properties=${prop_name}:add(value=\"${prop_val}\") + " + fi + fi + done + fi + echo "$config_properties" +} function add_admin_objects() { admin_object_list="$1" @@ -342,14 +456,29 @@ function add_admin_objects() { for object in "${objects[@]}"; do class_name=$(find_env "${ra_prefix}_ADMIN_OBJECT_${object}_CLASS_NAME") physical_name=$(find_env "${ra_prefix}_ADMIN_OBJECT_${object}_PHYSICAL_NAME") + ao_props=$(compgen -v | grep -s "${ra_prefix}_ADMIN_OBJECT_${object}_PROPERTY_") if [ -n "$class_name" ] && [ -n "$physical_name" ]; then if [ "${mode}" = "xml" ]; then - admin_objects="${admin_objects}${physical_name}" + admin_objects="${admin_objects}${physical_name}" + + ao_props="$(add_config_properties ${mode} "${ra_prefix}_ADMIN_OBJECT_${object}_PROPERTY_" "" "")" + if [ -n "$ao_props" ]; then + admin_objects="${admin_objects}${ap_props}" + fi + admin_objects="${admin_objects}" + elif [ "${mode}" = "cli" ]; then admin_objects="${admin_objects} ${ra_addr}/admin-objects=\"${physical_name}\":add(class-name=\"$class_name\", jndi-name=\"java:/${physical_name}\", use-java-context=true) ${ra_addr}/admin-objects=\"${physical_name}\"/config-properties=PhysicalName:add(value=\"${physical_name}\") " + ao_props="$(add_config_properties ${mode} "${ra_prefix}_ADMIN_OBJECT_${object}_PROPERTY_" "${ra_addr}/admin-objects=\"${physical_name}\"" "")" + if [ -n "$ao_props" ]; then + admin_objects="${admin_objects} + ${ao_props} + " + fi + fi else log_warning "Cannot configure admin-object $object for resource adapter $ra_prefix. Missing ${ra_prefix}_ADMIN_OBJECT_${object}_CLASS_NAME and/or ${ra_prefix}_ADMIN_OBJECT_${object}_PHYSICAL_NAME" @@ -358,4 +487,5 @@ function add_admin_objects() { fi echo "$admin_objects" -} \ No newline at end of file +} + diff --git a/jboss/container/wildfly/launch/resource-adapters/module.yaml b/jboss/container/wildfly/launch/resource-adapters/module.yaml index b873f4f8..864df3fb 100644 --- a/jboss/container/wildfly/launch/resource-adapters/module.yaml +++ b/jboss/container/wildfly/launch/resource-adapters/module.yaml @@ -70,4 +70,28 @@ envs: example: "org.apache.activemq.command.ActiveMQQueue" - name: "${PREFIX}_ADMIN_OBJECT_${ADMIN_OBJECT_PREFIX}_PHYSICAL_NAME" description: "Name of the management resource created for this admin object" - example: "org.apache.activemq.command.ActiveMQQueue" \ No newline at end of file + example: "org.apache.activemq.command.ActiveMQQueue" + - name: "${PREFIX}_ADMIN_OBJECT_${ADMIN_OBJECT_PREFIX}_PROPERTY_{property_name}" + description: "These variables are used to add config-property entries to the administration object. The {property_name} defines the name of the property to add and the value will be the value configured on this environment variable." + example: "For example, if your administration object with prefix 'ActiveMQQueue' of your resource adapter with prefix 'TEST_RA' accepts any config-property despite 'PhysicalName', e.g. 'propA' and you want to set it to 'valueA', then your environment variable will be TEST_RA_ADMIN_OBJECT_ActiveMQQueue_PROPERTY_propA=valueA" + - name: "{PREFIX}_POOL_INITIAL_SIZE" + description: "The initial-pool-size element indicates the initial number of connections a pool should hold. This default to 0." + example: "1" + - name: "{PREFIX}_POOL_FAIR" + description: "Defines if pool use should be fair. Default is true" + example: "false" + - name: "{PREFIX}_POOL_USE_STRICT_MIN" + description: "Defines if the min-pool-size should be considered strict. Default is false." + example: "true" + - name: "{PREFIX}_POOL_CAPACITY_INCREMENTER_CLASS" + description: "Specifies the class name which defines the policy for incrementing connections in the pool." + example: "org.jboss.jca.core.connectionmanager.pool.capacity.WatermarkIncrementer" + - name: "{PREFIX}_POOL_CAPACITY_INCREMENTER_PROPERTY_{property_name}" + description: "These variables are used to add config-property entries to the pool capacity incrementer. The {property_name} defines the name of the property to add and the value will be the value configured on this environment variable." + example: "For example, if your capacity incrementer of your resource adapter with prefix 'TEST_RA' accepts a config-property named 'watermark' and you want to set it to '1', then your environment variable will be TEST_RA_POOL_CAPACITY_INCREMENTER_PROPERTY_watermark=1" + - name: "{PREFIX}_POOL_CAPACITY_DECREMENTER_CLASS" + description: "Specifies the class name which defines the policy for decrementing connections in the pool." + example: "org.jboss.jca.core.connectionmanager.pool.capacity.SizeDecrementer" + - name: "{PREFIX}_POOL_CAPACITY_DECREMENTER_PROPERTY_{property_name}" + description: "These variables are used to add config-property entries to the pool capacity decrementer. The {property_name} defines the name of the property to add and the value will be the value configured on this environment variable." + example: "For example, if your capacity decrementer of your resource adapter with prefix 'TEST_RA' accepts a config-property named 'size' and you want to set it to '2', then your environment variable will be TEST_RA_POOL_CAPACITY_DECREMENTER_PROPERTY_size=2" diff --git a/jboss/container/wildfly/launch/resource-adapters/test/resource-adapters.bats b/jboss/container/wildfly/launch/resource-adapters/test/resource-adapters.bats index 6f23f5b6..68062eef 100644 --- a/jboss/container/wildfly/launch/resource-adapters/test/resource-adapters.bats +++ b/jboss/container/wildfly/launch/resource-adapters/test/resource-adapters.bats @@ -47,14 +47,20 @@ teardown() { end-if batch /subsystem=resource-adapters/resource-adapter=activemq-rar-one:add(archive="activemq-rar-one.rar", transaction-support="XATransaction") - /subsystem=resource-adapters/resource-adapter=activemq-rar-one/connection-definitions=ConnectionFactory:add(class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory", jndi-name="java:/ConnectionFactory", enabled="true", use-java-context="true", tracking="true", min-pool-size=1, max-pool-size=5, pool-prefill=false, flush-strategy=EntirePool, same-rm-override=false, recovery-username="RecoveryUserName", recovery-password="RecoveryPassword") + /subsystem=resource-adapters/resource-adapter=activemq-rar-one/connection-definitions=ConnectionFactory:add(class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory", jndi-name="java:/ConnectionFactory", enabled="true", use-java-context="true", tracking="true", min-pool-size=1, initial-pool-size=1, max-pool-size=5, pool-prefill=false, pool-fair=false, pool-use-strict-min=true, flush-strategy=EntirePool, same-rm-override=false, recovery-username="RecoveryUserName", recovery-password="RecoveryPassword", capacity-incrementer-class=org.jboss.jca.core.connectionmanager.pool.capacity.WatermarkIncrementer, capacity-decrementer-class=org.jboss.jca.core.connectionmanager.pool.capacity.SizeDecrementer) /subsystem=resource-adapters/resource-adapter=activemq-rar-one/connection-definitions=ConnectionFactory/config-properties=Password:add(value="P@ssword1") /subsystem=resource-adapters/resource-adapter=activemq-rar-one/connection-definitions=ConnectionFactory/config-properties=ServerUrl:add(value="tcp://1.2.3.4:61616?jms.rmIdFromConnectionId=true") /subsystem=resource-adapters/resource-adapter=activemq-rar-one/connection-definitions=ConnectionFactory/config-properties=UserName:add(value="tombrady") + /subsystem=resource-adapters/resource-adapter=activemq-rar-one/connection-definitions=ConnectionFactory:write-attribute(name=capacity-incrementer-properties.watermark, value="1") + /subsystem=resource-adapters/resource-adapter=activemq-rar-one/connection-definitions=ConnectionFactory:write-attribute(name=capacity-decrementer-properties.size, value="2") /subsystem=resource-adapters/resource-adapter=activemq-rar-one/admin-objects="queue/HELLOWORLDMDBQueue":add(class-name="org.apache.activemq.command.ActiveMQQueue", jndi-name="java:/queue/HELLOWORLDMDBQueue", use-java-context=true) /subsystem=resource-adapters/resource-adapter=activemq-rar-one/admin-objects="queue/HELLOWORLDMDBQueue"/config-properties=PhysicalName:add(value="queue/HELLOWORLDMDBQueue") + /subsystem=resource-adapters/resource-adapter=activemq-rar-one/admin-objects="queue/HELLOWORLDMDBQueue"/config-properties=propA:add(value="valueA") + /subsystem=resource-adapters/resource-adapter=activemq-rar-one/admin-objects="queue/HELLOWORLDMDBQueue"/config-properties=propB:add(value="valueB") /subsystem=resource-adapters/resource-adapter=activemq-rar-one/admin-objects="queue/HELLOWORLDMDBTopic":add(class-name="org.apache.activemq.command.ActiveMQTopic", jndi-name="java:/queue/HELLOWORLDMDBTopic", use-java-context=true) /subsystem=resource-adapters/resource-adapter=activemq-rar-one/admin-objects="queue/HELLOWORLDMDBTopic"/config-properties=PhysicalName:add(value="queue/HELLOWORLDMDBTopic") + /subsystem=resource-adapters/resource-adapter=activemq-rar-one/admin-objects="queue/HELLOWORLDMDBTopic"/config-properties=propC:add(value="valueC") + /subsystem=resource-adapters/resource-adapter=activemq-rar-one/admin-objects="queue/HELLOWORLDMDBTopic"/config-properties=propD:add(value="valueD") run-batch if (outcome != success) of /subsystem=resource-adapters:read-resource @@ -67,14 +73,21 @@ teardown() { end-if batch /subsystem=resource-adapters/resource-adapter=activemq-rar-two:add(archive="activemq-rar-two.rar", transaction-support="XATransaction") - /subsystem=resource-adapters/resource-adapter=activemq-rar-two/connection-definitions=ConnectionFactory:add(class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory", jndi-name="java:/ConnectionFactory", enabled="true", use-java-context="true", tracking="true", min-pool-size=1, max-pool-size=5, pool-prefill=false, flush-strategy=EntirePool, same-rm-override=false, recovery-username="RecoveryUserName", recovery-password="RecoveryPassword") + /subsystem=resource-adapters/resource-adapter=activemq-rar-two/connection-definitions=ConnectionFactory:add(class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory", jndi-name="java:/ConnectionFactory", enabled="true", use-java-context="true", tracking="true", min-pool-size=1, initial-pool-size=1, max-pool-size=5, pool-prefill=false, pool-fair=false, pool-use-strict-min=true, flush-strategy=EntirePool, same-rm-override=false, recovery-username="RecoveryUserName", recovery-password="RecoveryPassword", capacity-incrementer-class=org.jboss.jca.core.connectionmanager.pool.capacity.WatermarkIncrementer, capacity-decrementer-class=org.jboss.jca.core.connectionmanager.pool.capacity.SizeDecrementer) /subsystem=resource-adapters/resource-adapter=activemq-rar-two/connection-definitions=ConnectionFactory/config-properties=Password:add(value="P@ssword1") /subsystem=resource-adapters/resource-adapter=activemq-rar-two/connection-definitions=ConnectionFactory/config-properties=ServerUrl:add(value="tcp://1.2.3.4:61616?jms.rmIdFromConnectionId=true") /subsystem=resource-adapters/resource-adapter=activemq-rar-two/connection-definitions=ConnectionFactory/config-properties=UserName:add(value="tombrady") + /subsystem=resource-adapters/resource-adapter=activemq-rar-two/connection-definitions=ConnectionFactory/config-properties=UserName:add(value="tombrady") + /subsystem=resource-adapters/resource-adapter=activemq-rar-two/connection-definitions=ConnectionFactory:write-attribute(name=capacity-incrementer-properties.watermark, value="1") + /subsystem=resource-adapters/resource-adapter=activemq-rar-two/connection-definitions=ConnectionFactory:write-attribute(name=capacity-decrementer-properties.size, value="2") /subsystem=resource-adapters/resource-adapter=activemq-rar-two/admin-objects="queue/HELLOWORLDMDBQueue":add(class-name="org.apache.activemq.command.ActiveMQQueue", jndi-name="java:/queue/HELLOWORLDMDBQueue", use-java-context=true) /subsystem=resource-adapters/resource-adapter=activemq-rar-two/admin-objects="queue/HELLOWORLDMDBQueue"/config-properties=PhysicalName:add(value="queue/HELLOWORLDMDBQueue") + /subsystem=resource-adapters/resource-adapter=activemq-rar-two/admin-objects="queue/HELLOWORLDMDBQueue"/config-properties=propA:add(value="valueA") + /subsystem=resource-adapters/resource-adapter=activemq-rar-two/admin-objects="queue/HELLOWORLDMDBQueue"/config-properties=propB:add(value="valueB") /subsystem=resource-adapters/resource-adapter=activemq-rar-two/admin-objects="queue/HELLOWORLDMDBTopic":add(class-name="org.apache.activemq.command.ActiveMQTopic", jndi-name="java:/queue/HELLOWORLDMDBTopic", use-java-context=true) /subsystem=resource-adapters/resource-adapter=activemq-rar-two/admin-objects="queue/HELLOWORLDMDBTopic"/config-properties=PhysicalName:add(value="queue/HELLOWORLDMDBTopic") + /subsystem=resource-adapters/resource-adapter=activemq-rar-two/admin-objects="queue/HELLOWORLDMDBTopic"/config-properties=propC:add(value="valueC") + /subsystem=resource-adapters/resource-adapter=activemq-rar-two/admin-objects="queue/HELLOWORLDMDBTopic"/config-properties=propD:add(value="valueD") run-batch EOF ) @@ -95,17 +108,28 @@ EOF TEST_RA_ONE_RECOVERY_USERNAME="RecoveryUserName" TEST_RA_ONE_RECOVERY_PASSWORD="RecoveryPassword" TEST_RA_ONE_POOL_MIN_SIZE="1" + TEST_RA_ONE_POOL_POOL_INITIAL_SIZE="1" TEST_RA_ONE_POOL_MAX_SIZE="5" TEST_RA_ONE_POOL_PREFILL="false" + TEST_RA_ONE_POOL_FAIR="false" + TEST_RA_ONE_POOL_USE_STRICT_MIN="true" TEST_RA_ONE_TRACKING="true" TEST_RA_ONE_TRANSACTION_SUPPORT="XATransaction" TEST_RA_ONE_POOL_IS_SAME_RM_OVERRIDE="false" TEST_RA_ONE_POOL_FLUSH_STRATEGY="EntirePool" + TEST_RA_ONE_POOL_CAPACITY_INCREMENTER_CLASS="org.jboss.jca.core.connectionmanager.pool.capacity.WatermarkIncrementer" + TEST_RA_ONE_POOL_CAPACITY_INCREMENTER_PROPERTY_watermark="1" + TEST_RA_ONE_POOL_CAPACITY_DECREMENTER_CLASS="org.jboss.jca.core.connectionmanager.pool.capacity.SizeDecrementer" + TEST_RA_ONE_POOL_CAPACITY_DECREMENTER_PROPERTY_size="2" TEST_RA_ONE_ADMIN_OBJECTS="queue,topic" TEST_RA_ONE_ADMIN_OBJECT_queue_CLASS_NAME="org.apache.activemq.command.ActiveMQQueue" TEST_RA_ONE_ADMIN_OBJECT_queue_PHYSICAL_NAME="queue/HELLOWORLDMDBQueue" + TEST_RA_ONE_ADMIN_OBJECT_queue_PROPERTY_propA="valueA" + TEST_RA_ONE_ADMIN_OBJECT_queue_PROPERTY_propB="valueB" TEST_RA_ONE_ADMIN_OBJECT_topic_CLASS_NAME="org.apache.activemq.command.ActiveMQTopic" TEST_RA_ONE_ADMIN_OBJECT_topic_PHYSICAL_NAME="queue/HELLOWORLDMDBTopic" + TEST_RA_ONE_ADMIN_OBJECT_topic_PROPERTY_propC="valueC" + TEST_RA_ONE_ADMIN_OBJECT_topic_PROPERTY_propD="valueD" TEST_RA_TWO_ID="activemq-rar-two" TEST_RA_TWO_ARCHIVE="activemq-rar-two.rar" @@ -120,17 +144,28 @@ EOF TEST_RA_TWO_RECOVERY_USERNAME="RecoveryUserName" TEST_RA_TWO_RECOVERY_PASSWORD="RecoveryPassword" TEST_RA_TWO_POOL_MIN_SIZE="1" + TEST_RA_TWO_POOL_POOL_INITIAL_SIZE="1" TEST_RA_TWO_POOL_MAX_SIZE="5" TEST_RA_TWO_POOL_PREFILL="false" + TEST_RA_TWO_POOL_FAIR="false" + TEST_RA_TWO_POOL_USE_STRICT_MIN="true" TEST_RA_TWO_TRACKING="true" TEST_RA_TWO_TRANSACTION_SUPPORT="XATransaction" TEST_RA_TWO_POOL_IS_SAME_RM_OVERRIDE="false" TEST_RA_TWO_POOL_FLUSH_STRATEGY="EntirePool" + TEST_RA_TWO_POOL_CAPACITY_INCREMENTER_CLASS="org.jboss.jca.core.connectionmanager.pool.capacity.WatermarkIncrementer" + TEST_RA_TWO_POOL_CAPACITY_INCREMENTER_PROPERTY_watermark="1" + TEST_RA_TWO_POOL_CAPACITY_DECREMENTER_CLASS="org.jboss.jca.core.connectionmanager.pool.capacity.SizeDecrementer" + TEST_RA_TWO_POOL_CAPACITY_DECREMENTER_PROPERTY_size="2" TEST_RA_TWO_ADMIN_OBJECTS="queue,topic" TEST_RA_TWO_ADMIN_OBJECT_queue_CLASS_NAME="org.apache.activemq.command.ActiveMQQueue" TEST_RA_TWO_ADMIN_OBJECT_queue_PHYSICAL_NAME="queue/HELLOWORLDMDBQueue" + TEST_RA_TWO_ADMIN_OBJECT_queue_PROPERTY_propA="valueA" + TEST_RA_TWO_ADMIN_OBJECT_queue_PROPERTY_propB="valueB" TEST_RA_TWO_ADMIN_OBJECT_topic_CLASS_NAME="org.apache.activemq.command.ActiveMQTopic" TEST_RA_TWO_ADMIN_OBJECT_topic_PHYSICAL_NAME="queue/HELLOWORLDMDBTopic" + TEST_RA_TWO_ADMIN_OBJECT_topic_PROPERTY_propC="valueC" + TEST_RA_TWO_ADMIN_OBJECT_topic_PROPERTY_propD="valueD" run configure echo "Console:${output}" @@ -194,4 +229,4 @@ EOF normalize_spaces_new_lines [ "${output}" = "${expected}" ] -} \ No newline at end of file +}