private void setParams()

in artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java [1318:1481]


   private void setParams(final ActiveMQConnectionFactory cf, final ConnectionFactoryProperties overrideProperties) {
      Boolean booleanVal = overrideProperties.isAutoGroup() != null ? overrideProperties.isAutoGroup() : raProperties.isAutoGroup();
      if (booleanVal != null) {
         cf.setAutoGroup(booleanVal);
      }
      booleanVal = overrideProperties.isBlockOnAcknowledge() != null ? overrideProperties.isBlockOnAcknowledge() : raProperties.isBlockOnAcknowledge();
      if (booleanVal != null) {
         cf.setBlockOnAcknowledge(booleanVal);
      }
      booleanVal = overrideProperties.isBlockOnNonDurableSend() != null ? overrideProperties.isBlockOnNonDurableSend() : raProperties.isBlockOnNonDurableSend();
      if (booleanVal != null) {
         cf.setBlockOnNonDurableSend(booleanVal);
      }
      booleanVal = overrideProperties.isBlockOnDurableSend() != null ? overrideProperties.isBlockOnDurableSend() : raProperties.isBlockOnDurableSend();
      if (booleanVal != null) {
         cf.setBlockOnDurableSend(booleanVal);
      }
      booleanVal = overrideProperties.isPreAcknowledge() != null ? overrideProperties.isPreAcknowledge() : raProperties.isPreAcknowledge();
      if (booleanVal != null) {
         cf.setPreAcknowledge(booleanVal);
      }
      booleanVal = overrideProperties.isUseGlobalPools() != null ? overrideProperties.isUseGlobalPools() : raProperties.isUseGlobalPools();
      if (booleanVal != null) {
         cf.setUseGlobalPools(booleanVal);
      }

      booleanVal = overrideProperties.isCacheLargeMessagesClient() != null ? overrideProperties.isCacheLargeMessagesClient() : raProperties.isCacheLargeMessagesClient();
      if (booleanVal != null) {
         cf.setCacheLargeMessagesClient(booleanVal);
      }

      booleanVal = overrideProperties.isCompressLargeMessage() != null ? overrideProperties.isCompressLargeMessage() : raProperties.isCompressLargeMessage();
      if (booleanVal != null) {
         cf.setCompressLargeMessage(booleanVal);
      }

      booleanVal = overrideProperties.isCacheDestinations() != null ? overrideProperties.isCacheDestinations() : raProperties.isCacheDestinations();
      if (booleanVal != null) {
         cf.setCacheDestinations(booleanVal);
      }

      Integer intVal = overrideProperties.getConsumerMaxRate() != null ? overrideProperties.getConsumerMaxRate() : raProperties.getConsumerMaxRate();
      if (intVal != null) {
         cf.setConsumerMaxRate(intVal);
      }
      intVal = overrideProperties.getConsumerWindowSize() != null ? overrideProperties.getConsumerWindowSize() : raProperties.getConsumerWindowSize();
      if (intVal != null) {
         cf.setConsumerWindowSize(intVal);
      }
      intVal = overrideProperties.getDupsOKBatchSize() != null ? overrideProperties.getDupsOKBatchSize() : raProperties.getDupsOKBatchSize();
      if (intVal != null) {
         cf.setDupsOKBatchSize(intVal);
      }

      intVal = overrideProperties.getMinLargeMessageSize() != null ? overrideProperties.getMinLargeMessageSize() : raProperties.getMinLargeMessageSize();
      if (intVal != null) {
         cf.setMinLargeMessageSize(intVal);
      }
      intVal = overrideProperties.getProducerMaxRate() != null ? overrideProperties.getProducerMaxRate() : raProperties.getProducerMaxRate();
      if (intVal != null) {
         cf.setProducerMaxRate(intVal);
      }
      intVal = overrideProperties.getProducerWindowSize() != null ? overrideProperties.getProducerWindowSize() : raProperties.getProducerWindowSize();
      if (intVal != null) {
         cf.setProducerWindowSize(intVal);
      }
      intVal = overrideProperties.getConfirmationWindowSize() != null ? overrideProperties.getConfirmationWindowSize() : raProperties.getConfirmationWindowSize();
      if (intVal != null) {
         cf.setConfirmationWindowSize(intVal);
      }
      intVal = overrideProperties.getReconnectAttempts() != null ? overrideProperties.getReconnectAttempts() : raProperties.getReconnectAttempts();
      if (intVal != null) {
         cf.setReconnectAttempts(intVal);
      } else {
         //the global default is 0 but we should always try to reconnect JCA
         cf.setReconnectAttempts(-1);
      }
      intVal = overrideProperties.getThreadPoolMaxSize() != null ? overrideProperties.getThreadPoolMaxSize() : raProperties.getThreadPoolMaxSize();
      if (intVal != null) {
         cf.setThreadPoolMaxSize(intVal);
      }
      intVal = overrideProperties.getScheduledThreadPoolMaxSize() != null ? overrideProperties.getScheduledThreadPoolMaxSize() : raProperties.getScheduledThreadPoolMaxSize();
      if (intVal != null) {
         cf.setScheduledThreadPoolMaxSize(intVal);
      }
      intVal = overrideProperties.getTransactionBatchSize() != null ? overrideProperties.getTransactionBatchSize() : raProperties.getTransactionBatchSize();
      if (intVal != null) {
         cf.setTransactionBatchSize(intVal);
      }
      intVal = overrideProperties.getInitialConnectAttempts() != null ? overrideProperties.getInitialConnectAttempts() : raProperties.getInitialConnectAttempts();
      if (intVal != null) {
         cf.setInitialConnectAttempts(intVal);
      }
      intVal = overrideProperties.getInitialMessagePacketSize() != null ? overrideProperties.getInitialMessagePacketSize() : raProperties.getInitialMessagePacketSize();
      if (intVal != null) {
         cf.setInitialMessagePacketSize(intVal);
      }
      intVal = overrideProperties.getCompressionLevel() != null ? overrideProperties.getCompressionLevel() : raProperties.getCompressionLevel();
      if (intVal != null) {
         cf.setCompressionLevel(intVal);
      }

      Long longVal = overrideProperties.getClientFailureCheckPeriod() != null ? overrideProperties.getClientFailureCheckPeriod() : raProperties.getClientFailureCheckPeriod();
      if (longVal != null) {
         cf.setClientFailureCheckPeriod(longVal);
      }
      longVal = overrideProperties.getCallTimeout() != null ? overrideProperties.getCallTimeout() : raProperties.getCallTimeout();
      if (longVal != null) {
         cf.setCallTimeout(longVal);
      }
      longVal = overrideProperties.getCallFailoverTimeout() != null ? overrideProperties.getCallFailoverTimeout() : raProperties.getCallFailoverTimeout();
      if (longVal != null) {
         cf.setCallFailoverTimeout(longVal);
      }
      longVal = overrideProperties.getConnectionTTL() != null ? overrideProperties.getConnectionTTL() : raProperties.getConnectionTTL();
      if (longVal != null) {
         cf.setConnectionTTL(longVal);
      }

      longVal = overrideProperties.getRetryInterval() != null ? overrideProperties.getRetryInterval() : raProperties.getRetryInterval();
      if (longVal != null) {
         cf.setRetryInterval(longVal);
      }

      longVal = overrideProperties.getMaxRetryInterval() != null ? overrideProperties.getMaxRetryInterval() : raProperties.getMaxRetryInterval();
      if (longVal != null) {
         cf.setMaxRetryInterval(longVal);
      }

      Double doubleVal = overrideProperties.getRetryIntervalMultiplier() != null ? overrideProperties.getRetryIntervalMultiplier() : raProperties.getRetryIntervalMultiplier();
      if (doubleVal != null) {
         cf.setRetryIntervalMultiplier(doubleVal);
      }
      String stringVal = overrideProperties.getClientID() != null ? overrideProperties.getClientID() : raProperties.getClientID();
      if (stringVal != null) {
         cf.setClientID(stringVal);
      }
      stringVal = overrideProperties.getConnectionLoadBalancingPolicyClassName() != null ? overrideProperties.getConnectionLoadBalancingPolicyClassName() : raProperties.getConnectionLoadBalancingPolicyClassName();
      if (stringVal != null) {
         cf.setConnectionLoadBalancingPolicyClassName(stringVal);
      }
      stringVal = overrideProperties.getProtocolManagerFactoryStr() != null ? overrideProperties.getProtocolManagerFactoryStr() : raProperties.getProtocolManagerFactoryStr();
      if (stringVal != null) {
         cf.setProtocolManagerFactoryStr(stringVal);
      }
      stringVal = overrideProperties.getDeserializationBlackList() != null ? overrideProperties.getDeserializationBlackList() : raProperties.getDeserializationBlackList();
      if (stringVal != null) {
         cf.setDeserializationBlackList(stringVal);
      }
      stringVal = overrideProperties.getDeserializationWhiteList() != null ? overrideProperties.getDeserializationWhiteList() : raProperties.getDeserializationWhiteList();
      if (stringVal != null) {
         cf.setDeserializationWhiteList(stringVal);
      }
      stringVal = overrideProperties.getDeserializationDenyList() != null ? overrideProperties.getDeserializationDenyList() : raProperties.getDeserializationDenyList();
      if (stringVal != null) {
         cf.setDeserializationDenyList(stringVal);
      }
      stringVal = overrideProperties.getDeserializationAllowList() != null ? overrideProperties.getDeserializationAllowList() : raProperties.getDeserializationAllowList();
      if (stringVal != null) {
         cf.setDeserializationAllowList(stringVal);
      }

      cf.setIgnoreJTA(isIgnoreJTA());
   }