From d0d686b527ba045fc46662f8907ff1d0537160d6 Mon Sep 17 00:00:00 2001 From: Andy Taylor Date: Mon, 17 Nov 2014 11:00:52 +0000 Subject: [PATCH] ACTIVEMQ6-4 - refactor default configuration https://issues.apache.org/jira/browse/ACTIVEMQ6-4 Remove the auto generation of the default config and rename to ActiveMQ --- activemq-core-client/pom.xml | 61 - .../config/ActiveMQDefaultConfiguration.java | 1125 +++++++++++++++++ .../api/core/BroadcastGroupConfiguration.java | 4 +- .../api/core/client/HornetQClient.java | 10 +- .../core/management/ObjectNameBuilder.java | 6 +- .../remoting/impl/netty/NettyConnector.java | 10 +- .../impl/netty/TransportConstants.java | 10 +- .../resources/HornetQDefaultConfiguration.txt | 116 -- .../src/main/resources/hqDefaults.xsl | 128 -- .../config/impl/JMSConfigurationImpl.java | 4 +- .../impl/JMSServerConfigParserImpl.java | 6 +- .../core/config/BridgeConfiguration.java | 14 +- .../ClusterConnectionConfiguration.java | 32 +- .../activemq/core/config/Configuration.java | 88 +- .../core/config/DivertConfiguration.java | 4 +- .../core/config/ScaleDownConfiguration.java | 4 +- .../ha/ColocatedPolicyConfiguration.java | 14 +- .../config/ha/ReplicaPolicyConfiguration.java | 8 +- .../ha/ReplicatedPolicyConfiguration.java | 4 +- .../SharedStoreMasterPolicyConfiguration.java | 6 +- .../SharedStoreSlavePolicyConfiguration.java | 10 +- .../core/config/impl/ConfigurationImpl.java | 112 +- .../impl/FileConfigurationParser.java | 66 +- .../impl/MessageCounterManagerImpl.java | 6 +- .../impl/invm/TransportConstants.java | 10 +- .../remoting/impl/netty/NettyAcceptor.java | 10 +- .../core/server/cluster/ha/BackupPolicy.java | 4 +- .../server/cluster/ha/ColocatedPolicy.java | 12 +- .../core/server/cluster/ha/ReplicaPolicy.java | 6 +- .../server/cluster/ha/ReplicatedPolicy.java | 8 +- .../cluster/ha/SharedStoreMasterPolicy.java | 6 +- .../cluster/ha/SharedStoreSlavePolicy.java | 8 +- .../impl/GroupingHandlerConfiguration.java | 8 +- .../core/server/impl/HornetQServerImpl.java | 4 +- .../config/impl/ConfigurationImplTest.java | 88 +- .../impl/DefaultsFileConfigurationTest.java | 68 +- .../impl/FileConfigurationParserTest.java | 4 +- .../integration/client/JournalCrashTest.java | 10 +- .../integration/client/SlowConsumerTest.java | 4 +- .../cluster/distribution/ClusterTestBase.java | 4 +- .../AutomaticColocatedQuorumVoteTest.java | 10 +- ...tipleLivesMultipleBackupsFailoverTest.java | 18 +- ...SingleLiveMultipleBackupsFailoverTest.java | 18 +- .../management/JMSServerControlTest.java | 4 +- .../management/AddressControlTest.java | 4 +- .../management/CoreMessagingProxy.java | 4 +- .../integration/management/JMXDomainTest.java | 4 +- .../management/ManagementWithStompTest.java | 6 +- .../management/NotificationTest.java | 4 +- .../SecurityManagementTestBase.java | 4 +- ...ManagementWithConfiguredAdminUserTest.java | 8 +- ...anagementWithDefaultConfigurationTest.java | 8 +- ...nagementWithModifiedConfigurationTest.java | 8 +- .../management/SecurityNotificationTest.java | 6 +- .../replication/ReplicationTest.java | 10 +- .../server/ScaleDown3NodeTest.java | 6 +- .../org/apache/activemq/jms/HornetQAdmin.java | 8 +- .../stress/journal/CompactingStressTest.java | 4 +- .../JournalCleanupCompactStressTest.java | 8 +- .../journal/LargeJournalStressTest.java | 4 +- .../MultiThreadConsumerStressTest.java | 6 +- .../NIOMultiThreadCompactorStressTest.java | 14 +- .../impl/DuplicateDetectionUnitTest.java | 4 +- .../impl/netty/NettyAcceptorFactoryTest.java | 4 +- .../impl/netty/NettyAcceptorTest.java | 4 +- 65 files changed, 1550 insertions(+), 730 deletions(-) create mode 100644 activemq-core-client/src/main/java/org/apache/activemq/api/config/ActiveMQDefaultConfiguration.java delete mode 100644 activemq-core-client/src/main/resources/HornetQDefaultConfiguration.txt delete mode 100644 activemq-core-client/src/main/resources/hqDefaults.xsl diff --git a/activemq-core-client/pom.xml b/activemq-core-client/pom.xml index 8b29615f85..c362506d9c 100644 --- a/activemq-core-client/pom.xml +++ b/activemq-core-client/pom.xml @@ -97,67 +97,6 @@ - - org.codehaus.mojo - build-helper-maven-plugin - - - - add-source - generate-sources - - add-source - - - - ./target/generated-sources/xslt - - - - - - - org.codehaus.mojo - xml-maven-plugin - - - - transform - - - - - net.sf.saxon.TransformerFactoryImpl - - - - ../activemq-server/src/main/resources/schema - ${project.build.directory}/generated-sources/xslt - ./src/main/resources/hqDefaults.xsl - - hornetq-configuration.xsd - - - - ./org/apache/activemq/api/config/HornetQDefaultConfiguration.java - - - - - - - - net.sf.saxon - saxon - 8.7 - - - org.apache.maven.plugins maven-jar-plugin diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/config/ActiveMQDefaultConfiguration.java b/activemq-core-client/src/main/java/org/apache/activemq/api/config/ActiveMQDefaultConfiguration.java new file mode 100644 index 0000000000..59aa7a56e5 --- /dev/null +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/config/ActiveMQDefaultConfiguration.java @@ -0,0 +1,1125 @@ +/* + * Copyright 2005-2014 Red Hat, Inc. + * Red Hat licenses this file to you under the Apache License, version + * 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package org.apache.activemq.api.config; + +import org.apache.activemq.api.core.SimpleString; +import org.apache.activemq.core.journal.impl.JournalConstants; + +/** + * Default values of ActiveMQ configuration parameters. + */ +public final class ActiveMQDefaultConfiguration +{ + /* + *

In order to avoid compile time in-lining of constants, all access is done through methods + * and all fields are PRIVATE STATIC but not FINAL. This is done following the recommendation at + * 13.4.9. + * final Fields and Constants + * @see http://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.4.9 + */ + + private ActiveMQDefaultConfiguration() + { + // Utility class + } + + public static long getDefaultClientFailureCheckPeriod() + { + return DEFAULT_CLIENT_FAILURE_CHECK_PERIOD; + } + + public static long getDefaultFileDeployerScanPeriod() + { + return DEFAULT_FILE_DEPLOYER_SCAN_PERIOD; + } + + public static int getDefaultJournalMaxIoAio() + { + return DEFAULT_JOURNAL_MAX_IO_AIO; + } + + public static int getDefaultJournalBufferTimeoutAio() + { + return DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO; + } + + public static int getDefaultJournalBufferSizeAio() + { + return DEFAULT_JOURNAL_BUFFER_SIZE_AIO; + } + + public static int getDefaultJournalMaxIoNio() + { + return DEFAULT_JOURNAL_MAX_IO_NIO; + } + + public static int getDefaultJournalBufferTimeoutNio() + { + return DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO; + } + + public static int getDefaultJournalBufferSizeNio() + { + return DEFAULT_JOURNAL_BUFFER_SIZE_NIO; + } + + public static String getPropMaskPassword() + { + return PROP_MASK_PASSWORD; + } + + public static String getPropPasswordCodec() + { + return PROP_PASSWORD_CODEC; + } + + /** + * what kind of HA Policy should we use + */ + public static String getDefaultHapolicyType() + { + return DEFAULT_HAPOLICY_TYPE; + } + + /** + * The backup strategy to use if we are a backup or for any colocated backups. + */ + public static String getDefaultHapolicyBackupStrategy() + { + return DEFAULT_HAPOLICY_BACKUP_STRATEGY; + } + + //shared by client and core/server + // XXX not on schema? + private static long DEFAULT_CLIENT_FAILURE_CHECK_PERIOD = 30000; + + // XXX not on schema? + private static long DEFAULT_FILE_DEPLOYER_SCAN_PERIOD = 5000; + + // These defaults are applied depending on whether the journal type + // is NIO or AIO. + private static int DEFAULT_JOURNAL_MAX_IO_AIO = 500; + private static int DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO = JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO; + private static int DEFAULT_JOURNAL_BUFFER_SIZE_AIO = JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO; + private static int DEFAULT_JOURNAL_MAX_IO_NIO = 1; + private static int DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO = JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO; + private static int DEFAULT_JOURNAL_BUFFER_SIZE_NIO = JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO; + + // XXX not on schema. + //properties passed to acceptor/connectors. + private static String PROP_MASK_PASSWORD = "activemq.usemaskedpassword"; + private static String PROP_PASSWORD_CODEC = "activemq.passwordcodec"; + + + // what kind of HA Policy should we use + private static String DEFAULT_HAPOLICY_TYPE = "NONE"; + + // The backup strategy to use if we are a backup or for any colocated backups. + private static String DEFAULT_HAPOLICY_BACKUP_STRATEGY = "FULL"; + + // ------------------------------------------------------------------- + // Following fields are generated from the activemq-schema.xsd annotations + // ------------------------------------------------------------------- + + // If true then the ActiveMQ Server will make use of any Protocol Managers that are in available on the classpath. If false then only the core protocol will be available, unless in Embedded mode where users can inject their own Protocol Managers. + private static boolean DEFAULT_RESOLVE_PROTOCOLS = true; + + // true means that the server will load configuration from the configuration files + private static boolean DEFAULT_FILE_DEPLOYMENT_ENABLED = false; + + // true means that the server will use the file based journal for persistence. + private static boolean DEFAULT_PERSISTENCE_ENABLED = true; + + // Maximum number of threads to use for the scheduled thread pool + private static int DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE = 5; + + // Maximum number of threads to use for the thread pool. -1 means 'no limits'. + private static int DEFAULT_THREAD_POOL_MAX_SIZE = 30; + + // true means that security is enabled + private static boolean DEFAULT_SECURITY_ENABLED = true; + + // how long (in ms) to wait before invalidating the security cache + private static long DEFAULT_SECURITY_INVALIDATION_INTERVAL = 10000; + + // how long (in ms) to wait to acquire a file lock on the journal + private static long DEFAULT_JOURNAL_LOCK_ACQUISITION_TIMEOUT = -1; + + // true means that the server supports wild card routing + private static boolean DEFAULT_WILDCARD_ROUTING_ENABLED = true; + + // the name of the management address to send management messages to. It is prefixed with "jms.queue" so that JMS clients can send messages to it. + private static SimpleString DEFAULT_MANAGEMENT_ADDRESS = new SimpleString("jms.queue.activemq.management"); + + // the name of the address that consumers bind to receive management notifications + private static SimpleString DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS = new SimpleString("activemq.notifications"); + + // Cluster username. It applies to all cluster configurations. + private static String DEFAULT_CLUSTER_USER = "ACTIVEMQ.CLUSTER.ADMIN.USER"; + + // Cluster password. It applies to all cluster configurations. + private static String DEFAULT_CLUSTER_PASSWORD = "CHANGE ME!!"; + + // This option controls whether passwords in server configuration need be masked. If set to "true" the passwords are masked. + private static boolean DEFAULT_MASK_PASSWORD = false; + + // true means that the management API is available via JMX + private static boolean DEFAULT_JMX_MANAGEMENT_ENABLED = true; + + // the JMX domain used to registered ActiveMQ MBeans in the MBeanServer + private static String DEFAULT_JMX_DOMAIN = "org.apache.activemq"; + + // true means that message counters are enabled + private static boolean DEFAULT_MESSAGE_COUNTER_ENABLED = false; + + // the sample period (in ms) to use for message counters + private static long DEFAULT_MESSAGE_COUNTER_SAMPLE_PERIOD = 10000; + + // how many days to keep message counter history + private static int DEFAULT_MESSAGE_COUNTER_MAX_DAY_HISTORY = 10; + + // if set, this will override how long (in ms) to keep a connection alive without receiving a ping. -1 disables this setting. + private static long DEFAULT_CONNECTION_TTL_OVERRIDE = -1; + + // should certain incoming packets on the server be handed off to a thread from the thread pool for processing or should they be handled on the remoting thread? + private static boolean DEFAULT_ASYNC_CONNECTION_EXECUTION_ENABLED = true; + + // how long (in ms) before a transaction can be removed from the resource manager after create time + private static long DEFAULT_TRANSACTION_TIMEOUT = 300000; + + // how often (in ms) to scan for timeout transactions + private static long DEFAULT_TRANSACTION_TIMEOUT_SCAN_PERIOD = 1000; + + // how often (in ms) to scan for expired messages + private static long DEFAULT_MESSAGE_EXPIRY_SCAN_PERIOD = 30000; + + // the priority of the thread expiring messages + private static int DEFAULT_MESSAGE_EXPIRY_THREAD_PRIORITY = 3; + + // the size of the cache for pre-creating message ID's + private static int DEFAULT_ID_CACHE_SIZE = 20000; + + // true means that ID's are persisted to the journal + private static boolean DEFAULT_PERSIST_ID_CACHE = true; + + // DEPRECATED. This option is deprecated, but it will still be honored if is not also used. It indicates whether this server is a backup server + private static boolean DEFAULT_BACKUP = false; + + // DEPRECATED. This option is deprecated, but it will still be honored if is not also used. 'shared-store' applies to live and backup pairs, and it indicates if the live/backup pair share storage or if the data is replicated among them. + private static boolean DEFAULT_SHARED_STORE = false; + + // True means that the delivery count is persisted before delivery. False means that this only happens after a message has been cancelled. + private static boolean DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY = false; + + // the directory to store paged messages in + private static String DEFAULT_PAGING_DIR = "data/paging"; + + // the directory to store the persisted bindings to + private static String DEFAULT_BINDINGS_DIRECTORY = "data/bindings"; + + // true means that the server will create the bindings directory on start up + private static boolean DEFAULT_CREATE_BINDINGS_DIR = true; + + // The max number of concurrent reads allowed on paging + private static int DEFAULT_MAX_CONCURRENT_PAGE_IO = 5; + + // the directory to store the journal files in + private static String DEFAULT_JOURNAL_DIR = "data/journal"; + + // true means that the journal directory will be created + private static boolean DEFAULT_CREATE_JOURNAL_DIR = true; + + // if true wait for transaction data to be synchronized to the journal before returning response to client + private static boolean DEFAULT_JOURNAL_SYNC_TRANSACTIONAL = true; + + // if true wait for non transaction data to be synced to the journal before returning response to client. + private static boolean DEFAULT_JOURNAL_SYNC_NON_TRANSACTIONAL = true; + + // Whether to log messages about the journal write rate + private static boolean DEFAULT_JOURNAL_LOG_WRITE_RATE = false; + + // the size (in bytes) of each journal file + private static int DEFAULT_JOURNAL_FILE_SIZE = 10485760; + + // how many journal files to pre-create + private static int DEFAULT_JOURNAL_MIN_FILES = 2; + + // The percentage of live data on which we consider compacting the journal + private static int DEFAULT_JOURNAL_COMPACT_PERCENTAGE = 30; + + // The minimal number of data files before we can start compacting + private static int DEFAULT_JOURNAL_COMPACT_MIN_FILES = 10; + + // XXX Only meant to be used by project developers + private static int DEFAULT_JOURNAL_PERF_BLAST_PAGES = -1; + + // XXX Only meant to be used by project developers + private static boolean DEFAULT_RUN_SYNC_SPEED_TEST = false; + + // Interval to log server specific information (e.g. memory usage etc) + private static long DEFAULT_SERVER_DUMP_INTERVAL = -1; + + // Percentage of available memory which will trigger a warning log + private static int DEFAULT_MEMORY_WARNING_THRESHOLD = 25; + + // frequency to sample JVM memory in ms (or -1 to disable memory sampling) + private static long DEFAULT_MEMORY_MEASURE_INTERVAL = -1; + + // the directory to store large messages + private static String DEFAULT_LARGE_MESSAGES_DIR = "data/largemessages"; + + // period in milliseconds between consecutive broadcasts + private static long DEFAULT_BROADCAST_PERIOD = 2000; + + // Period the discovery group waits after receiving the last broadcast from a particular server before removing that servers connector pair entry from its list. + private static int DEFAULT_BROADCAST_REFRESH_TIMEOUT = 10000; + + // how long to keep a connection alive in the absence of any data arriving from the client. This should be greater than the ping period. + private static long DEFAULT_CONNECTION_TTL = 60000; + + // multiplier to apply to successive retry intervals + private static double DEFAULT_RETRY_INTERVAL_MULTIPLIER = 1; + + // Limit to the retry-interval growth (due to retry-interval-multiplier) + private static long DEFAULT_MAX_RETRY_INTERVAL = 2000; + + // maximum number of initial connection attempts, -1 means 'no limits' + private static int DEFAULT_BRIDGE_INITIAL_CONNECT_ATTEMPTS = -1; + + // maximum number of retry attempts, -1 means 'no limits' + private static int DEFAULT_BRIDGE_RECONNECT_ATTEMPTS = -1; + + // should duplicate detection headers be inserted in forwarded messages? + private static boolean DEFAULT_BRIDGE_DUPLICATE_DETECTION = true; + + // Once the bridge has received this many bytes, it sends a confirmation + private static int DEFAULT_BRIDGE_CONFIRMATION_WINDOW_SIZE = 1048576; + + // Upon reconnection this configures the number of time the same node on the topology will be retried before reseting the server locator and using the initial connectors + private static int DEFAULT_BRIDGE_CONNECT_SAME_NODE = 10; + + // The period (in milliseconds) used to check if the cluster connection has failed to receive pings from another server + private static long DEFAULT_CLUSTER_FAILURE_CHECK_PERIOD = 30000; + + // how long to keep a connection alive in the absence of any data arriving from the client + private static long DEFAULT_CLUSTER_CONNECTION_TTL = 60000; + + // How long to wait for a reply + private static long DEFAULT_CLUSTER_CALL_TIMEOUT = 30000; + + // period (in ms) between successive retries + private static long DEFAULT_CLUSTER_RETRY_INTERVAL = 500; + + // multiplier to apply to the retry-interval + private static double DEFAULT_CLUSTER_RETRY_INTERVAL_MULTIPLIER = 1; + + // Maximum value for retry-interval + private static long DEFAULT_CLUSTER_MAX_RETRY_INTERVAL = 2000; + + // How many attempts should be made to connect initially + private static int DEFAULT_CLUSTER_INITIAL_CONNECT_ATTEMPTS = -1; + + // How many attempts should be made to reconnect after failure + private static int DEFAULT_CLUSTER_RECONNECT_ATTEMPTS = -1; + + // should duplicate detection headers be inserted in forwarded messages? + private static boolean DEFAULT_CLUSTER_DUPLICATE_DETECTION = true; + + // should messages be load balanced if there are no matching consumers on target? + private static boolean DEFAULT_CLUSTER_FORWARD_WHEN_NO_CONSUMERS = false; + + // maximum number of hops cluster topology is propagated + private static int DEFAULT_CLUSTER_MAX_HOPS = 1; + + // The size (in bytes) of the window used for confirming data from the server connected to. + private static int DEFAULT_CLUSTER_CONFIRMATION_WINDOW_SIZE = 1048576; + + // How long to wait for a reply if in the middle of a fail-over. -1 means wait forever. + private static long DEFAULT_CLUSTER_CALL_FAILOVER_TIMEOUT = -1; + + // how often the cluster connection will notify the cluster of its existence right after joining the cluster + private static long DEFAULT_CLUSTER_NOTIFICATION_INTERVAL = 1000; + + // how many times this cluster connection will notify the cluster of its existence right after joining the cluster + private static int DEFAULT_CLUSTER_NOTIFICATION_ATTEMPTS = 2; + + // whether this is an exclusive divert + private static boolean DEFAULT_DIVERT_EXCLUSIVE = false; + + // If true then the server will request a backup on another node + private static boolean DEFAULT_HAPOLICY_REQUEST_BACKUP = false; + + // How many times the live server will try to request a backup, -1 means for ever. + private static int DEFAULT_HAPOLICY_BACKUP_REQUEST_RETRIES = -1; + + // How long to wait for retries between attempts to request a backup server. + private static long DEFAULT_HAPOLICY_BACKUP_REQUEST_RETRY_INTERVAL = 5000; + + // Whether or not this live server will accept backup requests from other live servers. + private static int DEFAULT_HAPOLICY_MAX_BACKUPS = 1; + + // The offset to use for the Connectors and Acceptors when creating a new backup server. + private static int DEFAULT_HAPOLICY_BACKUP_PORT_OFFSET = 100; + + // Whether to check the cluster for a (live) server using our own server ID when starting up. This option is only necessary for performing 'fail-back' on replicating servers. Strictly speaking this setting only applies to live servers and not to backups. + private static boolean DEFAULT_CHECK_FOR_LIVE_SERVER = false; + + // This specifies how many times a replicated backup server can restart after moving its files on start. Once there are this number of backup journal files the server will stop permanently after if fails back. + private static int DEFAULT_MAX_SAVED_REPLICATED_JOURNALS_SIZE = 2; + + // Will this server, if a backup, restart once it has been stopped because of failback or scaling down. + private static boolean DEFAULT_RESTART_BACKUP = false; + + // Whether a server will automatically stop when a another places a request to take over its place. The use case is when a regular server stops and its backup takes over its duties, later the main server restarts and requests the server (the former backup) to stop operating. + private static boolean DEFAULT_ALLOW_AUTO_FAILBACK = true; + + // if we have to start as a replicated server this is the delay to wait before fail-back occurs + private static long DEFAULT_FAILBACK_DELAY = 5000; + + // Will this backup server come live on a normal server shutdown + private static boolean DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN = false; + + // its possible that you only want a server to partake in scale down as a receiver, via a group. In this case set scale-down to false + private static boolean DEFAULT_SCALE_DOWN_ENABLED = true; + + // How long to wait for a decision + private static int DEFAULT_GROUPING_HANDLER_TIMEOUT = 5000; + + // How long a group binding will be used, -1 means for ever. Bindings are removed after this wait elapses. On the remote node this is used to determine how often you should re-query the main coordinator in order to update the last time used accordingly. + private static int DEFAULT_GROUPING_HANDLER_GROUP_TIMEOUT = -1; + + // How often the reaper will be run to check for timed out group bindings. Only valid for LOCAL handlers + private static long DEFAULT_GROUPING_HANDLER_REAPER_PERIOD = 30000; + + + /** + * If true then the ActiveMQ Server will make use of any Protocol Managers that are in available on the classpath. If false then only the core protocol will be available, unless in Embedded mode where users can inject their own Protocol Managers. + */ + public static boolean isDefaultResolveProtocols() + { + return DEFAULT_RESOLVE_PROTOCOLS; + } + + /** + * true means that the server will load configuration from the configuration files + */ + public static boolean isDefaultFileDeploymentEnabled() + { + return DEFAULT_FILE_DEPLOYMENT_ENABLED; + } + + /** + * true means that the server will use the file based journal for persistence. + */ + public static boolean isDefaultPersistenceEnabled() + { + return DEFAULT_PERSISTENCE_ENABLED; + } + + /** + * Maximum number of threads to use for the scheduled thread pool + */ + public static int getDefaultScheduledThreadPoolMaxSize() + { + return DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE; + } + + /** + * Maximum number of threads to use for the thread pool. -1 means 'no limits'. + */ + public static int getDefaultThreadPoolMaxSize() + { + return DEFAULT_THREAD_POOL_MAX_SIZE; + } + + /** + * true means that security is enabled + */ + public static boolean isDefaultSecurityEnabled() + { + return DEFAULT_SECURITY_ENABLED; + } + + /** + * how long (in ms) to wait before invalidating the security cache + */ + public static long getDefaultSecurityInvalidationInterval() + { + return DEFAULT_SECURITY_INVALIDATION_INTERVAL; + } + + /** + * how long (in ms) to wait to acquire a file lock on the journal + */ + public static long getDefaultJournalLockAcquisitionTimeout() + { + return DEFAULT_JOURNAL_LOCK_ACQUISITION_TIMEOUT; + } + + /** + * true means that the server supports wild card routing + */ + public static boolean isDefaultWildcardRoutingEnabled() + { + return DEFAULT_WILDCARD_ROUTING_ENABLED; + } + + /** + * the name of the management address to send management messages to. It is prefixed with "jms.queue" so that JMS clients can send messages to it. + */ + public static SimpleString getDefaultManagementAddress() + { + return DEFAULT_MANAGEMENT_ADDRESS; + } + + /** + * the name of the address that consumers bind to receive management notifications + */ + public static SimpleString getDefaultManagementNotificationAddress() + { + return DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS; + } + + /** + * Cluster username. It applies to all cluster configurations. + */ + public static String getDefaultClusterUser() + { + return DEFAULT_CLUSTER_USER; + } + + /** + * Cluster password. It applies to all cluster configurations. + */ + public static String getDefaultClusterPassword() + { + return DEFAULT_CLUSTER_PASSWORD; + } + + /** + * This option controls whether passwords in server configuration need be masked. If set to "true" the passwords are masked. + */ + public static boolean isDefaultMaskPassword() + { + return DEFAULT_MASK_PASSWORD; + } + + /** + * true means that the management API is available via JMX + */ + public static boolean isDefaultJmxManagementEnabled() + { + return DEFAULT_JMX_MANAGEMENT_ENABLED; + } + + /** + * the JMX domain used to registered ActiveMQ MBeans in the MBeanServer + */ + public static String getDefaultJmxDomain() + { + return DEFAULT_JMX_DOMAIN; + } + + /** + * true means that message counters are enabled + */ + public static boolean isDefaultMessageCounterEnabled() + { + return DEFAULT_MESSAGE_COUNTER_ENABLED; + } + + /** + * the sample period (in ms) to use for message counters + */ + public static long getDefaultMessageCounterSamplePeriod() + { + return DEFAULT_MESSAGE_COUNTER_SAMPLE_PERIOD; + } + + /** + * how many days to keep message counter history + */ + public static int getDefaultMessageCounterMaxDayHistory() + { + return DEFAULT_MESSAGE_COUNTER_MAX_DAY_HISTORY; + } + + /** + * if set, this will override how long (in ms) to keep a connection alive without receiving a ping. -1 disables this setting. + */ + public static long getDefaultConnectionTtlOverride() + { + return DEFAULT_CONNECTION_TTL_OVERRIDE; + } + + /** + * should certain incoming packets on the server be handed off to a thread from the thread pool for processing or should they be handled on the remoting thread? + */ + public static boolean isDefaultAsyncConnectionExecutionEnabled() + { + return DEFAULT_ASYNC_CONNECTION_EXECUTION_ENABLED; + } + + /** + * how long (in ms) before a transaction can be removed from the resource manager after create time + */ + public static long getDefaultTransactionTimeout() + { + return DEFAULT_TRANSACTION_TIMEOUT; + } + + /** + * how often (in ms) to scan for timeout transactions + */ + public static long getDefaultTransactionTimeoutScanPeriod() + { + return DEFAULT_TRANSACTION_TIMEOUT_SCAN_PERIOD; + } + + /** + * how often (in ms) to scan for expired messages + */ + public static long getDefaultMessageExpiryScanPeriod() + { + return DEFAULT_MESSAGE_EXPIRY_SCAN_PERIOD; + } + + /** + * the priority of the thread expiring messages + */ + public static int getDefaultMessageExpiryThreadPriority() + { + return DEFAULT_MESSAGE_EXPIRY_THREAD_PRIORITY; + } + + /** + * the size of the cache for pre-creating message ID's + */ + public static int getDefaultIdCacheSize() + { + return DEFAULT_ID_CACHE_SIZE; + } + + /** + * true means that ID's are persisted to the journal + */ + public static boolean isDefaultPersistIdCache() + { + return DEFAULT_PERSIST_ID_CACHE; + } + + /** + * DEPRECATED. This option is deprecated, but it will still be honored if is not also used. It indicates whether this server is a backup server + */ + public static boolean isDefaultBackup() + { + return DEFAULT_BACKUP; + } + + /** + * DEPRECATED. This option is deprecated, but it will still be honored if is not also used. 'shared-store' applies to live and backup pairs, and it indicates if the live/backup pair share storage or if the data is replicated among them. + */ + public static boolean isDefaultSharedStore() + { + return DEFAULT_SHARED_STORE; + } + + /** + * True means that the delivery count is persisted before delivery. False means that this only happens after a message has been cancelled. + */ + public static boolean isDefaultPersistDeliveryCountBeforeDelivery() + { + return DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY; + } + + /** + * the directory to store paged messages in + */ + public static String getDefaultPagingDir() + { + return DEFAULT_PAGING_DIR; + } + + /** + * the directory to store the persisted bindings to + */ + public static String getDefaultBindingsDirectory() + { + return DEFAULT_BINDINGS_DIRECTORY; + } + + /** + * true means that the server will create the bindings directory on start up + */ + public static boolean isDefaultCreateBindingsDir() + { + return DEFAULT_CREATE_BINDINGS_DIR; + } + + /** + * The max number of concurrent reads allowed on paging + */ + public static int getDefaultMaxConcurrentPageIo() + { + return DEFAULT_MAX_CONCURRENT_PAGE_IO; + } + + /** + * the directory to store the journal files in + */ + public static String getDefaultJournalDir() + { + return DEFAULT_JOURNAL_DIR; + } + + /** + * true means that the journal directory will be created + */ + public static boolean isDefaultCreateJournalDir() + { + return DEFAULT_CREATE_JOURNAL_DIR; + } + + /** + * if true wait for transaction data to be synchronized to the journal before returning response to client + */ + public static boolean isDefaultJournalSyncTransactional() + { + return DEFAULT_JOURNAL_SYNC_TRANSACTIONAL; + } + + /** + * if true wait for non transaction data to be synced to the journal before returning response to client. + */ + public static boolean isDefaultJournalSyncNonTransactional() + { + return DEFAULT_JOURNAL_SYNC_NON_TRANSACTIONAL; + } + + /** + * Whether to log messages about the journal write rate + */ + public static boolean isDefaultJournalLogWriteRate() + { + return DEFAULT_JOURNAL_LOG_WRITE_RATE; + } + + /** + * the size (in bytes) of each journal file + */ + public static int getDefaultJournalFileSize() + { + return DEFAULT_JOURNAL_FILE_SIZE; + } + + /** + * how many journal files to pre-create + */ + public static int getDefaultJournalMinFiles() + { + return DEFAULT_JOURNAL_MIN_FILES; + } + + /** + * The percentage of live data on which we consider compacting the journal + */ + public static int getDefaultJournalCompactPercentage() + { + return DEFAULT_JOURNAL_COMPACT_PERCENTAGE; + } + + /** + * The minimal number of data files before we can start compacting + */ + public static int getDefaultJournalCompactMinFiles() + { + return DEFAULT_JOURNAL_COMPACT_MIN_FILES; + } + + /** + * XXX Only meant to be used by project developers + */ + public static int getDefaultJournalPerfBlastPages() + { + return DEFAULT_JOURNAL_PERF_BLAST_PAGES; + } + + /** + * XXX Only meant to be used by project developers + */ + public static boolean isDefaultRunSyncSpeedTest() + { + return DEFAULT_RUN_SYNC_SPEED_TEST; + } + + /** + * Interval to log server specific information (e.g. memory usage etc) + */ + public static long getDefaultServerDumpInterval() + { + return DEFAULT_SERVER_DUMP_INTERVAL; + } + + /** + * Percentage of available memory which will trigger a warning log + */ + public static int getDefaultMemoryWarningThreshold() + { + return DEFAULT_MEMORY_WARNING_THRESHOLD; + } + + /** + * frequency to sample JVM memory in ms (or -1 to disable memory sampling) + */ + public static long getDefaultMemoryMeasureInterval() + { + return DEFAULT_MEMORY_MEASURE_INTERVAL; + } + + /** + * the directory to store large messages + */ + public static String getDefaultLargeMessagesDir() + { + return DEFAULT_LARGE_MESSAGES_DIR; + } + + /** + * period in milliseconds between consecutive broadcasts + */ + public static long getDefaultBroadcastPeriod() + { + return DEFAULT_BROADCAST_PERIOD; + } + + /** + * Period the discovery group waits after receiving the last broadcast from a particular server before removing that servers connector pair entry from its list. + */ + public static int getDefaultBroadcastRefreshTimeout() + { + return DEFAULT_BROADCAST_REFRESH_TIMEOUT; + } + + /** + * how long to keep a connection alive in the absence of any data arriving from the client. This should be greater than the ping period. + */ + public static long getDefaultConnectionTtl() + { + return DEFAULT_CONNECTION_TTL; + } + + /** + * multiplier to apply to successive retry intervals + */ + public static double getDefaultRetryIntervalMultiplier() + { + return DEFAULT_RETRY_INTERVAL_MULTIPLIER; + } + + /** + * Limit to the retry-interval growth (due to retry-interval-multiplier) + */ + public static long getDefaultMaxRetryInterval() + { + return DEFAULT_MAX_RETRY_INTERVAL; + } + + /** + * maximum number of initial connection attempts, -1 means 'no limits' + */ + public static int getDefaultBridgeInitialConnectAttempts() + { + return DEFAULT_BRIDGE_INITIAL_CONNECT_ATTEMPTS; + } + + /** + * maximum number of retry attempts, -1 means 'no limits' + */ + public static int getDefaultBridgeReconnectAttempts() + { + return DEFAULT_BRIDGE_RECONNECT_ATTEMPTS; + } + + /** + * should duplicate detection headers be inserted in forwarded messages? + */ + public static boolean isDefaultBridgeDuplicateDetection() + { + return DEFAULT_BRIDGE_DUPLICATE_DETECTION; + } + + /** + * Once the bridge has received this many bytes, it sends a confirmation + */ + public static int getDefaultBridgeConfirmationWindowSize() + { + return DEFAULT_BRIDGE_CONFIRMATION_WINDOW_SIZE; + } + + /** + * Upon reconnection this configures the number of time the same node on the topology will be retried before reseting the server locator and using the initial connectors + */ + public static int getDefaultBridgeConnectSameNode() + { + return DEFAULT_BRIDGE_CONNECT_SAME_NODE; + } + + /** + * The period (in milliseconds) used to check if the cluster connection has failed to receive pings from another server + */ + public static long getDefaultClusterFailureCheckPeriod() + { + return DEFAULT_CLUSTER_FAILURE_CHECK_PERIOD; + } + + /** + * how long to keep a connection alive in the absence of any data arriving from the client + */ + public static long getDefaultClusterConnectionTtl() + { + return DEFAULT_CLUSTER_CONNECTION_TTL; + } + + /** + * How long to wait for a reply + */ + public static long getDefaultClusterCallTimeout() + { + return DEFAULT_CLUSTER_CALL_TIMEOUT; + } + + /** + * period (in ms) between successive retries + */ + public static long getDefaultClusterRetryInterval() + { + return DEFAULT_CLUSTER_RETRY_INTERVAL; + } + + /** + * multiplier to apply to the retry-interval + */ + public static double getDefaultClusterRetryIntervalMultiplier() + { + return DEFAULT_CLUSTER_RETRY_INTERVAL_MULTIPLIER; + } + + /** + * Maximum value for retry-interval + */ + public static long getDefaultClusterMaxRetryInterval() + { + return DEFAULT_CLUSTER_MAX_RETRY_INTERVAL; + } + + /** + * How many attempts should be made to connect initially + */ + public static int getDefaultClusterInitialConnectAttempts() + { + return DEFAULT_CLUSTER_INITIAL_CONNECT_ATTEMPTS; + } + + /** + * How many attempts should be made to reconnect after failure + */ + public static int getDefaultClusterReconnectAttempts() + { + return DEFAULT_CLUSTER_RECONNECT_ATTEMPTS; + } + + /** + * should duplicate detection headers be inserted in forwarded messages? + */ + public static boolean isDefaultClusterDuplicateDetection() + { + return DEFAULT_CLUSTER_DUPLICATE_DETECTION; + } + + /** + * should messages be load balanced if there are no matching consumers on target? + */ + public static boolean isDefaultClusterForwardWhenNoConsumers() + { + return DEFAULT_CLUSTER_FORWARD_WHEN_NO_CONSUMERS; + } + + /** + * maximum number of hops cluster topology is propagated + */ + public static int getDefaultClusterMaxHops() + { + return DEFAULT_CLUSTER_MAX_HOPS; + } + + /** + * The size (in bytes) of the window used for confirming data from the server connected to. + */ + public static int getDefaultClusterConfirmationWindowSize() + { + return DEFAULT_CLUSTER_CONFIRMATION_WINDOW_SIZE; + } + + /** + * How long to wait for a reply if in the middle of a fail-over. -1 means wait forever. + */ + public static long getDefaultClusterCallFailoverTimeout() + { + return DEFAULT_CLUSTER_CALL_FAILOVER_TIMEOUT; + } + + /** + * how often the cluster connection will notify the cluster of its existence right after joining the cluster + */ + public static long getDefaultClusterNotificationInterval() + { + return DEFAULT_CLUSTER_NOTIFICATION_INTERVAL; + } + + /** + * how many times this cluster connection will notify the cluster of its existence right after joining the cluster + */ + public static int getDefaultClusterNotificationAttempts() + { + return DEFAULT_CLUSTER_NOTIFICATION_ATTEMPTS; + } + + /** + * whether this is an exclusive divert + */ + public static boolean isDefaultDivertExclusive() + { + return DEFAULT_DIVERT_EXCLUSIVE; + } + + /** + * If true then the server will request a backup on another node + */ + public static boolean isDefaultHapolicyRequestBackup() + { + return DEFAULT_HAPOLICY_REQUEST_BACKUP; + } + + /** + * How many times the live server will try to request a backup, -1 means for ever. + */ + public static int getDefaultHapolicyBackupRequestRetries() + { + return DEFAULT_HAPOLICY_BACKUP_REQUEST_RETRIES; + } + + /** + * How long to wait for retries between attempts to request a backup server. + */ + public static long getDefaultHapolicyBackupRequestRetryInterval() + { + return DEFAULT_HAPOLICY_BACKUP_REQUEST_RETRY_INTERVAL; + } + + /** + * Whether or not this live server will accept backup requests from other live servers. + */ + public static int getDefaultHapolicyMaxBackups() + { + return DEFAULT_HAPOLICY_MAX_BACKUPS; + } + + /** + * The offset to use for the Connectors and Acceptors when creating a new backup server. + */ + public static int getDefaultHapolicyBackupPortOffset() + { + return DEFAULT_HAPOLICY_BACKUP_PORT_OFFSET; + } + + /** + * Whether to check the cluster for a (live) server using our own server ID when starting up. This option is only necessary for performing 'fail-back' on replicating servers. Strictly speaking this setting only applies to live servers and not to backups. + */ + public static boolean isDefaultCheckForLiveServer() + { + return DEFAULT_CHECK_FOR_LIVE_SERVER; + } + + /** + * This specifies how many times a replicated backup server can restart after moving its files on start. Once there are this number of backup journal files the server will stop permanently after if fails back. + */ + public static int getDefaultMaxSavedReplicatedJournalsSize() + { + return DEFAULT_MAX_SAVED_REPLICATED_JOURNALS_SIZE; + } + + /** + * Will this server, if a backup, restart once it has been stopped because of failback or scaling down. + */ + public static boolean isDefaultRestartBackup() + { + return DEFAULT_RESTART_BACKUP; + } + + /** + * Whether a server will automatically stop when a another places a request to take over its place. The use case is when a regular server stops and its backup takes over its duties, later the main server restarts and requests the server (the former backup) to stop operating. + */ + public static boolean isDefaultAllowAutoFailback() + { + return DEFAULT_ALLOW_AUTO_FAILBACK; + } + + /** + * if we have to start as a replicated server this is the delay to wait before fail-back occurs + */ + public static long getDefaultFailbackDelay() + { + return DEFAULT_FAILBACK_DELAY; + } + + /** + * Will this backup server come live on a normal server shutdown + */ + public static boolean isDefaultFailoverOnServerShutdown() + { + return DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN; + } + + /** + * its possible that you only want a server to partake in scale down as a receiver, via a group. In this case set scale-down to false + */ + public static boolean isDefaultScaleDownEnabled() + { + return DEFAULT_SCALE_DOWN_ENABLED; + } + + /** + * How long to wait for a decision + */ + public static int getDefaultGroupingHandlerTimeout() + { + return DEFAULT_GROUPING_HANDLER_TIMEOUT; + } + + /** + * How long a group binding will be used, -1 means for ever. Bindings are removed after this wait elapses. On the remote node this is used to determine how often you should re-query the main coordinator in order to update the last time used accordingly. + */ + public static int getDefaultGroupingHandlerGroupTimeout() + { + return DEFAULT_GROUPING_HANDLER_GROUP_TIMEOUT; + } + + /** + * How often the reaper will be run to check for timed out group bindings. Only valid for LOCAL handlers + */ + public static long getDefaultGroupingHandlerReaperPeriod() + { + return DEFAULT_GROUPING_HANDLER_REAPER_PERIOD; + } + +} diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/BroadcastGroupConfiguration.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/BroadcastGroupConfiguration.java index 97f4faf3a9..7df97bed37 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/BroadcastGroupConfiguration.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/BroadcastGroupConfiguration.java @@ -15,7 +15,7 @@ package org.apache.activemq.api.core; import java.io.Serializable; import java.util.List; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; /** @@ -32,7 +32,7 @@ public final class BroadcastGroupConfiguration implements Serializable private String name = null; - private long broadcastPeriod = HornetQDefaultConfiguration.getDefaultBroadcastPeriod(); + private long broadcastPeriod = ActiveMQDefaultConfiguration.getDefaultBroadcastPeriod(); private BroadcastEndpointFactoryConfiguration endpointFactoryConfiguration = null; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/HornetQClient.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/HornetQClient.java index edafea2707..1eef77f68c 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/HornetQClient.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/HornetQClient.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.api.core.client; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy; @@ -30,13 +30,13 @@ public final class HornetQClient { public static final String DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME = RoundRobinConnectionLoadBalancingPolicy.class.getCanonicalName(); - public static final long DEFAULT_CLIENT_FAILURE_CHECK_PERIOD = HornetQDefaultConfiguration.getDefaultClientFailureCheckPeriod(); + public static final long DEFAULT_CLIENT_FAILURE_CHECK_PERIOD = ActiveMQDefaultConfiguration.getDefaultClientFailureCheckPeriod(); public static final long DEFAULT_CLIENT_FAILURE_CHECK_PERIOD_INVM = -1; // 1 minute - this should be higher than ping period - public static final long DEFAULT_CONNECTION_TTL = HornetQDefaultConfiguration.getDefaultConnectionTtl(); + public static final long DEFAULT_CONNECTION_TTL = ActiveMQDefaultConfiguration.getDefaultConnectionTtl(); public static final long DEFAULT_CONNECTION_TTL_INVM = -1; @@ -80,9 +80,9 @@ public final class HornetQClient public static final long DEFAULT_RETRY_INTERVAL = 2000; - public static final double DEFAULT_RETRY_INTERVAL_MULTIPLIER = HornetQDefaultConfiguration.getDefaultRetryIntervalMultiplier(); + public static final double DEFAULT_RETRY_INTERVAL_MULTIPLIER = ActiveMQDefaultConfiguration.getDefaultRetryIntervalMultiplier(); - public static final long DEFAULT_MAX_RETRY_INTERVAL = HornetQDefaultConfiguration.getDefaultMaxRetryInterval(); + public static final long DEFAULT_MAX_RETRY_INTERVAL = ActiveMQDefaultConfiguration.getDefaultMaxRetryInterval(); public static final int DEFAULT_RECONNECT_ATTEMPTS = 0; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ObjectNameBuilder.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ObjectNameBuilder.java index 26cca91371..0f53d16831 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ObjectNameBuilder.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ObjectNameBuilder.java @@ -14,7 +14,7 @@ package org.apache.activemq.api.core.management; import javax.management.ObjectName; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.SimpleString; /** @@ -29,7 +29,7 @@ public final class ObjectNameBuilder /** * Default JMX domain for HornetQ resources. */ - public static final ObjectNameBuilder DEFAULT = new ObjectNameBuilder(HornetQDefaultConfiguration.getDefaultJmxDomain()); + public static final ObjectNameBuilder DEFAULT = new ObjectNameBuilder(ActiveMQDefaultConfiguration.getDefaultJmxDomain()); static final String JMS_MODULE = "JMS"; @@ -45,7 +45,7 @@ public final class ObjectNameBuilder { if (domain == null) { - return new ObjectNameBuilder(HornetQDefaultConfiguration.getDefaultJmxDomain()); + return new ObjectNameBuilder(ActiveMQDefaultConfiguration.getDefaultJmxDomain()); } else { diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyConnector.java b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyConnector.java index 76ab10733b..f6defe9e17 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyConnector.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyConnector.java @@ -95,8 +95,8 @@ import io.netty.util.AttributeKey; import io.netty.util.ResourceLeakDetector; import io.netty.util.concurrent.Future; import io.netty.util.concurrent.GlobalEventExecutor; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl; @@ -354,8 +354,8 @@ public class NettyConnector extends AbstractConnector keyStorePassword = ConfigurationHelper.getPasswordProperty(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME, TransportConstants.DEFAULT_KEYSTORE_PASSWORD, configuration, - HornetQDefaultConfiguration.getPropMaskPassword(), - HornetQDefaultConfiguration.getPropMaskPassword()); + ActiveMQDefaultConfiguration.getPropMaskPassword(), + ActiveMQDefaultConfiguration.getPropMaskPassword()); trustStoreProvider = ConfigurationHelper.getStringProperty(TransportConstants.TRUSTSTORE_PROVIDER_PROP_NAME, TransportConstants.DEFAULT_TRUSTSTORE_PROVIDER, @@ -368,8 +368,8 @@ public class NettyConnector extends AbstractConnector trustStorePassword = ConfigurationHelper.getPasswordProperty(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, TransportConstants.DEFAULT_TRUSTSTORE_PASSWORD, configuration, - HornetQDefaultConfiguration.getPropMaskPassword(), - HornetQDefaultConfiguration.getPropMaskPassword()); + ActiveMQDefaultConfiguration.getPropMaskPassword(), + ActiveMQDefaultConfiguration.getPropMaskPassword()); enabledCipherSuites = ConfigurationHelper.getStringProperty(TransportConstants.ENABLED_CIPHER_SUITES_PROP_NAME, TransportConstants.DEFAULT_ENABLED_CIPHER_SUITES, diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/TransportConstants.java b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/TransportConstants.java index c81db4ddc7..172ce8cd6b 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/TransportConstants.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/TransportConstants.java @@ -17,7 +17,7 @@ import java.util.HashSet; import java.util.Set; import io.netty.util.Version; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; /** * A TransportConstants @@ -225,8 +225,8 @@ public class TransportConstants allowableAcceptorKeys.add(TransportConstants.STOMP_MIN_LARGE_MESSAGE_SIZE); allowableAcceptorKeys.add(TransportConstants.CONNECTION_TTL); allowableAcceptorKeys.add(TransportConstants.STOMP_ENABLE_MESSAGE_ID); - allowableAcceptorKeys.add(HornetQDefaultConfiguration.getPropMaskPassword()); - allowableAcceptorKeys.add(HornetQDefaultConfiguration.getPropPasswordCodec()); + allowableAcceptorKeys.add(ActiveMQDefaultConfiguration.getPropMaskPassword()); + allowableAcceptorKeys.add(ActiveMQDefaultConfiguration.getPropPasswordCodec()); ALLOWABLE_ACCEPTOR_KEYS = Collections.unmodifiableSet(allowableAcceptorKeys); @@ -259,8 +259,8 @@ public class TransportConstants allowableConnectorKeys.add(TransportConstants.TCP_RECEIVEBUFFER_SIZE_PROPNAME); allowableConnectorKeys.add(TransportConstants.NIO_REMOTING_THREADS_PROPNAME); allowableConnectorKeys.add(TransportConstants.BATCH_DELAY); - allowableConnectorKeys.add(HornetQDefaultConfiguration.getPropMaskPassword()); - allowableConnectorKeys.add(HornetQDefaultConfiguration.getPropPasswordCodec()); + allowableConnectorKeys.add(ActiveMQDefaultConfiguration.getPropMaskPassword()); + allowableConnectorKeys.add(ActiveMQDefaultConfiguration.getPropPasswordCodec()); allowableConnectorKeys.add(TransportConstants.NETTY_CONNECT_TIMEOUT); ALLOWABLE_CONNECTOR_KEYS = Collections.unmodifiableSet(allowableConnectorKeys); diff --git a/activemq-core-client/src/main/resources/HornetQDefaultConfiguration.txt b/activemq-core-client/src/main/resources/HornetQDefaultConfiguration.txt deleted file mode 100644 index c31a87e47d..0000000000 --- a/activemq-core-client/src/main/resources/HornetQDefaultConfiguration.txt +++ /dev/null @@ -1,116 +0,0 @@ -package org.apache.activemq.api.config; - -import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.core.journal.impl.JournalConstants; - -/** - * Default values of HornetQ configuration parameters. - */ -public final class HornetQDefaultConfiguration -{ - /* - *

In order to avoid compile time in-lining of constants, all access is done through methods - * and all fields are PRIVATE STATIC but not FINAL. This is done following the recommendation at - * 13.4.9. - * final Fields and Constants - * @see http://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.4.9 - */ - - private HornetQDefaultConfiguration() - { - // Utility class - } - - public static long getDefaultClientFailureCheckPeriod() - { - return DEFAULT_CLIENT_FAILURE_CHECK_PERIOD; - } - - public static long getDefaultFileDeployerScanPeriod() - { - return DEFAULT_FILE_DEPLOYER_SCAN_PERIOD; - } - - public static int getDefaultJournalMaxIoAio() - { - return DEFAULT_JOURNAL_MAX_IO_AIO; - } - - public static int getDefaultJournalBufferTimeoutAio() - { - return DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO; - } - - public static int getDefaultJournalBufferSizeAio() - { - return DEFAULT_JOURNAL_BUFFER_SIZE_AIO; - } - - public static int getDefaultJournalMaxIoNio() - { - return DEFAULT_JOURNAL_MAX_IO_NIO; - } - - public static int getDefaultJournalBufferTimeoutNio() - { - return DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO; - } - - public static int getDefaultJournalBufferSizeNio() - { - return DEFAULT_JOURNAL_BUFFER_SIZE_NIO; - } - - public static String getPropMaskPassword() - { - return PROP_MASK_PASSWORD; - } - - public static String getPropPasswordCodec() - { - return PROP_PASSWORD_CODEC; - } - - /** - * what kind of HA Policy should we use - */ - public static String getDefaultHapolicyType() - { - return DEFAULT_HAPOLICY_TYPE; - } - - /** - * The backup strategy to use if we are a backup or for any colocated backups. - */ - public static String getDefaultHapolicyBackupStrategy() - { - return DEFAULT_HAPOLICY_BACKUP_STRATEGY; - } - - //shared by client and core/server - // XXX not on schema? - private static long DEFAULT_CLIENT_FAILURE_CHECK_PERIOD = 30000; - - // XXX not on schema? - private static long DEFAULT_FILE_DEPLOYER_SCAN_PERIOD = 5000; - - // These defaults are applied depending on whether the journal type - // is NIO or AIO. - private static int DEFAULT_JOURNAL_MAX_IO_AIO = 500; - private static int DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO = JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO; - private static int DEFAULT_JOURNAL_BUFFER_SIZE_AIO = JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO; - private static int DEFAULT_JOURNAL_MAX_IO_NIO = 1; - private static int DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO = JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO; - private static int DEFAULT_JOURNAL_BUFFER_SIZE_NIO = JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO; - - // XXX not on schema. - //properties passed to acceptor/connectors. - private static String PROP_MASK_PASSWORD = "hornetq.usemaskedpassword"; - private static String PROP_PASSWORD_CODEC = "hornetq.passwordcodec"; - - - // what kind of HA Policy should we use - private static String DEFAULT_HAPOLICY_TYPE = "NONE"; - - // The backup strategy to use if we are a backup or for any colocated backups. - private static String DEFAULT_HAPOLICY_BACKUP_STRATEGY = "FULL"; diff --git a/activemq-core-client/src/main/resources/hqDefaults.xsl b/activemq-core-client/src/main/resources/hqDefaults.xsl deleted file mode 100644 index 6f67fff2f4..0000000000 --- a/activemq-core-client/src/main/resources/hqDefaults.xsl +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - /* - * THIS IS A GENERATED FILE! DO NOT EDIT IT DIRECTLY! - - To see how this file is generated, please refer to - hornetq-core-client/src/main/resources/hqDefaults.xsl - - To add new entries either document them in the hornetq-configuration.xsd by adding: - - 1. a default value to the schema element (using the standard way of adding a default) - 2. adding a hq:field_name attribute to a xsd:annotation element of the element in question. - - It is probably easier to just go to the hornetq-configuration.xsd and see how this is done for - other values, and then copy it. - - The advantage of adding the default to the schema is that: - - a. the schema will inform users of it (for users that check such things through the schema, - think of XML editors as users...); - - b. the manual gets an entry for it automatically; - - c. the Java code gets the same value; - - d. all 3 sources of defaults will match since they take the value from the same place - (i.e. the schema). - - */ - -/* - XSLT Version = - XSLT Vendor = - XSLT Vendor URL = -*/ - - - // ------------------------------------------------------------------- - // Following fields are generated from the hornetq-schema.xsd annotations - // ------------------------------------------------------------------- - - - // - private static = ; - - - - - - - /** * - - */ - public static - -() - { return - - ; - } - - -} - - - - - - is - - get - - - - - - - - - - - - - - - - - - - - - - - - - String - - - - - - - - - - diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/config/impl/JMSConfigurationImpl.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/config/impl/JMSConfigurationImpl.java index 3561d44329..ed97183dd1 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/config/impl/JMSConfigurationImpl.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/config/impl/JMSConfigurationImpl.java @@ -17,7 +17,7 @@ import java.util.List; import javax.naming.Context; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration; import org.apache.activemq.jms.server.config.JMSConfiguration; import org.apache.activemq.jms.server.config.JMSQueueConfiguration; @@ -36,7 +36,7 @@ public class JMSConfigurationImpl implements JMSConfiguration private List topicConfigurations = new ArrayList(); - private String domain = HornetQDefaultConfiguration.getDefaultJmxDomain(); + private String domain = ActiveMQDefaultConfiguration.getDefaultJmxDomain(); private Context context = null; diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerConfigParserImpl.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerConfigParserImpl.java index 6293fe4838..0c9d47f12e 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerConfigParserImpl.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerConfigParserImpl.java @@ -18,7 +18,7 @@ import java.io.Reader; import java.util.ArrayList; import java.util.List; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.client.HornetQClient; import org.apache.activemq.api.jms.JMSFactoryType; @@ -74,7 +74,7 @@ public final class JMSServerConfigParserImpl implements JMSServerConfigParser ArrayList queues = new ArrayList(); ArrayList topics = new ArrayList(); ArrayList cfs = new ArrayList(); - String domain = HornetQDefaultConfiguration.getDefaultJmxDomain(); + String domain = ActiveMQDefaultConfiguration.getDefaultJmxDomain(); Element e = (Element) rootnode; @@ -111,7 +111,7 @@ public final class JMSServerConfigParserImpl implements JMSServerConfigParser } } - domain = XMLConfigurationUtil.getString(e, JMSServerDeployer.JMX_DOMAIN_NAME, HornetQDefaultConfiguration.getDefaultJmxDomain(), Validators.NO_CHECK); + domain = XMLConfigurationUtil.getString(e, JMSServerDeployer.JMX_DOMAIN_NAME, ActiveMQDefaultConfiguration.getDefaultJmxDomain(), Validators.NO_CHECK); JMSConfiguration value = newConfig(queues, topics, cfs, domain); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/BridgeConfiguration.java b/activemq-server/src/main/java/org/apache/activemq/core/config/BridgeConfiguration.java index 8ad1e541de..6b60332a2d 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/config/BridgeConfiguration.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/config/BridgeConfiguration.java @@ -15,7 +15,7 @@ package org.apache.activemq.core.config; import java.io.Serializable; import java.util.List; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.client.HornetQClient; /** @@ -46,21 +46,21 @@ public final class BridgeConfiguration implements Serializable private double retryIntervalMultiplier = HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER; - private int initialConnectAttempts = HornetQDefaultConfiguration.getDefaultBridgeInitialConnectAttempts(); + private int initialConnectAttempts = ActiveMQDefaultConfiguration.getDefaultBridgeInitialConnectAttempts(); - private int reconnectAttempts = HornetQDefaultConfiguration.getDefaultBridgeReconnectAttempts(); + private int reconnectAttempts = ActiveMQDefaultConfiguration.getDefaultBridgeReconnectAttempts(); - private int reconnectAttemptsOnSameNode = HornetQDefaultConfiguration.getDefaultBridgeConnectSameNode(); + private int reconnectAttemptsOnSameNode = ActiveMQDefaultConfiguration.getDefaultBridgeConnectSameNode(); - private boolean useDuplicateDetection = HornetQDefaultConfiguration.isDefaultBridgeDuplicateDetection(); + private boolean useDuplicateDetection = ActiveMQDefaultConfiguration.isDefaultBridgeDuplicateDetection(); private int confirmationWindowSize = HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE; private long clientFailureCheckPeriod = HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD; - private String user = HornetQDefaultConfiguration.getDefaultClusterUser(); + private String user = ActiveMQDefaultConfiguration.getDefaultClusterUser(); - private String password = HornetQDefaultConfiguration.getDefaultClusterPassword(); + private String password = ActiveMQDefaultConfiguration.getDefaultClusterPassword(); private long connectionTTL = HornetQClient.DEFAULT_CONNECTION_TTL; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/ClusterConnectionConfiguration.java b/activemq-server/src/main/java/org/apache/activemq/core/config/ClusterConnectionConfiguration.java index 23758930ca..7cfd8a2b76 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/config/ClusterConnectionConfiguration.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/config/ClusterConnectionConfiguration.java @@ -16,7 +16,7 @@ import java.io.Serializable; import java.util.Collections; import java.util.List; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.client.HornetQClient; /** @@ -34,43 +34,43 @@ public final class ClusterConnectionConfiguration implements Serializable private String connectorName; - private long clientFailureCheckPeriod = HornetQDefaultConfiguration.getDefaultClusterFailureCheckPeriod(); + private long clientFailureCheckPeriod = ActiveMQDefaultConfiguration.getDefaultClusterFailureCheckPeriod(); - private long connectionTTL = HornetQDefaultConfiguration.getDefaultClusterConnectionTtl(); + private long connectionTTL = ActiveMQDefaultConfiguration.getDefaultClusterConnectionTtl(); - private long retryInterval = HornetQDefaultConfiguration.getDefaultClusterRetryInterval(); + private long retryInterval = ActiveMQDefaultConfiguration.getDefaultClusterRetryInterval(); - private double retryIntervalMultiplier = HornetQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(); + private double retryIntervalMultiplier = ActiveMQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(); - private long maxRetryInterval = HornetQDefaultConfiguration.getDefaultClusterMaxRetryInterval(); + private long maxRetryInterval = ActiveMQDefaultConfiguration.getDefaultClusterMaxRetryInterval(); - private int initialConnectAttempts = HornetQDefaultConfiguration.getDefaultClusterInitialConnectAttempts(); + private int initialConnectAttempts = ActiveMQDefaultConfiguration.getDefaultClusterInitialConnectAttempts(); - private int reconnectAttempts = HornetQDefaultConfiguration.getDefaultClusterReconnectAttempts(); + private int reconnectAttempts = ActiveMQDefaultConfiguration.getDefaultClusterReconnectAttempts(); - private long callTimeout = HornetQDefaultConfiguration.getDefaultClusterCallTimeout(); + private long callTimeout = ActiveMQDefaultConfiguration.getDefaultClusterCallTimeout(); - private long callFailoverTimeout = HornetQDefaultConfiguration.getDefaultClusterCallFailoverTimeout(); + private long callFailoverTimeout = ActiveMQDefaultConfiguration.getDefaultClusterCallFailoverTimeout(); - private boolean duplicateDetection = HornetQDefaultConfiguration.isDefaultClusterDuplicateDetection(); + private boolean duplicateDetection = ActiveMQDefaultConfiguration.isDefaultClusterDuplicateDetection(); - private boolean forwardWhenNoConsumers = HornetQDefaultConfiguration.isDefaultClusterForwardWhenNoConsumers(); + private boolean forwardWhenNoConsumers = ActiveMQDefaultConfiguration.isDefaultClusterForwardWhenNoConsumers(); private List staticConnectors = Collections.emptyList(); private String discoveryGroupName = null; - private int maxHops = HornetQDefaultConfiguration.getDefaultClusterMaxHops(); + private int maxHops = ActiveMQDefaultConfiguration.getDefaultClusterMaxHops(); - private int confirmationWindowSize = HornetQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(); + private int confirmationWindowSize = ActiveMQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(); private boolean allowDirectConnectionsOnly = false; private int minLargeMessageSize = HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; - private long clusterNotificationInterval = HornetQDefaultConfiguration.getDefaultClusterNotificationInterval(); + private long clusterNotificationInterval = ActiveMQDefaultConfiguration.getDefaultClusterNotificationInterval(); - private int clusterNotificationAttempts = HornetQDefaultConfiguration.getDefaultClusterNotificationAttempts(); + private int clusterNotificationAttempts = ActiveMQDefaultConfiguration.getDefaultClusterNotificationAttempts(); public ClusterConnectionConfiguration() { diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/Configuration.java b/activemq-server/src/main/java/org/apache/activemq/core/config/Configuration.java index 25df619838..8ab206f5ac 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/config/Configuration.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/config/Configuration.java @@ -83,7 +83,7 @@ public interface Configuration extends Serializable /** * Returns whether delivery count is persisted before messages are delivered to the consumers.
* Default value is - * {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY}. + * {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY}. */ boolean isPersistDeliveryCountBeforeDelivery(); @@ -95,7 +95,7 @@ public interface Configuration extends Serializable /** * Returns {@code true} if this server is a backup, {@code false} if it is a live server.
* If a backup server has been activated, returns {@code false}.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_BACKUP}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_BACKUP}. * * @deprecated replaced by {@link org.apache.activemq.core.server.cluster.ha.HAPolicy#isBackup()} */ @@ -112,7 +112,7 @@ public interface Configuration extends Serializable /** * Returns whether this server shares its data store with a corresponding live or backup server.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_SHARED_STORE}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_SHARED_STORE}. * * @deprecated replaced by {@link org.apache.activemq.core.server.cluster.ha.HAPolicy#isSharedStore()} */ @@ -129,7 +129,7 @@ public interface Configuration extends Serializable /** * Returns whether this server will use files to configure and deploy its resources.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_FILE_DEPLOYMENT_ENABLED}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_FILE_DEPLOYMENT_ENABLED}. */ boolean isFileDeploymentEnabled(); @@ -140,7 +140,7 @@ public interface Configuration extends Serializable /** * Returns whether this server is using persistence and store data.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_PERSISTENCE_ENABLED}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_PERSISTENCE_ENABLED}. */ boolean isPersistenceEnabled(); @@ -151,7 +151,7 @@ public interface Configuration extends Serializable /** * Returns the period (in milliseconds) to scan configuration files used by deployment.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_FILE_DEPLOYER_SCAN_PERIOD}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_FILE_DEPLOYER_SCAN_PERIOD}. */ long getFileDeployerScanPeriod(); @@ -162,7 +162,7 @@ public interface Configuration extends Serializable /** * Returns the maximum number of threads in the thread pool of this server.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_THREAD_POOL_MAX_SIZE}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_THREAD_POOL_MAX_SIZE}. */ int getThreadPoolMaxSize(); @@ -173,7 +173,7 @@ public interface Configuration extends Serializable /** * Returns the maximum number of threads in the scheduled thread pool of this server.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE}. */ int getScheduledThreadPoolMaxSize(); @@ -184,7 +184,7 @@ public interface Configuration extends Serializable /** * Returns the interval time (in milliseconds) to invalidate security credentials.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_SECURITY_INVALIDATION_INTERVAL}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_SECURITY_INVALIDATION_INTERVAL}. */ long getSecurityInvalidationInterval(); @@ -195,7 +195,7 @@ public interface Configuration extends Serializable /** * Returns whether security is enabled for this server.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_SECURITY_ENABLED}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_SECURITY_ENABLED}. */ boolean isSecurityEnabled(); @@ -206,19 +206,19 @@ public interface Configuration extends Serializable /** * Returns whether this server is manageable using JMX or not.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_JMX_MANAGEMENT_ENABLED}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_JMX_MANAGEMENT_ENABLED}. */ boolean isJMXManagementEnabled(); /** * Sets whether this server is manageable using JMX or not.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_JMX_MANAGEMENT_ENABLED}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_JMX_MANAGEMENT_ENABLED}. */ Configuration setJMXManagementEnabled(boolean enabled); /** * Returns the domain used by JMX MBeans (provided JMX management is enabled).
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_JMX_DOMAIN}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_JMX_DOMAIN}. */ String getJMXDomain(); @@ -287,7 +287,7 @@ public interface Configuration extends Serializable /** * Returns the connection time to live.
* This value overrides the connection time to live sent by the client.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_CONNECTION_TTL_OVERRIDE}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_CONNECTION_TTL_OVERRIDE}. */ long getConnectionTTLOverride(); @@ -299,7 +299,7 @@ public interface Configuration extends Serializable /** * Returns whether code coming from connection is executed asynchronously or not.
* Default value is - * {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_ASYNC_CONNECTION_EXECUTION_ENABLED}. + * {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_ASYNC_CONNECTION_EXECUTION_ENABLED}. */ boolean isAsyncConnectionExecutionEnabled(); @@ -420,7 +420,7 @@ public interface Configuration extends Serializable /** * Returns the management address of this server.
* Clients can send management messages to this address to manage this server.
- * Default value is {@link org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_MANAGEMENT_ADDRESS}. + * Default value is {@link org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_MANAGEMENT_ADDRESS}. */ SimpleString getManagementAddress(); @@ -433,7 +433,7 @@ public interface Configuration extends Serializable * Returns the management notification address of this server.
* Clients can bind queues to this address to receive management notifications emitted by this * server.
- * Default value is {@link org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS}. + * Default value is {@link org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS}. */ SimpleString getManagementNotificationAddress(); @@ -444,7 +444,7 @@ public interface Configuration extends Serializable /** * Returns the cluster user for this server.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_CLUSTER_USER}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_CLUSTER_USER}. */ String getClusterUser(); @@ -455,7 +455,7 @@ public interface Configuration extends Serializable /** * Returns the cluster password for this server.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_CLUSTER_PASSWORD}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_CLUSTER_PASSWORD}. */ String getClusterPassword(); @@ -490,7 +490,7 @@ public interface Configuration extends Serializable /** * Returns the size of the cache for pre-creating message IDs.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_ID_CACHE_SIZE}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_ID_CACHE_SIZE}. */ int getIDCacheSize(); @@ -501,7 +501,7 @@ public interface Configuration extends Serializable /** * Returns whether message ID cache is persisted.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_PERSIST_ID_CACHE}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_PERSIST_ID_CACHE}. */ boolean isPersistIDCache(); @@ -514,7 +514,7 @@ public interface Configuration extends Serializable /** * Returns the file system directory used to store bindings.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_BINDINGS_DIRECTORY}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_BINDINGS_DIRECTORY}. */ String getBindingsDirectory(); @@ -526,7 +526,7 @@ public interface Configuration extends Serializable /** * The max number of concurrent reads allowed on paging. *

- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_MAX_CONCURRENT_PAGE_IO}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_MAX_CONCURRENT_PAGE_IO}. */ int getPageMaxConcurrentIO(); @@ -539,7 +539,7 @@ public interface Configuration extends Serializable /** * Returns the file system directory used to store journal log.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_JOURNAL_DIR}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_DIR}. */ String getJournalDirectory(); @@ -562,7 +562,7 @@ public interface Configuration extends Serializable /** * Returns whether the journal is synchronized when receiving transactional data.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_JOURNAL_SYNC_TRANSACTIONAL}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_SYNC_TRANSACTIONAL}. */ boolean isJournalSyncTransactional(); @@ -573,7 +573,7 @@ public interface Configuration extends Serializable /** * Returns whether the journal is synchronized when receiving non-transactional data.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_JOURNAL_SYNC_NON_TRANSACTIONAL}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_SYNC_NON_TRANSACTIONAL}. */ boolean isJournalSyncNonTransactional(); @@ -584,7 +584,7 @@ public interface Configuration extends Serializable /** * Returns the size (in bytes) of each journal files.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_JOURNAL_FILE_SIZE}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_FILE_SIZE}. */ int getJournalFileSize(); @@ -595,7 +595,7 @@ public interface Configuration extends Serializable /** * Returns the minimal number of journal files before compacting.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_JOURNAL_COMPACT_MIN_FILES}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_COMPACT_MIN_FILES}. */ int getJournalCompactMinFiles(); @@ -606,7 +606,7 @@ public interface Configuration extends Serializable /** * Returns the percentage of live data before compacting the journal.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_JOURNAL_COMPACT_PERCENTAGE}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_COMPACT_PERCENTAGE}. */ int getJournalCompactPercentage(); @@ -617,7 +617,7 @@ public interface Configuration extends Serializable /** * Returns the number of journal files to pre-create.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_JOURNAL_MIN_FILES}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_MIN_FILES}. */ int getJournalMinFiles(); @@ -630,7 +630,7 @@ public interface Configuration extends Serializable /** * Returns the maximum number of write requests that can be in the AIO queue at any given time.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_JOURNAL_MAX_IO_AIO}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_MAX_IO_AIO}. */ int getJournalMaxIO_AIO(); @@ -665,7 +665,7 @@ public interface Configuration extends Serializable /** * Returns the maximum number of write requests for NIO journal.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_JOURNAL_MAX_IO_NIO}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_MAX_IO_NIO}. */ int getJournalMaxIO_NIO(); @@ -700,7 +700,7 @@ public interface Configuration extends Serializable /** * Returns whether the bindings directory is created on this server startup.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_CREATE_BINDINGS_DIR}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_CREATE_BINDINGS_DIR}. */ boolean isCreateBindingsDir(); @@ -711,7 +711,7 @@ public interface Configuration extends Serializable /** * Returns whether the journal directory is created on this server startup.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_CREATE_JOURNAL_DIR}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_CREATE_JOURNAL_DIR}. */ boolean isCreateJournalDir(); @@ -750,7 +750,7 @@ public interface Configuration extends Serializable /** * Returns the file system directory used to store paging files.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_PAGING_DIR}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_PAGING_DIR}. */ String getPagingDirectory(); @@ -763,7 +763,7 @@ public interface Configuration extends Serializable /** * Returns the file system directory used to store large messages.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_LARGE_MESSAGES_DIR}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_LARGE_MESSAGES_DIR}. */ String getLargeMessagesDirectory(); @@ -776,7 +776,7 @@ public interface Configuration extends Serializable /** * Returns whether wildcard routing is supported by this server.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_WILDCARD_ROUTING_ENABLED}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_WILDCARD_ROUTING_ENABLED}. */ boolean isWildcardRoutingEnabled(); @@ -788,7 +788,7 @@ public interface Configuration extends Serializable /** * Returns the timeout (in milliseconds) after which transactions is removed from the resource * manager after it was created.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_TRANSACTION_TIMEOUT}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_TRANSACTION_TIMEOUT}. */ long getTransactionTimeout(); @@ -800,7 +800,7 @@ public interface Configuration extends Serializable /** * Returns whether message counter is enabled for this server.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_MESSAGE_COUNTER_ENABLED}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_MESSAGE_COUNTER_ENABLED}. */ boolean isMessageCounterEnabled(); @@ -811,7 +811,7 @@ public interface Configuration extends Serializable /** * Returns the sample period (in milliseconds) to take message counter snapshot.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_MESSAGE_COUNTER_SAMPLE_PERIOD}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_MESSAGE_COUNTER_SAMPLE_PERIOD}. */ long getMessageCounterSamplePeriod(); @@ -824,7 +824,7 @@ public interface Configuration extends Serializable /** * Returns the maximum number of days kept in memory for message counter.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_MESSAGE_COUNTER_MAX_DAY_HISTORY}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_MESSAGE_COUNTER_MAX_DAY_HISTORY}. */ int getMessageCounterMaxDayHistory(); @@ -838,7 +838,7 @@ public interface Configuration extends Serializable /** * Returns the frequency (in milliseconds) to scan transactions to detect which transactions have * timed out.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_TRANSACTION_TIMEOUT_SCAN_PERIOD}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_TRANSACTION_TIMEOUT_SCAN_PERIOD}. */ long getTransactionTimeoutScanPeriod(); @@ -851,7 +851,7 @@ public interface Configuration extends Serializable /** * Returns the frequency (in milliseconds) to scan messages to detect which messages have * expired.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_MESSAGE_EXPIRY_SCAN_PERIOD}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_MESSAGE_EXPIRY_SCAN_PERIOD}. */ long getMessageExpiryScanPeriod(); @@ -863,7 +863,7 @@ public interface Configuration extends Serializable /** * Returns the priority of the thread used to scan message expiration.
- * Default value is {@value org.apache.activemq.api.config.HornetQDefaultConfiguration#DEFAULT_MESSAGE_EXPIRY_THREAD_PRIORITY}. + * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_MESSAGE_EXPIRY_THREAD_PRIORITY}. */ int getMessageExpiryThreadPriority(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/DivertConfiguration.java b/activemq-server/src/main/java/org/apache/activemq/core/config/DivertConfiguration.java index d337a6d2f7..906589a96b 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/config/DivertConfiguration.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/config/DivertConfiguration.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.config; import java.io.Serializable; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.utils.UUIDGenerator; /** @@ -34,7 +34,7 @@ public class DivertConfiguration implements Serializable private String forwardingAddress = null; - private boolean exclusive = HornetQDefaultConfiguration.isDefaultDivertExclusive(); + private boolean exclusive = ActiveMQDefaultConfiguration.isDefaultDivertExclusive(); private String filterString = null; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/ScaleDownConfiguration.java b/activemq-server/src/main/java/org/apache/activemq/core/config/ScaleDownConfiguration.java index 1fc089fe70..98dc67932a 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/config/ScaleDownConfiguration.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/config/ScaleDownConfiguration.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.config; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import java.io.Serializable; import java.util.ArrayList; @@ -28,7 +28,7 @@ public class ScaleDownConfiguration implements Serializable private String clusterName = null; - private boolean enabled = HornetQDefaultConfiguration.isDefaultScaleDownEnabled(); + private boolean enabled = ActiveMQDefaultConfiguration.isDefaultScaleDownEnabled(); public List getConnectors() { diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/ha/ColocatedPolicyConfiguration.java b/activemq-server/src/main/java/org/apache/activemq/core/config/ha/ColocatedPolicyConfiguration.java index d7d838df59..c71dc74067 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/config/ha/ColocatedPolicyConfiguration.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/config/ha/ColocatedPolicyConfiguration.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.config.ha; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.config.HAPolicyConfiguration; import java.util.ArrayList; @@ -20,19 +20,19 @@ import java.util.List; public class ColocatedPolicyConfiguration implements HAPolicyConfiguration { - private boolean requestBackup = HornetQDefaultConfiguration.isDefaultHapolicyRequestBackup(); + private boolean requestBackup = ActiveMQDefaultConfiguration.isDefaultHapolicyRequestBackup(); - private int backupRequestRetries = HornetQDefaultConfiguration.getDefaultHapolicyBackupRequestRetries(); + private int backupRequestRetries = ActiveMQDefaultConfiguration.getDefaultHapolicyBackupRequestRetries(); - private long backupRequestRetryInterval = HornetQDefaultConfiguration.getDefaultHapolicyBackupRequestRetryInterval(); + private long backupRequestRetryInterval = ActiveMQDefaultConfiguration.getDefaultHapolicyBackupRequestRetryInterval(); - private int maxBackups = HornetQDefaultConfiguration.getDefaultHapolicyMaxBackups(); + private int maxBackups = ActiveMQDefaultConfiguration.getDefaultHapolicyMaxBackups(); - private int backupPortOffset = HornetQDefaultConfiguration.getDefaultHapolicyBackupPortOffset(); + private int backupPortOffset = ActiveMQDefaultConfiguration.getDefaultHapolicyBackupPortOffset(); private List excludedConnectors = new ArrayList<>(); - private int portOffset = HornetQDefaultConfiguration.getDefaultHapolicyBackupPortOffset(); + private int portOffset = ActiveMQDefaultConfiguration.getDefaultHapolicyBackupPortOffset(); private HAPolicyConfiguration liveConfig; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/ha/ReplicaPolicyConfiguration.java b/activemq-server/src/main/java/org/apache/activemq/core/config/ha/ReplicaPolicyConfiguration.java index b27d852fa5..aff113dfa9 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/config/ha/ReplicaPolicyConfiguration.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/config/ha/ReplicaPolicyConfiguration.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.config.ha; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.config.HAPolicyConfiguration; import org.apache.activemq.core.config.ScaleDownConfiguration; @@ -20,11 +20,11 @@ public class ReplicaPolicyConfiguration implements HAPolicyConfiguration { private String clusterName = null; - private int maxSavedReplicatedJournalsSize = HornetQDefaultConfiguration.getDefaultMaxSavedReplicatedJournalsSize(); + private int maxSavedReplicatedJournalsSize = ActiveMQDefaultConfiguration.getDefaultMaxSavedReplicatedJournalsSize(); private String groupName = null; - private boolean restartBackup = HornetQDefaultConfiguration.isDefaultRestartBackup(); + private boolean restartBackup = ActiveMQDefaultConfiguration.isDefaultRestartBackup(); private ScaleDownConfiguration scaleDownConfiguration; @@ -33,7 +33,7 @@ public class ReplicaPolicyConfiguration implements HAPolicyConfiguration * */ private boolean allowFailBack = false; - private long failbackDelay = HornetQDefaultConfiguration.getDefaultFailbackDelay(); + private long failbackDelay = ActiveMQDefaultConfiguration.getDefaultFailbackDelay(); public ReplicaPolicyConfiguration() { diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/ha/ReplicatedPolicyConfiguration.java b/activemq-server/src/main/java/org/apache/activemq/core/config/ha/ReplicatedPolicyConfiguration.java index 67ff663f95..96c1dc9f73 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/config/ha/ReplicatedPolicyConfiguration.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/config/ha/ReplicatedPolicyConfiguration.java @@ -12,12 +12,12 @@ */ package org.apache.activemq.core.config.ha; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.config.HAPolicyConfiguration; public class ReplicatedPolicyConfiguration implements HAPolicyConfiguration { - private boolean checkForLiveServer = HornetQDefaultConfiguration.isDefaultCheckForLiveServer(); + private boolean checkForLiveServer = ActiveMQDefaultConfiguration.isDefaultCheckForLiveServer(); private String groupName = null; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/ha/SharedStoreMasterPolicyConfiguration.java b/activemq-server/src/main/java/org/apache/activemq/core/config/ha/SharedStoreMasterPolicyConfiguration.java index a3a9d2fa1d..7d58c8b50b 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/config/ha/SharedStoreMasterPolicyConfiguration.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/config/ha/SharedStoreMasterPolicyConfiguration.java @@ -12,14 +12,14 @@ */ package org.apache.activemq.core.config.ha; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.config.HAPolicyConfiguration; public class SharedStoreMasterPolicyConfiguration implements HAPolicyConfiguration { - private long failbackDelay = HornetQDefaultConfiguration.getDefaultFailbackDelay(); + private long failbackDelay = ActiveMQDefaultConfiguration.getDefaultFailbackDelay(); - private boolean failoverOnServerShutdown = HornetQDefaultConfiguration.isDefaultFailoverOnServerShutdown(); + private boolean failoverOnServerShutdown = ActiveMQDefaultConfiguration.isDefaultFailoverOnServerShutdown(); public SharedStoreMasterPolicyConfiguration() { diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/ha/SharedStoreSlavePolicyConfiguration.java b/activemq-server/src/main/java/org/apache/activemq/core/config/ha/SharedStoreSlavePolicyConfiguration.java index d3a6377721..fa9acb7fb4 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/config/ha/SharedStoreSlavePolicyConfiguration.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/config/ha/SharedStoreSlavePolicyConfiguration.java @@ -12,19 +12,19 @@ */ package org.apache.activemq.core.config.ha; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.config.HAPolicyConfiguration; import org.apache.activemq.core.config.ScaleDownConfiguration; public class SharedStoreSlavePolicyConfiguration implements HAPolicyConfiguration { - private long failbackDelay = HornetQDefaultConfiguration.getDefaultFailbackDelay(); + private long failbackDelay = ActiveMQDefaultConfiguration.getDefaultFailbackDelay(); - private boolean failoverOnServerShutdown = HornetQDefaultConfiguration.isDefaultFailoverOnServerShutdown(); + private boolean failoverOnServerShutdown = ActiveMQDefaultConfiguration.isDefaultFailoverOnServerShutdown(); - private boolean restartBackup = HornetQDefaultConfiguration.isDefaultRestartBackup(); + private boolean restartBackup = ActiveMQDefaultConfiguration.isDefaultRestartBackup(); - private boolean allowFailBack = HornetQDefaultConfiguration.isDefaultAllowAutoFailback(); + private boolean allowFailBack = ActiveMQDefaultConfiguration.isDefaultAllowAutoFailback(); private ScaleDownConfiguration scaleDownConfiguration; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/impl/ConfigurationImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/config/impl/ConfigurationImpl.java index 96d914a2a4..adb971fba2 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/config/impl/ConfigurationImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/config/impl/ConfigurationImpl.java @@ -24,7 +24,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.BroadcastGroupConfiguration; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; import org.apache.activemq.api.core.SimpleString; @@ -61,38 +61,38 @@ public class ConfigurationImpl implements Configuration private String name = "ConfigurationImpl::" + System.identityHashCode(this); - protected boolean fileDeploymentEnabled = HornetQDefaultConfiguration.isDefaultFileDeploymentEnabled(); + protected boolean fileDeploymentEnabled = ActiveMQDefaultConfiguration.isDefaultFileDeploymentEnabled(); - private boolean persistenceEnabled = HornetQDefaultConfiguration.isDefaultPersistenceEnabled(); + private boolean persistenceEnabled = ActiveMQDefaultConfiguration.isDefaultPersistenceEnabled(); - protected long fileDeploymentScanPeriod = HornetQDefaultConfiguration.getDefaultFileDeployerScanPeriod(); + protected long fileDeploymentScanPeriod = ActiveMQDefaultConfiguration.getDefaultFileDeployerScanPeriod(); private boolean persistDeliveryCountBeforeDelivery = - HornetQDefaultConfiguration.isDefaultPersistDeliveryCountBeforeDelivery(); + ActiveMQDefaultConfiguration.isDefaultPersistDeliveryCountBeforeDelivery(); - private int scheduledThreadPoolMaxSize = HornetQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize(); + private int scheduledThreadPoolMaxSize = ActiveMQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize(); - private int threadPoolMaxSize = HornetQDefaultConfiguration.getDefaultThreadPoolMaxSize(); + private int threadPoolMaxSize = ActiveMQDefaultConfiguration.getDefaultThreadPoolMaxSize(); - private long securityInvalidationInterval = HornetQDefaultConfiguration.getDefaultSecurityInvalidationInterval(); + private long securityInvalidationInterval = ActiveMQDefaultConfiguration.getDefaultSecurityInvalidationInterval(); - private boolean securityEnabled = HornetQDefaultConfiguration.isDefaultSecurityEnabled(); + private boolean securityEnabled = ActiveMQDefaultConfiguration.isDefaultSecurityEnabled(); - protected boolean jmxManagementEnabled = HornetQDefaultConfiguration.isDefaultJmxManagementEnabled(); + protected boolean jmxManagementEnabled = ActiveMQDefaultConfiguration.isDefaultJmxManagementEnabled(); - protected String jmxDomain = HornetQDefaultConfiguration.getDefaultJmxDomain(); + protected String jmxDomain = ActiveMQDefaultConfiguration.getDefaultJmxDomain(); - protected long connectionTTLOverride = HornetQDefaultConfiguration.getDefaultConnectionTtlOverride(); + protected long connectionTTLOverride = ActiveMQDefaultConfiguration.getDefaultConnectionTtlOverride(); - protected boolean asyncConnectionExecutionEnabled = HornetQDefaultConfiguration.isDefaultAsyncConnectionExecutionEnabled(); + protected boolean asyncConnectionExecutionEnabled = ActiveMQDefaultConfiguration.isDefaultAsyncConnectionExecutionEnabled(); - private long messageExpiryScanPeriod = HornetQDefaultConfiguration.getDefaultMessageExpiryScanPeriod(); + private long messageExpiryScanPeriod = ActiveMQDefaultConfiguration.getDefaultMessageExpiryScanPeriod(); - private int messageExpiryThreadPriority = HornetQDefaultConfiguration.getDefaultMessageExpiryThreadPriority(); + private int messageExpiryThreadPriority = ActiveMQDefaultConfiguration.getDefaultMessageExpiryThreadPriority(); - protected int idCacheSize = HornetQDefaultConfiguration.getDefaultIdCacheSize(); + protected int idCacheSize = ActiveMQDefaultConfiguration.getDefaultIdCacheSize(); - private boolean persistIDCache = HornetQDefaultConfiguration.isDefaultPersistIdCache(); + private boolean persistIDCache = ActiveMQDefaultConfiguration.isDefaultPersistIdCache(); private List incomingInterceptorClassNames = new ArrayList(); @@ -116,84 +116,84 @@ public class ConfigurationImpl implements Configuration // Paging related attributes ------------------------------------------------------------ - private String pagingDirectory = HornetQDefaultConfiguration.getDefaultPagingDir(); + private String pagingDirectory = ActiveMQDefaultConfiguration.getDefaultPagingDir(); // File related attributes ----------------------------------------------------------- - private int maxConcurrentPageIO = HornetQDefaultConfiguration.getDefaultMaxConcurrentPageIo(); + private int maxConcurrentPageIO = ActiveMQDefaultConfiguration.getDefaultMaxConcurrentPageIo(); - protected String largeMessagesDirectory = HornetQDefaultConfiguration.getDefaultLargeMessagesDir(); + protected String largeMessagesDirectory = ActiveMQDefaultConfiguration.getDefaultLargeMessagesDir(); - protected String bindingsDirectory = HornetQDefaultConfiguration.getDefaultBindingsDirectory(); + protected String bindingsDirectory = ActiveMQDefaultConfiguration.getDefaultBindingsDirectory(); - protected boolean createBindingsDir = HornetQDefaultConfiguration.isDefaultCreateBindingsDir(); + protected boolean createBindingsDir = ActiveMQDefaultConfiguration.isDefaultCreateBindingsDir(); - protected String journalDirectory = HornetQDefaultConfiguration.getDefaultJournalDir(); + protected String journalDirectory = ActiveMQDefaultConfiguration.getDefaultJournalDir(); - protected boolean createJournalDir = HornetQDefaultConfiguration.isDefaultCreateJournalDir(); + protected boolean createJournalDir = ActiveMQDefaultConfiguration.isDefaultCreateJournalDir(); public JournalType journalType = ConfigurationImpl.DEFAULT_JOURNAL_TYPE; - protected boolean journalSyncTransactional = HornetQDefaultConfiguration.isDefaultJournalSyncTransactional(); + protected boolean journalSyncTransactional = ActiveMQDefaultConfiguration.isDefaultJournalSyncTransactional(); - protected boolean journalSyncNonTransactional = HornetQDefaultConfiguration.isDefaultJournalSyncNonTransactional(); + protected boolean journalSyncNonTransactional = ActiveMQDefaultConfiguration.isDefaultJournalSyncNonTransactional(); - protected int journalCompactMinFiles = HornetQDefaultConfiguration.getDefaultJournalCompactMinFiles(); + protected int journalCompactMinFiles = ActiveMQDefaultConfiguration.getDefaultJournalCompactMinFiles(); - protected int journalCompactPercentage = HornetQDefaultConfiguration.getDefaultJournalCompactPercentage(); + protected int journalCompactPercentage = ActiveMQDefaultConfiguration.getDefaultJournalCompactPercentage(); - protected int journalFileSize = HornetQDefaultConfiguration.getDefaultJournalFileSize(); + protected int journalFileSize = ActiveMQDefaultConfiguration.getDefaultJournalFileSize(); - protected int journalMinFiles = HornetQDefaultConfiguration.getDefaultJournalMinFiles(); + protected int journalMinFiles = ActiveMQDefaultConfiguration.getDefaultJournalMinFiles(); // AIO and NIO need different values for these attributes - protected int journalMaxIO_AIO = HornetQDefaultConfiguration.getDefaultJournalMaxIoAio(); + protected int journalMaxIO_AIO = ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio(); - protected int journalBufferTimeout_AIO = HornetQDefaultConfiguration.getDefaultJournalBufferTimeoutAio(); + protected int journalBufferTimeout_AIO = ActiveMQDefaultConfiguration.getDefaultJournalBufferTimeoutAio(); - protected int journalBufferSize_AIO = HornetQDefaultConfiguration.getDefaultJournalBufferSizeAio(); + protected int journalBufferSize_AIO = ActiveMQDefaultConfiguration.getDefaultJournalBufferSizeAio(); - protected int journalMaxIO_NIO = HornetQDefaultConfiguration.getDefaultJournalMaxIoNio(); + protected int journalMaxIO_NIO = ActiveMQDefaultConfiguration.getDefaultJournalMaxIoNio(); - protected int journalBufferTimeout_NIO = HornetQDefaultConfiguration.getDefaultJournalBufferTimeoutNio(); + protected int journalBufferTimeout_NIO = ActiveMQDefaultConfiguration.getDefaultJournalBufferTimeoutNio(); - protected int journalBufferSize_NIO = HornetQDefaultConfiguration.getDefaultJournalBufferSizeNio(); + protected int journalBufferSize_NIO = ActiveMQDefaultConfiguration.getDefaultJournalBufferSizeNio(); - protected boolean logJournalWriteRate = HornetQDefaultConfiguration.isDefaultJournalLogWriteRate(); + protected boolean logJournalWriteRate = ActiveMQDefaultConfiguration.isDefaultJournalLogWriteRate(); - protected int journalPerfBlastPages = HornetQDefaultConfiguration.getDefaultJournalPerfBlastPages(); + protected int journalPerfBlastPages = ActiveMQDefaultConfiguration.getDefaultJournalPerfBlastPages(); - protected boolean runSyncSpeedTest = HornetQDefaultConfiguration.isDefaultRunSyncSpeedTest(); + protected boolean runSyncSpeedTest = ActiveMQDefaultConfiguration.isDefaultRunSyncSpeedTest(); - private boolean wildcardRoutingEnabled = HornetQDefaultConfiguration.isDefaultWildcardRoutingEnabled(); + private boolean wildcardRoutingEnabled = ActiveMQDefaultConfiguration.isDefaultWildcardRoutingEnabled(); - private boolean messageCounterEnabled = HornetQDefaultConfiguration.isDefaultMessageCounterEnabled(); + private boolean messageCounterEnabled = ActiveMQDefaultConfiguration.isDefaultMessageCounterEnabled(); - private long messageCounterSamplePeriod = HornetQDefaultConfiguration.getDefaultMessageCounterSamplePeriod(); + private long messageCounterSamplePeriod = ActiveMQDefaultConfiguration.getDefaultMessageCounterSamplePeriod(); - private int messageCounterMaxDayHistory = HornetQDefaultConfiguration.getDefaultMessageCounterMaxDayHistory(); + private int messageCounterMaxDayHistory = ActiveMQDefaultConfiguration.getDefaultMessageCounterMaxDayHistory(); - private long transactionTimeout = HornetQDefaultConfiguration.getDefaultTransactionTimeout(); + private long transactionTimeout = ActiveMQDefaultConfiguration.getDefaultTransactionTimeout(); - private long transactionTimeoutScanPeriod = HornetQDefaultConfiguration.getDefaultTransactionTimeoutScanPeriod(); + private long transactionTimeoutScanPeriod = ActiveMQDefaultConfiguration.getDefaultTransactionTimeoutScanPeriod(); - private SimpleString managementAddress = HornetQDefaultConfiguration.getDefaultManagementAddress(); + private SimpleString managementAddress = ActiveMQDefaultConfiguration.getDefaultManagementAddress(); - private SimpleString managementNotificationAddress = HornetQDefaultConfiguration.getDefaultManagementNotificationAddress(); + private SimpleString managementNotificationAddress = ActiveMQDefaultConfiguration.getDefaultManagementNotificationAddress(); - protected String clusterUser = HornetQDefaultConfiguration.getDefaultClusterUser(); + protected String clusterUser = ActiveMQDefaultConfiguration.getDefaultClusterUser(); - protected String clusterPassword = HornetQDefaultConfiguration.getDefaultClusterPassword(); + protected String clusterPassword = ActiveMQDefaultConfiguration.getDefaultClusterPassword(); - private long serverDumpInterval = HornetQDefaultConfiguration.getDefaultServerDumpInterval(); + private long serverDumpInterval = ActiveMQDefaultConfiguration.getDefaultServerDumpInterval(); - protected boolean failoverOnServerShutdown = HornetQDefaultConfiguration.isDefaultFailoverOnServerShutdown(); + protected boolean failoverOnServerShutdown = ActiveMQDefaultConfiguration.isDefaultFailoverOnServerShutdown(); // percentage of free memory which triggers warning from the memory manager - private int memoryWarningThreshold = HornetQDefaultConfiguration.getDefaultMemoryWarningThreshold(); + private int memoryWarningThreshold = ActiveMQDefaultConfiguration.getDefaultMemoryWarningThreshold(); - private long memoryMeasureInterval = HornetQDefaultConfiguration.getDefaultMemoryMeasureInterval(); + private long memoryMeasureInterval = ActiveMQDefaultConfiguration.getDefaultMemoryMeasureInterval(); protected GroupingHandlerConfiguration groupingHandlerConfiguration; @@ -203,13 +203,13 @@ public class ConfigurationImpl implements Configuration protected List connectorServiceConfigurations = new ArrayList(); - private boolean maskPassword = HornetQDefaultConfiguration.isDefaultMaskPassword(); + private boolean maskPassword = ActiveMQDefaultConfiguration.isDefaultMaskPassword(); private transient String passwordCodec; - private boolean resolveProtocols = HornetQDefaultConfiguration.isDefaultResolveProtocols(); + private boolean resolveProtocols = ActiveMQDefaultConfiguration.isDefaultResolveProtocols(); - private long journalLockAcquisitionTimeout = HornetQDefaultConfiguration.getDefaultJournalLockAcquisitionTimeout(); + private long journalLockAcquisitionTimeout = ActiveMQDefaultConfiguration.getDefaultJournalLockAcquisitionTimeout(); private HAPolicyConfiguration haPolicyConfiguration; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/FileConfigurationParser.java b/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/FileConfigurationParser.java index 8c02868cb0..7b3744da2b 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/FileConfigurationParser.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/FileConfigurationParser.java @@ -22,7 +22,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.BroadcastEndpointFactoryConfiguration; import org.apache.activemq.api.core.BroadcastGroupConfiguration; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; @@ -790,8 +790,8 @@ public final class FileConfigurationParser extends XMLConfigurationUtil int journalMaxIO = getInteger(e, "journal-max-io", - config.getJournalType() == JournalType.ASYNCIO ? HornetQDefaultConfiguration.getDefaultJournalMaxIoAio() - : HornetQDefaultConfiguration.getDefaultJournalMaxIoNio(), + config.getJournalType() == JournalType.ASYNCIO ? ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio() + : ActiveMQDefaultConfiguration.getDefaultJournalMaxIoNio(), Validators.GT_ZERO); if (config.getJournalType() == JournalType.ASYNCIO) @@ -819,11 +819,11 @@ public final class FileConfigurationParser extends XMLConfigurationUtil config.setLogJournalWriteRate(getBoolean(e, "log-journal-write-rate", - HornetQDefaultConfiguration.isDefaultJournalLogWriteRate())); + ActiveMQDefaultConfiguration.isDefaultJournalLogWriteRate())); config.setJournalPerfBlastPages(getInteger(e, "perf-blast-pages", - HornetQDefaultConfiguration.getDefaultJournalPerfBlastPages(), + ActiveMQDefaultConfiguration.getDefaultJournalPerfBlastPages(), Validators.MINUS_ONE_OR_GT_ZERO)); config.setRunSyncSpeedTest(getBoolean(e, "run-sync-speed-test", config.isRunSyncSpeedTest())); @@ -1185,11 +1185,11 @@ public final class FileConfigurationParser extends XMLConfigurationUtil if (mainConfig.isMaskPassword()) { - params.put(HornetQDefaultConfiguration.getPropMaskPassword(), mainConfig.isMaskPassword()); + params.put(ActiveMQDefaultConfiguration.getPropMaskPassword(), mainConfig.isMaskPassword()); if (mainConfig.getPasswordCodec() != null) { - params.put(HornetQDefaultConfiguration.getPropPasswordCodec(), mainConfig.getPasswordCodec()); + params.put(ActiveMQDefaultConfiguration.getPropPasswordCodec(), mainConfig.getPasswordCodec()); } } @@ -1482,7 +1482,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil } long broadcastPeriod = - getLong(e, "broadcast-period", HornetQDefaultConfiguration.getDefaultBroadcastPeriod(), Validators.GT_ZERO); + getLong(e, "broadcast-period", ActiveMQDefaultConfiguration.getDefaultBroadcastPeriod(), Validators.GT_ZERO); String localAddress = getString(e, "local-bind-address", null, Validators.NO_CHECK); @@ -1532,7 +1532,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil Validators.GT_ZERO); long refreshTimeout = - getLong(e, "refresh-timeout", HornetQDefaultConfiguration.getDefaultBroadcastRefreshTimeout(), + getLong(e, "refresh-timeout", ActiveMQDefaultConfiguration.getDefaultBroadcastRefreshTimeout(), Validators.GT_ZERO); String localBindAddress = getString(e, "local-bind-address", null, Validators.NO_CHECK); @@ -1589,27 +1589,27 @@ public final class FileConfigurationParser extends XMLConfigurationUtil String connectorName = getString(e, "connector-ref", null, Validators.NOT_NULL_OR_EMPTY); boolean duplicateDetection = - getBoolean(e, "use-duplicate-detection", HornetQDefaultConfiguration.isDefaultClusterDuplicateDetection()); + getBoolean(e, "use-duplicate-detection", ActiveMQDefaultConfiguration.isDefaultClusterDuplicateDetection()); boolean forwardWhenNoConsumers = getBoolean(e, "forward-when-no-consumers", - HornetQDefaultConfiguration.isDefaultClusterForwardWhenNoConsumers()); + ActiveMQDefaultConfiguration.isDefaultClusterForwardWhenNoConsumers()); int maxHops = getInteger(e, "max-hops", - HornetQDefaultConfiguration.getDefaultClusterMaxHops(), + ActiveMQDefaultConfiguration.getDefaultClusterMaxHops(), Validators.GE_ZERO); long clientFailureCheckPeriod = - getLong(e, "check-period", HornetQDefaultConfiguration.getDefaultClusterFailureCheckPeriod(), + getLong(e, "check-period", ActiveMQDefaultConfiguration.getDefaultClusterFailureCheckPeriod(), Validators.GT_ZERO); long connectionTTL = - getLong(e, "connection-ttl", HornetQDefaultConfiguration.getDefaultClusterConnectionTtl(), + getLong(e, "connection-ttl", ActiveMQDefaultConfiguration.getDefaultClusterConnectionTtl(), Validators.GT_ZERO); long retryInterval = - getLong(e, "retry-interval", HornetQDefaultConfiguration.getDefaultClusterRetryInterval(), + getLong(e, "retry-interval", ActiveMQDefaultConfiguration.getDefaultClusterRetryInterval(), Validators.GT_ZERO); long callTimeout = getLong(e, "call-timeout", HornetQClient.DEFAULT_CALL_TIMEOUT, Validators.GT_ZERO); @@ -1617,24 +1617,24 @@ public final class FileConfigurationParser extends XMLConfigurationUtil long callFailoverTimeout = getLong(e, "call-failover-timeout", HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, Validators.MINUS_ONE_OR_GT_ZERO); double retryIntervalMultiplier = getDouble(e, "retry-interval-multiplier", - HornetQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(), Validators.GT_ZERO); + ActiveMQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(), Validators.GT_ZERO); int minLargeMessageSize = getInteger(e, "min-large-message-size", HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, Validators.GT_ZERO); - long maxRetryInterval = getLong(e, "max-retry-interval", HornetQDefaultConfiguration.getDefaultClusterMaxRetryInterval(), Validators.GT_ZERO); + long maxRetryInterval = getLong(e, "max-retry-interval", ActiveMQDefaultConfiguration.getDefaultClusterMaxRetryInterval(), Validators.GT_ZERO); - int initialConnectAttempts = getInteger(e, "initial-connect-attempts", HornetQDefaultConfiguration.getDefaultClusterInitialConnectAttempts(), Validators.MINUS_ONE_OR_GE_ZERO); + int initialConnectAttempts = getInteger(e, "initial-connect-attempts", ActiveMQDefaultConfiguration.getDefaultClusterInitialConnectAttempts(), Validators.MINUS_ONE_OR_GE_ZERO); - int reconnectAttempts = getInteger(e, "reconnect-attempts", HornetQDefaultConfiguration.getDefaultClusterReconnectAttempts(), Validators.MINUS_ONE_OR_GE_ZERO); + int reconnectAttempts = getInteger(e, "reconnect-attempts", ActiveMQDefaultConfiguration.getDefaultClusterReconnectAttempts(), Validators.MINUS_ONE_OR_GE_ZERO); int confirmationWindowSize = - getInteger(e, "confirmation-window-size", HornetQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(), + getInteger(e, "confirmation-window-size", ActiveMQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(), Validators.GT_ZERO); - long clusterNotificationInterval = getLong(e, "notification-interval", HornetQDefaultConfiguration.getDefaultClusterNotificationInterval(), Validators.GT_ZERO); + long clusterNotificationInterval = getLong(e, "notification-interval", ActiveMQDefaultConfiguration.getDefaultClusterNotificationInterval(), Validators.GT_ZERO); - int clusterNotificationAttempts = getInteger(e, "notification-attempts", HornetQDefaultConfiguration.getDefaultClusterNotificationAttempts(), Validators.GT_ZERO); + int clusterNotificationAttempts = getInteger(e, "notification-attempts", ActiveMQDefaultConfiguration.getDefaultClusterNotificationAttempts(), Validators.GT_ZERO); String scaleDownConnector = e.getAttribute("scale-down-connector"); @@ -1704,9 +1704,9 @@ public final class FileConfigurationParser extends XMLConfigurationUtil String name = node.getAttribute("name"); String type = getString(node, "type", null, Validators.NOT_NULL_OR_EMPTY); String address = getString(node, "address", null, Validators.NOT_NULL_OR_EMPTY); - Integer timeout = getInteger(node, "timeout", HornetQDefaultConfiguration.getDefaultGroupingHandlerTimeout(), Validators.GT_ZERO); - Long groupTimeout = getLong(node, "group-timeout", HornetQDefaultConfiguration.getDefaultGroupingHandlerGroupTimeout(), Validators.MINUS_ONE_OR_GT_ZERO); - Long reaperPeriod = getLong(node, "reaper-period", HornetQDefaultConfiguration.getDefaultGroupingHandlerReaperPeriod(), Validators.GT_ZERO); + Integer timeout = getInteger(node, "timeout", ActiveMQDefaultConfiguration.getDefaultGroupingHandlerTimeout(), Validators.GT_ZERO); + Long groupTimeout = getLong(node, "group-timeout", ActiveMQDefaultConfiguration.getDefaultGroupingHandlerGroupTimeout(), Validators.MINUS_ONE_OR_GT_ZERO); + Long reaperPeriod = getLong(node, "reaper-period", ActiveMQDefaultConfiguration.getDefaultGroupingHandlerReaperPeriod(), Validators.GT_ZERO); mainConfiguration.setGroupingHandlerConfiguration(new GroupingHandlerConfiguration() .setName(new SimpleString(name)) .setType( @@ -1731,7 +1731,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil // Default bridge conf int confirmationWindowSize = - getInteger(brNode, "confirmation-window-size", HornetQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize(), + getInteger(brNode, "confirmation-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize(), Validators.GT_ZERO); long retryInterval = getLong(brNode, "retry-interval", HornetQClient.DEFAULT_RETRY_INTERVAL, Validators.GT_ZERO); @@ -1753,24 +1753,24 @@ public final class FileConfigurationParser extends XMLConfigurationUtil Validators.GT_ZERO); int initialConnectAttempts = - getInteger(brNode, "initial-connect-attempts", HornetQDefaultConfiguration.getDefaultBridgeInitialConnectAttempts(), + getInteger(brNode, "initial-connect-attempts", ActiveMQDefaultConfiguration.getDefaultBridgeInitialConnectAttempts(), Validators.MINUS_ONE_OR_GE_ZERO); int reconnectAttempts = - getInteger(brNode, "reconnect-attempts", HornetQDefaultConfiguration.getDefaultBridgeReconnectAttempts(), + getInteger(brNode, "reconnect-attempts", ActiveMQDefaultConfiguration.getDefaultBridgeReconnectAttempts(), Validators.MINUS_ONE_OR_GE_ZERO); int reconnectAttemptsSameNode = - getInteger(brNode, "reconnect-attempts-same-node", HornetQDefaultConfiguration.getDefaultBridgeConnectSameNode(), + getInteger(brNode, "reconnect-attempts-same-node", ActiveMQDefaultConfiguration.getDefaultBridgeConnectSameNode(), Validators.MINUS_ONE_OR_GE_ZERO); boolean useDuplicateDetection = getBoolean(brNode, "use-duplicate-detection", - HornetQDefaultConfiguration.isDefaultBridgeDuplicateDetection()); + ActiveMQDefaultConfiguration.isDefaultBridgeDuplicateDetection()); String user = getString(brNode, "user", - HornetQDefaultConfiguration.getDefaultClusterUser(), + ActiveMQDefaultConfiguration.getDefaultClusterUser(), Validators.NO_CHECK); NodeList clusterPassNodes = brNode.getElementsByTagName("password"); @@ -1795,7 +1795,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil } else { - password = HornetQDefaultConfiguration.getDefaultClusterPassword(); + password = ActiveMQDefaultConfiguration.getDefaultClusterPassword(); } boolean ha = getBoolean(brNode, "ha", false); @@ -1883,7 +1883,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil String forwardingAddress = getString(e, "forwarding-address", null, Validators.NOT_NULL_OR_EMPTY); - boolean exclusive = getBoolean(e, "exclusive", HornetQDefaultConfiguration.isDefaultDivertExclusive()); + boolean exclusive = getBoolean(e, "exclusive", ActiveMQDefaultConfiguration.isDefaultDivertExclusive()); String transformerClassName = getString(e, "transformer-class-name", null, Validators.NO_CHECK); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/messagecounter/impl/MessageCounterManagerImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/messagecounter/impl/MessageCounterManagerImpl.java index 2415ff4387..67c039c7ab 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/messagecounter/impl/MessageCounterManagerImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/messagecounter/impl/MessageCounterManagerImpl.java @@ -21,7 +21,7 @@ import java.util.concurrent.Future; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.messagecounter.MessageCounter; import org.apache.activemq.core.messagecounter.MessageCounterManager; @@ -39,11 +39,11 @@ import org.apache.activemq.core.messagecounter.MessageCounterManager; public class MessageCounterManagerImpl implements MessageCounterManager { - public static final long DEFAULT_SAMPLE_PERIOD = HornetQDefaultConfiguration.getDefaultMessageCounterSamplePeriod(); + public static final long DEFAULT_SAMPLE_PERIOD = ActiveMQDefaultConfiguration.getDefaultMessageCounterSamplePeriod(); public static final long MIN_SAMPLE_PERIOD = 1000; - public static final int DEFAULT_MAX_DAY_COUNT = HornetQDefaultConfiguration.getDefaultMessageCounterMaxDayHistory(); + public static final int DEFAULT_MAX_DAY_COUNT = ActiveMQDefaultConfiguration.getDefaultMessageCounterMaxDayHistory(); private final Map messageCounters; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/TransportConstants.java b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/TransportConstants.java index 597597e4f1..003ee4e965 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/TransportConstants.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/TransportConstants.java @@ -16,7 +16,7 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; /** * A TransportConstants @@ -40,15 +40,15 @@ public final class TransportConstants Set allowableAcceptorKeys = new HashSet(); allowableAcceptorKeys.add(TransportConstants.SERVER_ID_PROP_NAME); allowableAcceptorKeys.add(org.apache.activemq.core.remoting.impl.netty.TransportConstants.CLUSTER_CONNECTION); - allowableAcceptorKeys.add(HornetQDefaultConfiguration.getPropMaskPassword()); - allowableAcceptorKeys.add(HornetQDefaultConfiguration.getPropPasswordCodec()); + allowableAcceptorKeys.add(ActiveMQDefaultConfiguration.getPropMaskPassword()); + allowableAcceptorKeys.add(ActiveMQDefaultConfiguration.getPropPasswordCodec()); ALLOWABLE_ACCEPTOR_KEYS = Collections.unmodifiableSet(allowableAcceptorKeys); Set allowableConnectorKeys = new HashSet(); allowableConnectorKeys.add(TransportConstants.SERVER_ID_PROP_NAME); - allowableConnectorKeys.add(HornetQDefaultConfiguration.getPropMaskPassword()); - allowableConnectorKeys.add(HornetQDefaultConfiguration.getPropPasswordCodec()); + allowableConnectorKeys.add(ActiveMQDefaultConfiguration.getPropMaskPassword()); + allowableConnectorKeys.add(ActiveMQDefaultConfiguration.getPropPasswordCodec()); ALLOWABLE_CONNECTOR_KEYS = Collections.unmodifiableSet(allowableConnectorKeys); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyAcceptor.java b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyAcceptor.java index be36072635..b490ce197c 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyAcceptor.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyAcceptor.java @@ -50,7 +50,7 @@ import io.netty.util.ResourceLeakDetector; import io.netty.util.concurrent.GenericFutureListener; import io.netty.util.concurrent.GlobalEventExecutor; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -221,8 +221,8 @@ public class NettyAcceptor implements Acceptor keyStorePassword = ConfigurationHelper.getPasswordProperty(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME, TransportConstants.DEFAULT_KEYSTORE_PASSWORD, configuration, - HornetQDefaultConfiguration.getPropMaskPassword(), - HornetQDefaultConfiguration.getPropMaskPassword()); + ActiveMQDefaultConfiguration.getPropMaskPassword(), + ActiveMQDefaultConfiguration.getPropMaskPassword()); trustStoreProvider = ConfigurationHelper.getStringProperty(TransportConstants.TRUSTSTORE_PROVIDER_PROP_NAME, TransportConstants.DEFAULT_TRUSTSTORE_PROVIDER, @@ -235,8 +235,8 @@ public class NettyAcceptor implements Acceptor trustStorePassword = ConfigurationHelper.getPasswordProperty(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, TransportConstants.DEFAULT_TRUSTSTORE_PASSWORD, configuration, - HornetQDefaultConfiguration.getPropMaskPassword(), - HornetQDefaultConfiguration.getPropMaskPassword()); + ActiveMQDefaultConfiguration.getPropMaskPassword(), + ActiveMQDefaultConfiguration.getPropMaskPassword()); enabledCipherSuites = ConfigurationHelper.getStringProperty(TransportConstants.ENABLED_CIPHER_SUITES_PROP_NAME, TransportConstants.DEFAULT_ENABLED_CIPHER_SUITES, diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/BackupPolicy.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/BackupPolicy.java index 8e9013f73a..1f0d7796db 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/BackupPolicy.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/BackupPolicy.java @@ -12,13 +12,13 @@ */ package org.apache.activemq.core.server.cluster.ha; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.server.impl.Activation; public abstract class BackupPolicy implements HAPolicy { protected ScaleDownPolicy scaleDownPolicy; - protected boolean restartBackup = HornetQDefaultConfiguration.isDefaultRestartBackup(); + protected boolean restartBackup = ActiveMQDefaultConfiguration.isDefaultRestartBackup(); public ScaleDownPolicy getScaleDownPolicy() { diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ColocatedPolicy.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ColocatedPolicy.java index a781527f5e..bd897a43bb 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ColocatedPolicy.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ColocatedPolicy.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.server.cluster.ha; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.server.impl.ColocatedActivation; import org.apache.activemq.core.server.impl.HornetQServerImpl; import org.apache.activemq.core.server.impl.LiveActivation; @@ -25,15 +25,15 @@ public class ColocatedPolicy implements HAPolicy { /*live stuff*/ - private boolean requestBackup = HornetQDefaultConfiguration.isDefaultHapolicyRequestBackup(); + private boolean requestBackup = ActiveMQDefaultConfiguration.isDefaultHapolicyRequestBackup(); - private int backupRequestRetries = HornetQDefaultConfiguration.getDefaultHapolicyBackupRequestRetries(); + private int backupRequestRetries = ActiveMQDefaultConfiguration.getDefaultHapolicyBackupRequestRetries(); - private long backupRequestRetryInterval = HornetQDefaultConfiguration.getDefaultHapolicyBackupRequestRetryInterval(); + private long backupRequestRetryInterval = ActiveMQDefaultConfiguration.getDefaultHapolicyBackupRequestRetryInterval(); - private int maxBackups = HornetQDefaultConfiguration.getDefaultHapolicyMaxBackups(); + private int maxBackups = ActiveMQDefaultConfiguration.getDefaultHapolicyMaxBackups(); - private int backupPortOffset = HornetQDefaultConfiguration.getDefaultHapolicyBackupPortOffset(); + private int backupPortOffset = ActiveMQDefaultConfiguration.getDefaultHapolicyBackupPortOffset(); /*backup stuff*/ private List excludedConnectors = new ArrayList<>(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ReplicaPolicy.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ReplicaPolicy.java index 6b8923ae24..f0c623dcab 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ReplicaPolicy.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ReplicaPolicy.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.server.cluster.ha; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.server.impl.Activation; import org.apache.activemq.core.server.impl.HornetQServerImpl; import org.apache.activemq.core.server.impl.SharedNothingBackupActivation; @@ -23,11 +23,11 @@ public class ReplicaPolicy extends BackupPolicy { private String clusterName; - private int maxSavedReplicatedJournalsSize = HornetQDefaultConfiguration.getDefaultMaxSavedReplicatedJournalsSize(); + private int maxSavedReplicatedJournalsSize = ActiveMQDefaultConfiguration.getDefaultMaxSavedReplicatedJournalsSize(); private String groupName = null; - private boolean restartBackup = HornetQDefaultConfiguration.isDefaultRestartBackup(); + private boolean restartBackup = ActiveMQDefaultConfiguration.isDefaultRestartBackup(); private ReplicatedPolicy replicatedPolicy; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ReplicatedPolicy.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ReplicatedPolicy.java index da28fd5d1d..e528d37d1d 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ReplicatedPolicy.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ReplicatedPolicy.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.server.cluster.ha; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.server.impl.HornetQServerImpl; import org.apache.activemq.core.server.impl.LiveActivation; import org.apache.activemq.core.server.impl.SharedNothingLiveActivation; @@ -21,7 +21,7 @@ import java.util.Map; public class ReplicatedPolicy implements HAPolicy { - private boolean checkForLiveServer = HornetQDefaultConfiguration.isDefaultCheckForLiveServer(); + private boolean checkForLiveServer = ActiveMQDefaultConfiguration.isDefaultCheckForLiveServer(); private String groupName = null; @@ -31,9 +31,9 @@ public class ReplicatedPolicy implements HAPolicy * these are only set by the ReplicaPolicy after failover to decide if the live server can failback, these should not * be exposed in configuration. * */ - private boolean allowAutoFailBack = HornetQDefaultConfiguration.isDefaultAllowAutoFailback(); + private boolean allowAutoFailBack = ActiveMQDefaultConfiguration.isDefaultAllowAutoFailback(); - private long failbackDelay = HornetQDefaultConfiguration.getDefaultFailbackDelay(); + private long failbackDelay = ActiveMQDefaultConfiguration.getDefaultFailbackDelay(); /* * this is used as the policy when the server is started after a failover diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/SharedStoreMasterPolicy.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/SharedStoreMasterPolicy.java index 2384d91624..4f625c3102 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/SharedStoreMasterPolicy.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/SharedStoreMasterPolicy.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.server.cluster.ha; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.server.impl.HornetQServerImpl; import org.apache.activemq.core.server.impl.LiveActivation; import org.apache.activemq.core.server.impl.SharedStoreLiveActivation; @@ -21,9 +21,9 @@ import java.util.Map; public class SharedStoreMasterPolicy implements HAPolicy { - private long failbackDelay = HornetQDefaultConfiguration.getDefaultFailbackDelay(); + private long failbackDelay = ActiveMQDefaultConfiguration.getDefaultFailbackDelay(); - private boolean failoverOnServerShutdown = HornetQDefaultConfiguration.isDefaultFailoverOnServerShutdown(); + private boolean failoverOnServerShutdown = ActiveMQDefaultConfiguration.isDefaultFailoverOnServerShutdown(); private SharedStoreSlavePolicy sharedStoreSlavePolicy; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/SharedStoreSlavePolicy.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/SharedStoreSlavePolicy.java index 7fdad9de09..51ad6e9f65 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/SharedStoreSlavePolicy.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/SharedStoreSlavePolicy.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.server.cluster.ha; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.server.impl.Activation; import org.apache.activemq.core.server.impl.HornetQServerImpl; import org.apache.activemq.core.server.impl.SharedStoreBackupActivation; @@ -21,11 +21,11 @@ import java.util.Map; public class SharedStoreSlavePolicy extends BackupPolicy { - private long failbackDelay = HornetQDefaultConfiguration.getDefaultFailbackDelay(); + private long failbackDelay = ActiveMQDefaultConfiguration.getDefaultFailbackDelay(); - private boolean failoverOnServerShutdown = HornetQDefaultConfiguration.isDefaultFailoverOnServerShutdown(); + private boolean failoverOnServerShutdown = ActiveMQDefaultConfiguration.isDefaultFailoverOnServerShutdown(); - private boolean allowAutoFailBack = HornetQDefaultConfiguration.isDefaultAllowAutoFailback(); + private boolean allowAutoFailBack = ActiveMQDefaultConfiguration.isDefaultAllowAutoFailback(); //this is how we act once we have failed over private SharedStoreMasterPolicy sharedStoreMasterPolicy; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/GroupingHandlerConfiguration.java b/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/GroupingHandlerConfiguration.java index c1aae65d62..2f2696ea76 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/GroupingHandlerConfiguration.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/GroupingHandlerConfiguration.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.server.group.impl; import java.io.Serializable; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.SimpleString; /** @@ -36,11 +36,11 @@ public final class GroupingHandlerConfiguration implements Serializable private SimpleString address = null; - private long timeout = HornetQDefaultConfiguration.getDefaultGroupingHandlerTimeout(); + private long timeout = ActiveMQDefaultConfiguration.getDefaultGroupingHandlerTimeout(); - private long groupTimeout = HornetQDefaultConfiguration.getDefaultGroupingHandlerGroupTimeout(); + private long groupTimeout = ActiveMQDefaultConfiguration.getDefaultGroupingHandlerGroupTimeout(); - private long reaperPeriod = HornetQDefaultConfiguration.getDefaultGroupingHandlerReaperPeriod(); + private long reaperPeriod = ActiveMQDefaultConfiguration.getDefaultGroupingHandlerReaperPeriod(); public GroupingHandlerConfiguration() { diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/HornetQServerImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/HornetQServerImpl.java index 485bb2e33d..ada5c0eeba 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/HornetQServerImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/HornetQServerImpl.java @@ -37,7 +37,7 @@ import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.asyncio.impl.AsynchronousFileImpl; @@ -1631,7 +1631,7 @@ public class HornetQServerImpl implements HornetQServer storageManager = createStorageManager(); - if (HornetQDefaultConfiguration.getDefaultClusterUser().equals(configuration.getClusterUser()) && HornetQDefaultConfiguration.getDefaultClusterPassword().equals(configuration.getClusterPassword())) + if (ActiveMQDefaultConfiguration.getDefaultClusterUser().equals(configuration.getClusterUser()) && ActiveMQDefaultConfiguration.getDefaultClusterPassword().equals(configuration.getClusterPassword())) { HornetQServerLogger.LOGGER.clusterSecurityRisk(); } diff --git a/activemq-server/src/test/java/org/apache/activemq/core/config/impl/ConfigurationImplTest.java b/activemq-server/src/test/java/org/apache/activemq/core/config/impl/ConfigurationImplTest.java index 8cffc7a8c5..ddd7c18183 100644 --- a/activemq-server/src/test/java/org/apache/activemq/core/config/impl/ConfigurationImplTest.java +++ b/activemq-server/src/test/java/org/apache/activemq/core/config/impl/ConfigurationImplTest.java @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.core.config.impl; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.config.ha.LiveOnlyPolicyConfiguration; import org.junit.Before; @@ -23,7 +24,6 @@ import java.io.ObjectOutputStream; import org.junit.Assert; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.journal.impl.JournalConstants; @@ -45,63 +45,63 @@ public class ConfigurationImplTest extends UnitTestCase @Test public void testDefaults() { - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize(), + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize(), conf.getScheduledThreadPoolMaxSize()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultSecurityInvalidationInterval(), + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultSecurityInvalidationInterval(), conf.getSecurityInvalidationInterval()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultSecurityEnabled(), conf.isSecurityEnabled()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultBindingsDirectory(), conf.getBindingsDirectory()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultCreateBindingsDir(), conf.isCreateBindingsDir()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJournalDir(), conf.getJournalDirectory()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultCreateJournalDir(), conf.isCreateJournalDir()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultSecurityEnabled(), conf.isSecurityEnabled()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultBindingsDirectory(), conf.getBindingsDirectory()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultCreateBindingsDir(), conf.isCreateBindingsDir()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJournalDir(), conf.getJournalDirectory()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultCreateJournalDir(), conf.isCreateJournalDir()); Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_TYPE, conf.getJournalType()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultJournalSyncTransactional(), conf.isJournalSyncTransactional()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultJournalSyncNonTransactional(), + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultJournalSyncTransactional(), conf.isJournalSyncTransactional()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultJournalSyncNonTransactional(), conf.isJournalSyncNonTransactional()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJournalFileSize(), conf.getJournalFileSize()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJournalMinFiles(), conf.getJournalMinFiles()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJournalMaxIoAio(), conf.getJournalMaxIO_AIO()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJournalMaxIoNio(), conf.getJournalMaxIO_NIO()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultWildcardRoutingEnabled(), conf.isWildcardRoutingEnabled()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultTransactionTimeout(), conf.getTransactionTimeout()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultMessageExpiryScanPeriod(), conf.getMessageExpiryScanPeriod()); // OK - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultMessageExpiryThreadPriority(), + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJournalFileSize(), conf.getJournalFileSize()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJournalMinFiles(), conf.getJournalMinFiles()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio(), conf.getJournalMaxIO_AIO()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJournalMaxIoNio(), conf.getJournalMaxIO_NIO()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultWildcardRoutingEnabled(), conf.isWildcardRoutingEnabled()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultTransactionTimeout(), conf.getTransactionTimeout()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultMessageExpiryScanPeriod(), conf.getMessageExpiryScanPeriod()); // OK + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultMessageExpiryThreadPriority(), conf.getMessageExpiryThreadPriority()); // OK - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultTransactionTimeoutScanPeriod(), + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultTransactionTimeoutScanPeriod(), conf.getTransactionTimeoutScanPeriod()); // OK - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultManagementAddress(), conf.getManagementAddress()); // OK - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultManagementNotificationAddress(), + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultManagementAddress(), conf.getManagementAddress()); // OK + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultManagementNotificationAddress(), conf.getManagementNotificationAddress()); // OK - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultClusterUser(), conf.getClusterUser()); // OK - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultClusterPassword(), conf.getClusterPassword()); // OK - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultPersistenceEnabled(), conf.isPersistenceEnabled()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultFileDeploymentEnabled(), conf.isFileDeploymentEnabled()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultPersistDeliveryCountBeforeDelivery(), + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultClusterUser(), conf.getClusterUser()); // OK + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultClusterPassword(), conf.getClusterPassword()); // OK + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultPersistenceEnabled(), conf.isPersistenceEnabled()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultFileDeploymentEnabled(), conf.isFileDeploymentEnabled()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultPersistDeliveryCountBeforeDelivery(), conf.isPersistDeliveryCountBeforeDelivery()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultFileDeployerScanPeriod(), conf.getFileDeployerScanPeriod()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultThreadPoolMaxSize(), conf.getThreadPoolMaxSize()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultJmxManagementEnabled(), conf.isJMXManagementEnabled()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultConnectionTtlOverride(), conf.getConnectionTTLOverride()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultAsyncConnectionExecutionEnabled(), + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultFileDeployerScanPeriod(), conf.getFileDeployerScanPeriod()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultThreadPoolMaxSize(), conf.getThreadPoolMaxSize()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultJmxManagementEnabled(), conf.isJMXManagementEnabled()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultConnectionTtlOverride(), conf.getConnectionTTLOverride()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultAsyncConnectionExecutionEnabled(), conf.isAsyncConnectionExecutionEnabled()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultPagingDir(), conf.getPagingDirectory()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultLargeMessagesDir(), conf.getLargeMessagesDirectory()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJournalCompactPercentage(), conf.getJournalCompactPercentage()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultPagingDir(), conf.getPagingDirectory()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultLargeMessagesDir(), conf.getLargeMessagesDirectory()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJournalCompactPercentage(), conf.getJournalCompactPercentage()); Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO, conf.getJournalBufferTimeout_AIO()); Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO, conf.getJournalBufferTimeout_NIO()); Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO, conf.getJournalBufferSize_AIO()); Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO, conf.getJournalBufferSize_NIO()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultJournalLogWriteRate(), conf.isLogJournalWriteRate()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJournalPerfBlastPages(), conf.getJournalPerfBlastPages()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultMessageCounterEnabled(), conf.isMessageCounterEnabled()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultMessageCounterMaxDayHistory(), + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultJournalLogWriteRate(), conf.isLogJournalWriteRate()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJournalPerfBlastPages(), conf.getJournalPerfBlastPages()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultMessageCounterEnabled(), conf.isMessageCounterEnabled()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultMessageCounterMaxDayHistory(), conf.getMessageCounterMaxDayHistory()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultMessageCounterSamplePeriod(), conf.getMessageCounterSamplePeriod()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultIdCacheSize(), conf.getIDCacheSize()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultPersistIdCache(), conf.isPersistIDCache()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultServerDumpInterval(), conf.getServerDumpInterval()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultMemoryWarningThreshold(), conf.getMemoryWarningThreshold()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultMemoryMeasureInterval(), conf.getMemoryMeasureInterval()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultMessageCounterSamplePeriod(), conf.getMessageCounterSamplePeriod()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultIdCacheSize(), conf.getIDCacheSize()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultPersistIdCache(), conf.isPersistIDCache()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultServerDumpInterval(), conf.getServerDumpInterval()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultMemoryWarningThreshold(), conf.getMemoryWarningThreshold()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultMemoryMeasureInterval(), conf.getMemoryMeasureInterval()); } @Test diff --git a/activemq-server/src/test/java/org/apache/activemq/core/config/impl/DefaultsFileConfigurationTest.java b/activemq-server/src/test/java/org/apache/activemq/core/config/impl/DefaultsFileConfigurationTest.java index ed6e70c9b2..ae1e46a310 100644 --- a/activemq-server/src/test/java/org/apache/activemq/core/config/impl/DefaultsFileConfigurationTest.java +++ b/activemq-server/src/test/java/org/apache/activemq/core/config/impl/DefaultsFileConfigurationTest.java @@ -12,6 +12,7 @@ */ package org.apache.activemq.core.config.impl; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.config.ha.LiveOnlyPolicyConfiguration; import org.junit.Test; @@ -19,7 +20,6 @@ import java.util.Collections; import org.junit.Assert; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.journal.impl.JournalConstants; @@ -38,23 +38,23 @@ public class DefaultsFileConfigurationTest extends ConfigurationImplTest public void testDefaults() { - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize(), + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize(), conf.getScheduledThreadPoolMaxSize()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultThreadPoolMaxSize(), conf.getThreadPoolMaxSize()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultThreadPoolMaxSize(), conf.getThreadPoolMaxSize()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultSecurityInvalidationInterval(), + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultSecurityInvalidationInterval(), conf.getSecurityInvalidationInterval()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultSecurityEnabled(), conf.isSecurityEnabled()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultSecurityEnabled(), conf.isSecurityEnabled()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultJmxManagementEnabled(), conf.isJMXManagementEnabled()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultJmxManagementEnabled(), conf.isJMXManagementEnabled()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJmxDomain(), conf.getJMXDomain()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJmxDomain(), conf.getJMXDomain()); Assert.assertEquals(0, conf.getIncomingInterceptorClassNames().size()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultConnectionTtlOverride(), conf.getConnectionTTLOverride()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultConnectionTtlOverride(), conf.getConnectionTTLOverride()); Assert.assertEquals(0, conf.getAcceptorConfigurations().size()); @@ -72,70 +72,70 @@ public class DefaultsFileConfigurationTest extends ConfigurationImplTest Assert.assertEquals(Collections.emptyList(), conf.getQueueConfigurations()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultManagementAddress(), conf.getManagementAddress()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultManagementAddress(), conf.getManagementAddress()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultManagementNotificationAddress(), + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultManagementNotificationAddress(), conf.getManagementNotificationAddress()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultClusterUser(), conf.getClusterUser()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultClusterUser(), conf.getClusterUser()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultClusterPassword(), conf.getClusterPassword()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultClusterPassword(), conf.getClusterPassword()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultIdCacheSize(), conf.getIDCacheSize()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultIdCacheSize(), conf.getIDCacheSize()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultPersistIdCache(), conf.isPersistIDCache()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultPersistIdCache(), conf.isPersistIDCache()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultBindingsDirectory(), conf.getBindingsDirectory()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultBindingsDirectory(), conf.getBindingsDirectory()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJournalDir(), conf.getJournalDirectory()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJournalDir(), conf.getJournalDirectory()); Assert.assertEquals(getDefaultJournalType(), conf.getJournalType()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultJournalSyncTransactional(), conf.isJournalSyncTransactional()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultJournalSyncTransactional(), conf.isJournalSyncTransactional()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultJournalSyncNonTransactional(), + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultJournalSyncNonTransactional(), conf.isJournalSyncNonTransactional()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJournalFileSize(), conf.getJournalFileSize()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJournalFileSize(), conf.getJournalFileSize()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJournalCompactMinFiles(), conf.getJournalCompactMinFiles()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJournalCompactMinFiles(), conf.getJournalCompactMinFiles()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJournalCompactPercentage(), conf.getJournalCompactPercentage()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJournalCompactPercentage(), conf.getJournalCompactPercentage()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJournalMinFiles(), conf.getJournalMinFiles()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJournalMinFiles(), conf.getJournalMinFiles()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJournalMaxIoAio(), conf.getJournalMaxIO_AIO()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio(), conf.getJournalMaxIO_AIO()); Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO, conf.getJournalBufferTimeout_AIO()); Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO, conf.getJournalBufferSize_AIO()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJournalMaxIoNio(), conf.getJournalMaxIO_NIO()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJournalMaxIoNio(), conf.getJournalMaxIO_NIO()); Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO, conf.getJournalBufferTimeout_NIO()); Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO, conf.getJournalBufferSize_NIO()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultCreateBindingsDir(), conf.isCreateBindingsDir()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultCreateBindingsDir(), conf.isCreateBindingsDir()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultCreateJournalDir(), conf.isCreateJournalDir()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultCreateJournalDir(), conf.isCreateJournalDir()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultPagingDir(), conf.getPagingDirectory()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultPagingDir(), conf.getPagingDirectory()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultLargeMessagesDir(), conf.getLargeMessagesDirectory()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultLargeMessagesDir(), conf.getLargeMessagesDirectory()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultWildcardRoutingEnabled(), conf.isWildcardRoutingEnabled()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultWildcardRoutingEnabled(), conf.isWildcardRoutingEnabled()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultTransactionTimeout(), conf.getTransactionTimeout()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultTransactionTimeout(), conf.getTransactionTimeout()); - Assert.assertEquals(HornetQDefaultConfiguration.isDefaultMessageCounterEnabled(), conf.isMessageCounterEnabled()); + Assert.assertEquals(ActiveMQDefaultConfiguration.isDefaultMessageCounterEnabled(), conf.isMessageCounterEnabled()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultTransactionTimeoutScanPeriod(), + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultTransactionTimeoutScanPeriod(), conf.getTransactionTimeoutScanPeriod()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultMessageExpiryScanPeriod(), conf.getMessageExpiryScanPeriod()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultMessageExpiryScanPeriod(), conf.getMessageExpiryScanPeriod()); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultMessageExpiryThreadPriority(), + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultMessageExpiryThreadPriority(), conf.getMessageExpiryThreadPriority()); Assert.assertTrue(conf.getHAPolicyConfiguration() instanceof LiveOnlyPolicyConfiguration); diff --git a/activemq-server/src/test/java/org/apache/activemq/core/config/impl/FileConfigurationParserTest.java b/activemq-server/src/test/java/org/apache/activemq/core/config/impl/FileConfigurationParserTest.java index 1d567dda66..7d98ad8c37 100644 --- a/activemq-server/src/test/java/org/apache/activemq/core/config/impl/FileConfigurationParserTest.java +++ b/activemq-server/src/test/java/org/apache/activemq/core/config/impl/FileConfigurationParserTest.java @@ -17,7 +17,7 @@ import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.deployers.impl.FileConfigurationParser; import org.apache.activemq.tests.util.UnitTestCase; @@ -82,7 +82,7 @@ public class FileConfigurationParserTest extends UnitTestCase String clusterPassword = config.getClusterPassword(); - assertEquals(HornetQDefaultConfiguration.getDefaultClusterPassword(), clusterPassword); + assertEquals(ActiveMQDefaultConfiguration.getDefaultClusterPassword(), clusterPassword); //if we add cluster-password, it should be default plain text String clusterPasswordPart = "helloworld"; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/JournalCrashTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/JournalCrashTest.java index 89e62f4ead..4080873c26 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/JournalCrashTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/JournalCrashTest.java @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.client; import java.util.ArrayList; import java.util.Arrays; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -60,9 +60,9 @@ public class JournalCrashTest extends ServiceTestBase protected void startServer() throws Exception { Configuration config = createDefaultConfig() - .setJournalFileSize(HornetQDefaultConfiguration.getDefaultJournalFileSize()) - .setJournalCompactMinFiles(HornetQDefaultConfiguration.getDefaultJournalCompactMinFiles()) - .setJournalCompactPercentage(HornetQDefaultConfiguration.getDefaultJournalCompactPercentage()) + .setJournalFileSize(ActiveMQDefaultConfiguration.getDefaultJournalFileSize()) + .setJournalCompactMinFiles(ActiveMQDefaultConfiguration.getDefaultJournalCompactMinFiles()) + .setJournalCompactPercentage(ActiveMQDefaultConfiguration.getDefaultJournalCompactPercentage()) .setJournalMinFiles(2); server = super.createServer(true, config); @@ -222,7 +222,7 @@ public class JournalCrashTest extends ServiceTestBase private void printJournal() throws Exception { NIOSequentialFileFactory factory = new NIOSequentialFileFactory(getJournalDir()); - JournalImpl journal = new JournalImpl(HornetQDefaultConfiguration.getDefaultJournalFileSize(), + JournalImpl journal = new JournalImpl(ActiveMQDefaultConfiguration.getDefaultJournalFileSize(), 2, 0, 0, diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SlowConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SlowConsumerTest.java index bfcdad112d..bf85791d8b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SlowConsumerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SlowConsumerTest.java @@ -18,7 +18,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.ActiveMQObjectClosedException; @@ -155,7 +155,7 @@ public class SlowConsumerTest extends ServiceTestBase SimpleString notifQueue = RandomUtil.randomSimpleString(); - session.createQueue(HornetQDefaultConfiguration.getDefaultManagementNotificationAddress(), notifQueue, null, false); + session.createQueue(ActiveMQDefaultConfiguration.getDefaultManagementNotificationAddress(), notifQueue, null, false); ClientConsumer notifConsumer = session.createConsumer(notifQueue.toString(), ManagementHelper.HDR_NOTIFICATION_TYPE + "='" + CoreNotificationType.CONSUMER_SLOW + "'"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusterTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusterTestBase.java index cb2f24346f..0ea4c1372b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusterTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusterTestBase.java @@ -27,7 +27,7 @@ import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.BroadcastGroupConfiguration; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; @@ -866,7 +866,7 @@ public abstract class ClusterTestBase extends ServiceTestBase protected void setUpGroupHandler(final GroupingHandlerConfiguration.TYPE type, final int node, final int timeout) { - setUpGroupHandler(type, node, timeout, -1, HornetQDefaultConfiguration.getDefaultGroupingHandlerReaperPeriod()); + setUpGroupHandler(type, node, timeout, -1, ActiveMQDefaultConfiguration.getDefaultGroupingHandlerReaperPeriod()); } protected void setUpGroupHandler(final GroupingHandlerConfiguration.TYPE type, final int node, final int timeout, final long groupTimeout, diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/AutomaticColocatedQuorumVoteTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/AutomaticColocatedQuorumVoteTest.java index 190dbaa8a7..eef65d0e68 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/AutomaticColocatedQuorumVoteTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/AutomaticColocatedQuorumVoteTest.java @@ -21,7 +21,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.HornetQClient; @@ -310,10 +310,10 @@ public class AutomaticColocatedQuorumVoteTest extends ServiceTestBase .clearAcceptorConfigurations() .addAcceptorConfiguration(liveAcceptor) .addConnectorConfiguration(liveConnector.getName(), liveConnector) - .setJournalDirectory(HornetQDefaultConfiguration.getDefaultJournalDir() + identity) - .setBindingsDirectory(HornetQDefaultConfiguration.getDefaultBindingsDirectory() + identity) - .setLargeMessagesDirectory(HornetQDefaultConfiguration.getDefaultLargeMessagesDir() + identity) - .setPagingDirectory(HornetQDefaultConfiguration.getDefaultPagingDir() + identity) + .setJournalDirectory(ActiveMQDefaultConfiguration.getDefaultJournalDir() + identity) + .setBindingsDirectory(ActiveMQDefaultConfiguration.getDefaultBindingsDirectory() + identity) + .setLargeMessagesDirectory(ActiveMQDefaultConfiguration.getDefaultLargeMessagesDir() + identity) + .setPagingDirectory(ActiveMQDefaultConfiguration.getDefaultPagingDir() + identity) .addQueueConfiguration(new CoreQueueConfiguration() .setAddress("jms.queue.testQueue") .setName("jms.queue.testQueue")); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/MultipleLivesMultipleBackupsFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/MultipleLivesMultipleBackupsFailoverTest.java index 1ebbb123a5..20e114de09 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/MultipleLivesMultipleBackupsFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/MultipleLivesMultipleBackupsFailoverTest.java @@ -17,7 +17,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ServerLocator; @@ -160,10 +160,10 @@ public class MultipleLivesMultipleBackupsFailoverTest extends MultipleBackupsFai .addAcceptorConfiguration(createTransportConfiguration(isNetty(), true, generateParams(nodeid, isNetty()))) .setSecurityEnabled(false) .setHAPolicyConfiguration(sharedStore ? new SharedStoreSlavePolicyConfiguration() : new ReplicaPolicyConfiguration()) - .setBindingsDirectory(HornetQDefaultConfiguration.getDefaultBindingsDirectory() + "_" + liveNode) - .setJournalDirectory(HornetQDefaultConfiguration.getDefaultJournalDir() + "_" + liveNode) - .setPagingDirectory(HornetQDefaultConfiguration.getDefaultPagingDir() + "_" + liveNode) - .setLargeMessagesDirectory(HornetQDefaultConfiguration.getDefaultLargeMessagesDir() + "_" + liveNode); + .setBindingsDirectory(ActiveMQDefaultConfiguration.getDefaultBindingsDirectory() + "_" + liveNode) + .setJournalDirectory(ActiveMQDefaultConfiguration.getDefaultJournalDir() + "_" + liveNode) + .setPagingDirectory(ActiveMQDefaultConfiguration.getDefaultPagingDir() + "_" + liveNode) + .setLargeMessagesDirectory(ActiveMQDefaultConfiguration.getDefaultLargeMessagesDir() + "_" + liveNode); for (int node : otherBackupNodes) { @@ -195,10 +195,10 @@ public class MultipleLivesMultipleBackupsFailoverTest extends MultipleBackupsFai .addAcceptorConfiguration(createTransportConfiguration(isNetty(), true, generateParams(liveNode, isNetty()))) .setSecurityEnabled(false) .setHAPolicyConfiguration(sharedStore ? new SharedStoreMasterPolicyConfiguration() : new ReplicatedPolicyConfiguration()) - .setBindingsDirectory(HornetQDefaultConfiguration.getDefaultBindingsDirectory() + "_" + liveNode) - .setJournalDirectory(HornetQDefaultConfiguration.getDefaultJournalDir() + "_" + liveNode) - .setPagingDirectory(HornetQDefaultConfiguration.getDefaultPagingDir() + "_" + liveNode) - .setLargeMessagesDirectory(HornetQDefaultConfiguration.getDefaultLargeMessagesDir() + "_" + liveNode) + .setBindingsDirectory(ActiveMQDefaultConfiguration.getDefaultBindingsDirectory() + "_" + liveNode) + .setJournalDirectory(ActiveMQDefaultConfiguration.getDefaultJournalDir() + "_" + liveNode) + .setPagingDirectory(ActiveMQDefaultConfiguration.getDefaultPagingDir() + "_" + liveNode) + .setLargeMessagesDirectory(ActiveMQDefaultConfiguration.getDefaultLargeMessagesDir() + "_" + liveNode) .addConnectorConfiguration(liveConnector.getName(), liveConnector); List pairs = new ArrayList(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java index 30e3d94dae..c67bc4fe2b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java @@ -17,7 +17,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; @@ -138,10 +138,10 @@ public class SingleLiveMultipleBackupsFailoverTest extends MultipleBackupsFailov .setSecurityEnabled(false) .setHAPolicyConfiguration(sharedStore ? new SharedStoreSlavePolicyConfiguration() : new ReplicatedPolicyConfiguration()) .addConnectorConfiguration(backupConnector.getName(), backupConnector) - .setBindingsDirectory(HornetQDefaultConfiguration.getDefaultBindingsDirectory() + "_" + liveNode) - .setJournalDirectory(HornetQDefaultConfiguration.getDefaultJournalDir() + "_" + liveNode) - .setPagingDirectory(HornetQDefaultConfiguration.getDefaultPagingDir() + "_" + liveNode) - .setLargeMessagesDirectory(HornetQDefaultConfiguration.getDefaultLargeMessagesDir() + "_" + liveNode); + .setBindingsDirectory(ActiveMQDefaultConfiguration.getDefaultBindingsDirectory() + "_" + liveNode) + .setJournalDirectory(ActiveMQDefaultConfiguration.getDefaultJournalDir() + "_" + liveNode) + .setPagingDirectory(ActiveMQDefaultConfiguration.getDefaultPagingDir() + "_" + liveNode) + .setLargeMessagesDirectory(ActiveMQDefaultConfiguration.getDefaultLargeMessagesDir() + "_" + liveNode); List staticConnectors = new ArrayList(); @@ -167,10 +167,10 @@ public class SingleLiveMultipleBackupsFailoverTest extends MultipleBackupsFailov .setHAPolicyConfiguration(sharedStore ? new SharedStoreMasterPolicyConfiguration() : new ReplicatedPolicyConfiguration()) .addClusterConfiguration(basicClusterConnectionConfig(liveConnector.getName())) .addConnectorConfiguration(liveConnector.getName(), liveConnector) - .setBindingsDirectory(HornetQDefaultConfiguration.getDefaultBindingsDirectory() + "_" + liveNode) - .setJournalDirectory(HornetQDefaultConfiguration.getDefaultJournalDir() + "_" + liveNode) - .setPagingDirectory(HornetQDefaultConfiguration.getDefaultPagingDir() + "_" + liveNode) - .setLargeMessagesDirectory(HornetQDefaultConfiguration.getDefaultLargeMessagesDir() + "_" + liveNode); + .setBindingsDirectory(ActiveMQDefaultConfiguration.getDefaultBindingsDirectory() + "_" + liveNode) + .setJournalDirectory(ActiveMQDefaultConfiguration.getDefaultJournalDir() + "_" + liveNode) + .setPagingDirectory(ActiveMQDefaultConfiguration.getDefaultPagingDir() + "_" + liveNode) + .setLargeMessagesDirectory(ActiveMQDefaultConfiguration.getDefaultLargeMessagesDir() + "_" + liveNode); servers.put(liveNode, new SameProcessHornetQServer(createInVMFailoverServer(true, config0, nodeManager, liveNode))); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlTest.java index 2017487d9d..c67bb075b0 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlTest.java @@ -34,7 +34,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.ActiveMQObjectClosedException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -874,7 +874,7 @@ public class JMSServerControlTest extends ManagementTestBase control.destroyConnectionFactory("test"); - ObjectNameBuilder nameBuilder = ObjectNameBuilder.create(HornetQDefaultConfiguration.getDefaultJmxDomain()); + ObjectNameBuilder nameBuilder = ObjectNameBuilder.create(ActiveMQDefaultConfiguration.getDefaultJmxDomain()); assertFalse(mbeanServer.isRegistered(nameBuilder.getConnectionFactoryObjectName("test"))); stopServer(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AddressControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AddressControlTest.java index 1be5728b9e..2aa2d24c9a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AddressControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AddressControlTest.java @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.management; import java.util.HashSet; import java.util.Set; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientMessage; @@ -279,7 +279,7 @@ public class AddressControlTest extends ManagementTestBase session.createQueue(address, address, true); AddressControl addressControl = createManagementControl(address); - Assert.assertEquals(HornetQDefaultConfiguration.getDefaultJournalFileSize(), addressControl.getNumberOfBytesPerPage()); + Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultJournalFileSize(), addressControl.getNumberOfBytesPerPage()); session.close(); server.stop(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/CoreMessagingProxy.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/CoreMessagingProxy.java index 6a6d2a2dc0..4d65c0c70b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/CoreMessagingProxy.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/CoreMessagingProxy.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.tests.integration.management; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientRequestor; import org.apache.activemq.api.core.client.ClientSession; @@ -48,7 +48,7 @@ public class CoreMessagingProxy this.resourceName = resourceName; - requestor = new ClientRequestor(session, HornetQDefaultConfiguration.getDefaultManagementAddress()); + requestor = new ClientRequestor(session, ActiveMQDefaultConfiguration.getDefaultManagementAddress()); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/JMXDomainTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/JMXDomainTest.java index 98f25a7bee..6debefeb27 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/JMXDomainTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/JMXDomainTest.java @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.management; import java.util.HashMap; import java.util.Map; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.ObjectNameBuilder; import org.apache.activemq.core.config.Configuration; @@ -42,7 +42,7 @@ public class JMXDomainTest extends ManagementTestBase Configuration config_0 = createDefaultConfig() .setJMXManagementEnabled(true); - String jmxDomain_1 = HornetQDefaultConfiguration.getDefaultJmxDomain() + ".1"; + String jmxDomain_1 = ActiveMQDefaultConfiguration.getDefaultJmxDomain() + ".1"; Map params = new HashMap(); params.put(TransportConstants.SERVER_ID_PROP_NAME, 1); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementWithStompTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementWithStompTest.java index b46a58023a..379122f806 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementWithStompTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementWithStompTest.java @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.management; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.protocol.stomp.StompProtocolManagerFactory; import org.junit.Before; import org.junit.After; @@ -28,7 +29,6 @@ import java.util.Map; import org.junit.Assert; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; @@ -90,7 +90,7 @@ public class ManagementWithStompTest extends ManagementTestBase sendFrame(frame); // retrieve the address of the queue - frame = "\nSEND\n" + "destination:" + HornetQDefaultConfiguration.getDefaultManagementAddress() + "\n" + + frame = "\nSEND\n" + "destination:" + ActiveMQDefaultConfiguration.getDefaultManagementAddress() + "\n" + "reply-to:" + address + "\n" + "_HQ_ResourceName:" + ResourceNames.CORE_QUEUE + queue + "\n" + "_HQ_Attribute: Address\n\n" + @@ -133,7 +133,7 @@ public class ManagementWithStompTest extends ManagementTestBase sendFrame(frame); // count number of message with filter "color = 'blue'" - frame = "\nSEND\n" + "destination:" + HornetQDefaultConfiguration.getDefaultManagementAddress() + "\n" + + frame = "\nSEND\n" + "destination:" + ActiveMQDefaultConfiguration.getDefaultManagementAddress() + "\n" + "reply-to:" + address + "\n" + "_HQ_ResourceName:" + ResourceNames.CORE_QUEUE + queue + "\n" + "_HQ_OperationName: countMessages\n\n" + diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/NotificationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/NotificationTest.java index a4ade5b214..f854779f6d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/NotificationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/NotificationTest.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.tests.integration.management; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -265,7 +265,7 @@ public class NotificationTest extends UnitTestCase notifQueue = RandomUtil.randomSimpleString(); - session.createQueue(HornetQDefaultConfiguration.getDefaultManagementNotificationAddress(), notifQueue, null, false); + session.createQueue(ActiveMQDefaultConfiguration.getDefaultManagementNotificationAddress(), notifQueue, null, false); notifConsumer = session.createConsumer(notifQueue); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementTestBase.java index 0e182931f3..3469d68f6c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementTestBase.java @@ -11,12 +11,12 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.management; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.junit.Before; import org.junit.After; import org.junit.Assert; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientRequestor; @@ -96,7 +96,7 @@ public abstract class SecurityManagementTestBase extends UnitTestCase session.start(); - ClientRequestor requestor = new ClientRequestor(session, HornetQDefaultConfiguration.getDefaultManagementAddress()); + ClientRequestor requestor = new ClientRequestor(session, ActiveMQDefaultConfiguration.getDefaultManagementAddress()); ClientMessage mngmntMessage = session.createMessage(false); ManagementHelper.putAttribute(mngmntMessage, ResourceNames.CORE_SERVER, "started"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java index db8f8550c3..49a8de5674 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java @@ -12,11 +12,11 @@ */ package org.apache.activemq.tests.integration.management; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.junit.Test; import java.util.Set; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; @@ -60,7 +60,7 @@ public class SecurityManagementWithConfiguredAdminUserTest extends SecurityManag @Test public void testSendManagementMessageWithClusterAdminUser() throws Exception { - doSendManagementMessage(HornetQDefaultConfiguration.getDefaultClusterUser(), CLUSTER_PASSWORD, true); + doSendManagementMessage(ActiveMQDefaultConfiguration.getDefaultClusterUser(), CLUSTER_PASSWORD, true); } @Test @@ -102,9 +102,9 @@ public class SecurityManagementWithConfiguredAdminUserTest extends SecurityManag securityManager.addRole(validAdminUser, "guest"); securityManager.addRole(invalidAdminUser, "guest"); - Set adminRole = securityRepository.getMatch(HornetQDefaultConfiguration.getDefaultManagementAddress().toString()); + Set adminRole = securityRepository.getMatch(ActiveMQDefaultConfiguration.getDefaultManagementAddress().toString()); adminRole.add(new Role("admin", true, true, true, true, true, true, true)); - securityRepository.addMatch(HornetQDefaultConfiguration.getDefaultManagementAddress().toString(), adminRole); + securityRepository.addMatch(ActiveMQDefaultConfiguration.getDefaultManagementAddress().toString(), adminRole); Set guestRole = securityRepository.getMatch("*"); guestRole.add(new Role("guest", true, true, true, true, true, true, false)); securityRepository.addMatch("*", guestRole); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java index 663584cdc8..279268ae1f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java @@ -12,9 +12,9 @@ */ package org.apache.activemq.tests.integration.management; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.junit.Test; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; @@ -32,8 +32,8 @@ public class SecurityManagementWithDefaultConfigurationTest extends SecurityMana @Test public void testSendManagementMessageWithDefaultClusterAdminUser() throws Exception { - doSendManagementMessage(HornetQDefaultConfiguration.getDefaultClusterUser(), - HornetQDefaultConfiguration.getDefaultClusterPassword(), + doSendManagementMessage(ActiveMQDefaultConfiguration.getDefaultClusterUser(), + ActiveMQDefaultConfiguration.getDefaultClusterPassword(), true); } @@ -57,7 +57,7 @@ public class SecurityManagementWithDefaultConfigurationTest extends SecurityMana protected HornetQServer setupAndStartHornetQServer() throws Exception { Configuration conf = createBasicConfig() - .setClusterPassword(HornetQDefaultConfiguration.getDefaultClusterPassword()) + .setClusterPassword(ActiveMQDefaultConfiguration.getDefaultClusterPassword()) .setSecurityEnabled(true) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); HornetQServer server = addServer(HornetQServers.newHornetQServer(conf, false)); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java index 34756b73f4..409d4a2743 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java @@ -12,9 +12,9 @@ */ package org.apache.activemq.tests.integration.management; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.junit.Test; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; @@ -44,14 +44,14 @@ public class SecurityManagementWithModifiedConfigurationTest extends SecurityMan @Test public void testSendManagementMessageWithModifiedClusterAdminUser() throws Exception { - doSendManagementMessage(HornetQDefaultConfiguration.getDefaultClusterUser(), configuredClusterPassword, true); + doSendManagementMessage(ActiveMQDefaultConfiguration.getDefaultClusterUser(), configuredClusterPassword, true); } @Test public void testSendManagementMessageWithDefaultClusterAdminUser() throws Exception { - doSendManagementMessage(HornetQDefaultConfiguration.getDefaultClusterUser(), - HornetQDefaultConfiguration.getDefaultClusterPassword(), + doSendManagementMessage(ActiveMQDefaultConfiguration.getDefaultClusterUser(), + ActiveMQDefaultConfiguration.getDefaultClusterPassword(), false); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityNotificationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityNotificationTest.java index f87780ea89..d04c1b1c36 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityNotificationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityNotificationTest.java @@ -25,7 +25,7 @@ import java.util.Set; import org.junit.Assert; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -166,7 +166,7 @@ public class SecurityNotificationTest extends UnitTestCase Role role = new Role("notif", true, true, true, true, true, true, true); Set roles = new HashSet(); roles.add(role); - server.getSecurityRepository().addMatch(HornetQDefaultConfiguration.getDefaultManagementNotificationAddress().toString(), + server.getSecurityRepository().addMatch(ActiveMQDefaultConfiguration.getDefaultManagementNotificationAddress().toString(), roles); securityManager.addRole("admin", "notif"); @@ -176,7 +176,7 @@ public class SecurityNotificationTest extends UnitTestCase adminSession = sf.createSession("admin", "admin", false, true, true, false, 1); adminSession.start(); - adminSession.createTemporaryQueue(HornetQDefaultConfiguration.getDefaultManagementNotificationAddress(), notifQueue); + adminSession.createTemporaryQueue(ActiveMQDefaultConfiguration.getDefaultManagementNotificationAddress(), notifQueue); notifConsumer = adminSession.createConsumer(notifQueue); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/replication/ReplicationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/replication/ReplicationTest.java index fa5430423c..7c3420f17d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/replication/ReplicationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/replication/ReplicationTest.java @@ -26,7 +26,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.ActiveMQException; @@ -123,10 +123,10 @@ public final class ReplicationTest extends ServiceTestBase Configuration backupConfig = createDefaultConfig() .setHAPolicyConfiguration(new SharedStoreSlavePolicyConfiguration()) - .setBindingsDirectory(HornetQDefaultConfiguration.getDefaultBindingsDirectory() + suffix) - .setJournalDirectory(HornetQDefaultConfiguration.getDefaultJournalDir() + suffix) - .setPagingDirectory(HornetQDefaultConfiguration.getDefaultPagingDir() + suffix) - .setLargeMessagesDirectory(HornetQDefaultConfiguration.getDefaultLargeMessagesDir() + suffix) + .setBindingsDirectory(ActiveMQDefaultConfiguration.getDefaultBindingsDirectory() + suffix) + .setJournalDirectory(ActiveMQDefaultConfiguration.getDefaultJournalDir() + suffix) + .setPagingDirectory(ActiveMQDefaultConfiguration.getDefaultPagingDir() + suffix) + .setLargeMessagesDirectory(ActiveMQDefaultConfiguration.getDefaultLargeMessagesDir() + suffix) .setIncomingInterceptorClassNames(interceptors.length > 0 ? Arrays.asList(interceptors) : new ArrayList()); ReplicatedBackupUtils.configureReplicationPair(backupConfig, backupConnector, backupAcceptor, liveConfig, liveConnector); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/ScaleDown3NodeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/ScaleDown3NodeTest.java index 54e5980418..97380f282a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/ScaleDown3NodeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/ScaleDown3NodeTest.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.tests.integration.server; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientMessage; @@ -91,7 +91,7 @@ public class ScaleDown3NodeTest extends ClusterTestBase @Test public void testBasicScaleDownWithDefaultReconnectAttempts() throws Exception { - testBasicScaleDownInternal(HornetQDefaultConfiguration.getDefaultBridgeReconnectAttempts(), false); + testBasicScaleDownInternal(ActiveMQDefaultConfiguration.getDefaultBridgeReconnectAttempts(), false); } @Test @@ -103,7 +103,7 @@ public class ScaleDown3NodeTest extends ClusterTestBase @Test public void testBasicScaleDownWithDefaultReconnectAttemptsAndLargeMessages() throws Exception { - testBasicScaleDownInternal(HornetQDefaultConfiguration.getDefaultBridgeReconnectAttempts(), true); + testBasicScaleDownInternal(ActiveMQDefaultConfiguration.getDefaultBridgeReconnectAttempts(), true); } private void testBasicScaleDownInternal(int reconnectAttempts, boolean large) throws Exception diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/jms/HornetQAdmin.java b/tests/joram-tests/src/test/java/org/apache/activemq/jms/HornetQAdmin.java index fa06938fc0..3a9eda6bcd 100644 --- a/tests/joram-tests/src/test/java/org/apache/activemq/jms/HornetQAdmin.java +++ b/tests/joram-tests/src/test/java/org/apache/activemq/jms/HornetQAdmin.java @@ -20,7 +20,7 @@ import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.Hashtable; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientRequestor; @@ -85,14 +85,14 @@ public class HornetQAdmin implements Admin { serverLocator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); sf = serverLocator.createSessionFactory(); - clientSession = sf.createSession(HornetQDefaultConfiguration.getDefaultClusterUser(), - HornetQDefaultConfiguration.getDefaultClusterPassword(), + clientSession = sf.createSession(ActiveMQDefaultConfiguration.getDefaultClusterUser(), + ActiveMQDefaultConfiguration.getDefaultClusterPassword(), false, true, true, false, 1); - requestor = new ClientRequestor(clientSession, HornetQDefaultConfiguration.getDefaultManagementAddress()); + requestor = new ClientRequestor(clientSession, ActiveMQDefaultConfiguration.getDefaultManagementAddress()); clientSession.start(); } diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/CompactingStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/CompactingStressTest.java index cb12424c3f..e04b233f8d 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/CompactingStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/CompactingStressTest.java @@ -12,6 +12,7 @@ */ package org.apache.activemq.tests.stress.journal; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.junit.Test; import java.util.concurrent.CountDownLatch; @@ -19,7 +20,6 @@ import java.util.concurrent.atomic.AtomicInteger; import org.junit.Assert; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -417,7 +417,7 @@ public class CompactingStressTest extends ServiceTestBase { Configuration config = createDefaultConfig() .setJournalSyncNonTransactional(false) - .setJournalFileSize(HornetQDefaultConfiguration.getDefaultJournalFileSize()) + .setJournalFileSize(ActiveMQDefaultConfiguration.getDefaultJournalFileSize()) .setJournalType(journalType) .setJournalCompactMinFiles(10) .setJournalCompactPercentage(50); diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/JournalCleanupCompactStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/JournalCleanupCompactStressTest.java index 9d1ac43556..5053a029e5 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/JournalCleanupCompactStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/JournalCleanupCompactStressTest.java @@ -28,7 +28,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.core.asyncio.impl.AsynchronousFileImpl; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.journal.PreparedTransactionInfo; @@ -117,18 +117,18 @@ public class JournalCleanupCompactStressTest extends ServiceTestBase if (AsynchronousFileImpl.isLoaded()) { factory = new AIOSequentialFileFactory(dir.getPath()); - maxAIO = HornetQDefaultConfiguration.getDefaultJournalMaxIoAio(); + maxAIO = ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio(); } else { factory = new NIOSequentialFileFactory(dir.getPath(), true); - maxAIO = HornetQDefaultConfiguration.getDefaultJournalMaxIoNio(); + maxAIO = ActiveMQDefaultConfiguration.getDefaultJournalMaxIoNio(); } journal = new JournalImpl(50 * 1024, 20, 50, - HornetQDefaultConfiguration.getDefaultJournalCompactPercentage(), + ActiveMQDefaultConfiguration.getDefaultJournalCompactPercentage(), factory, "hornetq-data", "hq", diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/LargeJournalStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/LargeJournalStressTest.java index 152cfc7aa8..6a7a92df68 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/LargeJournalStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/LargeJournalStressTest.java @@ -15,7 +15,7 @@ package org.apache.activemq.tests.stress.journal; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; @@ -278,7 +278,7 @@ public class LargeJournalStressTest extends ServiceTestBase { Configuration config = createDefaultConfig() .setJournalSyncNonTransactional(false) - .setJournalFileSize(HornetQDefaultConfiguration.getDefaultJournalFileSize()) + .setJournalFileSize(ActiveMQDefaultConfiguration.getDefaultJournalFileSize()) .setJournalType(journalType) .setJournalCompactMinFiles(0) .setJournalCompactPercentage(50); diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/MultiThreadConsumerStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/MultiThreadConsumerStressTest.java index fe6049cbf0..32e3912964 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/MultiThreadConsumerStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/MultiThreadConsumerStressTest.java @@ -15,7 +15,7 @@ package org.apache.activemq.tests.stress.journal; import java.util.ArrayList; import java.util.concurrent.CountDownLatch; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -155,8 +155,8 @@ public class MultiThreadConsumerStressTest extends ServiceTestBase { Configuration config = createDefaultConfig(true) .setJournalType(journalType) - .setJournalFileSize(HornetQDefaultConfiguration.getDefaultJournalFileSize()) - .setJournalMinFiles(HornetQDefaultConfiguration.getDefaultJournalMinFiles()) + .setJournalFileSize(ActiveMQDefaultConfiguration.getDefaultJournalFileSize()) + .setJournalMinFiles(ActiveMQDefaultConfiguration.getDefaultJournalMinFiles()) .setJournalCompactMinFiles(2) .setJournalCompactPercentage(50); diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/NIOMultiThreadCompactorStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/NIOMultiThreadCompactorStressTest.java index d1adb294da..988845f26e 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/NIOMultiThreadCompactorStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/NIOMultiThreadCompactorStressTest.java @@ -18,7 +18,7 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.CountDownLatch; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; @@ -93,7 +93,7 @@ public class NIOMultiThreadCompactorStressTest extends ServiceTestBase stopServer(); NIOSequentialFileFactory factory = new NIOSequentialFileFactory(getJournalDir()); - JournalImpl journal = new JournalImpl(HornetQDefaultConfiguration.getDefaultJournalFileSize(), + JournalImpl journal = new JournalImpl(ActiveMQDefaultConfiguration.getDefaultJournalFileSize(), 2, 0, 0, @@ -348,13 +348,13 @@ public class NIOMultiThreadCompactorStressTest extends ServiceTestBase if (server == null) { Configuration config = createDefaultConfig(true) - .setJournalFileSize(HornetQDefaultConfiguration.getDefaultJournalFileSize()) + .setJournalFileSize(ActiveMQDefaultConfiguration.getDefaultJournalFileSize()) .setJournalType(journalType) .setJMXManagementEnabled(false) - .setJournalFileSize(HornetQDefaultConfiguration.getDefaultJournalFileSize()) - .setJournalMinFiles(HornetQDefaultConfiguration.getDefaultJournalMinFiles()) - .setJournalCompactMinFiles(HornetQDefaultConfiguration.getDefaultJournalCompactMinFiles()) - .setJournalCompactPercentage(HornetQDefaultConfiguration.getDefaultJournalCompactPercentage()) + .setJournalFileSize(ActiveMQDefaultConfiguration.getDefaultJournalFileSize()) + .setJournalMinFiles(ActiveMQDefaultConfiguration.getDefaultJournalMinFiles()) + .setJournalCompactMinFiles(ActiveMQDefaultConfiguration.getDefaultJournalCompactMinFiles()) + .setJournalCompactPercentage(ActiveMQDefaultConfiguration.getDefaultJournalCompactPercentage()) // This test is supposed to not sync.. All the ACKs are async, and it was supposed to not sync .setJournalSyncNonTransactional(false); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java index 1261f8d513..0284c15295 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java @@ -19,7 +19,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.config.Configuration; @@ -95,7 +95,7 @@ public class DuplicateDetectionUnitTest extends ServiceTestBase PostOffice postOffice = new FakePostOffice(); - ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(HornetQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize()); + ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(ActiveMQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize()); journal = new JournalStorageManager(configuration, factory, null); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java index b9df0a7911..522e8a187a 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java @@ -16,7 +16,7 @@ import java.util.HashMap; import java.util.Map; import java.util.concurrent.Executors; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptor; @@ -79,7 +79,7 @@ public class NettyAcceptorFactoryTest extends UnitTestCase handler, listener, Executors.newCachedThreadPool(), - Executors.newScheduledThreadPool(HornetQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize()), + Executors.newScheduledThreadPool(ActiveMQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize()), null); Assert.assertTrue(acceptor instanceof NettyAcceptor); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java index 0b3214e7d3..15df3db6d2 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java @@ -18,7 +18,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptor; @@ -98,7 +98,7 @@ public class NettyAcceptorTest extends UnitTestCase { } }; - pool2 = Executors.newScheduledThreadPool(HornetQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize()); + pool2 = Executors.newScheduledThreadPool(ActiveMQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize()); NettyAcceptor acceptor = new NettyAcceptor("netty", null, params,