From 034adfbf9b0dd217dba6bfdccfdb0488565fc189 Mon Sep 17 00:00:00 2001 From: jbertram Date: Tue, 18 Nov 2014 10:03:42 -0600 Subject: [PATCH] ACTIVEMQ6-4 Rename HornetQ* classes to ActiveMQ* --- .../org/apache/activemq/cli/commands/Run.java | 16 +- .../factory/SecurityManagerFactory.java | 6 +- ...ndle.java => ActiveMQBootstrapBundle.java} | 4 +- ...gger.java => ActiveMQBootstrapLogger.java} | 6 +- .../activemq/api/core/ActiveMQBuffer.java | 2 +- .../activemq/api/core/ActiveMQBuffers.java | 24 +- .../ActiveMQConnectionTimedOutException.java | 2 +- .../core/ActiveMQDisconnectedException.java | 2 +- .../core/ActiveMQIllegalStateException.java | 2 +- .../core/ActiveMQInternalErrorException.java | 2 +- .../api/core/ActiveMQNativeIOError.java | 2 +- .../core/ActiveMQNotConnectedException.java | 2 +- .../ActiveMQUnsupportedPacketException.java | 2 +- .../activemq/api/core/SimpleString.java | 2 +- ...QComponent.java => ActiveMQComponent.java} | 4 +- ...actory.java => ActiveMQThreadFactory.java} | 6 +- ...tilBundle.java => ActiveMQUtilBundle.java} | 6 +- ...tilLogger.java => ActiveMQUtilLogger.java} | 6 +- .../activemq/utils/ClassloadingUtil.java | 2 +- .../activemq/utils/PasswordMaskingUtil.java | 4 +- .../apache/activemq/utils/ReusableLatch.java | 2 +- .../activemq/utils/TypedProperties.java | 2 +- .../org/apache/activemq/utils/UTF8Util.java | 10 +- .../apache/activemq/utils/UUIDGenerator.java | 8 +- .../api/core/DiscoveryGroupConfiguration.java | 6 +- .../activemq/api/core/FilterConstants.java | 30 +- .../apache/activemq/api/core/Interceptor.java | 6 +- .../JGroupsBroadcastGroupConfiguration.java | 8 +- .../org/apache/activemq/api/core/Message.java | 10 +- .../api/core/TransportConfiguration.java | 10 +- .../core/UDPBroadcastGroupConfiguration.java | 8 +- ...HornetQClient.java => ActiveMQClient.java} | 6 +- .../api/core/client/ClientConsumer.java | 6 +- .../api/core/client/ClientMessage.java | 4 +- .../api/core/client/ClientSessionFactory.java | 2 +- .../api/core/client/ServerLocator.java | 54 +- .../core/client/loadbalance/package-info.java | 4 +- .../api/core/client/package-info.java | 2 +- .../api/core/management/AcceptorControl.java | 2 +- ...rol.java => ActiveMQComponentControl.java} | 4 +- ...ontrol.java => ActiveMQServerControl.java} | 12 +- .../api/core/management/BridgeControl.java | 2 +- .../management/BroadcastGroupControl.java | 2 +- .../management/ClusterConnectionControl.java | 2 +- .../api/core/management/ManagementHelper.java | 14 +- .../api/core/management/NotificationType.java | 6 +- .../core/management/ObjectNameBuilder.java | 8 +- .../api/core/management/package-info.java | 4 +- .../activemq/api/core/package-info.java | 2 +- ...a => ResetLimitWrappedActiveMQBuffer.java} | 6 +- ...tLogger.java => ActiveMQClientLogger.java} | 8 +- ....java => ActiveMQClientMessageBundle.java} | 8 +- ...AResource.java => ActiveMQXAResource.java} | 2 +- .../core/client/impl/ClientConsumerImpl.java | 50 +- .../client/impl/ClientLargeMessageImpl.java | 10 +- .../core/client/impl/ClientMessageImpl.java | 4 +- .../impl/ClientProducerCreditsImpl.java | 8 +- .../core/client/impl/ClientProducerImpl.java | 14 +- .../client/impl/ClientSessionFactoryImpl.java | 96 ++-- .../core/client/impl/ClientSessionImpl.java | 94 +-- .../CompressedLargeMessageControllerImpl.java | 8 +- .../core/client/impl/DelegatingSession.java | 8 +- .../impl/LargeMessageControllerImpl.java | 36 +- .../core/client/impl/ServerLocatorImpl.java | 150 ++--- .../activemq/core/client/impl/Topology.java | 66 +-- .../activemq/core/cluster/DiscoveryGroup.java | 32 +- ...xception.java => ActiveMQXAException.java} | 8 +- .../activemq/core/message/BodyEncoder.java | 10 +- .../core/message/impl/MessageImpl.java | 12 +- .../protocol/core/CoreRemotingConnection.java | 6 +- ...ava => ActiveMQClientProtocolManager.java} | 36 +- ...ActiveMQClientProtocolManagerFactory.java} | 10 +- ...text.java => ActiveMQConsumerContext.java} | 6 +- ...ntext.java => ActiveMQSessionContext.java} | 46 +- .../core/protocol/core/impl/ChannelImpl.java | 40 +- .../protocol/core/impl/PacketDecoder.java | 8 +- .../core/impl/RemotingConnectionImpl.java | 20 +- ...age.java => ActiveMQExceptionMessage.java} | 10 +- ...der.java => ActiveMQAMQPFrameDecoder.java} | 4 +- ...ndler.java => ActiveMQChannelHandler.java} | 16 +- ...coder2.java => ActiveMQFrameDecoder2.java} | 4 +- .../remoting/impl/netty/NettyConnection.java | 14 +- .../remoting/impl/netty/NettyConnector.java | 118 ++-- .../impl/netty/SharedNioEventLoopGroup.java | 4 +- .../impl/netty/TransportConstants.java | 2 +- .../core/remoting/impl/ssl/SSLSupport.java | 2 +- .../activemq/core/remoting/package-info.java | 2 +- ...QPrincipal.java => ActiveMQPrincipal.java} | 4 +- .../protocol/AbstractRemotingConnection.java | 18 +- .../spi/core/protocol/RemotingConnection.java | 2 +- .../spi/core/remoting/Connection.java | 6 +- .../remoting/ConnectionLifeCycleListener.java | 6 +- .../spi/core/remoting/package-info.java | 2 +- ...am.java => ActiveMQBufferInputStream.java} | 4 +- .../apache/activemq/utils/BufferHelper.java | 2 +- .../activemq/utils/ConfigurationHelper.java | 16 +- .../org/apache/activemq/utils/MemorySize.java | 4 +- .../utils/OrderedExecutorFactory.java | 6 +- .../activemq/utils/SoftValueHashMap.java | 6 +- .../apache/activemq/utils/VersionLoader.java | 26 +- .../org/apache/activemq/utils/XMLUtil.java | 32 +- .../apache/activemq/utils/package-info.java | 2 +- .../resources/activemq-version.properties | 9 + .../main/resources/hornetq-version.properties | 9 - .../activemq/tests/CoreUnitTestCase.java | 4 +- .../java/org/apache/activemq/dto/XmlUtil.java | 2 +- .../org/apache/activemq/dto/package-info.java | 4 +- ...QJMSClient.java => ActiveMQJMSClient.java} | 108 ++-- ...nstants.java => ActiveMQJMSConstants.java} | 14 +- .../management/ConnectionFactoryControl.java | 2 +- .../jms/management/DestinationControl.java | 2 +- .../jms/management/JMSManagementHelper.java | 10 +- .../api/jms/management/JMSServerControl.java | 6 +- .../api/jms/management/SubscriptionInfo.java | 2 +- .../api/jms/management/package-info.java | 4 +- .../apache/activemq/api/jms/package-info.java | 4 +- ...Message.java => ActiveMQBytesMessage.java} | 18 +- ...onnection.java => ActiveMQConnection.java} | 92 +-- ...ry.java => ActiveMQConnectionFactory.java} | 80 +-- ...java => ActiveMQConnectionForContext.java} | 2 +- ... => ActiveMQConnectionForContextImpl.java} | 12 +- ...a.java => ActiveMQConnectionMetaData.java} | 12 +- ...tination.java => ActiveMQDestination.java} | 82 +-- ...ndle.java => ActiveMQJMSClientBundle.java} | 6 +- ...gger.java => ActiveMQJMSClientLogger.java} | 6 +- ...java => ActiveMQJMSConnectionFactory.java} | 10 +- ...Consumer.java => ActiveMQJMSConsumer.java} | 14 +- ...MSContext.java => ActiveMQJMSContext.java} | 34 +- ...Producer.java => ActiveMQJMSProducer.java} | 14 +- ...apMessage.java => ActiveMQMapMessage.java} | 24 +- ...rnetQMessage.java => ActiveMQMessage.java} | 134 ++--- ...umer.java => ActiveMQMessageConsumer.java} | 44 +- ...ucer.java => ActiveMQMessageProducer.java} | 78 +-- ...essage.java => ActiveMQObjectMessage.java} | 18 +- .../{HornetQQueue.java => ActiveMQQueue.java} | 16 +- ...Browser.java => ActiveMQQueueBrowser.java} | 26 +- ...va => ActiveMQQueueConnectionFactory.java} | 10 +- ...rnetQSession.java => ActiveMQSession.java} | 214 +++---- ...essage.java => ActiveMQStreamMessage.java} | 20 +- ...Queue.java => ActiveMQTemporaryQueue.java} | 8 +- ...Topic.java => ActiveMQTemporaryTopic.java} | 8 +- ...tMessage.java => ActiveMQTextMessage.java} | 20 +- .../{HornetQTopic.java => ActiveMQTopic.java} | 14 +- ...va => ActiveMQTopicConnectionFactory.java} | 10 +- ...nection.java => ActiveMQXAConnection.java} | 16 +- ....java => ActiveMQXAConnectionFactory.java} | 10 +- ...Context.java => ActiveMQXAJMSContext.java} | 4 +- ... => ActiveMQXAQueueConnectionFactory.java} | 10 +- ...QXASession.java => ActiveMQXASession.java} | 16 +- ... => ActiveMQXATopicConnectionFactory.java} | 10 +- .../jms/client/JMSExceptionHelper.java | 2 +- .../jms/client/JMSMessageListenerWrapper.java | 24 +- .../jms/client/SelectorTranslator.java | 8 +- .../jms/client/ThreadAwareContext.java | 8 +- .../activemq/jms/client/package-info.java | 2 +- .../ConnectionFactoryObjectFactory.java | 4 +- .../DestinationObjectFactory.java | 4 +- ...gger.java => ActiveMQJMSBridgeLogger.java} | 6 +- .../apache/activemq/jms/bridge/JMSBridge.java | 4 +- .../activemq/jms/bridge/JMSBridgeControl.java | 4 +- .../jms/bridge/QualityOfServiceMode.java | 2 +- .../jms/bridge/impl/JMSBridgeImpl.java | 236 ++++---- .../impl/JMSConnectionFactoryControlImpl.java | 6 +- .../management/impl/JMSQueueControlImpl.java | 18 +- .../management/impl/JMSServerControlImpl.java | 62 +- .../management/impl/JMSTopicControlImpl.java | 34 +- .../jms/persistence/JMSStorageManager.java | 4 +- .../journal/JMSJournalStorageManagerImpl.java | 2 +- ...ndle.java => ActiveMQJMSServerBundle.java} | 6 +- ...gger.java => ActiveMQJMSServerLogger.java} | 8 +- .../activemq/jms/server/JMSServerManager.java | 12 +- .../ConnectionFactoryConfigurationImpl.java | 62 +- .../jms/server/embedded/EmbeddedJMS.java | 16 +- .../impl/JMSServerConfigParserImpl.java | 72 +-- .../jms/server/impl/JMSServerDeployer.java | 6 +- .../jms/server/impl/JMSServerManagerImpl.java | 156 ++--- .../server/impl/StandaloneNamingServer.java | 16 +- .../management/JMSManagementService.java | 12 +- .../impl/JMSManagementServiceImpl.java | 16 +- ...try.java => ActiveMQRecoveryRegistry.java} | 50 +- ...tryBase.java => ActiveMQRegistryBase.java} | 16 +- ...y.java => ActiveMQXAResourceRecovery.java} | 46 +- ...er.java => ActiveMQXAResourceWrapper.java} | 110 ++-- .../server/recovery/RecoveryDiscovery.java | 24 +- .../jms/server/recovery/XARecoveryConfig.java | 10 +- .../jms/server/recovery/package-info.java | 4 +- .../jms/transaction/JMSTransactionDetail.java | 26 +- ...etQFileLock.java => ActiveMQFileLock.java} | 6 +- .../asyncio/impl/AsynchronousFileImpl.java | 28 +- .../apache/activemq/core/journal/Journal.java | 4 +- .../impl/AIOSequentialFileFactory.java | 12 +- .../journal/impl/AbstractSequentialFile.java | 16 +- .../impl/AbstractSequentialFileFactory.java | 8 +- .../core/journal/impl/CompactJournal.java | 2 +- .../core/journal/impl/DummyCallback.java | 4 +- .../core/journal/impl/ExportJournal.java | 4 +- .../core/journal/impl/ImportJournal.java | 4 +- .../core/journal/impl/JournalCompactor.java | 12 +- .../journal/impl/JournalFilesRepository.java | 56 +- .../core/journal/impl/JournalImpl.java | 62 +- .../core/journal/impl/NIOSequentialFile.java | 12 +- .../activemq/core/journal/impl/Reclaimer.java | 6 +- .../journal/impl/SimpleWaitIOCallback.java | 4 +- .../core/journal/impl/SyncSpeedTest.java | 6 +- .../core/journal/impl/TimedBuffer.java | 12 +- ...Bundle.java => ActiveMQJournalBundle.java} | 6 +- ...Logger.java => ActiveMQJournalLogger.java} | 6 +- ... => ActiveMQProtonRemotingConnection.java} | 10 +- .../proton/ProtonProtocolManager.java | 22 +- .../proton/ProtonProtocolManagerFactory.java | 4 +- ...QJMSVendor.java => ActiveMQJMSVendor.java} | 8 +- .../converter/ProtonMessageConverter.java | 10 +- .../converter/jms/ServerJMSMapMessage.java | 2 +- .../converter/jms/ServerJMSMessage.java | 14 +- .../converter/jms/ServerJMSStreamMessage.java | 2 +- .../converter/jms/ServerJMSTextMessage.java | 2 +- .../proton/converter/jms/package-info.java | 2 +- ... => ActiveMQProtonConnectionCallback.java} | 16 +- .../ProtonSessionIntegrationCallback.java | 10 +- ...QPlainSASL.java => ActiveMQPlainSASL.java} | 8 +- ....spi.core.protocol.ProtocolManagerFactory} | 0 .../protocol/openwire/OpenWireConnection.java | 22 +- .../openwire/OpenWireProtocolManager.java | 22 +- .../OpenWireProtocolManagerFactory.java | 4 +- .../core/protocol/openwire/OpenWireUtil.java | 2 +- .../protocol/openwire/amq/AMQConsumer.java | 11 +- .../protocol/openwire/amq/AMQProducer.java | 2 +- .../openwire/amq/AMQServerConsumer.java | 6 +- .../openwire/amq/AMQServerSession.java | 24 +- .../openwire/amq/AMQServerSessionFactory.java | 6 +- .../protocol/openwire/amq/AMQSession.java | 14 +- ....spi.core.protocol.ProtocolManagerFactory} | 0 .../plug/AMQPClientConnectionContext.java | 4 +- .../proton/plug/AMQPClientSessionContext.java | 6 +- .../org/proton/plug/AMQPSessionContext.java | 4 +- .../context/AbstractConnectionContext.java | 6 +- .../context/AbstractProtonContextSender.java | 12 +- .../AbstractProtonReceiverContext.java | 6 +- .../context/AbstractProtonSessionContext.java | 10 +- .../plug/context/ProtonDeliveryHandler.java | 6 +- .../plug/context/ProtonInitializable.java | 12 +- .../context/ProtonTransactionHandler.java | 12 +- .../client/ProtonClientConnectionContext.java | 6 +- .../context/client/ProtonClientContext.java | 4 +- .../client/ProtonClientReceiverContext.java | 4 +- .../client/ProtonClientSessionContext.java | 6 +- .../server/ProtonServerConnectionContext.java | 4 +- .../server/ProtonServerReceiverContext.java | 16 +- .../server/ProtonServerSenderContext.java | 38 +- .../server/ProtonServerSessionContext.java | 8 +- ...eption.java => ActiveMQAMQPException.java} | 6 +- ...=> ActiveMQAMQPIllegalStateException.java} | 4 +- ...> ActiveMQAMQPInternalErrorException.java} | 6 +- ...=> ActiveMQAMQPInvalidFieldException.java} | 4 +- ... ActiveMQAMQPNotImplementedException.java} | 4 +- ...java => ActiveMQAMQPTimeoutException.java} | 4 +- ...=> ActiveMQAMQPProtocolMessageBundle.java} | 46 +- .../org/proton/plug/util/ReusableLatch.java | 2 +- .../test/minimalserver/MinimalServer.java | 4 +- .../SimpleServerThreadFactory.java | 2 +- ...ption.java => ActiveMQStompException.java} | 10 +- ....java => ActiveMQStompProtocolLogger.java} | 6 +- ...> ActiveMQStompProtocolMessageBundle.java} | 66 +-- .../core/protocol/stomp/StompConnection.java | 72 +-- .../core/protocol/stomp/StompDecoder.java | 20 +- .../core/protocol/stomp/StompFrame.java | 4 +- .../protocol/stomp/StompProtocolManager.java | 58 +- .../stomp/StompProtocolManagerFactory.java | 4 +- .../core/protocol/stomp/StompSession.java | 2 +- .../stomp/VersionedStompFrameHandler.java | 28 +- .../stomp/v10/StompFrameHandlerV10.java | 14 +- .../stomp/v11/StompFrameHandlerV11.java | 30 +- .../protocol/stomp/v11/StompFrameV11.java | 2 +- .../stomp/v12/StompFrameHandlerV12.java | 18 +- .../protocol/stomp/v12/StompFrameV12.java | 2 +- ....spi.core.protocol.ProtocolManagerFactory} | 0 ...etQRABundle.java => ActiveMQRABundle.java} | 6 +- ...ssage.java => ActiveMQRABytesMessage.java} | 118 ++-- ....java => ActiveMQRAConnectionFactory.java} | 8 +- ...a => ActiveMQRAConnectionFactoryImpl.java} | 186 +++--- ....java => ActiveMQRAConnectionManager.java} | 18 +- ...java => ActiveMQRAConnectionMetaData.java} | 40 +- ...a => ActiveMQRAConnectionRequestInfo.java} | 76 +-- ...dential.java => ActiveMQRACredential.java} | 54 +- ...Context.java => ActiveMQRAJMSContext.java} | 18 +- ...n.java => ActiveMQRALocalTransaction.java} | 24 +- ...etQRALogger.java => ActiveMQRALogger.java} | 30 +- ...ties.java => ActiveMQRAMCFProperties.java} | 58 +- ....java => ActiveMQRAManagedConnection.java} | 212 +++---- ...> ActiveMQRAManagedConnectionFactory.java} | 152 ++--- ...Message.java => ActiveMQRAMapMessage.java} | 110 ++-- ...QRAMessage.java => ActiveMQRAMessage.java} | 224 ++++---- ...er.java => ActiveMQRAMessageConsumer.java} | 78 +-- ...er.java => ActiveMQRAMessageListener.java} | 16 +- ...er.java => ActiveMQRAMessageProducer.java} | 118 ++-- ...AMetaData.java => ActiveMQRAMetaData.java} | 30 +- ...sage.java => ActiveMQRAObjectMessage.java} | 18 +- ...perties.java => ActiveMQRAProperties.java} | 38 +- ...iver.java => ActiveMQRAQueueReceiver.java} | 14 +- ...Sender.java => ActiveMQRAQueueSender.java} | 32 +- ...QRAService.java => ActiveMQRAService.java} | 8 +- ...QRASession.java => ActiveMQRASession.java} | 454 +++++++-------- ...ory.java => ActiveMQRASessionFactory.java} | 4 +- ...java => ActiveMQRASessionFactoryImpl.java} | 254 ++++---- ...sage.java => ActiveMQRAStreamMessage.java} | 106 ++-- ...essage.java => ActiveMQRATextMessage.java} | 18 +- ...her.java => ActiveMQRATopicPublisher.java} | 48 +- ...er.java => ActiveMQRATopicSubscriber.java} | 18 +- ...ntext.java => ActiveMQRAXAJMSContext.java} | 6 +- ...esource.java => ActiveMQRAXAResource.java} | 60 +- ...rnetQRaUtils.java => ActiveMQRaUtils.java} | 8 +- ...pter.java => ActiveMQResourceAdapter.java} | 542 +++++++++--------- ...er.java => ActiveMQXAResourceWrapper.java} | 10 +- .../ra/ConnectionFactoryProperties.java | 122 ++-- ...ctivation.java => ActiveMQActivation.java} | 172 +++--- ...nSpec.java => ActiveMQActivationSpec.java} | 176 +++--- ...ndler.java => ActiveMQMessageHandler.java} | 84 +-- .../activemq/ra/recovery/RecoveryManager.java | 20 +- .../rest/{Hornetq.java => ActiveMQ.java} | 4 +- ...estBundle.java => ActiveMQRestBundle.java} | 4 +- ...estLogger.java => ActiveMQRestLogger.java} | 6 +- .../activemq/rest/MessageServiceManager.java | 4 +- ...er.java => ActiveMQBootstrapListener.java} | 2 +- ...HornetQ.java => EmbeddedRestActiveMQ.java} | 22 +- ...QJMS.java => EmbeddedRestActiveMQJMS.java} | 10 +- .../rest/queue/AcknowledgedQueueConsumer.java | 6 +- .../activemq/rest/queue/ConsumedMessage.java | 4 +- .../rest/queue/ConsumersResource.java | 12 +- .../rest/queue/DestinationServiceManager.java | 4 +- .../activemq/rest/queue/PostMessage.java | 22 +- .../rest/queue/PostMessageDupsOk.java | 8 +- .../rest/queue/PostMessageNoDups.java | 4 +- .../activemq/rest/queue/QueueConsumer.java | 16 +- .../rest/queue/QueueDestinationsResource.java | 16 +- .../activemq/rest/queue/QueueResource.java | 8 +- ...trategy.java => ActiveMQPushStrategy.java} | 6 +- .../rest/queue/push/FilePushStore.java | 8 +- .../rest/queue/push/PushConsumer.java | 10 +- .../push/PushConsumerMessageHandler.java | 12 +- .../rest/queue/push/PushConsumerResource.java | 8 +- .../rest/queue/push/PushStrategy.java | 2 +- .../activemq/rest/queue/push/UriStrategy.java | 16 +- .../activemq/rest/topic/PushSubscription.java | 4 +- .../rest/topic/PushSubscriptionsResource.java | 8 +- .../rest/topic/SubscriptionsResource.java | 18 +- .../rest/topic/TopicDestinationsResource.java | 16 +- .../activemq/rest/topic/TopicResource.java | 8 +- .../activemq/rest/util/HttpMessageHelper.java | 12 +- .../activemq/rest/util/TimeoutTask.java | 6 +- .../rest/test/CreateDestinationTest.java | 4 +- .../apache/activemq/rest/test/Embedded.java | 22 +- .../activemq/rest/test/EmbeddedTest.java | 8 +- .../rest/test/FindDestinationTest.java | 4 +- .../apache/activemq/rest/test/JMSTest.java | 12 +- .../activemq/rest/test/MessageTestBase.java | 4 +- .../test/PersistentPushQueueConsumerTest.java | 14 +- .../test/PersistentPushTopicConsumerTest.java | 8 +- .../rest/test/PushQueueConsumerTest.java | 4 +- .../rest/test/PushTopicConsumerTest.java | 4 +- .../apache/activemq/rest/test/RawAckTest.java | 16 +- .../activemq/rest/test/SelectorTest.java | 10 +- .../activemq/rest/test/TransformTest.java | 8 +- .../core/config/BridgeConfiguration.java | 18 +- .../ClusterConnectionConfiguration.java | 4 +- .../activemq/core/config/Configuration.java | 14 +- .../core/config/ConfigurationUtils.java | 4 +- .../core/config/impl/ConfigurationImpl.java | 2 +- .../core/config/impl/FileConfiguration.java | 6 +- .../activemq/core/config/impl/Validators.java | 22 +- .../activemq/core/deployers/Deployer.java | 4 +- .../core/deployers/DeploymentManager.java | 4 +- .../impl/BasicUserCredentialsDeployer.java | 18 +- .../impl/FileConfigurationParser.java | 84 +-- .../deployers/impl/FileDeploymentManager.java | 24 +- .../core/deployers/impl/QueueDeployer.java | 6 +- .../core/deployers/impl/SecurityDeployer.java | 2 +- .../core/deployers/impl/XmlDeployer.java | 6 +- .../activemq/core/filter/impl/FilterImpl.java | 28 +- ...pl.java => ActiveMQServerControlImpl.java} | 50 +- .../management/impl/QueueControlImpl.java | 12 +- .../impl/MessageCounterHelper.java | 4 +- .../activemq/core/paging/PagingManager.java | 4 +- .../activemq/core/paging/PagingStore.java | 6 +- .../paging/cursor/PagedReferenceImpl.java | 8 +- .../cursor/impl/PageCursorProviderImpl.java | 52 +- .../impl/PageSubscriptionCounterImpl.java | 8 +- .../cursor/impl/PageSubscriptionImpl.java | 30 +- .../activemq/core/paging/impl/Page.java | 24 +- .../paging/impl/PageTransactionInfoImpl.java | 4 +- .../core/paging/impl/PagingManagerImpl.java | 10 +- .../paging/impl/PagingStoreFactoryNIO.java | 4 +- .../core/paging/impl/PagingStoreImpl.java | 24 +- .../core/persistence/StorageManager.java | 6 +- .../impl/journal/BatchingIDGenerator.java | 4 +- .../impl/journal/DescribeJournal.java | 6 +- .../impl/journal/JournalStorageManager.java | 98 ++-- .../impl/journal/LargeServerMessageImpl.java | 16 +- .../journal/LargeServerMessageInSync.java | 4 +- .../impl/journal/OperationContextImpl.java | 4 +- .../activemq/core/postoffice/BindingType.java | 4 +- .../activemq/core/postoffice/PostOffice.java | 4 +- .../activemq/core/postoffice/QueueInfo.java | 8 +- .../core/postoffice/impl/BindingsImpl.java | 20 +- .../postoffice/impl/DuplicateIDCacheImpl.java | 4 +- .../core/postoffice/impl/PostOfficeImpl.java | 64 +-- .../postoffice/impl/SimpleAddressManager.java | 10 +- .../core/protocol/ProtocolHandler.java | 6 +- .../core/ServerSessionPacketHandler.java | 46 +- ...andler.java => ActiveMQPacketHandler.java} | 58 +- .../core/impl/CoreProtocolManager.java | 39 +- .../core/impl/CoreProtocolManagerFactory.java | 8 +- .../core/impl/CoreSessionCallback.java | 6 +- .../wireformat/BackupRegistrationMessage.java | 2 +- .../stomp/WebSocketServerHandler.java | 2 +- .../core/remoting/impl/invm/InVMAcceptor.java | 22 +- .../remoting/impl/invm/InVMConnection.java | 24 +- .../remoting/impl/invm/InVMConnector.java | 12 +- .../core/remoting/impl/invm/InVMRegistry.java | 6 +- .../remoting/impl/netty/NettyAcceptor.java | 50 +- .../core/remoting/server/RemotingService.java | 4 +- .../server/impl/RemotingServiceImpl.java | 88 +-- .../core/replication/ReplicatedJournal.java | 4 +- .../core/replication/ReplicationEndpoint.java | 62 +- .../core/replication/ReplicationManager.java | 22 +- .../core/security/impl/SecurityStoreImpl.java | 24 +- ...Bundle.java => ActiveMQMessageBundle.java} | 16 +- ...HornetQServer.java => ActiveMQServer.java} | 16 +- ...rLogger.java => ActiveMQServerLogger.java} | 28 +- .../activemq/core/server/ActiveMQServers.java | 123 ++++ .../core/server/ConnectorService.java | 2 +- .../activemq/core/server/HornetQServers.java | 123 ---- .../activemq/core/server/MemoryManager.java | 12 +- .../activemq/core/server/NodeManager.java | 6 +- .../apache/activemq/core/server/Queue.java | 2 +- .../core/server/ServerSessionFactory.java | 4 +- ...veMQServerSideProtocolManagerFactory.java} | 14 +- .../core/server/cluster/BackupManager.java | 30 +- .../activemq/core/server/cluster/Bridge.java | 4 +- .../core/server/cluster/BroadcastGroup.java | 4 +- .../cluster/ClusterConfigurationUtil.java | 12 +- .../server/cluster/ClusterConnection.java | 8 +- .../core/server/cluster/ClusterControl.java | 16 +- .../server/cluster/ClusterController.java | 34 +- .../core/server/cluster/ClusterManager.java | 76 +-- .../server/cluster/ha/ColocatedHAManager.java | 30 +- .../server/cluster/ha/ColocatedPolicy.java | 4 +- .../core/server/cluster/ha/HAManager.java | 8 +- .../core/server/cluster/ha/HAPolicy.java | 4 +- .../server/cluster/ha/LiveOnlyPolicy.java | 4 +- .../core/server/cluster/ha/ReplicaPolicy.java | 6 +- .../server/cluster/ha/ReplicatedPolicy.java | 4 +- .../server/cluster/ha/ScaleDownPolicy.java | 30 +- .../cluster/ha/SharedStoreMasterPolicy.java | 4 +- .../cluster/ha/SharedStoreSlavePolicy.java | 4 +- .../cluster/ha/StandaloneHAManager.java | 6 +- .../core/server/cluster/impl/BridgeImpl.java | 116 ++-- .../cluster/impl/BroadcastGroupImpl.java | 10 +- .../cluster/impl/ClusterConnectionBridge.java | 38 +- .../cluster/impl/ClusterConnectionImpl.java | 116 ++-- .../server/cluster/impl/Redistributor.java | 10 +- .../cluster/impl/RemoteQueueBindingImpl.java | 6 +- .../server/cluster/qourum/QuorumManager.java | 4 +- .../qourum/SharedNothingBackupQuorum.java | 4 +- ...ddedHornetQ.java => EmbeddedActiveMQ.java} | 36 +- .../core/server/group/GroupingHandler.java | 4 +- .../group/impl/GroupHandlingAbstract.java | 4 +- .../group/impl/LocalGroupingHandler.java | 28 +- .../group/impl/RemoteGroupingHandler.java | 8 +- .../server/impl/AIOFileLockNodeManager.java | 2 +- .../activemq/core/server/impl/Activation.java | 4 +- ...erverImpl.java => ActiveMQServerImpl.java} | 186 +++--- .../AnyLiveNodeLocatorForReplication.java | 4 +- .../impl/AnyLiveNodeLocatorForScaleDown.java | 10 +- .../impl/BackupRecoveryJournalLoader.java | 14 +- .../core/server/impl/ColocatedActivation.java | 6 +- .../core/server/impl/ConnectorsService.java | 14 +- .../activemq/core/server/impl/DivertImpl.java | 6 +- .../core/server/impl/FileLockNodeManager.java | 18 +- .../core/server/impl/LastValueQueue.java | 6 +- .../core/server/impl/LiveOnlyActivation.java | 56 +- .../NamedLiveNodeLocatorForScaleDown.java | 10 +- .../server/impl/PostOfficeJournalLoader.java | 28 +- .../activemq/core/server/impl/QueueImpl.java | 158 ++--- .../core/server/impl/RefsOperation.java | 10 +- .../core/server/impl/ReplicationError.java | 14 +- .../core/server/impl/ScaleDownHandler.java | 18 +- .../impl/ScheduledDeliveryHandlerImpl.java | 22 +- .../core/server/impl/ServerConsumerImpl.java | 84 +-- .../activemq/core/server/impl/ServerInfo.java | 6 +- .../core/server/impl/ServerSessionImpl.java | 166 +++--- .../core/server/impl/ServiceRegistry.java | 2 +- .../impl/SharedNothingBackupActivation.java | 126 ++-- .../impl/SharedNothingLiveActivation.java | 88 +-- .../impl/SharedStoreBackupActivation.java | 80 +-- .../impl/SharedStoreLiveActivation.java | 40 +- .../impl/TransientQueueManagerImpl.java | 16 +- .../server/management/ManagementService.java | 12 +- .../impl/ManagementServiceImpl.java | 64 +-- .../impl/HierarchicalObjectRepository.java | 6 +- .../activemq/core/settings/impl/Match.java | 6 +- .../core/transaction/ResourceManager.java | 4 +- .../core/transaction/Transaction.java | 2 +- .../transaction/impl/ResourceManagerImpl.java | 8 +- .../transaction/impl/TransactionImpl.java | 12 +- .../spi/core/protocol/ProtocolManager.java | 2 +- .../core/protocol/ProtocolManagerFactory.java | 4 +- .../activemq/spi/core/remoting/Acceptor.java | 10 +- ...ager.java => ActiveMQSecurityManager.java} | 4 +- ....java => ActiveMQSecurityManagerImpl.java} | 12 +- .../core/security/JAASSecurityManager.java | 14 +- .../spi/core/security/package-info.java | 2 +- .../impl/FileConfigurationParserTest.java | 24 +- .../impl/HAPolicyConfigurationTest.java | 30 +- .../WrongRoleFileConfigurationParserTest.java | 24 +- .../activemq/core/filter/impl/FilterTest.java | 2 +- .../message/impl/MessagePropertyTest.java | 4 +- .../group/impl/ClusteredResetMockTest.java | 6 +- .../core/server/impl/EmbeddedServerTest.java | 8 +- .../impl/ScheduledDeliveryHandlerTest.java | 4 +- .../core/version/impl/VersionImplTest.java | 8 +- ...rver.java => ColocatedActiveMQServer.java} | 22 +- .../tests/util/InVMNodeManagerServer.java | 10 +- .../activemq/tests/util/ServiceTestBase.java | 138 ++--- .../tests/util/SingleServerTestBase.java | 8 +- .../activemq/tests/util/UnitTestCase.java | 68 +-- ...lsLogger.java => ActiveMQToolsLogger.java} | 6 +- .../org/apache/activemq/tools/DataTool.java | 8 +- .../org/apache/activemq/tools/PrintData.java | 6 +- .../org/apache/activemq/tools/PrintPages.java | 4 +- .../apache/activemq/tools/TransferQueue.java | 6 +- .../activemq/tools/XmlDataConstants.java | 2 +- .../activemq/tools/XmlDataExporter.java | 30 +- .../activemq/tools/XmlDataImporter.java | 118 ++-- docs/user-manual/en/using-jms.xml | 4 - .../core/example/EmbeddedRemoteExample.java | 6 +- .../activemq/core/example/EmbeddedServer.java | 6 +- .../core/example/EmbeddedExample.java | 12 +- .../activemq/core/example/PerfBase.java | 4 +- .../core/example/TwitterConnectorExample.java | 6 +- .../example/server/SendMessageBean.java | 2 +- .../javaee/example/server2/MDBQueueB.java | 2 +- .../example/server2/StatelessSender.java | 8 +- .../javaee/example/server/MDBQueue.java | 6 +- .../MDBRemoteFailoverStaticExample.java | 6 +- .../server/MDBRemoteFailoverExample.java | 6 +- ...rnetQExample.java => ActiveMQExample.java} | 20 +- .../activemq/jms/example/AerogearExample.java | 6 +- .../activemq/jms/example/AppletExample.java | 6 +- .../jms/example/HttpStaticFileServer.java | 4 +- .../ApplicationLayerFailoverExample.java | 4 +- .../activemq/jms/example/BridgeExample.java | 4 +- .../jms/example/QueueBrowserExample.java | 4 +- .../jms/example/ClientKickoffExample.java | 16 +- .../ClientSideFailoverListerExample.java | 8 +- .../ClientSideLoadBalancingExample.java | 10 +- .../ClusteredDurableSubscriptionExample.java | 4 +- .../jms/example/ClusteredGroupingExample.java | 4 +- .../jms/example/ClusteredJgroupsExample.java | 4 +- .../jms/example/ClusteredQueueExample.java | 4 +- .../example/ClusteredStandaloneExample.java | 4 +- .../example/StaticClusteredQueueExample.java | 4 +- .../example/ClusterStaticOnewayExample.java | 4 +- .../jms/example/ClusteredTopicExample.java | 4 +- .../ColocatedFailoverScaleDownExample.java | 4 +- .../jms/example/ColocatedFailoverExample.java | 4 +- .../jms/example/ConsumerRateLimitExample.java | 4 +- .../jms/example/DeadLetterExample.java | 6 +- .../jms/example/DelayedRedeliveryExample.java | 6 +- .../activemq/jms/example/DivertExample.java | 6 +- .../example/DurableSubscriptionExample.java | 4 +- .../activemq/jms/example/EmbeddedExample.java | 6 +- .../activemq/jms/example/EmbeddedExample.java | 10 +- .../activemq/jms/example/ExpiryExample.java | 6 +- .../example/HAPolicyAutoBackupExample.java | 10 +- .../jms/example/HttpTransportExample.java | 4 +- .../InstantiateConnectionFactoryExample.java | 10 +- .../jms/example/InterceptorExample.java | 6 +- .../activemq/jms/example/JAASExample.java | 6 +- .../jms/example/JMSAutoCloseableExample.java | 4 +- .../jms/example/JMSBridgeExample.java | 2 +- .../example/JMSCompletionListenerExample.java | 6 +- .../jms/example/JMSContextExample.java | 4 +- .../jms/example/JMSSharedConsumerExample.java | 4 +- .../activemq/jms/example/JMXExample.java | 6 +- .../jms/example/LargeMessageExample.java | 6 +- .../jms/example/LastValueQueueExample.java | 4 +- .../ManagementNotificationExample.java | 4 +- .../jms/example/ManagementExample.java | 10 +- .../jms/example/MessageCounterExample.java | 4 +- .../jms/example/MessageGroupExample.java | 4 +- .../jms/example/MessageGroup2Example.java | 4 +- .../jms/example/MessagePriorityExample.java | 4 +- .../MultipleFailoverFailbackExample.java | 4 +- .../jms/example/MultipleFailoverExample.java | 4 +- .../example/NoConsumerBufferingExample.java | 6 +- .../NonTransactionFailoverExample.java | 4 +- .../activemq/jms/example/OpenWireExample.java | 4 +- .../activemq/jms/example/PagingExample.java | 8 +- .../jms/example/PreacknowledgeExample.java | 14 +- .../jms/example/ProducerRateLimitExample.java | 4 +- .../activemq/jms/example/ProtonJExample.java | 4 +- .../QueueMessageRedistributionExample.java | 6 +- .../jms/example/QueueRequestorExample.java | 4 +- .../jms/example/QueueSelectorExample.java | 4 +- .../activemq/jms/example/QueueExample.java | 4 +- .../activemq/jms/example/ReattachExample.java | 8 +- .../ReplicatedFailbackStaticExample.java | 4 +- .../example/ReplicatedFailbackExample.java | 4 +- .../ReplicatedMultipleFailoverExample.java | 4 +- .../ReplicatedTransactionFailoverExample.java | 4 +- .../jms/example/RequestReplyExample.java | 4 +- .../dup-send/src/main/java/PostOrder.java | 2 +- .../jms-to-rest/src/main/java/JmsHelper.java | 10 +- .../jms-to-rest/src/main/java/JmsReceive.java | 6 +- .../jms-to-rest/src/main/java/JmsSend.java | 6 +- .../rest/push/src/main/java/JmsHelper.java | 10 +- .../rest/push/src/main/java/PostOrder.java | 6 +- .../push/src/main/java/ReceiveShipping.java | 6 +- .../jms/example/ScaleDownExample.java | 4 +- .../jms/example/ScheduledMessageExample.java | 4 +- .../activemq/jms/example/SecurityExample.java | 14 +- .../example/SendAcknowledgementsExample.java | 10 +- .../activemq/jms/example/SSLExample.java | 4 +- .../jms/example/StaticSelectorJMSExample.java | 4 +- .../jms/example/StaticSelectorExample.java | 4 +- .../jms/example/StompWebSocketExample.java | 4 +- .../activemq/jms/example/StompExample.java | 4 +- .../activemq/jms/example/StompExample.java | 4 +- .../activemq/jms/example/StompExample.java | 4 +- .../example/StopServerFailoverExample.java | 4 +- .../jms/example/SymmetricClusterExample.java | 18 +- .../jms/example/TemporaryQueueExample.java | 4 +- .../jms/example/TopicHierarchyExample.java | 14 +- .../jms/example/TopicSelectorExample1.java | 4 +- .../jms/example/TopicSelectorExample2.java | 4 +- .../activemq/jms/example/TopicExample.java | 4 +- .../example/TransactionFailoverExample.java | 4 +- .../jms/example/TransactionalExample.java | 4 +- .../jms/example/XAHeuristicExample.java | 6 +- .../jms/example/XAReceiveExample.java | 4 +- .../activemq/jms/example/XASendExample.java | 4 +- .../jms/example/XAwithJTAExample.java | 6 +- ...undle.java => ActiveMQAeroGearBundle.java} | 6 +- ...ogger.java => ActiveMQAeroGearLogger.java} | 6 +- .../aerogear/AeroGearConnectorService.java | 26 +- ...ssBundle.java => ActiveMQJBossBundle.java} | 4 +- ...ssLogger.java => ActiveMQJBossLogger.java} | 6 +- .../security/JBossASSecurityManager.java | 18 +- .../jboss/security/SecurityActions.java | 6 +- ...gBundle.java => ActiveMQSpringBundle.java} | 4 +- ...gLogger.java => ActiveMQSpringLogger.java} | 4 +- .../twitter/impl/IncomingTweetsHandler.java | 12 +- .../twitter/impl/OutgoingTweetsHandler.java | 18 +- ...Bundle.java => ActiveMQTwitterBundle.java} | 4 +- ...Logger.java => ActiveMQTwitterLogger.java} | 6 +- ...txLogger.java => ActiveMQVertxLogger.java} | 6 +- .../vertx/IncomingVertxEventHandler.java | 8 +- .../vertx/OutgoingVertxEventHandler.java | 14 +- pom.xml | 22 +- ...t.java => ActiveMQMessageHandlerTest.java} | 28 +- .../byteman/tests/BMFailoverTest.java | 8 +- .../BridgeServerLocatorConfigurationTest.java | 14 +- .../byteman/tests/ClusteredGroupingTest.java | 6 +- .../activemq/byteman/tests/GroupingTest.java | 4 +- .../tests/JMSBridgeReconnectionTest.java | 8 +- .../activemq/byteman/tests/LatencyTest.java | 4 +- .../byteman/tests/OrphanedConsumerTest.java | 8 +- .../byteman/tests/PagingLeakTest.java | 6 +- .../byteman/tests/ScaleDownFailoverTest.java | 12 +- .../byteman/tests/StartStopDeadlockTest.java | 10 +- .../byteman/tests/StompInternalStateTest.java | 4 +- .../integration/DuplicateDetectionTest.java | 76 +-- .../tests/integration/InterceptorTest.java | 4 +- .../tests/integration/String64KLimitTest.java | 8 +- .../aerogear/AeroGearBasicServerTest.java | 34 +- .../integration/client/AckBatchSizeTest.java | 6 +- .../integration/client/AcknowledgeTest.java | 16 +- ...QCrashTest.java => ActiveMQCrashTest.java} | 22 +- .../client/AddressSettingsTest.java | 12 +- .../integration/client/AutogroupIdTest.java | 8 +- .../integration/client/BlockingSendTest.java | 4 +- .../client/CommitRollbackTest.java | 12 +- .../ConcurrentCreateDeleteProduceTest.java | 4 +- .../integration/client/ConsumerCloseTest.java | 18 +- .../client/ConsumerFilterTest.java | 4 +- .../client/ConsumerRoundRobinTest.java | 4 +- .../integration/client/ConsumerStuckTest.java | 12 +- .../integration/client/ConsumerTest.java | 4 +- .../client/ConsumerWindowSizeTest.java | 32 +- .../integration/client/CoreClientTest.java | 16 +- .../client/CreateQueueIdempotentTest.java | 8 +- .../client/DeadLetterAddressTest.java | 14 +- .../integration/client/DeliveryOrderTest.java | 4 +- .../integration/client/DurableQueueTest.java | 4 +- .../client/ExpireTestOnRestartTest.java | 4 +- .../integration/client/ExpiryAddressTest.java | 14 +- .../client/ExpiryLargeMessageTest.java | 6 +- .../client/FailureDeadlockTest.java | 28 +- .../integration/client/HangConsumerTest.java | 28 +- .../integration/client/HeuristicXATest.java | 30 +- .../InVMNonPersistentMessageBufferTest.java | 4 +- .../client/IncompatibleVersionTest.java | 24 +- .../client/InterruptedLargeMessageTest.java | 28 +- .../client/JmsNettyNioStressTest.java | 22 +- .../integration/client/JournalCrashTest.java | 8 +- .../LargeMessageAvoidLargeMessagesTest.java | 16 +- .../client/LargeMessageCompressTest.java | 20 +- .../integration/client/LargeMessageTest.java | 72 +-- .../client/MessageConcurrencyTest.java | 4 +- .../client/MessageConsumerRollbackTest.java | 8 +- .../client/MessageCounterTest.java | 4 +- .../client/MessageDurabilityTest.java | 8 +- .../client/MessageExpirationTest.java | 4 +- .../MessageGroupingConnectionFactoryTest.java | 14 +- .../client/MessageGroupingTest.java | 22 +- .../client/MessageHandlerTest.java | 4 +- .../client/MessagePriorityTest.java | 12 +- .../integration/client/MessageRateTest.java | 10 +- .../client/MultipleThreadFilterOneTest.java | 4 +- .../integration/client/NIOvsOIOTest.java | 10 +- .../client/NettyConnectorTest.java | 8 +- .../client/NewDeadLetterAddressTest.java | 14 +- .../tests/integration/client/OrderTest.java | 4 +- .../integration/client/PagingOrderTest.java | 32 +- .../integration/client/PagingSyncTest.java | 4 +- .../tests/integration/client/PagingTest.java | 16 +- .../integration/client/ProducerCloseTest.java | 6 +- .../client/ProducerFlowControlTest.java | 4 +- .../integration/client/ProducerTest.java | 4 +- .../integration/client/QueueBrowserTest.java | 4 +- .../client/ReceiveImmediateTest.java | 4 +- .../tests/integration/client/ReceiveTest.java | 4 +- .../client/RedeliveryConsumerTest.java | 8 +- .../integration/client/RequestorTest.java | 18 +- .../tests/integration/client/RoutingTest.java | 4 +- .../client/SelfExpandingBufferTest.java | 4 +- .../client/ServerLocatorConnectTest.java | 18 +- .../ServerLocatorSerializationTest.java | 16 +- .../client/SessionCloseOnGCTest.java | 4 +- .../integration/client/SessionCloseTest.java | 46 +- ...ClosedOnRemotingConnectionFailureTest.java | 4 +- .../SessionCreateAndDeleteQueueTest.java | 4 +- .../client/SessionCreateConsumerTest.java | 4 +- .../client/SessionCreateProducerTest.java | 4 +- .../client/SessionFactoryTest.java | 100 ++-- ...SessionSendAcknowledgementHandlerTest.java | 4 +- .../client/SessionStopStartTest.java | 4 +- .../tests/integration/client/SessionTest.java | 4 +- .../client/SimpleSendMultipleQueuesTest.java | 4 +- .../integration/client/SlowConsumerTest.java | 4 +- .../client/TemporaryQueueTest.java | 6 +- .../client/TransactionDurabilityTest.java | 10 +- .../client/TransactionalSendTest.java | 6 +- .../client/WildCardRoutingTest.java | 12 +- .../clientcrash/ClientCrashTest.java | 6 +- .../clientcrash/ClientExitTest.java | 6 +- .../clientcrash/ClientTestBase.java | 8 +- .../integration/clientcrash/CrashClient.java | 8 +- .../integration/clientcrash/CrashClient2.java | 4 +- .../clientcrash/GracefulClient.java | 8 +- .../cluster/ClusterControllerTest.java | 16 +- .../cluster/bridge/BridgeFailoverTest.java | 8 +- .../cluster/bridge/BridgeReconnectTest.java | 48 +- .../cluster/bridge/BridgeStartTest.java | 28 +- .../cluster/bridge/BridgeTest.java | 44 +- .../cluster/bridge/BridgeTestBase.java | 40 +- .../BridgeWithDiscoveryGroupStartTest.java | 10 +- .../cluster/distribution/ClusterTestBase.java | 96 ++-- .../OnewayTwoNodeClusterTest.java | 4 +- .../AutomaticColocatedQuorumVoteTest.java | 64 +-- .../failover/BackupSyncPagingTest.java | 4 +- .../ClusterWithBackupFailoverTestBase.java | 8 +- .../cluster/failover/FailBackAutoTest.java | 4 +- .../cluster/failover/FailBackManualTest.java | 4 +- .../failover/FailoverListenerTest.java | 4 +- .../cluster/failover/FailoverTest.java | 4 +- .../cluster/failover/FailoverTestBase.java | 14 +- .../failover/LiveToLiveFailoverTest.java | 6 +- .../MultipleBackupsFailoverTestBase.java | 8 +- ...tipleLivesMultipleBackupsFailoverTest.java | 6 +- .../MultipleServerFailoverTestBase.java | 28 +- .../cluster/failover/NettyFailoverTest.java | 4 +- .../failover/NettyReplicatedFailoverTest.java | 4 +- .../cluster/failover/PagingFailoverTest.java | 8 +- .../failover/ReplicatedPagedFailoverTest.java | 4 +- .../failover/SecurityFailoverTest.java | 8 +- ...SingleLiveMultipleBackupsFailoverTest.java | 6 +- .../remote/FailoverWithSharedStoreTest.java | 4 +- .../ha/HAAutomaticBackupSharedStore.java | 4 +- .../MultiThreadRandomReattachTestBase.java | 16 +- .../cluster/reattach/OrderReattachTest.java | 8 +- .../cluster/reattach/RandomReattachTest.java | 44 +- .../cluster/reattach/ReattachTest.java | 24 +- .../topology/HAClientTopologyTest.java | 4 +- .../HAClientTopologyWithDiscoveryTest.java | 10 +- .../topology/IsolatedTopologyTest.java | 12 +- .../cluster/topology/NonHATopologyTest.java | 4 +- .../topology/TopologyClusterTestBase.java | 6 +- .../cluster/util/BackupSyncDelay.java | 8 +- .../cluster/util/MultiServerTestBase.java | 42 +- ...er.java => SameProcessActiveMQServer.java} | 12 +- .../cluster/util/TestableServer.java | 8 +- .../deployers/impl/QueueDeployerTest.java | 6 +- .../integration/discovery/DiscoveryTest.java | 6 +- .../tests/integration/divert/DivertTest.java | 26 +- .../divert/PersistentDivertTest.java | 12 +- .../integration/embedded/ValidateAIOTest.java | 6 +- .../http/CoreClientOverHttpTest.java | 18 +- ...ava => ActiveMQConnectionFactoryTest.java} | 276 ++++----- .../integration/jms/FloodServerTest.java | 52 +- .../integration/jms/JmsProducerTest.java | 6 +- .../ManualReconnectionToSingleServerTest.java | 4 +- .../jms/bridge/BridgeTestBase.java | 66 +-- .../jms/bridge/ClusteredBridgeTestBase.java | 26 +- .../jms/bridge/JMSBridgeReconnectionTest.java | 22 +- .../integration/jms/bridge/JMSBridgeTest.java | 16 +- .../jms/client/AutoGroupingTest.java | 12 +- .../jms/client/CreateQueueTest.java | 10 +- .../integration/jms/client/GroupIDTest.java | 6 +- .../integration/jms/client/GroupingTest.java | 18 +- .../integration/jms/client/MessageTest.java | 14 +- .../integration/jms/client/PreACKJMSTest.java | 48 +- .../jms/client/ReSendMessageTest.java | 54 +- .../client/RemoteConnectionStressTest.java | 14 +- ...ClosedOnRemotingConnectionFailureTest.java | 60 +- .../integration/jms/client/SessionTest.java | 6 +- .../jms/client/TextMessageTest.java | 48 +- .../jms/client/TopicCleanupTest.java | 4 +- .../jms/cluster/BindingsClusterTest.java | 44 +- .../jms/cluster/JMSFailoverListenerTest.java | 50 +- .../jms/cluster/JMSFailoverTest.java | 56 +- .../jms/cluster/JMSReconnectTest.java | 40 +- .../cluster/LargeMessageOverBridgeTest.java | 6 +- .../cluster/MultipleThreadsOpeningTest.java | 6 +- .../cluster/ReplicatedJMSFailoverTest.java | 6 +- .../CloseConnectionFactoryOnGCest.java | 8 +- .../connection/CloseConnectionOnGCTest.java | 8 +- .../CloseDestroyedConnectionTest.java | 28 +- .../ConcurrentSessionCloseTest.java | 10 +- .../ConnectionFactorySerializationTest.java | 10 +- ...onFactoryWithJGroupsSerializationTest.java | 16 +- .../jms/connection/ExceptionListenerTest.java | 30 +- .../jms/connection/InvalidConnectorTest.java | 54 +- .../jms/consumer/ConsumerTest.java | 76 +-- .../jms/divert/DivertAndACKClientTest.java | 48 +- .../integration/jms/jms2client/BodyTest.java | 4 +- .../jms/jms2client/NonExistentQueueTest.java | 8 +- .../jms/server/JMSServerDeployerTest.java | 16 +- .../jms/server/JMSServerStartStopTest.java | 34 +- .../server/config/JMSConfigurationTest.java | 6 +- .../config/JMSServerConfigParserTest.java | 2 +- .../ConnectionFactoryControlTest.java | 16 +- .../management/JMSQueueControlTest.java | 54 +- .../JMSQueueControlUsingJMSTest.java | 10 +- .../management/JMSServerControl2Test.java | 100 ++-- .../JMSServerControlRestartTest.java | 12 +- .../management/JMSServerControlTest.java | 92 +-- .../JMSServerControlUsingJMSTest.java | 22 +- .../jms/server/management/JMSUtil.java | 36 +- .../server/management/TopicControlTest.java | 40 +- .../management/TopicControlUsingJMSTest.java | 40 +- .../journal/JournalPerfTuneTest.java | 4 +- .../integration/journal/OldFormatTest.java | 2 +- .../largemessage/LargeMessageTestBase.java | 4 +- .../largemessage/ServerLargeMessageTest.java | 14 +- .../management/AcceptorControlTest.java | 8 +- .../AcceptorControlUsingCoreTest.java | 4 +- ...st.java => ActiveMQServerControlTest.java} | 108 ++-- ...> ActiveMQServerControlUsingCoreTest.java} | 32 +- .../management/AddressControlTest.java | 12 +- .../AddressControlUsingCoreTest.java | 6 +- .../management/BridgeControlTest.java | 12 +- .../BridgeControlUsingCoreTest.java | 18 +- .../management/BroadcastGroupControlTest.java | 10 +- .../ClusterConnectionControl2Test.java | 12 +- .../ClusterConnectionControlTest.java | 12 +- ...ClusterConnectionControlUsingCoreTest.java | 4 +- .../management/DivertControlTest.java | 8 +- .../DivertControlUsingCoreTest.java | 4 +- .../integration/management/JMXDomainTest.java | 34 +- .../management/ManagementControlHelper.java | 8 +- .../management/ManagementServiceImplTest.java | 14 +- .../ManagementWithPagingServerTest.java | 8 +- .../management/ManagementWithStompTest.java | 8 +- .../management/NotificationTest.java | 12 +- .../management/QueueControlTest.java | 28 +- .../SecurityManagementTestBase.java | 14 +- ...ManagementWithConfiguredAdminUserTest.java | 12 +- ...anagementWithDefaultConfigurationTest.java | 8 +- ...nagementWithModifiedConfigurationTest.java | 8 +- .../management/SecurityNotificationTest.java | 22 +- .../openwire/OpenWireTestBase.java | 4 +- .../paging/PageCountSyncOnNonTXTest.java | 4 +- .../paging/PageCountSyncServer.java | 4 +- .../integration/paging/PagingCounterTest.java | 18 +- .../integration/paging/PagingReceiveTest.java | 12 +- .../integration/paging/PagingSendTest.java | 10 +- .../PagingWithFailoverAndCountersTest.java | 6 +- .../paging/PagingWithFailoverServer.java | 8 +- .../paging/SpawnedServerSupport.java | 16 +- .../persistence/DeleteQueueRestartTest.java | 8 +- .../persistence/ExportFormatTest.java | 22 +- .../persistence/StorageManagerTestBase.java | 2 +- .../persistence/XmlImportExportTest.java | 36 +- .../tests/integration/proton/ProtonTest.java | 18 +- ...nTest.java => ActiveMQActivationTest.java} | 12 +- ...edTest.java => ActiveMQClusteredTest.java} | 18 +- ...> ActiveMQMessageHandlerSecurityTest.java} | 14 +- ...t.java => ActiveMQMessageHandlerTest.java} | 96 ++-- ...java => ActiveMQMessageHandlerXATest.java} | 22 +- ....java => ActiveMQRAClusteredTestBase.java} | 10 +- ...ATestBase.java => ActiveMQRATestBase.java} | 20 +- .../tests/integration/ra/JMSContextTest.java | 24 +- .../ra/OutgoingConnectionTest.java | 82 +-- .../integration/ra/ResourceAdapterTest.java | 148 ++--- .../integration/remoting/BatchDelayTest.java | 8 +- .../remoting/DestroyConsumerTest.java | 2 +- .../remoting/DirectDeliverTest.java | 8 +- .../remoting/NetworkAddressTestBase.java | 8 +- .../tests/integration/remoting/PingTest.java | 20 +- .../integration/remoting/ReconnectTest.java | 6 +- .../remoting/SynchronousCloseTest.java | 12 +- .../replication/ReplicationOrderTest.java | 6 +- .../replication/ReplicationTest.java | 16 +- .../scheduling/DelayedMessageTest.java | 8 +- .../MultipliedDelayedMessageTest.java | 8 +- .../scheduling/ScheduledMessageTest.java | 10 +- .../security/NettySecurityClientTest.java | 4 +- .../integration/security/SecurityTest.java | 146 ++--- .../integration/security/SimpleClient.java | 8 +- .../server/AddressFullLoggingTest.java | 8 +- .../integration/server/ExpiryRunnerTest.java | 12 +- .../server/FileLockTimeoutTest.java | 8 +- .../integration/server/LVQRecoveryTest.java | 10 +- .../tests/integration/server/LVQTest.java | 12 +- .../server/PredefinedQueueTest.java | 24 +- .../server/ScaleDown3NodeTest.java | 10 +- .../integration/server/ScaleDownTest.java | 10 +- .../server/SuppliedThreadPoolTest.java | 10 +- .../spring/SpringIntegrationTest.java | 4 +- .../ssl/CoreClientOverOneWaySSLTest.java | 50 +- .../ssl/CoreClientOverTwoWaySSLTest.java | 22 +- .../integration/stomp/ExtraStompTest.java | 40 +- .../stomp/StompConnectionCleanupTest.java | 6 +- .../integration/stomp/StompTestBase.java | 18 +- .../integration/stomp/StompWebSocketTest.java | 8 +- .../integration/stomp/v11/ExtraStompTest.java | 4 +- .../integration/stomp/v11/StompV11Test.java | 2 +- .../stomp/v11/StompV11TestBase.java | 12 +- .../integration/stomp/v12/StompV12Test.java | 2 +- ...st.java => ActiveMQFrameDecoder2Test.java} | 24 +- .../NettyConnectorWithHTTPUpgradeTest.java | 30 +- .../integration/twitter/TwitterTest.java | 20 +- ...itTest.java => ActiveMQVertxUnitTest.java} | 20 +- .../integration/xa/BasicXaRecoveryTest.java | 12 +- .../tests/integration/xa/BasicXaTest.java | 42 +- .../tests/integration/xa/XaTimeoutTest.java | 14 +- .../largemessage/LargeMessageTestBase.java | 4 +- .../tests/util/JMSClusteredTestBase.java | 36 +- .../activemq/tests/util/JMSTestBase.java | 8 +- .../tests/util/ReplicatedBackupUtils.java | 4 +- ...ctivemq-jms-for-JMSServerDeployerTest.xml} | 0 ...tivemq-jms-for-JMSServerDeployerTest2.xml} | 0 ...-config.xml => spring-activemq-config.xml} | 0 ...ornetq-jms.xml => spring-activemq-jms.xml} | 0 .../jms/tests/AcknowledgementTest.java | 24 +- ...tCase.java => ActiveMQServerTestCase.java} | 90 +-- .../activemq/jms/tests/BrowserTest.java | 4 +- .../jms/tests/CTSMiscellaneousTest.java | 60 +- .../jms/tests/ConnectionClosedTest.java | 12 +- .../jms/tests/ConnectionFactoryTest.java | 46 +- .../activemq/jms/tests/ConnectionTest.java | 2 +- .../jms/tests/DurableSubscriptionTest.java | 42 +- .../activemq/jms/tests/JMSTestCase.java | 172 +++--- .../activemq/jms/tests/JmsTestLogger.java | 2 +- .../jms/tests/MessageConsumerTest.java | 130 ++--- .../jms/tests/MessageProducerTest.java | 50 +- .../jms/tests/NonDurableSubscriberTest.java | 2 +- .../activemq/jms/tests/PersistenceTest.java | 28 +- .../apache/activemq/jms/tests/QueueTest.java | 2 +- .../activemq/jms/tests/ReferenceableTest.java | 30 +- .../activemq/jms/tests/SecurityTest.java | 8 +- .../activemq/jms/tests/SessionTest.java | 6 +- .../apache/activemq/jms/tests/TopicTest.java | 16 +- .../jms/tests/TransactedSessionTest.java | 28 +- .../activemq/jms/tests/XARecoveryTest.java | 60 +- .../org/apache/activemq/jms/tests/XATest.java | 178 +++--- .../message/JMSExpirationHeaderTest.java | 4 +- .../tests/message/JMSPriorityHeaderTest.java | 4 +- .../tests/message/JMSXDeliveryCountTest.java | 12 +- .../tests/message/MessageBodyTestCase.java | 4 +- .../jms/tests/message/MessageHeaderTest.java | 44 +- .../tests/message/MessageHeaderTestBase.java | 40 +- .../MessagePropertyConversionTest.java | 4 +- .../jms/tests/message/MessageTestBase.java | 8 +- .../message/ObjectMessageDeliveryTest.java | 14 +- .../foreign/ForeignBytesMessageTest.java | 4 +- .../message/foreign/ForeignMessageTest.java | 6 +- .../jms/tests/selector/SelectorTest.java | 28 +- .../stress/ConcurrentCloseStressTest.java | 4 +- .../stress/CorruptMessageStressTest.java | 4 +- .../jms/tests/stress/JMSStressTestBase.java | 4 +- .../stress/ManyConnectionsStressTest.java | 4 +- .../jms/tests/stress/OpenCloseStressTest.java | 4 +- .../jms/tests/stress/RelayStressTest.java | 4 +- .../stress/SeveralClientsStressTest.java | 4 +- .../jms/tests/tools/ServerManagement.java | 2 +- .../jms/tests/tools/container/Constants.java | 2 +- .../tools/container/LocalTestServer.java | 88 +-- .../jms/tests/tools/container/Server.java | 6 +- .../activemq/jms/tests/util/JNDIUtilTest.java | 4 +- ...{HornetQAdmin.java => ActiveMQQAdmin.java} | 16 +- .../apache/activemq/jms/SpawnedJMSServer.java | 6 +- .../conform/connection/ConnectionTest.java | 2 +- .../src/test/resources/provider.properties | 2 +- .../journal/JournalImplTestUnit.java | 6 +- .../paging/MeasurePagingMultiThreadTest.java | 4 +- .../tests/soak/client/ClientAbstract.java | 2 +- .../client/ClientNonDivertedSoakTest.java | 4 +- .../tests/soak/client/ClientSoakTest.java | 4 +- .../client/SimpleSendReceiveSoakTest.java | 4 +- .../tests/stress/client/SendStressTest.java | 4 +- .../journal/AddAndRemoveStressTest.java | 22 +- .../stress/journal/CompactingStressTest.java | 4 +- .../JournalCleanupCompactStressTest.java | 8 +- .../journal/JournalRestartStressTest.java | 4 +- .../journal/LargeJournalStressTest.java | 4 +- .../MultiThreadConsumerStressTest.java | 4 +- .../NIOMultiThreadCompactorStressTest.java | 8 +- .../journal/XmlImportExportStressTest.java | 4 +- .../MultipleConsumersPageStressTest.java | 4 +- .../stress/paging/PageCursorStressTest.java | 4 +- .../tests/stress/paging/PageStressTest.java | 10 +- .../tests/stress/remote/PingStressTest.java | 10 +- .../tests/stress/stomp/StompStressTest.java | 10 +- .../jms/bridge/impl/JMSBridgeImplTest.java | 48 +- .../activemq/tests/unit/UnitTestLogger.java | 2 +- .../core/asyncio/AsynchronousFileTest.java | 4 +- .../MultiThreadAsynchronousFileTest.java | 4 +- .../client/impl/LargeMessageBufferTest.java | 12 +- .../impl/ConfigurationValidationTest.java | 2 +- .../impl/AddressSettingsDeployerTest.java | 2 +- .../BasicUserCredentialsDeployerTest.java | 12 +- .../deployers/impl/SecurityDeployerTest.java | 2 +- .../journal/impl/AlignedJournalImplTest.java | 12 +- .../journal/impl/JournalImplTestBase.java | 6 +- .../journal/impl/JournalImplTestUnit.java | 4 +- .../impl/SequentialFileFactoryTestBase.java | 34 +- .../impl/fakes/FakeSequentialFileFactory.java | 4 +- .../unit/core/postoffice/impl/FakeQueue.java | 4 +- ...tBase.java => ActiveMQBufferTestBase.java} | 2 +- .../impl/netty/ChannelBufferWrapper2Test.java | 4 +- .../impl/netty/NettyAcceptorFactoryTest.java | 4 +- .../impl/netty/NettyAcceptorTest.java | 6 +- .../impl/netty/NettyConnectionTest.java | 4 +- .../impl/netty/NettyConnectorTest.java | 24 +- ...a => ActiveMQSecurityManagerImplTest.java} | 10 +- .../unit/core/server/impl/QueueImplTest.java | 6 +- ...Test.java => ActiveMQDestinationTest.java} | 22 +- ...eTest.java => ActiveMQMapMessageTest.java} | 120 ++-- ...st.java => ActiveMQStreamMessageTest.java} | 170 +++--- .../jms/client/JMSExceptionHelperTest.java | 2 +- .../jms/client/SelectorTranslatorTest.java | 88 +-- .../tests/unit/jms/misc/ManifestTest.java | 14 +- .../ConnectionFactoryObjectFactoryTest.java | 6 +- .../DestinationObjectFactoryTest.java | 8 +- ...=> ActiveMQResourceAdapterConfigTest.java} | 10 +- .../ra/ConnectionFactoryPropertiesTest.java | 14 +- .../tests/unit/ra/ResourceAdapterTest.java | 240 ++++---- ...ava => ActiveMQBufferInputStreamTest.java} | 8 +- .../tests/unit/util/VersionLoaderTest.java | 12 +- .../tests/unit/xa/XAResourceWrapperTest.java | 8 +- .../activemq/tests/util/CreateMessage.java | 10 +- 1073 files changed, 11006 insertions(+), 11008 deletions(-) rename activemq-bootstrap/src/main/java/org/apache/activemq/integration/bootstrap/{HornetQBootstrapBundle.java => ActiveMQBootstrapBundle.java} (92%) rename activemq-bootstrap/src/main/java/org/apache/activemq/integration/bootstrap/{HornetQBootstrapLogger.java => ActiveMQBootstrapLogger.java} (91%) rename activemq-commons/src/main/java/org/apache/activemq/core/server/{HornetQComponent.java => ActiveMQComponent.java} (93%) rename activemq-commons/src/main/java/org/apache/activemq/utils/{HornetQThreadFactory.java => ActiveMQThreadFactory.java} (90%) rename activemq-commons/src/main/java/org/apache/activemq/utils/{HornetQUtilBundle.java => ActiveMQUtilBundle.java} (92%) rename activemq-commons/src/main/java/org/apache/activemq/utils/{HornetQUtilLogger.java => ActiveMQUtilLogger.java} (87%) rename activemq-core-client/src/main/java/org/apache/activemq/api/core/client/{HornetQClient.java => ActiveMQClient.java} (98%) rename activemq-core-client/src/main/java/org/apache/activemq/api/core/management/{HornetQComponentControl.java => ActiveMQComponentControl.java} (88%) rename activemq-core-client/src/main/java/org/apache/activemq/api/core/management/{HornetQServerControl.java => ActiveMQServerControl.java} (98%) rename activemq-core-client/src/main/java/org/apache/activemq/core/buffers/impl/{ResetLimitWrappedHornetQBuffer.java => ResetLimitWrappedActiveMQBuffer.java} (96%) rename activemq-core-client/src/main/java/org/apache/activemq/core/client/{HornetQClientLogger.java => ActiveMQClientLogger.java} (98%) rename activemq-core-client/src/main/java/org/apache/activemq/core/client/{HornetQClientMessageBundle.java => ActiveMQClientMessageBundle.java} (98%) rename activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/{HornetQXAResource.java => ActiveMQXAResource.java} (93%) rename activemq-core-client/src/main/java/org/apache/activemq/core/exception/{HornetQXAException.java => ActiveMQXAException.java} (81%) rename activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/{HornetQClientProtocolManager.java => ActiveMQClientProtocolManager.java} (93%) rename activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/{HornetQClientProtocolManagerFactory.java => ActiveMQClientProtocolManagerFactory.java} (72%) rename activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/{HornetQConsumerContext.java => ActiveMQConsumerContext.java} (87%) rename activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/{HornetQSessionContext.java => ActiveMQSessionContext.java} (94%) rename activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/{HornetQExceptionMessage.java => ActiveMQExceptionMessage.java} (90%) rename activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/{HornetQAMQPFrameDecoder.java => ActiveMQAMQPFrameDecoder.java} (92%) rename activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/{HornetQChannelHandler.java => ActiveMQChannelHandler.java} (85%) rename activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/{HornetQFrameDecoder2.java => ActiveMQFrameDecoder2.java} (93%) rename activemq-core-client/src/main/java/org/apache/activemq/core/security/{HornetQPrincipal.java => ActiveMQPrincipal.java} (91%) rename activemq-core-client/src/main/java/org/apache/activemq/utils/{HornetQBufferInputStream.java => ActiveMQBufferInputStream.java} (96%) create mode 100644 activemq-core-client/src/main/resources/activemq-version.properties delete mode 100644 activemq-core-client/src/main/resources/hornetq-version.properties rename activemq-jms-client/src/main/java/org/apache/activemq/api/jms/{HornetQJMSClient.java => ActiveMQJMSClient.java} (57%) rename activemq-jms-client/src/main/java/org/apache/activemq/api/jms/{HornetQJMSConstants.java => ActiveMQJMSConstants.java} (64%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQBytesMessage.java => ActiveMQBytesMessage.java} (94%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQConnection.java => ActiveMQConnection.java} (87%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQConnectionFactory.java => ActiveMQConnectionFactory.java} (88%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQConnectionForContext.java => ActiveMQConnectionForContext.java} (93%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQConnectionForContextImpl.java => ActiveMQConnectionForContextImpl.java} (84%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQConnectionMetaData.java => ActiveMQConnectionMetaData.java} (87%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQDestination.java => ActiveMQDestination.java} (71%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQJMSClientBundle.java => ActiveMQJMSClientBundle.java} (96%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQJMSClientLogger.java => ActiveMQJMSClientLogger.java} (92%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQJMSConnectionFactory.java => ActiveMQJMSConnectionFactory.java} (76%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQJMSConsumer.java => ActiveMQJMSConsumer.java} (90%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQJMSContext.java => ActiveMQJMSContext.java} (89%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQJMSProducer.java => ActiveMQJMSProducer.java} (97%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQMapMessage.java => ActiveMQMapMessage.java} (93%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQMessage.java => ActiveMQMessage.java} (85%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQMessageConsumer.java => ActiveMQMessageConsumer.java} (78%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQMessageProducer.java => ActiveMQMessageProducer.java} (83%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQObjectMessage.java => ActiveMQObjectMessage.java} (89%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQQueue.java => ActiveMQQueue.java} (80%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQQueueBrowser.java => ActiveMQQueueBrowser.java} (84%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQQueueConnectionFactory.java => ActiveMQQueueConnectionFactory.java} (78%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQSession.java => ActiveMQSession.java} (81%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQStreamMessage.java => ActiveMQStreamMessage.java} (94%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQTemporaryQueue.java => ActiveMQTemporaryQueue.java} (86%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQTemporaryTopic.java => ActiveMQTemporaryTopic.java} (85%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQTextMessage.java => ActiveMQTextMessage.java} (83%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQTopic.java => ActiveMQTopic.java} (81%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQTopicConnectionFactory.java => ActiveMQTopicConnectionFactory.java} (77%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQXAConnection.java => ActiveMQXAConnection.java} (74%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQXAConnectionFactory.java => ActiveMQXAConnectionFactory.java} (80%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQXAJMSContext.java => ActiveMQXAJMSContext.java} (79%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQXAQueueConnectionFactory.java => ActiveMQXAQueueConnectionFactory.java} (77%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQXASession.java => ActiveMQXASession.java} (71%) rename activemq-jms-client/src/main/java/org/apache/activemq/jms/client/{HornetQXATopicConnectionFactory.java => ActiveMQXATopicConnectionFactory.java} (77%) rename activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/{HornetQJMSBridgeLogger.java => ActiveMQJMSBridgeLogger.java} (94%) rename activemq-jms-server/src/main/java/org/apache/activemq/jms/server/{HornetQJMSServerBundle.java => ActiveMQJMSServerBundle.java} (94%) rename activemq-jms-server/src/main/java/org/apache/activemq/jms/server/{HornetQJMSServerLogger.java => ActiveMQJMSServerLogger.java} (94%) rename activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/{HornetQRecoveryRegistry.java => ActiveMQRecoveryRegistry.java} (75%) rename activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/{HornetQRegistryBase.java => ActiveMQRegistryBase.java} (75%) rename activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/{HornetQXAResourceRecovery.java => ActiveMQXAResourceRecovery.java} (78%) rename activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/{HornetQXAResourceWrapper.java => ActiveMQXAResourceWrapper.java} (71%) rename activemq-journal/src/main/java/org/apache/activemq/core/asyncio/impl/{HornetQFileLock.java => ActiveMQFileLock.java} (90%) rename activemq-journal/src/main/java/org/apache/activemq/journal/{HornetQJournalBundle.java => ActiveMQJournalBundle.java} (92%) rename activemq-journal/src/main/java/org/apache/activemq/journal/{HornetQJournalLogger.java => ActiveMQJournalLogger.java} (98%) rename activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/{HornetQProtonRemotingConnection.java => ActiveMQProtonRemotingConnection.java} (86%) rename activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/{HornetQJMSVendor.java => ActiveMQJMSVendor.java} (94%) rename activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/plug/{HornetQProtonConnectionCallback.java => ActiveMQProtonConnectionCallback.java} (80%) rename activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/sasl/{HornetQPlainSASL.java => ActiveMQPlainSASL.java} (81%) rename activemq-protocols/activemq-amqp-protocol/src/main/resources/META-INF/services/{org.hornetq.spi.core.protocol.ProtocolManagerFactory => org.apache.activemq.spi.core.protocol.ProtocolManagerFactory} (100%) rename activemq-protocols/activemq-openwire-protocol/src/main/resources/META-INF/services/{org.hornetq.spi.core.protocol.ProtocolManagerFactory => org.apache.activemq.spi.core.protocol.ProtocolManagerFactory} (100%) rename activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/{HornetQAMQPException.java => ActiveMQAMQPException.java} (84%) rename activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/{HornetQAMQPIllegalStateException.java => ActiveMQAMQPIllegalStateException.java} (86%) rename activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/{HornetQAMQPInternalErrorException.java => ActiveMQAMQPInternalErrorException.java} (81%) rename activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/{HornetQAMQPInvalidFieldException.java => ActiveMQAMQPInvalidFieldException.java} (86%) rename activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/{HornetQAMQPNotImplementedException.java => ActiveMQAMQPNotImplementedException.java} (86%) rename activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/{HornetQAMQPTimeoutException.java => ActiveMQAMQPTimeoutException.java} (86%) rename activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/logger/{HornetQAMQPProtocolMessageBundle.java => ActiveMQAMQPProtocolMessageBundle.java} (58%) rename activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/{HornetQStompException.java => ActiveMQStompException.java} (91%) rename activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/{HornetQStompProtocolLogger.java => ActiveMQStompProtocolLogger.java} (87%) rename activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/{HornetQStompProtocolMessageBundle.java => ActiveMQStompProtocolMessageBundle.java} (75%) rename activemq-protocols/activemq-stomp-protocol/src/main/resources/META-INF/services/{org.hornetq.spi.core.protocol.ProtocolManagerFactory => org.apache.activemq.spi.core.protocol.ProtocolManagerFactory} (100%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRABundle.java => ActiveMQRABundle.java} (95%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRABytesMessage.java => ActiveMQRABytesMessage.java} (71%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAConnectionFactory.java => ActiveMQRAConnectionFactory.java} (86%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAConnectionFactoryImpl.java => ActiveMQRAConnectionFactoryImpl.java} (63%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAConnectionManager.java => ActiveMQRAConnectionManager.java} (79%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAConnectionMetaData.java => ActiveMQRAConnectionMetaData.java} (68%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAConnectionRequestInfo.java => ActiveMQRAConnectionRequestInfo.java} (69%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRACredential.java => ActiveMQRACredential.java} (76%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAJMSContext.java => ActiveMQRAJMSContext.java} (64%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRALocalTransaction.java => ActiveMQRALocalTransaction.java} (78%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRALogger.java => ActiveMQRALogger.java} (73%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAMCFProperties.java => ActiveMQRAMCFProperties.java} (64%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAManagedConnection.java => ActiveMQRAManagedConnection.java} (72%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAManagedConnectionFactory.java => ActiveMQRAManagedConnectionFactory.java} (76%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAMapMessage.java => ActiveMQRAMapMessage.java} (73%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAMessage.java => ActiveMQRAMessage.java} (72%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAMessageConsumer.java => ActiveMQRAMessageConsumer.java} (71%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAMessageListener.java => ActiveMQRAMessageListener.java} (72%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAMessageProducer.java => ActiveMQRAMessageProducer.java} (73%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAMetaData.java => ActiveMQRAMetaData.java} (72%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAObjectMessage.java => ActiveMQRAObjectMessage.java} (73%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAProperties.java => ActiveMQRAProperties.java} (87%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAQueueReceiver.java => ActiveMQRAQueueReceiver.java} (73%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAQueueSender.java => ActiveMQRAQueueSender.java} (75%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAService.java => ActiveMQRAService.java} (89%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRASession.java => ActiveMQRASession.java} (69%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRASessionFactory.java => ActiveMQRASessionFactory.java} (91%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRASessionFactoryImpl.java => ActiveMQRASessionFactoryImpl.java} (72%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAStreamMessage.java => ActiveMQRAStreamMessage.java} (71%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRATextMessage.java => ActiveMQRATextMessage.java} (73%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRATopicPublisher.java => ActiveMQRATopicPublisher.java} (76%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRATopicSubscriber.java => ActiveMQRATopicSubscriber.java} (73%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAXAJMSContext.java => ActiveMQRAXAJMSContext.java} (74%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRAXAResource.java => ActiveMQRAXAResource.java} (76%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQRaUtils.java => ActiveMQRaUtils.java} (97%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQResourceAdapter.java => ActiveMQResourceAdapter.java} (73%) rename activemq-ra/src/main/java/org/apache/activemq/ra/{HornetQXAResourceWrapper.java => ActiveMQXAResourceWrapper.java} (87%) rename activemq-ra/src/main/java/org/apache/activemq/ra/inflow/{HornetQActivation.java => ActiveMQActivation.java} (75%) rename activemq-ra/src/main/java/org/apache/activemq/ra/inflow/{HornetQActivationSpec.java => ActiveMQActivationSpec.java} (77%) rename activemq-ra/src/main/java/org/apache/activemq/ra/inflow/{HornetQMessageHandler.java => ActiveMQMessageHandler.java} (79%) rename activemq-rest/src/main/java/org/apache/activemq/rest/{Hornetq.java => ActiveMQ.java} (98%) rename activemq-rest/src/main/java/org/apache/activemq/rest/{HornetQRestBundle.java => ActiveMQRestBundle.java} (93%) rename activemq-rest/src/main/java/org/apache/activemq/rest/{HornetQRestLogger.java => ActiveMQRestLogger.java} (93%) rename activemq-rest/src/main/java/org/apache/activemq/rest/integration/{HornetqBootstrapListener.java => ActiveMQBootstrapListener.java} (95%) rename activemq-rest/src/main/java/org/apache/activemq/rest/integration/{EmbeddedRestHornetQ.java => EmbeddedRestActiveMQ.java} (82%) rename activemq-rest/src/main/java/org/apache/activemq/rest/integration/{EmbeddedRestHornetQJMS.java => EmbeddedRestActiveMQJMS.java} (78%) rename activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/{HornetQPushStrategy.java => ActiveMQPushStrategy.java} (91%) rename activemq-server/src/main/java/org/apache/activemq/core/management/impl/{HornetQServerControlImpl.java => ActiveMQServerControlImpl.java} (96%) rename activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/{HornetQPacketHandler.java => ActiveMQPacketHandler.java} (80%) rename activemq-server/src/main/java/org/apache/activemq/core/server/{HornetQMessageBundle.java => ActiveMQMessageBundle.java} (97%) rename activemq-server/src/main/java/org/apache/activemq/core/server/{HornetQServer.java => ActiveMQServer.java} (93%) rename activemq-server/src/main/java/org/apache/activemq/core/server/{HornetQServerLogger.java => ActiveMQServerLogger.java} (98%) create mode 100644 activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServers.java delete mode 100644 activemq-server/src/main/java/org/apache/activemq/core/server/HornetQServers.java rename activemq-server/src/main/java/org/apache/activemq/core/server/cluster/{HornetQServerSideProtocolManagerFactory.java => ActiveMQServerSideProtocolManagerFactory.java} (71%) rename activemq-server/src/main/java/org/apache/activemq/core/server/embedded/{EmbeddedHornetQ.java => EmbeddedActiveMQ.java} (67%) rename activemq-server/src/main/java/org/apache/activemq/core/server/impl/{HornetQServerImpl.java => ActiveMQServerImpl.java} (90%) rename activemq-server/src/main/java/org/apache/activemq/spi/core/security/{HornetQSecurityManager.java => ActiveMQSecurityManager.java} (94%) rename activemq-server/src/main/java/org/apache/activemq/spi/core/security/{HornetQSecurityManagerImpl.java => ActiveMQSecurityManagerImpl.java} (91%) rename activemq-server/src/test/java/org/apache/activemq/tests/util/{ColocatedHornetQServer.java => ColocatedActiveMQServer.java} (71%) rename activemq-tools/src/main/java/org/apache/activemq/tools/{HornetQToolsLogger.java => ActiveMQToolsLogger.java} (82%) rename examples/jms/activemq-jms-examples-common/src/main/java/org/apache/activemq/common/example/{HornetQExample.java => ActiveMQExample.java} (91%) rename integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/{HornetQAeroGearBundle.java => ActiveMQAeroGearBundle.java} (91%) rename integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/{HornetQAeroGearLogger.java => ActiveMQAeroGearLogger.java} (91%) rename integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/{HornetQJBossBundle.java => ActiveMQJBossBundle.java} (93%) rename integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/{HornetQJBossLogger.java => ActiveMQJBossLogger.java} (88%) rename integration/activemq-spring-integration/src/main/java/org/apache/activemq/spring/{HornetQSpringBundle.java => ActiveMQSpringBundle.java} (93%) rename integration/activemq-spring-integration/src/main/java/org/apache/activemq/spring/{HornetQSpringLogger.java => ActiveMQSpringLogger.java} (93%) rename integration/activemq-twitter-integration/src/main/java/org/apache/activemq/twitter/{HornetQTwitterBundle.java => ActiveMQTwitterBundle.java} (92%) rename integration/activemq-twitter-integration/src/main/java/org/apache/activemq/twitter/{HornetQTwitterLogger.java => ActiveMQTwitterLogger.java} (87%) rename integration/activemq-vertx-integration/src/main/java/org/apache/activemq/integration/vertx/{HornetQVertxLogger.java => ActiveMQVertxLogger.java} (87%) rename tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/{HornetQMessageHandlerTest.java => ActiveMQMessageHandlerTest.java} (93%) rename tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/{HornetQCrashTest.java => ActiveMQCrashTest.java} (86%) rename tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/{SameProcessHornetQServer.java => SameProcessActiveMQServer.java} (91%) rename tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/{HornetQConnectionFactoryTest.java => ActiveMQConnectionFactoryTest.java} (67%) rename tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/{HornetQServerControlTest.java => ActiveMQServerControlTest.java} (90%) rename tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/{HornetQServerControlUsingCoreTest.java => ActiveMQServerControlUsingCoreTest.java} (94%) rename tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/{HornetQActivationTest.java => ActiveMQActivationTest.java} (84%) rename tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/{HornetQClusteredTest.java => ActiveMQClusteredTest.java} (87%) rename tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/{HornetQMessageHandlerSecurityTest.java => ActiveMQMessageHandlerSecurityTest.java} (88%) rename tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/{HornetQMessageHandlerTest.java => ActiveMQMessageHandlerTest.java} (91%) rename tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/{HornetQMessageHandlerXATest.java => ActiveMQMessageHandlerXATest.java} (93%) rename tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/{HornetQRAClusteredTestBase.java => ActiveMQRAClusteredTestBase.java} (92%) rename tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/{HornetQRATestBase.java => ActiveMQRATestBase.java} (90%) rename tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/transports/netty/{HornetQFrameDecoder2Test.java => ActiveMQFrameDecoder2Test.java} (80%) rename tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/vertx/{HornetQVertxUnitTest.java => ActiveMQVertxUnitTest.java} (98%) rename tests/integration-tests/src/test/resources/{hornetq-jms-for-JMSServerDeployerTest.xml => activemq-jms-for-JMSServerDeployerTest.xml} (100%) rename tests/integration-tests/src/test/resources/{hornetq-jms-for-JMSServerDeployerTest2.xml => activemq-jms-for-JMSServerDeployerTest2.xml} (100%) rename tests/integration-tests/src/test/resources/{spring-hornetq-config.xml => spring-activemq-config.xml} (100%) rename tests/integration-tests/src/test/resources/{spring-hornetq-jms.xml => spring-activemq-jms.xml} (100%) rename tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/{HornetQServerTestCase.java => ActiveMQServerTestCase.java} (82%) rename tests/joram-tests/src/test/java/org/apache/activemq/jms/{HornetQAdmin.java => ActiveMQQAdmin.java} (94%) rename tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/{HornetQBufferTestBase.java => ActiveMQBufferTestBase.java} (99%) rename tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/security/impl/{HornetQSecurityManagerImplTest.java => ActiveMQSecurityManagerImplTest.java} (96%) rename tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/{HornetQDestinationTest.java => ActiveMQDestinationTest.java} (74%) rename tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/{HornetQMapMessageTest.java => ActiveMQMapMessageTest.java} (81%) rename tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/{HornetQStreamMessageTest.java => ActiveMQStreamMessageTest.java} (77%) rename tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/ra/{HornetQResourceAdapterConfigTest.java => ActiveMQResourceAdapterConfigTest.java} (98%) rename tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/{HornetQBufferInputStreamTest.java => ActiveMQBufferInputStreamTest.java} (88%) diff --git a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java index 8751f77ce0..36f9d08682 100644 --- a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java +++ b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java @@ -17,18 +17,18 @@ import io.airlift.command.Command; import org.apache.activemq.cli.ActiveMQ; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.dto.BrokerDTO; import org.apache.activemq.factory.BrokerFactory; import org.apache.activemq.factory.CoreFactory; import org.apache.activemq.factory.JmsFactory; import org.apache.activemq.factory.SecurityManagerFactory; -import org.apache.activemq.integration.bootstrap.HornetQBootstrapLogger; +import org.apache.activemq.integration.bootstrap.ActiveMQBootstrapLogger; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.config.JMSConfiguration; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.jms.server.impl.StandaloneNamingServer; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; import javax.management.MBeanServer; @@ -67,11 +67,11 @@ public class Run implements Action JMSConfiguration jms = JmsFactory.create(broker.jms); - HornetQSecurityManager security = SecurityManagerFactory.create(broker.security); + ActiveMQSecurityManager security = SecurityManagerFactory.create(broker.security); MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer(); - HornetQServerImpl server = new HornetQServerImpl(core, mBeanServer, security); + ActiveMQServerImpl server = new ActiveMQServerImpl(core, mBeanServer, security); namingServer = new StandaloneNamingServer(server); @@ -85,7 +85,7 @@ public class Run implements Action namingServer.start(); - HornetQBootstrapLogger.LOGGER.startedNamingService(broker.naming.bindAddress, broker.naming.port, broker.naming.rmiBindAddress, broker.naming.rmiPort); + ActiveMQBootstrapLogger.LOGGER.startedNamingService(broker.naming.bindAddress, broker.naming.port, broker.naming.rmiBindAddress, broker.naming.rmiPort); if (jms != null) { @@ -96,7 +96,7 @@ public class Run implements Action jmsServerManager = new JMSServerManagerImpl(server); } - HornetQBootstrapLogger.LOGGER.serverStarting(); + ActiveMQBootstrapLogger.LOGGER.serverStarting(); jmsServerManager.start(); @@ -114,7 +114,7 @@ public class Run implements Action { if (!file.delete()) { - HornetQBootstrapLogger.LOGGER.errorDeletingFile(file.getAbsolutePath()); + ActiveMQBootstrapLogger.LOGGER.errorDeletingFile(file.getAbsolutePath()); } } final Timer timer = new Timer("ActiveMQ Server Shutdown Timer", true); diff --git a/activemq-bootstrap/src/main/java/org/apache/activemq/factory/SecurityManagerFactory.java b/activemq-bootstrap/src/main/java/org/apache/activemq/factory/SecurityManagerFactory.java index 1432460330..23bfcb9f04 100644 --- a/activemq-bootstrap/src/main/java/org/apache/activemq/factory/SecurityManagerFactory.java +++ b/activemq-bootstrap/src/main/java/org/apache/activemq/factory/SecurityManagerFactory.java @@ -13,7 +13,7 @@ package org.apache.activemq.factory; import org.apache.activemq.dto.SecurityDTO; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; import org.apache.activemq.utils.FactoryFinder; import javax.xml.bind.annotation.XmlRootElement; @@ -21,12 +21,12 @@ import javax.xml.bind.annotation.XmlRootElement; public class SecurityManagerFactory { - public static HornetQSecurityManager create(SecurityDTO config) throws Exception + public static ActiveMQSecurityManager create(SecurityDTO config) throws Exception { if (config != null) { FactoryFinder finder = new FactoryFinder("META-INF/services/org/apache/activemq/security/"); - HornetQSecurityManager manager = (HornetQSecurityManager)finder.newInstance(config.getClass().getAnnotation(XmlRootElement.class).name()); + ActiveMQSecurityManager manager = (ActiveMQSecurityManager)finder.newInstance(config.getClass().getAnnotation(XmlRootElement.class).name()); return manager; } else diff --git a/activemq-bootstrap/src/main/java/org/apache/activemq/integration/bootstrap/HornetQBootstrapBundle.java b/activemq-bootstrap/src/main/java/org/apache/activemq/integration/bootstrap/ActiveMQBootstrapBundle.java similarity index 92% rename from activemq-bootstrap/src/main/java/org/apache/activemq/integration/bootstrap/HornetQBootstrapBundle.java rename to activemq-bootstrap/src/main/java/org/apache/activemq/integration/bootstrap/ActiveMQBootstrapBundle.java index 8ccdfff073..55667e2beb 100644 --- a/activemq-bootstrap/src/main/java/org/apache/activemq/integration/bootstrap/HornetQBootstrapBundle.java +++ b/activemq-bootstrap/src/main/java/org/apache/activemq/integration/bootstrap/ActiveMQBootstrapBundle.java @@ -25,7 +25,7 @@ import org.jboss.logging.annotations.MessageBundle; * * so 109000 to 109999 */ -@MessageBundle(projectCode = "HQ") -public class HornetQBootstrapBundle +@MessageBundle(projectCode = "AMQ") +public class ActiveMQBootstrapBundle { } diff --git a/activemq-bootstrap/src/main/java/org/apache/activemq/integration/bootstrap/HornetQBootstrapLogger.java b/activemq-bootstrap/src/main/java/org/apache/activemq/integration/bootstrap/ActiveMQBootstrapLogger.java similarity index 91% rename from activemq-bootstrap/src/main/java/org/apache/activemq/integration/bootstrap/HornetQBootstrapLogger.java rename to activemq-bootstrap/src/main/java/org/apache/activemq/integration/bootstrap/ActiveMQBootstrapLogger.java index eb40644d17..810ffaa7ac 100644 --- a/activemq-bootstrap/src/main/java/org/apache/activemq/integration/bootstrap/HornetQBootstrapLogger.java +++ b/activemq-bootstrap/src/main/java/org/apache/activemq/integration/bootstrap/ActiveMQBootstrapLogger.java @@ -37,13 +37,13 @@ import org.jboss.logging.annotations.MessageLogger; * * so an INFO message would be 101000 to 101999 */ -@MessageLogger(projectCode = "HQ") -public interface HornetQBootstrapLogger extends BasicLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQBootstrapLogger extends BasicLogger { /** * The default logger. */ - HornetQBootstrapLogger LOGGER = Logger.getMessageLogger(HornetQBootstrapLogger.class, HornetQBootstrapLogger.class.getPackage().getName()); + ActiveMQBootstrapLogger LOGGER = Logger.getMessageLogger(ActiveMQBootstrapLogger.class, ActiveMQBootstrapLogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.INFO) @Message(id = 101000, value = "Starting ActiveMQ Server", format = Message.Format.MESSAGE_FORMAT) diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffer.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffer.java index b6065cfd29..4b9f443dee 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffer.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffer.java @@ -18,7 +18,7 @@ import java.nio.ByteBuffer; import io.netty.buffer.ByteBuf; /** - * A HornetQBuffer wraps a Netty's ChannelBuffer and is used throughout HornetQ code base. + * A ActiveMQBuffer wraps a Netty's ChannelBuffer and is used throughout ActiveMQ code base. *

* Instances of it can be obtained from {@link ActiveMQBuffers} factory. *

diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffers.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffers.java index 482e801dfe..93e798d1e6 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffers.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffers.java @@ -25,10 +25,10 @@ import org.apache.activemq.core.buffers.impl.ChannelBufferWrapper; public final class ActiveMQBuffers { /** - * Creates a self-expanding HornetQBuffer with the given initial size + * Creates a self-expanding ActiveMQBuffer with the given initial size * - * @param size the initial size of the created HornetQBuffer - * @return a self-expanding HornetQBuffer starting with the given size + * @param size the initial size of the created ActiveMQBuffer + * @return a self-expanding ActiveMQBuffer starting with the given size */ public static ActiveMQBuffer dynamicBuffer(final int size) { @@ -36,10 +36,10 @@ public final class ActiveMQBuffers } /** - * Creates a self-expanding HornetQBuffer filled with the given byte array + * Creates a self-expanding ActiveMQBuffer filled with the given byte array * * @param bytes the created buffer will be initially filled with this byte array - * @return a self-expanding HornetQBuffer filled with the given byte array + * @return a self-expanding ActiveMQBuffer filled with the given byte array */ public static ActiveMQBuffer dynamicBuffer(final byte[] bytes) { @@ -51,12 +51,12 @@ public final class ActiveMQBuffers } /** - * Creates a HornetQBuffer wrapping an underlying NIO ByteBuffer + * Creates a ActiveMQBuffer wrapping an underlying NIO ByteBuffer * * The position on this buffer won't affect the position on the inner buffer * * @param underlying the underlying NIO ByteBuffer - * @return a HornetQBuffer wrapping the underlying NIO ByteBuffer + * @return a ActiveMQBuffer wrapping the underlying NIO ByteBuffer */ public static ActiveMQBuffer wrappedBuffer(final ByteBuffer underlying) { @@ -68,10 +68,10 @@ public final class ActiveMQBuffers } /** - * Creates a HornetQBuffer wrapping an underlying byte array + * Creates a ActiveMQBuffer wrapping an underlying byte array * * @param underlying the underlying byte array - * @return a HornetQBuffer wrapping the underlying byte array + * @return a ActiveMQBuffer wrapping the underlying byte array */ public static ActiveMQBuffer wrappedBuffer(final byte[] underlying) { @@ -79,10 +79,10 @@ public final class ActiveMQBuffers } /** - * Creates a fixed HornetQBuffer of the given size + * Creates a fixed ActiveMQBuffer of the given size * - * @param size the size of the created HornetQBuffer - * @return a fixed HornetQBuffer with the given size + * @param size the size of the created ActiveMQBuffer + * @return a fixed ActiveMQBuffer with the given size */ public static ActiveMQBuffer fixedBuffer(final int size) { diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQConnectionTimedOutException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQConnectionTimedOutException.java index 88c39c3763..fb691b0ebc 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQConnectionTimedOutException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQConnectionTimedOutException.java @@ -16,7 +16,7 @@ package org.apache.activemq.api.core; import static org.apache.activemq.api.core.ActiveMQExceptionType.CONNECTION_TIMEDOUT; /** - * A client timed out will connecting to HornetQ server. + * A client timed out will connecting to ActiveMQ server. * @author Andy Taylor 4/30/12 */ public final class ActiveMQConnectionTimedOutException extends ActiveMQException diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQDisconnectedException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQDisconnectedException.java index 038472ce7b..44aa176bb9 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQDisconnectedException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQDisconnectedException.java @@ -16,7 +16,7 @@ package org.apache.activemq.api.core; import static org.apache.activemq.api.core.ActiveMQExceptionType.DISCONNECTED; /** - * A client was disconnected from HornetQ server when the server has shut down. + * A client was disconnected from ActiveMQ server when the server has shut down. * @author Andy Taylor 4/30/12 */ public final class ActiveMQDisconnectedException extends ActiveMQException diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQIllegalStateException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQIllegalStateException.java index 2dd437f8c8..123b672666 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQIllegalStateException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQIllegalStateException.java @@ -16,7 +16,7 @@ package org.apache.activemq.api.core; import static org.apache.activemq.api.core.ActiveMQExceptionType.ILLEGAL_STATE; /** - * A HornetQ resource is not in a legal state (e.g. calling ClientConsumer.receive() if a + * A ActiveMQ resource is not in a legal state (e.g. calling ClientConsumer.receive() if a * MessageHandler is set). * @author Andy Taylor 5/2/12 */ diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInternalErrorException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInternalErrorException.java index 691b2881a1..f33478003d 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInternalErrorException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInternalErrorException.java @@ -16,7 +16,7 @@ package org.apache.activemq.api.core; import static org.apache.activemq.api.core.ActiveMQExceptionType.INTERNAL_ERROR; /** - * Internal error which prevented HornetQ from performing an important operation. + * Internal error which prevented ActiveMQ from performing an important operation. * @author Andy Taylor 4/30/12 */ public final class ActiveMQInternalErrorException extends ActiveMQException diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNativeIOError.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNativeIOError.java index c1697df35a..0848626096 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNativeIOError.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNativeIOError.java @@ -15,7 +15,7 @@ package org.apache.activemq.api.core; /** - * An error has happened at HornetQ's native (non-Java) code used in reading and writing data. + * An error has happened at ActiveMQ's native (non-Java) code used in reading and writing data. * @author Andy Taylor 5/4/12 */ // XXX diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNotConnectedException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNotConnectedException.java index 0b6e99c6c0..5fd1d3a1b6 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNotConnectedException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNotConnectedException.java @@ -16,7 +16,7 @@ package org.apache.activemq.api.core; import static org.apache.activemq.api.core.ActiveMQExceptionType.NOT_CONNECTED; /** - * A client is not able to connect to HornetQ server. + * A client is not able to connect to ActiveMQ server. * @author Andy Taylor 4/30/12 */ public final class ActiveMQNotConnectedException extends ActiveMQException diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQUnsupportedPacketException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQUnsupportedPacketException.java index 0403bbe40b..2bb5bfd83a 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQUnsupportedPacketException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQUnsupportedPacketException.java @@ -16,7 +16,7 @@ package org.apache.activemq.api.core; import static org.apache.activemq.api.core.ActiveMQExceptionType.UNSUPPORTED_PACKET; /** - * A packet of unsupported type was received by HornetQ PacketHandler. + * A packet of unsupported type was received by ActiveMQ PacketHandler. * @author Andy Taylor 4/30/12 */ public final class ActiveMQUnsupportedPacketException extends ActiveMQException diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/SimpleString.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/SimpleString.java index e1740e8e7e..e0d3087c8b 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/SimpleString.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/SimpleString.java @@ -23,7 +23,7 @@ import org.apache.activemq.utils.DataConstants; * A simple String class that can store all characters, and stores as simple {@code byte[]}, this * minimises expensive copying between String objects. *

- * This object is used heavily throughout HornetQ for performance reasons. + * This object is used heavily throughout ActiveMQ for performance reasons. * * @author Tim Fox */ diff --git a/activemq-commons/src/main/java/org/apache/activemq/core/server/HornetQComponent.java b/activemq-commons/src/main/java/org/apache/activemq/core/server/ActiveMQComponent.java similarity index 93% rename from activemq-commons/src/main/java/org/apache/activemq/core/server/HornetQComponent.java rename to activemq-commons/src/main/java/org/apache/activemq/core/server/ActiveMQComponent.java index 5633bb659a..f2dd86fada 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/core/server/HornetQComponent.java +++ b/activemq-commons/src/main/java/org/apache/activemq/core/server/ActiveMQComponent.java @@ -14,14 +14,14 @@ package org.apache.activemq.core.server; /** - * A HornetQComponent + * A ActiveMQComponent * * @author Tim Fox * @version $Revision: 2796 $ * * */ -public interface HornetQComponent +public interface ActiveMQComponent { void start() throws Exception; diff --git a/activemq-commons/src/main/java/org/apache/activemq/utils/HornetQThreadFactory.java b/activemq-commons/src/main/java/org/apache/activemq/utils/ActiveMQThreadFactory.java similarity index 90% rename from activemq-commons/src/main/java/org/apache/activemq/utils/HornetQThreadFactory.java rename to activemq-commons/src/main/java/org/apache/activemq/utils/ActiveMQThreadFactory.java index f9a42dfc69..36e4c6439a 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/utils/HornetQThreadFactory.java +++ b/activemq-commons/src/main/java/org/apache/activemq/utils/ActiveMQThreadFactory.java @@ -19,12 +19,12 @@ import java.util.concurrent.atomic.AtomicInteger; /** * - * A HornetQThreadFactory + * A ActiveMQThreadFactory * * @author Tim Fox * */ -public final class HornetQThreadFactory implements ThreadFactory +public final class ActiveMQThreadFactory implements ThreadFactory { private final ThreadGroup group; @@ -36,7 +36,7 @@ public final class HornetQThreadFactory implements ThreadFactory private final ClassLoader tccl; - public HornetQThreadFactory(final String groupName, final boolean daemon, final ClassLoader tccl) + public ActiveMQThreadFactory(final String groupName, final boolean daemon, final ClassLoader tccl) { group = new ThreadGroup(groupName + "-" + System.identityHashCode(this)); diff --git a/activemq-commons/src/main/java/org/apache/activemq/utils/HornetQUtilBundle.java b/activemq-commons/src/main/java/org/apache/activemq/utils/ActiveMQUtilBundle.java similarity index 92% rename from activemq-commons/src/main/java/org/apache/activemq/utils/HornetQUtilBundle.java rename to activemq-commons/src/main/java/org/apache/activemq/utils/ActiveMQUtilBundle.java index 6fdd103b50..45fd45e313 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/utils/HornetQUtilBundle.java +++ b/activemq-commons/src/main/java/org/apache/activemq/utils/ActiveMQUtilBundle.java @@ -29,10 +29,10 @@ import org.jboss.logging.Messages; * * so 209000 to 209999 */ -@MessageBundle(projectCode = "HQ") -public interface HornetQUtilBundle +@MessageBundle(projectCode = "AMQ") +public interface ActiveMQUtilBundle { - HornetQUtilBundle BUNDLE = Messages.getBundle(HornetQUtilBundle.class); + ActiveMQUtilBundle BUNDLE = Messages.getBundle(ActiveMQUtilBundle.class); @Message(id = 209000, value = "invalid property: {0}" , format = Message.Format.MESSAGE_FORMAT) ActiveMQIllegalStateException invalidProperty(String part); diff --git a/activemq-commons/src/main/java/org/apache/activemq/utils/HornetQUtilLogger.java b/activemq-commons/src/main/java/org/apache/activemq/utils/ActiveMQUtilLogger.java similarity index 87% rename from activemq-commons/src/main/java/org/apache/activemq/utils/HornetQUtilLogger.java rename to activemq-commons/src/main/java/org/apache/activemq/utils/ActiveMQUtilLogger.java index 8d711a6991..bb6bb68aab 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/utils/HornetQUtilLogger.java +++ b/activemq-commons/src/main/java/org/apache/activemq/utils/ActiveMQUtilLogger.java @@ -35,13 +35,13 @@ import org.jboss.logging.annotations.MessageLogger; * * so an INFO message would be 201000 to 201999 */ -@MessageLogger(projectCode = "HQ") -public interface HornetQUtilLogger extends BasicLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQUtilLogger extends BasicLogger { /** * The default logger. */ - HornetQUtilLogger LOGGER = Logger.getMessageLogger(HornetQUtilLogger.class, HornetQUtilLogger.class.getPackage().getName()); + ActiveMQUtilLogger LOGGER = Logger.getMessageLogger(ActiveMQUtilLogger.class, ActiveMQUtilLogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.WARN) @Message(id = 202000, value = "Missing privileges to set Thread Context Class Loader on Thread Factory. Using current Thread Context Class Loader", diff --git a/activemq-commons/src/main/java/org/apache/activemq/utils/ClassloadingUtil.java b/activemq-commons/src/main/java/org/apache/activemq/utils/ClassloadingUtil.java index dffb37fa82..bf0442b1c1 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/utils/ClassloadingUtil.java +++ b/activemq-commons/src/main/java/org/apache/activemq/utils/ClassloadingUtil.java @@ -16,7 +16,7 @@ import java.net.URL; /** * This class will be used to perform generic class-loader operations, - * such as load a class first using TCCL, and then the classLoader used by HornetQ (ClassloadingUtil.getClass().getClassLoader()). + * such as load a class first using TCCL, and then the classLoader used by ActiveMQ (ClassloadingUtil.getClass().getClassLoader()). *

* Is't required to use a Security Block on any calls to this class. * diff --git a/activemq-commons/src/main/java/org/apache/activemq/utils/PasswordMaskingUtil.java b/activemq-commons/src/main/java/org/apache/activemq/utils/PasswordMaskingUtil.java index 472d216178..8dade13cca 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/utils/PasswordMaskingUtil.java +++ b/activemq-commons/src/main/java/org/apache/activemq/utils/PasswordMaskingUtil.java @@ -63,7 +63,7 @@ public class PasswordMaskingUtil } catch (Exception e) { - throw HornetQUtilBundle.BUNDLE.errorCreatingCodec(e, codecClassName); + throw ActiveMQUtilBundle.BUNDLE.errorCreatingCodec(e, codecClassName); } } }); @@ -76,7 +76,7 @@ public class PasswordMaskingUtil { String[] keyVal = parts[i].split("="); if (keyVal.length != 2) - throw HornetQUtilBundle.BUNDLE.invalidProperty(parts[i]); + throw ActiveMQUtilBundle.BUNDLE.invalidProperty(parts[i]); props.put(keyVal[0], keyVal[1]); } codecInstance.init(props); diff --git a/activemq-commons/src/main/java/org/apache/activemq/utils/ReusableLatch.java b/activemq-commons/src/main/java/org/apache/activemq/utils/ReusableLatch.java index b1b4b12f39..04d5dc2fb0 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/utils/ReusableLatch.java +++ b/activemq-commons/src/main/java/org/apache/activemq/utils/ReusableLatch.java @@ -24,7 +24,7 @@ import java.util.concurrent.locks.AbstractQueuedSynchronizer; * *

It could be used for sync points when one process is feeding the latch while another will wait when everything is done. (e.g. waiting IO completions to finish)

* - *

On HornetQ we have the requirement of increment and decrement a counter until the user fires a ready event (commit). At that point we just act as a regular countDown.

+ *

On ActiveMQ we have the requirement of increment and decrement a counter until the user fires a ready event (commit). At that point we just act as a regular countDown.

* *

Note: This latch is reusable. Once it reaches zero, you can call up again, and reuse it on further waits.

* diff --git a/activemq-commons/src/main/java/org/apache/activemq/utils/TypedProperties.java b/activemq-commons/src/main/java/org/apache/activemq/utils/TypedProperties.java index 8760f5fe77..c080413fa2 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/utils/TypedProperties.java +++ b/activemq-commons/src/main/java/org/apache/activemq/utils/TypedProperties.java @@ -547,7 +547,7 @@ public final class TypedProperties } default: { - throw HornetQUtilBundle.BUNDLE.invalidType(type); + throw ActiveMQUtilBundle.BUNDLE.invalidType(type); } } } diff --git a/activemq-commons/src/main/java/org/apache/activemq/utils/UTF8Util.java b/activemq-commons/src/main/java/org/apache/activemq/utils/UTF8Util.java index a11b0c2064..3f3256845e 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/utils/UTF8Util.java +++ b/activemq-commons/src/main/java/org/apache/activemq/utils/UTF8Util.java @@ -35,7 +35,7 @@ public final class UTF8Util // utility class } - private static final boolean isTrace = HornetQUtilLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQUtilLogger.LOGGER.isTraceEnabled(); private static final ThreadLocal> currenBuffer = new ThreadLocal>(); @@ -46,14 +46,14 @@ public final class UTF8Util if (str.length() > 0xffff) { - throw HornetQUtilBundle.BUNDLE.stringTooLong(str.length()); + throw ActiveMQUtilBundle.BUNDLE.stringTooLong(str.length()); } final int len = UTF8Util.calculateUTFSize(str, buffer); if (len > 0xffff) { - throw HornetQUtilBundle.BUNDLE.stringTooLong(len); + throw ActiveMQUtilBundle.BUNDLE.stringTooLong(len); } out.writeShort((short)len); @@ -76,7 +76,7 @@ public final class UTF8Util if (UTF8Util.isTrace) { // This message is too verbose for debug, that's why we are using trace here - HornetQUtilLogger.LOGGER.trace("Saving string with utfSize=" + len + " stringSize=" + str.length()); + ActiveMQUtilLogger.LOGGER.trace("Saving string with utfSize=" + len + " stringSize=" + str.length()); } int stringLength = str.length(); @@ -125,7 +125,7 @@ public final class UTF8Util if (UTF8Util.isTrace) { // This message is too verbose for debug, that's why we are using trace here - HornetQUtilLogger.LOGGER.trace("Reading string with utfSize=" + size); + ActiveMQUtilLogger.LOGGER.trace("Reading string with utfSize=" + size); } int count = 0; diff --git a/activemq-commons/src/main/java/org/apache/activemq/utils/UUIDGenerator.java b/activemq-commons/src/main/java/org/apache/activemq/utils/UUIDGenerator.java index 693b821767..0bfc2187b4 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/utils/UUIDGenerator.java +++ b/activemq-commons/src/main/java/org/apache/activemq/utils/UUIDGenerator.java @@ -124,9 +124,9 @@ public final class UUIDGenerator */ dummy[0] |= (byte) 0x01; - if (HornetQUtilLogger.LOGGER.isDebugEnabled()) + if (ActiveMQUtilLogger.LOGGER.isDebugEnabled()) { - HornetQUtilLogger.LOGGER.debug("using dummy address " + UUIDGenerator.asString(dummy)); + ActiveMQUtilLogger.LOGGER.debug("using dummy address " + UUIDGenerator.asString(dummy)); } return dummy; } @@ -173,9 +173,9 @@ public final class UUIDGenerator isVirtualMethod); if (address != null) { - if (HornetQUtilLogger.LOGGER.isDebugEnabled()) + if (ActiveMQUtilLogger.LOGGER.isDebugEnabled()) { - HornetQUtilLogger.LOGGER.debug("using hardware address " + UUIDGenerator.asString(address)); + ActiveMQUtilLogger.LOGGER.debug("using hardware address " + UUIDGenerator.asString(address)); } return address; } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/DiscoveryGroupConfiguration.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/DiscoveryGroupConfiguration.java index 053760c91b..02361ea048 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/DiscoveryGroupConfiguration.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/DiscoveryGroupConfiguration.java @@ -17,7 +17,7 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.utils.UUIDGenerator; /** @@ -39,9 +39,9 @@ public final class DiscoveryGroupConfiguration implements Serializable private String name = UUIDGenerator.getInstance().generateStringUUID(); - private long refreshTimeout = HornetQClient.DEFAULT_DISCOVERY_REFRESH_TIMEOUT; + private long refreshTimeout = ActiveMQClient.DEFAULT_DISCOVERY_REFRESH_TIMEOUT; - private long discoveryInitialWaitTimeout = HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT; + private long discoveryInitialWaitTimeout = ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT; /* * The localBindAddress is needed so we can be backward compatible with 2.2 clients diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/FilterConstants.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/FilterConstants.java index 3571e10117..3cd2cb8420 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/FilterConstants.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/FilterConstants.java @@ -13,26 +13,26 @@ package org.apache.activemq.api.core; /** - * Constants representing pre-defined message attributes that can be referenced in HornetQ core + * Constants representing pre-defined message attributes that can be referenced in ActiveMQ core * filter expressions. * @author Tim Fox */ public final class FilterConstants { /** - * Name of the HornetQ UserID header. + * Name of the ActiveMQ UserID header. */ - public static final SimpleString HORNETQ_USERID = new SimpleString("HQUserID"); + public static final SimpleString ACTIVEMQ_USERID = new SimpleString("HQUserID"); /** - * Name of the HornetQ Message expiration header. + * Name of the ActiveMQ Message expiration header. */ - public static final SimpleString HORNETQ_EXPIRATION = new SimpleString("HQExpiration"); + public static final SimpleString ACTIVEMQ_EXPIRATION = new SimpleString("HQExpiration"); /** - * Name of the HornetQ Message durable header. + * Name of the ActiveMQ Message durable header. */ - public static final SimpleString HORNETQ_DURABLE = new SimpleString("HQDurable"); + public static final SimpleString ACTIVEMQ_DURABLE = new SimpleString("HQDurable"); /** * Value for the Durable header when the message is non-durable. @@ -45,24 +45,24 @@ public final class FilterConstants public static final SimpleString DURABLE = new SimpleString("DURABLE"); /** - * Name of the HornetQ Message timestamp header. + * Name of the ActiveMQ Message timestamp header. */ - public static final SimpleString HORNETQ_TIMESTAMP = new SimpleString("HQTimestamp"); + public static final SimpleString ACTIVEMQ_TIMESTAMP = new SimpleString("HQTimestamp"); /** - * Name of the HornetQ Message priority header. + * Name of the ActiveMQ Message priority header. */ - public static final SimpleString HORNETQ_PRIORITY = new SimpleString("HQPriority"); + public static final SimpleString ACTIVEMQ_PRIORITY = new SimpleString("HQPriority"); /** - * Name of the HornetQ Message size header. + * Name of the ActiveMQ Message size header. */ - public static final SimpleString HORNETQ_SIZE = new SimpleString("HQSize"); + public static final SimpleString ACTIVEMQ_SIZE = new SimpleString("HQSize"); /** - * All HornetQ headers are prepended by this prefix. + * All ActiveMQ headers are prepended by this prefix. */ - public static final SimpleString HORNETQ_PREFIX = new SimpleString("HQ"); + public static final SimpleString ACTIVEMQ_PREFIX = new SimpleString("HQ"); private FilterConstants() { diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/Interceptor.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/Interceptor.java index ca7a72e697..e6d062753d 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/Interceptor.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/Interceptor.java @@ -16,10 +16,10 @@ import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.spi.core.protocol.RemotingConnection; /** - * This is class is a simple way to intercepting calls on HornetQ client and servers. + * This is class is a simple way to intercepting calls on ActiveMQ client and servers. *

- * To add an interceptor to HornetQ server, you have to modify the server configuration file - * {@literal hornetq-configuration.xml}.
+ * To add an interceptor to ActiveMQ server, you have to modify the server configuration file + * {@literal activemq-configuration.xml}.
* To add it to a client, use {@link org.apache.activemq.api.core.client.ServerLocator#addIncomingInterceptor(Interceptor)} * * @author clebert.suconic@jboss.com diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/JGroupsBroadcastGroupConfiguration.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/JGroupsBroadcastGroupConfiguration.java index 19cd7cf6a5..5a6a7092d7 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/JGroupsBroadcastGroupConfiguration.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/JGroupsBroadcastGroupConfiguration.java @@ -31,11 +31,11 @@ import org.jgroups.conf.PlainConfigurator; * There are two ways to constructing a JGroups channel (JChannel): *

    *
  1. by passing in a JGroups configuration file
    - * The file must exists in the hornetq classpath. HornetQ creates a JChannel with the + * The file must exists in the activemq classpath. ActiveMQ creates a JChannel with the * configuration file and use it for broadcasting and discovery. In standalone server - * mode HornetQ uses this way for constructing JChannels.
  2. + * mode ActiveMQ uses this way for constructing JChannels. *
  3. by passing in a JChannel instance
    - * This is useful when HornetQ needs to get a JChannel from a running JGroups service as in the + * This is useful when ActiveMQ needs to get a JChannel from a running JGroups service as in the * case of AS7 integration.
  4. *
*

@@ -118,7 +118,7 @@ public final class JGroupsBroadcastGroupConfiguration implements BroadcastEndpoi } /** - * This class is the implementation of HornetQ members discovery that will use JGroups. + * This class is the implementation of ActiveMQ members discovery that will use JGroups. * * @author Howard Gao */ diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/Message.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/Message.java index cfabd21071..7c83187eb7 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/Message.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/Message.java @@ -158,7 +158,7 @@ public interface Message * Returns the message timestamp. *
* The timestamp corresponds to the time this message - * was handled by a HornetQ server. + * was handled by a ActiveMQ server. */ long getTimestamp(); @@ -196,22 +196,22 @@ public interface Message boolean isLargeMessage(); /** - * Returns the message body as a HornetQBuffer + * Returns the message body as a ActiveMQBuffer */ ActiveMQBuffer getBodyBuffer(); /** - * Writes the input byte array to the message body HornetQBuffer + * Writes the input byte array to the message body ActiveMQBuffer */ Message writeBodyBufferBytes(byte[] bytes); /** - * Writes the input String to the message body HornetQBuffer + * Writes the input String to the message body ActiveMQBuffer */ Message writeBodyBufferString(String string); /** - * Returns a copy of the message body as a HornetQBuffer. Any modification + * Returns a copy of the message body as a ActiveMQBuffer. Any modification * of this buffer should not impact the underlying buffer. */ ActiveMQBuffer getBodyBufferCopy(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/TransportConfiguration.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/TransportConfiguration.java index 812e2d06e1..0fc578e377 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/TransportConfiguration.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/TransportConfiguration.java @@ -16,7 +16,7 @@ import java.io.Serializable; import java.util.HashMap; import java.util.Map; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.core.remoting.impl.TransportConfigurationUtil; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; import org.apache.activemq.utils.UUIDGenerator; @@ -290,7 +290,7 @@ public class TransportConfiguration implements Serializable /** * Encodes this TransportConfiguration into a buffer. *

- * Note that this is only used internally HornetQ. + * Note that this is only used internally ActiveMQ. * * @param buffer the buffer to encode into */ @@ -331,7 +331,7 @@ public class TransportConfiguration implements Serializable } else { - throw HornetQClientMessageBundle.BUNDLE.invalidEncodeType(val); + throw ActiveMQClientMessageBundle.BUNDLE.invalidEncodeType(val); } } } @@ -340,7 +340,7 @@ public class TransportConfiguration implements Serializable /** * Decodes this TransportConfiguration from a buffer. *

- * Note this is only used internally by HornetQ + * Note this is only used internally by ActiveMQ * * @param buffer the buffer to decode from */ @@ -399,7 +399,7 @@ public class TransportConfiguration implements Serializable } default: { - throw HornetQClientMessageBundle.BUNDLE.invalidType(type); + throw ActiveMQClientMessageBundle.BUNDLE.invalidType(type); } } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/UDPBroadcastGroupConfiguration.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/UDPBroadcastGroupConfiguration.java index 6c16ab6d1a..1b00b2c436 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/UDPBroadcastGroupConfiguration.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/UDPBroadcastGroupConfiguration.java @@ -22,7 +22,7 @@ import java.net.InetSocketAddress; import java.net.MulticastSocket; import java.util.concurrent.TimeUnit; -import org.apache.activemq.core.client.HornetQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientLogger; /** @@ -189,7 +189,7 @@ public final class UDPBroadcastGroupConfiguration implements BroadcastEndpointFa { if (open) { - HornetQClientLogger.LOGGER.warn(this + " getting exception when receiving broadcasting.", e); + ActiveMQClientLogger.LOGGER.warn(this + " getting exception when receiving broadcasting.", e); } } break; @@ -214,7 +214,7 @@ public final class UDPBroadcastGroupConfiguration implements BroadcastEndpointFa { if (localAddress != null) { - HornetQClientLogger.LOGGER.broadcastGroupBindError(); + ActiveMQClientLogger.LOGGER.broadcastGroupBindError(); } broadcastingSocket = new DatagramSocket(); } @@ -233,7 +233,7 @@ public final class UDPBroadcastGroupConfiguration implements BroadcastEndpointFa } catch (IOException e) { - HornetQClientLogger.LOGGER.ioDiscoveryError(groupAddress.getHostAddress(), groupAddress instanceof Inet4Address ? "IPv4" : "IPv6"); + ActiveMQClientLogger.LOGGER.ioDiscoveryError(groupAddress.getHostAddress(), groupAddress instanceof Inet4Address ? "IPv4" : "IPv6"); receivingSocket = new MulticastSocket(groupPort); } 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/ActiveMQClient.java similarity index 98% rename from activemq-core-client/src/main/java/org/apache/activemq/api/core/client/HornetQClient.java rename to activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ActiveMQClient.java index 1eef77f68c..14a2bcba37 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/ActiveMQClient.java @@ -19,14 +19,14 @@ import org.apache.activemq.api.core.client.loadbalance.RoundRobinConnectionLoadB import org.apache.activemq.core.client.impl.ServerLocatorImpl; /** - * Utility class for creating HornetQ {@link ClientSessionFactory} objects. + * Utility class for creating ActiveMQ {@link ClientSessionFactory} objects. *

* Once a {@link ClientSessionFactory} has been created, it can be further configured using its * setter methods before creating the sessions. Once a session is created, the factory can no longer * be modified (its setter methods will throw a {@link IllegalStateException}. * @author Andy Taylor */ -public final class HornetQClient +public final class ActiveMQClient { public static final String DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME = RoundRobinConnectionLoadBalancingPolicy.class.getCanonicalName(); @@ -202,7 +202,7 @@ public final class HornetQClient } - private HornetQClient() + private ActiveMQClient() { // Utility class } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientConsumer.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientConsumer.java index e652579550..f3cf5495ae 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientConsumer.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientConsumer.java @@ -16,7 +16,7 @@ import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.spi.core.remoting.ConsumerContext; /** - * A ClientConsumer receives messages from HornetQ queues. + * A ClientConsumer receives messages from ActiveMQ queues. *
* Messages can be consumed synchronously by using the receive() methods * which will block until a message is received (or a timeout expires) or asynchronously @@ -36,7 +36,7 @@ public interface ClientConsumer extends AutoCloseable /** * The server's ID associated with this consumer. - * HornetQ implements this as a long but this could be protocol dependent. + * ActiveMQ implements this as a long but this could be protocol dependent. * @return */ ConsumerContext getConsumerContext(); @@ -65,7 +65,7 @@ public interface ClientConsumer extends AutoCloseable ClientMessage receive(long timeout) throws ActiveMQException; /** - * Receives a message from a queue. This call will force a network trip to HornetQ server to + * Receives a message from a queue. This call will force a network trip to ActiveMQ server to * ensure that there are no messages in the queue which can be delivered to this consumer. *

* This call will never wait indefinitely for a message, it will return {@code null} if no diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientMessage.java index bdfabd61d6..90bfa6d9e6 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientMessage.java @@ -21,7 +21,7 @@ import org.apache.activemq.api.core.SimpleString; /** * - * A ClientMessage represents a message sent and/or received by HornetQ. + * A ClientMessage represents a message sent and/or received by ActiveMQ. * * @author Tim Fox * @author Clebert Suconic @@ -37,7 +37,7 @@ public interface ClientMessage extends Message /** * Sets the delivery count for this message. *

- * This method is not meant to be called by HornetQ clients. + * This method is not meant to be called by ActiveMQ clients. * @param deliveryCount message delivery count * @return this ClientMessage */ diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientSessionFactory.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientSessionFactory.java index f15061f3f1..5983b7af4e 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientSessionFactory.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientSessionFactory.java @@ -18,7 +18,7 @@ import org.apache.activemq.spi.core.protocol.RemotingConnection; /** - * A ClientSessionFactory is the entry point to create and configure HornetQ resources to produce and consume messages. + * A ClientSessionFactory is the entry point to create and configure ActiveMQ resources to produce and consume messages. *
* It is possible to configure a factory using the setter methods only if no session has been created. * Once a session is created, the configuration is fixed and any call to a setter method will throw a IllegalStateException. diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ServerLocator.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ServerLocator.java index e4a41fc215..6c93367093 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ServerLocator.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ServerLocator.java @@ -102,7 +102,7 @@ public interface ServerLocator extends AutoCloseable * Returns the period used to check if a client has failed to receive pings from the server. *

* Period is in milliseconds, default value is - * {@link HornetQClient#DEFAULT_CLIENT_FAILURE_CHECK_PERIOD}. + * {@link ActiveMQClient#DEFAULT_CLIENT_FAILURE_CHECK_PERIOD}. * * @return the period used to check if a client has failed to receive pings from the server */ @@ -125,7 +125,7 @@ public interface ServerLocator extends AutoCloseable *

* There is 1 temporary file created for each large message. *

- * Default value is {@link HornetQClient#DEFAULT_CACHE_LARGE_MESSAGE_CLIENT}. + * Default value is {@link ActiveMQClient#DEFAULT_CACHE_LARGE_MESSAGE_CLIENT}. * * @return true if consumers created through this factory will cache large messages * in temporary files, false else @@ -145,7 +145,7 @@ public interface ServerLocator extends AutoCloseable *

* This TTL determines how long the server will keep a connection alive in the absence of any * data arriving from the client. Value is in milliseconds, default value is - * {@link HornetQClient#DEFAULT_CONNECTION_TTL}. + * {@link ActiveMQClient#DEFAULT_CONNECTION_TTL}. * * @return the connection time-to-live in milliseconds */ @@ -166,7 +166,7 @@ public interface ServerLocator extends AutoCloseable *

* If client's blocking calls to the server take more than this timeout, the call will throw a * {@link org.apache.activemq.api.core.ActiveMQException} with the code {@link org.apache.activemq.api.core.ActiveMQExceptionType#CONNECTION_TIMEDOUT}. Value - * is in milliseconds, default value is {@link HornetQClient#DEFAULT_CALL_TIMEOUT}. + * is in milliseconds, default value is {@link ActiveMQClient#DEFAULT_CALL_TIMEOUT}. * * @return the blocking calls timeout */ @@ -210,7 +210,7 @@ public interface ServerLocator extends AutoCloseable * Returns the large message size threshold. *

* Messages whose size is if greater than this value will be handled as large messages. - * Value is in bytes, default value is {@link HornetQClient#DEFAULT_MIN_LARGE_MESSAGE_SIZE}. + * Value is in bytes, default value is {@link ActiveMQClient#DEFAULT_MIN_LARGE_MESSAGE_SIZE}. * * @return the message size threshold to treat messages as large messages. */ @@ -229,7 +229,7 @@ public interface ServerLocator extends AutoCloseable /** * Returns the window size for flow control of the consumers created through this factory. *

- * Value is in bytes, default value is {@link HornetQClient#DEFAULT_CONSUMER_WINDOW_SIZE}. + * Value is in bytes, default value is {@link ActiveMQClient#DEFAULT_CONSUMER_WINDOW_SIZE}. * * @return the window size used for consumer flow control */ @@ -252,7 +252,7 @@ public interface ServerLocator extends AutoCloseable * This value controls the rate at which a consumer can consume messages. A consumer will never consume messages at a rate faster than the rate specified. *

* Value is -1 (to disable) or a positive integer corresponding to the maximum desired message consumption rate specified in units of messages per second. - * Default value is {@link HornetQClient#DEFAULT_CONSUMER_MAX_RATE}. + * Default value is {@link ActiveMQClient#DEFAULT_CONSUMER_MAX_RATE}. * * @return the consumer max rate */ @@ -272,7 +272,7 @@ public interface ServerLocator extends AutoCloseable * Returns the size for the confirmation window of clients using this factory. *

* Value is in bytes or -1 (to disable the window). Default value is - * {@link HornetQClient#DEFAULT_CONFIRMATION_WINDOW_SIZE}. + * {@link ActiveMQClient#DEFAULT_CONFIRMATION_WINDOW_SIZE}. * * @return the size for the confirmation window of clients using this factory */ @@ -292,7 +292,7 @@ public interface ServerLocator extends AutoCloseable * Returns the window size for flow control of the producers created through this factory. *

* Value must be -1 (to disable flow control) or greater than 0 to determine the maximum amount of bytes at any give time (to prevent overloading the connection). - * Default value is {@link HornetQClient#DEFAULT_PRODUCER_WINDOW_SIZE}. + * Default value is {@link ActiveMQClient#DEFAULT_PRODUCER_WINDOW_SIZE}. * * @return the window size for flow control of the producers created through this factory. */ @@ -314,7 +314,7 @@ public interface ServerLocator extends AutoCloseable * This value controls the rate at which a producer can produce messages. A producer will never produce messages at a rate faster than the rate specified. *

* Value is -1 (to disable) or a positive integer corresponding to the maximum desired message production rate specified in units of messages per second. - * Default value is {@link HornetQClient#DEFAULT_PRODUCER_MAX_RATE}. + * Default value is {@link ActiveMQClient#DEFAULT_PRODUCER_MAX_RATE}. * * @return maximum rate of message production (in messages per seconds) */ @@ -334,7 +334,7 @@ public interface ServerLocator extends AutoCloseable * Returns whether consumers created through this factory will block while * sending message acknowledgments or do it asynchronously. *

- * Default value is {@link HornetQClient#DEFAULT_BLOCK_ON_ACKNOWLEDGE}. + * Default value is {@link ActiveMQClient#DEFAULT_BLOCK_ON_ACKNOWLEDGE}. * * @return whether consumers will block while sending message * acknowledgments or do it asynchronously @@ -358,7 +358,7 @@ public interface ServerLocator extends AutoCloseable * If the session is configured to send durable message asynchronously, the client can set a SendAcknowledgementHandler on the ClientSession * to be notified once the message has been handled by the server. *

- * Default value is {@link HornetQClient#DEFAULT_BLOCK_ON_DURABLE_SEND}. + * Default value is {@link ActiveMQClient#DEFAULT_BLOCK_ON_DURABLE_SEND}. * * @return whether producers will block while sending persistent messages or do it asynchronously */ @@ -378,7 +378,7 @@ public interface ServerLocator extends AutoCloseable * If the session is configured to send non-durable message asynchronously, the client can set a SendAcknowledgementHandler on the ClientSession * to be notified once the message has been handled by the server. *

- * Default value is {@link HornetQClient#DEFAULT_BLOCK_ON_NON_DURABLE_SEND}. + * Default value is {@link ActiveMQClient#DEFAULT_BLOCK_ON_NON_DURABLE_SEND}. * * @return whether producers will block while sending non-durable messages or do it asynchronously */ @@ -398,7 +398,7 @@ public interface ServerLocator extends AutoCloseable *

* if true, a random unique group ID is created and set on each message for the property * {@link org.apache.activemq.api.core.Message#HDR_GROUP_ID}. - * Default value is {@link HornetQClient#DEFAULT_AUTO_GROUP}. + * Default value is {@link ActiveMQClient#DEFAULT_AUTO_GROUP}. * * @return whether producers will automatically assign a group ID to their messages */ @@ -433,7 +433,7 @@ public interface ServerLocator extends AutoCloseable /** * Returns whether messages will pre-acknowledged on the server before they are sent to the consumers or not. *

- * Default value is {@link HornetQClient#DEFAULT_PRE_ACKNOWLEDGE} + * Default value is {@link ActiveMQClient#DEFAULT_PRE_ACKNOWLEDGE} */ boolean isPreAcknowledge(); @@ -451,7 +451,7 @@ public interface ServerLocator extends AutoCloseable /** * Returns the acknowledgments batch size. *

- * Default value is {@link HornetQClient#DEFAULT_ACK_BATCH_SIZE}. + * Default value is {@link ActiveMQClient#DEFAULT_ACK_BATCH_SIZE}. * * @return the acknowledgments batch size */ @@ -484,7 +484,7 @@ public interface ServerLocator extends AutoCloseable * Returns whether this factory will use global thread pools (shared among all the factories in the same JVM) * or its own pools. *

- * Default value is {@link HornetQClient#DEFAULT_USE_GLOBAL_POOLS}. + * Default value is {@link ActiveMQClient#DEFAULT_USE_GLOBAL_POOLS}. * * @return true if this factory uses global thread pools, false else */ @@ -502,7 +502,7 @@ public interface ServerLocator extends AutoCloseable /** * Returns the maximum size of the scheduled thread pool. *

- * Default value is {@link HornetQClient#DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE}. + * Default value is {@link ActiveMQClient#DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE}. * * @return the maximum size of the scheduled thread pool. */ @@ -522,7 +522,7 @@ public interface ServerLocator extends AutoCloseable /** * Returns the maximum size of the thread pool. *

- * Default value is {@link HornetQClient#DEFAULT_THREAD_POOL_MAX_SIZE}. + * Default value is {@link ActiveMQClient#DEFAULT_THREAD_POOL_MAX_SIZE}. * * @return the maximum size of the thread pool. */ @@ -542,7 +542,7 @@ public interface ServerLocator extends AutoCloseable /** * Returns the time to retry connections created by this factory after failure. *

- * Value is in milliseconds, default is {@link HornetQClient#DEFAULT_RETRY_INTERVAL}. + * Value is in milliseconds, default is {@link ActiveMQClient#DEFAULT_RETRY_INTERVAL}. * * @return the time to retry connections created by this factory after failure */ @@ -561,7 +561,7 @@ public interface ServerLocator extends AutoCloseable /** * Returns the multiplier to apply to successive retry intervals. *

- * Default value is {@link HornetQClient#DEFAULT_RETRY_INTERVAL_MULTIPLIER}. + * Default value is {@link ActiveMQClient#DEFAULT_RETRY_INTERVAL_MULTIPLIER}. * * @return the multiplier to apply to successive retry intervals */ @@ -580,7 +580,7 @@ public interface ServerLocator extends AutoCloseable /** * Returns the maximum retry interval (in the case a retry interval multiplier has been specified). *

- * Value is in milliseconds, default value is {@link HornetQClient#DEFAULT_MAX_RETRY_INTERVAL}. + * Value is in milliseconds, default value is {@link ActiveMQClient#DEFAULT_MAX_RETRY_INTERVAL}. * * @return the maximum retry interval */ @@ -600,7 +600,7 @@ public interface ServerLocator extends AutoCloseable /** * Returns the maximum number of attempts to retry connection in case of failure. *

- * Default value is {@link HornetQClient#DEFAULT_RECONNECT_ATTEMPTS}. + * Default value is {@link ActiveMQClient#DEFAULT_RECONNECT_ATTEMPTS}. * * @return the maximum number of attempts to retry connection in case of failure. */ @@ -635,7 +635,7 @@ public interface ServerLocator extends AutoCloseable * Returns true if the client will automatically attempt to connect to the backup server if the initial * connection to the live server fails *

- * Default value is {@link HornetQClient#DEFAULT_FAILOVER_ON_INITIAL_CONNECTION}. + * Default value is {@link ActiveMQClient#DEFAULT_FAILOVER_ON_INITIAL_CONNECTION}. */ boolean isFailoverOnInitialConnection(); @@ -669,7 +669,7 @@ public interface ServerLocator extends AutoCloseable /** * Returns the initial size of messages created through this factory. *

- * Value is in bytes, default value is {@link HornetQClient#DEFAULT_INITIAL_MESSAGE_PACKET_SIZE}. + * Value is in bytes, default value is {@link ActiveMQClient#DEFAULT_INITIAL_MESSAGE_PACKET_SIZE}. * * @return the initial size of messages created through this factory */ @@ -690,7 +690,7 @@ public interface ServerLocator extends AutoCloseable * method is the same as invoking addIncomingInterceptor(Interceptor). * * @param interceptor an Interceptor - * @deprecated As of HornetQ 2.3.0.Final, replaced by + * @deprecated As of ActiveMQ 2.3.0.Final, replaced by * {@link #addIncomingInterceptor(Interceptor)} and * {@link #addOutgoingInterceptor(Interceptor)} */ @@ -719,7 +719,7 @@ public interface ServerLocator extends AutoCloseable * * @param interceptor interceptor to remove * @return true if the interceptor is removed from this factory, false else - * @deprecated As of HornetQ 2.3.0.Final, replaced by + * @deprecated As of ActiveMQ 2.3.0.Final, replaced by * {@link #removeIncomingInterceptor(Interceptor)} and * {@link #removeOutgoingInterceptor(Interceptor)} */ diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/loadbalance/package-info.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/loadbalance/package-info.java index d9f059eaa4..4846887746 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/loadbalance/package-info.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/loadbalance/package-info.java @@ -14,8 +14,8 @@ * Client load-balancing API. *
* This package defines the policies supported by - * HornetQ to load-balance client connections across - * HornetQ servers. + * ActiveMQ to load-balance client connections across + * ActiveMQ servers. */ package org.apache.activemq.api.core.client.loadbalance; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/package-info.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/package-info.java index d76a7790d7..9cdc0ae21c 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/package-info.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/package-info.java @@ -13,7 +13,7 @@ /** * Core Client Messaging API. *
- * This package defines the API used by HornetQ clients to produce and consume messages. + * This package defines the API used by ActiveMQ clients to produce and consume messages. */ package org.apache.activemq.api.core.client; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/AcceptorControl.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/AcceptorControl.java index 4f05cac96e..c3229243de 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/AcceptorControl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/AcceptorControl.java @@ -21,7 +21,7 @@ import java.util.Map; * * @see Acceptor */ -public interface AcceptorControl extends HornetQComponentControl +public interface AcceptorControl extends ActiveMQComponentControl { /** * Returns the name of the acceptor diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/HornetQComponentControl.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ActiveMQComponentControl.java similarity index 88% rename from activemq-core-client/src/main/java/org/apache/activemq/api/core/management/HornetQComponentControl.java rename to activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ActiveMQComponentControl.java index 6733264781..e701849620 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/HornetQComponentControl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ActiveMQComponentControl.java @@ -13,11 +13,11 @@ package org.apache.activemq.api.core.management; /** - * A HornetQComponentControl is used to manage the life cycle of a HornetQ component. + * A ActiveMQComponentControl is used to manage the life cycle of a ActiveMQ component. * * @author Jeff Mesnil */ -public interface HornetQComponentControl +public interface ActiveMQComponentControl { /** * Returns {@code true} if this component is started, {@code false} else. diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/HornetQServerControl.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ActiveMQServerControl.java similarity index 98% rename from activemq-core-client/src/main/java/org/apache/activemq/api/core/management/HornetQServerControl.java rename to activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ActiveMQServerControl.java index 8da629c9a6..cb8c22607b 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/HornetQServerControl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ActiveMQServerControl.java @@ -15,9 +15,9 @@ package org.apache.activemq.api.core.management; import javax.management.MBeanOperationInfo; /** - * A HornetQServerControl is used to manage HornetQ servers. + * A ActiveMQServerControl is used to manage ActiveMQ servers. */ -public interface HornetQServerControl +public interface ActiveMQServerControl { /** * Returns this server's version. @@ -39,7 +39,7 @@ public interface HornetQServerControl * getIncomingInterceptorClassNames(). * * @see org.apache.activemq.api.core.Interceptor - * @deprecated As of HornetQ 2.3.0.Final, replaced by + * @deprecated As of ActiveMQ 2.3.0.Final, replaced by * {@link #getIncomingInterceptorClassNames()} and * {@link #getOutgoingInterceptorClassNames()} */ @@ -492,8 +492,8 @@ public interface HornetQServerControl /** * Closes all the connections of clients connected to this server which matches the specified IP address. */ - @Operation(desc = "Closes all the consumer connections for the given HornetQ address", impact = MBeanOperationInfo.INFO) - boolean closeConsumerConnectionsForAddress(@Parameter(desc = "a HornetQ address", name = "address") String address) throws Exception; + @Operation(desc = "Closes all the consumer connections for the given ActiveMQ address", impact = MBeanOperationInfo.INFO) + boolean closeConsumerConnectionsForAddress(@Parameter(desc = "a ActiveMQ address", name = "address") String address) throws Exception; /** * Closes all the connections of sessions with a matching user name. @@ -516,7 +516,7 @@ public interface HornetQServerControl String[] listSessions(@Parameter(desc = "a connection ID", name = "connectionID") String connectionID) throws Exception; /** - * This method is used by HornetQ clustering and must not be called by HornetQ clients. + * This method is used by ActiveMQ clustering and must not be called by ActiveMQ clients. */ void sendQueueInfoToQueue(String queueName, String address) throws Exception; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/BridgeControl.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/BridgeControl.java index 938107cee0..1950837dde 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/BridgeControl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/BridgeControl.java @@ -19,7 +19,7 @@ package org.apache.activemq.api.core.management; * @author Jeff Mesnil * */ -public interface BridgeControl extends HornetQComponentControl +public interface BridgeControl extends ActiveMQComponentControl { /** * Returns the name of this bridge diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/BroadcastGroupControl.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/BroadcastGroupControl.java index 2d857bd483..0ace7d0c5d 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/BroadcastGroupControl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/BroadcastGroupControl.java @@ -18,7 +18,7 @@ package org.apache.activemq.api.core.management; * @author Jeff Mesnil * */ -public interface BroadcastGroupControl extends HornetQComponentControl +public interface BroadcastGroupControl extends ActiveMQComponentControl { /** * Returns the configuration name of this broadcast group. diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ClusterConnectionControl.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ClusterConnectionControl.java index 8942f132b0..f2fe3e2795 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ClusterConnectionControl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ClusterConnectionControl.java @@ -20,7 +20,7 @@ import java.util.Map; * @author Jeff Mesnil * */ -public interface ClusterConnectionControl extends HornetQComponentControl +public interface ClusterConnectionControl extends ActiveMQComponentControl { /** * Returns the configuration name of this cluster connection. diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ManagementHelper.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ManagementHelper.java index cad6844618..f8e0ad6074 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ManagementHelper.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/ManagementHelper.java @@ -19,12 +19,12 @@ import java.util.Map; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.utils.json.JSONArray; import org.apache.activemq.utils.json.JSONObject; /** - * Helper class to use HornetQ Core messages to manage server resources. + * Helper class to use ActiveMQ Core messages to manage server resources. * * @author Jeff Mesnil * @author Tim Fox @@ -292,12 +292,12 @@ public final class ManagementHelper param instanceof Byte == false && param instanceof Short == false) { - throw HornetQClientMessageBundle.BUNDLE.invalidManagementParam(param.getClass().getName()); + throw ActiveMQClientMessageBundle.BUNDLE.invalidManagementParam(param.getClass().getName()); } } /** - * Used by HornetQ management service. + * Used by ActiveMQ management service. */ public static Object[] retrieveOperationParameters(final Message message) throws Exception { @@ -333,7 +333,7 @@ public final class ManagementHelper } /** - * Used by HornetQ management service. + * Used by ActiveMQ management service. */ public static void storeResult(final Message message, final Object result) throws Exception { @@ -417,7 +417,7 @@ public final class ManagementHelper } /** - * Used by HornetQ management service. + * Used by ActiveMQ management service. */ public static Map fromCommaSeparatedKeyValues(final String str) throws Exception { @@ -433,7 +433,7 @@ public final class ManagementHelper } /** - * Used by HornetQ management service. + * Used by ActiveMQ management service. */ public static Object[] fromCommaSeparatedArrayOfCommaSeparatedKeyValues(final String str) throws Exception { diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/NotificationType.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/NotificationType.java index 0f94538dd4..0548a1e19b 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/NotificationType.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/NotificationType.java @@ -13,15 +13,15 @@ package org.apache.activemq.api.core.management; /** - * Types of notification emitted by HornetQ servers. + * Types of notification emitted by ActiveMQ servers. *

* These notifications can be received through: *

    *
  • JMX' MBeans subscriptions - *
  • Core messages to a notification address (default value is {@code hornetq.notifications}) + *
  • Core messages to a notification address (default value is {@code activemq.notifications}) *
  • JMS messages *
- * @see the HornetQ user manual section on "Management Notifications" + * @see the ActiveMQ user manual section on "Management Notifications" * @author Jeff Mesnil */ public interface NotificationType 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 0f53d16831..38811de51a 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 @@ -18,7 +18,7 @@ import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.core.SimpleString; /** - * Helper class to build ObjectNames for HornetQ resources. + * Helper class to build ObjectNames for ActiveMQ resources. * @author Jeff Mesnil */ public final class ObjectNameBuilder @@ -27,7 +27,7 @@ public final class ObjectNameBuilder // Constants ----------------------------------------------------- /** - * Default JMX domain for HornetQ resources. + * Default JMX domain for ActiveMQ resources. */ public static final ObjectNameBuilder DEFAULT = new ObjectNameBuilder(ActiveMQDefaultConfiguration.getDefaultJmxDomain()); @@ -63,9 +63,9 @@ public final class ObjectNameBuilder // Public -------------------------------------------------------- /** - * Returns the ObjectName used by the single {@link HornetQServerControl}. + * Returns the ObjectName used by the single {@link ActiveMQServerControl}. */ - public ObjectName getHornetQServerObjectName() throws Exception + public ObjectName getActiveMQServerObjectName() throws Exception { return ObjectName.getInstance(domain + ":module=Core,type=Server"); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/package-info.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/package-info.java index 97fc8ab745..8ea922e601 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/package-info.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/management/package-info.java @@ -11,9 +11,9 @@ * permissions and limitations under the License. */ /** - * Management API for HornetQ servers and its Core resources. + * Management API for ActiveMQ servers and its Core resources. *
- * HornetQ can be managed either using JMX or by sending management messages to the + * ActiveMQ can be managed either using JMX or by sending management messages to the * server's special management address. Please refer to the user manual for more information. */ package org.apache.activemq.api.core.management; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/package-info.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/package-info.java index d56fc3c574..8fecb75820 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/package-info.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/package-info.java @@ -14,7 +14,7 @@ * Core Messaging API. *
* This package defines base classes and interfaces used - * throughout HornetQ API + * throughout ActiveMQ API */ package org.apache.activemq.api.core; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/buffers/impl/ResetLimitWrappedHornetQBuffer.java b/activemq-core-client/src/main/java/org/apache/activemq/core/buffers/impl/ResetLimitWrappedActiveMQBuffer.java similarity index 96% rename from activemq-core-client/src/main/java/org/apache/activemq/core/buffers/impl/ResetLimitWrappedHornetQBuffer.java rename to activemq-core-client/src/main/java/org/apache/activemq/core/buffers/impl/ResetLimitWrappedActiveMQBuffer.java index 71ef0a4bc1..84291bf68a 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/buffers/impl/ResetLimitWrappedHornetQBuffer.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/buffers/impl/ResetLimitWrappedActiveMQBuffer.java @@ -19,12 +19,12 @@ import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.message.impl.MessageInternal; /** - * A ResetLimitWrappedHornetQBuffer + * A ResetLimitWrappedActiveMQBuffer * TODO: Move this to commons * @author Tim Fox * */ -public final class ResetLimitWrappedHornetQBuffer extends ChannelBufferWrapper +public final class ResetLimitWrappedActiveMQBuffer extends ChannelBufferWrapper { private final int limit; @@ -40,7 +40,7 @@ public final class ResetLimitWrappedHornetQBuffer extends ChannelBufferWrapper this.message = message; } - public ResetLimitWrappedHornetQBuffer(final int limit, final ActiveMQBuffer buffer, final MessageInternal message) + public ResetLimitWrappedActiveMQBuffer(final int limit, final ActiveMQBuffer buffer, final MessageInternal message) { super(buffer.byteBuf()); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/HornetQClientLogger.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/ActiveMQClientLogger.java similarity index 98% rename from activemq-core-client/src/main/java/org/apache/activemq/core/client/HornetQClientLogger.java rename to activemq-core-client/src/main/java/org/apache/activemq/core/client/ActiveMQClientLogger.java index 742bb34874..08e3f49e4f 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/HornetQClientLogger.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/ActiveMQClientLogger.java @@ -44,13 +44,13 @@ import org.w3c.dom.Node; * * @author Andy Taylor */ -@MessageLogger(projectCode = "HQ") -public interface HornetQClientLogger extends BasicLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQClientLogger extends BasicLogger { /** * The default logger. */ - HornetQClientLogger LOGGER = Logger.getMessageLogger(HornetQClientLogger.class, HornetQClientLogger.class.getPackage().getName()); + ActiveMQClientLogger LOGGER = Logger.getMessageLogger(ActiveMQClientLogger.class, ActiveMQClientLogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.INFO) @Message(id = 211000, value = "**** Dumping session creation stacks ****", format = Message.Format.MESSAGE_FORMAT) @@ -254,7 +254,7 @@ public interface HornetQClientLogger extends BasicLogger void propertyNotBoolean(String propName, String name); @LogMessage(level = Logger.Level.WARN) - @Message(id = 212046, value = "Cannot find hornetq-version.properties on classpath: {0}", + @Message(id = 212046, value = "Cannot find activemq-version.properties on classpath: {0}", format = Message.Format.MESSAGE_FORMAT) void noVersionOnClasspath(String classpath); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/HornetQClientMessageBundle.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/ActiveMQClientMessageBundle.java similarity index 98% rename from activemq-core-client/src/main/java/org/apache/activemq/core/client/HornetQClientMessageBundle.java rename to activemq-core-client/src/main/java/org/apache/activemq/core/client/ActiveMQClientMessageBundle.java index 9dbb2335cb..f9ad2ba110 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/HornetQClientMessageBundle.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/ActiveMQClientMessageBundle.java @@ -45,10 +45,10 @@ import org.w3c.dom.Node; * * so 119000 to 119999 */ -@MessageBundle(projectCode = "HQ") -public interface HornetQClientMessageBundle +@MessageBundle(projectCode = "AMQ") +public interface ActiveMQClientMessageBundle { - HornetQClientMessageBundle BUNDLE = Messages.getBundle(HornetQClientMessageBundle.class); + ActiveMQClientMessageBundle BUNDLE = Messages.getBundle(ActiveMQClientMessageBundle.class); @Message(id = 119000, value = "ClientSession closed while creating session", format = Message.Format.MESSAGE_FORMAT) ActiveMQInternalErrorException clientSessionClosed(); @@ -58,7 +58,7 @@ public interface HornetQClientMessageBundle @Message(id = 119002, value = "Internal Error! ClientSessionFactoryImpl::createSessionInternal " + "just reached a condition that was not supposed to happen. " - + "Please inform this condition to the HornetQ team", format = Message.Format.MESSAGE_FORMAT) + + "Please inform this condition to the ActiveMQ team", format = Message.Format.MESSAGE_FORMAT) ActiveMQInternalErrorException clietSessionInternal(); @Message(id = 119003, value = "Queue can not be both durable and temporary", format = Message.Format.MESSAGE_FORMAT) diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/HornetQXAResource.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ActiveMQXAResource.java similarity index 93% rename from activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/HornetQXAResource.java rename to activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ActiveMQXAResource.java index 31ff43dbb8..ceff93af32 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/HornetQXAResource.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ActiveMQXAResource.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.client.impl; import javax.transaction.xa.XAResource; -public interface HornetQXAResource extends XAResource +public interface ActiveMQXAResource extends XAResource { XAResource getResource(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientConsumerImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientConsumerImpl.java index c145186904..6295a741c5 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientConsumerImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientConsumerImpl.java @@ -30,8 +30,8 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.client.HornetQClientLogger; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.spi.core.remoting.ConsumerContext; import org.apache.activemq.spi.core.remoting.SessionContext; import org.apache.activemq.utils.FutureLatch; @@ -53,7 +53,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal // Constants // ------------------------------------------------------------------------------------ - private static final boolean isTrace = HornetQClientLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQClientLogger.LOGGER.isTraceEnabled(); private static final long CLOSE_TIMEOUT_MILLISECONDS = 10000; @@ -204,7 +204,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal if (handler != null) { - throw HornetQClientMessageBundle.BUNDLE.messageHandlerSet(); + throw ActiveMQClientMessageBundle.BUNDLE.messageHandlerSet(); } if (clientWindowSize == 0) @@ -295,7 +295,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { if (isTrace) { - HornetQClientLogger.LOGGER.trace("Forcing delivery"); + ActiveMQClientLogger.LOGGER.trace("Forcing delivery"); } // JBPAPP-6030 - Calling forceDelivery outside of the lock to avoid distributed dead locks sessionContext.forceDelivery(this, forceDeliveryCount++); @@ -321,7 +321,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal if (isTrace) { - HornetQClientLogger.LOGGER.trace("There was nothing on the queue, leaving it now:: returning null"); + ActiveMQClientLogger.LOGGER.trace("There was nothing on the queue, leaving it now:: returning null"); } return null; @@ -330,7 +330,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { if (isTrace) { - HornetQClientLogger.LOGGER.trace("Ignored force delivery answer as it belonged to another call"); + ActiveMQClientLogger.LOGGER.trace("Ignored force delivery answer as it belonged to another call"); } // Ignore the message continue; @@ -369,7 +369,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal if (isTrace) { - HornetQClientLogger.LOGGER.trace("Returning " + m); + ActiveMQClientLogger.LOGGER.trace("Returning " + m); } return m; @@ -378,7 +378,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { if (isTrace) { - HornetQClientLogger.LOGGER.trace("Returning null"); + ActiveMQClientLogger.LOGGER.trace("Returning null"); } resetIfSlowConsumer(); return null; @@ -428,7 +428,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal if (receiverThread != null) { - throw HornetQClientMessageBundle.BUNDLE.inReceive(); + throw ActiveMQClientMessageBundle.BUNDLE.inReceive(); } boolean noPreviousHandler = handler == null; @@ -492,7 +492,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal } catch (ActiveMQException e) { - HornetQClientLogger.LOGGER.warn("problem cleaning up: " + this); + ActiveMQClientLogger.LOGGER.warn("problem cleaning up: " + this); } } @@ -717,7 +717,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { if (isTrace) { - HornetQClientLogger.LOGGER.trace("Sending back credits for largeController = null " + flowControlSize); + ActiveMQClientLogger.LOGGER.trace("Sending back credits for largeController = null " + flowControlSize); } flowControl(flowControlSize, false); } @@ -751,7 +751,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal } catch (Exception e) { - HornetQClientLogger.LOGGER.errorClearingMessages(e); + ActiveMQClientLogger.LOGGER.errorClearingMessages(e); } } @@ -764,7 +764,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal catch (Throwable e) { // nothing that could be done here - HornetQClientLogger.LOGGER.errorClearingMessages(e); + ActiveMQClientLogger.LOGGER.errorClearingMessages(e); } } @@ -853,7 +853,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { if (isTrace) { - HornetQClientLogger.LOGGER.trace("FlowControl::Sending " + creditsToSend + " -1, for slow consumer"); + ActiveMQClientLogger.LOGGER.trace("FlowControl::Sending " + creditsToSend + " -1, for slow consumer"); } // sending the credits - 1 initially send to fire the slow consumer, or the slow consumer would be @@ -869,9 +869,9 @@ public final class ClientConsumerImpl implements ClientConsumerInternal } else { - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { - HornetQClientLogger.LOGGER.debug("Sending " + messageBytes + " from flow-control"); + ActiveMQClientLogger.LOGGER.debug("Sending " + messageBytes + " from flow-control"); } final int credits = creditsToSend; @@ -906,7 +906,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { if (isTrace) { - HornetQClientLogger.LOGGER.trace("Sending 1 credit to start delivering of one message to slow consumer"); + ActiveMQClientLogger.LOGGER.trace("Sending 1 credit to start delivering of one message to slow consumer"); } sendCredits(1); try @@ -962,7 +962,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { if (isTrace) { - HornetQClientLogger.LOGGER.trace("Adding Runner on Executor for delivery"); + ActiveMQClientLogger.LOGGER.trace("Adding Runner on Executor for delivery"); } sessionExecutor.execute(runner); @@ -1011,7 +1011,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal if (!ok) { - HornetQClientLogger.LOGGER.timeOutWaitingForProcessing(); + ActiveMQClientLogger.LOGGER.timeOutWaitingForProcessing(); } } @@ -1019,7 +1019,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { if (closed) { - throw HornetQClientMessageBundle.BUNDLE.consumerClosed(); + throw ActiveMQClientMessageBundle.BUNDLE.consumerClosed(); } } @@ -1073,7 +1073,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { if (isTrace) { - HornetQClientLogger.LOGGER.trace("Calling handler.onMessage"); + ActiveMQClientLogger.LOGGER.trace("Calling handler.onMessage"); } final ClassLoader originalLoader = AccessController.doPrivileged(new PrivilegedAction() { @@ -1107,7 +1107,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal } catch (Exception e) { - HornetQClientLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQClientLogger.LOGGER.warn(e.getMessage(), e); } onMessageThread = null; @@ -1115,7 +1115,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal if (isTrace) { - HornetQClientLogger.LOGGER.trace("Handler.onMessage done"); + ActiveMQClientLogger.LOGGER.trace("Handler.onMessage done"); } if (message.isLargeMessage()) @@ -1229,7 +1229,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal } catch (Exception e) { - HornetQClientLogger.LOGGER.onMessageError(e); + ActiveMQClientLogger.LOGGER.onMessageError(e); lastException = e; } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientLargeMessageImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientLargeMessageImpl.java index b6fa16b159..5a795fe3d1 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientLargeMessageImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientLargeMessageImpl.java @@ -18,7 +18,7 @@ import java.io.OutputStream; import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; -import org.apache.activemq.core.buffers.impl.ResetLimitWrappedHornetQBuffer; +import org.apache.activemq.core.buffers.impl.ResetLimitWrappedActiveMQBuffer; import org.apache.activemq.utils.DataConstants; /** @@ -183,19 +183,19 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C } createBody((int)bodySize); - bodyBuffer = new ResetLimitWrappedHornetQBuffer(BODY_OFFSET, buffer, this); + bodyBuffer = new ResetLimitWrappedActiveMQBuffer(BODY_OFFSET, buffer, this); - largeMessageController.saveBuffer(new HornetQOutputStream(bodyBuffer)); + largeMessageController.saveBuffer(new ActiveMQOutputStream(bodyBuffer)); } } // Inner classes ------------------------------------------------- - private static class HornetQOutputStream extends OutputStream + private static class ActiveMQOutputStream extends OutputStream { private final ActiveMQBuffer bufferOut; - HornetQOutputStream(ActiveMQBuffer out) + ActiveMQOutputStream(ActiveMQBuffer out) { this.bufferOut = out; } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientMessageImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientMessageImpl.java index 715837aafe..000bddd326 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientMessageImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientMessageImpl.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQPropertyConversionException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.core.message.BodyEncoder; import org.apache.activemq.core.message.impl.MessageImpl; import org.apache.activemq.reader.MessageUtil; @@ -173,7 +173,7 @@ public class ClientMessageImpl extends MessageImpl implements ClientMessageInter } catch (IOException e) { - throw HornetQClientMessageBundle.BUNDLE.errorSavingBody(e); + throw ActiveMQClientMessageBundle.BUNDLE.errorSavingBody(e); } } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientProducerCreditsImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientProducerCreditsImpl.java index e037136892..590ce68465 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientProducerCreditsImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientProducerCreditsImpl.java @@ -14,8 +14,8 @@ package org.apache.activemq.core.client.impl; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.core.client.HornetQClientLogger; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.spi.core.remoting.SessionContext; import java.util.concurrent.Semaphore; @@ -99,7 +99,7 @@ public class ClientProducerCreditsImpl implements ClientProducerCredits { // I'm using string concatenation here in case address is null // better getting a "null" string than a NPE - HornetQClientLogger.LOGGER.outOfCreditOnFlowControl("" + address); + ActiveMQClientLogger.LOGGER.outOfCreditOnFlowControl("" + address); } } finally @@ -127,7 +127,7 @@ public class ClientProducerCreditsImpl implements ClientProducerCredits pendingCredits = 0; arriving = 0; - throw HornetQClientMessageBundle.BUNDLE.addressIsFull(address.toString(), credits); + throw ActiveMQClientMessageBundle.BUNDLE.addressIsFull(address.toString(), credits); } } } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientProducerImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientProducerImpl.java index 1c99da1798..45cac1b374 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientProducerImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientProducerImpl.java @@ -23,13 +23,13 @@ import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.SendAcknowledgementHandler; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.core.message.BodyEncoder; import org.apache.activemq.core.message.impl.MessageInternal; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionSendContinuationMessage; import org.apache.activemq.spi.core.remoting.SessionContext; import org.apache.activemq.utils.DeflaterReader; -import org.apache.activemq.utils.HornetQBufferInputStream; +import org.apache.activemq.utils.ActiveMQBufferInputStream; import org.apache.activemq.utils.TokenBucketLimiter; import org.apache.activemq.utils.UUIDGenerator; @@ -333,7 +333,7 @@ public class ClientProducerImpl implements ClientProducerInternal { if (closed) { - throw HornetQClientMessageBundle.BUNDLE.producerClosed(); + throw ActiveMQClientMessageBundle.BUNDLE.producerClosed(); } } @@ -351,7 +351,7 @@ public class ClientProducerImpl implements ClientProducerInternal if (msgI.getHeadersAndPropertiesEncodeSize() >= minLargeMessageSize) { - throw HornetQClientMessageBundle.BUNDLE.headerSizeTooBig(headerSize); + throw ActiveMQClientMessageBundle.BUNDLE.headerSizeTooBig(headerSize); } // msg.getBody() could be Null on LargeServerMessage @@ -459,7 +459,7 @@ public class ClientProducerImpl implements ClientProducerInternal final ClientProducerCredits credits, SendAcknowledgementHandler handler) throws ActiveMQException { msgI.getBodyBuffer().readerIndex(0); - largeMessageSendStreamed(sendBlocking, msgI, new HornetQBufferInputStream(msgI.getBodyBuffer()), credits, + largeMessageSendStreamed(sendBlocking, msgI, new ActiveMQBufferInputStream(msgI.getBodyBuffer()), credits, handler); } @@ -513,7 +513,7 @@ public class ClientProducerImpl implements ClientProducerInternal } catch (IOException e) { - throw HornetQClientMessageBundle.BUNDLE.errorReadingBody(e); + throw ActiveMQClientMessageBundle.BUNDLE.errorReadingBody(e); } if (numberOfBytesRead == -1) @@ -601,7 +601,7 @@ public class ClientProducerImpl implements ClientProducerInternal } catch (IOException e) { - throw HornetQClientMessageBundle.BUNDLE.errorClosingLargeMessage(e); + throw ActiveMQClientMessageBundle.BUNDLE.errorClosingLargeMessage(e); } } } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionFactoryImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionFactoryImpl.java index 432234fbf4..4b75160042 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionFactoryImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionFactoryImpl.java @@ -38,14 +38,14 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.FailoverEventListener; import org.apache.activemq.api.core.client.FailoverEventType; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.client.SessionFailureListener; -import org.apache.activemq.core.client.HornetQClientLogger; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.core.protocol.core.CoreRemotingConnection; import org.apache.activemq.core.remoting.FailureListener; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.remoting.BufferHandler; import org.apache.activemq.spi.core.remoting.ClientProtocolManager; @@ -74,9 +74,9 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C // Constants // ------------------------------------------------------------------------------------ - private static final boolean isTrace = HornetQClientLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQClientLogger.LOGGER.isTraceEnabled(); - private static final boolean isDebug = HornetQClientLogger.LOGGER.isDebugEnabled(); + private static final boolean isDebug = ActiveMQClientLogger.LOGGER.isDebugEnabled(); // Attributes // ----------------------------------------------------------------------------------- @@ -189,11 +189,11 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C // HORNETQ-1314 - if this in an in-vm connection then disable connection monitoring if (connectorFactory.isReliable() && - clientFailureCheckPeriod == HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD && - connectionTTL == HornetQClient.DEFAULT_CONNECTION_TTL) + clientFailureCheckPeriod == ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD && + connectionTTL == ActiveMQClient.DEFAULT_CONNECTION_TTL) { - this.clientFailureCheckPeriod = HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD_INVM; - this.connectionTTL = HornetQClient.DEFAULT_CONNECTION_TTL_INVM; + this.clientFailureCheckPeriod = ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD_INVM; + this.connectionTTL = ActiveMQClient.DEFAULT_CONNECTION_TTL_INVM; } else { @@ -282,7 +282,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C { if (ClientSessionFactoryImpl.isDebug) { - HornetQClientLogger.LOGGER.debug("Setting up backup config = " + backUp + " for live = " + live); + ActiveMQClientLogger.LOGGER.debug("Setting up backup config = " + backUp + " for live = " + live); } backupConfig = backUp; } @@ -290,7 +290,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C { if (ClientSessionFactoryImpl.isDebug) { - HornetQClientLogger.LOGGER.debug("ClientSessionFactoryImpl received backup update for live/backup pair = " + live + + ActiveMQClientLogger.LOGGER.debug("ClientSessionFactoryImpl received backup update for live/backup pair = " + live + " / " + backUp + " but it didn't belong to " + @@ -405,7 +405,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C // ConnectionLifeCycleListener implementation -------------------------------------------------- - public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) + public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } @@ -413,7 +413,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C { // The exception has to be created in the same thread where it's being called // as to avoid a different stack trace cause - final ActiveMQException ex = HornetQClientMessageBundle.BUNDLE.channelDisconnected(); + final ActiveMQException ex = ActiveMQClientMessageBundle.BUNDLE.channelDisconnected(); // It has to use the same executor as the disconnect message is being sent through @@ -516,7 +516,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C } catch (Exception e1) { - HornetQClientLogger.LOGGER.unableToCloseSession(e1); + ActiveMQClientLogger.LOGGER.unableToCloseSession(e1); } } checkCloseConnection(); @@ -573,12 +573,12 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C catch (ActiveMQInterruptedException e1) { // this is just a debug, since an interrupt is an expected event (in case of a shutdown) - HornetQClientLogger.LOGGER.debug(e1.getMessage(), e1); + ActiveMQClientLogger.LOGGER.debug(e1.getMessage(), e1); } } /** - * TODO: Maybe this belongs to HornetQClientProtocolManager + * TODO: Maybe this belongs to ActiveMQClientProtocolManager * @param connectionID * @param me */ @@ -602,7 +602,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C if (ClientSessionFactoryImpl.isTrace) { - HornetQClientLogger.LOGGER.trace("Client Connection failed, calling failure listeners and trying to reconnect, reconnectAttempts=" + reconnectAttempts); + ActiveMQClientLogger.LOGGER.trace("Client Connection failed, calling failure listeners and trying to reconnect, reconnectAttempts=" + reconnectAttempts); } callFailoverListeners(FailoverEventType.FAILURE_DETECTED); @@ -728,7 +728,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C } catch (Exception cause) { - HornetQClientLogger.LOGGER.failedToCleanupSession(cause); + ActiveMQClientLogger.LOGGER.failedToCleanupSession(cause); } } } @@ -824,7 +824,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C // Failure of one listener to execute shouldn't prevent others // from // executing - HornetQClientLogger.LOGGER.failedToExecuteListener(t); + ActiveMQClientLogger.LOGGER.failedToExecuteListener(t); } } } @@ -844,7 +844,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C // Failure of one listener to execute shouldn't prevent others // from // executing - HornetQClientLogger.LOGGER.failedToExecuteListener(t); + ActiveMQClientLogger.LOGGER.failedToExecuteListener(t); } } } @@ -870,7 +870,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C if (connection == null) { if (!clientProtocolManager.isAlive()) - HornetQClientLogger.LOGGER.failedToConnectToServer(); + ActiveMQClientLogger.LOGGER.failedToConnectToServer(); return; } @@ -907,9 +907,9 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C { if (!clientProtocolManager.isAlive()) return; - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("getConnectionWithRetry::" + reconnectAttempts + + ActiveMQClientLogger.LOGGER.trace("getConnectionWithRetry::" + reconnectAttempts + " with retryInterval = " + retryInterval + " multiplier = " + @@ -924,14 +924,14 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C { if (ClientSessionFactoryImpl.isDebug) { - HornetQClientLogger.LOGGER.debug("Trying reconnection attempt " + count + "/" + reconnectAttempts); + ActiveMQClientLogger.LOGGER.debug("Trying reconnection attempt " + count + "/" + reconnectAttempts); } if (getConnection() != null) { - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { - HornetQClientLogger.LOGGER.debug("Reconnection successful"); + ActiveMQClientLogger.LOGGER.debug("Reconnection successful"); } return; } @@ -947,7 +947,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C { if (reconnectAttempts != 1) { - HornetQClientLogger.LOGGER.failedToConnectToServer(reconnectAttempts); + ActiveMQClientLogger.LOGGER.failedToConnectToServer(reconnectAttempts); } return; @@ -955,7 +955,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C if (ClientSessionFactoryImpl.isTrace) { - HornetQClientLogger.LOGGER.waitingForRetry(interval, retryInterval, retryIntervalMultiplier); + ActiveMQClientLogger.LOGGER.waitingForRetry(interval, retryInterval, retryIntervalMultiplier); } try @@ -982,7 +982,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C } else { - HornetQClientLogger.LOGGER.debug("Could not connect to any server. Didn't have reconnection configured on the ClientSessionFactory"); + ActiveMQClientLogger.LOGGER.debug("Could not connect to any server. Didn't have reconnection configured on the ClientSessionFactory"); return; } } @@ -1086,14 +1086,14 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C { if (ClientSessionFactoryImpl.isTrace) { - HornetQClientLogger.LOGGER.trace(this + "::Subscribing Topology"); + ActiveMQClientLogger.LOGGER.trace(this + "::Subscribing Topology"); } clientProtocolManager.sendSubscribeTopology(serverLocator.isClusterConnection()); } } else { - HornetQClientLogger.LOGGER.debug("serverLocator@" + System.identityHashCode(serverLocator + " had no topology")); + ActiveMQClientLogger.LOGGER.debug("serverLocator@" + System.identityHashCode(serverLocator + " had no topology")); } return connection; @@ -1133,7 +1133,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C { if (!closed && finalizeCheck) { - HornetQClientLogger.LOGGER.factoryLeftOpen(createTrace, System.identityHashCode(this)); + ActiveMQClientLogger.LOGGER.factoryLeftOpen(createTrace, System.identityHashCode(this)); close(); } @@ -1184,11 +1184,11 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C CLOSE_RUNNABLES.add(this); if (scaleDownTargetNodeID == null) { - conn.fail(HornetQClientMessageBundle.BUNDLE.disconnected()); + conn.fail(ActiveMQClientMessageBundle.BUNDLE.disconnected()); } else { - conn.fail(HornetQClientMessageBundle.BUNDLE.disconnected(), scaleDownTargetNodeID); + conn.fail(ActiveMQClientMessageBundle.BUNDLE.disconnected(), scaleDownTargetNodeID); } } finally @@ -1234,7 +1234,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C { if (ClientSessionFactoryImpl.isDebug) { - HornetQClientLogger.LOGGER.debug("Connector towards " + connector + " failed"); + ActiveMQClientLogger.LOGGER.debug("Connector towards " + connector + " failed"); } try @@ -1291,7 +1291,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C { if (ClientSessionFactoryImpl.isDebug) { - HornetQClientLogger.LOGGER.debug("Trying to connect with connector = " + connectorFactory + + ActiveMQClientLogger.LOGGER.debug("Trying to connect with connector = " + connectorFactory + ", parameters = " + connectorConfig.getParams() + " connector = " + @@ -1310,7 +1310,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C { if (ClientSessionFactoryImpl.isDebug) { - HornetQClientLogger.LOGGER.debug("Trying backup config = " + backupConfig); + ActiveMQClientLogger.LOGGER.debug("Trying backup config = " + backupConfig); } ConnectorFactory backupConnectorFactory = instantiateConnectorFactory(backupConfig.getFactoryClassName()); @@ -1325,7 +1325,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C if (ClientSessionFactoryImpl.isDebug) { - HornetQClientLogger.LOGGER.debug("Connected to the backup at " + backupConfig); + ActiveMQClientLogger.LOGGER.debug("Connected to the backup at " + backupConfig); } // Switching backup as live @@ -1338,7 +1338,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C { if (ClientSessionFactoryImpl.isDebug) { - HornetQClientLogger.LOGGER.debug("Backup is not active yet"); + ActiveMQClientLogger.LOGGER.debug("Backup is not active yet"); } } @@ -1348,7 +1348,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C { // Sanity catch for badly behaved remoting plugins - HornetQClientLogger.LOGGER.createConnectorException(cause); + ActiveMQClientLogger.LOGGER.createConnectorException(cause); if (transportConnection != null) { @@ -1392,7 +1392,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C } else { - HornetQClientLogger.LOGGER.debug("TheConn == null on ClientSessionFactoryImpl::DelegatingBufferHandler, ignoring packet"); + ActiveMQClientLogger.LOGGER.debug("TheConn == null on ClientSessionFactoryImpl::DelegatingBufferHandler, ignoring packet"); } } } @@ -1473,7 +1473,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C // We use a different thread to send the fail // but the exception has to be created here to preserve the stack trace - final ActiveMQException me = HornetQClientMessageBundle.BUNDLE.connectionTimedOut(connection.getTransportConnection()); + final ActiveMQException me = ActiveMQClientMessageBundle.BUNDLE.connectionTimedOut(connection.getTransportConnection()); cancelled = true; @@ -1521,7 +1521,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C { if (ClientSessionFactoryImpl.isTrace) { - HornetQClientLogger.LOGGER.trace("Neither backup or live were active, will just give up now"); + ActiveMQClientLogger.LOGGER.trace("Neither backup or live were active, will just give up now"); } return null; } @@ -1535,9 +1535,9 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C schedulePing(); - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("returning " + connection); + ActiveMQClientLogger.LOGGER.trace("returning " + connection); } return newConnection; @@ -1573,9 +1573,9 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C public void nodeDisconnected(RemotingConnection conn, String nodeID, String scaleDownTargetNodeID) { - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("Disconnect being called on client:" + + ActiveMQClientLogger.LOGGER.trace("Disconnect being called on client:" + " server locator = " + serverLocator + " notifying node " + diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionImpl.java index 8b958749ae..65c5eaff94 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionImpl.java @@ -36,8 +36,8 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.FailoverEventListener; import org.apache.activemq.api.core.client.SendAcknowledgementHandler; import org.apache.activemq.api.core.client.SessionFailureListener; -import org.apache.activemq.core.client.HornetQClientLogger; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.core.remoting.FailureListener; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.remoting.ConsumerContext; @@ -492,19 +492,19 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi if (outcomeKnown) { - throw HornetQClientMessageBundle.BUNDLE.txRolledBack(); + throw ActiveMQClientMessageBundle.BUNDLE.txRolledBack(); } - throw HornetQClientMessageBundle.BUNDLE.txOutcomeUnknown(); + throw ActiveMQClientMessageBundle.BUNDLE.txOutcomeUnknown(); } public void commit() throws ActiveMQException { checkClosed(); - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("Sending commit"); + ActiveMQClientLogger.LOGGER.trace("Sending commit"); } /* @@ -565,9 +565,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi public void rollback(final boolean isLastMessageAsDelivered) throws ActiveMQException { - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("calling rollback(isLastMessageAsDelivered=" + isLastMessageAsDelivered + ")"); + ActiveMQClientLogger.LOGGER.trace("calling rollback(isLastMessageAsDelivered=" + isLastMessageAsDelivered + ")"); } checkClosed(); @@ -651,7 +651,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi { if (rollbackOnly) { - HornetQClientLogger.LOGGER.resettingSessionAfterFailure(); + ActiveMQClientLogger.LOGGER.resettingSessionAfterFailure(); rollback(false); } } @@ -771,9 +771,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } checkClosed(); - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { - HornetQClientLogger.LOGGER.debug("client ack messageID = " + message.getMessageID()); + ActiveMQClientLogger.LOGGER.debug("client ack messageID = " + message.getMessageID()); } startCall(); @@ -900,7 +900,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } catch (ActiveMQException e) { - HornetQClientLogger.LOGGER.unableToCloseConsumer(e); + ActiveMQClientLogger.LOGGER.unableToCloseConsumer(e); } } }); @@ -911,13 +911,13 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi { if (closed) { - HornetQClientLogger.LOGGER.debug("Session was already closed, giving up now, this=" + this); + ActiveMQClientLogger.LOGGER.debug("Session was already closed, giving up now, this=" + this); return; } - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { - HornetQClientLogger.LOGGER.debug("Calling close on session " + this); + ActiveMQClientLogger.LOGGER.debug("Calling close on session " + this); } try @@ -936,7 +936,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi // Session close should always return without exception // Note - we only log at trace - HornetQClientLogger.LOGGER.trace("Failed to close session", e); + ActiveMQClientLogger.LOGGER.trace("Failed to close session", e); } doCleanup(false); @@ -993,9 +993,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi if (!reattached) { - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { - HornetQClientLogger.LOGGER.debug("ClientSession couldn't be reattached, creating a new session"); + ActiveMQClientLogger.LOGGER.debug("ClientSession couldn't be reattached, creating a new session"); } for (ClientConsumerInternal consumer : cloneConsumers()) @@ -1061,7 +1061,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } catch (Throwable t) { - HornetQClientLogger.LOGGER.failedToHandleFailover(t); + ActiveMQClientLogger.LOGGER.failedToHandleFailover(t); } finally { @@ -1179,7 +1179,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi { if (concurrentCall.incrementAndGet() > 1) { - HornetQClientLogger.LOGGER.invalidConcurrentSessionUsage(new Exception("trace")); + ActiveMQClientLogger.LOGGER.invalidConcurrentSessionUsage(new Exception("trace")); } } @@ -1197,16 +1197,16 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi public void commit(final Xid xid, final boolean onePhase) throws XAException { - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("call commit(xid=" + convert(xid)); + ActiveMQClientLogger.LOGGER.trace("call commit(xid=" + convert(xid)); } checkXA(); // we should never throw rollback if we have already prepared if (rollbackOnly) { - HornetQClientLogger.LOGGER.commitAfterFailover(); + ActiveMQClientLogger.LOGGER.commitAfterFailover(); } // Note - don't need to flush acks since the previous end would have @@ -1224,7 +1224,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } catch (Throwable t) { - HornetQClientLogger.LOGGER.failoverDuringCommit(); + ActiveMQClientLogger.LOGGER.failoverDuringCommit(); // Any error on commit -> RETRY // We can't rollback a Prepared TX for definition @@ -1240,9 +1240,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi public void end(final Xid xid, final int flags) throws XAException { - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("Calling end:: " + convert(xid) + ", flags=" + convertTXFlag(flags)); + ActiveMQClientLogger.LOGGER.trace("Calling end:: " + convert(xid) + ", flags=" + convertTXFlag(flags)); } checkXA(); @@ -1257,7 +1257,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } catch (Throwable ignored) { - HornetQClientLogger.LOGGER.debug("Error on rollback during end call!", ignored); + ActiveMQClientLogger.LOGGER.debug("Error on rollback during end call!", ignored); } throw new XAException(XAException.XA_RBOTHER); } @@ -1282,7 +1282,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } catch (Throwable t) { - HornetQClientLogger.LOGGER.errorCallingEnd(t); + ActiveMQClientLogger.LOGGER.errorCallingEnd(t); // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMERR); xaException.initCause(t); @@ -1392,9 +1392,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi { return (ClientSessionInternal) xares; } - else if (xares instanceof HornetQXAResource) + else if (xares instanceof ActiveMQXAResource) { - return getSessionInternalFromXAResource(((HornetQXAResource)xares).getResource()); + return getSessionInternalFromXAResource(((ActiveMQXAResource)xares).getResource()); } return null; } @@ -1402,9 +1402,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi public int prepare(final Xid xid) throws XAException { checkXA(); - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("Calling prepare:: " + convert(xid)); + ActiveMQClientLogger.LOGGER.trace("Calling prepare:: " + convert(xid)); } @@ -1439,7 +1439,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi { // ignore and rollback } - HornetQClientLogger.LOGGER.failoverDuringPrepareRollingBack(); + ActiveMQClientLogger.LOGGER.failoverDuringPrepareRollingBack(); try { rollback(false); @@ -1452,12 +1452,12 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi throw xaException; } - HornetQClientLogger.LOGGER.errorDuringPrepare(e); + ActiveMQClientLogger.LOGGER.errorDuringPrepare(e); throw new XAException(XAException.XA_RBOTHER); } - HornetQClientLogger.LOGGER.errorDuringPrepare(e); + ActiveMQClientLogger.LOGGER.errorDuringPrepare(e); // This should never occur XAException xaException = new XAException(XAException.XAER_RMERR); @@ -1466,7 +1466,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } catch (Throwable t) { - HornetQClientLogger.LOGGER.errorDuringPrepare(t); + ActiveMQClientLogger.LOGGER.errorDuringPrepare(t); // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMERR); @@ -1505,9 +1505,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi { checkXA(); - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("Calling rollback:: " + convert(xid)); + ActiveMQClientLogger.LOGGER.trace("Calling rollback:: " + convert(xid)); } try @@ -1569,9 +1569,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi public void start(final Xid xid, final int flags) throws XAException { - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("Calling start:: " + convert(xid) + " clientXID=" + xid + " flags = " + convertTXFlag(flags)); + ActiveMQClientLogger.LOGGER.trace("Calling start:: " + convert(xid) + " clientXID=" + xid + " flags = " + convertTXFlag(flags)); } checkXA(); @@ -1632,7 +1632,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } catch (Exception e) { - HornetQClientLogger.LOGGER.failedToCleanupSession(e); + ActiveMQClientLogger.LOGGER.failedToCleanupSession(e); } } @@ -1742,7 +1742,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi if (durable && temp) { - throw HornetQClientMessageBundle.BUNDLE.queueMisConfigured(); + throw ActiveMQClientMessageBundle.BUNDLE.queueMisConfigured(); } startCall(); @@ -1760,7 +1760,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi { if (!xa) { - HornetQClientLogger.LOGGER.sessionNotXA(); + ActiveMQClientLogger.LOGGER.sessionNotXA(); throw new XAException(XAException.XAER_RMERR); } } @@ -1769,7 +1769,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi { if (closed || inClose) { - throw HornetQClientMessageBundle.BUNDLE.sessionClosed(); + throw ActiveMQClientMessageBundle.BUNDLE.sessionClosed(); } } @@ -1784,9 +1784,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi private void doCleanup(boolean failingOver) { - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { - HornetQClientLogger.LOGGER.debug("calling cleanup on " + this); + ActiveMQClientLogger.LOGGER.debug("calling cleanup on " + this); } synchronized (this) @@ -1936,7 +1936,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi { if (!confirmationWindowWarning.warningIssued.get()) { - HornetQClientLogger.LOGGER.confirmationWindowDisabledWarning(); + ActiveMQClientLogger.LOGGER.confirmationWindowDisabledWarning(); confirmationWindowWarning.warningIssued.set(true); } return false; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/CompressedLargeMessageControllerImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/CompressedLargeMessageControllerImpl.java index acadf1a137..023f69d14f 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/CompressedLargeMessageControllerImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/CompressedLargeMessageControllerImpl.java @@ -22,9 +22,9 @@ import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.core.client.HornetQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientLogger; import org.apache.activemq.utils.DataConstants; -import org.apache.activemq.utils.HornetQBufferInputStream; +import org.apache.activemq.utils.ActiveMQBufferInputStream; import org.apache.activemq.utils.InflaterReader; import org.apache.activemq.utils.InflaterWriter; import org.apache.activemq.utils.UTF8Util; @@ -102,7 +102,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll { try { - InputStream input = new HornetQBufferInputStream(bufferDelegate); + InputStream input = new ActiveMQBufferInputStream(bufferDelegate); dataInput = new DataInputStream(new InflaterReader(input)); } @@ -432,7 +432,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll int nReadBytes = getStream().read(dst, dstIndex, length); if (nReadBytes < length) { - HornetQClientLogger.LOGGER.compressedLargeMessageError(length, nReadBytes); + ActiveMQClientLogger.LOGGER.compressedLargeMessageError(length, nReadBytes); } } catch (Exception e) diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/DelegatingSession.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/DelegatingSession.java index f13de610af..9a034cf763 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/DelegatingSession.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/DelegatingSession.java @@ -27,7 +27,7 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.FailoverEventListener; import org.apache.activemq.api.core.client.SendAcknowledgementHandler; import org.apache.activemq.api.core.client.SessionFailureListener; -import org.apache.activemq.core.client.HornetQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientLogger; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.remoting.ConsumerContext; import org.apache.activemq.utils.ConcurrentHashSet; @@ -55,11 +55,11 @@ public class DelegatingSession implements ClientSessionInternal public static void dumpSessionCreationStacks() { - HornetQClientLogger.LOGGER.dumpingSessionStacks(); + ActiveMQClientLogger.LOGGER.dumpingSessionStacks(); for (DelegatingSession session : DelegatingSession.sessions) { - HornetQClientLogger.LOGGER.dumpingSessionStack(session.creationStack); + ActiveMQClientLogger.LOGGER.dumpingSessionStack(session.creationStack); } } @@ -76,7 +76,7 @@ public class DelegatingSession implements ClientSessionInternal // if (!closed && !session.isClosed()) { - HornetQClientLogger.LOGGER.clientSessionNotClosed(creationStack, System.identityHashCode(this)); + ActiveMQClientLogger.LOGGER.clientSessionNotClosed(creationStack, System.identityHashCode(this)); close(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/LargeMessageControllerImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/LargeMessageControllerImpl.java index ff1436350d..06ce5ec962 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/LargeMessageControllerImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/LargeMessageControllerImpl.java @@ -32,8 +32,8 @@ import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.core.client.HornetQClientLogger; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.utils.DataConstants; import org.apache.activemq.utils.UTF8Util; @@ -191,7 +191,7 @@ public class LargeMessageControllerImpl implements LargeMessageController } catch (Exception e) { - HornetQClientLogger.LOGGER.errorAddingPacket(e); + ActiveMQClientLogger.LOGGER.errorAddingPacket(e); handledException = e; } } @@ -205,7 +205,7 @@ public class LargeMessageControllerImpl implements LargeMessageController } catch (Exception e) { - HornetQClientLogger.LOGGER.errorAddingPacket(e); + ActiveMQClientLogger.LOGGER.errorAddingPacket(e); handledException = e; } } @@ -223,7 +223,7 @@ public class LargeMessageControllerImpl implements LargeMessageController } catch (Exception e) { - HornetQClientLogger.LOGGER.errorAddingPacket(e); + ActiveMQClientLogger.LOGGER.errorAddingPacket(e); handledException = e; } } @@ -231,7 +231,7 @@ public class LargeMessageControllerImpl implements LargeMessageController public void cancel() { - this.handledException = HornetQClientMessageBundle.BUNDLE.largeMessageInterrupted(); + this.handledException = ActiveMQClientMessageBundle.BUNDLE.largeMessageInterrupted(); synchronized (this) { @@ -249,7 +249,7 @@ public class LargeMessageControllerImpl implements LargeMessageController catch (Exception ignored) { // what else can we do here? - HornetQClientLogger.LOGGER.errorCallingCancel(ignored); + ActiveMQClientLogger.LOGGER.errorCallingCancel(ignored); } largeMessageData.offer(new LargeData()); @@ -308,7 +308,7 @@ public class LargeMessageControllerImpl implements LargeMessageController { if (streamClosed) { - throw HornetQClientMessageBundle.BUNDLE.largeMessageLostSession(); + throw ActiveMQClientMessageBundle.BUNDLE.largeMessageLostSession(); } setOutputStream(output); waitCompletion(0); @@ -354,11 +354,11 @@ public class LargeMessageControllerImpl implements LargeMessageController { if (timeWait != 0 && System.currentTimeMillis() > timeOut) { - throw HornetQClientMessageBundle.BUNDLE.timeoutOnLargeMessage(); + throw ActiveMQClientMessageBundle.BUNDLE.timeoutOnLargeMessage(); } else if (System.currentTimeMillis() > timeOut && !packetAdded) { - throw HornetQClientMessageBundle.BUNDLE.timeoutOnLargeMessage(); + throw ActiveMQClientMessageBundle.BUNDLE.timeoutOnLargeMessage(); } } } @@ -613,7 +613,7 @@ public class LargeMessageControllerImpl implements LargeMessageController } catch (Exception e) { - HornetQClientLogger.LOGGER.errorReadingIndex(e); + ActiveMQClientLogger.LOGGER.errorReadingIndex(e); throw new RuntimeException(e.getMessage(), e); } this.readerIndex = readerIndex; @@ -642,7 +642,7 @@ public class LargeMessageControllerImpl implements LargeMessageController } catch (Exception e) { - HornetQClientLogger.LOGGER.errorSettingIndex(e); + ActiveMQClientLogger.LOGGER.errorSettingIndex(e); throw new RuntimeException(e.getMessage(), e); } this.readerIndex = readerIndex; @@ -694,7 +694,7 @@ public class LargeMessageControllerImpl implements LargeMessageController } catch (Exception e) { - HornetQClientLogger.LOGGER.errorReSettingIndex(e); + ActiveMQClientLogger.LOGGER.errorReSettingIndex(e); throw new RuntimeException(e.getMessage(), e); } } @@ -1199,7 +1199,7 @@ public class LargeMessageControllerImpl implements LargeMessageController } catch (IOException e) { - throw HornetQClientMessageBundle.BUNDLE.errorWritingLargeMessage(e); + throw ActiveMQClientMessageBundle.BUNDLE.errorWritingLargeMessage(e); } } @@ -1327,7 +1327,7 @@ public class LargeMessageControllerImpl implements LargeMessageController } catch (Exception e) { - HornetQClientLogger.LOGGER.errorReadingCache(e); + ActiveMQClientLogger.LOGGER.errorReadingCache(e); throw new RuntimeException(e.getMessage(), e); } finally @@ -1377,7 +1377,7 @@ public class LargeMessageControllerImpl implements LargeMessageController } catch (Exception e) { - HornetQClientLogger.LOGGER.errorClosingCache(e); + ActiveMQClientLogger.LOGGER.errorClosingCache(e); } cachedChannel = null; } @@ -1390,7 +1390,7 @@ public class LargeMessageControllerImpl implements LargeMessageController } catch (Exception e) { - HornetQClientLogger.LOGGER.errorClosingCache(e); + ActiveMQClientLogger.LOGGER.errorClosingCache(e); } cachedRAFile = null; } @@ -1409,7 +1409,7 @@ public class LargeMessageControllerImpl implements LargeMessageController } catch (Exception e) { - HornetQClientLogger.LOGGER.errorFinalisingCache(e); + ActiveMQClientLogger.LOGGER.errorFinalisingCache(e); } } } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorImpl.java index e47ac01a8c..2a0435340e 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorImpl.java @@ -45,21 +45,21 @@ import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ClusterTopologyListener; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.TopologyMember; import org.apache.activemq.api.core.client.loadbalance.ConnectionLoadBalancingPolicy; -import org.apache.activemq.core.client.HornetQClientLogger; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.core.cluster.DiscoveryEntry; import org.apache.activemq.core.cluster.DiscoveryGroup; import org.apache.activemq.core.cluster.DiscoveryListener; -import org.apache.activemq.core.protocol.core.impl.HornetQClientProtocolManagerFactory; +import org.apache.activemq.core.protocol.core.impl.ActiveMQClientProtocolManagerFactory; import org.apache.activemq.core.remoting.FailureListener; import org.apache.activemq.spi.core.remoting.ClientProtocolManager; import org.apache.activemq.spi.core.remoting.ClientProtocolManagerFactory; import org.apache.activemq.spi.core.remoting.Connector; import org.apache.activemq.utils.ClassloadingUtil; -import org.apache.activemq.utils.HornetQThreadFactory; +import org.apache.activemq.utils.ActiveMQThreadFactory; import org.apache.activemq.utils.UUIDGenerator; /** @@ -84,7 +84,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery // This is the default value - private ClientProtocolManagerFactory protocolManagerFactory = HornetQClientProtocolManagerFactory.getInstance(); + private ClientProtocolManagerFactory protocolManagerFactory = ActiveMQClientProtocolManagerFactory.getInstance(); private final boolean ha; @@ -267,7 +267,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { if (globalThreadPool == null) { - ThreadFactory factory = new HornetQThreadFactory("HornetQ-client-global-threads", true, getThisClassLoader()); + ThreadFactory factory = new ActiveMQThreadFactory("ActiveMQ-client-global-threads", true, getThisClassLoader()); globalThreadPool = Executors.newCachedThreadPool(factory); } @@ -279,11 +279,11 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { if (globalScheduledThreadPool == null) { - ThreadFactory factory = new HornetQThreadFactory("HornetQ-client-global-scheduled-threads", + ThreadFactory factory = new ActiveMQThreadFactory("ActiveMQ-client-global-scheduled-threads", true, getThisClassLoader()); - globalScheduledThreadPool = Executors.newScheduledThreadPool(HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + globalScheduledThreadPool = Executors.newScheduledThreadPool(ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, factory); } @@ -307,7 +307,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { this.shutdownPool = true; - ThreadFactory factory = new HornetQThreadFactory("HornetQ-client-factory-threads-" + System.identityHashCode(this), + ThreadFactory factory = new ActiveMQThreadFactory("ActiveMQ-client-factory-threads-" + System.identityHashCode(this), true, getThisClassLoader()); @@ -320,7 +320,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery threadPool = Executors.newFixedThreadPool(threadPoolMaxSize, factory); } - factory = new HornetQThreadFactory("HornetQ-client-factory-pinger-threads-" + System.identityHashCode(this), + factory = new ActiveMQThreadFactory("ActiveMQ-client-factory-pinger-threads-" + System.identityHashCode(this), true, getThisClassLoader()); @@ -386,7 +386,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery catch (Exception e) { state = null; - throw HornetQClientMessageBundle.BUNDLE.failedToInitialiseSessionFactory(e); + throw ActiveMQClientMessageBundle.BUNDLE.failedToInitialiseSessionFactory(e); } } } @@ -415,65 +415,65 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery this.nodeID = UUIDGenerator.getInstance().generateStringUUID(); - clientFailureCheckPeriod = HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD; + clientFailureCheckPeriod = ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD; - connectionTTL = HornetQClient.DEFAULT_CONNECTION_TTL; + connectionTTL = ActiveMQClient.DEFAULT_CONNECTION_TTL; - callTimeout = HornetQClient.DEFAULT_CALL_TIMEOUT; + callTimeout = ActiveMQClient.DEFAULT_CALL_TIMEOUT; - callFailoverTimeout = HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT; + callFailoverTimeout = ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT; - minLargeMessageSize = HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; + minLargeMessageSize = ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; - consumerWindowSize = HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE; + consumerWindowSize = ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE; - consumerMaxRate = HornetQClient.DEFAULT_CONSUMER_MAX_RATE; + consumerMaxRate = ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE; - confirmationWindowSize = HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE; + confirmationWindowSize = ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE; - producerWindowSize = HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE; + producerWindowSize = ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE; - producerMaxRate = HornetQClient.DEFAULT_PRODUCER_MAX_RATE; + producerMaxRate = ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE; - blockOnAcknowledge = HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE; + blockOnAcknowledge = ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE; - blockOnDurableSend = HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND; + blockOnDurableSend = ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND; - blockOnNonDurableSend = HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND; + blockOnNonDurableSend = ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND; - autoGroup = HornetQClient.DEFAULT_AUTO_GROUP; + autoGroup = ActiveMQClient.DEFAULT_AUTO_GROUP; - preAcknowledge = HornetQClient.DEFAULT_PRE_ACKNOWLEDGE; + preAcknowledge = ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE; - ackBatchSize = HornetQClient.DEFAULT_ACK_BATCH_SIZE; + ackBatchSize = ActiveMQClient.DEFAULT_ACK_BATCH_SIZE; - connectionLoadBalancingPolicyClassName = HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME; + connectionLoadBalancingPolicyClassName = ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME; - useGlobalPools = HornetQClient.DEFAULT_USE_GLOBAL_POOLS; + useGlobalPools = ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS; - scheduledThreadPoolMaxSize = HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE; + scheduledThreadPoolMaxSize = ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE; - threadPoolMaxSize = HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE; + threadPoolMaxSize = ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE; - retryInterval = HornetQClient.DEFAULT_RETRY_INTERVAL; + retryInterval = ActiveMQClient.DEFAULT_RETRY_INTERVAL; - retryIntervalMultiplier = HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER; + retryIntervalMultiplier = ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER; - maxRetryInterval = HornetQClient.DEFAULT_MAX_RETRY_INTERVAL; + maxRetryInterval = ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL; - reconnectAttempts = HornetQClient.DEFAULT_RECONNECT_ATTEMPTS; + reconnectAttempts = ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS; - initialConnectAttempts = HornetQClient.INITIAL_CONNECT_ATTEMPTS; + initialConnectAttempts = ActiveMQClient.INITIAL_CONNECT_ATTEMPTS; - failoverOnInitialConnection = HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION; + failoverOnInitialConnection = ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION; - cacheLargeMessagesClient = HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT; + cacheLargeMessagesClient = ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT; - initialMessagePacketSize = HornetQClient.DEFAULT_INITIAL_MESSAGE_PACKET_SIZE; + initialMessagePacketSize = ActiveMQClient.DEFAULT_INITIAL_MESSAGE_PACKET_SIZE; - cacheLargeMessagesClient = HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT; + cacheLargeMessagesClient = ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT; - compressLargeMessage = HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES; + compressLargeMessage = ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES; clusterConnection = false; } @@ -633,7 +633,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { if (!isClosed()) { - HornetQClientLogger.LOGGER.errorConnectingToNodes(e); + ActiveMQClientLogger.LOGGER.errorConnectingToNodes(e); } } } @@ -652,7 +652,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery if (protocolManagerFactory == null) { // this could happen over serialization from older versions - protocolManagerFactory = HornetQClientProtocolManagerFactory.getInstance(); + protocolManagerFactory = ActiveMQClientProtocolManagerFactory.getInstance(); } return protocolManagerFactory; } @@ -711,9 +711,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { TopologyMember topologyMember = topology.getMember(nodeID); - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("Creating connection factory towards " + nodeID + " = " + topologyMember + ", topology=" + topology.describe()); + ActiveMQClientLogger.LOGGER.trace("Creating connection factory towards " + nodeID + " = " + topologyMember + ", topology=" + topology.describe()); } if (topologyMember == null) @@ -856,7 +856,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery if (!ok) { - throw HornetQClientMessageBundle.BUNDLE.connectionTimedOutInInitialBroadcast(); + throw ActiveMQClientMessageBundle.BUNDLE.connectionTimedOutInInitialBroadcast(); } } @@ -873,7 +873,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery TransportConfiguration tc = selectConnector(); if (tc == null) { - throw HornetQClientMessageBundle.BUNDLE.noTCForSessionFactory(); + throw ActiveMQClientMessageBundle.BUNDLE.noTCForSessionFactory(); } // try each factory in the list until we find one which works @@ -917,11 +917,11 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery if (topologyArray != null && attempts == topologyArray.length) { - throw HornetQClientMessageBundle.BUNDLE.cannotConnectToServers(); + throw ActiveMQClientMessageBundle.BUNDLE.cannotConnectToServers(); } if (topologyArray == null && attempts == this.getNumInitialConnectors()) { - throw HornetQClientMessageBundle.BUNDLE.cannotConnectToServers(); + throw ActiveMQClientMessageBundle.BUNDLE.cannotConnectToServers(); } } retry = true; @@ -962,7 +962,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { if (factory != null) factory.cleanup(); - throw HornetQClientMessageBundle.BUNDLE.connectionTimedOutOnReceiveTopology(discoveryGroup); + throw ActiveMQClientMessageBundle.BUNDLE.connectionTimedOutOnReceiveTopology(discoveryGroup); } addFactory(factory); @@ -1465,9 +1465,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { if (state == STATE.CLOSED) { - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { - HornetQClientLogger.LOGGER.debug(this + " is already closed when calling closed"); + ActiveMQClientLogger.LOGGER.debug(this + " is already closed when calling closed"); } return; } @@ -1495,7 +1495,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } catch (Exception e) { - HornetQClientLogger.LOGGER.failedToStopDiscovery(e); + ActiveMQClientLogger.LOGGER.failedToStopDiscovery(e); } } } @@ -1551,7 +1551,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { if (!threadPool.awaitTermination(10000, TimeUnit.MILLISECONDS)) { - HornetQClientLogger.LOGGER.timedOutWaitingForTermination(); + ActiveMQClientLogger.LOGGER.timedOutWaitingForTermination(); } } catch (InterruptedException e) @@ -1568,7 +1568,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { if (!scheduledThreadPool.awaitTermination(10000, TimeUnit.MILLISECONDS)) { - HornetQClientLogger.LOGGER.timedOutWaitingForScheduledPoolTermination(); + ActiveMQClientLogger.LOGGER.timedOutWaitingForScheduledPoolTermination(); } } catch (InterruptedException e) @@ -1598,9 +1598,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery return; } - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("nodeDown " + this + " nodeID=" + nodeID + " as being down", new Exception("trace")); + ActiveMQClientLogger.LOGGER.trace("nodeDown " + this + " nodeID=" + nodeID + " as being down", new Exception("trace")); } topology.removeMember(eventTime, nodeID); @@ -1641,9 +1641,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery final Pair connectorPair, final boolean last) { - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("NodeUp " + this + "::nodeID=" + nodeID + ", connectorPair=" + connectorPair, new Exception("trace")); + ActiveMQClientLogger.LOGGER.trace("NodeUp " + this + "::nodeID=" + nodeID + ", connectorPair=" + connectorPair, new Exception("trace")); } TopologyMemberImpl member = new TopologyMemberImpl(nodeID, backupGroupName, scaleDownGroupName, connectorPair.getA(), connectorPair.getB()); @@ -1757,7 +1757,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } catch (ActiveMQException e) { - HornetQClientLogger.LOGGER.errorConnectingToNodes(e); + ActiveMQClientLogger.LOGGER.errorConnectingToNodes(e); } } }; @@ -1879,9 +1879,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery retryNumber++; for (Connector conn : connectors) { - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { - HornetQClientLogger.LOGGER.debug(this + "::Submitting connect towards " + conn); + ActiveMQClientLogger.LOGGER.debug(this + "::Submitting connect towards " + conn); } csf = conn.tryConnect(); @@ -1904,7 +1904,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery catch (Exception e) { // There isn't much to be done if this happens here - HornetQClientLogger.LOGGER.errorStartingLocator(e); + ActiveMQClientLogger.LOGGER.errorStartingLocator(e); } } } @@ -1922,9 +1922,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } }); - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { - HornetQClientLogger.LOGGER.debug("Returning " + csf + + ActiveMQClientLogger.LOGGER.debug("Returning " + csf + " after " + retryNumber + " retries on StaticConnector " + @@ -1949,15 +1949,15 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { if (isClosed() || skipWarnings) return null; - HornetQClientLogger.LOGGER.debug("Rejected execution", e); + ActiveMQClientLogger.LOGGER.debug("Rejected execution", e); throw e; } catch (Exception e) { if (isClosed() || skipWarnings) return null; - HornetQClientLogger.LOGGER.errorConnectingToNodes(e); - throw HornetQClientMessageBundle.BUNDLE.cannotConnectToStaticConnectors(e); + ActiveMQClientLogger.LOGGER.errorConnectingToNodes(e); + throw ActiveMQClientMessageBundle.BUNDLE.cannotConnectToStaticConnectors(e); } if (isClosed() || skipWarnings) @@ -1965,8 +1965,8 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery return null; } - HornetQClientLogger.LOGGER.errorConnectingToNodes(traceException); - throw HornetQClientMessageBundle.BUNDLE.cannotConnectToStaticConnectors2(); + ActiveMQClientLogger.LOGGER.errorConnectingToNodes(traceException); + throw ActiveMQClientMessageBundle.BUNDLE.cannotConnectToStaticConnectors2(); } private synchronized void createConnectors() @@ -2024,7 +2024,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { if (!isClosed() && finalizeCheck) { - HornetQClientLogger.LOGGER.serverLocatorNotClosed(traceException, System.identityHashCode(this)); + ActiveMQClientLogger.LOGGER.serverLocatorNotClosed(traceException, System.identityHashCode(this)); if (ServerLocatorImpl.finalizeCallback != null) { @@ -2051,9 +2051,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery public ClientSessionFactory tryConnect() throws ActiveMQException { - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { - HornetQClientLogger.LOGGER.debug(this + "::Trying to connect to " + factory); + ActiveMQClientLogger.LOGGER.debug(this + "::Trying to connect to " + factory); } try { @@ -2075,7 +2075,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } catch (ActiveMQException e) { - HornetQClientLogger.LOGGER.debug(this + "::Exception on establish connector initial connection", e); + ActiveMQClientLogger.LOGGER.debug(this + "::Exception on establish connector initial connection", e); return null; } } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/Topology.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/Topology.java index 89973e287b..caefb41065 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/Topology.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/Topology.java @@ -25,7 +25,7 @@ import java.util.concurrent.Executor; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClusterTopologyListener; -import org.apache.activemq.core.client.HornetQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientLogger; import org.apache.activemq.spi.core.remoting.Connector; /** @@ -64,9 +64,9 @@ public final class Topology implements Serializable public Topology(final Object owner) { this.owner = owner; - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("Topology@" + Integer.toHexString(System.identityHashCode(this)) + " CREATE", + ActiveMQClientLogger.LOGGER.trace("Topology@" + Integer.toHexString(System.identityHashCode(this)) + " CREATE", new Exception("trace")); } } @@ -86,9 +86,9 @@ public final class Topology implements Serializable public void addClusterTopologyListener(final ClusterTopologyListener listener) { - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace(this + "::Adding topology listener " + listener, new Exception("Trace")); + ActiveMQClientLogger.LOGGER.trace(this + "::Adding topology listener " + listener, new Exception("Trace")); } synchronized (topologyListeners) { @@ -99,9 +99,9 @@ public final class Topology implements Serializable public void removeClusterTopologyListener(final ClusterTopologyListener listener) { - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace(this + "::Removing topology listener " + listener, new Exception("Trace")); + ActiveMQClientLogger.LOGGER.trace(this + "::Removing topology listener " + listener, new Exception("Trace")); } synchronized (topologyListeners) { @@ -114,9 +114,9 @@ public final class Topology implements Serializable { synchronized (this) { - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { - HornetQClientLogger.LOGGER.debug(this + "::node " + nodeId + "=" + memberInput); + ActiveMQClientLogger.LOGGER.debug(this + "::node " + nodeId + "=" + memberInput); } memberInput.setUniqueEventID(System.currentTimeMillis()); topology.remove(nodeId); @@ -146,9 +146,9 @@ public final class Topology implements Serializable public TopologyMemberImpl updateBackup(final TopologyMemberImpl memberInput) { final String nodeId = memberInput.getNodeId(); - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace(this + "::updateBackup::" + nodeId + ", memberInput=" + memberInput); + ActiveMQClientLogger.LOGGER.trace(this + "::updateBackup::" + nodeId + ", memberInput=" + memberInput); } synchronized (this) @@ -156,9 +156,9 @@ public final class Topology implements Serializable TopologyMemberImpl currentMember = getMember(nodeId); if (currentMember == null) { - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("There's no live to be updated on backup update, node=" + nodeId + " memberInput=" + memberInput, + ActiveMQClientLogger.LOGGER.trace("There's no live to be updated on backup update, node=" + nodeId + " memberInput=" + memberInput, new Exception("trace")); } @@ -191,7 +191,7 @@ public final class Topology implements Serializable Long deleteTme = getMapDelete().get(nodeId); if (deleteTme != null && uniqueEventID != 0 && uniqueEventID < deleteTme) { - HornetQClientLogger.LOGGER.debug("Update uniqueEvent=" + uniqueEventID + + ActiveMQClientLogger.LOGGER.debug("Update uniqueEvent=" + uniqueEventID + ", nodeId=" + nodeId + ", memberInput=" + @@ -206,9 +206,9 @@ public final class Topology implements Serializable if (currentMember == null) { - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace(this + "::NewMemberAdd nodeId=" + nodeId + " member = " + memberInput, + ActiveMQClientLogger.LOGGER.trace(this + "::NewMemberAdd nodeId=" + nodeId + " member = " + memberInput, new Exception("trace")); } memberInput.setUniqueEventID(uniqueEventID); @@ -232,9 +232,9 @@ public final class Topology implements Serializable newMember.setBackup(currentMember.getBackup()); } - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace(this + "::updated currentMember=nodeID=" + nodeId + ", currentMember=" + + ActiveMQClientLogger.LOGGER.trace(this + "::updated currentMember=nodeID=" + nodeId + ", currentMember=" + currentMember + ", memberInput=" + memberInput + "newMember=" + newMember, new Exception("trace")); @@ -267,9 +267,9 @@ public final class Topology implements Serializable { final ArrayList copy = copyListeners(); - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace(this + "::prepare to send " + nodeId + " to " + copy.size() + " elements"); + ActiveMQClientLogger.LOGGER.trace(this + "::prepare to send " + nodeId + " to " + copy.size() + " elements"); } if (copy.size() > 0) @@ -280,9 +280,9 @@ public final class Topology implements Serializable { for (ClusterTopologyListener listener : copy) { - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace(Topology.this + " informing " + + ActiveMQClientLogger.LOGGER.trace(Topology.this + " informing " + listener + " about node up = " + nodeId + @@ -296,7 +296,7 @@ public final class Topology implements Serializable } catch (Throwable e) { - HornetQClientLogger.LOGGER.errorSendingTopology(e); + ActiveMQClientLogger.LOGGER.errorSendingTopology(e); } } } @@ -328,7 +328,7 @@ public final class Topology implements Serializable { if (member.getUniqueEventID() > uniqueEventID) { - HornetQClientLogger.LOGGER.debug("The removeMember was issued before the node " + nodeId + " was started, ignoring call"); + ActiveMQClientLogger.LOGGER.debug("The removeMember was issued before the node " + nodeId + " was started, ignoring call"); member = null; } else @@ -339,9 +339,9 @@ public final class Topology implements Serializable } } - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("removeMember " + this + + ActiveMQClientLogger.LOGGER.trace("removeMember " + this + " removing nodeID=" + nodeId + ", result=" + @@ -360,9 +360,9 @@ public final class Topology implements Serializable { for (ClusterTopologyListener listener : copy) { - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace(this + " informing " + listener + " about node down = " + nodeId); + ActiveMQClientLogger.LOGGER.trace(this + " informing " + listener + " about node down = " + nodeId); } try { @@ -370,7 +370,7 @@ public final class Topology implements Serializable } catch (Exception e) { - HornetQClientLogger.LOGGER.errorSendingTopologyNodedown(e); + ActiveMQClientLogger.LOGGER.errorSendingTopologyNodedown(e); } } } @@ -394,9 +394,9 @@ public final class Topology implements Serializable public synchronized void sendTopology(final ClusterTopologyListener listener) { - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { - HornetQClientLogger.LOGGER.debug(this + " is sending topology to " + listener); + ActiveMQClientLogger.LOGGER.debug(this + " is sending topology to " + listener); } execute(new Runnable() @@ -414,9 +414,9 @@ public final class Topology implements Serializable for (Map.Entry entry : copy.entrySet()) { - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { - HornetQClientLogger.LOGGER.debug(Topology.this + " sending " + + ActiveMQClientLogger.LOGGER.debug(Topology.this + " sending " + entry.getKey() + " / " + entry.getValue().getConnector() + diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/cluster/DiscoveryGroup.java b/activemq-core-client/src/main/java/org/apache/activemq/core/cluster/DiscoveryGroup.java index ce4dbd28f5..1ee0662bef 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/cluster/DiscoveryGroup.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/cluster/DiscoveryGroup.java @@ -27,8 +27,8 @@ import org.apache.activemq.api.core.BroadcastEndpointFactory; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.CoreNotificationType; -import org.apache.activemq.core.client.HornetQClientLogger; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.client.ActiveMQClientLogger; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.core.server.management.Notification; import org.apache.activemq.core.server.management.NotificationService; import org.apache.activemq.utils.TypedProperties; @@ -46,9 +46,9 @@ import org.apache.activemq.utils.TypedProperties; * @author Tim Fox * @author Clebert Suconic */ -public final class DiscoveryGroup implements HornetQComponent +public final class DiscoveryGroup implements ActiveMQComponent { - private static final boolean isTrace = HornetQClientLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQClientLogger.LOGGER.isTraceEnabled(); private final List listeners = new ArrayList(); @@ -106,7 +106,7 @@ public final class DiscoveryGroup implements HornetQComponent started = true; - thread = new Thread(new DiscoveryRunnable(), "hornetq-discovery-group-thread-" + name); + thread = new Thread(new DiscoveryRunnable(), "activemq-discovery-group-thread-" + name); thread.setDaemon(true); @@ -147,7 +147,7 @@ public final class DiscoveryGroup implements HornetQComponent } catch (Exception e1) { - HornetQClientLogger.LOGGER.errorStoppingDiscoveryBroadcastEndpoint(endpoint, e1); + ActiveMQClientLogger.LOGGER.errorStoppingDiscoveryBroadcastEndpoint(endpoint, e1); } try @@ -156,7 +156,7 @@ public final class DiscoveryGroup implements HornetQComponent thread.join(10000); if (thread.isAlive()) { - HornetQClientLogger.LOGGER.timedOutStoppingDiscovery(); + ActiveMQClientLogger.LOGGER.timedOutStoppingDiscovery(); } } catch (InterruptedException e) @@ -177,7 +177,7 @@ public final class DiscoveryGroup implements HornetQComponent } catch (Exception e) { - HornetQClientLogger.LOGGER.errorSendingNotifOnDiscoveryStop(e); + ActiveMQClientLogger.LOGGER.errorSendingNotifOnDiscoveryStop(e); } } } @@ -252,7 +252,7 @@ public final class DiscoveryGroup implements HornetQComponent { if (!currentUniqueID.equals(uniqueID)) { - HornetQClientLogger.LOGGER.multipleServersBroadcastingSameNode(originatingNodeID); + ActiveMQClientLogger.LOGGER.multipleServersBroadcastingSameNode(originatingNodeID); uniqueIDMap.put(originatingNodeID, uniqueID); } } @@ -278,7 +278,7 @@ public final class DiscoveryGroup implements HornetQComponent { // This is totally unexpected, so I'm not even bothering on creating // a log entry for that - HornetQClientLogger.LOGGER.warn("Unexpected null data received from DiscoveryEndpoint"); + ActiveMQClientLogger.LOGGER.warn("Unexpected null data received from DiscoveryEndpoint"); } break; } @@ -291,7 +291,7 @@ public final class DiscoveryGroup implements HornetQComponent } else { - HornetQClientLogger.LOGGER.errorReceivingPAcketInDiscovery(e); + ActiveMQClientLogger.LOGGER.errorReceivingPAcketInDiscovery(e); } } @@ -346,10 +346,10 @@ public final class DiscoveryGroup implements HornetQComponent { if (isTrace) { - HornetQClientLogger.LOGGER.trace("Connectors changed on Discovery:"); + ActiveMQClientLogger.LOGGER.trace("Connectors changed on Discovery:"); for (DiscoveryEntry connector : connectors.values()) { - HornetQClientLogger.LOGGER.trace(connector); + ActiveMQClientLogger.LOGGER.trace(connector); } } callListeners(); @@ -365,7 +365,7 @@ public final class DiscoveryGroup implements HornetQComponent } catch (Exception e) { - HornetQClientLogger.LOGGER.failedToReceiveDatagramInDiscovery(e); + ActiveMQClientLogger.LOGGER.failedToReceiveDatagramInDiscovery(e); } } @@ -397,7 +397,7 @@ public final class DiscoveryGroup implements HornetQComponent catch (Throwable t) { // Catch it so exception doesn't prevent other listeners from running - HornetQClientLogger.LOGGER.failedToCallListenerInDiscovery(t); + ActiveMQClientLogger.LOGGER.failedToCallListenerInDiscovery(t); } } } @@ -419,7 +419,7 @@ public final class DiscoveryGroup implements HornetQComponent { if (isTrace) { - HornetQClientLogger.LOGGER.trace("Timed out node on discovery:" + entry.getValue()); + ActiveMQClientLogger.LOGGER.trace("Timed out node on discovery:" + entry.getValue()); } iter.remove(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/exception/HornetQXAException.java b/activemq-core-client/src/main/java/org/apache/activemq/core/exception/ActiveMQXAException.java similarity index 81% rename from activemq-core-client/src/main/java/org/apache/activemq/core/exception/HornetQXAException.java rename to activemq-core-client/src/main/java/org/apache/activemq/core/exception/ActiveMQXAException.java index e721d3ef41..d25a364179 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/exception/HornetQXAException.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/exception/ActiveMQXAException.java @@ -15,24 +15,24 @@ package org.apache.activemq.core.exception; import javax.transaction.xa.XAException; /** - * A HornetQXAException + * A ActiveMQXAException * * @author Tim Fox * * */ -public class HornetQXAException extends XAException +public class ActiveMQXAException extends XAException { private static final long serialVersionUID = 6535914602965015803L; - public HornetQXAException(final int errorCode, final String message) + public ActiveMQXAException(final int errorCode, final String message) { super(message); this.errorCode = errorCode; } - public HornetQXAException(final int errorCode) + public ActiveMQXAException(final int errorCode) { super(errorCode); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/message/BodyEncoder.java b/activemq-core-client/src/main/java/org/apache/activemq/core/message/BodyEncoder.java index 609386e99e..e9267474b9 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/message/BodyEncoder.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/message/BodyEncoder.java @@ -28,27 +28,27 @@ import org.apache.activemq.api.core.ActiveMQException; public interface BodyEncoder { /** - * This method must not be called directly by HornetQ clients. + * This method must not be called directly by ActiveMQ clients. */ void open() throws ActiveMQException; /** - * This method must not be called directly by HornetQ clients. + * This method must not be called directly by ActiveMQ clients. */ void close() throws ActiveMQException; /** - * This method must not be called directly by HornetQ clients. + * This method must not be called directly by ActiveMQ clients. */ int encode(ByteBuffer bufferRead) throws ActiveMQException; /** - * This method must not be called directly by HornetQ clients. + * This method must not be called directly by ActiveMQ clients. */ int encode(ActiveMQBuffer bufferOut, int size) throws ActiveMQException; /** - * This method must not be called directly by HornetQ clients. + * This method must not be called directly by ActiveMQ clients. */ long getLargeBodySize(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageImpl.java index 8d4f3d738d..a955b9a00a 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageImpl.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQPropertyConversionException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.core.buffers.impl.ResetLimitWrappedHornetQBuffer; +import org.apache.activemq.core.buffers.impl.ResetLimitWrappedActiveMQBuffer; import org.apache.activemq.core.message.BodyEncoder; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.utils.ByteUtil; @@ -34,7 +34,7 @@ import org.apache.activemq.utils.UUID; /** * A concrete implementation of a message *

- * All messages handled by HornetQ core are of this type + * All messages handled by ActiveMQ core are of this type * * @author Ovidiu Feodorov * @author Tim Fox @@ -78,7 +78,7 @@ public abstract class MessageImpl implements MessageInternal protected ActiveMQBuffer buffer; - protected ResetLimitWrappedHornetQBuffer bodyBuffer; + protected ResetLimitWrappedActiveMQBuffer bodyBuffer; protected volatile boolean bufferValid; @@ -100,7 +100,7 @@ public abstract class MessageImpl implements MessageInternal } /** - * overridden by the client message, we need access to the connection so we can create the appropriate HornetQBuffer. + * overridden by the client message, we need access to the connection so we can create the appropriate ActiveMQBuffer. * * @param type * @param durable @@ -265,7 +265,7 @@ public abstract class MessageImpl implements MessageInternal { if (bodyBuffer == null) { - bodyBuffer = new ResetLimitWrappedHornetQBuffer(BODY_OFFSET, buffer, this); + bodyBuffer = new ResetLimitWrappedActiveMQBuffer(BODY_OFFSET, buffer, this); } return bodyBuffer; @@ -299,7 +299,7 @@ public abstract class MessageImpl implements MessageInternal newBuffer.setIndex(0, getEndOfBodyPosition()); - return new ResetLimitWrappedHornetQBuffer(BODY_OFFSET, newBuffer, null); + return new ResetLimitWrappedActiveMQBuffer(BODY_OFFSET, newBuffer, null); } public long getMessageID() diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/CoreRemotingConnection.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/CoreRemotingConnection.java index 07fd4919c5..f9af32e1f5 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/CoreRemotingConnection.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/CoreRemotingConnection.java @@ -12,12 +12,12 @@ */ package org.apache.activemq.core.protocol.core; -import org.apache.activemq.core.security.HornetQPrincipal; +import org.apache.activemq.core.security.ActiveMQPrincipal; import org.apache.activemq.spi.core.protocol.RemotingConnection; /** - * Extension of RemotingConnection for the HornetQ core protocol + * Extension of RemotingConnection for the ActiveMQ core protocol * @author Tim Fox */ public interface CoreRemotingConnection extends RemotingConnection @@ -100,5 +100,5 @@ public interface CoreRemotingConnection extends RemotingConnection * Returns the default security principal * @return the principal */ - HornetQPrincipal getDefaultHornetQPrincipal(); + ActiveMQPrincipal getDefaultActiveMQPrincipal(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQClientProtocolManager.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ActiveMQClientProtocolManager.java similarity index 93% rename from activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQClientProtocolManager.java rename to activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ActiveMQClientProtocolManager.java index c98db9702d..ba593cc95a 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQClientProtocolManager.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ActiveMQClientProtocolManager.java @@ -28,9 +28,9 @@ import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; -import org.apache.activemq.core.client.HornetQClientLogger; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.api.core.client.ActiveMQClient; +import org.apache.activemq.core.client.ActiveMQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.protocol.ClientPacketDecoder; import org.apache.activemq.core.protocol.core.Channel; @@ -48,7 +48,7 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage_V2; import org.apache.activemq.core.protocol.core.impl.wireformat.Ping; import org.apache.activemq.core.protocol.core.impl.wireformat.SubscribeClusterTopologyUpdatesMessageV2; -import org.apache.activemq.core.remoting.impl.netty.HornetQFrameDecoder2; +import org.apache.activemq.core.remoting.impl.netty.ActiveMQFrameDecoder2; import org.apache.activemq.core.version.Version; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.remoting.ClientProtocolManager; @@ -71,7 +71,7 @@ import org.apache.activemq.utils.VersionLoader; * @author Clebert Suconic */ -public class HornetQClientProtocolManager implements ClientProtocolManager +public class ActiveMQClientProtocolManager implements ClientProtocolManager { private final int versionID = VersionLoader.getVersion().getIncrementingVersion(); @@ -104,13 +104,13 @@ public class HornetQClientProtocolManager implements ClientProtocolManager private final CountDownLatch waitLatch = new CountDownLatch(1); - public HornetQClientProtocolManager() + public ActiveMQClientProtocolManager() { } public String getName() { - return HornetQClient.DEFAULT_CORE_PROTOCOL; + return ActiveMQClient.DEFAULT_CORE_PROTOCOL; } public void setSessionFactory(ClientSessionFactory factory) @@ -126,7 +126,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager @Override public void addChannelHandlers(ChannelPipeline pipeline) { - pipeline.addLast("hornetq-decoder", new HornetQFrameDecoder2()); + pipeline.addLast("activemq-decoder", new ActiveMQFrameDecoder2()); } public boolean waitOnLatch(long milliseconds) throws InterruptedException @@ -284,7 +284,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize) throws ActiveMQException { if (!isAlive()) - throw HornetQClientMessageBundle.BUNDLE.clientSessionClosed(); + throw ActiveMQClientMessageBundle.BUNDLE.clientSessionClosed(); Channel sessionChannel = null; CreateSessionResponseMessage response = null; @@ -305,7 +305,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager synchronized (inCreateSessionGuard) { if (!isAlive()) - throw HornetQClientMessageBundle.BUNDLE.clientSessionClosed(); + throw ActiveMQClientMessageBundle.BUNDLE.clientSessionClosed(); inCreateSession = true; inCreateSessionLatch = new CountDownLatch(1); } @@ -369,7 +369,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager } else { - throw HornetQClientMessageBundle.BUNDLE.failedToCreateSession(t); + throw ActiveMQClientMessageBundle.BUNDLE.failedToCreateSession(t); } } finally @@ -388,7 +388,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager // these objects won't be null, otherwise it would keep retrying on the previous loop - return new HornetQSessionContext(name, connection, sessionChannel, response.getServerVersion(), confirmationWindowSize); + return new ActiveMQSessionContext(name, connection, sessionChannel, response.getServerVersion(), confirmationWindowSize); } @@ -478,10 +478,10 @@ public class HornetQClientProtocolManager implements ClientProtocolManager if (transportConnection.isUsingProtocolHandling()) { // no need to send handshake on inVM as inVM is not using the NettyProtocolHandling - String handshake = "HORNETQ"; - ActiveMQBuffer hqbuffer = connection.createBuffer(handshake.length()); - hqbuffer.writeBytes(handshake.getBytes()); - transportConnection.write(hqbuffer); + String handshake = "ACTIVEMQ"; + ActiveMQBuffer amqbuffer = connection.createBuffer(handshake.length()); + amqbuffer.writeBytes(handshake.getBytes()); + transportConnection.write(amqbuffer); } } @@ -565,9 +565,9 @@ public class HornetQClientProtocolManager implements ClientProtocolManager if (topMessage.isExit()) { - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { - HornetQClientLogger.LOGGER.debug("Notifying " + topMessage.getNodeID() + " going down"); + ActiveMQClientLogger.LOGGER.debug("Notifying " + topMessage.getNodeID() + " going down"); } if (topologyResponseHandler != null) diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQClientProtocolManagerFactory.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ActiveMQClientProtocolManagerFactory.java similarity index 72% rename from activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQClientProtocolManagerFactory.java rename to activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ActiveMQClientProtocolManagerFactory.java index 103e20df1c..857fedc838 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQClientProtocolManagerFactory.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ActiveMQClientProtocolManagerFactory.java @@ -20,23 +20,23 @@ import org.apache.activemq.spi.core.remoting.ClientProtocolManagerFactory; * @author Clebert Suconic */ -public class HornetQClientProtocolManagerFactory implements ClientProtocolManagerFactory +public class ActiveMQClientProtocolManagerFactory implements ClientProtocolManagerFactory { private static final long serialVersionUID = 1; - private static final HornetQClientProtocolManagerFactory INSTANCE = new HornetQClientProtocolManagerFactory(); + private static final ActiveMQClientProtocolManagerFactory INSTANCE = new ActiveMQClientProtocolManagerFactory(); - private HornetQClientProtocolManagerFactory() + private ActiveMQClientProtocolManagerFactory() { } - public static final HornetQClientProtocolManagerFactory getInstance() + public static final ActiveMQClientProtocolManagerFactory getInstance() { return INSTANCE; } public ClientProtocolManager newProtocolManager() { - return new HornetQClientProtocolManager(); + return new ActiveMQClientProtocolManager(); } } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQConsumerContext.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ActiveMQConsumerContext.java similarity index 87% rename from activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQConsumerContext.java rename to activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ActiveMQConsumerContext.java index 27585e834e..0747f48ad3 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQConsumerContext.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ActiveMQConsumerContext.java @@ -19,11 +19,11 @@ import org.apache.activemq.spi.core.remoting.ConsumerContext; * @author Clebert Suconic */ -public class HornetQConsumerContext extends ConsumerContext +public class ActiveMQConsumerContext extends ConsumerContext { private long id; - public HornetQConsumerContext(long id) + public ActiveMQConsumerContext(long id) { this.id = id; } @@ -39,7 +39,7 @@ public class HornetQConsumerContext extends ConsumerContext if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; - HornetQConsumerContext that = (HornetQConsumerContext) o; + ActiveMQConsumerContext that = (ActiveMQConsumerContext) o; if (id != that.id) return false; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQSessionContext.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ActiveMQSessionContext.java similarity index 94% rename from activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQSessionContext.java rename to activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ActiveMQSessionContext.java index 5589402095..4e3d34c229 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQSessionContext.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ActiveMQSessionContext.java @@ -31,8 +31,8 @@ import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.SendAcknowledgementHandler; -import org.apache.activemq.core.client.HornetQClientLogger; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.core.client.impl.AddressQueryImpl; import org.apache.activemq.core.client.impl.ClientConsumerImpl; import org.apache.activemq.core.client.impl.ClientConsumerInternal; @@ -50,7 +50,7 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.CreateQueueMessage import org.apache.activemq.core.protocol.core.impl.wireformat.CreateSessionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.CreateSharedQueueMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectConsumerMessage; -import org.apache.activemq.core.protocol.core.impl.wireformat.HornetQExceptionMessage; +import org.apache.activemq.core.protocol.core.impl.wireformat.ActiveMQExceptionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReattachSessionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReattachSessionResponseMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.RollbackMessage; @@ -107,7 +107,7 @@ import static org.apache.activemq.core.protocol.core.impl.PacketImpl.SESS_RECEIV * @author Clebert Suconic */ -public class HornetQSessionContext extends SessionContext +public class ActiveMQSessionContext extends SessionContext { private final Channel sessionChannel; private final int serverVersion; @@ -115,7 +115,7 @@ public class HornetQSessionContext extends SessionContext private final String name; - public HornetQSessionContext(String name, RemotingConnection remotingConnection, Channel sessionChannel, int serverVersion, int confirmationWindow) + public ActiveMQSessionContext(String name, RemotingConnection remotingConnection, Channel sessionChannel, int serverVersion, int confirmationWindow) { super(remotingConnection); @@ -241,7 +241,7 @@ public class HornetQSessionContext extends SessionContext { long consumerID = idGenerator.generateID(); - HornetQConsumerContext consumerContext = new HornetQConsumerContext(consumerID); + ActiveMQConsumerContext consumerContext = new ActiveMQConsumerContext(consumerID); SessionCreateConsumerMessage request = new SessionCreateConsumerMessage(consumerID, queueName, @@ -345,9 +345,9 @@ public class HornetQSessionContext extends SessionContext throw new XAException(response.getResponseCode()); } - if (HornetQClientLogger.LOGGER.isTraceEnabled()) + if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { - HornetQClientLogger.LOGGER.trace("finished commit on " + ClientSessionImpl.convert(xid) + " with response = " + response); + ActiveMQClientLogger.LOGGER.trace("finished commit on " + ClientSessionImpl.convert(xid) + " with response = " + response); } } @@ -386,7 +386,7 @@ public class HornetQSessionContext extends SessionContext } /** - * HornetQ does support large messages + * ActiveMQ does support large messages * * @return */ @@ -555,7 +555,7 @@ public class HornetQSessionContext extends SessionContext if (response.isError()) { - HornetQClientLogger.LOGGER.errorCallingStart(response.getMessage(), response.getResponseCode()); + ActiveMQClientLogger.LOGGER.errorCallingStart(response.getMessage(), response.getResponseCode()); throw new XAException(response.getResponseCode()); } } @@ -596,9 +596,9 @@ public class HornetQSessionContext extends SessionContext if (response.isReattached()) { - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { - HornetQClientLogger.LOGGER.debug("ClientSession reattached fine, replaying commands"); + ActiveMQClientLogger.LOGGER.debug("ClientSession reattached fine, replaying commands"); } // The session was found on the server - we reattached transparently ok @@ -651,7 +651,7 @@ public class HornetQSessionContext extends SessionContext // the session was created while its server was starting, retry it: if (e.getType() == ActiveMQExceptionType.SESSION_CREATION_REJECTED) { - HornetQClientLogger.LOGGER.retryCreateSessionSeverStarting(name); + ActiveMQClientLogger.LOGGER.retryCreateSessionSeverStarting(name); retry = true; // sleep a little bit to avoid spinning too much try @@ -752,7 +752,7 @@ public class HornetQSessionContext extends SessionContext /** - * This doesn't apply to other protocols probably, so it will be a hornetq exclusive feature + * This doesn't apply to other protocols probably, so it will be an ActiveMQ exclusive feature * * @throws org.apache.activemq.api.core.ActiveMQException */ @@ -760,7 +760,7 @@ public class HornetQSessionContext extends SessionContext { DisconnectConsumerMessage message = packet; - session.handleConsumerDisconnect(new HornetQConsumerContext(message.getConsumerId())); + session.handleConsumerDisconnect(new ActiveMQConsumerContext(message.getConsumerId())); } private void handleReceivedMessagePacket(SessionReceiveMessage messagePacket) throws Exception @@ -771,7 +771,7 @@ public class HornetQSessionContext extends SessionContext msgi.setFlowControlSize(messagePacket.getPacketSize()); - handleReceiveMessage(new HornetQConsumerContext(messagePacket.getConsumerID()), msgi); + handleReceiveMessage(new ActiveMQConsumerContext(messagePacket.getConsumerID()), msgi); } private void handleReceiveLargeMessage(SessionReceiveLargeMessage serverPacket) throws Exception @@ -782,13 +782,13 @@ public class HornetQSessionContext extends SessionContext clientLargeMessage.setDeliveryCount(serverPacket.getDeliveryCount()); - handleReceiveLargeMessage(new HornetQConsumerContext(serverPacket.getConsumerID()), clientLargeMessage, serverPacket.getLargeMessageSize()); + handleReceiveLargeMessage(new ActiveMQConsumerContext(serverPacket.getConsumerID()), clientLargeMessage, serverPacket.getLargeMessageSize()); } private void handleReceiveContinuation(SessionReceiveContinuationMessage continuationPacket) throws Exception { - handleReceiveContinuation(new HornetQConsumerContext(continuationPacket.getConsumerID()), continuationPacket.getBody(), continuationPacket.getPacketSize(), + handleReceiveContinuation(new ActiveMQConsumerContext(continuationPacket.getConsumerID()), continuationPacket.getBody(), continuationPacket.getPacketSize(), continuationPacket.isContinues()); } @@ -854,9 +854,9 @@ public class HornetQSessionContext extends SessionContext { // We can only log these exceptions // maybe we should cache it on SessionContext and throw an exception on any next calls - HornetQExceptionMessage mem = (HornetQExceptionMessage) packet; + ActiveMQExceptionMessage mem = (ActiveMQExceptionMessage) packet; - HornetQClientLogger.LOGGER.receivedExceptionAsynchronously(mem.getException()); + ActiveMQClientLogger.LOGGER.receivedExceptionAsynchronously(mem.getException()); break; } @@ -868,7 +868,7 @@ public class HornetQSessionContext extends SessionContext } catch (Exception e) { - HornetQClientLogger.LOGGER.failedToHandlePacket(e); + ActiveMQClientLogger.LOGGER.failedToHandlePacket(e); } sessionChannel.confirm(packet); @@ -877,7 +877,7 @@ public class HornetQSessionContext extends SessionContext private long getConsumerID(ClientConsumer consumer) { - return ((HornetQConsumerContext)consumer.getConsumerContext()).getId(); + return ((ActiveMQConsumerContext)consumer.getConsumerContext()).getId(); } private ClassLoader lookupTCCL() @@ -918,7 +918,7 @@ public class HornetQSessionContext extends SessionContext } else { - throw HornetQClientMessageBundle.BUNDLE.invalidWindowSize(windowSize); + throw ActiveMQClientMessageBundle.BUNDLE.invalidWindowSize(windowSize); } return clientWindowSize; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ChannelImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ChannelImpl.java index c5709b48cd..de7a3efd10 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ChannelImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ChannelImpl.java @@ -25,14 +25,14 @@ import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.Interceptor; -import org.apache.activemq.core.client.HornetQClientLogger; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.core.protocol.core.Channel; import org.apache.activemq.core.protocol.core.ChannelHandler; import org.apache.activemq.core.protocol.core.CommandConfirmationHandler; import org.apache.activemq.core.protocol.core.CoreRemotingConnection; import org.apache.activemq.core.protocol.core.Packet; -import org.apache.activemq.core.protocol.core.impl.wireformat.HornetQExceptionMessage; +import org.apache.activemq.core.protocol.core.impl.wireformat.ActiveMQExceptionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.PacketsConfirmedMessage; import org.apache.activemq.spi.core.protocol.RemotingConnection; @@ -83,7 +83,7 @@ public final class ChannelImpl implements Channel } } - private static final boolean isTrace = HornetQClientLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQClientLogger.LOGGER.isTraceEnabled(); private volatile long id; @@ -193,7 +193,7 @@ public final class ChannelImpl implements Channel try { - response = new HornetQExceptionMessage(HornetQClientMessageBundle.BUNDLE.unblockingACall(cause)); + response = new ActiveMQExceptionMessage(ActiveMQClientMessageBundle.BUNDLE.unblockingACall(cause)); sendCondition.signal(); } @@ -237,7 +237,7 @@ public final class ChannelImpl implements Channel if (isTrace) { - HornetQClientLogger.LOGGER.trace("Sending packet nonblocking " + packet + " on channeID=" + id); + ActiveMQClientLogger.LOGGER.trace("Sending packet nonblocking " + packet + " on channeID=" + id); } ActiveMQBuffer buffer = packet.encode(connection); @@ -277,7 +277,7 @@ public final class ChannelImpl implements Channel if (isTrace) { - HornetQClientLogger.LOGGER.trace("Writing buffer for channelID=" + id); + ActiveMQClientLogger.LOGGER.trace("Writing buffer for channelID=" + id); } @@ -301,12 +301,12 @@ public final class ChannelImpl implements Channel if (interceptionResult != null) { // if we don't throw an exception here the client might not unblock - throw HornetQClientMessageBundle.BUNDLE.interceptorRejectedPacket(interceptionResult); + throw ActiveMQClientMessageBundle.BUNDLE.interceptorRejectedPacket(interceptionResult); } if (closed) { - throw HornetQClientMessageBundle.BUNDLE.connectionDestroyed(); + throw ActiveMQClientMessageBundle.BUNDLE.connectionDestroyed(); } if (connection.getBlockingCallTimeout() == -1) @@ -341,7 +341,7 @@ public final class ChannelImpl implements Channel { if (!failoverCondition.await(connection.getBlockingCallFailoverTimeout(), TimeUnit.MILLISECONDS)) { - HornetQClientLogger.LOGGER.debug("timed-out waiting for failover condition"); + ActiveMQClientLogger.LOGGER.debug("timed-out waiting for failover condition"); } } } @@ -378,7 +378,7 @@ public final class ChannelImpl implements Channel if (response != null && response.getType() != PacketImpl.EXCEPTION && response.getType() != expectedPacket) { - HornetQClientLogger.LOGGER.packetOutOfOrder(response, new Exception("trace")); + ActiveMQClientLogger.LOGGER.packetOutOfOrder(response, new Exception("trace")); } if (closed) @@ -395,12 +395,12 @@ public final class ChannelImpl implements Channel if (response == null) { - throw HornetQClientMessageBundle.BUNDLE.timedOutSendingPacket(packet.getType()); + throw ActiveMQClientMessageBundle.BUNDLE.timedOutSendingPacket(packet.getType()); } if (response.getType() == PacketImpl.EXCEPTION) { - final HornetQExceptionMessage mem = (HornetQExceptionMessage) response; + final ActiveMQExceptionMessage mem = (ActiveMQExceptionMessage) response; ActiveMQException e = mem.getException(); @@ -433,13 +433,13 @@ public final class ChannelImpl implements Channel { boolean callNext = interceptor.intercept(packet, connection); - if (HornetQClientLogger.LOGGER.isDebugEnabled()) + if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) { // use a StringBuilder for speed since this may be executed a lot StringBuilder msg = new StringBuilder(); msg.append("Invocation of interceptor ").append(interceptor.getClass().getName()).append(" on "). append(packet).append(" returned ").append(callNext); - HornetQClientLogger.LOGGER.debug(msg.toString()); + ActiveMQClientLogger.LOGGER.debug(msg.toString()); } if (!callNext) @@ -449,7 +449,7 @@ public final class ChannelImpl implements Channel } catch (final Throwable e) { - HornetQClientLogger.LOGGER.errorCallingInterceptor(e, interceptor); + ActiveMQClientLogger.LOGGER.errorCallingInterceptor(e, interceptor); } } } @@ -488,7 +488,7 @@ public final class ChannelImpl implements Channel if (!connection.isDestroyed() && !connection.removeChannel(id)) { - throw HornetQClientMessageBundle.BUNDLE.noChannelToClose(id); + throw ActiveMQClientMessageBundle.BUNDLE.noChannelToClose(id); } if (failingOver) @@ -524,7 +524,7 @@ public final class ChannelImpl implements Channel { if (isTrace) { - HornetQClientLogger.LOGGER.trace("Replaying commands on channelID=" + id); + ActiveMQClientLogger.LOGGER.trace("Replaying commands on channelID=" + id); } clearUpTo(otherLastConfirmedCommandID); @@ -664,7 +664,7 @@ public final class ChannelImpl implements Channel if (numberToClear == -1) { - throw HornetQClientMessageBundle.BUNDLE.invalidCommandID(lastReceivedCommandID); + throw ActiveMQClientMessageBundle.BUNDLE.invalidCommandID(lastReceivedCommandID); } int sizeToFree = 0; @@ -677,7 +677,7 @@ public final class ChannelImpl implements Channel { if (lastReceivedCommandID > 0) { - HornetQClientLogger.LOGGER.cannotFindPacketToClear(lastReceivedCommandID, firstStoredCommandID); + ActiveMQClientLogger.LOGGER.cannotFindPacketToClear(lastReceivedCommandID, firstStoredCommandID); } firstStoredCommandID = lastReceivedCommandID + 1; return; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketDecoder.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketDecoder.java index 764f8ecceb..7aeace4b6c 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketDecoder.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketDecoder.java @@ -77,7 +77,7 @@ import static org.apache.activemq.core.protocol.core.impl.PacketImpl.SUBSCRIBE_T import java.io.Serializable; import org.apache.activemq.api.core.ActiveMQBuffer; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.wireformat.CheckFailoverMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.CheckFailoverReplyMessage; @@ -91,7 +91,7 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.CreateSharedQueueM import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectConsumerMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage_V2; -import org.apache.activemq.core.protocol.core.impl.wireformat.HornetQExceptionMessage; +import org.apache.activemq.core.protocol.core.impl.wireformat.ActiveMQExceptionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.NullResponseMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.PacketsConfirmedMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.Ping; @@ -174,7 +174,7 @@ public abstract class PacketDecoder implements Serializable } case EXCEPTION: { - packet = new HornetQExceptionMessage(); + packet = new ActiveMQExceptionMessage(); break; } case PACKETS_CONFIRMED: @@ -464,7 +464,7 @@ public abstract class PacketDecoder implements Serializable } default: { - throw HornetQClientMessageBundle.BUNDLE.invalidType(packetType); + throw ActiveMQClientMessageBundle.BUNDLE.invalidType(packetType); } } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/RemotingConnectionImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/RemotingConnectionImpl.java index 7e5b4f08b6..9104d48a97 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/RemotingConnectionImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/RemotingConnectionImpl.java @@ -23,14 +23,14 @@ import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.core.client.HornetQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientLogger; import org.apache.activemq.core.protocol.core.Channel; import org.apache.activemq.core.protocol.core.CoreRemotingConnection; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.ChannelImpl.CHANNEL_ID; import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage_V2; -import org.apache.activemq.core.security.HornetQPrincipal; +import org.apache.activemq.core.security.ActiveMQPrincipal; import org.apache.activemq.spi.core.protocol.AbstractRemotingConnection; import org.apache.activemq.spi.core.remoting.Connection; import org.apache.activemq.utils.SimpleIDGenerator; @@ -44,7 +44,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement // Constants // ------------------------------------------------------------------------------------ - private static final boolean isTrace = HornetQClientLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQClientLogger.LOGGER.isTraceEnabled(); // Static // --------------------------------------------------------------------------------------- @@ -210,7 +210,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement destroyed = true; } - HornetQClientLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType()); + ActiveMQClientLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType()); try @@ -219,7 +219,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement } catch (Throwable e) { - HornetQClientLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQClientLogger.LOGGER.warn(e.getMessage(), e); } // Then call the listeners @@ -359,9 +359,9 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement } } - public HornetQPrincipal getDefaultHornetQPrincipal() + public ActiveMQPrincipal getDefaultActiveMQPrincipal() { - return getTransportConnection().getDefaultHornetQPrincipal(); + return getTransportConnection().getDefaultActiveMQPrincipal(); } // Buffer Handler implementation @@ -374,7 +374,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement if (isTrace) { - HornetQClientLogger.LOGGER.trace("handling packet " + packet); + ActiveMQClientLogger.LOGGER.trace("handling packet " + packet); } if (packet.isAsyncExec() && executor != null) @@ -391,7 +391,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement } catch (Throwable t) { - HornetQClientLogger.LOGGER.errorHandlingPacket(t, packet); + ActiveMQClientLogger.LOGGER.errorHandlingPacket(t, packet); } executing = false; @@ -415,7 +415,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement } catch (Exception e) { - HornetQClientLogger.LOGGER.errorDecodingPacket(e); + ActiveMQClientLogger.LOGGER.errorDecodingPacket(e); } } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/HornetQExceptionMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ActiveMQExceptionMessage.java similarity index 90% rename from activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/HornetQExceptionMessage.java rename to activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ActiveMQExceptionMessage.java index f8bfe5aa41..14877f4d60 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/HornetQExceptionMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ActiveMQExceptionMessage.java @@ -21,7 +21,7 @@ import org.apache.activemq.core.protocol.core.impl.PacketImpl; * @author Jeff Mesnil * @author Tim Fox */ -public class HornetQExceptionMessage extends PacketImpl +public class ActiveMQExceptionMessage extends PacketImpl { private ActiveMQException exception; @@ -30,14 +30,14 @@ public class HornetQExceptionMessage extends PacketImpl // Constructors -------------------------------------------------- - public HornetQExceptionMessage(final ActiveMQException exception) + public ActiveMQExceptionMessage(final ActiveMQException exception) { super(EXCEPTION); this.exception = exception; } - public HornetQExceptionMessage() + public ActiveMQExceptionMessage() { super(EXCEPTION); } @@ -97,11 +97,11 @@ public class HornetQExceptionMessage extends PacketImpl { return false; } - if (!(obj instanceof HornetQExceptionMessage)) + if (!(obj instanceof ActiveMQExceptionMessage)) { return false; } - HornetQExceptionMessage other = (HornetQExceptionMessage)obj; + ActiveMQExceptionMessage other = (ActiveMQExceptionMessage)obj; if (exception == null) { if (other.exception != null) diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/HornetQAMQPFrameDecoder.java b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/ActiveMQAMQPFrameDecoder.java similarity index 92% rename from activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/HornetQAMQPFrameDecoder.java rename to activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/ActiveMQAMQPFrameDecoder.java index ed6bf75ac8..dc6e658eab 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/HornetQAMQPFrameDecoder.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/ActiveMQAMQPFrameDecoder.java @@ -23,9 +23,9 @@ import io.netty.handler.codec.LengthFieldBasedFrameDecoder; * @author Norman Maurer * @version $Revision: 7839 $, $Date: 2009-08-21 02:26:39 +0900 (2009-08-21, 금) $ */ -public class HornetQAMQPFrameDecoder extends LengthFieldBasedFrameDecoder +public class ActiveMQAMQPFrameDecoder extends LengthFieldBasedFrameDecoder { - public HornetQAMQPFrameDecoder() + public ActiveMQAMQPFrameDecoder() { // The interface itself is part of the buffer (hence the -4) super(Integer.MAX_VALUE, 0, 4, -4 , 0); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/HornetQChannelHandler.java b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/ActiveMQChannelHandler.java similarity index 85% rename from activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/HornetQChannelHandler.java rename to activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/ActiveMQChannelHandler.java index c7e3fd6401..d075a9826c 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/HornetQChannelHandler.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/ActiveMQChannelHandler.java @@ -19,8 +19,8 @@ import io.netty.channel.ChannelHandlerContext; import io.netty.channel.group.ChannelGroup; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.buffers.impl.ChannelBufferWrapper; -import org.apache.activemq.core.client.HornetQClientLogger; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.spi.core.remoting.BufferHandler; import org.apache.activemq.spi.core.remoting.ConnectionLifeCycleListener; @@ -32,7 +32,7 @@ import org.apache.activemq.spi.core.remoting.ConnectionLifeCycleListener; * @author Norman Maurer * @version $Rev$, $Date$ */ -public class HornetQChannelHandler extends ChannelDuplexHandler +public class ActiveMQChannelHandler extends ChannelDuplexHandler { private final ChannelGroup group; @@ -42,9 +42,9 @@ public class HornetQChannelHandler extends ChannelDuplexHandler volatile boolean active; - protected HornetQChannelHandler(final ChannelGroup group, - final BufferHandler handler, - final ConnectionLifeCycleListener listener) + protected ActiveMQChannelHandler(final ChannelGroup group, + final BufferHandler handler, + final ConnectionLifeCycleListener listener) { this.group = group; this.handler = handler; @@ -98,7 +98,7 @@ public class HornetQChannelHandler extends ChannelDuplexHandler // and we don't want to spew out stack traces in that event // The user has access to this exeception anyway via the ActiveMQException initial cause - ActiveMQException me = HornetQClientMessageBundle.BUNDLE.nettyError(); + ActiveMQException me = ActiveMQClientMessageBundle.BUNDLE.nettyError(); me.initCause(cause); synchronized (listener) @@ -110,7 +110,7 @@ public class HornetQChannelHandler extends ChannelDuplexHandler } catch (Exception ex) { - HornetQClientLogger.LOGGER.errorCallingLifeCycleListener(ex); + ActiveMQClientLogger.LOGGER.errorCallingLifeCycleListener(ex); } } } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/HornetQFrameDecoder2.java b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/ActiveMQFrameDecoder2.java similarity index 93% rename from activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/HornetQFrameDecoder2.java rename to activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/ActiveMQFrameDecoder2.java index 17b5fc7529..4c74b1b00a 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/HornetQFrameDecoder2.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/ActiveMQFrameDecoder2.java @@ -24,9 +24,9 @@ import org.apache.activemq.utils.DataConstants; * @author Norman Maurer * @version $Revision: 7839 $, $Date: 2009-08-21 02:26:39 +0900 (2009-08-21, 금) $ */ -public class HornetQFrameDecoder2 extends LengthFieldBasedFrameDecoder +public class ActiveMQFrameDecoder2 extends LengthFieldBasedFrameDecoder { - public HornetQFrameDecoder2() + public ActiveMQFrameDecoder2() { super(Integer.MAX_VALUE, 0, DataConstants.SIZE_INT); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyConnection.java b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyConnection.java index 6dbf38a904..b068b794ca 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyConnection.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyConnection.java @@ -29,8 +29,8 @@ import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.buffers.impl.ChannelBufferWrapper; -import org.apache.activemq.core.client.HornetQClientLogger; -import org.apache.activemq.core.security.HornetQPrincipal; +import org.apache.activemq.core.client.ActiveMQClientLogger; +import org.apache.activemq.core.security.ActiveMQPrincipal; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.remoting.Connection; import org.apache.activemq.spi.core.remoting.ConnectionLifeCycleListener; @@ -110,7 +110,7 @@ public class NettyConnection implements Connection } catch (Throwable e) { - HornetQClientLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQClientLogger.LOGGER.warn(e.getMessage(), e); } } } @@ -320,7 +320,7 @@ public class NettyConnection implements Connection if (!ok) { - HornetQClientLogger.LOGGER.timeoutFlushingPacket(); + ActiveMQClientLogger.LOGGER.timeoutFlushingPacket(); } break; @@ -369,7 +369,7 @@ public class NettyConnection implements Connection } //never allow this - public HornetQPrincipal getDefaultHornetQPrincipal() + public ActiveMQPrincipal getDefaultActiveMQPrincipal() { return null; } @@ -428,7 +428,7 @@ public class NettyConnection implements Connection if (!sslCloseFuture.awaitUninterruptibly(10000)) { - HornetQClientLogger.LOGGER.timeoutClosingSSL(); + ActiveMQClientLogger.LOGGER.timeoutClosingSSL(); } } catch (Throwable t) @@ -440,7 +440,7 @@ public class NettyConnection implements Connection ChannelFuture closeFuture = channel.close(); if (!closeFuture.awaitUninterruptibly(10000)) { - HornetQClientLogger.LOGGER.timeoutClosingNettyChannel(); + ActiveMQClientLogger.LOGGER.timeoutClosingNettyChannel(); } } // Inner classes ------------------------------------------------- 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 f6defe9e17..b4ea7b5f73 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 @@ -97,12 +97,12 @@ import io.netty.util.concurrent.Future; import io.netty.util.concurrent.GlobalEventExecutor; 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.ActiveMQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl; -import org.apache.activemq.core.protocol.core.impl.HornetQClientProtocolManager; +import org.apache.activemq.core.protocol.core.impl.ActiveMQClientProtocolManager; import org.apache.activemq.core.remoting.impl.ssl.SSLSupport; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.spi.core.remoting.AbstractConnector; import org.apache.activemq.spi.core.remoting.BufferHandler; import org.apache.activemq.spi.core.remoting.ClientProtocolManager; @@ -128,22 +128,22 @@ public class NettyConnector extends AbstractConnector public static final String JAVAX_KEYSTORE_PASSWORD_PROP_NAME = "javax.net.ssl.keyStorePassword"; public static final String JAVAX_TRUSTSTORE_PATH_PROP_NAME = "javax.net.ssl.trustStore"; public static final String JAVAX_TRUSTSTORE_PASSWORD_PROP_NAME = "javax.net.ssl.trustStorePassword"; - public static final String HORNETQ_KEYSTORE_PROVIDER_PROP_NAME = "org.apache.activemq.ssl.keyStoreProvider"; - public static final String HORNETQ_KEYSTORE_PATH_PROP_NAME = "org.apache.activemq.ssl.keyStore"; - public static final String HORNETQ_KEYSTORE_PASSWORD_PROP_NAME = "org.apache.activemq.ssl.keyStorePassword"; - public static final String HORNETQ_TRUSTSTORE_PROVIDER_PROP_NAME = "org.apache.activemq.ssl.trustStoreProvider"; - public static final String HORNETQ_TRUSTSTORE_PATH_PROP_NAME = "org.apache.activemq.ssl.trustStore"; - public static final String HORNETQ_TRUSTSTORE_PASSWORD_PROP_NAME = "org.apache.activemq.ssl.trustStorePassword"; + public static final String ACTIVEMQ_KEYSTORE_PROVIDER_PROP_NAME = "org.apache.activemq.ssl.keyStoreProvider"; + public static final String ACTIVEMQ_KEYSTORE_PATH_PROP_NAME = "org.apache.activemq.ssl.keyStore"; + public static final String ACTIVEMQ_KEYSTORE_PASSWORD_PROP_NAME = "org.apache.activemq.ssl.keyStorePassword"; + public static final String ACTIVEMQ_TRUSTSTORE_PROVIDER_PROP_NAME = "org.apache.activemq.ssl.trustStoreProvider"; + public static final String ACTIVEMQ_TRUSTSTORE_PATH_PROP_NAME = "org.apache.activemq.ssl.trustStore"; + public static final String ACTIVEMQ_TRUSTSTORE_PASSWORD_PROP_NAME = "org.apache.activemq.ssl.trustStorePassword"; // Constants for HTTP upgrade // These constants are exposed publicly as they are used on the server-side to fetch // headers from the HTTP request, compute some values and fill the HTTP response public static final String MAGIC_NUMBER = "CF70DEB8-70F9-4FBA-8B4F-DFC3E723B4CD"; - public static final String SEC_HORNETQ_REMOTING_KEY = "Sec-HornetQRemoting-Key"; - public static final String SEC_HORNETQ_REMOTING_ACCEPT = "Sec-HornetQRemoting-Accept"; - public static final String HORNETQ_REMOTING = "hornetq-remoting"; + public static final String SEC_ACTIVEMQ_REMOTING_KEY = "Sec-ActiveMQRemoting-Key"; + public static final String SEC_ACTIVEMQ_REMOTING_ACCEPT = "Sec-ActiveMQRemoting-Accept"; + public static final String ACTIVEMQ_REMOTING = "activemq-remoting"; - private static final AttributeKey REMOTING_KEY = AttributeKey.valueOf(SEC_HORNETQ_REMOTING_KEY); + private static final AttributeKey REMOTING_KEY = AttributeKey.valueOf(SEC_ACTIVEMQ_REMOTING_KEY); // Default Configuration public static final Map DEFAULT_CONFIG; @@ -183,7 +183,7 @@ public class NettyConnector extends AbstractConnector private final boolean httpRequiresSessionId; // if true, after the connection, the connector will send - // a HTTP GET request (+ Upgrade: hornetq-remoting) that + // a HTTP GET request (+ Upgrade: activemq-remoting) that // will be handled by the server's http server. private final boolean httpUpgradeEnabled; @@ -255,7 +255,7 @@ public class NettyConnector extends AbstractConnector final Executor threadPool, final ScheduledExecutorService scheduledThreadPool) { - this(configuration, handler, listener, closeExecutor, threadPool, scheduledThreadPool, new HornetQClientProtocolManager()); + this(configuration, handler, listener, closeExecutor, threadPool, scheduledThreadPool, new ActiveMQClientProtocolManager()); } @@ -273,12 +273,12 @@ public class NettyConnector extends AbstractConnector if (listener == null) { - throw HornetQClientMessageBundle.BUNDLE.nullListener(); + throw ActiveMQClientMessageBundle.BUNDLE.nullListener(); } if (handler == null) { - throw HornetQClientMessageBundle.BUNDLE.nullHandler(); + throw ActiveMQClientMessageBundle.BUNDLE.nullHandler(); } this.listener = listener; @@ -487,7 +487,7 @@ public class NettyConnector extends AbstractConnector bootstrap.option(ChannelOption.SO_KEEPALIVE, true); bootstrap.option(ChannelOption.SO_REUSEADDR, true); bootstrap.option(ChannelOption.ALLOCATOR, new UnpooledByteBufAllocator(false)); - channelGroup = new DefaultChannelGroup("hornetq-connector", GlobalEventExecutor.INSTANCE); + channelGroup = new DefaultChannelGroup("activemq-connector", GlobalEventExecutor.INSTANCE); final SSLContext context; if (sslEnabled) @@ -507,17 +507,17 @@ public class NettyConnector extends AbstractConnector realKeyStorePassword = System.getProperty(JAVAX_KEYSTORE_PASSWORD_PROP_NAME); } - if (System.getProperty(HORNETQ_KEYSTORE_PROVIDER_PROP_NAME) != null) + if (System.getProperty(ACTIVEMQ_KEYSTORE_PROVIDER_PROP_NAME) != null) { - realKeyStoreProvider = System.getProperty(HORNETQ_KEYSTORE_PROVIDER_PROP_NAME); + realKeyStoreProvider = System.getProperty(ACTIVEMQ_KEYSTORE_PROVIDER_PROP_NAME); } - if (System.getProperty(HORNETQ_KEYSTORE_PATH_PROP_NAME) != null) + if (System.getProperty(ACTIVEMQ_KEYSTORE_PATH_PROP_NAME) != null) { - realKeyStorePath = System.getProperty(HORNETQ_KEYSTORE_PATH_PROP_NAME); + realKeyStorePath = System.getProperty(ACTIVEMQ_KEYSTORE_PATH_PROP_NAME); } - if (System.getProperty(HORNETQ_KEYSTORE_PASSWORD_PROP_NAME) != null) + if (System.getProperty(ACTIVEMQ_KEYSTORE_PASSWORD_PROP_NAME) != null) { - realKeyStorePassword = System.getProperty(HORNETQ_KEYSTORE_PASSWORD_PROP_NAME); + realKeyStorePassword = System.getProperty(ACTIVEMQ_KEYSTORE_PASSWORD_PROP_NAME); } String realTrustStorePath = trustStorePath; @@ -532,17 +532,17 @@ public class NettyConnector extends AbstractConnector realTrustStorePassword = System.getProperty(JAVAX_TRUSTSTORE_PASSWORD_PROP_NAME); } - if (System.getProperty(HORNETQ_TRUSTSTORE_PROVIDER_PROP_NAME) != null) + if (System.getProperty(ACTIVEMQ_TRUSTSTORE_PROVIDER_PROP_NAME) != null) { - realTrustStoreProvider = System.getProperty(HORNETQ_TRUSTSTORE_PROVIDER_PROP_NAME); + realTrustStoreProvider = System.getProperty(ACTIVEMQ_TRUSTSTORE_PROVIDER_PROP_NAME); } - if (System.getProperty(HORNETQ_TRUSTSTORE_PATH_PROP_NAME) != null) + if (System.getProperty(ACTIVEMQ_TRUSTSTORE_PATH_PROP_NAME) != null) { - realTrustStorePath = System.getProperty(HORNETQ_TRUSTSTORE_PATH_PROP_NAME); + realTrustStorePath = System.getProperty(ACTIVEMQ_TRUSTSTORE_PATH_PROP_NAME); } - if (System.getProperty(HORNETQ_TRUSTSTORE_PASSWORD_PROP_NAME) != null) + if (System.getProperty(ACTIVEMQ_TRUSTSTORE_PASSWORD_PROP_NAME) != null) { - realTrustStorePassword = System.getProperty(HORNETQ_TRUSTSTORE_PASSWORD_PROP_NAME); + realTrustStorePassword = System.getProperty(ACTIVEMQ_TRUSTSTORE_PASSWORD_PROP_NAME); } context = SSLSupport.createContext(realKeyStoreProvider, realKeyStorePath, realKeyStorePassword, realTrustStoreProvider, realTrustStorePath, realTrustStorePassword); } @@ -591,7 +591,7 @@ public class NettyConnector extends AbstractConnector } catch (IllegalArgumentException e) { - HornetQClientLogger.LOGGER.invalidCipherSuite(SSLSupport.parseArrayIntoCommandSeparatedList(engine.getSupportedCipherSuites())); + ActiveMQClientLogger.LOGGER.invalidCipherSuite(SSLSupport.parseArrayIntoCommandSeparatedList(engine.getSupportedCipherSuites())); throw e; } } @@ -604,7 +604,7 @@ public class NettyConnector extends AbstractConnector } catch (IllegalArgumentException e) { - HornetQClientLogger.LOGGER.invalidProtocol(SSLSupport.parseArrayIntoCommandSeparatedList(engine.getSupportedProtocols())); + ActiveMQClientLogger.LOGGER.invalidProtocol(SSLSupport.parseArrayIntoCommandSeparatedList(engine.getSupportedProtocols())); throw e; } } @@ -639,7 +639,7 @@ public class NettyConnector extends AbstractConnector protocolManager.addChannelHandlers(pipeline); - pipeline.addLast(new HornetQClientChannelHandler(channelGroup, handler, new Listener())); + pipeline.addLast(new ActiveMQClientChannelHandler(channelGroup, handler, new Listener())); } }); @@ -650,7 +650,7 @@ public class NettyConnector extends AbstractConnector batchFlusherFuture = scheduledThreadPool.scheduleWithFixedDelay(flusher, batchDelay, batchDelay, TimeUnit.MILLISECONDS); } - HornetQClientLogger.LOGGER.debug("Started Netty Connector version " + TransportConstants.NETTY_VERSION); + ActiveMQClientLogger.LOGGER.debug("Started Netty Connector version " + TransportConstants.NETTY_VERSION); } public synchronized void close() @@ -719,7 +719,7 @@ public class NettyConnector extends AbstractConnector } } - HornetQClientLogger.LOGGER.debug("Remote destination: " + remoteDestination); + ActiveMQClientLogger.LOGGER.debug("Remote destination: " + remoteDestination); ChannelFuture future; //port 0 does not work so only use local address if set @@ -755,13 +755,13 @@ public class NettyConnector extends AbstractConnector if (handshakeFuture.isSuccess()) { ChannelPipeline channelPipeline = ch.pipeline(); - HornetQChannelHandler channelHandler = channelPipeline.get(HornetQChannelHandler.class); + ActiveMQChannelHandler channelHandler = channelPipeline.get(ActiveMQChannelHandler.class); channelHandler.active = true; } else { ch.close().awaitUninterruptibly(); - HornetQClientLogger.LOGGER.errorCreatingNettyConnection(handshakeFuture.cause()); + ActiveMQClientLogger.LOGGER.errorCreatingNettyConnection(handshakeFuture.cause()); return null; } } @@ -783,7 +783,7 @@ public class NettyConnector extends AbstractConnector URI uri = new URI("http", null, host, port, null, null, null); HttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, uri.getRawPath()); request.headers().set(HttpHeaders.Names.HOST, host); - request.headers().set(HttpHeaders.Names.UPGRADE, HORNETQ_REMOTING); + request.headers().set(HttpHeaders.Names.UPGRADE, ACTIVEMQ_REMOTING); request.headers().set(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.UPGRADE); final String endpoint = ConfigurationHelper.getStringProperty(TransportConstants.HTTP_UPGRADE_ENDPOINT_PROP_NAME, @@ -797,10 +797,10 @@ public class NettyConnector extends AbstractConnector // Get 16 bit nonce and base 64 encode it byte[] nonce = randomBytes(16); String key = base64(nonce); - request.headers().set(SEC_HORNETQ_REMOTING_KEY, key); + request.headers().set(SEC_ACTIVEMQ_REMOTING_KEY, key); ch.attr(REMOTING_KEY).set(key); - HornetQClientLogger.LOGGER.debugf("Sending HTTP request %s", request); + ActiveMQClientLogger.LOGGER.debugf("Sending HTTP request %s", request); // Send the HTTP request. ch.writeAndFlush(request); @@ -812,14 +812,14 @@ public class NettyConnector extends AbstractConnector } catch (URISyntaxException e) { - HornetQClientLogger.LOGGER.errorCreatingNettyConnection(e); + ActiveMQClientLogger.LOGGER.errorCreatingNettyConnection(e); return null; } } else { ChannelPipeline channelPipeline = ch.pipeline(); - HornetQChannelHandler channelHandler = channelPipeline.get(HornetQChannelHandler.class); + ActiveMQChannelHandler channelHandler = channelPipeline.get(ActiveMQChannelHandler.class); channelHandler.active = true; } @@ -835,7 +835,7 @@ public class NettyConnector extends AbstractConnector if (t != null && !(t instanceof ConnectException)) { - HornetQClientLogger.LOGGER.errorCreatingNettyConnection(future.cause()); + ActiveMQClientLogger.LOGGER.errorCreatingNettyConnection(future.cause()); } return null; @@ -852,11 +852,11 @@ public class NettyConnector extends AbstractConnector // Inner classes ------------------------------------------------- - private static final class HornetQClientChannelHandler extends HornetQChannelHandler + private static final class ActiveMQClientChannelHandler extends ActiveMQChannelHandler { - HornetQClientChannelHandler(final ChannelGroup group, - final BufferHandler handler, - final ConnectionLifeCycleListener listener) + ActiveMQClientChannelHandler(final ChannelGroup group, + final BufferHandler handler, + final ConnectionLifeCycleListener listener) { super(group, handler, listener); } @@ -882,29 +882,29 @@ public class NettyConnector extends AbstractConnector { HttpResponse response = (HttpResponse) msg; if (response.getStatus().code() == HttpResponseStatus.SWITCHING_PROTOCOLS.code() - && response.headers().get(HttpHeaders.Names.UPGRADE).equals(HORNETQ_REMOTING)) + && response.headers().get(HttpHeaders.Names.UPGRADE).equals(ACTIVEMQ_REMOTING)) { - String accept = response.headers().get(SEC_HORNETQ_REMOTING_ACCEPT); + String accept = response.headers().get(SEC_ACTIVEMQ_REMOTING_ACCEPT); String expectedResponse = createExpectedResponse(MAGIC_NUMBER, ctx.channel().attr(REMOTING_KEY).get()); if (expectedResponse.equals(accept)) { - // remove the http handlers and flag the hornetq channel handler as active + // remove the http handlers and flag the activemq channel handler as active pipeline.remove(httpClientCodec); pipeline.remove(this); handshakeComplete = true; - HornetQChannelHandler channelHandler = pipeline.get(HornetQChannelHandler.class); + ActiveMQChannelHandler channelHandler = pipeline.get(ActiveMQChannelHandler.class); channelHandler.active = true; } else { - HornetQClientLogger.LOGGER.httpHandshakeFailed(accept, expectedResponse); + ActiveMQClientLogger.LOGGER.httpHandshakeFailed(accept, expectedResponse); ctx.close(); } } else if (response.getStatus().code() == HttpResponseStatus.FORBIDDEN.code()) { - HornetQClientLogger.LOGGER.httpUpgradeNotSupportedByRemoteAcceptor(); + ActiveMQClientLogger.LOGGER.httpUpgradeNotSupportedByRemoteAcceptor(); ctx.close(); } latch.countDown(); @@ -914,7 +914,7 @@ public class NettyConnector extends AbstractConnector @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { - HornetQClientLogger.LOGGER.errorCreatingNettyConnection(cause); + ActiveMQClientLogger.LOGGER.errorCreatingNettyConnection(cause); ctx.close(); } @@ -1087,11 +1087,11 @@ public class NettyConnector extends AbstractConnector private class Listener implements ConnectionLifeCycleListener { - public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) + public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { if (connections.putIfAbsent(connection.getID(), connection) != null) { - throw HornetQClientMessageBundle.BUNDLE.connectionExists(connection.getID()); + throw ActiveMQClientMessageBundle.BUNDLE.connectionExists(connection.getID()); } } @@ -1173,13 +1173,13 @@ public class NettyConnector extends AbstractConnector InetAddress inetAddr2 = InetAddress.getByName(this.host); String ip1 = inetAddr1.getHostAddress(); String ip2 = inetAddr2.getHostAddress(); - HornetQClientLogger.LOGGER.debug(this + " host 1: " + host + " ip address: " + ip1 + " host 2: " + this.host + " ip address: " + ip2); + ActiveMQClientLogger.LOGGER.debug(this + " host 1: " + host + " ip address: " + ip1 + " host 2: " + this.host + " ip address: " + ip2); result = ip1.equals(ip2); } catch (UnknownHostException e) { - HornetQClientLogger.LOGGER.error("Cannot resolve host", e); + ActiveMQClientLogger.LOGGER.error("Cannot resolve host", e); } return result; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/SharedNioEventLoopGroup.java b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/SharedNioEventLoopGroup.java index 07fc89b225..c7ce7f9988 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/SharedNioEventLoopGroup.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/netty/SharedNioEventLoopGroup.java @@ -31,7 +31,7 @@ import io.netty.util.concurrent.FutureListener; import io.netty.util.concurrent.ImmediateEventExecutor; import io.netty.util.concurrent.Promise; import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl; -import org.apache.activemq.utils.HornetQThreadFactory; +import org.apache.activemq.utils.ActiveMQThreadFactory; import java.security.AccessController; import java.security.PrivilegedAction; @@ -90,7 +90,7 @@ public class SharedNioEventLoopGroup extends NioEventLoopGroup } else { - instance = new SharedNioEventLoopGroup(numThreads, new HornetQThreadFactory("HornetQ-client-netty-threads", true, getThisClassLoader())); + instance = new SharedNioEventLoopGroup(numThreads, new ActiveMQThreadFactory("ActiveMQ-client-netty-threads", true, getThisClassLoader())); } instance.nioChannelFactoryCount.incrementAndGet(); return instance; 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 172ce8cd6b..4c38dad3b0 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 @@ -172,7 +172,7 @@ public class TransportConstants public static final boolean DEFAULT_HTTP_UPGRADE_ENABLED = false; - public static final String DEFAULT_SERVLET_PATH = "/messaging/HornetQServlet"; + public static final String DEFAULT_SERVLET_PATH = "/messaging/ActiveMQServlet"; public static final long DEFAULT_BATCH_DELAY = 0; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/ssl/SSLSupport.java b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/ssl/SSLSupport.java index 7fab3cf15e..4d897792b4 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/ssl/SSLSupport.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/impl/ssl/SSLSupport.java @@ -34,7 +34,7 @@ import org.apache.activemq.utils.ClassloadingUtil; * @author Jeff Mesnil * @author Justin Bertram * - * Please note, this class supports PKCS#11 keystores, but there are no specific tests in the HornetQ test-suite to + * Please note, this class supports PKCS#11 keystores, but there are no specific tests in the ActiveMQ test-suite to * validate/verify this works because this requires a functioning PKCS#11 provider which is not available by default * (see java.security.Security#getProviders()). The main thing to keep in mind is that PKCS#11 keystores will have a * null keystore path. diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/package-info.java b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/package-info.java index 38339fc1a8..3de0e2e5ed 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/package-info.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/package-info.java @@ -13,7 +13,7 @@ /** * Remoting API. *
- * This package defines the API used by HornetQ for remoting. + * This package defines the API used by ActiveMQ for remoting. */ package org.apache.activemq.core.remoting; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/security/HornetQPrincipal.java b/activemq-core-client/src/main/java/org/apache/activemq/core/security/ActiveMQPrincipal.java similarity index 91% rename from activemq-core-client/src/main/java/org/apache/activemq/core/security/HornetQPrincipal.java rename to activemq-core-client/src/main/java/org/apache/activemq/core/security/ActiveMQPrincipal.java index b3e16fa53d..e8e94622ef 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/security/HornetQPrincipal.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/security/ActiveMQPrincipal.java @@ -17,13 +17,13 @@ package org.apache.activemq.core.security; * @author Andy Taylor * 1/30/12 */ -public class HornetQPrincipal +public class ActiveMQPrincipal { private final String userName; private final String password; - public HornetQPrincipal(String userName, String password) + public ActiveMQPrincipal(String userName, String password) { this.userName = userName; this.password = password; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/protocol/AbstractRemotingConnection.java b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/protocol/AbstractRemotingConnection.java index 28b3c90f22..5911c3db1d 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/protocol/AbstractRemotingConnection.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/protocol/AbstractRemotingConnection.java @@ -21,8 +21,8 @@ import java.util.concurrent.Executor; import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQInterruptedException; -import org.apache.activemq.core.client.HornetQClientLogger; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.core.remoting.CloseListener; import org.apache.activemq.core.remoting.FailureListener; import org.apache.activemq.spi.core.remoting.Connection; @@ -65,14 +65,14 @@ public abstract class AbstractRemotingConnection implements RemotingConnection catch (ActiveMQInterruptedException interrupted) { // this is an expected behaviour.. no warn or error here - HornetQClientLogger.LOGGER.debug("thread interrupted", interrupted); + ActiveMQClientLogger.LOGGER.debug("thread interrupted", interrupted); } catch (final Throwable t) { // Failure of one listener to execute shouldn't prevent others // from // executing - HornetQClientLogger.LOGGER.errorCallingFailureListener(t); + ActiveMQClientLogger.LOGGER.errorCallingFailureListener(t); } } } @@ -93,7 +93,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection // Failure of one listener to execute shouldn't prevent others // from // executing - HornetQClientLogger.LOGGER.errorCallingFailureListener(t); + ActiveMQClientLogger.LOGGER.errorCallingFailureListener(t); } } } @@ -119,7 +119,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { if (listener == null) { - throw HornetQClientMessageBundle.BUNDLE.failListenerCannotBeNull(); + throw ActiveMQClientMessageBundle.BUNDLE.failListenerCannotBeNull(); } failureListeners.add(listener); } @@ -128,7 +128,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { if (listener == null) { - throw HornetQClientMessageBundle.BUNDLE.failListenerCannotBeNull(); + throw ActiveMQClientMessageBundle.BUNDLE.failListenerCannotBeNull(); } return failureListeners.remove(listener); @@ -138,7 +138,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { if (listener == null) { - throw HornetQClientMessageBundle.BUNDLE.closeListenerCannotBeNull(); + throw ActiveMQClientMessageBundle.BUNDLE.closeListenerCannotBeNull(); } closeListeners.add(listener); @@ -148,7 +148,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { if (listener == null) { - throw HornetQClientMessageBundle.BUNDLE.closeListenerCannotBeNull(); + throw ActiveMQClientMessageBundle.BUNDLE.closeListenerCannotBeNull(); } return closeListeners.remove(listener); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/protocol/RemotingConnection.java b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/protocol/RemotingConnection.java index 95d7dc68e2..7547b4c2c1 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/protocol/RemotingConnection.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/protocol/RemotingConnection.java @@ -110,7 +110,7 @@ public interface RemotingConnection extends BufferHandler void setFailureListeners(List listeners); /** - * creates a new HornetQBuffer of the specified size. + * creates a new ActiveMQBuffer of the specified size. * * @param size the size of buffer required * @return the buffer diff --git a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/Connection.java b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/Connection.java index ae2db0be8d..5f4656c7b9 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/Connection.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/Connection.java @@ -15,7 +15,7 @@ package org.apache.activemq.spi.core.remoting; import io.netty.channel.ChannelFutureListener; import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.core.security.HornetQPrincipal; +import org.apache.activemq.core.security.ActiveMQPrincipal; import org.apache.activemq.spi.core.protocol.RemotingConnection; /** @@ -27,7 +27,7 @@ import org.apache.activemq.spi.core.protocol.RemotingConnection; public interface Connection { /** - * Create a new HornetQBuffer of the given size. + * Create a new ActiveMQBuffer of the given size. * * @param size the size of buffer to create * @return the new buffer. @@ -106,7 +106,7 @@ public interface Connection */ TransportConfiguration getConnectorConfig(); - HornetQPrincipal getDefaultHornetQPrincipal(); + ActiveMQPrincipal getDefaultActiveMQPrincipal(); /** * the InVM Connection has some special handling as it doesn't use Netty ProtocolChannel diff --git a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/ConnectionLifeCycleListener.java b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/ConnectionLifeCycleListener.java index f079bcda97..a1b287a272 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/ConnectionLifeCycleListener.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/ConnectionLifeCycleListener.java @@ -13,7 +13,7 @@ package org.apache.activemq.spi.core.remoting; import org.apache.activemq.api.core.ActiveMQException; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; /** * A ConnectionLifeCycleListener is called by the remoting implementation to notify of connection events. @@ -29,14 +29,14 @@ public interface ConnectionLifeCycleListener *

* Leaving this method here and adding a different one at * {@code ServerConnectionLifeCycleListener} is a compromise for a reasonable split between the - * hornetq-server and hornetq-client packages while avoiding to pull too much into hornetq-core. + * activemq-server and activemq-client packages while avoiding to pull too much into activemq-core. * The pivotal point keeping us from removing the method is {@link ConnectorFactory} and the * usage of it. * @param component This will probably be an {@code Acceptor} and only used on the server side. * @param connection the connection that has been created * @param protocol the messaging protocol type this connection uses */ - void connectionCreated(HornetQComponent component, Connection connection, String protocol); + void connectionCreated(ActiveMQComponent component, Connection connection, String protocol); /** * Called when a connection is destroyed. diff --git a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/package-info.java b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/package-info.java index d51337d540..c235a38c0f 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/package-info.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/package-info.java @@ -14,7 +14,7 @@ * Remoting SPI. *
* This package defines the Service Provide Interface that - * remoting providers must implement to be supported by HornetQ. + * remoting providers must implement to be supported by ActiveMQ. */ package org.apache.activemq.spi.core.remoting; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/utils/HornetQBufferInputStream.java b/activemq-core-client/src/main/java/org/apache/activemq/utils/ActiveMQBufferInputStream.java similarity index 96% rename from activemq-core-client/src/main/java/org/apache/activemq/utils/HornetQBufferInputStream.java rename to activemq-core-client/src/main/java/org/apache/activemq/utils/ActiveMQBufferInputStream.java index a5ef9d253f..81fa38ea03 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/utils/HornetQBufferInputStream.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/utils/ActiveMQBufferInputStream.java @@ -24,7 +24,7 @@ import org.apache.activemq.api.core.ActiveMQBuffer; * * */ -public class HornetQBufferInputStream extends InputStream +public class ActiveMQBufferInputStream extends InputStream { /* (non-Javadoc) @@ -41,7 +41,7 @@ public class HornetQBufferInputStream extends InputStream // Public -------------------------------------------------------- - public HornetQBufferInputStream(final ActiveMQBuffer paramByteBuffer) + public ActiveMQBufferInputStream(final ActiveMQBuffer paramByteBuffer) { bb = paramByteBuffer; } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/utils/BufferHelper.java b/activemq-core-client/src/main/java/org/apache/activemq/utils/BufferHelper.java index ca741faa41..bb64f0f76f 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/utils/BufferHelper.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/utils/BufferHelper.java @@ -16,7 +16,7 @@ import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; /** - * Helper methods to read and write from HornetQBuffer. + * Helper methods to read and write from ActiveMQBuffer. * * @author Clebert Suconic * diff --git a/activemq-core-client/src/main/java/org/apache/activemq/utils/ConfigurationHelper.java b/activemq-core-client/src/main/java/org/apache/activemq/utils/ConfigurationHelper.java index 90f3a89799..712f6063bd 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/utils/ConfigurationHelper.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/utils/ConfigurationHelper.java @@ -13,8 +13,8 @@ package org.apache.activemq.utils; import org.apache.activemq.api.core.ActiveMQException; -import org.apache.activemq.core.client.HornetQClientLogger; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import java.util.HashSet; import java.util.Map; @@ -76,7 +76,7 @@ public class ConfigurationHelper } else if (prop instanceof Number == false) { - HornetQClientLogger.LOGGER.propertyNotInteger(propName, prop.getClass().getName()); + ActiveMQClientLogger.LOGGER.propertyNotInteger(propName, prop.getClass().getName()); return def; } @@ -109,7 +109,7 @@ public class ConfigurationHelper } else if (prop instanceof Number == false) { - HornetQClientLogger.LOGGER.propertyNotLong(propName, prop.getClass().getName()); + ActiveMQClientLogger.LOGGER.propertyNotLong(propName, prop.getClass().getName()); return def; } @@ -142,7 +142,7 @@ public class ConfigurationHelper } else if (prop instanceof Boolean == false) { - HornetQClientLogger.LOGGER.propertyNotBoolean(propName, prop.getClass().getName()); + ActiveMQClientLogger.LOGGER.propertyNotBoolean(propName, prop.getClass().getName()); return def; } @@ -224,7 +224,7 @@ public class ConfigurationHelper if (classImpl == null) { - throw HornetQClientMessageBundle.BUNDLE.noCodec(); + throw ActiveMQClientMessageBundle.BUNDLE.noCodec(); } SensitiveDataCodec codec = null; @@ -234,7 +234,7 @@ public class ConfigurationHelper } catch (ActiveMQException e1) { - throw HornetQClientMessageBundle.BUNDLE.failedToGetDecoder(e1); + throw ActiveMQClientMessageBundle.BUNDLE.failedToGetDecoder(e1); } try @@ -243,7 +243,7 @@ public class ConfigurationHelper } catch (Exception e) { - throw HornetQClientMessageBundle.BUNDLE.errordecodingPassword(e); + throw ActiveMQClientMessageBundle.BUNDLE.errordecodingPassword(e); } } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/utils/MemorySize.java b/activemq-core-client/src/main/java/org/apache/activemq/utils/MemorySize.java index e1e6f40ab3..5ca3152c44 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/utils/MemorySize.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/utils/MemorySize.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.utils; -import org.apache.activemq.core.client.HornetQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientLogger; import java.lang.ref.WeakReference; @@ -105,7 +105,7 @@ public class MemorySize // throw new IllegalStateException("Warning: JVM allocated more data what would make results invalid " + // totalMemory1 + ":" + totalMemory2); - HornetQClientLogger.LOGGER.jvmAllocatedMoreMemory(totalMemory1, totalMemory2); + ActiveMQClientLogger.LOGGER.jvmAllocatedMoreMemory(totalMemory1, totalMemory2); } return size; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/utils/OrderedExecutorFactory.java b/activemq-core-client/src/main/java/org/apache/activemq/utils/OrderedExecutorFactory.java index e6debde45a..991e72ecd2 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/utils/OrderedExecutorFactory.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/utils/OrderedExecutorFactory.java @@ -16,7 +16,7 @@ import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.Executor; import org.apache.activemq.api.core.ActiveMQInterruptedException; -import org.apache.activemq.core.client.HornetQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientLogger; /** @@ -106,11 +106,11 @@ public final class OrderedExecutorFactory implements ExecutorFactory catch (ActiveMQInterruptedException e) { // This could happen during shutdowns. Nothing to be concerned about here - HornetQClientLogger.LOGGER.debug("Interrupted Thread", e); + ActiveMQClientLogger.LOGGER.debug("Interrupted Thread", e); } catch (Throwable t) { - HornetQClientLogger.LOGGER.caughtunexpectedThrowable(t); + ActiveMQClientLogger.LOGGER.caughtunexpectedThrowable(t); } } } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/utils/SoftValueHashMap.java b/activemq-core-client/src/main/java/org/apache/activemq/utils/SoftValueHashMap.java index d0eef04549..304fddffb7 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/utils/SoftValueHashMap.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/utils/SoftValueHashMap.java @@ -24,7 +24,7 @@ import java.util.Set; import java.util.TreeSet; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.core.client.HornetQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientLogger; /** * A SoftValueHashMap @@ -35,7 +35,7 @@ import org.apache.activemq.core.client.HornetQClientLogger; */ public class SoftValueHashMap implements Map { - private final boolean isTrace = HornetQClientLogger.LOGGER.isTraceEnabled(); + private final boolean isTrace = ActiveMQClientLogger.LOGGER.isTraceEnabled(); // The soft references that are already good. // too bad there's no way to override the queue method on ReferenceQueue, so I wouldn't need this @@ -190,7 +190,7 @@ public class SoftValueHashMap implemen if (isTrace) { - HornetQClientLogger.LOGGER.trace("Removing " + removed + " with id = " + ref.key + " from SoftValueHashMap"); + ActiveMQClientLogger.LOGGER.trace("Removing " + removed + " with id = " + ref.key + " from SoftValueHashMap"); } if (mapDelegate.size() <= maxElements) diff --git a/activemq-core-client/src/main/java/org/apache/activemq/utils/VersionLoader.java b/activemq-core-client/src/main/java/org/apache/activemq/utils/VersionLoader.java index 2710d8f6bf..a9fb2c6483 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/utils/VersionLoader.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/utils/VersionLoader.java @@ -25,7 +25,7 @@ import java.util.List; import java.util.Properties; import java.util.StringTokenizer; -import org.apache.activemq.core.client.HornetQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientLogger; import org.apache.activemq.core.version.Version; import org.apache.activemq.core.version.impl.VersionImpl; @@ -38,9 +38,9 @@ import org.apache.activemq.core.version.impl.VersionImpl; */ public final class VersionLoader { - public static final String VERSION_PROP_FILE_KEY = "hornetq.version.property.filename"; + public static final String VERSION_PROP_FILE_KEY = "activemq.version.property.filename"; - public static final String DEFAULT_PROP_FILE_NAME = "hornetq-version.properties"; + public static final String DEFAULT_PROP_FILE_NAME = "activemq-version.properties"; private static String PROP_FILE_NAME; @@ -63,7 +63,7 @@ public final class VersionLoader } catch (Throwable e) { - HornetQClientLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQClientLogger.LOGGER.warn(e.getMessage(), e); PROP_FILE_NAME = null; } @@ -77,7 +77,7 @@ public final class VersionLoader catch (Throwable e) { VersionLoader.versions = null; - HornetQClientLogger.LOGGER.error(e.getMessage(), e); + ActiveMQClientLogger.LOGGER.error(e.getMessage(), e); } } @@ -123,19 +123,19 @@ public final class VersionLoader { if (in == null) { - HornetQClientLogger.LOGGER.noVersionOnClasspath(getClasspathString()); + ActiveMQClientLogger.LOGGER.noVersionOnClasspath(getClasspathString()); throw new RuntimeException(VersionLoader.PROP_FILE_NAME + " is not available"); } try { versionProps.load(in); - String versionName = versionProps.getProperty("hornetq.version.versionName"); - int majorVersion = Integer.valueOf(versionProps.getProperty("hornetq.version.majorVersion")); - int minorVersion = Integer.valueOf(versionProps.getProperty("hornetq.version.minorVersion")); - int microVersion = Integer.valueOf(versionProps.getProperty("hornetq.version.microVersion")); - int[] incrementingVersions = parseCompatibleVersionList(versionProps.getProperty("hornetq.version.incrementingVersion")); - String versionSuffix = versionProps.getProperty("hornetq.version.versionSuffix"); - int[] compatibleVersionArray = parseCompatibleVersionList(versionProps.getProperty("hornetq.version.compatibleVersionList")); + String versionName = versionProps.getProperty("activemq.version.versionName"); + int majorVersion = Integer.valueOf(versionProps.getProperty("activemq.version.majorVersion")); + int minorVersion = Integer.valueOf(versionProps.getProperty("activemq.version.minorVersion")); + int microVersion = Integer.valueOf(versionProps.getProperty("activemq.version.microVersion")); + int[] incrementingVersions = parseCompatibleVersionList(versionProps.getProperty("activemq.version.incrementingVersion")); + String versionSuffix = versionProps.getProperty("activemq.version.versionSuffix"); + int[] compatibleVersionArray = parseCompatibleVersionList(versionProps.getProperty("activemq.version.compatibleVersionList")); List definedVersions = new ArrayList(incrementingVersions.length); for (int incrementingVersion : incrementingVersions) { diff --git a/activemq-core-client/src/main/java/org/apache/activemq/utils/XMLUtil.java b/activemq-core-client/src/main/java/org/apache/activemq/utils/XMLUtil.java index 48bdec4863..5f1fa7e83d 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/utils/XMLUtil.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/utils/XMLUtil.java @@ -29,8 +29,8 @@ import java.security.PrivilegedAction; import java.util.ArrayList; import java.util.List; -import org.apache.activemq.core.client.HornetQClientLogger; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; @@ -210,7 +210,7 @@ public final class XMLUtil } catch (Exception e) { - HornetQClientLogger.LOGGER.errorOnXMLTransform(e, n); + ActiveMQClientLogger.LOGGER.errorOnXMLTransform(e, n); return null; } } @@ -265,17 +265,17 @@ public final class XMLUtil { if (node == null) { - throw HornetQClientMessageBundle.BUNDLE.firstNodeNull(); + throw ActiveMQClientMessageBundle.BUNDLE.firstNodeNull(); } if (node2 == null) { - throw HornetQClientMessageBundle.BUNDLE.secondNodeNull(); + throw ActiveMQClientMessageBundle.BUNDLE.secondNodeNull(); } if (!node.getNodeName().equals(node2.getNodeName())) { - throw HornetQClientMessageBundle.BUNDLE.nodeHaveDifferentNames(); + throw ActiveMQClientMessageBundle.BUNDLE.nodeHaveDifferentNames(); } int attrCount = 0; @@ -294,7 +294,7 @@ public final class XMLUtil if (attrCount != attrCount2) { - throw HornetQClientMessageBundle.BUNDLE.nodeHaveDifferentAttNumber(); + throw ActiveMQClientMessageBundle.BUNDLE.nodeHaveDifferentAttNumber(); } outer: @@ -315,14 +315,14 @@ public final class XMLUtil continue outer; } } - throw HornetQClientMessageBundle.BUNDLE.attsDontMatch(name, value); + throw ActiveMQClientMessageBundle.BUNDLE.attsDontMatch(name, value); } boolean hasChildren = node.hasChildNodes(); if (hasChildren != node2.hasChildNodes()) { - throw HornetQClientMessageBundle.BUNDLE.oneNodeHasChildren(); + throw ActiveMQClientMessageBundle.BUNDLE.oneNodeHasChildren(); } if (hasChildren) @@ -338,7 +338,7 @@ public final class XMLUtil if (length != nodes2.size()) { - throw HornetQClientMessageBundle.BUNDLE.nodeHasDifferentChildNumber(); + throw ActiveMQClientMessageBundle.BUNDLE.nodeHasDifferentChildNumber(); } for (int i = 0; i < length; i++) @@ -402,7 +402,7 @@ public final class XMLUtil val = parts[1].trim(); } String sysProp = System.getProperty(prop, val); - HornetQClientLogger.LOGGER.debug("replacing " + subString + " with " + sysProp); + ActiveMQClientLogger.LOGGER.debug("replacing " + subString + " with " + sysProp); xml = xml.replace(subString, sysProp); } @@ -419,7 +419,7 @@ public final class XMLUtil } catch (NumberFormatException e) { - throw HornetQClientMessageBundle.BUNDLE.mustBeLong(elem, value); + throw ActiveMQClientMessageBundle.BUNDLE.mustBeLong(elem, value); } } @@ -433,7 +433,7 @@ public final class XMLUtil } catch (NumberFormatException e) { - throw HornetQClientMessageBundle.BUNDLE.mustBeInteger(elem, value); + throw ActiveMQClientMessageBundle.BUNDLE.mustBeInteger(elem, value); } } @@ -447,7 +447,7 @@ public final class XMLUtil } catch (NumberFormatException e) { - throw HornetQClientMessageBundle.BUNDLE.mustBeBoolean(elem, value); + throw ActiveMQClientMessageBundle.BUNDLE.mustBeBoolean(elem, value); } } @@ -461,7 +461,7 @@ public final class XMLUtil } catch (NumberFormatException e) { - throw HornetQClientMessageBundle.BUNDLE.mustBeDouble(elem, value); + throw ActiveMQClientMessageBundle.BUNDLE.mustBeDouble(elem, value); } } @@ -479,7 +479,7 @@ public final class XMLUtil } catch (SAXException e) { - HornetQClientLogger.LOGGER.errorOnXMLTransformInvalidConf(e); + ActiveMQClientLogger.LOGGER.errorOnXMLTransformInvalidConf(e); throw new IllegalStateException("Invalid configuration", e); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/utils/package-info.java b/activemq-core-client/src/main/java/org/apache/activemq/utils/package-info.java index eef54c6551..df23f67874 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/utils/package-info.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/utils/package-info.java @@ -13,7 +13,7 @@ /** * Utilities and helper classes. *
- * This package defines the utilities class used by HornetQ. + * This package defines the utilities class used by ActiveMQ. */ package org.apache.activemq.utils; diff --git a/activemq-core-client/src/main/resources/activemq-version.properties b/activemq-core-client/src/main/resources/activemq-version.properties new file mode 100644 index 0000000000..860a573a2d --- /dev/null +++ b/activemq-core-client/src/main/resources/activemq-version.properties @@ -0,0 +1,9 @@ +activemq.version.versionName=${activemq.version.versionName} +activemq.version.majorVersion=${activemq.version.majorVersion} +activemq.version.minorVersion=${activemq.version.minorVersion} +activemq.version.microVersion=${activemq.version.microVersion} +activemq.version.incrementingVersion=${activemq.version.incrementingVersion} +activemq.version.versionSuffix=${activemq.version.versionSuffix} +activemq.version.versionTag=${activemq.version.versionTag} +activemq.netty.version=${netty.version.string} +activemq.version.compatibleVersionList=121,122,123,124,125 diff --git a/activemq-core-client/src/main/resources/hornetq-version.properties b/activemq-core-client/src/main/resources/hornetq-version.properties deleted file mode 100644 index 53cf7c73d1..0000000000 --- a/activemq-core-client/src/main/resources/hornetq-version.properties +++ /dev/null @@ -1,9 +0,0 @@ -hornetq.version.versionName=${hornetq.version.versionName} -hornetq.version.majorVersion=${hornetq.version.majorVersion} -hornetq.version.minorVersion=${hornetq.version.minorVersion} -hornetq.version.microVersion=${hornetq.version.microVersion} -hornetq.version.incrementingVersion=${hornetq.version.incrementingVersion} -hornetq.version.versionSuffix=${hornetq.version.versionSuffix} -hornetq.version.versionTag=${hornetq.version.versionTag} -hornetq.netty.version=${netty.version.string} -hornetq.version.compatibleVersionList=121,122,123,124,125 diff --git a/activemq-core-client/src/test/java/org/apache/activemq/tests/CoreUnitTestCase.java b/activemq-core-client/src/test/java/org/apache/activemq/tests/CoreUnitTestCase.java index 327325a862..c067882a19 100644 --- a/activemq-core-client/src/test/java/org/apache/activemq/tests/CoreUnitTestCase.java +++ b/activemq-core-client/src/test/java/org/apache/activemq/tests/CoreUnitTestCase.java @@ -16,7 +16,7 @@ package org.apache.activemq.tests; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.core.client.HornetQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientLogger; import org.junit.Assert; import org.junit.Rule; import org.junit.rules.TestRule; @@ -33,7 +33,7 @@ public abstract class CoreUnitTestCase extends Assert } } - private static final HornetQClientLogger log = HornetQClientLogger.LOGGER; + private static final ActiveMQClientLogger log = ActiveMQClientLogger.LOGGER; @Rule public TestRule watcher = new TestWatcher() diff --git a/activemq-dto/src/main/java/org/apache/activemq/dto/XmlUtil.java b/activemq-dto/src/main/java/org/apache/activemq/dto/XmlUtil.java index 32ae14a479..eb1cec0727 100644 --- a/activemq-dto/src/main/java/org/apache/activemq/dto/XmlUtil.java +++ b/activemq-dto/src/main/java/org/apache/activemq/dto/XmlUtil.java @@ -86,7 +86,7 @@ public class XmlUtil Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); sf.setFeature("http://apache.org/xml/features/validation/schema-full-checking", false); - InputStream xsdStream = XmlUtil.class.getClassLoader().getResourceAsStream("org.apache.activemq/dto/hornetq.xsd"); + InputStream xsdStream = XmlUtil.class.getClassLoader().getResourceAsStream("org.apache.activemq/dto/activemq.xsd"); StreamSource xsdSource = new StreamSource(xsdStream); Schema schema = sf.newSchema(xsdSource); unmarshaller.setSchema(schema); diff --git a/activemq-dto/src/main/java/org/apache/activemq/dto/package-info.java b/activemq-dto/src/main/java/org/apache/activemq/dto/package-info.java index 4900d55812..5be7441935 100644 --- a/activemq-dto/src/main/java/org/apache/activemq/dto/package-info.java +++ b/activemq-dto/src/main/java/org/apache/activemq/dto/package-info.java @@ -11,9 +11,9 @@ * permissions and limitations under the License. */ /** - * The JAXB POJOs for the XML configuration of HornetQ broker + * The JAXB POJOs for the XML configuration of ActiveMQ broker */ @javax.xml.bind.annotation.XmlSchema( - namespace = "http://hornetq.org/schema", + namespace = "http://activemq.org/schema", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package org.apache.activemq.dto; \ No newline at end of file diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/HornetQJMSClient.java b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/ActiveMQJMSClient.java similarity index 57% rename from activemq-jms-client/src/main/java/org/apache/activemq/api/jms/HornetQJMSClient.java rename to activemq-jms-client/src/main/java/org/apache/activemq/api/jms/ActiveMQJMSClient.java index 974137c9f7..dcc4dc602b 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/HornetQJMSClient.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/ActiveMQJMSClient.java @@ -17,25 +17,25 @@ import javax.jms.Topic; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQJMSConnectionFactory; -import org.apache.activemq.jms.client.HornetQQueueConnectionFactory; -import org.apache.activemq.jms.client.HornetQTopicConnectionFactory; -import org.apache.activemq.jms.client.HornetQXAConnectionFactory; -import org.apache.activemq.jms.client.HornetQXAQueueConnectionFactory; -import org.apache.activemq.jms.client.HornetQXATopicConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQQueueConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQTopicConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQXAConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQXAQueueConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQXATopicConnectionFactory; /** - * A utility class for creating HornetQ client-side JMS managed resources. + * A utility class for creating ActiveMQ client-side JMS managed resources. * * @author Andy Taylor */ -public class HornetQJMSClient +public class ActiveMQJMSClient { /** - * Creates a HornetQConnectionFactory that receives cluster topology updates from the cluster as + * Creates a ActiveMQConnectionFactory that receives cluster topology updates from the cluster as * servers leave or join and new backups are appointed or removed. *

* The discoveryAddress and discoveryPort parameters in this method are used to listen for UDP @@ -47,81 +47,81 @@ public class HornetQJMSClient * in case of live server failure. * @param discoveryAddress The UDP group address to listen for updates * @param discoveryPort the UDP port to listen for updates - * @return the HornetQConnectionFactory + * @return the ActiveMQConnectionFactory */ - public static HornetQConnectionFactory createConnectionFactoryWithHA(final DiscoveryGroupConfiguration groupConfiguration, JMSFactoryType jmsFactoryType) + public static ActiveMQConnectionFactory createConnectionFactoryWithHA(final DiscoveryGroupConfiguration groupConfiguration, JMSFactoryType jmsFactoryType) { - HornetQConnectionFactory factory = null; + ActiveMQConnectionFactory factory = null; if (jmsFactoryType.equals(JMSFactoryType.CF)) { - factory = new HornetQJMSConnectionFactory(true, groupConfiguration); + factory = new ActiveMQJMSConnectionFactory(true, groupConfiguration); } else if (jmsFactoryType.equals(JMSFactoryType.QUEUE_CF)) { - factory = new HornetQQueueConnectionFactory(true, groupConfiguration); + factory = new ActiveMQQueueConnectionFactory(true, groupConfiguration); } else if (jmsFactoryType.equals(JMSFactoryType.TOPIC_CF)) { - factory = new HornetQTopicConnectionFactory(true, groupConfiguration); + factory = new ActiveMQTopicConnectionFactory(true, groupConfiguration); } else if (jmsFactoryType.equals(JMSFactoryType.XA_CF)) { - factory = new HornetQXAConnectionFactory(true, groupConfiguration); + factory = new ActiveMQXAConnectionFactory(true, groupConfiguration); } else if (jmsFactoryType.equals(JMSFactoryType.QUEUE_XA_CF)) { - factory = new HornetQXAQueueConnectionFactory(true, groupConfiguration); + factory = new ActiveMQXAQueueConnectionFactory(true, groupConfiguration); } else if (jmsFactoryType.equals(JMSFactoryType.TOPIC_XA_CF)) { - factory = new HornetQXATopicConnectionFactory(true, groupConfiguration); + factory = new ActiveMQXATopicConnectionFactory(true, groupConfiguration); } return factory; } /** - * Create a HornetQConnectionFactory which creates session factories from a set of live servers, no HA backup information is propagated to the client + * Create a ActiveMQConnectionFactory which creates session factories from a set of live servers, no HA backup information is propagated to the client * * The UDP address and port are used to listen for live servers in the cluster * * @param discoveryAddress The UDP group address to listen for updates * @param discoveryPort the UDP port to listen for updates - * @return the HornetQConnectionFactory + * @return the ActiveMQConnectionFactory */ - public static HornetQConnectionFactory createConnectionFactoryWithoutHA(final DiscoveryGroupConfiguration groupConfiguration, JMSFactoryType jmsFactoryType) + public static ActiveMQConnectionFactory createConnectionFactoryWithoutHA(final DiscoveryGroupConfiguration groupConfiguration, JMSFactoryType jmsFactoryType) { - HornetQConnectionFactory factory = null; + ActiveMQConnectionFactory factory = null; if (jmsFactoryType.equals(JMSFactoryType.CF)) { - factory = new HornetQJMSConnectionFactory(false, groupConfiguration); + factory = new ActiveMQJMSConnectionFactory(false, groupConfiguration); } else if (jmsFactoryType.equals(JMSFactoryType.QUEUE_CF)) { - factory = new HornetQQueueConnectionFactory(false, groupConfiguration); + factory = new ActiveMQQueueConnectionFactory(false, groupConfiguration); } else if (jmsFactoryType.equals(JMSFactoryType.TOPIC_CF)) { - factory = new HornetQTopicConnectionFactory(false, groupConfiguration); + factory = new ActiveMQTopicConnectionFactory(false, groupConfiguration); } else if (jmsFactoryType.equals(JMSFactoryType.XA_CF)) { - factory = new HornetQXAConnectionFactory(false, groupConfiguration); + factory = new ActiveMQXAConnectionFactory(false, groupConfiguration); } else if (jmsFactoryType.equals(JMSFactoryType.QUEUE_XA_CF)) { - factory = new HornetQXAQueueConnectionFactory(false, groupConfiguration); + factory = new ActiveMQXAQueueConnectionFactory(false, groupConfiguration); } else if (jmsFactoryType.equals(JMSFactoryType.TOPIC_XA_CF)) { - factory = new HornetQXATopicConnectionFactory(false, groupConfiguration); + factory = new ActiveMQXATopicConnectionFactory(false, groupConfiguration); } return factory; } /** - * Create a HornetQConnectionFactory which will receive cluster topology updates from the cluster + * Create a ActiveMQConnectionFactory which will receive cluster topology updates from the cluster * as servers leave or join and new backups are appointed or removed. *

* The initial list of servers supplied in this method is simply to make an initial connection to @@ -132,74 +132,74 @@ public class HornetQJMSClient * @param initialServers The initial set of servers used to make a connection to the cluster. * Each one is tried in turn until a successful connection is made. Once a connection * is made, the cluster topology is downloaded and the rest of the list is ignored. - * @return the HornetQConnectionFactory + * @return the ActiveMQConnectionFactory */ - public static HornetQConnectionFactory createConnectionFactoryWithHA(JMSFactoryType jmsFactoryType, final TransportConfiguration... initialServers) + public static ActiveMQConnectionFactory createConnectionFactoryWithHA(JMSFactoryType jmsFactoryType, final TransportConfiguration... initialServers) { - HornetQConnectionFactory factory = null; + ActiveMQConnectionFactory factory = null; if (jmsFactoryType.equals(JMSFactoryType.CF)) { - factory = new HornetQJMSConnectionFactory(true, initialServers); + factory = new ActiveMQJMSConnectionFactory(true, initialServers); } else if (jmsFactoryType.equals(JMSFactoryType.QUEUE_CF)) { - factory = new HornetQQueueConnectionFactory(true, initialServers); + factory = new ActiveMQQueueConnectionFactory(true, initialServers); } else if (jmsFactoryType.equals(JMSFactoryType.TOPIC_CF)) { - factory = new HornetQTopicConnectionFactory(true, initialServers); + factory = new ActiveMQTopicConnectionFactory(true, initialServers); } else if (jmsFactoryType.equals(JMSFactoryType.XA_CF)) { - factory = new HornetQXAConnectionFactory(true, initialServers); + factory = new ActiveMQXAConnectionFactory(true, initialServers); } else if (jmsFactoryType.equals(JMSFactoryType.QUEUE_XA_CF)) { - factory = new HornetQXAQueueConnectionFactory(true, initialServers); + factory = new ActiveMQXAQueueConnectionFactory(true, initialServers); } else if (jmsFactoryType.equals(JMSFactoryType.TOPIC_XA_CF)) { - factory = new HornetQXATopicConnectionFactory(true, initialServers); + factory = new ActiveMQXATopicConnectionFactory(true, initialServers); } return factory; } /** - * Create a HornetQConnectionFactory which creates session factories using a static list of + * Create a ActiveMQConnectionFactory which creates session factories using a static list of * transportConfigurations. *

- * The HornetQConnectionFactory is not updated automatically as the cluster topology changes, and + * The ActiveMQConnectionFactory is not updated automatically as the cluster topology changes, and * no HA backup information is propagated to the client * @param transportConfigurations - * @return the HornetQConnectionFactory + * @return the ActiveMQConnectionFactory */ - public static HornetQConnectionFactory createConnectionFactoryWithoutHA(JMSFactoryType jmsFactoryType, final TransportConfiguration... transportConfigurations) + public static ActiveMQConnectionFactory createConnectionFactoryWithoutHA(JMSFactoryType jmsFactoryType, final TransportConfiguration... transportConfigurations) { - HornetQConnectionFactory factory = null; + ActiveMQConnectionFactory factory = null; if (jmsFactoryType.equals(JMSFactoryType.CF)) { - factory = new HornetQJMSConnectionFactory(false, transportConfigurations); + factory = new ActiveMQJMSConnectionFactory(false, transportConfigurations); } else if (jmsFactoryType.equals(JMSFactoryType.QUEUE_CF)) { - factory = new HornetQQueueConnectionFactory(false, transportConfigurations); + factory = new ActiveMQQueueConnectionFactory(false, transportConfigurations); } else if (jmsFactoryType.equals(JMSFactoryType.TOPIC_CF)) { - factory = new HornetQTopicConnectionFactory(false, transportConfigurations); + factory = new ActiveMQTopicConnectionFactory(false, transportConfigurations); } else if (jmsFactoryType.equals(JMSFactoryType.XA_CF)) { - factory = new HornetQXAConnectionFactory(false, transportConfigurations); + factory = new ActiveMQXAConnectionFactory(false, transportConfigurations); } else if (jmsFactoryType.equals(JMSFactoryType.QUEUE_XA_CF)) { - factory = new HornetQXAQueueConnectionFactory(false, transportConfigurations); + factory = new ActiveMQXAQueueConnectionFactory(false, transportConfigurations); } else if (jmsFactoryType.equals(JMSFactoryType.TOPIC_XA_CF)) { - factory = new HornetQXATopicConnectionFactory(false, transportConfigurations); + factory = new ActiveMQXATopicConnectionFactory(false, transportConfigurations); } return factory; @@ -213,7 +213,7 @@ public class HornetQJMSClient */ public static Topic createTopic(final String name) { - return HornetQDestination.createTopic(name); + return ActiveMQDestination.createTopic(name); } /** @@ -224,10 +224,10 @@ public class HornetQJMSClient */ public static Queue createQueue(final String name) { - return HornetQDestination.createQueue(name); + return ActiveMQDestination.createQueue(name); } - private HornetQJMSClient() + private ActiveMQJMSClient() { // Utility class } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/HornetQJMSConstants.java b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/ActiveMQJMSConstants.java similarity index 64% rename from activemq-jms-client/src/main/java/org/apache/activemq/api/jms/HornetQJMSConstants.java rename to activemq-jms-client/src/main/java/org/apache/activemq/api/jms/ActiveMQJMSConstants.java index 2a57bea981..7a7acf1dd6 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/HornetQJMSConstants.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/ActiveMQJMSConstants.java @@ -13,19 +13,19 @@ package org.apache.activemq.api.jms; /** - * Constants for HornetQ for property keys used for HornetQ specific extensions to JMS. + * Constants for ActiveMQ for property keys used for ActiveMQ specific extensions to JMS. * * @author Tim Fox * * */ -public class HornetQJMSConstants +public class ActiveMQJMSConstants { - public static final String JMS_HORNETQ_INPUT_STREAM = "JMS_HQ_InputStream"; + public static final String JMS_ACTIVEMQ_INPUT_STREAM = "JMS_HQ_InputStream"; - public static final String JMS_HORNETQ_OUTPUT_STREAM = "JMS_HQ_OutputStream"; + public static final String JMS_ACTIVEMQ_OUTPUT_STREAM = "JMS_HQ_OutputStream"; - public static final String JMS_HORNETQ_SAVE_STREAM = "JMS_HQ_SaveStream"; + public static final String JMS_ACTIVEMQ_SAVE_STREAM = "JMS_HQ_SaveStream"; public static final String JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LIST = "HQ_BRIDGE_MSG_ID_LIST"; @@ -33,6 +33,6 @@ public class HornetQJMSConstants public static final int INDIVIDUAL_ACKNOWLEDGE = 101; - public static final String JMS_HORNETQ_ENABLE_BYTE_ARRAY_JMS_CORRELATION_ID_PROPERTY_NAME = - "hq.jms.support-bytes-id"; + public static final String JMS_ACTIVEMQ_ENABLE_BYTE_ARRAY_JMS_CORRELATION_ID_PROPERTY_NAME = + "amq.jms.support-bytes-id"; } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/ConnectionFactoryControl.java b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/ConnectionFactoryControl.java index 6b482ee199..02767e97ec 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/ConnectionFactoryControl.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/ConnectionFactoryControl.java @@ -19,7 +19,7 @@ import org.apache.activemq.api.core.management.Parameter; /** * A ConnectionFactoryControl is used to manage a JMS ConnectionFactory.
- * HornetQ JMS ConnectionFactory uses an underlying ClientSessionFactory to connect to HornetQ + * ActiveMQ JMS ConnectionFactory uses an underlying ClientSessionFactory to connect to ActiveMQ * servers. Please refer to the ClientSessionFactory for a detailed description. * * @author Jeff Mesnil diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/DestinationControl.java b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/DestinationControl.java index c775bcff2f..69647728a3 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/DestinationControl.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/DestinationControl.java @@ -32,7 +32,7 @@ public interface DestinationControl String getName(); /** - * Returns the HornetQ address corresponding to this destination. + * Returns the ActiveMQ address corresponding to this destination. */ String getAddress(); diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/JMSManagementHelper.java b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/JMSManagementHelper.java index 4d25f9c068..eb6c29293a 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/JMSManagementHelper.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/JMSManagementHelper.java @@ -16,10 +16,10 @@ import javax.jms.JMSException; import javax.jms.Message; import org.apache.activemq.api.core.management.ManagementHelper; -import org.apache.activemq.jms.client.HornetQMessage; +import org.apache.activemq.jms.client.ActiveMQMessage; /** - * Helper class to use JMS messages to manage HornetQ server resources. + * Helper class to use JMS messages to manage ActiveMQ server resources. * @author Jeff Mesnil * @author Tim Fox */ @@ -27,13 +27,13 @@ public class JMSManagementHelper { private static org.apache.activemq.api.core.Message getCoreMessage(final Message jmsMessage) { - if (jmsMessage instanceof HornetQMessage == false) + if (jmsMessage instanceof ActiveMQMessage == false) { - throw new IllegalArgumentException("Cannot send a non HornetQ message as a management message " + jmsMessage.getClass() + throw new IllegalArgumentException("Cannot send a non ActiveMQ message as a management message " + jmsMessage.getClass() .getName()); } - return ((HornetQMessage)jmsMessage).getCoreMessage(); + return ((ActiveMQMessage)jmsMessage).getCoreMessage(); } /** diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/JMSServerControl.java b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/JMSServerControl.java index dea580d4ca..03b3383304 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/JMSServerControl.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/JMSServerControl.java @@ -18,7 +18,7 @@ import org.apache.activemq.api.core.management.Operation; import org.apache.activemq.api.core.management.Parameter; /** - * A JMSSserverControl is used to manage HornetQ JMS server. + * A JMSSserverControl is used to manage ActiveMQ JMS server. * * @author Jeff Mesnil * @author Tim Fox @@ -270,8 +270,8 @@ public interface JMSServerControl /** * Closes all the connections on this server for consumers which are consuming from a queue associated with a particular address. */ - @Operation(desc = "Closes all the consumer connections for the given HornetQ address", impact = MBeanOperationInfo.INFO) - boolean closeConsumerConnectionsForAddress(@Parameter(desc = "a HornetQ address", name = "address") String address) throws Exception; + @Operation(desc = "Closes all the consumer connections for the given ActiveMQ address", impact = MBeanOperationInfo.INFO) + boolean closeConsumerConnectionsForAddress(@Parameter(desc = "a ActiveMQ address", name = "address") String address) throws Exception; /** * Closes all the connections on this server for sessions using a particular user name. diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/SubscriptionInfo.java b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/SubscriptionInfo.java index b6102cb33f..e27c92b543 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/SubscriptionInfo.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/SubscriptionInfo.java @@ -85,7 +85,7 @@ public class SubscriptionInfo // Public -------------------------------------------------------- /** - * Returns the name of the HornetQ core queue corresponding to this subscription. + * Returns the name of the ActiveMQ core queue corresponding to this subscription. */ public String getQueueName() { diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/package-info.java b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/package-info.java index 72e8964651..95a1d8b056 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/package-info.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/management/package-info.java @@ -11,9 +11,9 @@ * permissions and limitations under the License. */ /** - * Management API for HornetQ JMS resources. + * Management API for ActiveMQ JMS resources. *
- * HornetQ JMS resources can be managed either using JMX or by sending JMS management messages to the + * ActiveMQ JMS resources can be managed either using JMX or by sending JMS management messages to the * server's special management address. Please refer to the user manual for more information. */ package org.apache.activemq.api.jms.management; diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/package-info.java b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/package-info.java index e638e3e9b2..20b574cc10 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/package-info.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/api/jms/package-info.java @@ -11,10 +11,10 @@ * permissions and limitations under the License. */ /** - * API to create HornetQ JMS resources. + * API to create ActiveMQ JMS resources. *
* This package contains classes to create - * HornetQ JMS managed resources (ConnectionFactory, Queue and Topic). + * ActiveMQ JMS managed resources (ConnectionFactory, Queue and Topic). * */ package org.apache.activemq.api.jms; diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQBytesMessage.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQBytesMessage.java similarity index 94% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQBytesMessage.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQBytesMessage.java index 5213ffadd3..24b24dfd59 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQBytesMessage.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQBytesMessage.java @@ -50,7 +50,7 @@ import static org.apache.activemq.reader.BytesMessageUtil.bytesWriteShort; import static org.apache.activemq.reader.BytesMessageUtil.bytesWriteUTF; /** - * HornetQ implementation of a JMS {@link BytesMessage}. + * ActiveMQ implementation of a JMS {@link BytesMessage}. * * @author Norbert Lataille (Norbert.Lataille@m4x.org) * @author Adrian Brock @@ -58,7 +58,7 @@ import static org.apache.activemq.reader.BytesMessageUtil.bytesWriteUTF; * @author Ovidiu Feodorov * @author Andy Taylor */ -public class HornetQBytesMessage extends HornetQMessage implements BytesMessage +public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessage { // Static ------------------------------------------------------- public static final byte TYPE = Message.BYTES_TYPE; @@ -72,15 +72,15 @@ public class HornetQBytesMessage extends HornetQMessage implements BytesMessage /** * This constructor is used to construct messages prior to sending */ - protected HornetQBytesMessage(final ClientSession session) + protected ActiveMQBytesMessage(final ClientSession session) { - super(HornetQBytesMessage.TYPE, session); + super(ActiveMQBytesMessage.TYPE, session); } /** * Constructor on receipt at client side */ - protected HornetQBytesMessage(final ClientMessage message, final ClientSession session) + protected ActiveMQBytesMessage(final ClientMessage message, final ClientSession session) { super(message, session); } @@ -88,9 +88,9 @@ public class HornetQBytesMessage extends HornetQMessage implements BytesMessage /** * Foreign message constructor */ - public HornetQBytesMessage(final BytesMessage foreign, final ClientSession session) throws JMSException + public ActiveMQBytesMessage(final BytesMessage foreign, final ClientSession session) throws JMSException { - super(foreign, HornetQBytesMessage.TYPE, session); + super(foreign, ActiveMQBytesMessage.TYPE, session); foreign.reset(); @@ -372,7 +372,7 @@ public class HornetQBytesMessage extends HornetQMessage implements BytesMessage bodyLength = message.getBodySize(); } - // HornetQRAMessage overrides ---------------------------------------- + // ActiveMQRAMessage overrides ---------------------------------------- @Override public void clearBody() throws JMSException @@ -409,7 +409,7 @@ public class HornetQBytesMessage extends HornetQMessage implements BytesMessage @Override public byte getType() { - return HornetQBytesMessage.TYPE; + return ActiveMQBytesMessage.TYPE; } private ActiveMQBuffer getBuffer() diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQConnection.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQConnection.java similarity index 87% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQConnection.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQConnection.java index 6980131921..83465ba1c3 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQConnection.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQConnection.java @@ -40,7 +40,7 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.FailoverEventListener; import org.apache.activemq.api.core.client.FailoverEventType; import org.apache.activemq.api.core.client.SessionFailureListener; -import org.apache.activemq.api.jms.HornetQJMSConstants; +import org.apache.activemq.api.jms.ActiveMQJMSConstants; import org.apache.activemq.core.client.impl.ClientSessionInternal; import org.apache.activemq.core.version.Version; import org.apache.activemq.reader.MessageUtil; @@ -49,7 +49,7 @@ import org.apache.activemq.utils.UUIDGenerator; import org.apache.activemq.utils.VersionLoader; /** - * HornetQ implementation of a JMS Connection. + * ActiveMQ implementation of a JMS Connection. *

* The flat implementation of {@link TopicConnection} and {@link QueueConnection} is per design, * following the common usage of these as one flat API in JMS 1.1. @@ -58,7 +58,7 @@ import org.apache.activemq.utils.VersionLoader; * @author Tim Fox * @author Andy Taylor */ -public class HornetQConnection extends HornetQConnectionForContextImpl implements TopicConnection, QueueConnection +public class ActiveMQConnection extends ActiveMQConnectionForContextImpl implements TopicConnection, QueueConnection { // Constants ------------------------------------------------------------------------------------ public static final int TYPE_GENERIC_CONNECTION = 0; @@ -79,7 +79,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement private final int connectionType; - private final Set sessions = new org.apache.activemq.utils.ConcurrentHashSet(); + private final Set sessions = new org.apache.activemq.utils.ConcurrentHashSet(); private final Set tempQueues = new org.apache.activemq.utils.ConcurrentHashSet(); @@ -123,13 +123,13 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement private final Exception creationStack; - private HornetQConnectionFactory factoryReference; + private ActiveMQConnectionFactory factoryReference; // Constructors --------------------------------------------------------------------------------- - public HornetQConnection(final String username, final String password, final int connectionType, - final String clientID, final int dupsOKBatchSize, final int transactionBatchSize, - final ClientSessionFactory sessionFactory) + public ActiveMQConnection(final String username, final String password, final int connectionType, + final String clientID, final int dupsOKBatchSize, final int transactionBatchSize, + final ClientSessionFactory sessionFactory) { this.username = username; @@ -164,7 +164,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement { checkClosed(); - return createSessionInternal(false, transacted, acknowledgeMode, HornetQConnection.TYPE_GENERIC_CONNECTION); + return createSessionInternal(false, transacted, acknowledgeMode, ActiveMQConnection.TYPE_GENERIC_CONNECTION); } /** @@ -179,7 +179,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement { checkClosed(); - return createSessionInternal(false, transacted, acknowledgeMode, HornetQConnection.TYPE_TOPIC_CONNECTION); + return createSessionInternal(false, transacted, acknowledgeMode, ActiveMQConnection.TYPE_TOPIC_CONNECTION); } /** @@ -194,7 +194,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement { checkClosed(); - return createSessionInternal(false, transacted, acknowledgeMode, HornetQConnection.TYPE_QUEUE_CONNECTION); + return createSessionInternal(false, transacted, acknowledgeMode, ActiveMQConnection.TYPE_QUEUE_CONNECTION); } @@ -204,7 +204,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement { checkClosed(); - return createSessionInternal(false, transacted, checkAck(transacted, acknowledgeMode), HornetQConnection.TYPE_GENERIC_CONNECTION); + return createSessionInternal(false, transacted, checkAck(transacted, acknowledgeMode), ActiveMQConnection.TYPE_GENERIC_CONNECTION); } public String getClientID() throws JMSException @@ -264,7 +264,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement if (metaData == null) { - metaData = new HornetQConnectionMetaData(thisVersion); + metaData = new ActiveMQConnectionMetaData(thisVersion); } return metaData; @@ -291,7 +291,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement { checkClosed(); - for (HornetQSession session : sessions) + for (ActiveMQSession session : sessions) { session.start(); } @@ -302,7 +302,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement public synchronized void signalStopToAllSessions() { - for (HornetQSession session : sessions) + for (ActiveMQSession session : sessions) { ClientSession coreSession = session.getCoreSession(); if (coreSession instanceof ClientSessionInternal) @@ -320,7 +320,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement checkClosed(); - for (HornetQSession session : sessions) + for (ActiveMQSession session : sessions) { session.stop(); } @@ -343,7 +343,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement try { - for (HornetQSession session : new HashSet(sessions)) + for (ActiveMQSession session : new HashSet(sessions)) { session.close(); } @@ -382,7 +382,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -400,7 +400,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement private void checkTempQueues(Destination destination) throws JMSException { - HornetQDestination jbdest = (HornetQDestination) destination; + ActiveMQDestination jbdest = (ActiveMQDestination) destination; if (jbdest.isTemporary() && !containsTemporaryQueue(jbdest.getSimpleAddress())) { @@ -416,7 +416,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement { checkClosed(); // As spec. section 4.11 - if (connectionType == HornetQConnection.TYPE_QUEUE_CONNECTION) + if (connectionType == ActiveMQConnection.TYPE_QUEUE_CONNECTION) { String msg = "Cannot create a durable connection consumer on a QueueConnection"; throw new javax.jms.IllegalStateException(msg); @@ -430,7 +430,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement public Session createSession(int sessionMode) throws JMSException { checkClosed(); - return createSessionInternal(false, sessionMode == Session.SESSION_TRANSACTED, sessionMode, HornetQSession.TYPE_GENERIC_SESSION); + return createSessionInternal(false, sessionMode == Session.SESSION_TRANSACTED, sessionMode, ActiveMQSession.TYPE_GENERIC_SESSION); } @@ -438,7 +438,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement public Session createSession() throws JMSException { checkClosed(); - return createSessionInternal(false, false, Session.AUTO_ACKNOWLEDGE, HornetQSession.TYPE_GENERIC_SESSION); + return createSessionInternal(false, false, Session.AUTO_ACKNOWLEDGE, ActiveMQSession.TYPE_GENERIC_SESSION); } // QueueConnection implementation --------------------------------------------------------------- @@ -446,7 +446,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement public QueueSession createQueueSession(final boolean transacted, int acknowledgeMode) throws JMSException { checkClosed(); - return createSessionInternal(false, transacted, checkAck(transacted, acknowledgeMode), HornetQSession.TYPE_QUEUE_SESSION); + return createSessionInternal(false, transacted, checkAck(transacted, acknowledgeMode), ActiveMQSession.TYPE_QUEUE_SESSION); } /** @@ -477,7 +477,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement public TopicSession createTopicSession(final boolean transacted, final int acknowledgeMode) throws JMSException { checkClosed(); - return createSessionInternal(false, transacted, checkAck(transacted, acknowledgeMode), HornetQSession.TYPE_TOPIC_SESSION); + return createSessionInternal(false, transacted, checkAck(transacted, acknowledgeMode), ActiveMQSession.TYPE_TOPIC_SESSION); } public ConnectionConsumer @@ -573,7 +573,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement return uid; } - public void removeSession(final HornetQSession session) + public void removeSession(final ActiveMQSession session) { sessions.remove(session); } @@ -594,7 +594,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement { if (!closed) { - HornetQJMSClientLogger.LOGGER.connectionLeftOpen(creationStack); + ActiveMQJMSClientLogger.LOGGER.connectionLeftOpen(creationStack); close(); } @@ -605,7 +605,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement return false; } - protected final HornetQSession + protected final ActiveMQSession createSessionInternal(final boolean isXA, final boolean transacted, int acknowledgeMode, final int type) throws JMSException { if (transacted) @@ -643,12 +643,12 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement sessionFactory.getServerLocator().isPreAcknowledge(), transactionBatchSize); } - else if (acknowledgeMode == HornetQJMSConstants.INDIVIDUAL_ACKNOWLEDGE) + else if (acknowledgeMode == ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE) { session = sessionFactory.createSession(username, password, isXA, true, false, false, transactionBatchSize); } - else if (acknowledgeMode == HornetQJMSConstants.PRE_ACKNOWLEDGE) + else if (acknowledgeMode == ActiveMQJMSConstants.PRE_ACKNOWLEDGE) { session = sessionFactory.createSession(username, password, isXA, true, false, true, transactionBatchSize); } @@ -665,7 +665,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement session.addFailureListener(listener); session.addFailoverListener(failoverListener); - HornetQSession jbs = createHQSession(isXA, transacted, acknowledgeMode, session, type); + ActiveMQSession jbs = createAMQSession(isXA, transacted, acknowledgeMode, session, type); sessions.add(jbs); @@ -680,7 +680,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -693,15 +693,15 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement * @param type * @return */ - protected HornetQSession createHQSession(boolean isXA, boolean transacted, int acknowledgeMode, ClientSession session, int type) + protected ActiveMQSession createAMQSession(boolean isXA, boolean transacted, int acknowledgeMode, ClientSession session, int type) { if (isXA) { - return new HornetQXASession(this, transacted, true, acknowledgeMode, session, type); + return new ActiveMQXASession(this, transacted, true, acknowledgeMode, session, type); } else { - return new HornetQSession(this, transacted, false, acknowledgeMode, session, type); + return new ActiveMQSession(this, transacted, false, acknowledgeMode, session, type); } } @@ -726,7 +726,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement } catch (ActiveMQException me) { - throw JMSExceptionHelper.convertFromHornetQException(me); + throw JMSExceptionHelper.convertFromActiveMQException(me); } } @@ -739,7 +739,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement } } - public void setReference(HornetQConnectionFactory factory) + public void setReference(ActiveMQConnectionFactory factory) { this.factoryReference = factory; } @@ -754,11 +754,11 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement private static class JMSFailureListener implements SessionFailureListener { - private final WeakReference connectionRef; + private final WeakReference connectionRef; - JMSFailureListener(final HornetQConnection connection) + JMSFailureListener(final ActiveMQConnection connection) { - connectionRef = new WeakReference(connection); + connectionRef = new WeakReference(connection); } @Override @@ -769,7 +769,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement return; } - HornetQConnection conn = connectionRef.get(); + ActiveMQConnection conn = connectionRef.get(); if (conn != null) { @@ -797,7 +797,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement { if (!conn.closed) { - HornetQJMSClientLogger.LOGGER.errorCallingExcListener(e); + ActiveMQJMSClientLogger.LOGGER.errorCallingExcListener(e); } } } @@ -818,17 +818,17 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement private static class FailoverEventListenerImpl implements FailoverEventListener { - private final WeakReference connectionRef; + private final WeakReference connectionRef; - FailoverEventListenerImpl(final HornetQConnection connection) + FailoverEventListenerImpl(final ActiveMQConnection connection) { - connectionRef = new WeakReference(connection); + connectionRef = new WeakReference(connection); } @Override public void failoverEvent(final FailoverEventType eventType) { - HornetQConnection conn = connectionRef.get(); + ActiveMQConnection conn = connectionRef.get(); if (conn != null) { @@ -852,7 +852,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement { if (!conn.closed) { - HornetQJMSClientLogger.LOGGER.errorCallingFailoverListener(e); + ActiveMQJMSClientLogger.LOGGER.errorCallingFailoverListener(e); } } } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQConnectionFactory.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQConnectionFactory.java similarity index 88% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQConnectionFactory.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQConnectionFactory.java index 503a13a336..85498fb746 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQConnectionFactory.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQConnectionFactory.java @@ -34,19 +34,19 @@ import java.io.Serializable; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.jms.referenceable.ConnectionFactoryObjectFactory; import org.apache.activemq.jms.referenceable.SerializableObjectRefAddr; /** - * HornetQ implementation of a JMS ConnectionFactory. + * ActiveMQ implementation of a JMS ConnectionFactory. * * @author Ovidiu Feodorov * @author Tim Fox */ -public class HornetQConnectionFactory implements Serializable, Referenceable, ConnectionFactory, XAConnectionFactory +public class ActiveMQConnectionFactory implements Serializable, Referenceable, ConnectionFactory, XAConnectionFactory { private static final long serialVersionUID = -2810634789345348326L; @@ -54,47 +54,47 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co private String clientID; - private int dupsOKBatchSize = HornetQClient.DEFAULT_ACK_BATCH_SIZE; + private int dupsOKBatchSize = ActiveMQClient.DEFAULT_ACK_BATCH_SIZE; - private int transactionBatchSize = HornetQClient.DEFAULT_ACK_BATCH_SIZE; + private int transactionBatchSize = ActiveMQClient.DEFAULT_ACK_BATCH_SIZE; private boolean readOnly; - public HornetQConnectionFactory() + public ActiveMQConnectionFactory() { serverLocator = null; } - public HornetQConnectionFactory(final ServerLocator serverLocator) + public ActiveMQConnectionFactory(final ServerLocator serverLocator) { this.serverLocator = serverLocator; serverLocator.disableFinalizeCheck(); } - public HornetQConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) + public ActiveMQConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) { if (ha) { - serverLocator = HornetQClient.createServerLocatorWithHA(groupConfiguration); + serverLocator = ActiveMQClient.createServerLocatorWithHA(groupConfiguration); } else { - serverLocator = HornetQClient.createServerLocatorWithoutHA(groupConfiguration); + serverLocator = ActiveMQClient.createServerLocatorWithoutHA(groupConfiguration); } serverLocator.disableFinalizeCheck(); } - public HornetQConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors) + public ActiveMQConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors) { if (ha) { - serverLocator = HornetQClient.createServerLocatorWithHA(initialConnectors); + serverLocator = ActiveMQClient.createServerLocatorWithHA(initialConnectors); } else { - serverLocator = HornetQClient.createServerLocatorWithoutHA(initialConnectors); + serverLocator = ActiveMQClient.createServerLocatorWithoutHA(initialConnectors); } serverLocator.disableFinalizeCheck(); @@ -109,7 +109,7 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co public Connection createConnection(final String username, final String password) throws JMSException { - return createConnectionInternal(username, password, false, HornetQConnection.TYPE_GENERIC_CONNECTION); + return createConnectionInternal(username, password, false, ActiveMQConnection.TYPE_GENERIC_CONNECTION); } @Override @@ -136,8 +136,8 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co validateSessionMode(sessionMode); try { - HornetQConnection connection = - createConnectionInternal(userName, password, false, HornetQConnection.TYPE_GENERIC_CONNECTION); + ActiveMQConnection connection = + createConnectionInternal(userName, password, false, ActiveMQConnection.TYPE_GENERIC_CONNECTION); return connection.createContext(sessionMode); } catch (JMSSecurityException e) @@ -178,7 +178,7 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co public QueueConnection createQueueConnection(final String username, final String password) throws JMSException { - return createConnectionInternal(username, password, false, HornetQConnection.TYPE_QUEUE_CONNECTION); + return createConnectionInternal(username, password, false, ActiveMQConnection.TYPE_QUEUE_CONNECTION); } // TopicConnectionFactory implementation -------------------------------------------------------- @@ -190,7 +190,7 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co public TopicConnection createTopicConnection(final String username, final String password) throws JMSException { - return createConnectionInternal(username, password, false, HornetQConnection.TYPE_TOPIC_CONNECTION); + return createConnectionInternal(username, password, false, ActiveMQConnection.TYPE_TOPIC_CONNECTION); } // XAConnectionFactory implementation ----------------------------------------------------------- @@ -202,7 +202,7 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co public XAConnection createXAConnection(final String username, final String password) throws JMSException { - return (XAConnection) createConnectionInternal(username, password, true, HornetQConnection.TYPE_GENERIC_CONNECTION); + return (XAConnection) createConnectionInternal(username, password, true, ActiveMQConnection.TYPE_GENERIC_CONNECTION); } @Override @@ -216,8 +216,8 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co { try { - HornetQConnection connection = - createConnectionInternal(userName, password, true, HornetQConnection.TYPE_GENERIC_CONNECTION); + ActiveMQConnection connection = + createConnectionInternal(userName, password, true, ActiveMQConnection.TYPE_GENERIC_CONNECTION); return connection.createXAContext(); } catch (JMSSecurityException e) @@ -239,7 +239,7 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co public XAQueueConnection createXAQueueConnection(final String username, final String password) throws JMSException { - return (XAQueueConnection) createConnectionInternal(username, password, true, HornetQConnection.TYPE_QUEUE_CONNECTION); + return (XAQueueConnection) createConnectionInternal(username, password, true, ActiveMQConnection.TYPE_QUEUE_CONNECTION); } // XATopicConnectionFactory implementation ------------------------------------------------------ @@ -251,14 +251,14 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co public XATopicConnection createXATopicConnection(final String username, final String password) throws JMSException { - return (XATopicConnection) createConnectionInternal(username, password, true, HornetQConnection.TYPE_TOPIC_CONNECTION); + return (XATopicConnection) createConnectionInternal(username, password, true, ActiveMQConnection.TYPE_TOPIC_CONNECTION); } @Override public Reference getReference() throws NamingException { return new Reference(this.getClass().getCanonicalName(), - new SerializableObjectRefAddr("HornetQ-CF", this), + new SerializableObjectRefAddr("ActiveMQ-CF", this), ConnectionFactoryObjectFactory.class.getCanonicalName(), null); } @@ -655,7 +655,7 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co // Protected ------------------------------------------------------------------------------------ - protected synchronized HornetQConnection createConnectionInternal(final String username, + protected synchronized ActiveMQConnection createConnectionInternal(final String username, final String password, final boolean isXA, final int type) throws JMSException @@ -678,13 +678,13 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co throw jmse; } - HornetQConnection connection = null; + ActiveMQConnection connection = null; if (isXA) { - if (type == HornetQConnection.TYPE_GENERIC_CONNECTION) + if (type == ActiveMQConnection.TYPE_GENERIC_CONNECTION) { - connection = new HornetQXAConnection(username, + connection = new ActiveMQXAConnection(username, password, type, clientID, @@ -692,10 +692,10 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co transactionBatchSize, factory); } - else if (type == HornetQConnection.TYPE_QUEUE_CONNECTION) + else if (type == ActiveMQConnection.TYPE_QUEUE_CONNECTION) { connection = - new HornetQXAConnection(username, + new ActiveMQXAConnection(username, password, type, clientID, @@ -703,10 +703,10 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co transactionBatchSize, factory); } - else if (type == HornetQConnection.TYPE_TOPIC_CONNECTION) + else if (type == ActiveMQConnection.TYPE_TOPIC_CONNECTION) { connection = - new HornetQXAConnection(username, + new ActiveMQXAConnection(username, password, type, clientID, @@ -717,9 +717,9 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co } else { - if (type == HornetQConnection.TYPE_GENERIC_CONNECTION) + if (type == ActiveMQConnection.TYPE_GENERIC_CONNECTION) { - connection = new HornetQConnection(username, + connection = new ActiveMQConnection(username, password, type, clientID, @@ -727,10 +727,10 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co transactionBatchSize, factory); } - else if (type == HornetQConnection.TYPE_QUEUE_CONNECTION) + else if (type == ActiveMQConnection.TYPE_QUEUE_CONNECTION) { connection = - new HornetQConnection(username, + new ActiveMQConnection(username, password, type, clientID, @@ -738,10 +738,10 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co transactionBatchSize, factory); } - else if (type == HornetQConnection.TYPE_TOPIC_CONNECTION) + else if (type == ActiveMQConnection.TYPE_TOPIC_CONNECTION) { connection = - new HornetQConnection(username, + new ActiveMQConnection(username, password, type, clientID, @@ -779,7 +779,7 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co @Override public String toString() { - return "HornetQConnectionFactory [serverLocator=" + serverLocator + + return "ActiveMQConnectionFactory [serverLocator=" + serverLocator + ", clientID=" + clientID + ", consumerWindowSize = " + @@ -800,7 +800,7 @@ public class HornetQConnectionFactory implements Serializable, Referenceable, Co { if (readOnly) { - throw new IllegalStateException("Cannot set attribute on HornetQConnectionFactory after it has been used"); + throw new IllegalStateException("Cannot set attribute on ActiveMQConnectionFactory after it has been used"); } } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQConnectionForContext.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQConnectionForContext.java similarity index 93% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQConnectionForContext.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQConnectionForContext.java index 7e493a1937..bd84ab68bb 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQConnectionForContext.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQConnectionForContext.java @@ -24,7 +24,7 @@ import javax.jms.XAJMSContext; * Necessary to support {@code JMSContext.close()} conditions. * @see JMSContext */ -public interface HornetQConnectionForContext extends javax.jms.Connection +public interface ActiveMQConnectionForContext extends javax.jms.Connection { JMSContext createContext(int sessionMode); diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQConnectionForContextImpl.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQConnectionForContextImpl.java similarity index 84% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQConnectionForContextImpl.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQConnectionForContextImpl.java index 25e3b3a817..e7f3546706 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQConnectionForContextImpl.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQConnectionForContextImpl.java @@ -21,11 +21,11 @@ import javax.jms.JMSRuntimeException; import javax.jms.Session; import javax.jms.XAJMSContext; -import org.apache.activemq.api.jms.HornetQJMSConstants; +import org.apache.activemq.api.jms.ActiveMQJMSConstants; import org.apache.activemq.utils.ReferenceCounter; import org.apache.activemq.utils.ReferenceCounterUtil; -public abstract class HornetQConnectionForContextImpl implements HornetQConnectionForContext +public abstract class ActiveMQConnectionForContextImpl implements ActiveMQConnectionForContext { final Runnable closeRunnable = new Runnable() @@ -55,22 +55,22 @@ public abstract class HornetQConnectionForContextImpl implements HornetQConnecti case Session.CLIENT_ACKNOWLEDGE: case Session.DUPS_OK_ACKNOWLEDGE: case Session.SESSION_TRANSACTED: - case HornetQJMSConstants.INDIVIDUAL_ACKNOWLEDGE: - case HornetQJMSConstants.PRE_ACKNOWLEDGE: + case ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE: + case ActiveMQJMSConstants.PRE_ACKNOWLEDGE: break; default: throw new JMSRuntimeException("Invalid ackmode: " + sessionMode); } refCounter.increment(); - return new HornetQJMSContext(this, sessionMode, threadAwareContext); + return new ActiveMQJMSContext(this, sessionMode, threadAwareContext); } public XAJMSContext createXAContext() { refCounter.increment(); - return new HornetQXAJMSContext(this, threadAwareContext); + return new ActiveMQXAJMSContext(this, threadAwareContext); } @Override diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQConnectionMetaData.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQConnectionMetaData.java similarity index 87% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQConnectionMetaData.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQConnectionMetaData.java index 8109b6d407..1bbcf19046 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQConnectionMetaData.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQConnectionMetaData.java @@ -21,17 +21,17 @@ import javax.jms.JMSException; import org.apache.activemq.core.version.Version; /** - * HornetQ implementation of a JMS ConnectionMetaData. + * ActiveMQ implementation of a JMS ConnectionMetaData. * * @author Tim Fox * @author Ovidiu Feodorov * */ -public class HornetQConnectionMetaData implements ConnectionMetaData +public class ActiveMQConnectionMetaData implements ConnectionMetaData { // Constants ----------------------------------------------------- - private static final String HORNETQ = "HornetQ"; + private static final String ACTIVEMQ = "ActiveMQ"; // Static -------------------------------------------------------- @@ -42,9 +42,9 @@ public class HornetQConnectionMetaData implements ConnectionMetaData // Constructors -------------------------------------------------- /** - * Create a new HornetQConnectionMetaData object. + * Create a new ActiveMQConnectionMetaData object. */ - public HornetQConnectionMetaData(final Version serverVersion) + public ActiveMQConnectionMetaData(final Version serverVersion) { this.serverVersion = serverVersion; } @@ -68,7 +68,7 @@ public class HornetQConnectionMetaData implements ConnectionMetaData public String getJMSProviderName() throws JMSException { - return HornetQConnectionMetaData.HORNETQ; + return ActiveMQConnectionMetaData.ACTIVEMQ; } public String getProviderVersion() throws JMSException diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQDestination.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQDestination.java similarity index 71% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQDestination.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQDestination.java index c9766d091b..49e8ba2a93 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQDestination.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQDestination.java @@ -28,12 +28,12 @@ import org.apache.activemq.jms.referenceable.DestinationObjectFactory; import org.apache.activemq.jms.referenceable.SerializableObjectRefAddr; /** - * HornetQ implementation of a JMS Destination. + * ActiveMQ implementation of a JMS Destination. * * @author Tim Fox * */ -public class HornetQDestination implements Destination, Serializable, Referenceable +public class ActiveMQDestination implements Destination, Serializable, Referenceable { // Constants ----------------------------------------------------- @@ -65,29 +65,29 @@ public class HornetQDestination implements Destination, Serializable, Referencea public static Destination fromAddress(final String address) { - if (address.startsWith(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX)) + if (address.startsWith(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX)) { - String name = address.substring(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX.length()); + String name = address.substring(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX.length()); return createQueue(name); } - else if (address.startsWith(HornetQDestination.JMS_TOPIC_ADDRESS_PREFIX)) + else if (address.startsWith(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX)) { - String name = address.substring(HornetQDestination.JMS_TOPIC_ADDRESS_PREFIX.length()); + String name = address.substring(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX.length()); return createTopic(name); } - else if (address.startsWith(HornetQDestination.JMS_TEMP_QUEUE_ADDRESS_PREFIX)) + else if (address.startsWith(ActiveMQDestination.JMS_TEMP_QUEUE_ADDRESS_PREFIX)) { - String name = address.substring(HornetQDestination.JMS_TEMP_QUEUE_ADDRESS_PREFIX.length()); + String name = address.substring(ActiveMQDestination.JMS_TEMP_QUEUE_ADDRESS_PREFIX.length()); - return new HornetQTemporaryQueue(address, name, null); + return new ActiveMQTemporaryQueue(address, name, null); } - else if (address.startsWith(HornetQDestination.JMS_TEMP_TOPIC_ADDRESS_PREFIX)) + else if (address.startsWith(ActiveMQDestination.JMS_TEMP_TOPIC_ADDRESS_PREFIX)) { - String name = address.substring(HornetQDestination.JMS_TEMP_TOPIC_ADDRESS_PREFIX.length()); + String name = address.substring(ActiveMQDestination.JMS_TEMP_TOPIC_ADDRESS_PREFIX.length()); - return new HornetQTemporaryTopic(address, name, null); + return new ActiveMQTemporaryTopic(address, name, null); } else { @@ -101,26 +101,26 @@ public class HornetQDestination implements Destination, Serializable, Referencea { if (isDurable) { - return HornetQDestination.escape(clientID) + SEPARATOR + - HornetQDestination.escape(subscriptionName); + return ActiveMQDestination.escape(clientID) + SEPARATOR + + ActiveMQDestination.escape(subscriptionName); } else { return "nonDurable" + SEPARATOR + - HornetQDestination.escape(clientID) + SEPARATOR + - HornetQDestination.escape(subscriptionName); + ActiveMQDestination.escape(clientID) + SEPARATOR + + ActiveMQDestination.escape(subscriptionName); } } else { if (isDurable) { - return HornetQDestination.escape(subscriptionName); + return ActiveMQDestination.escape(subscriptionName); } else { return "nonDurable" + SEPARATOR + - HornetQDestination.escape(subscriptionName); + ActiveMQDestination.escape(subscriptionName); } } } @@ -130,13 +130,13 @@ public class HornetQDestination implements Destination, Serializable, Referencea if (clientID != null) { return (isDurable ? "Durable" : "nonDurable") + SEPARATOR + - HornetQDestination.escape(clientID) + SEPARATOR + - HornetQDestination.escape(subscriptionName); + ActiveMQDestination.escape(clientID) + SEPARATOR + + ActiveMQDestination.escape(subscriptionName); } else { return (isDurable ? "Durable" : "nonDurable") + SEPARATOR + - HornetQDestination.escape(subscriptionName); + ActiveMQDestination.escape(subscriptionName); } } @@ -198,46 +198,46 @@ public class HornetQDestination implements Destination, Serializable, Referencea return new SimpleString(JMS_TOPIC_ADDRESS_PREFIX + name); } - public static HornetQQueue createQueue(final String name) + public static ActiveMQQueue createQueue(final String name) { - return new HornetQQueue(name); + return new ActiveMQQueue(name); } - public static HornetQTopic createTopic(final String name) + public static ActiveMQTopic createTopic(final String name) { - return new HornetQTopic(name); + return new ActiveMQTopic(name); } - public static HornetQTemporaryQueue createTemporaryQueue(final String name, final HornetQSession session) + public static ActiveMQTemporaryQueue createTemporaryQueue(final String name, final ActiveMQSession session) { - return new HornetQTemporaryQueue(JMS_TEMP_QUEUE_ADDRESS_PREFIX.concat(name), name, session); + return new ActiveMQTemporaryQueue(JMS_TEMP_QUEUE_ADDRESS_PREFIX.concat(name), name, session); } - public static HornetQTemporaryQueue createTemporaryQueue(final String name) + public static ActiveMQTemporaryQueue createTemporaryQueue(final String name) { return createTemporaryQueue(name, null); } - public static HornetQTemporaryQueue createTemporaryQueue(final HornetQSession session) + public static ActiveMQTemporaryQueue createTemporaryQueue(final ActiveMQSession session) { String name = UUID.randomUUID().toString(); return createTemporaryQueue(name, session); } - public static HornetQTemporaryTopic createTemporaryTopic(final HornetQSession session) + public static ActiveMQTemporaryTopic createTemporaryTopic(final ActiveMQSession session) { String name = UUID.randomUUID().toString(); return createTemporaryTopic(name, session); } - public static HornetQTemporaryTopic createTemporaryTopic(String name, final HornetQSession session) + public static ActiveMQTemporaryTopic createTemporaryTopic(String name, final ActiveMQSession session) { - return new HornetQTemporaryTopic(JMS_TEMP_TOPIC_ADDRESS_PREFIX.concat(name), name, session); + return new ActiveMQTemporaryTopic(JMS_TEMP_TOPIC_ADDRESS_PREFIX.concat(name), name, session); } - public static HornetQTemporaryTopic createTemporaryTopic(String name) + public static ActiveMQTemporaryTopic createTemporaryTopic(String name) { return createTemporaryTopic(name, null); } @@ -263,14 +263,14 @@ public class HornetQDestination implements Destination, Serializable, Referencea private final boolean queue; - private final transient HornetQSession session; + private final transient ActiveMQSession session; // Constructors -------------------------------------------------- - protected HornetQDestination(final String address, final String name, - final boolean temporary, - final boolean queue, - final HornetQSession session) + protected ActiveMQDestination(final String address, final String name, + final boolean temporary, + final boolean queue, + final ActiveMQSession session) { this.address = address; @@ -290,7 +290,7 @@ public class HornetQDestination implements Destination, Serializable, Referencea public Reference getReference() throws NamingException { return new Reference(this.getClass().getCanonicalName(), - new SerializableObjectRefAddr("HornetQ-DEST", this), + new SerializableObjectRefAddr("ActiveMQ-DEST", this), DestinationObjectFactory.class.getCanonicalName(), null); } @@ -350,12 +350,12 @@ public class HornetQDestination implements Destination, Serializable, Referencea return true; } - if (!(o instanceof HornetQDestination)) + if (!(o instanceof ActiveMQDestination)) { return false; } - HornetQDestination that = (HornetQDestination)o; + ActiveMQDestination that = (ActiveMQDestination)o; return address.equals(that.address); } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSClientBundle.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSClientBundle.java similarity index 96% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSClientBundle.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSClientBundle.java index e5a6c0bbb0..2b4a76b88b 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSClientBundle.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSClientBundle.java @@ -40,10 +40,10 @@ import org.jboss.logging.Messages; * * so 129000 to 129999 */ -@MessageBundle(projectCode = "HQ") -public interface HornetQJMSClientBundle +@MessageBundle(projectCode = "AMQ") +public interface ActiveMQJMSClientBundle { - HornetQJMSClientBundle BUNDLE = Messages.getBundle(HornetQJMSClientBundle.class); + ActiveMQJMSClientBundle BUNDLE = Messages.getBundle(ActiveMQJMSClientBundle.class); @Message(id = 129000, value = "Invalid filter: {0}", format = Message.Format.MESSAGE_FORMAT) ActiveMQInvalidFilterExpressionException invalidFilter(@Cause Throwable e, SimpleString filter); diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSClientLogger.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSClientLogger.java similarity index 92% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSClientLogger.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSClientLogger.java index 180e8f1866..f044e4ca16 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSClientLogger.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSClientLogger.java @@ -36,13 +36,13 @@ import org.jboss.logging.annotations.MessageLogger; * * so an INFO message would be 121000 to 121999 */ -@MessageLogger(projectCode = "HQ") -public interface HornetQJMSClientLogger extends BasicLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQJMSClientLogger extends BasicLogger { /** * The default logger. */ - HornetQJMSClientLogger LOGGER = Logger.getMessageLogger(HornetQJMSClientLogger.class, HornetQJMSClientLogger.class.getPackage().getName()); + ActiveMQJMSClientLogger LOGGER = Logger.getMessageLogger(ActiveMQJMSClientLogger.class, ActiveMQJMSClientLogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.WARN) @Message(id = 122000, value = "I''m closing a JMS connection you left open. Please make sure you close all JMS connections explicitly before letting them go out of scope! see stacktrace to find out where it was created" , format = Message.Format.MESSAGE_FORMAT) diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSConnectionFactory.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSConnectionFactory.java similarity index 76% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSConnectionFactory.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSConnectionFactory.java index dc76692ea9..cb7f01a8d5 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSConnectionFactory.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSConnectionFactory.java @@ -25,7 +25,7 @@ import org.apache.activemq.api.core.client.ServerLocator; * * @author Howard Gao */ -public class HornetQJMSConnectionFactory extends HornetQConnectionFactory implements TopicConnectionFactory, QueueConnectionFactory +public class ActiveMQJMSConnectionFactory extends ActiveMQConnectionFactory implements TopicConnectionFactory, QueueConnectionFactory { private static final long serialVersionUID = -2810634789345348326L; @@ -33,7 +33,7 @@ public class HornetQJMSConnectionFactory extends HornetQConnectionFactory implem /** * */ - public HornetQJMSConnectionFactory() + public ActiveMQJMSConnectionFactory() { super(); } @@ -41,7 +41,7 @@ public class HornetQJMSConnectionFactory extends HornetQConnectionFactory implem /** * @param serverLocator */ - public HornetQJMSConnectionFactory(ServerLocator serverLocator) + public ActiveMQJMSConnectionFactory(ServerLocator serverLocator) { super(serverLocator); } @@ -50,7 +50,7 @@ public class HornetQJMSConnectionFactory extends HornetQConnectionFactory implem * @param ha * @param groupConfiguration */ - public HornetQJMSConnectionFactory(boolean ha, final DiscoveryGroupConfiguration groupConfiguration) + public ActiveMQJMSConnectionFactory(boolean ha, final DiscoveryGroupConfiguration groupConfiguration) { super(ha, groupConfiguration); } @@ -59,7 +59,7 @@ public class HornetQJMSConnectionFactory extends HornetQConnectionFactory implem * @param ha * @param initialConnectors */ - public HornetQJMSConnectionFactory(boolean ha, TransportConfiguration... initialConnectors) + public ActiveMQJMSConnectionFactory(boolean ha, TransportConfiguration... initialConnectors) { super(ha, initialConnectors); } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSConsumer.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSConsumer.java similarity index 90% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSConsumer.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSConsumer.java index b9ba41f5af..10397585ec 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSConsumer.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSConsumer.java @@ -22,13 +22,13 @@ import javax.jms.MessageListener; /** * @author Jeff Mesnil (c) 2013 Red Hat inc. */ -public class HornetQJMSConsumer implements JMSConsumer +public class ActiveMQJMSConsumer implements JMSConsumer { - private final HornetQJMSContext context; + private final ActiveMQJMSContext context; private final MessageConsumer consumer; - HornetQJMSConsumer(HornetQJMSContext context, MessageConsumer consumer) + ActiveMQJMSConsumer(ActiveMQJMSContext context, MessageConsumer consumer) { this.context = context; this.consumer = consumer; @@ -131,7 +131,7 @@ public class HornetQJMSConsumer implements JMSConsumer try { Message message = consumer.receive(); - context.setLastMessage(HornetQJMSConsumer.this, message); + context.setLastMessage(ActiveMQJMSConsumer.this, message); return message == null ? null : message.getBody(c); } catch (JMSException e) @@ -146,7 +146,7 @@ public class HornetQJMSConsumer implements JMSConsumer try { Message message = consumer.receive(timeout); - context.setLastMessage(HornetQJMSConsumer.this, message); + context.setLastMessage(ActiveMQJMSConsumer.this, message); return message == null ? null : message.getBody(c); } catch (JMSException e) @@ -161,7 +161,7 @@ public class HornetQJMSConsumer implements JMSConsumer try { Message message = consumer.receiveNoWait(); - context.setLastMessage(HornetQJMSConsumer.this, message); + context.setLastMessage(ActiveMQJMSConsumer.this, message); return message == null ? null : message.getBody(c); } catch (JMSException e) @@ -182,7 +182,7 @@ public class HornetQJMSConsumer implements JMSConsumer @Override public void onMessage(Message message) { - context.setLastMessage(HornetQJMSConsumer.this, message); + context.setLastMessage(ActiveMQJMSConsumer.this, message); context.getThreadAwareContext().setCurrentThread(false); try diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSContext.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSContext.java similarity index 89% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSContext.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSContext.java index d314336584..e8643471aa 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSContext.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSContext.java @@ -39,11 +39,11 @@ import javax.transaction.xa.XAResource; import java.io.Serializable; /** - * HornetQ implementation of a JMSContext. + * ActiveMQ implementation of a JMSContext. * * @author Jeff Mesnil (c) 2013 Red Hat inc */ -public class HornetQJMSContext implements JMSContext +public class ActiveMQJMSContext implements JMSContext { private static final boolean DEFAULT_AUTO_START = true; private final int sessionMode; @@ -55,14 +55,14 @@ public class HornetQJMSContext implements JMSContext */ private volatile Message lastMessagesWaitingAck; - private final HornetQConnectionForContext connection; + private final ActiveMQConnectionForContext connection; private Session session; - private boolean autoStart = HornetQJMSContext.DEFAULT_AUTO_START; + private boolean autoStart = ActiveMQJMSContext.DEFAULT_AUTO_START; private MessageProducer innerProducer; private boolean xa; private boolean closed; - HornetQJMSContext(final HornetQConnectionForContext connection, final int ackMode, final boolean xa, ThreadAwareContext threadAwareContext) + ActiveMQJMSContext(final ActiveMQConnectionForContext connection, final int ackMode, final boolean xa, ThreadAwareContext threadAwareContext) { this.connection = connection; this.sessionMode = ackMode; @@ -70,12 +70,12 @@ public class HornetQJMSContext implements JMSContext this.threadAwareContext = threadAwareContext; } - public HornetQJMSContext(HornetQConnectionForContext connection, int ackMode, ThreadAwareContext threadAwareContext) + public ActiveMQJMSContext(ActiveMQConnectionForContext connection, int ackMode, ThreadAwareContext threadAwareContext) { this(connection, ackMode, false, threadAwareContext); } - public HornetQJMSContext(HornetQConnectionForContext connection, ThreadAwareContext threadAwareContext) + public ActiveMQJMSContext(ActiveMQConnectionForContext connection, ThreadAwareContext threadAwareContext) { this(connection, SESSION_TRANSACTED, true, threadAwareContext); } @@ -112,7 +112,7 @@ public class HornetQJMSContext implements JMSContext checkSession(); try { - return new HornetQJMSProducer(this, getInnerProducer()); + return new ActiveMQJMSProducer(this, getInnerProducer()); } catch (JMSException e) { @@ -470,7 +470,7 @@ public class HornetQJMSContext implements JMSContext checkSession(); try { - HornetQJMSConsumer consumer = new HornetQJMSConsumer(this, session.createConsumer(destination)); + ActiveMQJMSConsumer consumer = new ActiveMQJMSConsumer(this, session.createConsumer(destination)); checkAutoStart(); return consumer; } @@ -486,7 +486,7 @@ public class HornetQJMSContext implements JMSContext checkSession(); try { - HornetQJMSConsumer consumer = new HornetQJMSConsumer(this, session.createConsumer(destination, messageSelector)); + ActiveMQJMSConsumer consumer = new ActiveMQJMSConsumer(this, session.createConsumer(destination, messageSelector)); checkAutoStart(); return consumer; } @@ -502,7 +502,7 @@ public class HornetQJMSContext implements JMSContext checkSession(); try { - HornetQJMSConsumer consumer = new HornetQJMSConsumer(this, session.createConsumer(destination, messageSelector, noLocal)); + ActiveMQJMSConsumer consumer = new ActiveMQJMSConsumer(this, session.createConsumer(destination, messageSelector, noLocal)); checkAutoStart(); return consumer; } @@ -546,7 +546,7 @@ public class HornetQJMSContext implements JMSContext checkSession(); try { - HornetQJMSConsumer consumer = new HornetQJMSConsumer(this, session.createDurableConsumer(topic, name)); + ActiveMQJMSConsumer consumer = new ActiveMQJMSConsumer(this, session.createDurableConsumer(topic, name)); checkAutoStart(); return consumer; } @@ -562,7 +562,7 @@ public class HornetQJMSContext implements JMSContext checkSession(); try { - HornetQJMSConsumer consumer = new HornetQJMSConsumer(this, session.createDurableConsumer(topic, name, messageSelector, noLocal)); + ActiveMQJMSConsumer consumer = new ActiveMQJMSConsumer(this, session.createDurableConsumer(topic, name, messageSelector, noLocal)); checkAutoStart(); return consumer; } @@ -578,7 +578,7 @@ public class HornetQJMSContext implements JMSContext checkSession(); try { - HornetQJMSConsumer consumer = new HornetQJMSConsumer(this, session.createSharedDurableConsumer(topic, name)); + ActiveMQJMSConsumer consumer = new ActiveMQJMSConsumer(this, session.createSharedDurableConsumer(topic, name)); checkAutoStart(); return consumer; } @@ -594,7 +594,7 @@ public class HornetQJMSContext implements JMSContext checkSession(); try { - HornetQJMSConsumer consumer = new HornetQJMSConsumer(this, session.createSharedDurableConsumer(topic, name, messageSelector)); + ActiveMQJMSConsumer consumer = new ActiveMQJMSConsumer(this, session.createSharedDurableConsumer(topic, name, messageSelector)); checkAutoStart(); return consumer; } @@ -610,7 +610,7 @@ public class HornetQJMSContext implements JMSContext checkSession(); try { - HornetQJMSConsumer consumer = new HornetQJMSConsumer(this, session.createSharedConsumer(topic, sharedSubscriptionName)); + ActiveMQJMSConsumer consumer = new ActiveMQJMSConsumer(this, session.createSharedConsumer(topic, sharedSubscriptionName)); checkAutoStart(); return consumer; } @@ -626,7 +626,7 @@ public class HornetQJMSContext implements JMSContext checkSession(); try { - HornetQJMSConsumer consumer = new HornetQJMSConsumer(this, session.createSharedConsumer(topic, sharedSubscriptionName, messageSelector)); + ActiveMQJMSConsumer consumer = new ActiveMQJMSConsumer(this, session.createSharedConsumer(topic, sharedSubscriptionName, messageSelector)); checkAutoStart(); return consumer; } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSProducer.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSProducer.java similarity index 97% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSProducer.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSProducer.java index 86a5f7c5e3..44646aa3b1 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQJMSProducer.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQJMSProducer.java @@ -45,9 +45,9 @@ import org.apache.activemq.utils.TypedProperties; * * @author Jeff Mesnil (c) 2013 Red Hat inc. */ -public final class HornetQJMSProducer implements JMSProducer +public final class ActiveMQJMSProducer implements JMSProducer { - private final HornetQJMSContext context; + private final ActiveMQJMSContext context; private final MessageProducer producer; private final TypedProperties properties = new TypedProperties(); @@ -62,7 +62,7 @@ public final class HornetQJMSProducer implements JMSProducer private byte[] jmsHeaderCorrelationIDAsBytes; private String jmsHeaderType; - HornetQJMSProducer(HornetQJMSContext context, MessageProducer producer) + ActiveMQJMSProducer(ActiveMQJMSContext context, MessageProducer producer) { this.context = context; this.producer = producer; @@ -497,9 +497,9 @@ public final class HornetQJMSProducer implements JMSProducer { TypedProperties.setObjectProperty(new SimpleString(name), value, properties); } - catch (ActiveMQPropertyConversionException hqe) + catch (ActiveMQPropertyConversionException amqe) { - throw new MessageFormatRuntimeException(hqe.getMessage()); + throw new MessageFormatRuntimeException(amqe.getMessage()); } catch (RuntimeException e) { @@ -751,11 +751,11 @@ public final class HornetQJMSProducer implements JMSProducer { if (name == null) { - throw HornetQJMSClientBundle.BUNDLE.nameCannotBeNull(); + throw ActiveMQJMSClientBundle.BUNDLE.nameCannotBeNull(); } if (name.equals("")) { - throw HornetQJMSClientBundle.BUNDLE.nameCannotBeEmpty(); + throw ActiveMQJMSClientBundle.BUNDLE.nameCannotBeEmpty(); } } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQMapMessage.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQMapMessage.java similarity index 93% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQMapMessage.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQMapMessage.java index 635854b140..58e86ad9af 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQMapMessage.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQMapMessage.java @@ -33,7 +33,7 @@ import static org.apache.activemq.reader.MapMessageUtil.writeBodyMap; import static org.apache.activemq.reader.MapMessageUtil.readBodyMap; /** - * HornetQ implementation of a JMS MapMessage. + * ActiveMQ implementation of a JMS MapMessage. * * @author Norbert Lataille (Norbert.Lataille@m4x.org) * @author Adrian Brock @@ -42,7 +42,7 @@ import static org.apache.activemq.reader.MapMessageUtil.readBodyMap; * @author Andy Taylor * @version $Revision: 3412 $ */ -public final class HornetQMapMessage extends HornetQMessage implements MapMessage +public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage { // Constants ----------------------------------------------------- @@ -61,9 +61,9 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag /* * This constructor is used to construct messages prior to sending */ - protected HornetQMapMessage(final ClientSession session) + protected ActiveMQMapMessage(final ClientSession session) { - super(HornetQMapMessage.TYPE, session); + super(ActiveMQMapMessage.TYPE, session); invalid = true; } @@ -71,14 +71,14 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag /* * This constructor is used during reading */ - protected HornetQMapMessage(final ClientMessage message, final ClientSession session) + protected ActiveMQMapMessage(final ClientMessage message, final ClientSession session) { super(message, session); invalid = false; } - public HornetQMapMessage() + public ActiveMQMapMessage() { invalid = false; } @@ -89,9 +89,9 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag * @param foreign * @throws JMSException */ - public HornetQMapMessage(final MapMessage foreign, final ClientSession session) throws JMSException + public ActiveMQMapMessage(final MapMessage foreign, final ClientSession session) throws JMSException { - super(foreign, HornetQMapMessage.TYPE, session); + super(foreign, ActiveMQMapMessage.TYPE, session); Enumeration names = foreign.getMapNames(); while (names.hasMoreElements()) { @@ -106,7 +106,7 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag @Override public byte getType() { - return HornetQMapMessage.TYPE; + return ActiveMQMapMessage.TYPE; } // MapMessage implementation ------------------------------------- @@ -367,7 +367,7 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag } - // HornetQRAMessage overrides ---------------------------------------- + // ActiveMQRAMessage overrides ---------------------------------------- @Override public void clearBody() throws JMSException @@ -416,11 +416,11 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag if (name == null) { - throw HornetQJMSClientBundle.BUNDLE.nameCannotBeNull(); + throw ActiveMQJMSClientBundle.BUNDLE.nameCannotBeNull(); } if (name.equals("")) { - throw HornetQJMSClientBundle.BUNDLE.nameCannotBeEmpty(); + throw ActiveMQJMSClientBundle.BUNDLE.nameCannotBeEmpty(); } } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQMessage.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQMessage.java similarity index 85% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQMessage.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQMessage.java index 4f8038fdbf..c955f41158 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQMessage.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQMessage.java @@ -37,14 +37,14 @@ import org.apache.activemq.api.core.ActiveMQPropertyConversionException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.api.jms.HornetQJMSConstants; +import org.apache.activemq.api.jms.ActiveMQJMSConstants; import org.apache.activemq.core.message.impl.MessageInternal; import org.apache.activemq.reader.MessageUtil; import org.apache.activemq.utils.UUID; /** - * HornetQ implementation of a JMS Message. + * ActiveMQ implementation of a JMS Message. *
* JMS Messages only live on the client side - the server only deals with MessageImpl * instances @@ -60,7 +60,7 @@ import org.apache.activemq.utils.UUID; * @author Andy Taylor * @author Clebert Suconic */ -public class HornetQMessage implements javax.jms.Message +public class ActiveMQMessage implements javax.jms.Message { // Constants ----------------------------------------------------- public static final byte TYPE = org.apache.activemq.api.core.Message.DEFAULT_TYPE; @@ -114,55 +114,55 @@ public class HornetQMessage implements javax.jms.Message private static final HashSet reservedIdentifiers = new HashSet(); static { - HornetQMessage.reservedIdentifiers.add("NULL"); - HornetQMessage.reservedIdentifiers.add("TRUE"); - HornetQMessage.reservedIdentifiers.add("FALSE"); - HornetQMessage.reservedIdentifiers.add("NOT"); - HornetQMessage.reservedIdentifiers.add("AND"); - HornetQMessage.reservedIdentifiers.add("OR"); - HornetQMessage.reservedIdentifiers.add("BETWEEN"); - HornetQMessage.reservedIdentifiers.add("LIKE"); - HornetQMessage.reservedIdentifiers.add("IN"); - HornetQMessage.reservedIdentifiers.add("IS"); - HornetQMessage.reservedIdentifiers.add("ESCAPE"); + ActiveMQMessage.reservedIdentifiers.add("NULL"); + ActiveMQMessage.reservedIdentifiers.add("TRUE"); + ActiveMQMessage.reservedIdentifiers.add("FALSE"); + ActiveMQMessage.reservedIdentifiers.add("NOT"); + ActiveMQMessage.reservedIdentifiers.add("AND"); + ActiveMQMessage.reservedIdentifiers.add("OR"); + ActiveMQMessage.reservedIdentifiers.add("BETWEEN"); + ActiveMQMessage.reservedIdentifiers.add("LIKE"); + ActiveMQMessage.reservedIdentifiers.add("IN"); + ActiveMQMessage.reservedIdentifiers.add("IS"); + ActiveMQMessage.reservedIdentifiers.add("ESCAPE"); } - public static HornetQMessage createMessage(final ClientMessage message, final ClientSession session) + public static ActiveMQMessage createMessage(final ClientMessage message, final ClientSession session) { int type = message.getType(); - HornetQMessage msg; + ActiveMQMessage msg; switch (type) { - case HornetQMessage.TYPE: // 0 + case ActiveMQMessage.TYPE: // 0 { - msg = new HornetQMessage(message, session); + msg = new ActiveMQMessage(message, session); break; } - case HornetQBytesMessage.TYPE: // 4 + case ActiveMQBytesMessage.TYPE: // 4 { - msg = new HornetQBytesMessage(message, session); + msg = new ActiveMQBytesMessage(message, session); break; } - case HornetQMapMessage.TYPE: // 5 + case ActiveMQMapMessage.TYPE: // 5 { - msg = new HornetQMapMessage(message, session); + msg = new ActiveMQMapMessage(message, session); break; } - case HornetQObjectMessage.TYPE: + case ActiveMQObjectMessage.TYPE: { - msg = new HornetQObjectMessage(message, session); + msg = new ActiveMQObjectMessage(message, session); break; } - case HornetQStreamMessage.TYPE: // 6 + case ActiveMQStreamMessage.TYPE: // 6 { - msg = new HornetQStreamMessage(message, session); + msg = new ActiveMQStreamMessage(message, session); break; } - case HornetQTextMessage.TYPE: // 3 + case ActiveMQTextMessage.TYPE: // 3 { - msg = new HornetQTextMessage(message, session); + msg = new ActiveMQTextMessage(message, session); break; } default: @@ -211,21 +211,21 @@ public class HornetQMessage implements javax.jms.Message /* * Create a new message prior to sending */ - protected HornetQMessage(final byte type, final ClientSession session) + protected ActiveMQMessage(final byte type, final ClientSession session) { message = session.createMessage(type, true, 0, System.currentTimeMillis(), (byte)4); } - protected HornetQMessage(final ClientSession session) + protected ActiveMQMessage(final ClientSession session) { - this(HornetQMessage.TYPE, session); + this(ActiveMQMessage.TYPE, session); } /** * Constructor for when receiving a message from the server */ - public HornetQMessage(final ClientMessage message, final ClientSession session) + public ActiveMQMessage(final ClientMessage message, final ClientSession session) { this.message = message; @@ -239,22 +239,22 @@ public class HornetQMessage implements javax.jms.Message /* * A constructor that takes a foreign message */ - public HornetQMessage(final Message foreign, final ClientSession session) throws JMSException + public ActiveMQMessage(final Message foreign, final ClientSession session) throws JMSException { - this(foreign, HornetQMessage.TYPE, session); + this(foreign, ActiveMQMessage.TYPE, session); } - public HornetQMessage() + public ActiveMQMessage() { } - protected HornetQMessage(final Message foreign, final byte type, final ClientSession session) throws JMSException + protected ActiveMQMessage(final Message foreign, final byte type, final ClientSession session) throws JMSException { this(type, session); setJMSTimestamp(foreign.getJMSTimestamp()); - String value = System.getProperty(HornetQJMSConstants.JMS_HORNETQ_ENABLE_BYTE_ARRAY_JMS_CORRELATION_ID_PROPERTY_NAME); + String value = System.getProperty(ActiveMQJMSConstants.JMS_ACTIVEMQ_ENABLE_BYTE_ARRAY_JMS_CORRELATION_ID_PROPERTY_NAME); boolean supportBytesId = !"false".equals(value); @@ -278,7 +278,7 @@ public class HornetQMessage implements javax.jms.Message else { // Some providers, like WSMQ do automatic conversions between native byte[] correlation id - // and String correlation id. This makes it impossible for HQ to guarantee to return the correct + // and String correlation id. This makes it impossible for ActiveMQ to guarantee to return the correct // type as set by the user // So we allow the behaviour to be overridden by a system property // https://jira.jboss.org/jira/browse/HORNETQ-356 @@ -387,7 +387,7 @@ public class HornetQMessage implements javax.jms.Message if (repl != null) { - replyTo = HornetQDestination.fromAddress(repl.toString()); + replyTo = ActiveMQDestination.fromAddress(repl.toString()); } } return replyTo; @@ -403,12 +403,12 @@ public class HornetQMessage implements javax.jms.Message } else { - if (dest instanceof HornetQDestination == false) + if (dest instanceof ActiveMQDestination == false) { - throw new InvalidDestinationException("Not a HornetQ destination " + dest); + throw new InvalidDestinationException("Not a ActiveMQ destination " + dest); } - HornetQDestination jbd = (HornetQDestination)dest; + ActiveMQDestination jbd = (ActiveMQDestination)dest; MessageUtil.setJMSReplyTo(message, jbd.getSimpleAddress()); @@ -422,7 +422,7 @@ public class HornetQMessage implements javax.jms.Message { SimpleString sdest = message.getAddress(); - dest = sdest == null ? null : HornetQDestination.fromAddress(sdest.toString()); + dest = sdest == null ? null : ActiveMQDestination.fromAddress(sdest.toString()); } return dest; @@ -450,7 +450,7 @@ public class HornetQMessage implements javax.jms.Message } else { - throw HornetQJMSClientBundle.BUNDLE.illegalDeliveryMode(deliveryMode); + throw ActiveMQJMSClientBundle.BUNDLE.illegalDeliveryMode(deliveryMode); } } @@ -736,13 +736,13 @@ public class HornetQMessage implements javax.jms.Message public void setObjectProperty(final String name, final Object value) throws JMSException { - if (HornetQJMSConstants.JMS_HORNETQ_OUTPUT_STREAM.equals(name)) + if (ActiveMQJMSConstants.JMS_ACTIVEMQ_OUTPUT_STREAM.equals(name)) { setOutputStream((OutputStream)value); return; } - else if (HornetQJMSConstants.JMS_HORNETQ_SAVE_STREAM.equals(name)) + else if (ActiveMQJMSConstants.JMS_ACTIVEMQ_SAVE_STREAM.equals(name)) { saveToOutputStream((OutputStream)value); @@ -751,7 +751,7 @@ public class HornetQMessage implements javax.jms.Message checkProperty(name); - if (HornetQJMSConstants.JMS_HORNETQ_INPUT_STREAM.equals(name)) + if (ActiveMQJMSConstants.JMS_ACTIVEMQ_INPUT_STREAM.equals(name)) { setInputStream((InputStream)value); @@ -783,7 +783,7 @@ public class HornetQMessage implements javax.jms.Message } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } } @@ -906,7 +906,7 @@ public class HornetQMessage implements javax.jms.Message public byte getType() { - return HornetQMessage.TYPE; + return ActiveMQMessage.TYPE; } public void setInputStream(final InputStream input) throws JMSException @@ -914,7 +914,7 @@ public class HornetQMessage implements javax.jms.Message checkStream(); if (readOnly) { - throw HornetQJMSClientBundle.BUNDLE.messageNotWritable(); + throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } message.setBodyInputStream(input); @@ -934,7 +934,7 @@ public class HornetQMessage implements javax.jms.Message } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -952,7 +952,7 @@ public class HornetQMessage implements javax.jms.Message } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -965,14 +965,14 @@ public class HornetQMessage implements javax.jms.Message } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @Override public String toString() { - StringBuffer sb = new StringBuffer("HornetQMessage["); + StringBuffer sb = new StringBuffer("ActiveMQMessage["); sb.append(getJMSMessageID()); sb.append("]:"); sb.append(message.isDurable() ? "PERSISTENT" : "NON-PERSISTENT"); @@ -987,7 +987,7 @@ public class HornetQMessage implements javax.jms.Message { if (readOnly) { - throw HornetQJMSClientBundle.BUNDLE.messageNotWritable(); + throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } } @@ -995,7 +995,7 @@ public class HornetQMessage implements javax.jms.Message { if (!readOnly) { - throw HornetQJMSClientBundle.BUNDLE.messageNotReadable(); + throw ActiveMQJMSClientBundle.BUNDLE.messageNotReadable(); } } @@ -1003,9 +1003,9 @@ public class HornetQMessage implements javax.jms.Message private void checkStream() throws JMSException { - if (!(message.getType() == HornetQBytesMessage.TYPE || message.getType() == HornetQStreamMessage.TYPE)) + if (!(message.getType() == ActiveMQBytesMessage.TYPE || message.getType() == ActiveMQStreamMessage.TYPE)) { - throw HornetQJMSClientBundle.BUNDLE.onlyValidForByteOrStreamMessages(); + throw ActiveMQJMSClientBundle.BUNDLE.onlyValidForByteOrStreamMessages(); } } @@ -1013,22 +1013,22 @@ public class HornetQMessage implements javax.jms.Message { if (propertiesReadOnly) { - if (name.equals(HornetQJMSConstants.JMS_HORNETQ_INPUT_STREAM)) + if (name.equals(ActiveMQJMSConstants.JMS_ACTIVEMQ_INPUT_STREAM)) { - throw new MessageNotWriteableException("You cannot set the Input Stream on received messages. Did you mean " + HornetQJMSConstants.JMS_HORNETQ_OUTPUT_STREAM + + throw new MessageNotWriteableException("You cannot set the Input Stream on received messages. Did you mean " + ActiveMQJMSConstants.JMS_ACTIVEMQ_OUTPUT_STREAM + " or " + - HornetQJMSConstants.JMS_HORNETQ_SAVE_STREAM + + ActiveMQJMSConstants.JMS_ACTIVEMQ_SAVE_STREAM + "?"); } else { - throw HornetQJMSClientBundle.BUNDLE.messageNotWritable(); + throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } } if (name == null) { - throw HornetQJMSClientBundle.BUNDLE.nullArgumentNotAllowed("property"); + throw ActiveMQJMSClientBundle.BUNDLE.nullArgumentNotAllowed("property"); } if (name.equals("")) @@ -1038,17 +1038,17 @@ public class HornetQMessage implements javax.jms.Message if (!isValidJavaIdentifier(name)) { - throw HornetQJMSClientBundle.BUNDLE.invalidJavaIdentifier(name); + throw ActiveMQJMSClientBundle.BUNDLE.invalidJavaIdentifier(name); } - if (HornetQMessage.reservedIdentifiers.contains(name)) + if (ActiveMQMessage.reservedIdentifiers.contains(name)) { throw new JMSRuntimeException("The property name '" + name + "' is reserved due to selector syntax."); } - if (name.startsWith("JMS_HORNETQ")) + if (name.startsWith("JMS_ACTIVEMQ")) { - throw new JMSRuntimeException("The property name '" + name + "' is illegal since it starts with JMS_HORNETQ"); + throw new JMSRuntimeException("The property name '" + name + "' is illegal since it starts with JMS_ACTIVEMQ"); } } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQMessageConsumer.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQMessageConsumer.java similarity index 78% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQMessageConsumer.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQMessageConsumer.java index 48dbabb3aa..e721b3c1dd 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQMessageConsumer.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQMessageConsumer.java @@ -27,14 +27,14 @@ import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.MessageHandler; -import org.apache.activemq.api.jms.HornetQJMSConstants; +import org.apache.activemq.api.jms.ActiveMQJMSConstants; /** - * HornetQ implementation of a JMS MessageConsumer. + * ActiveMQ implementation of a JMS MessageConsumer. * * @author Ovidiu Feodorov */ -public final class HornetQMessageConsumer implements QueueReceiver, TopicSubscriber +public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscriber { private final ClientConsumer consumer; @@ -42,15 +42,15 @@ public final class HornetQMessageConsumer implements QueueReceiver, TopicSubscri private MessageHandler coreListener; - private final HornetQConnection connection; + private final ActiveMQConnection connection; - private final HornetQSession session; + private final ActiveMQSession session; private final int ackMode; private final boolean noLocal; - private final HornetQDestination destination; + private final ActiveMQDestination destination; private final String selector; @@ -58,13 +58,13 @@ public final class HornetQMessageConsumer implements QueueReceiver, TopicSubscri // Constructors -------------------------------------------------- - protected HornetQMessageConsumer(final HornetQConnection connection, - final HornetQSession session, - final ClientConsumer consumer, - final boolean noLocal, - final HornetQDestination destination, - final String selector, - final SimpleString autoDeleteQueueName) throws JMSException + protected ActiveMQMessageConsumer(final ActiveMQConnection connection, + final ActiveMQSession session, + final ClientConsumer consumer, + final boolean noLocal, + final ActiveMQDestination destination, + final String selector, + final SimpleString autoDeleteQueueName) throws JMSException { this.connection = connection; @@ -111,7 +111,7 @@ public final class HornetQMessageConsumer implements QueueReceiver, TopicSubscri } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -146,7 +146,7 @@ public final class HornetQMessageConsumer implements QueueReceiver, TopicSubscri } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -180,7 +180,7 @@ public final class HornetQMessageConsumer implements QueueReceiver, TopicSubscri @Override public String toString() { - return "HornetQMessageConsumer[" + consumer + "]"; + return "ActiveMQMessageConsumer[" + consumer + "]"; } public boolean isClosed() @@ -203,7 +203,7 @@ public final class HornetQMessageConsumer implements QueueReceiver, TopicSubscri } } - private HornetQMessage getMessage(final long timeout, final boolean noWait) throws JMSException + private ActiveMQMessage getMessage(final long timeout, final boolean noWait) throws JMSException { try { @@ -218,19 +218,19 @@ public final class HornetQMessageConsumer implements QueueReceiver, TopicSubscri coreMessage = consumer.receive(timeout); } - HornetQMessage jmsMsg = null; + ActiveMQMessage jmsMsg = null; if (coreMessage != null) { boolean needSession = - ackMode == Session.CLIENT_ACKNOWLEDGE || ackMode == HornetQJMSConstants.INDIVIDUAL_ACKNOWLEDGE; - jmsMsg = HornetQMessage.createMessage(coreMessage, needSession ? session.getCoreSession() : null); + ackMode == Session.CLIENT_ACKNOWLEDGE || ackMode == ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE; + jmsMsg = ActiveMQMessage.createMessage(coreMessage, needSession ? session.getCoreSession() : null); jmsMsg.doBeforeReceive(); // We Do the ack after doBeforeRecive, as in the case of large messages, this may fail so we don't want messages redelivered // https://issues.jboss.org/browse/JBPAPP-6110 - if (session.getAcknowledgeMode() == HornetQJMSConstants.INDIVIDUAL_ACKNOWLEDGE) + if (session.getAcknowledgeMode() == ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE) { jmsMsg.setIndividualAcknowledge(); } @@ -244,7 +244,7 @@ public final class HornetQMessageConsumer implements QueueReceiver, TopicSubscri } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQMessageProducer.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQMessageProducer.java similarity index 83% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQMessageProducer.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQMessageProducer.java index 6f083ab814..00aed534f6 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQMessageProducer.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQMessageProducer.java @@ -39,15 +39,15 @@ import org.apache.activemq.api.core.client.SendAcknowledgementHandler; import org.apache.activemq.utils.UUID; import org.apache.activemq.utils.UUIDGenerator; /** - * HornetQ implementation of a JMS MessageProducer. + * ActiveMQ implementation of a JMS MessageProducer. * * @author Ovidiu Feodorov * @author Tim Fox * @author Andy Taylor */ -public class HornetQMessageProducer implements MessageProducer, QueueSender, TopicPublisher +public class ActiveMQMessageProducer implements MessageProducer, QueueSender, TopicPublisher { - private final HornetQConnection connection; + private final ActiveMQConnection connection; private final SimpleString connID; @@ -63,11 +63,11 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top private int defaultDeliveryMode = Message.DEFAULT_DELIVERY_MODE; private long defaultDeliveryDelay = Message.DEFAULT_DELIVERY_DELAY; - private final HornetQDestination defaultDestination; + private final ActiveMQDestination defaultDestination; // Constructors -------------------------------------------------- - protected HornetQMessageProducer(final HornetQConnection connection, final ClientProducer producer, - final HornetQDestination defaultDestination, final ClientSession clientSession) throws JMSException + protected ActiveMQMessageProducer(final ActiveMQConnection connection, final ClientProducer producer, + final ActiveMQDestination defaultDestination, final ClientSession clientSession) throws JMSException { this.connection = connection; @@ -115,7 +115,7 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top checkClosed(); if (deliveryMode != DeliveryMode.NON_PERSISTENT && deliveryMode != DeliveryMode.PERSISTENT) { - throw HornetQJMSClientBundle.BUNDLE.illegalDeliveryMode(deliveryMode); + throw ActiveMQJMSClientBundle.BUNDLE.illegalDeliveryMode(deliveryMode); } defaultDeliveryMode = deliveryMode; @@ -177,7 +177,7 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -207,7 +207,7 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top checkDestination(destination); - doSendx((HornetQDestination)destination, message, deliveryMode, priority, timeToLive, null); + doSendx((ActiveMQDestination)destination, message, deliveryMode, priority, timeToLive, null); } @Override @@ -253,7 +253,7 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top checkDestination(destination); - doSendx((HornetQDestination)destination, message, deliveryMode, priority, timeToLive, completionListener); + doSendx((ActiveMQDestination)destination, message, deliveryMode, priority, timeToLive, completionListener); } // TopicPublisher Implementation --------------------------------- @@ -282,7 +282,7 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top final long timeToLive) throws JMSException { checkDestination(topic); - doSendx((HornetQDestination)topic, message, deliveryMode, priority, timeToLive, null); + doSendx((ActiveMQDestination)topic, message, deliveryMode, priority, timeToLive, null); } // QueueSender Implementation ------------------------------------ @@ -296,7 +296,7 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top final long timeToLive) throws JMSException { checkDestination(queue); - doSendx((HornetQDestination)queue, message, deliveryMode, priority, timeToLive, null); + doSendx((ActiveMQDestination)queue, message, deliveryMode, priority, timeToLive, null); } public Queue getQueue() throws JMSException @@ -309,7 +309,7 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top @Override public String toString() { - return "HornetQMessageProducer->" + clientProducer; + return "ActiveMQMessageProducer->" + clientProducer; } /** @@ -328,9 +328,9 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top */ private void checkDestination(Destination destination) throws InvalidDestinationException { - if (destination != null && !(destination instanceof HornetQDestination)) + if (destination != null && !(destination instanceof ActiveMQDestination)) { - throw new InvalidDestinationException("Not a HornetQ Destination:" + destination); + throw new InvalidDestinationException("Not a ActiveMQ Destination:" + destination); } if (destination != null && defaultDestination != null) { @@ -338,7 +338,7 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top } if (destination == null) { - throw HornetQJMSClientBundle.BUNDLE.nullTopic(); + throw ActiveMQJMSClientBundle.BUNDLE.nullTopic(); } } @@ -346,12 +346,12 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top { if (completionListener == null) { - throw HornetQJMSClientBundle.BUNDLE.nullArgumentNotAllowed("CompletionListener"); + throw ActiveMQJMSClientBundle.BUNDLE.nullArgumentNotAllowed("CompletionListener"); } } - private void doSendx(HornetQDestination destination, final Message jmsMessage, final int deliveryMode, + private void doSendx(ActiveMQDestination destination, final Message jmsMessage, final int deliveryMode, final int priority, final long timeToLive, CompletionListener completionListener) throws JMSException { @@ -420,44 +420,44 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } } - HornetQMessage hqJmsMessage; + ActiveMQMessage activeMQJmsMessage; boolean foreign = false; // First convert from foreign message if appropriate - if (!(jmsMessage instanceof HornetQMessage)) + if (!(jmsMessage instanceof ActiveMQMessage)) { // JMS 1.1 Sect. 3.11.4: A provider must be prepared to accept, from a client, // a message whose implementation is not one of its own. if (jmsMessage instanceof BytesMessage) { - hqJmsMessage = new HornetQBytesMessage((BytesMessage)jmsMessage, clientSession); + activeMQJmsMessage = new ActiveMQBytesMessage((BytesMessage)jmsMessage, clientSession); } else if (jmsMessage instanceof MapMessage) { - hqJmsMessage = new HornetQMapMessage((MapMessage)jmsMessage, clientSession); + activeMQJmsMessage = new ActiveMQMapMessage((MapMessage)jmsMessage, clientSession); } else if (jmsMessage instanceof ObjectMessage) { - hqJmsMessage = new HornetQObjectMessage((ObjectMessage)jmsMessage, clientSession); + activeMQJmsMessage = new ActiveMQObjectMessage((ObjectMessage)jmsMessage, clientSession); } else if (jmsMessage instanceof StreamMessage) { - hqJmsMessage = new HornetQStreamMessage((StreamMessage)jmsMessage, clientSession); + activeMQJmsMessage = new ActiveMQStreamMessage((StreamMessage)jmsMessage, clientSession); } else if (jmsMessage instanceof TextMessage) { - hqJmsMessage = new HornetQTextMessage((TextMessage)jmsMessage, clientSession); + activeMQJmsMessage = new ActiveMQTextMessage((TextMessage)jmsMessage, clientSession); } else { - hqJmsMessage = new HornetQMessage(jmsMessage, clientSession); + activeMQJmsMessage = new ActiveMQMessage(jmsMessage, clientSession); } // Set the destination on the original message @@ -467,7 +467,7 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top } else { - hqJmsMessage = (HornetQMessage)jmsMessage; + activeMQJmsMessage = (ActiveMQMessage)jmsMessage; } if (!disableMessageID) @@ -476,21 +476,21 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top UUID uid = UUIDGenerator.getInstance().generateUUID(); - hqJmsMessage.getCoreMessage().setUserID(uid); + activeMQJmsMessage.getCoreMessage().setUserID(uid); - hqJmsMessage.resetMessageID(null); + activeMQJmsMessage.resetMessageID(null); } if (foreign) { - jmsMessage.setJMSMessageID(hqJmsMessage.getJMSMessageID()); + jmsMessage.setJMSMessageID(activeMQJmsMessage.getJMSMessageID()); } - hqJmsMessage.setJMSDestination(destination); + activeMQJmsMessage.setJMSDestination(destination); try { - hqJmsMessage.doBeforeSend(); + activeMQJmsMessage.doBeforeSend(); } catch (Exception e) { @@ -503,11 +503,11 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top if (defaultDeliveryDelay > 0) { - hqJmsMessage.setJMSDeliveryTime(System.currentTimeMillis() + defaultDeliveryDelay); + activeMQJmsMessage.setJMSDeliveryTime(System.currentTimeMillis() + defaultDeliveryDelay); } - ClientMessage coreMessage = hqJmsMessage.getCoreMessage(); - coreMessage.putStringProperty(HornetQConnection.CONNECTION_ID_PROPERTY_NAME, connID); + ClientMessage coreMessage = activeMQJmsMessage.getCoreMessage(); + coreMessage.putStringProperty(ActiveMQConnection.CONNECTION_ID_PROPERTY_NAME, connID); try { @@ -526,7 +526,7 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -542,13 +542,13 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top { private final CompletionListener completionListener; private final Message jmsMessage; - private final HornetQMessageProducer producer; + private final ActiveMQMessageProducer producer; /** * @param jmsMessage * @param producer */ - public CompletionListenerWrapper(CompletionListener listener, Message jmsMessage, HornetQMessageProducer producer) + public CompletionListenerWrapper(CompletionListener listener, Message jmsMessage, ActiveMQMessageProducer producer) { this.completionListener = listener; this.jmsMessage = jmsMessage; diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQObjectMessage.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQObjectMessage.java similarity index 89% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQObjectMessage.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQObjectMessage.java index e4d98e476c..8e7a1aa7d7 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQObjectMessage.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQObjectMessage.java @@ -27,7 +27,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession; /** - * HornetQ implementation of a JMS ObjectMessage. + * ActiveMQ implementation of a JMS ObjectMessage. *
* Don't used ObjectMessage if you want good performance! *

@@ -37,7 +37,7 @@ import org.apache.activemq.api.core.client.ClientSession; * @author Ovidiu Feodorov * @author Andy Taylor */ -public class HornetQObjectMessage extends HornetQMessage implements ObjectMessage +public class ActiveMQObjectMessage extends ActiveMQMessage implements ObjectMessage { // Constants ----------------------------------------------------- @@ -52,12 +52,12 @@ public class HornetQObjectMessage extends HornetQMessage implements ObjectMessag // Constructors -------------------------------------------------- - protected HornetQObjectMessage(final ClientSession session) + protected ActiveMQObjectMessage(final ClientSession session) { - super(HornetQObjectMessage.TYPE, session); + super(ActiveMQObjectMessage.TYPE, session); } - protected HornetQObjectMessage(final ClientMessage message, final ClientSession session) + protected ActiveMQObjectMessage(final ClientMessage message, final ClientSession session) { super(message, session); } @@ -65,9 +65,9 @@ public class HornetQObjectMessage extends HornetQMessage implements ObjectMessag /** * A copy constructor for foreign JMS ObjectMessages. */ - public HornetQObjectMessage(final ObjectMessage foreign, final ClientSession session) throws JMSException + public ActiveMQObjectMessage(final ObjectMessage foreign, final ClientSession session) throws JMSException { - super(foreign, HornetQObjectMessage.TYPE, session); + super(foreign, ActiveMQObjectMessage.TYPE, session); setObject(foreign.getObject()); } @@ -77,7 +77,7 @@ public class HornetQObjectMessage extends HornetQMessage implements ObjectMessag @Override public byte getType() { - return HornetQObjectMessage.TYPE; + return ActiveMQObjectMessage.TYPE; } @Override @@ -180,7 +180,7 @@ public class HornetQObjectMessage extends HornetQMessage implements ObjectMessag } catch (JMSException e) { - throw new MessageFormatException("Deserialization error on HornetQObjectMessage"); + throw new MessageFormatException("Deserialization error on ActiveMQObjectMessage"); } } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQQueue.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQQueue.java similarity index 80% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQQueue.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQQueue.java index 68e50cf3ad..6bb32bd46d 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQQueue.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQQueue.java @@ -17,7 +17,7 @@ import javax.jms.Queue; import org.apache.activemq.api.core.SimpleString; /** - * HornetQ implementation of a JMS Queue. + * ActiveMQ implementation of a JMS Queue. *
* This class can be instantiated directly. * @@ -26,7 +26,7 @@ import org.apache.activemq.api.core.SimpleString; * @version $Revision: 8737 $ * */ -public class HornetQQueue extends HornetQDestination implements Queue +public class ActiveMQQueue extends ActiveMQDestination implements Queue { // Constants ----------------------------------------------------- private static final long serialVersionUID = -1106092883162295462L; @@ -35,16 +35,16 @@ public class HornetQQueue extends HornetQDestination implements Queue public static SimpleString createAddressFromName(final String name) { - return new SimpleString(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX + name); + return new SimpleString(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX + name); } // Attributes ---------------------------------------------------- // Constructors -------------------------------------------------- - public HornetQQueue(final String name) + public ActiveMQQueue(final String name) { - super(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX + name, name, false, true, null); + super(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX + name, name, false, true, null); } @@ -55,12 +55,12 @@ public class HornetQQueue extends HornetQDestination implements Queue * @param temporary * @param session */ - public HornetQQueue(String address, String name, boolean temporary, HornetQSession session) + public ActiveMQQueue(String address, String name, boolean temporary, ActiveMQSession session) { super(address, name, temporary, true, session); } - public HornetQQueue(final String address, final String name) + public ActiveMQQueue(final String address, final String name) { super(address, name, false, true, null); } @@ -77,7 +77,7 @@ public class HornetQQueue extends HornetQDestination implements Queue @Override public String toString() { - return "HornetQQueue[" + name + "]"; + return "ActiveMQQueue[" + name + "]"; } // Package protected --------------------------------------------- diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQQueueBrowser.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQQueueBrowser.java similarity index 84% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQQueueBrowser.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQQueueBrowser.java index 869d29953e..eacff5f76a 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQQueueBrowser.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQQueueBrowser.java @@ -26,13 +26,13 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession; /** - * HornetQ implementation of a JMS QueueBrowser. + * ActiveMQ implementation of a JMS QueueBrowser. * * @author Tim Fox * @author Andy Taylor * */ -public final class HornetQQueueBrowser implements QueueBrowser +public final class ActiveMQQueueBrowser implements QueueBrowser { // Constants ------------------------------------------------------------------------------------ @@ -44,19 +44,19 @@ public final class HornetQQueueBrowser implements QueueBrowser private ClientConsumer consumer; - private final HornetQQueue queue; + private final ActiveMQQueue queue; private SimpleString filterString; // Constructors --------------------------------------------------------------------------------- - protected HornetQQueueBrowser(final HornetQQueue queue, final String messageSelector, final ClientSession session) throws JMSException + protected ActiveMQQueueBrowser(final ActiveMQQueue queue, final String messageSelector, final ClientSession session) throws JMSException { this.session = session; this.queue = queue; if (messageSelector != null) { - filterString = new SimpleString(SelectorTranslator.convertToHornetQFilterString(messageSelector)); + filterString = new SimpleString(SelectorTranslator.convertToActiveMQFilterString(messageSelector)); } } @@ -72,7 +72,7 @@ public final class HornetQQueueBrowser implements QueueBrowser } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } } @@ -89,7 +89,7 @@ public final class HornetQQueueBrowser implements QueueBrowser } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -109,7 +109,7 @@ public final class HornetQQueueBrowser implements QueueBrowser @Override public String toString() { - return "HornetQQueueBrowser->" + consumer; + return "ActiveMQQueueBrowser->" + consumer; } // Package protected ---------------------------------------------------------------------------- @@ -120,7 +120,7 @@ public final class HornetQQueueBrowser implements QueueBrowser // Inner classes -------------------------------------------------------------------------------- - private final class BrowserEnumeration implements Enumeration + private final class BrowserEnumeration implements Enumeration { ClientMessage current = null; @@ -140,21 +140,21 @@ public final class HornetQQueueBrowser implements QueueBrowser return current != null; } - public HornetQMessage nextElement() + public ActiveMQMessage nextElement() { - HornetQMessage msg; + ActiveMQMessage msg; if (hasMoreElements()) { ClientMessage next = current; current = null; - msg = HornetQMessage.createMessage(next, session); + msg = ActiveMQMessage.createMessage(next, session); try { msg.doBeforeReceive(); } catch (Exception e) { - HornetQJMSClientLogger.LOGGER.errorCreatingMessage(e); + ActiveMQJMSClientLogger.LOGGER.errorCreatingMessage(e); return null; } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQQueueConnectionFactory.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQQueueConnectionFactory.java similarity index 78% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQQueueConnectionFactory.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQQueueConnectionFactory.java index 68ddd1bf16..84f5fa9761 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQQueueConnectionFactory.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQQueueConnectionFactory.java @@ -24,14 +24,14 @@ import org.apache.activemq.api.jms.JMSFactoryType; * * @author Howard Gao */ -public class HornetQQueueConnectionFactory extends HornetQConnectionFactory implements QueueConnectionFactory +public class ActiveMQQueueConnectionFactory extends ActiveMQConnectionFactory implements QueueConnectionFactory { private static final long serialVersionUID = 5312455021322463546L; /** * */ - public HornetQQueueConnectionFactory() + public ActiveMQQueueConnectionFactory() { super(); } @@ -39,7 +39,7 @@ public class HornetQQueueConnectionFactory extends HornetQConnectionFactory impl /** * @param serverLocator */ - public HornetQQueueConnectionFactory(ServerLocator serverLocator) + public ActiveMQQueueConnectionFactory(ServerLocator serverLocator) { super(serverLocator); } @@ -48,7 +48,7 @@ public class HornetQQueueConnectionFactory extends HornetQConnectionFactory impl * @param ha * @param groupConfiguration */ - public HornetQQueueConnectionFactory(boolean ha, final DiscoveryGroupConfiguration groupConfiguration) + public ActiveMQQueueConnectionFactory(boolean ha, final DiscoveryGroupConfiguration groupConfiguration) { super(ha, groupConfiguration); } @@ -57,7 +57,7 @@ public class HornetQQueueConnectionFactory extends HornetQConnectionFactory impl * @param ha * @param initialConnectors */ - public HornetQQueueConnectionFactory(boolean ha, TransportConfiguration... initialConnectors) + public ActiveMQQueueConnectionFactory(boolean ha, TransportConfiguration... initialConnectors) { super(ha, initialConnectors); } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQSession.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQSession.java similarity index 81% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQSession.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQSession.java index f37da08169..b106c6185f 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQSession.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQSession.java @@ -57,7 +57,7 @@ import org.apache.activemq.api.core.client.ClientSession.AddressQuery; import org.apache.activemq.api.core.client.ClientSession.QueueQuery; /** - * HornetQ implementation of a JMS Session. + * ActiveMQ implementation of a JMS Session. *
* Note that we *do not* support JMS ASF (Application Server Facilities) optional * constructs such as ConnectionConsumer @@ -68,7 +68,7 @@ import org.apache.activemq.api.core.client.ClientSession.QueueQuery; * * */ -public class HornetQSession implements QueueSession, TopicSession +public class ActiveMQSession implements QueueSession, TopicSession { public static final int TYPE_GENERIC_SESSION = 0; @@ -78,7 +78,7 @@ public class HornetQSession implements QueueSession, TopicSession private static SimpleString REJECTING_FILTER = new SimpleString("_HQX=-1"); - private final HornetQConnection connection; + private final ActiveMQConnection connection; private final ClientSession session; @@ -92,16 +92,16 @@ public class HornetQSession implements QueueSession, TopicSession private boolean recoverCalled; - private final Set consumers = new HashSet(); + private final Set consumers = new HashSet(); // Constructors -------------------------------------------------- - protected HornetQSession(final HornetQConnection connection, - final boolean transacted, - final boolean xa, - final int ackMode, - final ClientSession session, - final int sessionType) + protected ActiveMQSession(final ActiveMQConnection connection, + final boolean transacted, + final boolean xa, + final int ackMode, + final ClientSession session, + final int sessionType) { this.connection = connection; @@ -122,35 +122,35 @@ public class HornetQSession implements QueueSession, TopicSession { checkClosed(); - return new HornetQBytesMessage(session); + return new ActiveMQBytesMessage(session); } public MapMessage createMapMessage() throws JMSException { checkClosed(); - return new HornetQMapMessage(session); + return new ActiveMQMapMessage(session); } public Message createMessage() throws JMSException { checkClosed(); - return new HornetQMessage(session); + return new ActiveMQMessage(session); } public ObjectMessage createObjectMessage() throws JMSException { checkClosed(); - return new HornetQObjectMessage(session); + return new ActiveMQObjectMessage(session); } public ObjectMessage createObjectMessage(final Serializable object) throws JMSException { checkClosed(); - HornetQObjectMessage msg = new HornetQObjectMessage(session); + ActiveMQObjectMessage msg = new ActiveMQObjectMessage(session); msg.setObject(object); @@ -161,14 +161,14 @@ public class HornetQSession implements QueueSession, TopicSession { checkClosed(); - return new HornetQStreamMessage(session); + return new ActiveMQStreamMessage(session); } public TextMessage createTextMessage() throws JMSException { checkClosed(); - HornetQTextMessage msg = new HornetQTextMessage(session); + ActiveMQTextMessage msg = new ActiveMQTextMessage(session); msg.setText(null); @@ -179,7 +179,7 @@ public class HornetQSession implements QueueSession, TopicSession { checkClosed(); - HornetQTextMessage msg = new HornetQTextMessage(session); + ActiveMQTextMessage msg = new ActiveMQTextMessage(session); msg.setText(text); @@ -221,7 +221,7 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -242,7 +242,7 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -254,7 +254,7 @@ public class HornetQSession implements QueueSession, TopicSession { try { - for (HornetQMessageConsumer cons : new HashSet(consumers)) + for (ActiveMQMessageConsumer cons : new HashSet(consumers)) { cons.close(); } @@ -265,7 +265,7 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } } @@ -283,7 +283,7 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } recoverCalled = true; @@ -307,14 +307,14 @@ public class HornetQSession implements QueueSession, TopicSession public MessageProducer createProducer(final Destination destination) throws JMSException { - if (destination != null && !(destination instanceof HornetQDestination)) + if (destination != null && !(destination instanceof ActiveMQDestination)) { - throw new InvalidDestinationException("Not a HornetQ Destination:" + destination); + throw new InvalidDestinationException("Not a ActiveMQ Destination:" + destination); } try { - HornetQDestination jbd = (HornetQDestination)destination; + ActiveMQDestination jbd = (ActiveMQDestination)destination; if (jbd != null) { @@ -330,11 +330,11 @@ public class HornetQSession implements QueueSession, TopicSession ClientProducer producer = session.createProducer(jbd == null ? null : jbd.getSimpleAddress()); - return new HornetQMessageProducer(connection, producer, jbd, session); + return new ActiveMQMessageProducer(connection, producer, jbd, session); } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -357,12 +357,12 @@ public class HornetQSession implements QueueSession, TopicSession throw new InvalidDestinationException("Cannot create a consumer with a null destination"); } - if (!(destination instanceof HornetQDestination)) + if (!(destination instanceof ActiveMQDestination)) { - throw new InvalidDestinationException("Not a HornetQDestination:" + destination); + throw new InvalidDestinationException("Not a ActiveMQDestination:" + destination); } - HornetQDestination jbdest = (HornetQDestination)destination; + ActiveMQDestination jbdest = (ActiveMQDestination)destination; if (jbdest.isTemporary() && !connection.containsTemporaryQueue(jbdest.getSimpleAddress())) { @@ -376,14 +376,14 @@ public class HornetQSession implements QueueSession, TopicSession public Queue createQueue(final String queueName) throws JMSException { // As per spec. section 4.11 - if (sessionType == HornetQSession.TYPE_TOPIC_SESSION) + if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) { throw new IllegalStateException("Cannot create a queue using a TopicSession"); } try { - HornetQQueue queue = lookupQueue(queueName, false); + ActiveMQQueue queue = lookupQueue(queueName, false); if (queue == null) { @@ -401,21 +401,21 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } public Topic createTopic(final String topicName) throws JMSException { // As per spec. section 4.11 - if (sessionType == HornetQSession.TYPE_QUEUE_SESSION) + if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) { throw new IllegalStateException("Cannot create a topic on a QueueSession"); } try { - HornetQTopic topic = lookupTopic(topicName, false); + ActiveMQTopic topic = lookupTopic(topicName, false); if (topic == null) { @@ -433,7 +433,7 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -448,21 +448,21 @@ public class HornetQSession implements QueueSession, TopicSession final boolean noLocal) throws JMSException { // As per spec. section 4.11 - if (sessionType == HornetQSession.TYPE_QUEUE_SESSION) + if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) { throw new IllegalStateException("Cannot create a durable subscriber on a QueueSession"); } checkTopic(topic); - if (!(topic instanceof HornetQDestination)) + if (!(topic instanceof ActiveMQDestination)) { - throw new InvalidDestinationException("Not a HornetQTopic:" + topic); + throw new InvalidDestinationException("Not a ActiveMQTopic:" + topic); } if ("".equals(messageSelector)) { messageSelector = null; } - HornetQDestination jbdest = (HornetQDestination)topic; + ActiveMQDestination jbdest = (ActiveMQDestination)topic; if (jbdest.isQueue()) { @@ -476,7 +476,7 @@ public class HornetQSession implements QueueSession, TopicSession { if (topic == null) { - throw HornetQJMSClientBundle.BUNDLE.nullTopic(); + throw ActiveMQJMSClientBundle.BUNDLE.nullTopic(); } } @@ -503,19 +503,19 @@ public class HornetQSession implements QueueSession, TopicSession @Override public MessageConsumer createSharedConsumer(Topic topic, String name, String messageSelector) throws JMSException { - if (sessionType == HornetQSession.TYPE_QUEUE_SESSION) + if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) { throw new IllegalStateException("Cannot create a shared consumer on a QueueSession"); } checkTopic(topic); - HornetQTopic localTopic; - if (topic instanceof HornetQTopic) + ActiveMQTopic localTopic; + if (topic instanceof ActiveMQTopic) { - localTopic = (HornetQTopic)topic; + localTopic = (ActiveMQTopic)topic; } else { - localTopic = new HornetQTopic(topic.getTopicName()); + localTopic = new ActiveMQTopic(topic.getTopicName()); } return internalCreateSharedConsumer(localTopic, name, messageSelector, ConsumerDurability.NON_DURABLE, true); } @@ -529,19 +529,19 @@ public class HornetQSession implements QueueSession, TopicSession @Override public MessageConsumer createDurableConsumer(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException { - if (sessionType == HornetQSession.TYPE_QUEUE_SESSION) + if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) { throw new IllegalStateException("Cannot create a durable consumer on a QueueSession"); } checkTopic(topic); - HornetQTopic localTopic; - if (topic instanceof HornetQTopic) + ActiveMQTopic localTopic; + if (topic instanceof ActiveMQTopic) { - localTopic = (HornetQTopic)topic; + localTopic = (ActiveMQTopic)topic; } else { - localTopic = new HornetQTopic(topic.getTopicName()); + localTopic = new ActiveMQTopic(topic.getTopicName()); } return createConsumer(localTopic, name, messageSelector, noLocal, ConsumerDurability.DURABLE); } @@ -555,22 +555,22 @@ public class HornetQSession implements QueueSession, TopicSession @Override public MessageConsumer createSharedDurableConsumer(Topic topic, String name, String messageSelector) throws JMSException { - if (sessionType == HornetQSession.TYPE_QUEUE_SESSION) + if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) { throw new IllegalStateException("Cannot create a shared durable consumer on a QueueSession"); } checkTopic(topic); - HornetQTopic localTopic; + ActiveMQTopic localTopic; - if (topic instanceof HornetQTopic) + if (topic instanceof ActiveMQTopic) { - localTopic = (HornetQTopic)topic; + localTopic = (ActiveMQTopic)topic; } else { - localTopic = new HornetQTopic(topic.getTopicName()); + localTopic = new ActiveMQTopic(topic.getTopicName()); } return internalCreateSharedConsumer(localTopic, name, messageSelector, ConsumerDurability.DURABLE, true); } @@ -584,7 +584,7 @@ public class HornetQSession implements QueueSession, TopicSession /** * This is an internal method for shared consumers */ - private HornetQMessageConsumer internalCreateSharedConsumer(final HornetQDestination dest, + private ActiveMQMessageConsumer internalCreateSharedConsumer(final ActiveMQDestination dest, final String subscriptionName, String selectorString, ConsumerDurability durability, @@ -602,7 +602,7 @@ public class HornetQSession implements QueueSession, TopicSession if (subscriptionName == null) { - throw HornetQJMSClientBundle.BUNDLE.invalidSubscriptionName(); + throw ActiveMQJMSClientBundle.BUNDLE.invalidSubscriptionName(); } selectorString = "".equals(selectorString) ? null : selectorString; @@ -611,7 +611,7 @@ public class HornetQSession implements QueueSession, TopicSession if (selectorString != null) { - coreFilterString = new SimpleString(SelectorTranslator.convertToHornetQFilterString(selectorString)); + coreFilterString = new SimpleString(SelectorTranslator.convertToActiveMQFilterString(selectorString)); } ClientConsumer consumer; @@ -622,7 +622,7 @@ public class HornetQSession implements QueueSession, TopicSession if (!response.isExists()) { - throw HornetQJMSClientBundle.BUNDLE.destinationDoesNotExist(dest.getSimpleAddress()); + throw ActiveMQJMSClientBundle.BUNDLE.destinationDoesNotExist(dest.getSimpleAddress()); } SimpleString queueName; @@ -632,8 +632,8 @@ public class HornetQSession implements QueueSession, TopicSession throw new InvalidDestinationException("Cannot create a durable subscription on a temporary topic"); } - queueName = new SimpleString(HornetQDestination.createQueueNameForDurableSubscription(durability == ConsumerDurability.DURABLE, connection.getClientID(), - subscriptionName)); + queueName = new SimpleString(ActiveMQDestination.createQueueNameForDurableSubscription(durability == ConsumerDurability.DURABLE, connection.getClientID(), + subscriptionName)); if (durability == ConsumerDurability.DURABLE) { @@ -655,7 +655,7 @@ public class HornetQSession implements QueueSession, TopicSession consumer = session.createConsumer(queueName, null, false); - HornetQMessageConsumer jbc = new HornetQMessageConsumer(connection, this, + ActiveMQMessageConsumer jbc = new ActiveMQMessageConsumer(connection, this, consumer, false, dest, @@ -668,13 +668,13 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } - private HornetQMessageConsumer createConsumer(final HornetQDestination dest, + private ActiveMQMessageConsumer createConsumer(final ActiveMQDestination dest, final String subscriptionName, String selectorString, final boolean noLocal, ConsumerDurability durability) throws JMSException @@ -691,12 +691,12 @@ public class HornetQSession implements QueueSession, TopicSession if (connection.getClientID() != null) { filter = - HornetQConnection.CONNECTION_ID_PROPERTY_NAME.toString() + "<>'" + connection.getClientID() + + ActiveMQConnection.CONNECTION_ID_PROPERTY_NAME.toString() + "<>'" + connection.getClientID() + "'"; } else { - filter = HornetQConnection.CONNECTION_ID_PROPERTY_NAME.toString() + "<>'" + connection.getUID() + "'"; + filter = ActiveMQConnection.CONNECTION_ID_PROPERTY_NAME.toString() + "<>'" + connection.getUID() + "'"; } if (selectorString != null) @@ -713,7 +713,7 @@ public class HornetQSession implements QueueSession, TopicSession if (selectorString != null) { - coreFilterString = new SimpleString(SelectorTranslator.convertToHornetQFilterString(selectorString)); + coreFilterString = new SimpleString(SelectorTranslator.convertToActiveMQFilterString(selectorString)); } ClientConsumer consumer; @@ -775,8 +775,8 @@ public class HornetQSession implements QueueSession, TopicSession throw new InvalidDestinationException("Cannot create a durable subscription on a temporary topic"); } - queueName = new SimpleString(HornetQDestination.createQueueNameForDurableSubscription(true, connection.getClientID(), - subscriptionName)); + queueName = new SimpleString(ActiveMQDestination.createQueueNameForDurableSubscription(true, connection.getClientID(), + subscriptionName)); QueueQuery subResponse = session.queueQuery(queueName); @@ -828,7 +828,7 @@ public class HornetQSession implements QueueSession, TopicSession } } - HornetQMessageConsumer jbc = new HornetQMessageConsumer(connection, + ActiveMQMessageConsumer jbc = new ActiveMQMessageConsumer(connection, this, consumer, noLocal, @@ -842,7 +842,7 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -859,7 +859,7 @@ public class HornetQSession implements QueueSession, TopicSession public QueueBrowser createBrowser(final Queue queue, String filterString) throws JMSException { // As per spec. section 4.11 - if (sessionType == HornetQSession.TYPE_TOPIC_SESSION) + if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) { throw new IllegalStateException("Cannot create a browser on a TopicSession"); } @@ -867,9 +867,9 @@ public class HornetQSession implements QueueSession, TopicSession { throw new InvalidDestinationException("Cannot create a browser with a null queue"); } - if (!(queue instanceof HornetQDestination)) + if (!(queue instanceof ActiveMQDestination)) { - throw new InvalidDestinationException("Not a HornetQQueue:" + queue); + throw new InvalidDestinationException("Not a ActiveMQQueue:" + queue); } if ("".equals(filterString)) { @@ -886,10 +886,10 @@ public class HornetQSession implements QueueSession, TopicSession } catch (FilterException e) { - throw JMSExceptionHelper.convertFromHornetQException(HornetQJMSClientBundle.BUNDLE.invalidFilter(e, new SimpleString(filterString))); + throw JMSExceptionHelper.convertFromActiveMQException(ActiveMQJMSClientBundle.BUNDLE.invalidFilter(e, new SimpleString(filterString))); } - HornetQDestination jbq = (HornetQDestination)queue; + ActiveMQDestination jbq = (ActiveMQDestination)queue; if (!jbq.isQueue()) { @@ -906,24 +906,24 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } - return new HornetQQueueBrowser((HornetQQueue)jbq, filterString, session); + return new ActiveMQQueueBrowser((ActiveMQQueue)jbq, filterString, session); } public TemporaryQueue createTemporaryQueue() throws JMSException { // As per spec. section 4.11 - if (sessionType == HornetQSession.TYPE_TOPIC_SESSION) + if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) { throw new IllegalStateException("Cannot create a temporary queue using a TopicSession"); } try { - HornetQTemporaryQueue queue = HornetQDestination.createTemporaryQueue(this); + ActiveMQTemporaryQueue queue = ActiveMQDestination.createTemporaryQueue(this); SimpleString simpleAddress = queue.getSimpleAddress(); @@ -935,21 +935,21 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } public TemporaryTopic createTemporaryTopic() throws JMSException { // As per spec. section 4.11 - if (sessionType == HornetQSession.TYPE_QUEUE_SESSION) + if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) { throw new IllegalStateException("Cannot create a temporary topic on a QueueSession"); } try { - HornetQTemporaryTopic topic = HornetQDestination.createTemporaryTopic(this); + ActiveMQTemporaryTopic topic = ActiveMQDestination.createTemporaryTopic(this); SimpleString simpleAddress = topic.getSimpleAddress(); @@ -958,7 +958,7 @@ public class HornetQSession implements QueueSession, TopicSession // does not exist - otherwise we would not be able to distinguish from a non existent topic and one with no // subscriptions - core has no notion of a topic - session.createTemporaryQueue(simpleAddress, simpleAddress, HornetQSession.REJECTING_FILTER); + session.createTemporaryQueue(simpleAddress, simpleAddress, ActiveMQSession.REJECTING_FILTER); connection.addTemporaryQueue(simpleAddress); @@ -966,20 +966,20 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } public void unsubscribe(final String name) throws JMSException { // As per spec. section 4.11 - if (sessionType == HornetQSession.TYPE_QUEUE_SESSION) + if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) { throw new IllegalStateException("Cannot unsubscribe using a QueueSession"); } - SimpleString queueName = new SimpleString(HornetQDestination.createQueueNameForDurableSubscription(true, connection.getClientID(), - name)); + SimpleString queueName = new SimpleString(ActiveMQDestination.createQueueNameForDurableSubscription(true, connection.getClientID(), + name)); try { @@ -1001,7 +1001,7 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -1075,7 +1075,7 @@ public class HornetQSession implements QueueSession, TopicSession @Override public String toString() { - return "HornetQSession->" + session; + return "ActiveMQSession->" + session; } public ClientSession getCoreSession() @@ -1093,7 +1093,7 @@ public class HornetQSession implements QueueSession, TopicSession this.recoverCalled = recoverCalled; } - public void deleteTemporaryTopic(final HornetQDestination tempTopic) throws JMSException + public void deleteTemporaryTopic(final ActiveMQDestination tempTopic) throws JMSException { if (!tempTopic.isTemporary()) { @@ -1124,11 +1124,11 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } - public void deleteTemporaryQueue(final HornetQDestination tempQueue) throws JMSException + public void deleteTemporaryQueue(final ActiveMQDestination tempQueue) throws JMSException { if (!tempQueue.isTemporary()) { @@ -1158,7 +1158,7 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -1170,7 +1170,7 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } @@ -1182,11 +1182,11 @@ public class HornetQSession implements QueueSession, TopicSession } catch (ActiveMQException e) { - throw JMSExceptionHelper.convertFromHornetQException(e); + throw JMSExceptionHelper.convertFromActiveMQException(e); } } - public void removeConsumer(final HornetQMessageConsumer consumer) + public void removeConsumer(final ActiveMQMessageConsumer consumer) { consumers.remove(consumer); } @@ -1220,17 +1220,17 @@ public class HornetQSession implements QueueSession, TopicSession } } - private HornetQQueue lookupQueue(final String queueName, boolean isTemporary) throws ActiveMQException + private ActiveMQQueue lookupQueue(final String queueName, boolean isTemporary) throws ActiveMQException { - HornetQQueue queue; + ActiveMQQueue queue; if (isTemporary) { - queue = HornetQDestination.createTemporaryQueue(queueName); + queue = ActiveMQDestination.createTemporaryQueue(queueName); } else { - queue = HornetQDestination.createQueue(queueName); + queue = ActiveMQDestination.createQueue(queueName); } QueueQuery response = session.queueQuery(queue.getSimpleAddress()); @@ -1245,18 +1245,18 @@ public class HornetQSession implements QueueSession, TopicSession } } - private HornetQTopic lookupTopic(final String topicName, final boolean isTemporary) throws ActiveMQException + private ActiveMQTopic lookupTopic(final String topicName, final boolean isTemporary) throws ActiveMQException { - HornetQTopic topic; + ActiveMQTopic topic; if (isTemporary) { - topic = HornetQDestination.createTemporaryTopic(topicName); + topic = ActiveMQDestination.createTemporaryTopic(topicName); } else { - topic = HornetQDestination.createTopic(topicName); + topic = ActiveMQDestination.createTopic(topicName); } AddressQuery query = session.addressQuery(topic.getSimpleAddress()); diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQStreamMessage.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQStreamMessage.java similarity index 94% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQStreamMessage.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQStreamMessage.java index 5274557130..c59fbc30a2 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQStreamMessage.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQStreamMessage.java @@ -38,7 +38,7 @@ import static org.apache.activemq.reader.StreamMessageUtil.streamReadShort; import static org.apache.activemq.reader.StreamMessageUtil.streamReadString; /** - * HornetQ implementation of a JMS StreamMessage. + * ActiveMQ implementation of a JMS StreamMessage. * * @author Tim Fox * @@ -50,23 +50,23 @@ import static org.apache.activemq.reader.StreamMessageUtil.streamReadString; * @author Ovidiu Feodorov * @author Andy Taylor */ -public final class HornetQStreamMessage extends HornetQMessage implements StreamMessage +public final class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMessage { public static final byte TYPE = Message.STREAM_TYPE; - protected HornetQStreamMessage(final ClientSession session) + protected ActiveMQStreamMessage(final ClientSession session) { - super(HornetQStreamMessage.TYPE, session); + super(ActiveMQStreamMessage.TYPE, session); } - protected HornetQStreamMessage(final ClientMessage message, final ClientSession session) + protected ActiveMQStreamMessage(final ClientMessage message, final ClientSession session) { super(message, session); } - public HornetQStreamMessage(final StreamMessage foreign, final ClientSession session) throws JMSException + public ActiveMQStreamMessage(final StreamMessage foreign, final ClientSession session) throws JMSException { - super(foreign, HornetQStreamMessage.TYPE, session); + super(foreign, ActiveMQStreamMessage.TYPE, session); foreign.reset(); @@ -85,7 +85,7 @@ public final class HornetQStreamMessage extends HornetQMessage implements Stream } // For testing only - public HornetQStreamMessage() + public ActiveMQStreamMessage() { message = new ClientMessageImpl((byte)0, false, 0, 0, (byte)4, 1500); } @@ -95,7 +95,7 @@ public final class HornetQStreamMessage extends HornetQMessage implements Stream @Override public byte getType() { - return HornetQStreamMessage.TYPE; + return ActiveMQStreamMessage.TYPE; } // StreamMessage implementation ---------------------------------- @@ -436,7 +436,7 @@ public final class HornetQStreamMessage extends HornetQMessage implements Stream getBuffer().resetReaderIndex(); } - // HornetQRAMessage overrides ---------------------------------------- + // ActiveMQRAMessage overrides ---------------------------------------- @Override public void clearBody() throws JMSException diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQTemporaryQueue.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQTemporaryQueue.java similarity index 86% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQTemporaryQueue.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQTemporaryQueue.java index 6d06ac5eec..97f7870ef9 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQTemporaryQueue.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQTemporaryQueue.java @@ -16,7 +16,7 @@ import javax.jms.TemporaryQueue; /** - * HornetQ implementation of a JMS TemporaryQueue. + * ActiveMQ implementation of a JMS TemporaryQueue. *
* This class can be instantiated directly. * @@ -24,7 +24,7 @@ import javax.jms.TemporaryQueue; * @version $Revision: 3569 $ * */ -public class HornetQTemporaryQueue extends HornetQQueue implements TemporaryQueue +public class ActiveMQTemporaryQueue extends ActiveMQQueue implements TemporaryQueue { // Constants ----------------------------------------------------- @@ -46,7 +46,7 @@ public class HornetQTemporaryQueue extends HornetQQueue implements TemporaryQueu * @param name * @param session */ - public HornetQTemporaryQueue(String address, String name, HornetQSession session) + public ActiveMQTemporaryQueue(String address, String name, ActiveMQSession session) { super(address, name, true, session); } @@ -54,7 +54,7 @@ public class HornetQTemporaryQueue extends HornetQQueue implements TemporaryQueu @Override public String toString() { - return "HornetQTemporaryQueue[" + name + "]"; + return "ActiveMQTemporaryQueue[" + name + "]"; } // Package protected --------------------------------------------- diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQTemporaryTopic.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQTemporaryTopic.java similarity index 85% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQTemporaryTopic.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQTemporaryTopic.java index 103619e128..8a85376f64 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQTemporaryTopic.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQTemporaryTopic.java @@ -15,13 +15,13 @@ package org.apache.activemq.jms.client; import javax.jms.TemporaryTopic; /** - * A HornetQTemporaryTopic + * A ActiveMQTemporaryTopic * * @author Clebert Suconic * * */ -public class HornetQTemporaryTopic extends HornetQTopic implements TemporaryTopic +public class ActiveMQTemporaryTopic extends ActiveMQTopic implements TemporaryTopic { // Constants ----------------------------------------------------- @@ -34,8 +34,8 @@ public class HornetQTemporaryTopic extends HornetQTopic implements TemporaryTopi // Constructors -------------------------------------------------- - protected HornetQTemporaryTopic(final String address, final String name, - final HornetQSession session) + protected ActiveMQTemporaryTopic(final String address, final String name, + final ActiveMQSession session) { super(address, name, true, session); } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQTextMessage.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQTextMessage.java similarity index 83% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQTextMessage.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQTextMessage.java index 65bdb82a38..75944b964e 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQTextMessage.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQTextMessage.java @@ -26,7 +26,7 @@ import static org.apache.activemq.reader.TextMessageUtil.writeBodyText; /** - * HornetQ implementation of a JMS TextMessage. + * ActiveMQ implementation of a JMS TextMessage. *
* This class was ported from SpyTextMessage in JBossMQ. * @@ -38,7 +38,7 @@ import static org.apache.activemq.reader.TextMessageUtil.writeBodyText; * @author Andy Taylor * @version $Revision: 3412 $ */ -public class HornetQTextMessage extends HornetQMessage implements TextMessage +public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage { // Constants ----------------------------------------------------- @@ -54,22 +54,22 @@ public class HornetQTextMessage extends HornetQMessage implements TextMessage // Constructors -------------------------------------------------- - public HornetQTextMessage(final ClientSession session) + public ActiveMQTextMessage(final ClientSession session) { - super(HornetQTextMessage.TYPE, session); + super(ActiveMQTextMessage.TYPE, session); } - public HornetQTextMessage(final ClientMessage message, final ClientSession session) + public ActiveMQTextMessage(final ClientMessage message, final ClientSession session) { super(message, session); } /** - * A copy constructor for non-HornetQ JMS TextMessages. + * A copy constructor for non-ActiveMQ JMS TextMessages. */ - public HornetQTextMessage(final TextMessage foreign, final ClientSession session) throws JMSException + public ActiveMQTextMessage(final TextMessage foreign, final ClientSession session) throws JMSException { - super(foreign, HornetQTextMessage.TYPE, session); + super(foreign, ActiveMQTextMessage.TYPE, session); setText(foreign.getText()); } @@ -79,7 +79,7 @@ public class HornetQTextMessage extends HornetQMessage implements TextMessage @Override public byte getType() { - return HornetQTextMessage.TYPE; + return ActiveMQTextMessage.TYPE; } // TextMessage implementation ------------------------------------ @@ -120,7 +120,7 @@ public class HornetQTextMessage extends HornetQMessage implements TextMessage text = null; } - // HornetQRAMessage override ----------------------------------------- + // ActiveMQRAMessage override ----------------------------------------- @Override public void doBeforeReceive() throws ActiveMQException diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQTopic.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQTopic.java similarity index 81% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQTopic.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQTopic.java index 94408c8589..1c04629b88 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQTopic.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQTopic.java @@ -17,7 +17,7 @@ import javax.jms.Topic; import org.apache.activemq.api.core.SimpleString; /** - * HornetQ implementation of a JMS Topic. + * ActiveMQ implementation of a JMS Topic. *
* This class can be instantiated directly. * @@ -26,7 +26,7 @@ import org.apache.activemq.api.core.SimpleString; * @version $Revision: 8737 $ * */ -public class HornetQTopic extends HornetQDestination implements Topic +public class ActiveMQTopic extends ActiveMQDestination implements Topic { // Constants ----------------------------------------------------- @@ -35,16 +35,16 @@ public class HornetQTopic extends HornetQDestination implements Topic public static SimpleString createAddressFromName(final String name) { - return new SimpleString(HornetQDestination.JMS_TOPIC_ADDRESS_PREFIX + name); + return new SimpleString(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX + name); } // Attributes ---------------------------------------------------- // Constructors -------------------------------------------------- - public HornetQTopic(final String name) + public ActiveMQTopic(final String name) { - super(HornetQDestination.JMS_TOPIC_ADDRESS_PREFIX + name, name, false, false, null); + super(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX + name, name, false, false, null); } @@ -54,7 +54,7 @@ public class HornetQTopic extends HornetQDestination implements Topic * @param temporary * @param session */ - protected HornetQTopic(String address, String name, boolean temporary, HornetQSession session) + protected ActiveMQTopic(String address, String name, boolean temporary, ActiveMQSession session) { super(address, name, temporary, false, session); } @@ -72,7 +72,7 @@ public class HornetQTopic extends HornetQDestination implements Topic @Override public String toString() { - return "HornetQTopic[" + name + "]"; + return "ActiveMQTopic[" + name + "]"; } // Package protected --------------------------------------------- diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQTopicConnectionFactory.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQTopicConnectionFactory.java similarity index 77% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQTopicConnectionFactory.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQTopicConnectionFactory.java index 13e187fbaf..56d88d7c45 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQTopicConnectionFactory.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQTopicConnectionFactory.java @@ -24,14 +24,14 @@ import org.apache.activemq.api.jms.JMSFactoryType; * * @author Howard Gao */ -public class HornetQTopicConnectionFactory extends HornetQConnectionFactory implements TopicConnectionFactory +public class ActiveMQTopicConnectionFactory extends ActiveMQConnectionFactory implements TopicConnectionFactory { private static final long serialVersionUID = 7317051989866548455L; /** * */ - public HornetQTopicConnectionFactory() + public ActiveMQTopicConnectionFactory() { super(); } @@ -39,7 +39,7 @@ public class HornetQTopicConnectionFactory extends HornetQConnectionFactory impl /** * @param serverLocator */ - public HornetQTopicConnectionFactory(ServerLocator serverLocator) + public ActiveMQTopicConnectionFactory(ServerLocator serverLocator) { super(serverLocator); } @@ -49,7 +49,7 @@ public class HornetQTopicConnectionFactory extends HornetQConnectionFactory impl * @param ha * @param groupConfiguration */ - public HornetQTopicConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) + public ActiveMQTopicConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) { super(ha, groupConfiguration); } @@ -58,7 +58,7 @@ public class HornetQTopicConnectionFactory extends HornetQConnectionFactory impl * @param ha * @param initialConnectors */ - public HornetQTopicConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors) + public ActiveMQTopicConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors) { super(ha, initialConnectors); } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXAConnection.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXAConnection.java similarity index 74% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXAConnection.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXAConnection.java index 29b6ec002c..9333f6d811 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXAConnection.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXAConnection.java @@ -23,18 +23,18 @@ import javax.jms.XATopicSession; import org.apache.activemq.api.core.client.ClientSessionFactory; /** - * HornetQ implementation of a JMS XAConnection. + * ActiveMQ implementation of a JMS XAConnection. *

* The flat implementation of {@link XATopicConnection} and {@link XAQueueConnection} is per design, * following common practices of JMS 1.1. * @author Howard Gao */ -public final class HornetQXAConnection extends HornetQConnection implements XATopicConnection, XAQueueConnection +public final class ActiveMQXAConnection extends ActiveMQConnection implements XATopicConnection, XAQueueConnection { - public HornetQXAConnection(final String username, final String password, final int connectionType, - final String clientID, final int dupsOKBatchSize, final int transactionBatchSize, - final ClientSessionFactory sessionFactory) + public ActiveMQXAConnection(final String username, final String password, final int connectionType, + final String clientID, final int dupsOKBatchSize, final int transactionBatchSize, + final ClientSessionFactory sessionFactory) { super(username, password, connectionType, clientID, dupsOKBatchSize, transactionBatchSize, sessionFactory); } @@ -43,14 +43,14 @@ public final class HornetQXAConnection extends HornetQConnection implements XATo public XASession createXASession() throws JMSException { checkClosed(); - return (XASession)createSessionInternal(isXA(), true, Session.SESSION_TRANSACTED, HornetQSession.TYPE_GENERIC_SESSION); + return (XASession)createSessionInternal(isXA(), true, Session.SESSION_TRANSACTED, ActiveMQSession.TYPE_GENERIC_SESSION); } @Override public XAQueueSession createXAQueueSession() throws JMSException { checkClosed(); - return (XAQueueSession)createSessionInternal(isXA(), true, Session.SESSION_TRANSACTED, HornetQSession.TYPE_QUEUE_SESSION); + return (XAQueueSession)createSessionInternal(isXA(), true, Session.SESSION_TRANSACTED, ActiveMQSession.TYPE_QUEUE_SESSION); } @@ -58,7 +58,7 @@ public final class HornetQXAConnection extends HornetQConnection implements XATo public XATopicSession createXATopicSession() throws JMSException { checkClosed(); - return (XATopicSession)createSessionInternal(isXA(), true, Session.SESSION_TRANSACTED, HornetQSession.TYPE_TOPIC_SESSION); + return (XATopicSession)createSessionInternal(isXA(), true, Session.SESSION_TRANSACTED, ActiveMQSession.TYPE_TOPIC_SESSION); } @Override diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXAConnectionFactory.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXAConnectionFactory.java similarity index 80% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXAConnectionFactory.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXAConnectionFactory.java index 3eae97438b..61a131d577 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXAConnectionFactory.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXAConnectionFactory.java @@ -27,7 +27,7 @@ import org.apache.activemq.api.jms.JMSFactoryType; * * @author Howard Gao */ -public class HornetQXAConnectionFactory extends HornetQConnectionFactory implements XATopicConnectionFactory, +public class ActiveMQXAConnectionFactory extends ActiveMQConnectionFactory implements XATopicConnectionFactory, XAQueueConnectionFactory { private static final long serialVersionUID = 743611571839154115L; @@ -35,7 +35,7 @@ public class HornetQXAConnectionFactory extends HornetQConnectionFactory impleme /** * */ - public HornetQXAConnectionFactory() + public ActiveMQXAConnectionFactory() { super(); } @@ -43,7 +43,7 @@ public class HornetQXAConnectionFactory extends HornetQConnectionFactory impleme /** * @param serverLocator */ - public HornetQXAConnectionFactory(ServerLocator serverLocator) + public ActiveMQXAConnectionFactory(ServerLocator serverLocator) { super(serverLocator); } @@ -52,7 +52,7 @@ public class HornetQXAConnectionFactory extends HornetQConnectionFactory impleme * @param ha * @param groupConfiguration */ - public HornetQXAConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) + public ActiveMQXAConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) { super(ha, groupConfiguration); } @@ -61,7 +61,7 @@ public class HornetQXAConnectionFactory extends HornetQConnectionFactory impleme * @param ha * @param initialConnectors */ - public HornetQXAConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors) + public ActiveMQXAConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors) { super(ha, initialConnectors); } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXAJMSContext.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXAJMSContext.java similarity index 79% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXAJMSContext.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXAJMSContext.java index 65ab212b9a..7bc8421b79 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXAJMSContext.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXAJMSContext.java @@ -14,9 +14,9 @@ package org.apache.activemq.jms.client; import javax.jms.XAJMSContext; -public class HornetQXAJMSContext extends HornetQJMSContext implements XAJMSContext +public class ActiveMQXAJMSContext extends ActiveMQJMSContext implements XAJMSContext { - public HornetQXAJMSContext(HornetQConnectionForContext connection, ThreadAwareContext threadAwareContext) + public ActiveMQXAJMSContext(ActiveMQConnectionForContext connection, ThreadAwareContext threadAwareContext) { super(connection, threadAwareContext); } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXAQueueConnectionFactory.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXAQueueConnectionFactory.java similarity index 77% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXAQueueConnectionFactory.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXAQueueConnectionFactory.java index 1d8d622024..a0d91a5410 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXAQueueConnectionFactory.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXAQueueConnectionFactory.java @@ -25,14 +25,14 @@ import org.apache.activemq.api.jms.JMSFactoryType; * @author Howard Gao * */ -public class HornetQXAQueueConnectionFactory extends HornetQConnectionFactory implements XAQueueConnectionFactory +public class ActiveMQXAQueueConnectionFactory extends ActiveMQConnectionFactory implements XAQueueConnectionFactory { private static final long serialVersionUID = 8612457847251087454L; /** * */ - public HornetQXAQueueConnectionFactory() + public ActiveMQXAQueueConnectionFactory() { super(); } @@ -40,7 +40,7 @@ public class HornetQXAQueueConnectionFactory extends HornetQConnectionFactory im /** * @param serverLocator */ - public HornetQXAQueueConnectionFactory(ServerLocator serverLocator) + public ActiveMQXAQueueConnectionFactory(ServerLocator serverLocator) { super(serverLocator); } @@ -49,7 +49,7 @@ public class HornetQXAQueueConnectionFactory extends HornetQConnectionFactory im * @param ha * @param groupConfiguration */ - public HornetQXAQueueConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) + public ActiveMQXAQueueConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) { super(ha, groupConfiguration); } @@ -58,7 +58,7 @@ public class HornetQXAQueueConnectionFactory extends HornetQConnectionFactory im * @param ha * @param initialConnectors */ - public HornetQXAQueueConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors) + public ActiveMQXAQueueConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors) { super(ha, initialConnectors); } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXASession.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXASession.java similarity index 71% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXASession.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXASession.java index 390fff065a..6ce34b6be9 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXASession.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXASession.java @@ -18,13 +18,13 @@ import javax.jms.XATopicSession; import org.apache.activemq.api.core.client.ClientSession; /** - * A HornetQXASession + * A ActiveMQXASession * * @author clebertsuconic * * */ -public class HornetQXASession extends HornetQSession implements XAQueueSession, XATopicSession +public class ActiveMQXASession extends ActiveMQSession implements XAQueueSession, XATopicSession { /** @@ -35,12 +35,12 @@ public class HornetQXASession extends HornetQSession implements XAQueueSession, * @param session * @param sessionType */ - protected HornetQXASession(HornetQConnection connection, - boolean transacted, - boolean xa, - int ackMode, - ClientSession session, - int sessionType) + protected ActiveMQXASession(ActiveMQConnection connection, + boolean transacted, + boolean xa, + int ackMode, + ClientSession session, + int sessionType) { super(connection, transacted, xa, ackMode, session, sessionType); } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXATopicConnectionFactory.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXATopicConnectionFactory.java similarity index 77% rename from activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXATopicConnectionFactory.java rename to activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXATopicConnectionFactory.java index 462d240c83..a9c327c263 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/HornetQXATopicConnectionFactory.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ActiveMQXATopicConnectionFactory.java @@ -24,14 +24,14 @@ import org.apache.activemq.api.jms.JMSFactoryType; * * @author Howard Gao */ -public class HornetQXATopicConnectionFactory extends HornetQConnectionFactory implements XATopicConnectionFactory +public class ActiveMQXATopicConnectionFactory extends ActiveMQConnectionFactory implements XATopicConnectionFactory { private static final long serialVersionUID = -7018290426884419693L; /** * */ - public HornetQXATopicConnectionFactory() + public ActiveMQXATopicConnectionFactory() { super(); } @@ -39,7 +39,7 @@ public class HornetQXATopicConnectionFactory extends HornetQConnectionFactory im /** * @param serverLocator */ - public HornetQXATopicConnectionFactory(final ServerLocator serverLocator) + public ActiveMQXATopicConnectionFactory(final ServerLocator serverLocator) { super(serverLocator); } @@ -48,7 +48,7 @@ public class HornetQXATopicConnectionFactory extends HornetQConnectionFactory im * @param ha * @param groupConfiguration */ - public HornetQXATopicConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) + public ActiveMQXATopicConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) { super(ha, groupConfiguration); } @@ -57,7 +57,7 @@ public class HornetQXATopicConnectionFactory extends HornetQConnectionFactory im * @param ha * @param initialConnectors */ - public HornetQXATopicConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors) + public ActiveMQXATopicConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors) { super(ha, initialConnectors); } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/JMSExceptionHelper.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/JMSExceptionHelper.java index c61f48a11d..b957801162 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/JMSExceptionHelper.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/JMSExceptionHelper.java @@ -29,7 +29,7 @@ import org.apache.activemq.api.core.ActiveMQException; public final class JMSExceptionHelper { - public static JMSException convertFromHornetQException(final ActiveMQException me) + public static JMSException convertFromActiveMQException(final ActiveMQException me) { JMSException je; switch (me.getType()) diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/JMSMessageListenerWrapper.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/JMSMessageListenerWrapper.java index 1bbffc5463..d56fddd7b1 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/JMSMessageListenerWrapper.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/JMSMessageListenerWrapper.java @@ -19,7 +19,7 @@ import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.MessageHandler; -import org.apache.activemq.api.jms.HornetQJMSConstants; +import org.apache.activemq.api.jms.ActiveMQJMSConstants; /** * @@ -30,9 +30,9 @@ import org.apache.activemq.api.jms.HornetQJMSConstants; */ public class JMSMessageListenerWrapper implements MessageHandler { - private final HornetQConnection connection; + private final ActiveMQConnection connection; - private final HornetQSession session; + private final ActiveMQSession session; private final MessageListener listener; @@ -42,8 +42,8 @@ public class JMSMessageListenerWrapper implements MessageHandler private final boolean individualACK; - protected JMSMessageListenerWrapper(final HornetQConnection connection, - final HornetQSession session, + protected JMSMessageListenerWrapper(final ActiveMQConnection connection, + final ActiveMQSession session, final ClientConsumer consumer, final MessageListener listener, final int ackMode) @@ -58,7 +58,7 @@ public class JMSMessageListenerWrapper implements MessageHandler transactedOrClientAck = (ackMode == Session.SESSION_TRANSACTED || ackMode == Session.CLIENT_ACKNOWLEDGE) || session.isXA(); - individualACK = (ackMode == HornetQJMSConstants.INDIVIDUAL_ACKNOWLEDGE); + individualACK = (ackMode == ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE); } /** @@ -67,7 +67,7 @@ public class JMSMessageListenerWrapper implements MessageHandler */ public void onMessage(final ClientMessage message) { - HornetQMessage msg = HornetQMessage.createMessage(message, session.getCoreSession()); + ActiveMQMessage msg = ActiveMQMessage.createMessage(message, session.getCoreSession()); if (individualACK) { @@ -80,7 +80,7 @@ public class JMSMessageListenerWrapper implements MessageHandler } catch (Exception e) { - HornetQJMSClientLogger.LOGGER.errorPreparingMessageForReceipt(e); + ActiveMQJMSClientLogger.LOGGER.errorPreparingMessageForReceipt(e); return; } @@ -93,7 +93,7 @@ public class JMSMessageListenerWrapper implements MessageHandler } catch (ActiveMQException e) { - HornetQJMSClientLogger.LOGGER.errorProcessingMessage(e); + ActiveMQJMSClientLogger.LOGGER.errorProcessingMessage(e); } } @@ -106,7 +106,7 @@ public class JMSMessageListenerWrapper implements MessageHandler { // See JMS 1.1 spec, section 4.5.2 - HornetQJMSClientLogger.LOGGER.onMessageError(e); + ActiveMQJMSClientLogger.LOGGER.onMessageError(e); if (!transactedOrClientAck) { @@ -123,7 +123,7 @@ public class JMSMessageListenerWrapper implements MessageHandler } catch (Exception e2) { - HornetQJMSClientLogger.LOGGER.errorRecoveringSession(e2); + ActiveMQJMSClientLogger.LOGGER.errorRecoveringSession(e2); } } } @@ -143,7 +143,7 @@ public class JMSMessageListenerWrapper implements MessageHandler } catch (ActiveMQException e) { - HornetQJMSClientLogger.LOGGER.errorProcessingMessage(e); + ActiveMQJMSClientLogger.LOGGER.errorProcessingMessage(e); } } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/SelectorTranslator.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/SelectorTranslator.java index 0c9b5cfe2f..3ff6ea4fc5 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/SelectorTranslator.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/SelectorTranslator.java @@ -17,12 +17,12 @@ import java.util.List; /** * - * This class converts a JMS selector expression into a HornetQ core filter expression. + * This class converts a JMS selector expression into a ActiveMQ core filter expression. * - * JMS selector and HornetQ filters use the same syntax but have different identifiers. + * JMS selector and ActiveMQ filters use the same syntax but have different identifiers. * * We basically just need to replace the JMS header and property Identifier names - * with the corresponding HornetQ field and header Identifier names. + * with the corresponding ActiveMQ field and header Identifier names. * * We must be careful not to substitute any literals, or identifiers whose name contains the name * of one we want to substitute. @@ -34,7 +34,7 @@ import java.util.List; */ public class SelectorTranslator { - public static String convertToHornetQFilterString(final String selectorString) + public static String convertToActiveMQFilterString(final String selectorString) { if (selectorString == null) { diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ThreadAwareContext.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ThreadAwareContext.java index ec3420916e..84937d22b1 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ThreadAwareContext.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/ThreadAwareContext.java @@ -90,7 +90,7 @@ public class ThreadAwareContext { if (completionListenerThread == Thread.currentThread()) { - throw HornetQJMSClientBundle.BUNDLE.callingMethodFromCompletionListenerRuntime(); + throw ActiveMQJMSClientBundle.BUNDLE.callingMethodFromCompletionListenerRuntime(); } } @@ -109,7 +109,7 @@ public class ThreadAwareContext { if (completionListenerThread == Thread.currentThread()) { - throw HornetQJMSClientBundle.BUNDLE.callingMethodFromCompletionListener(); + throw ActiveMQJMSClientBundle.BUNDLE.callingMethodFromCompletionListener(); } } @@ -126,7 +126,7 @@ public class ThreadAwareContext { if (messageListenerThreads.contains(Thread.currentThread().getId())) { - throw HornetQJMSClientBundle.BUNDLE.callingMethodFromListenerRuntime(); + throw ActiveMQJMSClientBundle.BUNDLE.callingMethodFromListenerRuntime(); } } @@ -145,7 +145,7 @@ public class ThreadAwareContext { if (messageListenerThreads.contains(Thread.currentThread().getId())) { - throw HornetQJMSClientBundle.BUNDLE.callingMethodFromListener(); + throw ActiveMQJMSClientBundle.BUNDLE.callingMethodFromListener(); } } diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/package-info.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/package-info.java index acce764ee4..74fbb39b5a 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/package-info.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/client/package-info.java @@ -14,7 +14,7 @@ * Implementation of the JMS API. *
* Classes in this package are not meant to be used directly - * except {@link org.apache.activemq.jms.client.HornetQConnectionFactory} which can be instantiated directly + * except {@link org.apache.activemq.jms.client.ActiveMQConnectionFactory} which can be instantiated directly * if JMS resources are not looked up in JNDI. * */ diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/referenceable/ConnectionFactoryObjectFactory.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/referenceable/ConnectionFactoryObjectFactory.java index 5b11b2492c..f717e1fcd0 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/referenceable/ConnectionFactoryObjectFactory.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/referenceable/ConnectionFactoryObjectFactory.java @@ -23,7 +23,7 @@ import javax.naming.spi.ObjectFactory; * * A ConnectionFactoryObjectFactory. * - * Given a reference - reconstructs a HornetQRAConnectionFactory + * Given a reference - reconstructs a ActiveMQRAConnectionFactory * * @author Tim Fox * @version $Revision$ @@ -35,7 +35,7 @@ public class ConnectionFactoryObjectFactory implements ObjectFactory { Reference r = (Reference)ref; - byte[] bytes = (byte[])r.get("HornetQ-CF").getContent(); + byte[] bytes = (byte[])r.get("ActiveMQ-CF").getContent(); // Deserialize return SerializableObjectRefAddr.deserialize(bytes); diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jms/referenceable/DestinationObjectFactory.java b/activemq-jms-client/src/main/java/org/apache/activemq/jms/referenceable/DestinationObjectFactory.java index af18fb9823..5be2a40c3e 100644 --- a/activemq-jms-client/src/main/java/org/apache/activemq/jms/referenceable/DestinationObjectFactory.java +++ b/activemq-jms-client/src/main/java/org/apache/activemq/jms/referenceable/DestinationObjectFactory.java @@ -23,7 +23,7 @@ import javax.naming.spi.ObjectFactory; * * A DestinationObjectFactory. * - * Given a Reference - reconstructs a HornetQDestination + * Given a Reference - reconstructs a ActiveMQDestination * * @author Tim Fox * @version $Revision$ @@ -35,7 +35,7 @@ public class DestinationObjectFactory implements ObjectFactory { Reference r = (Reference)ref; - byte[] bytes = (byte[])r.get("HornetQ-DEST").getContent(); + byte[] bytes = (byte[])r.get("ActiveMQ-DEST").getContent(); // Deserialize return SerializableObjectRefAddr.deserialize(bytes); diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/HornetQJMSBridgeLogger.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/ActiveMQJMSBridgeLogger.java similarity index 94% rename from activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/HornetQJMSBridgeLogger.java rename to activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/ActiveMQJMSBridgeLogger.java index 5b89fceaf8..8084f78037 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/HornetQJMSBridgeLogger.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/ActiveMQJMSBridgeLogger.java @@ -38,13 +38,13 @@ import org.jboss.logging.annotations.MessageLogger; * * so an INFO message would be 341000 to 341999 */ -@MessageLogger(projectCode = "HQ") -public interface HornetQJMSBridgeLogger extends BasicLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQJMSBridgeLogger extends BasicLogger { /** * The default logger. */ - HornetQJMSBridgeLogger LOGGER = Logger.getMessageLogger(HornetQJMSBridgeLogger.class, HornetQJMSBridgeLogger.class.getPackage().getName()); + ActiveMQJMSBridgeLogger LOGGER = Logger.getMessageLogger(ActiveMQJMSBridgeLogger.class, ActiveMQJMSBridgeLogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.INFO) @Message(id = 341000, value = "Failed to set up JMS bridge connections. Most probably the source or target servers are unavailable." + diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/JMSBridge.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/JMSBridge.java index 936e61ef2a..13e7c10b18 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/JMSBridge.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/JMSBridge.java @@ -14,13 +14,13 @@ package org.apache.activemq.jms.bridge; import javax.transaction.TransactionManager; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; /** * @author Tim Fox * @author Jeff Mesnil */ -public interface JMSBridge extends HornetQComponent +public interface JMSBridge extends ActiveMQComponent { void pause() throws Exception; diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/JMSBridgeControl.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/JMSBridgeControl.java index 3ed1d6175c..b116b4f29c 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/JMSBridgeControl.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/JMSBridgeControl.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.jms.bridge; -import org.apache.activemq.api.core.management.HornetQComponentControl; +import org.apache.activemq.api.core.management.ActiveMQComponentControl; /** * A JMSBridgeControl @@ -20,7 +20,7 @@ import org.apache.activemq.api.core.management.HornetQComponentControl; * @author Jose de Castro * */ -public interface JMSBridgeControl extends HornetQComponentControl +public interface JMSBridgeControl extends ActiveMQComponentControl { void pause() throws Exception; diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/QualityOfServiceMode.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/QualityOfServiceMode.java index 188aa05bb5..d07dd78cb9 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/QualityOfServiceMode.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/QualityOfServiceMode.java @@ -38,7 +38,7 @@ package org.apache.activemq.jms.bridge; * * This QoS mode ensures messages will reach the destination from the source * once and only once. (Sometimes this mode is known as "exactly once"). If both - * the source and the destination are on the same HornetQ server + * the source and the destination are on the same ActiveMQ server * instance then this can be achieved by sending and acknowledging the messages * in the same local transaction. If the source and destination are on different * servers this is achieved by enlisting the sending and consuming sessions in a diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/impl/JMSBridgeImpl.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/impl/JMSBridgeImpl.java index f04d59be51..e30e795e38 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/impl/JMSBridgeImpl.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/impl/JMSBridgeImpl.java @@ -49,18 +49,18 @@ import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.client.FailoverEventListener; import org.apache.activemq.api.core.client.FailoverEventType; -import org.apache.activemq.api.jms.HornetQJMSConstants; +import org.apache.activemq.api.jms.ActiveMQJMSConstants; import org.apache.activemq.jms.bridge.ConnectionFactoryFactory; import org.apache.activemq.jms.bridge.DestinationFactory; -import org.apache.activemq.jms.bridge.HornetQJMSBridgeLogger; +import org.apache.activemq.jms.bridge.ActiveMQJMSBridgeLogger; import org.apache.activemq.jms.bridge.JMSBridge; import org.apache.activemq.jms.bridge.JMSBridgeControl; import org.apache.activemq.jms.bridge.QualityOfServiceMode; -import org.apache.activemq.jms.client.HornetQConnection; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQMessage; -import org.apache.activemq.jms.server.HornetQJMSServerBundle; -import org.apache.activemq.jms.server.recovery.HornetQRegistryBase; +import org.apache.activemq.jms.client.ActiveMQConnection; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQMessage; +import org.apache.activemq.jms.server.ActiveMQJMSServerBundle; +import org.apache.activemq.jms.server.recovery.ActiveMQRegistryBase; import org.apache.activemq.jms.server.recovery.XARecoveryConfig; import org.apache.activemq.utils.ClassloadingUtil; import org.apache.activemq.utils.DefaultSensitiveStringCodec; @@ -78,7 +78,7 @@ public final class JMSBridgeImpl implements JMSBridge { private static final String[] RESOURCE_RECOVERY_CLASS_NAMES = new String[]{"org.jboss.as.messaging.jms.AS7RecoveryRegistry"}; - private static boolean trace = HornetQJMSBridgeLogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQJMSBridgeLogger.LOGGER.isTraceEnabled(); private static final int TEN_YEARS = 60 * 60 * 24 * 365 * 10; // in ms @@ -183,7 +183,7 @@ public final class JMSBridgeImpl implements JMSBridge private static final int FORWARD_MODE_NONTX = 2; - private HornetQRegistryBase registry; + private ActiveMQRegistryBase registry; /* * Constructor for MBean @@ -349,7 +349,7 @@ public final class JMSBridgeImpl implements JMSBridge this.objectName = ObjectName.getInstance(objectName); StandardMBean mbean = new StandardMBean(controlBean, JMSBridgeControl.class); mbeanServer.registerMBean(mbean, this.objectName); - HornetQJMSBridgeLogger.LOGGER.debug("Registered JMSBridge instance as: " + this.objectName.getCanonicalName()); + ActiveMQJMSBridgeLogger.LOGGER.debug("Registered JMSBridge instance as: " + this.objectName.getCanonicalName()); } catch (Exception e) { @@ -364,11 +364,11 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Created " + this); + ActiveMQJMSBridgeLogger.LOGGER.trace("Created " + this); } } - // HornetQComponent overrides -------------------------------------------------- + // ActiveMQComponent overrides -------------------------------------------------- public synchronized void start() throws Exception { @@ -381,13 +381,13 @@ public final class JMSBridgeImpl implements JMSBridge if (started) { - HornetQJMSBridgeLogger.LOGGER.errorBridgeAlreadyStarted(); + ActiveMQJMSBridgeLogger.LOGGER.errorBridgeAlreadyStarted(); return; } if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Starting " + this); + ActiveMQJMSBridgeLogger.LOGGER.trace("Starting " + this); } // bridge has been stopped and is restarted @@ -429,7 +429,7 @@ public final class JMSBridgeImpl implements JMSBridge } else { - HornetQJMSBridgeLogger.LOGGER.errorStartingBridge(); + ActiveMQJMSBridgeLogger.LOGGER.errorStartingBridge(); handleFailureOnStartup(); } @@ -447,7 +447,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Starting time checker thread"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Starting time checker thread"); } timeChecker = new BatchTimeChecker(); @@ -457,7 +457,7 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Started time checker thread"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Started time checker thread"); } } @@ -465,7 +465,7 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Started " + this); + ActiveMQJMSBridgeLogger.LOGGER.trace("Started " + this); } } @@ -494,7 +494,7 @@ public final class JMSBridgeImpl implements JMSBridge } catch (Exception e) { - throw HornetQJMSServerBundle.BUNDLE.errorDecodingPassword(e); + throw ActiveMQJMSServerBundle.BUNDLE.errorDecodingPassword(e); } } @@ -512,7 +512,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Stopping " + this); + ActiveMQJMSBridgeLogger.LOGGER.trace("Stopping " + this); } if (!connectedSource && sourceConn != null) { @@ -541,7 +541,7 @@ public final class JMSBridgeImpl implements JMSBridge // Terminate any transaction if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Rolling back remaining tx"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Rolling back remaining tx"); } try @@ -552,13 +552,13 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Failed to rollback", ignore); + ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to rollback", ignore); } } if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Rolled back remaining tx"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Rolled back remaining tx"); } } @@ -570,7 +570,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Failed to close source conn", ignore); + ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to close source conn", ignore); } } @@ -584,14 +584,14 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Failed to close target conn", ignore); + ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to close target conn", ignore); } } } if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Stopped " + this); + ActiveMQJMSBridgeLogger.LOGGER.trace("Stopped " + this); } } } @@ -611,7 +611,7 @@ public final class JMSBridgeImpl implements JMSBridge } catch (Exception e) { - HornetQJMSBridgeLogger.LOGGER.errorUnregisteringBridge(objectName); + ActiveMQJMSBridgeLogger.LOGGER.errorUnregisteringBridge(objectName); } } } @@ -622,7 +622,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Pausing " + this); + ActiveMQJMSBridgeLogger.LOGGER.trace("Pausing " + this); } synchronized (lock) @@ -634,7 +634,7 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Paused " + this); + ActiveMQJMSBridgeLogger.LOGGER.trace("Paused " + this); } } @@ -642,7 +642,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Resuming " + this); + ActiveMQJMSBridgeLogger.LOGGER.trace("Resuming " + this); } synchronized (lock) @@ -654,7 +654,7 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Resumed " + this); + ActiveMQJMSBridgeLogger.LOGGER.trace("Resumed " + this); } } @@ -969,7 +969,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Enlisting resources in tx"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Enlisting resources in tx"); } XAResource resSource = ((XASession) sourceSession).getXAResource(); @@ -982,7 +982,7 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Enlisted resources in tx"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Enlisted resources in tx"); } } @@ -990,7 +990,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Delisting resources from tx"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Delisting resources from tx"); } XAResource resSource = ((XASession) sourceSession).getXAResource(); @@ -1003,7 +1003,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Failed to delist source resource", e); + ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to delist source resource", e); } } @@ -1017,13 +1017,13 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Failed to delist target resource", e); + ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to delist target resource", e); } } if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Delisted resources from tx"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Delisted resources from tx"); } } @@ -1031,7 +1031,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Starting JTA transaction"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Starting JTA transaction"); } TransactionManager tm = getTm(); @@ -1051,7 +1051,7 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Started JTA transaction"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Started JTA transaction"); } return tx; @@ -1094,9 +1094,9 @@ public final class JMSBridgeImpl implements JMSBridge Object cf = cff.createConnectionFactory(); - if (cf instanceof HornetQConnectionFactory && registry != null) + if (cf instanceof ActiveMQConnectionFactory && registry != null) { - registry.register(XARecoveryConfig.newConfig((HornetQConnectionFactory) cf, username, password)); + registry.register(XARecoveryConfig.newConfig((ActiveMQConnectionFactory) cf, username, password)); } if (qualityOfServiceMode == QualityOfServiceMode.ONCE_AND_ONLY_ONCE && !(cf instanceof XAConnectionFactory)) @@ -1110,7 +1110,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Creating an XA connection"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Creating an XA connection"); } conn = ((XAConnectionFactory) cf).createXAConnection(); } @@ -1118,7 +1118,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Creating a non XA connection"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Creating a non XA connection"); } conn = ((ConnectionFactory) cf).createConnection(); } @@ -1129,7 +1129,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Creating an XA connection"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Creating an XA connection"); } conn = ((XAConnectionFactory) cf).createXAConnection(username, password); } @@ -1137,7 +1137,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Creating a non XA connection"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Creating a non XA connection"); } conn = ((ConnectionFactory) cf).createConnection(username, password); } @@ -1151,16 +1151,16 @@ public final class JMSBridgeImpl implements JMSBridge boolean ha = false; BridgeFailoverListener failoverListener = null; - if (conn instanceof HornetQConnection) + if (conn instanceof ActiveMQConnection) { - HornetQConnectionFactory hornetQCF = (HornetQConnectionFactory) cf; - ha = hornetQCF.isHA(); + ActiveMQConnectionFactory activeMQCF = (ActiveMQConnectionFactory) cf; + ha = activeMQCF.isHA(); if (ha) { - HornetQConnection hornetQConn = (HornetQConnection) conn; + ActiveMQConnection activeMQConn = (ActiveMQConnection) conn; failoverListener = new BridgeFailoverListener(isSource); - hornetQConn.setFailoverListener(failoverListener); + activeMQConn.setFailoverListener(failoverListener); } } @@ -1249,7 +1249,7 @@ public final class JMSBridgeImpl implements JMSBridge // Create an XASession for consuming from the source if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Creating XA source session"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Creating XA source session"); } sourceConn = createConnection(sourceUsername, sourcePassword, sourceCff, clientID, true, true); @@ -1259,7 +1259,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Creating non XA source session"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Creating non XA source session"); } sourceConn = createConnection(sourceUsername, sourcePassword, sourceCff, clientID, false, true); @@ -1313,7 +1313,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Creating XA dest session"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Creating XA dest session"); } // Create an XA session for sending to the destination @@ -1326,7 +1326,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Creating non XA dest session"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Creating non XA dest session"); } // Create a standard session for sending to the target @@ -1346,7 +1346,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Starting JTA transaction"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Starting JTA transaction"); } tx = startTx(); @@ -1365,7 +1365,7 @@ public final class JMSBridgeImpl implements JMSBridge // If this fails we should attempt to cleanup or we might end up in some weird state // Adding a log.warn, so the use may see the cause of the failure and take actions - HornetQJMSBridgeLogger.LOGGER.bridgeConnectError(e); + ActiveMQJMSBridgeLogger.LOGGER.bridgeConnectError(e); cleanup(); @@ -1384,7 +1384,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Failed to stop source connection", ignore); + ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to stop source connection", ignore); } } @@ -1398,7 +1398,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Failed to delist resources", ignore); + ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to delist resources", ignore); } } try @@ -1410,7 +1410,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Failed to rollback", ignore); + ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to rollback", ignore); } } } @@ -1424,7 +1424,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Failed to close source connection", ignore); + ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to close source connection", ignore); } } try @@ -1438,7 +1438,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Failed to close target connection", ignore); + ActiveMQJMSBridgeLogger.LOGGER.trace("Failed to close target connection", ignore); } } } @@ -1462,7 +1462,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Setting up connections"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Setting up connections"); } int count = 0; @@ -1483,7 +1483,7 @@ public final class JMSBridgeImpl implements JMSBridge break; } - HornetQJMSBridgeLogger.LOGGER.failedToSetUpBridge(failureRetryInterval); + ActiveMQJMSBridgeLogger.LOGGER.failedToSetUpBridge(failureRetryInterval); pause(failureRetryInterval); } @@ -1496,7 +1496,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Sending batch of " + messages.size() + " messages"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Sending batch of " + messages.size() + " messages"); } if (paused) @@ -1504,7 +1504,7 @@ public final class JMSBridgeImpl implements JMSBridge // Don't send now if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Paused, so not sending now"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Paused, so not sending now"); } return; @@ -1535,14 +1535,14 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Client acking source session"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Client acking source session"); } messages.getLast().acknowledge(); if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Client acked source session"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Client acked source session"); } } @@ -1557,7 +1557,7 @@ public final class JMSBridgeImpl implements JMSBridge } catch (TransactionRolledbackException e) { - HornetQJMSBridgeLogger.LOGGER.warn(e.getMessage() + ", retrying TX", e); + ActiveMQJMSBridgeLogger.LOGGER.warn(e.getMessage() + ", retrying TX", e); exHappened = true; } } @@ -1569,14 +1569,14 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Committing target session"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Committing target session"); } targetSession.commit(); if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Committed target session"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Committed target session"); } } @@ -1589,14 +1589,14 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Client acking source session"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Client acking source session"); } messages.getLast().acknowledge(); if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Client acked source session"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Client acked source session"); } } } @@ -1604,10 +1604,10 @@ public final class JMSBridgeImpl implements JMSBridge { if (!stopping) { - HornetQJMSBridgeLogger.LOGGER.bridgeAckError(e); + ActiveMQJMSBridgeLogger.LOGGER.bridgeAckError(e); } - // We don't call failure otherwise failover would be broken with HornetQ + // We don't call failure otherwise failover would be broken with ActiveMQ // We let the ExceptionListener to deal with failures if (connectedSource) @@ -1641,14 +1641,14 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Committing JTA transaction"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Committing JTA transaction"); } tx.commit(); if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Committed JTA transaction"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Committed JTA transaction"); } } catch (Exception e) @@ -1662,7 +1662,7 @@ public final class JMSBridgeImpl implements JMSBridge { } - HornetQJMSBridgeLogger.LOGGER.bridgeAckError(e); + ActiveMQJMSBridgeLogger.LOGGER.bridgeAckError(e); //we don't do handle failure here because the tx //may be rolledback due to failover. All failure handling @@ -1683,7 +1683,7 @@ public final class JMSBridgeImpl implements JMSBridge } catch (Exception e) { - HornetQJMSBridgeLogger.LOGGER.bridgeAckError(e); + ActiveMQJMSBridgeLogger.LOGGER.bridgeAckError(e); handleFailureOnSend(); } @@ -1698,20 +1698,20 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Committing source session"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Committing source session"); } sourceSession.commit(); if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Committed source session"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Committed source session"); } } catch (Exception e) { - HornetQJMSBridgeLogger.LOGGER.bridgeAckError(e); + ActiveMQJMSBridgeLogger.LOGGER.bridgeAckError(e); try { @@ -1753,7 +1753,7 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Sending message " + msg); + ActiveMQJMSBridgeLogger.LOGGER.trace("Sending message " + msg); } // Make sure the correct time to live gets propagated @@ -1774,7 +1774,7 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Sent message " + msg); + ActiveMQJMSBridgeLogger.LOGGER.trace("Sent message " + msg); } } } @@ -1810,14 +1810,14 @@ public final class JMSBridgeImpl implements JMSBridge // distributed request/response if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Adding old message id in Message header"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Adding old message id in Message header"); } JMSBridgeImpl.copyProperties(msg); String val = null; - val = msg.getStringProperty(HornetQJMSConstants.JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LIST); + val = msg.getStringProperty(ActiveMQJMSConstants.JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LIST); if (val == null) { @@ -1832,7 +1832,7 @@ public final class JMSBridgeImpl implements JMSBridge val = sb.toString(); } - msg.setStringProperty(HornetQJMSConstants.JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LIST, val); + msg.setStringProperty(ActiveMQJMSConstants.JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LIST, val); } /* @@ -1875,12 +1875,12 @@ public final class JMSBridgeImpl implements JMSBridge if (val instanceof byte[] == false) { - //Can't set byte[] array props through the JMS API - if we're bridging a HornetQ message it might have such props + //Can't set byte[] array props through the JMS API - if we're bridging a ActiveMQ message it might have such props msg.setObjectProperty(propName, entry.getValue()); } - else if (msg instanceof HornetQMessage) + else if (msg instanceof ActiveMQMessage) { - ((HornetQMessage) msg).getCoreMessage().putBytesProperty(propName, (byte[]) val); + ((ActiveMQMessage) msg).getCoreMessage().putBytesProperty(propName, (byte[]) val); } } } @@ -1942,18 +1942,18 @@ public final class JMSBridgeImpl implements JMSBridge { msg = sourceConsumer.receive(1000); - if (msg instanceof HornetQMessage) + if (msg instanceof ActiveMQMessage) { // We need to check the buffer mainly in the case of LargeMessages // As we need to reconstruct the buffer before resending the message - ((HornetQMessage) msg).checkBuffer(); + ((ActiveMQMessage) msg).checkBuffer(); } } catch (JMSException jmse) { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace(this + " exception while receiving a message", jmse); + ActiveMQJMSBridgeLogger.LOGGER.trace(this + " exception while receiving a message", jmse); } } @@ -1967,7 +1967,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace(this + " thread was interrupted"); + ActiveMQJMSBridgeLogger.LOGGER.trace(this + " thread was interrupted"); } if (stopping) { @@ -1980,7 +1980,7 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace(this + " received message " + msg); + ActiveMQJMSBridgeLogger.LOGGER.trace(this + " received message " + msg); } messages.add(msg); @@ -1989,21 +1989,21 @@ public final class JMSBridgeImpl implements JMSBridge if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace(this + " rescheduled batchExpiryTime to " + batchExpiryTime); + ActiveMQJMSBridgeLogger.LOGGER.trace(this + " rescheduled batchExpiryTime to " + batchExpiryTime); } if (maxBatchSize != -1 && messages.size() >= maxBatchSize) { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace(this + " maxBatchSize has been reached so sending batch"); + ActiveMQJMSBridgeLogger.LOGGER.trace(this + " maxBatchSize has been reached so sending batch"); } sendBatch(); if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace(this + " sent batch"); + ActiveMQJMSBridgeLogger.LOGGER.trace(this + " sent batch"); } } } @@ -2025,13 +2025,13 @@ public final class JMSBridgeImpl implements JMSBridge } catch (JMSException e) { - HornetQJMSBridgeLogger.LOGGER.jmsBridgeSrcConnectError(e); + ActiveMQJMSBridgeLogger.LOGGER.jmsBridgeSrcConnectError(e); } } protected void succeeded() { - HornetQJMSBridgeLogger.LOGGER.bridgeReconnected(); + ActiveMQJMSBridgeLogger.LOGGER.bridgeReconnected(); connectedSource = true; connectedTarget = true; synchronized (lock) @@ -2045,7 +2045,7 @@ public final class JMSBridgeImpl implements JMSBridge protected void failed() { // We haven't managed to recreate connections or maxRetries = 0 - HornetQJMSBridgeLogger.LOGGER.errorConnectingBridge(); + ActiveMQJMSBridgeLogger.LOGGER.errorConnectingBridge(); try { @@ -2060,7 +2060,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Failure handler running"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Failure handler running"); } // Clear the messages @@ -2072,7 +2072,7 @@ public final class JMSBridgeImpl implements JMSBridge if (maxRetries > 0 || maxRetries == -1) { - HornetQJMSBridgeLogger.LOGGER.bridgeRetry(failureRetryInterval); + ActiveMQJMSBridgeLogger.LOGGER.bridgeRetry(failureRetryInterval); pause(failureRetryInterval); @@ -2097,14 +2097,14 @@ public final class JMSBridgeImpl implements JMSBridge protected void failed() { // Don't call super - HornetQJMSBridgeLogger.LOGGER.bridgeNotStarted(); + ActiveMQJMSBridgeLogger.LOGGER.bridgeNotStarted(); } @Override protected void succeeded() { // Don't call super - a bit ugly in this case but better than taking the lock twice. - HornetQJMSBridgeLogger.LOGGER.bridgeConnected(); + ActiveMQJMSBridgeLogger.LOGGER.bridgeConnected(); synchronized (lock) { @@ -2123,7 +2123,7 @@ public final class JMSBridgeImpl implements JMSBridge } catch (JMSException e) { - HornetQJMSBridgeLogger.LOGGER.jmsBridgeSrcConnectError(e); + ActiveMQJMSBridgeLogger.LOGGER.jmsBridgeSrcConnectError(e); } } } @@ -2135,7 +2135,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace(this + " running"); + ActiveMQJMSBridgeLogger.LOGGER.trace(this + " running"); } synchronized (lock) @@ -2148,7 +2148,7 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace(this + " waited enough"); + ActiveMQJMSBridgeLogger.LOGGER.trace(this + " waited enough"); } synchronized (lock) @@ -2157,14 +2157,14 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace(this + " got some messages so sending batch"); + ActiveMQJMSBridgeLogger.LOGGER.trace(this + " got some messages so sending batch"); } sendBatch(); if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace(this + " sent batch"); + ActiveMQJMSBridgeLogger.LOGGER.trace(this + " sent batch"); } } } @@ -2177,21 +2177,21 @@ public final class JMSBridgeImpl implements JMSBridge { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace(this + " waiting for " + toWait); + ActiveMQJMSBridgeLogger.LOGGER.trace(this + " waiting for " + toWait); } lock.wait(toWait); if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace(this + " woke up"); + ActiveMQJMSBridgeLogger.LOGGER.trace(this + " woke up"); } } catch (InterruptedException e) { if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace(this + " thread was interrupted"); + ActiveMQJMSBridgeLogger.LOGGER.trace(this + " thread was interrupted"); } if (stopping) { @@ -2225,7 +2225,7 @@ public final class JMSBridgeImpl implements JMSBridge { return; } - HornetQJMSBridgeLogger.LOGGER.bridgeFailure(e); + ActiveMQJMSBridgeLogger.LOGGER.bridgeFailure(e); if (isSource) { connectedSource = false; @@ -2246,7 +2246,7 @@ public final class JMSBridgeImpl implements JMSBridge // The failure has already been detected and is being handled if (JMSBridgeImpl.trace) { - HornetQJMSBridgeLogger.LOGGER.trace("Failure recovery already in progress"); + ActiveMQJMSBridgeLogger.LOGGER.trace("Failure recovery already in progress"); } } else @@ -2276,11 +2276,11 @@ public final class JMSBridgeImpl implements JMSBridge { try { - registry = (HornetQRegistryBase) safeInitNewInstance(locatorClasse); + registry = (ActiveMQRegistryBase) safeInitNewInstance(locatorClasse); } catch (Throwable e) { - HornetQJMSBridgeLogger.LOGGER.debug("unable to load recovery registry " + locatorClasse, e); + ActiveMQJMSBridgeLogger.LOGGER.debug("unable to load recovery registry " + locatorClasse, e); } if (registry != null) { @@ -2290,7 +2290,7 @@ public final class JMSBridgeImpl implements JMSBridge if (registry != null) { - HornetQJMSBridgeLogger.LOGGER.debug("Recovery Registry located = " + registry); + ActiveMQJMSBridgeLogger.LOGGER.debug("Recovery Registry located = " + registry); } } } @@ -2400,7 +2400,7 @@ public final class JMSBridgeImpl implements JMSBridge if (timedOut) { //timeout, presumably failover failed. - HornetQJMSBridgeLogger.LOGGER.debug("Timed out waiting for failover completion " + this); + ActiveMQJMSBridgeLogger.LOGGER.debug("Timed out waiting for failover completion " + this); return false; } diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSConnectionFactoryControlImpl.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSConnectionFactoryControlImpl.java index 2a38b7e2b3..1d9b13fc19 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSConnectionFactoryControlImpl.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSConnectionFactoryControlImpl.java @@ -21,7 +21,7 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.Parameter; import org.apache.activemq.api.jms.management.ConnectionFactoryControl; import org.apache.activemq.core.management.impl.MBeanInfoHelper; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration; @@ -36,7 +36,7 @@ public class JMSConnectionFactoryControlImpl extends StandardMBean implements Co private final ConnectionFactoryConfiguration cfConfig; - private HornetQConnectionFactory cf; + private ActiveMQConnectionFactory cf; private final String name; @@ -47,7 +47,7 @@ public class JMSConnectionFactoryControlImpl extends StandardMBean implements Co // Constructors -------------------------------------------------- public JMSConnectionFactoryControlImpl(final ConnectionFactoryConfiguration cfConfig, - final HornetQConnectionFactory cf, + final ActiveMQConnectionFactory cf, final JMSServerManager jmsManager, final String name) throws NotCompliantMBeanException { diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSQueueControlImpl.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSQueueControlImpl.java index 36394ed851..1dc4d6d350 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSQueueControlImpl.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSQueueControlImpl.java @@ -25,8 +25,8 @@ import org.apache.activemq.api.jms.management.JMSQueueControl; import org.apache.activemq.core.management.impl.MBeanInfoHelper; import org.apache.activemq.core.messagecounter.MessageCounter; import org.apache.activemq.core.messagecounter.impl.MessageCounterHelper; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQMessage; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQMessage; import org.apache.activemq.jms.client.SelectorTranslator; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.utils.json.JSONArray; @@ -37,7 +37,7 @@ import org.apache.activemq.utils.json.JSONObject; */ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueControl { - private final HornetQDestination managedQueue; + private final ActiveMQDestination managedQueue; private final JMSServerManager jmsServerManager; @@ -53,12 +53,12 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro public static String createFilterFromJMSSelector(final String selectorStr) throws ActiveMQException { return selectorStr == null || selectorStr.trim().length() == 0 ? null - : SelectorTranslator.convertToHornetQFilterString(selectorStr); + : SelectorTranslator.convertToActiveMQFilterString(selectorStr); } private static String createFilterForJMSMessageID(final String jmsMessageID) throws Exception { - return FilterConstants.HORNETQ_USERID + " = '" + jmsMessageID + "'"; + return FilterConstants.ACTIVEMQ_USERID + " = '" + jmsMessageID + "'"; } static String toJSON(final Map[] messages) @@ -73,7 +73,7 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro // Constructors -------------------------------------------------- - public JMSQueueControlImpl(final HornetQDestination managedQueue, + public JMSQueueControlImpl(final ActiveMQDestination managedQueue, final QueueControl coreQueueControl, final JMSServerManager jmsServerManager, final MessageCounter counter) throws Exception @@ -200,7 +200,7 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro for (Map coreMessage : coreMessages) { - Map jmsMessage = HornetQMessage.coreMaptoJMSMap(coreMessage); + Map jmsMessage = ActiveMQMessage.coreMaptoJMSMap(coreMessage); jmsMessages[i++] = jmsMessage; } return jmsMessages; @@ -281,7 +281,7 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro public boolean moveMessage(final String messageID, final String otherQueueName, final boolean rejectDuplicates) throws Exception { String filter = JMSQueueControlImpl.createFilterForJMSMessageID(messageID); - HornetQDestination otherQueue = HornetQDestination.createQueue(otherQueueName); + ActiveMQDestination otherQueue = ActiveMQDestination.createQueue(otherQueueName); int moved = coreQueueControl.moveMessages(filter, otherQueue.getAddress(), rejectDuplicates); if (moved != 1) { @@ -294,7 +294,7 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro public int moveMessages(final String filterStr, final String otherQueueName, final boolean rejectDuplicates) throws Exception { String filter = JMSQueueControlImpl.createFilterFromJMSSelector(filterStr); - HornetQDestination otherQueue = HornetQDestination.createQueue(otherQueueName); + ActiveMQDestination otherQueue = ActiveMQDestination.createQueue(otherQueueName); return coreQueueControl.moveMessages(filter, otherQueue.getAddress(), rejectDuplicates); } diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSServerControlImpl.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSServerControlImpl.java index f7f0ef885f..6f745d6c9e 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSServerControlImpl.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSServerControlImpl.java @@ -41,8 +41,8 @@ import org.apache.activemq.core.management.impl.AbstractControl; import org.apache.activemq.core.management.impl.MBeanInfoHelper; import org.apache.activemq.core.server.ServerConsumer; import org.apache.activemq.core.server.ServerSession; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.server.HornetQJMSServerLogger; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.server.ActiveMQJMSServerLogger; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration; import org.apache.activemq.jms.server.config.impl.ConnectionFactoryConfigurationImpl; @@ -101,29 +101,29 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo private static String[] determineJMSDestination(String coreAddress) { String[] result = new String[2]; // destination name & type - if (coreAddress.startsWith(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX)) + if (coreAddress.startsWith(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX)) { - result[0] = coreAddress.substring(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX.length()); + result[0] = coreAddress.substring(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX.length()); result[1] = "queue"; } - else if (coreAddress.startsWith(HornetQDestination.JMS_TEMP_QUEUE_ADDRESS_PREFIX)) + else if (coreAddress.startsWith(ActiveMQDestination.JMS_TEMP_QUEUE_ADDRESS_PREFIX)) { - result[0] = coreAddress.substring(HornetQDestination.JMS_TEMP_QUEUE_ADDRESS_PREFIX.length()); + result[0] = coreAddress.substring(ActiveMQDestination.JMS_TEMP_QUEUE_ADDRESS_PREFIX.length()); result[1] = "tempqueue"; } - else if (coreAddress.startsWith(HornetQDestination.JMS_TOPIC_ADDRESS_PREFIX)) + else if (coreAddress.startsWith(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX)) { - result[0] = coreAddress.substring(HornetQDestination.JMS_TOPIC_ADDRESS_PREFIX.length()); + result[0] = coreAddress.substring(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX.length()); result[1] = "topic"; } - else if (coreAddress.startsWith(HornetQDestination.JMS_TEMP_TOPIC_ADDRESS_PREFIX)) + else if (coreAddress.startsWith(ActiveMQDestination.JMS_TEMP_TOPIC_ADDRESS_PREFIX)) { - result[0] = coreAddress.substring(HornetQDestination.JMS_TEMP_TOPIC_ADDRESS_PREFIX.length()); + result[0] = coreAddress.substring(ActiveMQDestination.JMS_TEMP_TOPIC_ADDRESS_PREFIX.length()); result[1] = "temptopic"; } else { - HornetQJMSServerLogger.LOGGER.debug("JMSServerControlImpl.determineJMSDestination()" + coreAddress); + ActiveMQJMSServerLogger.LOGGER.debug("JMSServerControlImpl.determineJMSDestination()" + coreAddress); // not related to JMS return null; } @@ -147,10 +147,10 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo public JMSServerControlImpl(final JMSServerManager server) throws Exception { - super(JMSServerControl.class, server.getHornetQServer().getStorageManager()); + super(JMSServerControl.class, server.getActiveMQServer().getStorageManager()); this.server = server; broadcaster = new NotificationBroadcasterSupport(); - server.getHornetQServer().getManagementService().addNotificationListener(this); + server.getActiveMQServer().getManagementService().addNotificationListener(this); } // Public -------------------------------------------------------- @@ -536,7 +536,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo try { - Object[] queueControls = server.getHornetQServer().getManagementService().getResources(JMSQueueControl.class); + Object[] queueControls = server.getActiveMQServer().getManagementService().getResources(JMSQueueControl.class); String[] names = new String[queueControls.length]; for (int i = 0; i < queueControls.length; i++) { @@ -559,7 +559,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo try { - Object[] topicControls = server.getHornetQServer().getManagementService().getResources(TopicControl.class); + Object[] topicControls = server.getActiveMQServer().getManagementService().getResources(TopicControl.class); String[] names = new String[topicControls.length]; for (int i = 0; i < topicControls.length; i++) { @@ -582,7 +582,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo try { - Object[] cfControls = server.getHornetQServer() + Object[] cfControls = server.getActiveMQServer() .getManagementService() .getResources(ConnectionFactoryControl.class); String[] names = new String[cfControls.length]; @@ -731,9 +731,9 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo { JSONArray array = new JSONArray(); - Set connections = server.getHornetQServer().getRemotingService().getConnections(); + Set connections = server.getActiveMQServer().getRemotingService().getConnections(); - Set sessions = server.getHornetQServer().getSessions(); + Set sessions = server.getActiveMQServer().getSessions(); Map jmsSessions = new HashMap(); @@ -777,12 +777,12 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo { JSONArray array = new JSONArray(); - Set connections = server.getHornetQServer().getRemotingService().getConnections(); + Set connections = server.getActiveMQServer().getRemotingService().getConnections(); for (RemotingConnection connection : connections) { if (connectionID.equals(connection.getID().toString())) { - List sessions = server.getHornetQServer().getSessions(connectionID); + List sessions = server.getActiveMQServer().getSessions(connectionID); for (ServerSession session : sessions) { Set consumers = session.getServerConsumers(); @@ -815,7 +815,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo { JSONArray array = new JSONArray(); - Set sessions = server.getHornetQServer().getSessions(); + Set sessions = server.getActiveMQServer().getSessions(); for (ServerSession session : sessions) { Set consumers = session.getServerConsumers(); @@ -902,7 +902,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo { if (!server.isStarted()) { - throw new IllegalStateException("HornetQ JMS Server is not started. it can not be managed yet"); + throw new IllegalStateException("ActiveMQ JMS Server is not started. it can not be managed yet"); } } @@ -910,17 +910,17 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo public String[] listTargetDestinations(String sessionID) throws Exception { - String[] addresses = server.getHornetQServer().getHornetQServerControl().listTargetAddresses(sessionID); + String[] addresses = server.getActiveMQServer().getActiveMQServerControl().listTargetAddresses(sessionID); Map allDests = new HashMap(); - Object[] queueControls = server.getHornetQServer().getManagementService().getResources(JMSQueueControl.class); + Object[] queueControls = server.getActiveMQServer().getManagementService().getResources(JMSQueueControl.class); for (Object queueControl2 : queueControls) { JMSQueueControl queueControl = (JMSQueueControl) queueControl2; allDests.put(queueControl.getAddress(), queueControl); } - Object[] topicControls = server.getHornetQServer().getManagementService().getResources(TopicControl.class); + Object[] topicControls = server.getActiveMQServer().getManagementService().getResources(TopicControl.class); for (Object topicControl2 : topicControls) { TopicControl topicControl = (TopicControl) topicControl2; @@ -941,7 +941,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo public String getLastSentMessageID(String sessionID, String address) throws Exception { - ServerSession session = server.getHornetQServer().getSessionByID(sessionID); + ServerSession session = server.getActiveMQServer().getSessionByID(sessionID); if (session != null) { return session.getLastSentMessageID(address); @@ -951,7 +951,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo public String getSessionCreationTime(String sessionID) throws Exception { - ServerSession session = server.getHornetQServer().getSessionByID(sessionID); + ServerSession session = server.getActiveMQServer().getSessionByID(sessionID); if (session != null) { return String.valueOf(session.getCreationTime()); @@ -968,7 +968,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo JSONArray array = new JSONArray(); try { - List sessions = server.getHornetQServer().getSessions(connectionID); + List sessions = server.getActiveMQServer().getSessions(connectionID); for (ServerSession sess : sessions) { JSONObject obj = new JSONObject(); @@ -986,7 +986,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo public String closeConnectionWithClientID(final String clientID) throws Exception { - return server.getHornetQServer().destroyConnectionWithSessionMetadata("jms-client-id", clientID); + return server.getActiveMQServer().destroyConnectionWithSessionMetadata("jms-client-id", clientID); } private JSONObject toJSONObject(ServerConsumer consumer) throws Exception @@ -1015,7 +1015,9 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo { try { - HornetQDestination.decomposeQueueNameForDurableSubscription(consumer.getQueue().getName().toString()); + ActiveMQDestination.decomposeQueueNameForDurableSubscription(consumer.getQueue() + .getName() + .toString()); obj.put("durable", true); } catch (IllegalArgumentException e) diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSTopicControlImpl.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSTopicControlImpl.java index 298071ce6c..94ac46bebf 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSTopicControlImpl.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/management/impl/JMSTopicControlImpl.java @@ -23,14 +23,14 @@ import javax.management.StandardMBean; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.management.AddressControl; -import org.apache.activemq.api.core.management.HornetQServerControl; +import org.apache.activemq.api.core.management.ActiveMQServerControl; import org.apache.activemq.api.core.management.QueueControl; import org.apache.activemq.api.core.management.ResourceNames; import org.apache.activemq.api.jms.management.TopicControl; import org.apache.activemq.core.management.impl.MBeanInfoHelper; import org.apache.activemq.core.server.management.ManagementService; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQMessage; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQMessage; import org.apache.activemq.jms.client.SelectorTranslator; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.utils.json.JSONArray; @@ -43,7 +43,7 @@ import org.apache.activemq.utils.json.JSONObject; */ public class JMSTopicControlImpl extends StandardMBean implements TopicControl { - private final HornetQDestination managedTopic; + private final ActiveMQDestination managedTopic; private final AddressControl addressControl; @@ -56,12 +56,12 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl public static String createFilterFromJMSSelector(final String selectorStr) throws ActiveMQException { return selectorStr == null || selectorStr.trim().length() == 0 ? null - : SelectorTranslator.convertToHornetQFilterString(selectorStr); + : SelectorTranslator.convertToActiveMQFilterString(selectorStr); } // Constructors -------------------------------------------------- - public JMSTopicControlImpl(final HornetQDestination topic, + public JMSTopicControlImpl(final ActiveMQDestination topic, final JMSServerManager jmsServerManager, final AddressControl addressControl, final ManagementService managementService) throws Exception @@ -199,7 +199,7 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl for (Map coreMessage : coreMessages) { - jmsMessages[i++] = HornetQMessage.coreMaptoJMSMap(coreMessage); + jmsMessages[i++] = ActiveMQMessage.coreMaptoJMSMap(coreMessage); } return jmsMessages; } @@ -211,7 +211,7 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl public int countMessagesForSubscription(final String clientID, final String subscriptionName, final String filterStr) throws Exception { - String queueName = HornetQDestination.createQueueNameForDurableSubscription(true, clientID, subscriptionName); + String queueName = ActiveMQDestination.createQueueNameForDurableSubscription(true, clientID, subscriptionName); QueueControl coreQueueControl = (QueueControl)managementService.getResource(ResourceNames.CORE_QUEUE + queueName); if (coreQueueControl == null) { @@ -240,19 +240,19 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl public void dropDurableSubscription(final String clientID, final String subscriptionName) throws Exception { - String queueName = HornetQDestination.createQueueNameForDurableSubscription(true, clientID, subscriptionName); + String queueName = ActiveMQDestination.createQueueNameForDurableSubscription(true, clientID, subscriptionName); QueueControl coreQueueControl = (QueueControl)managementService.getResource(ResourceNames.CORE_QUEUE + queueName); if (coreQueueControl == null) { throw new IllegalArgumentException("No subscriptions with name " + queueName + " for clientID " + clientID); } - HornetQServerControl serverControl = (HornetQServerControl)managementService.getResource(ResourceNames.CORE_SERVER); + ActiveMQServerControl serverControl = (ActiveMQServerControl)managementService.getResource(ResourceNames.CORE_SERVER); serverControl.destroyQueue(queueName); } public void dropAllSubscriptions() throws Exception { - HornetQServerControl serverControl = (HornetQServerControl)managementService.getResource(ResourceNames.CORE_SERVER); + ActiveMQServerControl serverControl = (ActiveMQServerControl)managementService.getResource(ResourceNames.CORE_SERVER); String[] queues = addressControl.getQueueNames(); for (String queue : queues) { @@ -283,8 +283,8 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl if (queue.isDurable()) { - Pair pair = HornetQDestination.decomposeQueueNameForDurableSubscription(queue.getName() - .toString()); + Pair pair = ActiveMQDestination.decomposeQueueNameForDurableSubscription(queue.getName() + .toString()); clientID = pair.getA(); subName = pair.getB(); } @@ -317,8 +317,8 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl if (queue.isDurable() && !queue.getName().startsWith(ResourceNames.JMS_TOPIC)) { - Pair pair = HornetQDestination.decomposeQueueNameForDurableSubscription(queue.getName() - .toString()); + Pair pair = ActiveMQDestination.decomposeQueueNameForDurableSubscription(queue.getName() + .toString()); clientID = pair.getA(); subName = pair.getB(); } @@ -327,8 +327,8 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl // in the case of heirarchical topics the queue name will not follow the . pattern of normal // durable subscribers so skip decomposing the name for the client ID and subscription name and just // hard-code it - clientID = "HornetQ"; - subName = "HornetQ"; + clientID = "ActiveMQ"; + subName = "ActiveMQ"; } String filter = queue.getFilter() != null ? queue.getFilter() : null; diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/JMSStorageManager.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/JMSStorageManager.java index cf0ae3f668..1487e7110d 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/JMSStorageManager.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/JMSStorageManager.java @@ -14,7 +14,7 @@ package org.apache.activemq.jms.persistence; import java.util.List; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.jms.persistence.config.PersistedConnectionFactory; import org.apache.activemq.jms.persistence.config.PersistedDestination; import org.apache.activemq.jms.persistence.config.PersistedJNDI; @@ -27,7 +27,7 @@ import org.apache.activemq.jms.persistence.config.PersistedType; * * */ -public interface JMSStorageManager extends HornetQComponent +public interface JMSStorageManager extends ActiveMQComponent { void load() throws Exception; diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/impl/journal/JMSJournalStorageManagerImpl.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/impl/journal/JMSJournalStorageManagerImpl.java index f3efc5cf6e..e0f414db6a 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/impl/journal/JMSJournalStorageManagerImpl.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/impl/journal/JMSJournalStorageManagerImpl.java @@ -101,7 +101,7 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager config.getJournalCompactMinFiles(), config.getJournalCompactPercentage(), bindingsJMS, - "hornetq-jms", + "activemq-jms", "jms", 1); diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/HornetQJMSServerBundle.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/ActiveMQJMSServerBundle.java similarity index 94% rename from activemq-jms-server/src/main/java/org/apache/activemq/jms/server/HornetQJMSServerBundle.java rename to activemq-jms-server/src/main/java/org/apache/activemq/jms/server/ActiveMQJMSServerBundle.java index 474c99035a..25f5d5c807 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/HornetQJMSServerBundle.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/ActiveMQJMSServerBundle.java @@ -31,10 +31,10 @@ import org.jboss.logging.Messages; * * so 129000 to 129999 */ -@MessageBundle(projectCode = "HQ") -public interface HornetQJMSServerBundle +@MessageBundle(projectCode = "AMQ") +public interface ActiveMQJMSServerBundle { - HornetQJMSServerBundle BUNDLE = Messages.getBundle(HornetQJMSServerBundle.class); + ActiveMQJMSServerBundle BUNDLE = Messages.getBundle(ActiveMQJMSServerBundle.class); @Message(id = 129000, value = "Connection Factory {0} does not exist" , format = Message.Format.MESSAGE_FORMAT) ActiveMQInternalErrorException cfDoesntExist(String name); diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/HornetQJMSServerLogger.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/ActiveMQJMSServerLogger.java similarity index 94% rename from activemq-jms-server/src/main/java/org/apache/activemq/jms/server/HornetQJMSServerLogger.java rename to activemq-jms-server/src/main/java/org/apache/activemq/jms/server/ActiveMQJMSServerLogger.java index 89af42fee0..379f079808 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/HornetQJMSServerLogger.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/ActiveMQJMSServerLogger.java @@ -39,13 +39,13 @@ import org.w3c.dom.Node; * * so an INFO message would be 121000 to 121999 */ -@MessageLogger(projectCode = "HQ") -public interface HornetQJMSServerLogger extends BasicLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQJMSServerLogger extends BasicLogger { /** * The default logger. */ - HornetQJMSServerLogger LOGGER = Logger.getMessageLogger(HornetQJMSServerLogger.class, HornetQJMSServerLogger.class.getPackage().getName()); + ActiveMQJMSServerLogger LOGGER = Logger.getMessageLogger(ActiveMQJMSServerLogger.class, ActiveMQJMSServerLogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.INFO) @Message(id = 121003, value = "JMS Server Manager Running cached command for {0}" , format = Message.Format.MESSAGE_FORMAT) @@ -66,7 +66,7 @@ public interface HornetQJMSServerLogger extends BasicLogger void noQueueOnTopic(String queueName, String name); @LogMessage(level = Logger.Level.WARN) - @Message(id = 122008, value = "XA Recovery can not connect to any hornetq server on recovery {0}" , format = Message.Format.MESSAGE_FORMAT) + @Message(id = 122008, value = "XA Recovery can not connect to any ActiveMQ server on recovery {0}" , format = Message.Format.MESSAGE_FORMAT) void recoveryConnectFailed(String s); @LogMessage(level = Logger.Level.WARN) diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/JMSServerManager.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/JMSServerManager.java index fd82e69181..d3548f1831 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/JMSServerManager.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/JMSServerManager.java @@ -19,10 +19,10 @@ import javax.naming.Context; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.security.Role; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration; import org.apache.activemq.spi.core.naming.BindingRegistry; @@ -33,7 +33,7 @@ import org.apache.activemq.spi.core.naming.BindingRegistry; * @author Jeff Mesnil * @author Tim Fox */ -public interface JMSServerManager extends HornetQComponent +public interface JMSServerManager extends ActiveMQComponent { String getVersion(); @@ -183,7 +183,7 @@ public interface JMSServerManager extends HornetQComponent /** Call this method to have a CF rebound to JNDI and stored on the Journal * @throws Exception */ - HornetQConnectionFactory recreateCF(String name, ConnectionFactoryConfiguration cf) throws Exception; + ActiveMQConnectionFactory recreateCF(String name, ConnectionFactoryConfiguration cf) throws Exception; void createConnectionFactory(String name, boolean ha, JMSFactoryType cfType, String discoveryGroupName, String ... jndiBindings) throws Exception; @@ -298,7 +298,7 @@ public interface JMSServerManager extends HornetQComponent void setContext(final Context context); - HornetQServer getHornetQServer(); + ActiveMQServer getActiveMQServer(); void addAddressSettings(String address, AddressSettings addressSettings); diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java index fcda258a4e..fcc7a0499d 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java @@ -17,7 +17,7 @@ import java.util.List; import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration; import org.apache.activemq.utils.BufferHelper; @@ -50,65 +50,65 @@ public class ConnectionFactoryConfigurationImpl implements ConnectionFactoryConf private String clientID = null; - private boolean ha = HornetQClient.DEFAULT_HA; + private boolean ha = ActiveMQClient.DEFAULT_HA; - private long clientFailureCheckPeriod = HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD; + private long clientFailureCheckPeriod = ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD; - private long connectionTTL = HornetQClient.DEFAULT_CONNECTION_TTL; + private long connectionTTL = ActiveMQClient.DEFAULT_CONNECTION_TTL; - private long callTimeout = HornetQClient.DEFAULT_CALL_TIMEOUT; + private long callTimeout = ActiveMQClient.DEFAULT_CALL_TIMEOUT; - private long callFailoverTimeout = HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT; + private long callFailoverTimeout = ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT; - private boolean cacheLargeMessagesClient = HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT; + private boolean cacheLargeMessagesClient = ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT; - private int minLargeMessageSize = HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; + private int minLargeMessageSize = ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; - private boolean compressLargeMessage = HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES; + private boolean compressLargeMessage = ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES; - private int consumerWindowSize = HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE; + private int consumerWindowSize = ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE; - private int consumerMaxRate = HornetQClient.DEFAULT_CONSUMER_MAX_RATE; + private int consumerMaxRate = ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE; - private int confirmationWindowSize = HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE; + private int confirmationWindowSize = ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE; - private int producerWindowSize = HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE; + private int producerWindowSize = ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE; - private int producerMaxRate = HornetQClient.DEFAULT_PRODUCER_MAX_RATE; + private int producerMaxRate = ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE; - private boolean blockOnAcknowledge = HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE; + private boolean blockOnAcknowledge = ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE; - private boolean blockOnDurableSend = HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND; + private boolean blockOnDurableSend = ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND; - private boolean blockOnNonDurableSend = HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND; + private boolean blockOnNonDurableSend = ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND; - private boolean autoGroup = HornetQClient.DEFAULT_AUTO_GROUP; + private boolean autoGroup = ActiveMQClient.DEFAULT_AUTO_GROUP; - private boolean preAcknowledge = HornetQClient.DEFAULT_PRE_ACKNOWLEDGE; + private boolean preAcknowledge = ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE; - private String loadBalancingPolicyClassName = HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME; + private String loadBalancingPolicyClassName = ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME; - private int transactionBatchSize = HornetQClient.DEFAULT_ACK_BATCH_SIZE; + private int transactionBatchSize = ActiveMQClient.DEFAULT_ACK_BATCH_SIZE; - private int dupsOKBatchSize = HornetQClient.DEFAULT_ACK_BATCH_SIZE; + private int dupsOKBatchSize = ActiveMQClient.DEFAULT_ACK_BATCH_SIZE; - private long initialWaitTimeout = HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT; + private long initialWaitTimeout = ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT; - private boolean useGlobalPools = HornetQClient.DEFAULT_USE_GLOBAL_POOLS; + private boolean useGlobalPools = ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS; - private int scheduledThreadPoolMaxSize = HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE; + private int scheduledThreadPoolMaxSize = ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE; - private int threadPoolMaxSize = HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE; + private int threadPoolMaxSize = ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE; - private long retryInterval = HornetQClient.DEFAULT_RETRY_INTERVAL; + private long retryInterval = ActiveMQClient.DEFAULT_RETRY_INTERVAL; - private double retryIntervalMultiplier = HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER; + private double retryIntervalMultiplier = ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER; - private long maxRetryInterval = HornetQClient.DEFAULT_MAX_RETRY_INTERVAL; + private long maxRetryInterval = ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL; - private int reconnectAttempts = HornetQClient.DEFAULT_RECONNECT_ATTEMPTS; + private int reconnectAttempts = ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS; - private boolean failoverOnInitialConnection = HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION; + private boolean failoverOnInitialConnection = ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION; private String groupID = null; diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/embedded/EmbeddedJMS.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/embedded/EmbeddedJMS.java index 159241b4a6..047d45715f 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/embedded/EmbeddedJMS.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/embedded/EmbeddedJMS.java @@ -16,14 +16,14 @@ import javax.naming.Context; import org.apache.activemq.core.registry.JndiBindingRegistry; import org.apache.activemq.core.registry.MapBindingRegistry; -import org.apache.activemq.core.server.embedded.EmbeddedHornetQ; +import org.apache.activemq.core.server.embedded.EmbeddedActiveMQ; import org.apache.activemq.jms.server.config.JMSConfiguration; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.spi.core.naming.BindingRegistry; /** - * Simple bootstrap class that parses hornetq config files (server and jms and security) and starts - * a HornetQServer instance and populates it with configured JMS endpoints. + * Simple bootstrap class that parses activemq config files (server and jms and security) and starts + * a ActiveMQServer instance and populates it with configured JMS endpoints. *

* JMS Endpoints are registered with a simple MapBindingRegistry. If you want to use a different registry * you must set the registry property of this class or call the setRegistry() method if you want to use JNDI @@ -31,7 +31,7 @@ import org.apache.activemq.spi.core.naming.BindingRegistry; * @author Bill Burke * @version $Revision: 1 $ */ -public class EmbeddedJMS extends EmbeddedHornetQ +public class EmbeddedJMS extends EmbeddedActiveMQ { protected JMSServerManagerImpl serverManager; protected BindingRegistry registry; @@ -40,7 +40,7 @@ public class EmbeddedJMS extends EmbeddedHornetQ protected Context context; /** - * Classpath resource where JMS config file is. Defaults to 'hornetq-jms.xml' + * Classpath resource where JMS config file is. Defaults to 'activemq-jms.xml' * * @param jmsConfigResourcePath */ @@ -101,10 +101,10 @@ public class EmbeddedJMS extends EmbeddedHornetQ super.initStart(); if (jmsConfiguration != null) { - serverManager = new JMSServerManagerImpl(hornetQServer, jmsConfiguration); + serverManager = new JMSServerManagerImpl(activeMQServer, jmsConfiguration); } - else if (jmsConfigResourcePath == null) serverManager = new JMSServerManagerImpl(hornetQServer); - else serverManager = new JMSServerManagerImpl(hornetQServer, jmsConfigResourcePath); + else if (jmsConfigResourcePath == null) serverManager = new JMSServerManagerImpl(activeMQServer); + else serverManager = new JMSServerManagerImpl(activeMQServer, jmsConfigResourcePath); if (registry == 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 0ecb5deb7e..d959faba5e 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 @@ -20,11 +20,11 @@ import java.util.List; 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.core.client.ActiveMQClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.config.impl.Validators; -import org.apache.activemq.jms.server.HornetQJMSServerBundle; -import org.apache.activemq.jms.server.HornetQJMSServerLogger; +import org.apache.activemq.jms.server.ActiveMQJMSServerBundle; +import org.apache.activemq.jms.server.ActiveMQJMSServerLogger; import org.apache.activemq.jms.server.JMSServerConfigParser; import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration; import org.apache.activemq.jms.server.config.JMSConfiguration; @@ -92,7 +92,7 @@ public final class JMSServerConfigParserImpl implements JMSServerConfigParser Node keyNode = node.getAttributes().getNamedItem(JMSServerConfigParserImpl.NAME_ATTR); if (keyNode == null) { - HornetQJMSServerLogger.LOGGER.jmsConfigMissingKey(node); + ActiveMQJMSServerLogger.LOGGER.jmsConfigMissingKey(node); continue; } @@ -197,7 +197,7 @@ public final class JMSServerConfigParserImpl implements JMSServerConfigParser if (!node.getNodeName().equals(JMSServerDeployer.CONNECTION_FACTORY_NODE_NAME)) { // sanity check, this shouldn't ever happen - throw HornetQJMSServerBundle.BUNDLE.invalidNodeParsingCF(node.getNodeName()); + throw ActiveMQJMSServerBundle.BUNDLE.invalidNodeParsingCF(node.getNodeName()); } Element e = (Element) node; @@ -206,116 +206,116 @@ public final class JMSServerConfigParserImpl implements JMSServerConfigParser String fact = e.getAttribute("signature"); boolean isXA = XMLConfigurationUtil.getBoolean(e, "xa", - HornetQClient.DEFAULT_XA); + ActiveMQClient.DEFAULT_XA); JMSFactoryType factType = resolveFactoryType(fact, isXA); long clientFailureCheckPeriod = XMLConfigurationUtil.getLong(e, "client-failure-check-period", - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, Validators.MINUS_ONE_OR_GT_ZERO); long connectionTTL = XMLConfigurationUtil.getLong(e, "connection-ttl", - HornetQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CONNECTION_TTL, Validators.MINUS_ONE_OR_GE_ZERO); long callTimeout = XMLConfigurationUtil.getLong(e, "call-timeout", - HornetQClient.DEFAULT_CALL_TIMEOUT, + ActiveMQClient.DEFAULT_CALL_TIMEOUT, Validators.GE_ZERO); long callFailoverTimeout = XMLConfigurationUtil.getLong(e, "call-failover-timeout", - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, Validators.MINUS_ONE_OR_GT_ZERO); String clientID = XMLConfigurationUtil.getString(e, "client-id", null, Validators.NO_CHECK); int dupsOKBatchSize = XMLConfigurationUtil.getInteger(e, "dups-ok-batch-size", - HornetQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, Validators.GT_ZERO); int transactionBatchSize = XMLConfigurationUtil.getInteger(e, "transaction-batch-size", - HornetQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, Validators.GT_ZERO); int consumerWindowSize = XMLConfigurationUtil.getInteger(e, "consumer-window-size", - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, Validators.MINUS_ONE_OR_GE_ZERO); int producerWindowSize = XMLConfigurationUtil.getInteger(e, "producer-window-size", - HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE, Validators.MINUS_ONE_OR_GT_ZERO); int consumerMaxRate = XMLConfigurationUtil.getInteger(e, "consumer-max-rate", - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, Validators.MINUS_ONE_OR_GT_ZERO); int confirmationWindowSize = XMLConfigurationUtil.getInteger(e, "confirmation-window-size", - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, Validators.MINUS_ONE_OR_GT_ZERO); int producerMaxRate = XMLConfigurationUtil.getInteger(e, "producer-max-rate", - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, Validators.MINUS_ONE_OR_GT_ZERO); boolean cacheLargeMessagesClient = XMLConfigurationUtil.getBoolean(e, "cache-large-message-client", - HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT); + ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT); int minLargeMessageSize = XMLConfigurationUtil.getInteger(e, "min-large-message-size", - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, Validators.GT_ZERO); boolean compressLargeMessages = XMLConfigurationUtil.getBoolean(e, "compress-large-messages", - HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES); + ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES); boolean blockOnAcknowledge = XMLConfigurationUtil.getBoolean(e, "block-on-acknowledge", - HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE); + ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE); boolean blockOnNonDurableSend = XMLConfigurationUtil.getBoolean(e, "block-on-non-durable-send", - HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND); + ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND); boolean blockOnDurableSend = XMLConfigurationUtil.getBoolean(e, "block-on-durable-send", - HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND); - boolean autoGroup = XMLConfigurationUtil.getBoolean(e, "auto-group", HornetQClient.DEFAULT_AUTO_GROUP); + ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND); + boolean autoGroup = XMLConfigurationUtil.getBoolean(e, "auto-group", ActiveMQClient.DEFAULT_AUTO_GROUP); boolean preAcknowledge = XMLConfigurationUtil.getBoolean(e, "pre-acknowledge", - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE); + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE); long retryInterval = XMLConfigurationUtil.getLong(e, "retry-interval", - HornetQClient.DEFAULT_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RETRY_INTERVAL, Validators.GT_ZERO); double retryIntervalMultiplier = XMLConfigurationUtil.getDouble(e, "retry-interval-multiplier", - HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, Validators.GT_ZERO); long maxRetryInterval = XMLConfigurationUtil.getLong(e, "max-retry-interval", - HornetQClient.DEFAULT_MAX_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, Validators.GT_ZERO); int reconnectAttempts = XMLConfigurationUtil.getInteger(e, "reconnect-attempts", - HornetQClient.DEFAULT_RECONNECT_ATTEMPTS, + ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS, Validators.MINUS_ONE_OR_GE_ZERO); boolean failoverOnInitialConnection = XMLConfigurationUtil.getBoolean(e, "failover-on-initial-connection", - HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION); + ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION); boolean useGlobalPools = XMLConfigurationUtil.getBoolean(e, "use-global-pools", - HornetQClient.DEFAULT_USE_GLOBAL_POOLS); + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS); int scheduledThreadPoolMaxSize = XMLConfigurationUtil.getInteger(e, "scheduled-thread-pool-max-size", - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, Validators.MINUS_ONE_OR_GT_ZERO); int threadPoolMaxSize = XMLConfigurationUtil.getInteger(e, "thread-pool-max-size", - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, Validators.MINUS_ONE_OR_GT_ZERO); String connectionLoadBalancingPolicyClassName = XMLConfigurationUtil.getString(e, "connection-load-balancing-policy-class-name", - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, Validators.NOT_NULL_OR_EMPTY); - boolean ha = XMLConfigurationUtil.getBoolean(e, "ha", HornetQClient.DEFAULT_HA); + boolean ha = XMLConfigurationUtil.getBoolean(e, "ha", ActiveMQClient.DEFAULT_HA); String groupid = XMLConfigurationUtil.getString(e, "group-id", null, Validators.NO_CHECK); List jndiBindings = new ArrayList(); @@ -458,7 +458,7 @@ public final class JMSServerConfigParserImpl implements JMSServerConfigParser return JMSFactoryType.TOPIC_CF; } } - throw HornetQJMSServerBundle.BUNDLE.invalidSignatureParsingCF(fact); + throw ActiveMQJMSServerBundle.BUNDLE.invalidSignatureParsingCF(fact); } /** diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerDeployer.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerDeployer.java index ae5730adcd..2bab2bdda7 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerDeployer.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerDeployer.java @@ -96,8 +96,8 @@ public class JMSServerDeployer extends XmlDeployer } /** - * Creates the object to bind, this will either be a JBossConnectionFActory, HornetQQueue or - * HornetQTopic. + * Creates the object to bind, this will either be a JBossConnectionFActory, ActiveMQQueue or + * ActiveMQTopic. * * @param node the config * @throws Exception @@ -147,7 +147,7 @@ public class JMSServerDeployer extends XmlDeployer @Override public String[] getDefaultConfigFileNames() { - return new String[]{"hornetq-jms.xml"}; + return new String[]{"activemq-jms.xml"}; } diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerManagerImpl.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerManagerImpl.java index b8b2d5f2dc..943d9f46c1 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerManagerImpl.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerManagerImpl.java @@ -37,7 +37,7 @@ import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.AddressControl; import org.apache.activemq.api.core.management.ResourceNames; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.deployers.DeploymentManager; @@ -50,18 +50,18 @@ import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; import org.apache.activemq.core.security.Role; import org.apache.activemq.core.server.ActivateCallback; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.management.Notification; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.core.transaction.ResourceManager; import org.apache.activemq.core.transaction.Transaction; import org.apache.activemq.core.transaction.TransactionDetail; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQQueue; -import org.apache.activemq.jms.client.HornetQTopic; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQQueue; +import org.apache.activemq.jms.client.ActiveMQTopic; import org.apache.activemq.jms.client.SelectorTranslator; import org.apache.activemq.jms.persistence.JMSStorageManager; import org.apache.activemq.jms.persistence.config.PersistedConnectionFactory; @@ -70,8 +70,8 @@ import org.apache.activemq.jms.persistence.config.PersistedJNDI; import org.apache.activemq.jms.persistence.config.PersistedType; import org.apache.activemq.jms.persistence.impl.journal.JMSJournalStorageManagerImpl; import org.apache.activemq.jms.persistence.impl.nullpm.NullJMSStorageManagerImpl; -import org.apache.activemq.jms.server.HornetQJMSServerBundle; -import org.apache.activemq.jms.server.HornetQJMSServerLogger; +import org.apache.activemq.jms.server.ActiveMQJMSServerBundle; +import org.apache.activemq.jms.server.ActiveMQJMSServerLogger; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration; import org.apache.activemq.jms.server.config.JMSConfiguration; @@ -106,15 +106,15 @@ import org.apache.activemq.utils.json.JSONObject; */ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback { - private static final String REJECT_FILTER = HornetQServerImpl.GENERIC_IGNORED_FILTER; + private static final String REJECT_FILTER = ActiveMQServerImpl.GENERIC_IGNORED_FILTER; private BindingRegistry registry; - private final Map queues = new HashMap(); + private final Map queues = new HashMap(); - private final Map topics = new HashMap(); + private final Map topics = new HashMap(); - private final Map connectionFactories = new HashMap(); + private final Map connectionFactories = new HashMap(); private final Map> queueJNDI = new HashMap>(); @@ -125,7 +125,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback // We keep things cached if objects are created while the JMS is not active private final List cachedCommands = new ArrayList(); - private final HornetQServer server; + private final ActiveMQServer server; private JMSManagementService jmsManagementService; @@ -149,7 +149,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback private final Map> unRecoveredJndi = new HashMap>(); - public JMSServerManagerImpl(final HornetQServer server) throws Exception + public JMSServerManagerImpl(final ActiveMQServer server) throws Exception { this.server = server; @@ -165,7 +165,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback * @param registry * @throws Exception */ - public JMSServerManagerImpl(final HornetQServer server, final BindingRegistry registry) throws Exception + public JMSServerManagerImpl(final ActiveMQServer server, final BindingRegistry registry) throws Exception { this.server = server; @@ -176,7 +176,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback this.registry = registry; } - public JMSServerManagerImpl(final HornetQServer server, final String configFileName) throws Exception + public JMSServerManagerImpl(final ActiveMQServer server, final String configFileName) throws Exception { this.server = server; @@ -185,7 +185,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback this.configFileName = configFileName; } - public JMSServerManagerImpl(final HornetQServer server, final JMSConfiguration configuration) throws Exception + public JMSServerManagerImpl(final ActiveMQServer server, final JMSConfiguration configuration) throws Exception { this.server = server; @@ -200,7 +200,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback * Unused */ @Deprecated - public JMSServerManagerImpl(HornetQServer server, String configFilename, JMSStorageManager storageManager) + public JMSServerManagerImpl(ActiveMQServer server, String configFilename, JMSStorageManager storageManager) { this.server = server; @@ -259,7 +259,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback for (Runnable run : cachedCommands) { - HornetQJMSServerLogger.LOGGER.serverRunningCachedCommand(run); + ActiveMQJMSServerLogger.LOGGER.serverRunningCachedCommand(run); run.run(); } @@ -270,7 +270,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback catch (Exception e) { active = false; - HornetQJMSServerLogger.LOGGER.jmsDeployerStartError(e); + ActiveMQJMSServerLogger.LOGGER.jmsDeployerStartError(e); } } @@ -450,7 +450,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } - // HornetQComponent implementation ----------------------------------- + // ActiveMQComponent implementation ----------------------------------- /** * Notice that this component has a {@link #startCalled} boolean to control its internal @@ -460,8 +460,8 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback * This method and {@code server.start()} are interdependent in the following way: *

    *
  1. {@link JMSServerManagerImpl#start()} is called, it sets {@code start_called=true}, and - * calls {@link HornetQServerImpl#start()} - *
  2. {@link HornetQServerImpl#start()} will call {@link JMSServerManagerImpl#activated()} + * calls {@link org.apache.activemq.core.server.impl.ActiveMQServerImpl#start()} + *
  3. {@link org.apache.activemq.core.server.impl.ActiveMQServerImpl#start()} will call {@link JMSServerManagerImpl#activated()} *
  4. {@link JMSServerManagerImpl#activated()} checks the value of {@link #startCalled}, which * must already be true. *
@@ -535,7 +535,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback this.registry = registry; } - public HornetQServer getHornetQServer() + public ActiveMQServer getActiveMQServer() { return server; } @@ -606,7 +606,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback if (internalCreateQueue(queueName, selectorString, durable)) { - HornetQDestination destination = queues.get(queueName); + ActiveMQDestination destination = queues.get(queueName); if (destination == null) { // sanity check. internalCreateQueue should already have done this check @@ -664,7 +664,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback if (internalCreateTopic(topicName)) { - HornetQDestination destination = topics.get(topicName); + ActiveMQDestination destination = topics.get(topicName); if (destination == null) { @@ -705,7 +705,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback checkJNDI(jndiBinding); - HornetQTopic destination = topics.get(topicName); + ActiveMQTopic destination = topics.get(topicName); if (destination == null) { throw new IllegalArgumentException("Topic does not exist"); @@ -745,7 +745,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback checkJNDI(jndiBinding); - HornetQQueue destination = queues.get(queueName); + ActiveMQQueue destination = queues.get(queueName); if (destination == null) { throw new IllegalArgumentException("Queue does not exist"); @@ -769,14 +769,14 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback checkJNDI(jndiBinding); - HornetQConnectionFactory factory = connectionFactories.get(name); + ActiveMQConnectionFactory factory = connectionFactories.get(name); if (factory == null) { throw new IllegalArgumentException("Factory does not exist"); } if (registry.lookup(jndiBinding) != null) { - throw HornetQJMSServerBundle.BUNDLE.cfJndiExists(name); + throw ActiveMQJMSServerBundle.BUNDLE.cfJndiExists(name); } boolean added = bindToJndi(jndiBinding, factory); if (added) @@ -913,11 +913,11 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback { checkInitialised(); - server.destroyQueue(HornetQDestination.createQueueAddressFromName(name), null, !removeConsumers, removeConsumers); + server.destroyQueue(ActiveMQDestination.createQueueAddressFromName(name), null, !removeConsumers, removeConsumers); // if the queue has consumers and 'removeConsumers' is false then the queue won't actually be removed // therefore only remove the queue from JNDI, etc. if the queue is actually removed - if (this.server.getPostOffice().getBinding(HornetQDestination.createQueueAddressFromName(name)) == null) + if (this.server.getPostOffice().getBinding(ActiveMQDestination.createQueueAddressFromName(name)) == null) { removeFromJNDI(queues, queueJNDI, name); @@ -946,7 +946,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback { checkInitialised(); AddressControl addressControl = (AddressControl) server.getManagementService() - .getResource(ResourceNames.CORE_ADDRESS + HornetQDestination.createTopicAddressFromName(name)); + .getResource(ResourceNames.CORE_ADDRESS + ActiveMQDestination.createTopicAddressFromName(name)); if (addressControl != null) { for (String queueName : addressControl.getQueueNames()) @@ -954,7 +954,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback Binding binding = server.getPostOffice().getBinding(new SimpleString(queueName)); if (binding == null) { - HornetQJMSServerLogger.LOGGER.noQueueOnTopic(queueName, name); + ActiveMQJMSServerLogger.LOGGER.noQueueOnTopic(queueName, name); continue; } @@ -997,7 +997,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback String... jndiBindings) throws Exception { checkInitialised(); - HornetQConnectionFactory cf = connectionFactories.get(name); + ActiveMQConnectionFactory cf = connectionFactories.get(name); if (cf == null) { ConnectionFactoryConfiguration configuration = new ConnectionFactoryConfigurationImpl() @@ -1047,7 +1047,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback String... jndiBindings) throws Exception { checkInitialised(); - HornetQConnectionFactory cf = connectionFactories.get(name); + ActiveMQConnectionFactory cf = connectionFactories.get(name); if (cf == null) { ConnectionFactoryConfiguration configuration = new ConnectionFactoryConfigurationImpl() @@ -1126,7 +1126,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback final String... jndiBindings) throws Exception { checkInitialised(); - HornetQConnectionFactory cf = connectionFactories.get(name); + ActiveMQConnectionFactory cf = connectionFactories.get(name); if (cf == null) { ConnectionFactoryConfiguration configuration = new ConnectionFactoryConfigurationImpl() @@ -1175,7 +1175,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback final String... jndiBindings) throws Exception { checkInitialised(); - HornetQConnectionFactory cf = connectionFactories.get(name); + ActiveMQConnectionFactory cf = connectionFactories.get(name); if (cf == null) { ConnectionFactoryConfiguration configuration = new ConnectionFactoryConfigurationImpl() @@ -1187,18 +1187,18 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } } - public synchronized HornetQConnectionFactory recreateCF(String name, ConnectionFactoryConfiguration cf) throws Exception + public synchronized ActiveMQConnectionFactory recreateCF(String name, ConnectionFactoryConfiguration cf) throws Exception { List jndi = connectionFactoryJNDI.get(name); if (jndi == null) { - throw HornetQJMSServerBundle.BUNDLE.cfDoesntExist(name); + throw ActiveMQJMSServerBundle.BUNDLE.cfDoesntExist(name); } String[] usedJNDI = jndi.toArray(new String[jndi.size()]); - HornetQConnectionFactory realCF = internalCreateCFPOJO(cf); + ActiveMQConnectionFactory realCF = internalCreateCFPOJO(cf); if (cf.isPersisted()) { @@ -1232,7 +1232,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback { checkJNDI(jndi); - HornetQConnectionFactory cf = internalCreateCF(storeConfig, cfConfig); + ActiveMQConnectionFactory cf = internalCreateCF(storeConfig, cfConfig); ArrayList bindings = new ArrayList(); @@ -1270,7 +1270,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } catch (Exception e) { - HornetQJMSServerLogger.LOGGER.warn("Failed to send notification : " + notif); + ActiveMQJMSServerLogger.LOGGER.warn("Failed to send notification : " + notif); } } @@ -1308,27 +1308,27 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } else { - HornetQQueue hqQueue = HornetQDestination.createQueue(queueName); + ActiveMQQueue activeMQQueue = ActiveMQDestination.createQueue(queueName); // Convert from JMS selector to core filter String coreFilterString = null; if (selectorString != null) { - coreFilterString = SelectorTranslator.convertToHornetQFilterString(selectorString); + coreFilterString = SelectorTranslator.convertToActiveMQFilterString(selectorString); } - Queue queue = server.deployQueue(SimpleString.toSimpleString(hqQueue.getAddress()), - SimpleString.toSimpleString(hqQueue.getAddress()), + Queue queue = server.deployQueue(SimpleString.toSimpleString(activeMQQueue.getAddress()), + SimpleString.toSimpleString(activeMQQueue.getAddress()), SimpleString.toSimpleString(coreFilterString), durable, false); - queues.put(queueName, hqQueue); + queues.put(queueName, activeMQQueue); this.recoverJndiBindings(queueName, PersistedType.Queue); - jmsManagementService.registerQueue(hqQueue, queue); + jmsManagementService.registerQueue(activeMQQueue, queue); return true; } @@ -1351,22 +1351,22 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } else { - HornetQTopic hqTopic = HornetQDestination.createTopic(topicName); + ActiveMQTopic activeMQTopic = ActiveMQDestination.createTopic(topicName); // We create a dummy subscription on the topic, that never receives messages - this is so we can perform JMS // checks when routing messages to a topic that // does not exist - otherwise we would not be able to distinguish from a non existent topic and one with no // subscriptions - core has no notion of a topic - server.deployQueue(SimpleString.toSimpleString(hqTopic.getAddress()), - SimpleString.toSimpleString(hqTopic.getAddress()), + server.deployQueue(SimpleString.toSimpleString(activeMQTopic.getAddress()), + SimpleString.toSimpleString(activeMQTopic.getAddress()), SimpleString.toSimpleString(JMSServerManagerImpl.REJECT_FILTER), true, false); - topics.put(topicName, hqTopic); + topics.put(topicName, activeMQTopic); this.recoverJndiBindings(topicName, PersistedType.Topic); - jmsManagementService.registerTopic(hqTopic); + jmsManagementService.registerTopic(activeMQTopic); return true; } @@ -1376,12 +1376,12 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback * @param cfConfig * @throws Exception */ - private HornetQConnectionFactory internalCreateCF(final boolean persisted, + private ActiveMQConnectionFactory internalCreateCF(final boolean persisted, final ConnectionFactoryConfiguration cfConfig) throws Exception { checkInitialised(); - HornetQConnectionFactory cf = connectionFactories.get(cfConfig.getName()); + ActiveMQConnectionFactory cf = connectionFactories.get(cfConfig.getName()); if (cf == null) { @@ -1400,9 +1400,9 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback * @return * @throws org.apache.activemq.api.core.ActiveMQException */ - protected HornetQConnectionFactory internalCreateCFPOJO(final ConnectionFactoryConfiguration cfConfig) throws ActiveMQException + protected ActiveMQConnectionFactory internalCreateCFPOJO(final ConnectionFactoryConfiguration cfConfig) throws ActiveMQException { - HornetQConnectionFactory cf; + ActiveMQConnectionFactory cf; if (cfConfig.getDiscoveryGroupName() != null) { DiscoveryGroupConfiguration groupConfig = server.getConfiguration() @@ -1411,23 +1411,23 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback if (groupConfig == null) { - throw HornetQJMSServerBundle.BUNDLE.discoveryGroupDoesntExist(cfConfig.getDiscoveryGroupName()); + throw ActiveMQJMSServerBundle.BUNDLE.discoveryGroupDoesntExist(cfConfig.getDiscoveryGroupName()); } if (cfConfig.isHA()) { - cf = HornetQJMSClient.createConnectionFactoryWithHA(groupConfig, cfConfig.getFactoryType()); + cf = ActiveMQJMSClient.createConnectionFactoryWithHA(groupConfig, cfConfig.getFactoryType()); } else { - cf = HornetQJMSClient.createConnectionFactoryWithoutHA(groupConfig, cfConfig.getFactoryType()); + cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(groupConfig, cfConfig.getFactoryType()); } } else { if (cfConfig.getConnectorNames() == null || cfConfig.getConnectorNames().size() == 0) { - throw HornetQJMSServerBundle.BUNDLE.noConnectorNameOnCF(); + throw ActiveMQJMSServerBundle.BUNDLE.noConnectorNameOnCF(); } TransportConfiguration[] configs = new TransportConfiguration[cfConfig.getConnectorNames().size()]; @@ -1438,7 +1438,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback TransportConfiguration connector = server.getConfiguration().getConnectorConfigurations().get(name); if (connector == null) { - throw HornetQJMSServerBundle.BUNDLE.noConnectorNameConfiguredOnCF(name); + throw ActiveMQJMSServerBundle.BUNDLE.noConnectorNameConfiguredOnCF(name); } correctInvalidNettyConnectorHost(connector); configs[count++] = connector; @@ -1446,11 +1446,11 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback if (cfConfig.isHA()) { - cf = HornetQJMSClient.createConnectionFactoryWithHA(cfConfig.getFactoryType(), configs); + cf = ActiveMQJMSClient.createConnectionFactoryWithHA(cfConfig.getFactoryType(), configs); } else { - cf = HornetQJMSClient.createConnectionFactoryWithoutHA(cfConfig.getFactoryType(), configs); + cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(cfConfig.getFactoryType(), configs); } } @@ -1547,42 +1547,42 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback public String[] listRemoteAddresses() throws Exception { checkInitialised(); - return server.getHornetQServerControl().listRemoteAddresses(); + return server.getActiveMQServerControl().listRemoteAddresses(); } public String[] listRemoteAddresses(final String ipAddress) throws Exception { checkInitialised(); - return server.getHornetQServerControl().listRemoteAddresses(ipAddress); + return server.getActiveMQServerControl().listRemoteAddresses(ipAddress); } public boolean closeConnectionsForAddress(final String ipAddress) throws Exception { checkInitialised(); - return server.getHornetQServerControl().closeConnectionsForAddress(ipAddress); + return server.getActiveMQServerControl().closeConnectionsForAddress(ipAddress); } public boolean closeConsumerConnectionsForAddress(final String address) throws Exception { checkInitialised(); - return server.getHornetQServerControl().closeConsumerConnectionsForAddress(address); + return server.getActiveMQServerControl().closeConsumerConnectionsForAddress(address); } public boolean closeConnectionsForUser(final String userName) throws Exception { checkInitialised(); - return server.getHornetQServerControl().closeConnectionsForUser(userName); + return server.getActiveMQServerControl().closeConnectionsForUser(userName); } public String[] listConnectionIDs() throws Exception { - return server.getHornetQServerControl().listConnectionIDs(); + return server.getActiveMQServerControl().listConnectionIDs(); } public String[] listSessions(final String connectionID) throws Exception { checkInitialised(); - return server.getHornetQServerControl().listSessions(connectionID); + return server.getActiveMQServerControl().listSessions(connectionID); } public String listPreparedTransactionDetailsAsJSON() throws Exception @@ -1797,7 +1797,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } catch (Exception e) { - HornetQJMSServerLogger.LOGGER.jndiUnbindError(e, key); + ActiveMQJMSServerLogger.LOGGER.jndiUnbindError(e, key); } } } @@ -1924,7 +1924,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } else { - HornetQJMSServerLogger.LOGGER.serverCachingCommand(runnable); + ActiveMQJMSServerLogger.LOGGER.serverCachingCommand(runnable); cachedCommands.add(runnable); return false; } @@ -1940,7 +1940,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } catch (Exception e) { - HornetQJMSServerLogger.LOGGER.jmsServerError(e); + ActiveMQJMSServerLogger.LOGGER.jmsServerError(e); } } @@ -1958,12 +1958,12 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback try { String newHost = InetAddress.getLocalHost().getHostName(); - HornetQJMSServerLogger.LOGGER.invalidHostForConnector(transportConfiguration.getName(), newHost); + ActiveMQJMSServerLogger.LOGGER.invalidHostForConnector(transportConfiguration.getName(), newHost); params.put(TransportConstants.HOST_PROP_NAME, newHost); } catch (UnknownHostException e) { - HornetQJMSServerLogger.LOGGER.failedToCorrectHost(e, transportConfiguration.getName()); + ActiveMQJMSServerLogger.LOGGER.failedToCorrectHost(e, transportConfiguration.getName()); } } } diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/StandaloneNamingServer.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/StandaloneNamingServer.java index 2652990dc7..c060b93c2d 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/StandaloneNamingServer.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/StandaloneNamingServer.java @@ -17,9 +17,9 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import org.apache.activemq.core.server.ActivateCallback; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.jnp.server.Main; import org.jnp.server.NamingBeanImpl; @@ -30,11 +30,11 @@ import org.jnp.server.NamingBeanImpl; * @author Andy Taylor * 11/8/12 */ -public class StandaloneNamingServer implements HornetQComponent +public class StandaloneNamingServer implements ActiveMQComponent { private Main jndiServer; - private HornetQServer server; + private ActiveMQServer server; private NamingBeanImpl namingBean; @@ -48,7 +48,7 @@ public class StandaloneNamingServer implements HornetQComponent private ExecutorService executor; - public StandaloneNamingServer(HornetQServer server) + public StandaloneNamingServer(ActiveMQServer server) { this.server = server; } @@ -117,7 +117,7 @@ public class StandaloneNamingServer implements HornetQComponent } catch (Exception e) { - HornetQServerLogger.LOGGER.unableToStartNamingServer(e); + ActiveMQServerLogger.LOGGER.unableToStartNamingServer(e); } activated = true; @@ -144,7 +144,7 @@ public class StandaloneNamingServer implements HornetQComponent } catch (Exception e) { - HornetQServerLogger.LOGGER.unableToStopNamingServer(e); + ActiveMQServerLogger.LOGGER.unableToStopNamingServer(e); } } if (namingBean != null) diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/management/JMSManagementService.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/management/JMSManagementService.java index 79c81d34d4..3f14f55f29 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/management/JMSManagementService.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/management/JMSManagementService.java @@ -14,9 +14,9 @@ package org.apache.activemq.jms.server.management; import org.apache.activemq.api.jms.management.JMSServerControl; import org.apache.activemq.core.server.Queue; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQQueue; -import org.apache.activemq.jms.client.HornetQTopic; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQQueue; +import org.apache.activemq.jms.client.ActiveMQTopic; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration; @@ -31,15 +31,15 @@ public interface JMSManagementService void unregisterJMSServer() throws Exception; - void registerQueue(HornetQQueue queue, Queue serverQueue) throws Exception; + void registerQueue(ActiveMQQueue queue, Queue serverQueue) throws Exception; void unregisterQueue(String name) throws Exception; - void registerTopic(HornetQTopic topic) throws Exception; + void registerTopic(ActiveMQTopic topic) throws Exception; void unregisterTopic(String name) throws Exception; - void registerConnectionFactory(String name, ConnectionFactoryConfiguration config, HornetQConnectionFactory connectionFactory) throws Exception; + void registerConnectionFactory(String name, ConnectionFactoryConfiguration config, ActiveMQConnectionFactory connectionFactory) throws Exception; void unregisterConnectionFactory(String name) throws Exception; diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/management/impl/JMSManagementServiceImpl.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/management/impl/JMSManagementServiceImpl.java index 151a20d5d9..650f97e0db 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/management/impl/JMSManagementServiceImpl.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/management/impl/JMSManagementServiceImpl.java @@ -23,12 +23,12 @@ import org.apache.activemq.api.jms.management.JMSServerControl; import org.apache.activemq.api.jms.management.TopicControl; import org.apache.activemq.core.messagecounter.MessageCounter; import org.apache.activemq.core.messagecounter.MessageCounterManager; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.management.ManagementService; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQQueue; -import org.apache.activemq.jms.client.HornetQTopic; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQQueue; +import org.apache.activemq.jms.client.ActiveMQTopic; import org.apache.activemq.jms.management.impl.JMSConnectionFactoryControlImpl; import org.apache.activemq.jms.management.impl.JMSQueueControlImpl; import org.apache.activemq.jms.management.impl.JMSServerControlImpl; @@ -54,7 +54,7 @@ public class JMSManagementServiceImpl implements JMSManagementService // Static -------------------------------------------------------- - public JMSManagementServiceImpl(final ManagementService managementService, final HornetQServer server, final JMSServerManager jmsServerManager) + public JMSManagementServiceImpl(final ManagementService managementService, final ActiveMQServer server, final JMSServerManager jmsServerManager) { this.managementService = managementService; this.jmsServerManager = jmsServerManager; @@ -80,7 +80,7 @@ public class JMSManagementServiceImpl implements JMSManagementService managementService.unregisterFromRegistry(ResourceNames.JMS_SERVER); } - public synchronized void registerQueue(final HornetQQueue queue, final Queue serverQueue) throws Exception + public synchronized void registerQueue(final ActiveMQQueue queue, final Queue serverQueue) throws Exception { QueueControl coreQueueControl = (QueueControl)managementService.getResource(ResourceNames.CORE_QUEUE + queue.getAddress()); MessageCounterManager messageCounterManager = managementService.getMessageCounterManager(); @@ -104,7 +104,7 @@ public class JMSManagementServiceImpl implements JMSManagementService managementService.unregisterFromRegistry(ResourceNames.JMS_QUEUE + name); } - public synchronized void registerTopic(final HornetQTopic topic) throws Exception + public synchronized void registerTopic(final ActiveMQTopic topic) throws Exception { ObjectName objectName = managementService.getObjectNameBuilder().getJMSTopicObjectName(topic.getTopicName()); AddressControl addressControl = (AddressControl)managementService.getResource(ResourceNames.CORE_ADDRESS + topic.getAddress()); @@ -122,7 +122,7 @@ public class JMSManagementServiceImpl implements JMSManagementService public synchronized void registerConnectionFactory(final String name, final ConnectionFactoryConfiguration cfConfig, - final HornetQConnectionFactory connectionFactory) throws Exception + final ActiveMQConnectionFactory connectionFactory) throws Exception { ObjectName objectName = managementService.getObjectNameBuilder().getConnectionFactoryObjectName(name); JMSConnectionFactoryControlImpl control = new JMSConnectionFactoryControlImpl(cfConfig, connectionFactory, jmsServerManager, name); diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/HornetQRecoveryRegistry.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/ActiveMQRecoveryRegistry.java similarity index 75% rename from activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/HornetQRecoveryRegistry.java rename to activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/ActiveMQRecoveryRegistry.java index d9b5c867e7..797fe83f39 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/HornetQRecoveryRegistry.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/ActiveMQRecoveryRegistry.java @@ -20,22 +20,22 @@ import java.util.concurrent.ConcurrentHashMap; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.jms.server.HornetQJMSServerLogger; +import org.apache.activemq.jms.server.ActiveMQJMSServerLogger; import org.jboss.tm.XAResourceRecovery; /** *

This class is used by the Resource Adapter to register RecoveryDiscovery, which is based on the {@link XARecoveryConfig}

- *

Each outbound or inboud connection will pass the configuration here through by calling the method {@link HornetQRecoveryRegistry#register(XARecoveryConfig)}

- *

Later the {@link RecoveryDiscovery} will call {@link HornetQRecoveryRegistry#nodeUp(String, Pair, String, String)} + *

Each outbound or inboud connection will pass the configuration here through by calling the method {@link ActiveMQRecoveryRegistry#register(XARecoveryConfig)}

+ *

Later the {@link RecoveryDiscovery} will call {@link ActiveMQRecoveryRegistry#nodeUp(String, Pair, String, String)} * so we will keep a track of nodes on the cluster * or nodes where this server is connected to.

* * @author clebertsuconic */ -public class HornetQRecoveryRegistry implements XAResourceRecovery +public class ActiveMQRecoveryRegistry implements XAResourceRecovery { - private static final HornetQRecoveryRegistry theInstance = new HornetQRecoveryRegistry(); + private static final ActiveMQRecoveryRegistry theInstance = new ActiveMQRecoveryRegistry(); private final ConcurrentHashMap configSet = new ConcurrentHashMap(); @@ -43,14 +43,14 @@ public class HornetQRecoveryRegistry implements XAResourceRecovery * The list by server id and resource adapter wrapper, what will actually be calling recovery. * This will be returned by getXAResources */ - private final ConcurrentHashMap recoveries = new ConcurrentHashMap(); + private final ConcurrentHashMap recoveries = new ConcurrentHashMap(); /** * In case of failures, we retry on the next getXAResources */ private final Set failedDiscoverySet = new HashSet(); - private HornetQRecoveryRegistry() + private ActiveMQRecoveryRegistry() { } @@ -63,30 +63,30 @@ public class HornetQRecoveryRegistry implements XAResourceRecovery { checkFailures(); - HornetQXAResourceWrapper[] resourceArray = new HornetQXAResourceWrapper[recoveries.size()]; + ActiveMQXAResourceWrapper[] resourceArray = new ActiveMQXAResourceWrapper[recoveries.size()]; resourceArray = recoveries.values().toArray(resourceArray); - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug("\n======================================================================================="); - HornetQJMSServerLogger.LOGGER.debug("Returning the following list on getXAREsources:"); - for (Map.Entry entry : recoveries.entrySet()) + ActiveMQJMSServerLogger.LOGGER.debug("\n======================================================================================="); + ActiveMQJMSServerLogger.LOGGER.debug("Returning the following list on getXAREsources:"); + for (Map.Entry entry : recoveries.entrySet()) { - HornetQJMSServerLogger.LOGGER.debug("server-id=" + entry.getKey() + ", value=" + entry.getValue()); + ActiveMQJMSServerLogger.LOGGER.debug("server-id=" + entry.getKey() + ", value=" + entry.getValue()); } - HornetQJMSServerLogger.LOGGER.debug("=======================================================================================\n"); + ActiveMQJMSServerLogger.LOGGER.debug("=======================================================================================\n"); } return resourceArray; } catch (Throwable e) { - HornetQJMSServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQJMSServerLogger.LOGGER.warn(e.getMessage(), e); return new XAResource[]{}; } } - public static HornetQRecoveryRegistry getInstance() + public static ActiveMQRecoveryRegistry getInstance() { return theInstance; } @@ -138,9 +138,9 @@ public class HornetQRecoveryRegistry implements XAResourceRecovery { recoveryDiscovery.stop(); } - for (HornetQXAResourceWrapper hornetQXAResourceWrapper : recoveries.values()) + for (ActiveMQXAResourceWrapper activeMQXAResourceWrapper : recoveries.values()) { - hornetQXAResourceWrapper.close(); + activeMQXAResourceWrapper.close(); } recoveries.clear(); configSet.clear(); @@ -153,7 +153,7 @@ public class HornetQRecoveryRegistry implements XAResourceRecovery */ public void failedDiscovery(RecoveryDiscovery failedDiscovery) { - HornetQJMSServerLogger.LOGGER.debug("RecoveryDiscovery being set to restart:" + failedDiscovery); + ActiveMQJMSServerLogger.LOGGER.debug("RecoveryDiscovery being set to restart:" + failedDiscovery); synchronized (failedDiscoverySet) { failedDiscoverySet.add(failedDiscovery); @@ -174,16 +174,16 @@ public class HornetQRecoveryRegistry implements XAResourceRecovery if (recoveries.get(nodeID) == null) { - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug(nodeID + " being registered towards " + networkConfiguration); + ActiveMQJMSServerLogger.LOGGER.debug(nodeID + " being registered towards " + networkConfiguration); } XARecoveryConfig config = new XARecoveryConfig(true, extractTransportConfiguration(networkConfiguration), username, password); - HornetQXAResourceWrapper wrapper = new HornetQXAResourceWrapper(config); + ActiveMQXAResourceWrapper wrapper = new ActiveMQXAResourceWrapper(config); recoveries.putIfAbsent(nodeID, wrapper); } } @@ -210,7 +210,7 @@ public class HornetQRecoveryRegistry implements XAResourceRecovery { // This shouldn't happen on a regular scenario, however when this retry happens this needs // to be done on a new thread - Thread t = new Thread("HornetQ Recovery Discovery Reinitialization") + Thread t = new Thread("ActiveMQ Recovery Discovery Reinitialization") { @Override public void run() @@ -219,12 +219,12 @@ public class HornetQRecoveryRegistry implements XAResourceRecovery { try { - HornetQJMSServerLogger.LOGGER.debug("Retrying discovery " + discovery); + ActiveMQJMSServerLogger.LOGGER.debug("Retrying discovery " + discovery); discovery.start(true); } catch (Throwable e) { - HornetQJMSServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQJMSServerLogger.LOGGER.warn(e.getMessage(), e); } } } diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/HornetQRegistryBase.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/ActiveMQRegistryBase.java similarity index 75% rename from activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/HornetQRegistryBase.java rename to activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/ActiveMQRegistryBase.java index c9381bb53e..d232831b58 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/HornetQRegistryBase.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/ActiveMQRegistryBase.java @@ -19,18 +19,18 @@ import org.jboss.tm.XAResourceRecoveryRegistry; /** * This class is a base class for the integration layer where * This class is used on integration points and this is just a bridge to the real registry at - * {@link HornetQRecoveryRegistry} + * {@link ActiveMQRecoveryRegistry} * * @author Clebert * * */ -public abstract class HornetQRegistryBase +public abstract class ActiveMQRegistryBase { private final AtomicBoolean started = new AtomicBoolean(false); - public HornetQRegistryBase() + public ActiveMQRegistryBase() { } @@ -40,7 +40,7 @@ public abstract class HornetQRegistryBase public void register(final XARecoveryConfig resourceConfig) { init(); - HornetQRecoveryRegistry.getInstance().register(resourceConfig); + ActiveMQRecoveryRegistry.getInstance().register(resourceConfig); } @@ -48,15 +48,15 @@ public abstract class HornetQRegistryBase public void unRegister(final XARecoveryConfig resourceConfig) { init(); - HornetQRecoveryRegistry.getInstance().unRegister(resourceConfig); + ActiveMQRecoveryRegistry.getInstance().unRegister(resourceConfig); } public void stop() { if (started.compareAndSet(true, false) && getTMRegistry() != null) { - getTMRegistry().removeXAResourceRecovery(HornetQRecoveryRegistry.getInstance()); - HornetQRecoveryRegistry.getInstance().stop(); + getTMRegistry().removeXAResourceRecovery(ActiveMQRecoveryRegistry.getInstance()); + ActiveMQRecoveryRegistry.getInstance().stop(); } } @@ -64,7 +64,7 @@ public abstract class HornetQRegistryBase { if (started.compareAndSet(false, true) && getTMRegistry() != null) { - getTMRegistry().addXAResourceRecovery(HornetQRecoveryRegistry.getInstance()); + getTMRegistry().addXAResourceRecovery(ActiveMQRecoveryRegistry.getInstance()); } } diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/HornetQXAResourceRecovery.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/ActiveMQXAResourceRecovery.java similarity index 78% rename from activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/HornetQXAResourceRecovery.java rename to activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/ActiveMQXAResourceRecovery.java index 448e6b1c10..1cd59f47e9 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/HornetQXAResourceRecovery.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/ActiveMQXAResourceRecovery.java @@ -18,7 +18,7 @@ import java.util.Map; import com.arjuna.ats.jta.recovery.XAResourceRecovery; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.jms.server.HornetQJMSServerLogger; +import org.apache.activemq.jms.server.ActiveMQJMSServerLogger; /** * A XAResourceRecovery instance that can be used to recover any JMS provider. @@ -28,47 +28,47 @@ import org.apache.activemq.jms.server.HornetQJMSServerLogger; *

* To enable this add the following to the jbossts-properties file *

- * <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.HORNETQ1"
- *                 value="org.apache.activemq.jms.server.recovery.HornetQXAResourceRecovery;org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory"/>
+ * <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.ACTIVEMQ1"
+ *                 value="org.apache.activemq.jms.server.recovery.ActiveMQXAResourceRecovery;org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory"/>
  * 
*

- * you'll need something like this if the HornetQ Server is remote + * you'll need something like this if the ActiveMQ Server is remote *

- *      <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.HORNETQ2"
- *                  value="org.apache.activemq.jms.server.recovery.HornetQXAResourceRecovery;org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory,guest,guest,host=localhost,port=5445"/>
+ *      <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.ACTIVEMQ2"
+ *                  value="org.apache.activemq.jms.server.recovery.ActiveMQXAResourceRecovery;org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory,guest,guest,host=localhost,port=5445"/>
  * 
*

- * you'll need something like this if the HornetQ Server is remote and has failover configured + * you'll need something like this if the ActiveMQ Server is remote and has failover configured *

- *             <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.HORNETQ2"
- *                       value="org.apache.activemq.jms.server.recovery.HornetQXAResourceRecovery;org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory,guest,guest,host=localhost,port=5445;org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory,guest,guest,host=localhost2,port=5446"/>
+ *             <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.ACTIVEMQ2"
+ *                       value="org.apache.activemq.jms.server.recovery.ActiveMQXAResourceRecovery;org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory,guest,guest,host=localhost,port=5445;org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory,guest,guest,host=localhost2,port=5446"/>
  * 
* * @author Tim Fox * @author Andy Taylor * @version $Revision: 1.1 $ */ -public class HornetQXAResourceRecovery implements XAResourceRecovery +public class ActiveMQXAResourceRecovery implements XAResourceRecovery { - private final boolean trace = HornetQJMSServerLogger.LOGGER.isTraceEnabled(); + private final boolean trace = ActiveMQJMSServerLogger.LOGGER.isTraceEnabled(); private boolean hasMore; - private HornetQXAResourceWrapper res; + private ActiveMQXAResourceWrapper res; - public HornetQXAResourceRecovery() + public ActiveMQXAResourceRecovery() { if (trace) { - HornetQJMSServerLogger.LOGGER.trace("Constructing HornetQXAResourceRecovery"); + ActiveMQJMSServerLogger.LOGGER.trace("Constructing ActiveMQXAResourceRecovery"); } } public boolean initialise(final String config) { - if (HornetQJMSServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isTraceEnabled()) { - HornetQJMSServerLogger.LOGGER.trace(this + " intialise: " + config); + ActiveMQJMSServerLogger.LOGGER.trace(this + " intialise: " + config); } String[] configs = config.split(";"); @@ -86,11 +86,11 @@ public class HornetQXAResourceRecovery implements XAResourceRecovery } - res = new HornetQXAResourceWrapper(xaRecoveryConfigs); + res = new ActiveMQXAResourceWrapper(xaRecoveryConfigs); - if (HornetQJMSServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isTraceEnabled()) { - HornetQJMSServerLogger.LOGGER.trace(this + " initialised"); + ActiveMQJMSServerLogger.LOGGER.trace(this + " initialised"); } return true; @@ -98,9 +98,9 @@ public class HornetQXAResourceRecovery implements XAResourceRecovery public boolean hasMoreResources() { - if (HornetQJMSServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isTraceEnabled()) { - HornetQJMSServerLogger.LOGGER.trace(this + " hasMoreResources"); + ActiveMQJMSServerLogger.LOGGER.trace(this + " hasMoreResources"); } /* @@ -124,9 +124,9 @@ public class HornetQXAResourceRecovery implements XAResourceRecovery public XAResource getXAResource() { - if (HornetQJMSServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isTraceEnabled()) { - HornetQJMSServerLogger.LOGGER.trace(this + " getXAResource"); + ActiveMQJMSServerLogger.LOGGER.trace(this + " getXAResource"); } return res; diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/HornetQXAResourceWrapper.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/ActiveMQXAResourceWrapper.java similarity index 71% rename from activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/HornetQXAResourceWrapper.java rename to activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/ActiveMQXAResourceWrapper.java index 293137b5e9..04a74575e2 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/HornetQXAResourceWrapper.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/ActiveMQXAResourceWrapper.java @@ -23,10 +23,10 @@ import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.client.SessionFailureListener; -import org.apache.activemq.jms.server.HornetQJMSServerLogger; +import org.apache.activemq.jms.server.ActiveMQJMSServerLogger; /** * XAResourceWrapper. @@ -34,7 +34,7 @@ import org.apache.activemq.jms.server.HornetQJMSServerLogger; * Mainly from org.jboss.server.XAResourceWrapper from the JBoss AS server module * * The reason why we don't use that class directly is that it assumes on failure of connection - * the RM_FAIL or RM_ERR is thrown, but in HornetQ we throw XA_RETRY since we want the recovery manager to be able + * the RM_FAIL or RM_ERR is thrown, but in ActiveMQ we throw XA_RETRY since we want the recovery manager to be able * to retry on failure without having to manually retry * * @author Adrian Brock @@ -44,7 +44,7 @@ import org.apache.activemq.jms.server.HornetQJMSServerLogger; * * @version $Revision: 45341 $ */ -public class HornetQXAResourceWrapper implements XAResource, SessionFailureListener +public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureListener { /** The state lock */ private static final Object lock = new Object(); @@ -57,13 +57,13 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe private XARecoveryConfig[] xaRecoveryConfigs; - public HornetQXAResourceWrapper(XARecoveryConfig... xaRecoveryConfigs) + public ActiveMQXAResourceWrapper(XARecoveryConfig... xaRecoveryConfigs) { this.xaRecoveryConfigs = xaRecoveryConfigs; - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug("Recovery configured with " + Arrays.toString(xaRecoveryConfigs) + + ActiveMQJMSServerLogger.LOGGER.debug("Recovery configured with " + Arrays.toString(xaRecoveryConfigs) + ", instance=" + System.identityHashCode(this)); } @@ -73,25 +73,25 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe { XAResource xaResource = getDelegate(false); - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug("looking for recover at " + xaResource + " configuration " + Arrays.toString(this.xaRecoveryConfigs)); + ActiveMQJMSServerLogger.LOGGER.debug("looking for recover at " + xaResource + " configuration " + Arrays.toString(this.xaRecoveryConfigs)); } try { Xid[] xids = xaResource.recover(flag); - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled() && xids != null && xids.length > 0) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled() && xids != null && xids.length > 0) { - HornetQJMSServerLogger.LOGGER.debug("Recovering these following IDs " + Arrays.toString(xids) + " at " + this); + ActiveMQJMSServerLogger.LOGGER.debug("Recovering these following IDs " + Arrays.toString(xids) + " at " + this); } return xids; } catch (XAException e) { - HornetQJMSServerLogger.LOGGER.xaRecoverError(e); + ActiveMQJMSServerLogger.LOGGER.xaRecoverError(e); throw check(e); } } @@ -99,9 +99,9 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe public void commit(final Xid xid, final boolean onePhase) throws XAException { XAResource xaResource = getDelegate(true); - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug("Commit " + xaResource + " xid " + " onePhase=" + onePhase); + ActiveMQJMSServerLogger.LOGGER.debug("Commit " + xaResource + " xid " + " onePhase=" + onePhase); } try { @@ -116,9 +116,9 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe public void rollback(final Xid xid) throws XAException { XAResource xaResource = getDelegate(true); - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug("Rollback " + xaResource + " xid "); + ActiveMQJMSServerLogger.LOGGER.debug("Rollback " + xaResource + " xid "); } try { @@ -133,9 +133,9 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe public void forget(final Xid xid) throws XAException { XAResource xaResource = getDelegate(false); - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug("Forget " + xaResource + " xid "); + ActiveMQJMSServerLogger.LOGGER.debug("Forget " + xaResource + " xid "); } try @@ -150,9 +150,9 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe public boolean isSameRM(XAResource xaRes) throws XAException { - if (xaRes instanceof HornetQXAResourceWrapper) + if (xaRes instanceof ActiveMQXAResourceWrapper) { - xaRes = ((HornetQXAResourceWrapper)xaRes).getDelegate(false); + xaRes = ((ActiveMQXAResourceWrapper)xaRes).getDelegate(false); } XAResource xaResource = getDelegate(false); @@ -169,9 +169,9 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe public int prepare(final Xid xid) throws XAException { XAResource xaResource = getDelegate(true); - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug("prepare " + xaResource + " xid "); + ActiveMQJMSServerLogger.LOGGER.debug("prepare " + xaResource + " xid "); } try { @@ -186,9 +186,9 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe public void start(final Xid xid, final int flags) throws XAException { XAResource xaResource = getDelegate(false); - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug("start " + xaResource + " xid "); + ActiveMQJMSServerLogger.LOGGER.debug("start " + xaResource + " xid "); } try { @@ -203,9 +203,9 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe public void end(final Xid xid, final int flags) throws XAException { XAResource xaResource = getDelegate(false); - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug("end " + xaResource + " xid "); + ActiveMQJMSServerLogger.LOGGER.debug("end " + xaResource + " xid "); } try { @@ -220,9 +220,9 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe public int getTransactionTimeout() throws XAException { XAResource xaResource = getDelegate(false); - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug("getTransactionTimeout " + xaResource + " xid "); + ActiveMQJMSServerLogger.LOGGER.debug("getTransactionTimeout " + xaResource + " xid "); } try { @@ -237,9 +237,9 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe public boolean setTransactionTimeout(final int seconds) throws XAException { XAResource xaResource = getDelegate(false); - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug("setTransactionTimeout " + xaResource + " xid "); + ActiveMQJMSServerLogger.LOGGER.debug("setTransactionTimeout " + xaResource + " xid "); } try { @@ -255,14 +255,14 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe { if (me.getType() == ActiveMQExceptionType.DISCONNECTED) { - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug("being disconnected for server shutdown", me); + ActiveMQJMSServerLogger.LOGGER.debug("being disconnected for server shutdown", me); } } else { - HornetQJMSServerLogger.LOGGER.xaRecoverConnectionError(me, csf); + ActiveMQJMSServerLogger.LOGGER.xaRecoverConnectionError(me, csf); } close(); } @@ -308,9 +308,9 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe { xae.initCause(error); } - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug("Cannot get connectionFactory XAResource", xae); + ActiveMQJMSServerLogger.LOGGER.debug("Cannot get connectionFactory XAResource", xae); } throw xae; } @@ -322,9 +322,9 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe { xae.initCause(error); } - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug("Cannot get connectionFactory XAResource", xae); + ActiveMQJMSServerLogger.LOGGER.debug("Cannot get connectionFactory XAResource", xae); } throw xae; } @@ -343,7 +343,7 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe protected XAResource connect() throws Exception { // Do we already have a valid connectionFactory? - synchronized (HornetQXAResourceWrapper.lock) + synchronized (ActiveMQXAResourceWrapper.lock) { if (delegate != null) { @@ -358,9 +358,9 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe { continue; } - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug("Trying to connect recovery on " + xaRecoveryConfig + " of " + Arrays.toString(xaRecoveryConfigs)); + ActiveMQJMSServerLogger.LOGGER.debug("Trying to connect recovery on " + xaRecoveryConfig + " of " + Arrays.toString(xaRecoveryConfigs)); } ClientSession cs = null; @@ -373,11 +373,11 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe // Manual configuration may still use discovery, so we will keep this if (xaRecoveryConfig.getDiscoveryConfiguration() != null) { - serverLocator = HornetQClient.createServerLocator(false, xaRecoveryConfig.getDiscoveryConfiguration()); + serverLocator = ActiveMQClient.createServerLocator(false, xaRecoveryConfig.getDiscoveryConfiguration()); } else { - serverLocator = HornetQClient.createServerLocator(false, xaRecoveryConfig.getTransportConfig()); + serverLocator = ActiveMQClient.createServerLocator(false, xaRecoveryConfig.getTransportConfig()); } serverLocator.disableFinalizeCheck(); csf = serverLocator.createSessionFactory(); @@ -398,10 +398,10 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe } catch (Throwable e) { - HornetQJMSServerLogger.LOGGER.xaRecoverAutoConnectionError(e, xaRecoveryConfig); - if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) + ActiveMQJMSServerLogger.LOGGER.xaRecoverAutoConnectionError(e, xaRecoveryConfig); + if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) { - HornetQJMSServerLogger.LOGGER.debug(e.getMessage(), e); + ActiveMQJMSServerLogger.LOGGER.debug(e.getMessage(), e); } try @@ -411,9 +411,9 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe } catch (Throwable ignored) { - if (HornetQJMSServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQJMSServerLogger.LOGGER.isTraceEnabled()) { - HornetQJMSServerLogger.LOGGER.trace(e.getMessage(), ignored); + ActiveMQJMSServerLogger.LOGGER.trace(e.getMessage(), ignored); } } continue; @@ -421,14 +421,14 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe cs.addFailureListener(this); - synchronized (HornetQXAResourceWrapper.lock) + synchronized (ActiveMQXAResourceWrapper.lock) { delegate = cs; } return delegate; } - HornetQJMSServerLogger.LOGGER.recoveryConnectFailed(Arrays.toString(xaRecoveryConfigs)); + ActiveMQJMSServerLogger.LOGGER.recoveryConnectFailed(Arrays.toString(xaRecoveryConfigs)); throw new ActiveMQNotConnectedException(); } @@ -438,7 +438,7 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe @Override public String toString() { - return "HornetQXAResourceWrapper [serverLocator=" + serverLocator + + return "ActiveMQXAResourceWrapper [serverLocator=" + serverLocator + ", csf=" + csf + ", delegate=" + @@ -458,7 +458,7 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe ServerLocator oldServerLocator = null; ClientSessionFactory oldCSF = null; ClientSession oldDelegate = null; - synchronized (HornetQXAResourceWrapper.lock) + synchronized (ActiveMQXAResourceWrapper.lock) { oldCSF = csf; csf = null; @@ -476,7 +476,7 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe } catch (Throwable ignorable) { - HornetQJMSServerLogger.LOGGER.debug(ignorable.getMessage(), ignorable); + ActiveMQJMSServerLogger.LOGGER.debug(ignorable.getMessage(), ignorable); } } @@ -488,7 +488,7 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe } catch (Throwable ignorable) { - HornetQJMSServerLogger.LOGGER.debug(ignorable.getMessage(), ignorable); + ActiveMQJMSServerLogger.LOGGER.debug(ignorable.getMessage(), ignorable); } } @@ -500,7 +500,7 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe } catch (Throwable ignorable) { - HornetQJMSServerLogger.LOGGER.debug(ignorable.getMessage(), ignorable); + ActiveMQJMSServerLogger.LOGGER.debug(ignorable.getMessage(), ignorable); } } } @@ -515,7 +515,7 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe */ protected XAException check(final XAException e) throws XAException { - HornetQJMSServerLogger.LOGGER.xaRecoveryError(e); + ActiveMQJMSServerLogger.LOGGER.xaRecoveryError(e); // If any exception happened, we close the connection so we may start fresh diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/RecoveryDiscovery.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/RecoveryDiscovery.java index 751036168d..b705db969a 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/RecoveryDiscovery.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/RecoveryDiscovery.java @@ -23,12 +23,12 @@ import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.client.SessionFailureListener; import org.apache.activemq.api.core.client.TopologyMember; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; -import org.apache.activemq.jms.server.HornetQJMSServerLogger; +import org.apache.activemq.jms.server.ActiveMQJMSServerLogger; /** *

This class will have a simple Connection Factory and will listen * for topology updates.

- *

This Discovery is instantiated by {@link HornetQRecoveryRegistry} + *

This Discovery is instantiated by {@link ActiveMQRecoveryRegistry} * * @author clebertsuconic */ @@ -51,7 +51,7 @@ public class RecoveryDiscovery implements SessionFailureListener { if (!started) { - HornetQJMSServerLogger.LOGGER.debug("Starting RecoveryDiscovery on " + config); + ActiveMQJMSServerLogger.LOGGER.debug("Starting RecoveryDiscovery on " + config); started = true; locator = config.createServerLocator(); @@ -65,16 +65,16 @@ public class RecoveryDiscovery implements SessionFailureListener // in case of failure we will retry sessionFactory.addFailureListener(this); - HornetQJMSServerLogger.LOGGER.debug("RecoveryDiscovery started fine on " + config); + ActiveMQJMSServerLogger.LOGGER.debug("RecoveryDiscovery started fine on " + config); } catch (Exception startupError) { if (!retry) { - HornetQJMSServerLogger.LOGGER.xaRecoveryStartError(config); + ActiveMQJMSServerLogger.LOGGER.xaRecoveryStartError(config); } stop(); - HornetQRecoveryRegistry.getInstance().failedDiscovery(this); + ActiveMQRecoveryRegistry.getInstance().failedDiscovery(this); } } @@ -123,7 +123,7 @@ public class RecoveryDiscovery implements SessionFailureListener } catch (Exception ignored) { - HornetQJMSServerLogger.LOGGER.debug(ignored, ignored); + ActiveMQJMSServerLogger.LOGGER.debug(ignored, ignored); } try @@ -132,7 +132,7 @@ public class RecoveryDiscovery implements SessionFailureListener } catch (Exception ignored) { - HornetQJMSServerLogger.LOGGER.debug(ignored, ignored); + ActiveMQJMSServerLogger.LOGGER.debug(ignored, ignored); } sessionFactory = null; @@ -160,7 +160,7 @@ public class RecoveryDiscovery implements SessionFailureListener Pair connector = new Pair(topologyMember.getLive(), topologyMember.getBackup()); - HornetQRecoveryRegistry.getInstance().nodeUp(topologyMember.getNodeId(), connector, + ActiveMQRecoveryRegistry.getInstance().nodeUp(topologyMember.getNodeId(), connector, config.getUsername(), config.getPassword()); } } @@ -180,15 +180,15 @@ public class RecoveryDiscovery implements SessionFailureListener { if (exception.getType() == ActiveMQExceptionType.DISCONNECTED) { - HornetQJMSServerLogger.LOGGER.warn("being disconnected for server shutdown", exception); + ActiveMQJMSServerLogger.LOGGER.warn("being disconnected for server shutdown", exception); } else { - HornetQJMSServerLogger.LOGGER.warn("Notified of connection failure in xa discovery, we will retry on the next recovery", + ActiveMQJMSServerLogger.LOGGER.warn("Notified of connection failure in xa discovery, we will retry on the next recovery", exception); } internalStop(); - HornetQRecoveryRegistry.getInstance().failedDiscovery(this); + ActiveMQRecoveryRegistry.getInstance().failedDiscovery(this); } @Override diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/XARecoveryConfig.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/XARecoveryConfig.java index 6c00917e7c..24e40c00af 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/XARecoveryConfig.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/XARecoveryConfig.java @@ -16,9 +16,9 @@ import java.util.Arrays; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; /** * @@ -40,7 +40,7 @@ public class XARecoveryConfig private final String username; private final String password; - public static XARecoveryConfig newConfig(HornetQConnectionFactory factory, + public static XARecoveryConfig newConfig(ActiveMQConnectionFactory factory, String userName, String password) { @@ -107,11 +107,11 @@ public class XARecoveryConfig { if (getDiscoveryConfiguration() != null) { - return HornetQClient.createServerLocator(isHA(), getDiscoveryConfiguration()); + return ActiveMQClient.createServerLocator(isHA(), getDiscoveryConfiguration()); } else { - return HornetQClient.createServerLocator(isHA(), getTransportConfig()); + return ActiveMQClient.createServerLocator(isHA(), getTransportConfig()); } } diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/package-info.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/package-info.java index 7d0ae6e294..a44d114f28 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/package-info.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/recovery/package-info.java @@ -12,10 +12,10 @@ */ /** * This package is used to locate resources and connectors along the cluster set - * I - JCA Connection Factories or InBound MDBs will call HornetQRegistryBase::register(XARecoveryConfig) + * I - JCA Connection Factories or InBound MDBs will call ActiveMQRegistryBase::register(XARecoveryConfig) * II - For each XARecoveryConfig the RegistryBase will instantiate a ResourceDiscoveryUnit which will * connect using that configuration and inform the Registry of any topology members - * III - For each topology member found on the DiscoveryUnits, the RegistryBase will registry a HornetQResourceRecovery + * III - For each topology member found on the DiscoveryUnits, the RegistryBase will registry a ActiveMQResourceRecovery * that will exist per server */ package org.apache.activemq.jms.server.recovery; diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/transaction/JMSTransactionDetail.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/transaction/JMSTransactionDetail.java index 31809a26df..49f61d4354 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/transaction/JMSTransactionDetail.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/transaction/JMSTransactionDetail.java @@ -19,12 +19,12 @@ import javax.transaction.xa.Xid; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.transaction.Transaction; import org.apache.activemq.core.transaction.TransactionDetail; -import org.apache.activemq.jms.client.HornetQBytesMessage; -import org.apache.activemq.jms.client.HornetQMapMessage; -import org.apache.activemq.jms.client.HornetQMessage; -import org.apache.activemq.jms.client.HornetQObjectMessage; -import org.apache.activemq.jms.client.HornetQStreamMessage; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQBytesMessage; +import org.apache.activemq.jms.client.ActiveMQMapMessage; +import org.apache.activemq.jms.client.ActiveMQMessage; +import org.apache.activemq.jms.client.ActiveMQObjectMessage; +import org.apache.activemq.jms.client.ActiveMQStreamMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; /** * A JMSTransactionDetail @@ -46,17 +46,17 @@ public class JMSTransactionDetail extends TransactionDetail int type = msg.getType(); switch (type) { - case HornetQMessage.TYPE: // 0 + case ActiveMQMessage.TYPE: // 0 return "Default"; - case HornetQObjectMessage.TYPE: // 2 + case ActiveMQObjectMessage.TYPE: // 2 return "ObjectMessage"; - case HornetQTextMessage.TYPE: // 3 + case ActiveMQTextMessage.TYPE: // 3 return "TextMessage"; - case HornetQBytesMessage.TYPE: // 4 + case ActiveMQBytesMessage.TYPE: // 4 return "ByteMessage"; - case HornetQMapMessage.TYPE: // 5 + case ActiveMQMapMessage.TYPE: // 5 return "MapMessage"; - case HornetQStreamMessage.TYPE: // 6 + case ActiveMQStreamMessage.TYPE: // 6 return "StreamMessage"; default: return "(Unknown Type)"; @@ -68,7 +68,7 @@ public class JMSTransactionDetail extends TransactionDetail { try { - return HornetQMessage.coreMaptoJMSMap(msg.toMap()); + return ActiveMQMessage.coreMaptoJMSMap(msg.toMap()); } catch (Throwable t) { diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/asyncio/impl/HornetQFileLock.java b/activemq-journal/src/main/java/org/apache/activemq/core/asyncio/impl/ActiveMQFileLock.java similarity index 90% rename from activemq-journal/src/main/java/org/apache/activemq/core/asyncio/impl/HornetQFileLock.java rename to activemq-journal/src/main/java/org/apache/activemq/core/asyncio/impl/ActiveMQFileLock.java index 94546ce653..5fcd3e3a30 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/asyncio/impl/HornetQFileLock.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/asyncio/impl/ActiveMQFileLock.java @@ -19,15 +19,15 @@ import java.nio.channels.FileLock; import org.apache.activemq.core.libaio.Native; /** - * A HornetQFileLock + * A ActiveMQFileLock * @author clebertsuconic */ -public class HornetQFileLock extends FileLock +public class ActiveMQFileLock extends FileLock { private final int handle; - protected HornetQFileLock(final int handle) + protected ActiveMQFileLock(final int handle) { super((FileChannel)null, 0, 0, false); this.handle = handle; diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/asyncio/impl/AsynchronousFileImpl.java b/activemq-journal/src/main/java/org/apache/activemq/core/asyncio/impl/AsynchronousFileImpl.java index f08753763f..c497356ad2 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/asyncio/impl/AsynchronousFileImpl.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/asyncio/impl/AsynchronousFileImpl.java @@ -31,7 +31,7 @@ import org.apache.activemq.core.asyncio.AsynchronousFile; import org.apache.activemq.core.asyncio.BufferCallback; import org.apache.activemq.core.asyncio.IOExceptionListener; import org.apache.activemq.core.libaio.Native; -import org.apache.activemq.journal.HornetQJournalLogger; +import org.apache.activemq.journal.ActiveMQJournalLogger; import org.apache.activemq.utils.ReusableLatch; /** @@ -111,11 +111,11 @@ public class AsynchronousFileImpl implements AsynchronousFile { try { - HornetQJournalLogger.LOGGER.trace(name + " being loaded"); + ActiveMQJournalLogger.LOGGER.trace(name + " being loaded"); System.loadLibrary(name); if (Native.getNativeVersion() != AsynchronousFileImpl.EXPECTED_NATIVE_VERSION) { - HornetQJournalLogger.LOGGER.incompatibleNativeLibrary(); + ActiveMQJournalLogger.LOGGER.incompatibleNativeLibrary(); return false; } else @@ -125,7 +125,7 @@ public class AsynchronousFileImpl implements AsynchronousFile } catch (Throwable e) { - HornetQJournalLogger.LOGGER.debug(name + " -> error loading the native library", e); + ActiveMQJournalLogger.LOGGER.debug(name + " -> error loading the native library", e); return false; } @@ -144,13 +144,13 @@ public class AsynchronousFileImpl implements AsynchronousFile } else { - HornetQJournalLogger.LOGGER.debug("Library " + library + " not found!"); + ActiveMQJournalLogger.LOGGER.debug("Library " + library + " not found!"); } } if (!AsynchronousFileImpl.loaded) { - HornetQJournalLogger.LOGGER.debug("Couldn't locate LibAIO Wrapper"); + ActiveMQJournalLogger.LOGGER.debug("Couldn't locate LibAIO Wrapper"); } } @@ -238,7 +238,7 @@ public class AsynchronousFileImpl implements AsynchronousFile try { - handler = Native.init(AsynchronousFileImpl.class, fileName1, this.maxIO, HornetQJournalLogger.LOGGER); + handler = Native.init(AsynchronousFileImpl.class, fileName1, this.maxIO, ActiveMQJournalLogger.LOGGER); } catch (ActiveMQException e) { @@ -279,12 +279,12 @@ public class AsynchronousFileImpl implements AsynchronousFile while (!pendingWrites.await(60000)) { - HornetQJournalLogger.LOGGER.couldNotGetLock(fileName); + ActiveMQJournalLogger.LOGGER.couldNotGetLock(fileName); } while (!maxIOSemaphore.tryAcquire(maxIO, 60, TimeUnit.SECONDS)) { - HornetQJournalLogger.LOGGER.couldNotGetLock(fileName); + ActiveMQJournalLogger.LOGGER.couldNotGetLock(fileName); } maxIOSemaphore = null; @@ -493,7 +493,7 @@ public class AsynchronousFileImpl implements AsynchronousFile { if (opened) { - HornetQJournalLogger.LOGGER.fileFinalizedWhileOpen(fileName); + ActiveMQJournalLogger.LOGGER.fileFinalizedWhileOpen(fileName); } } @@ -566,7 +566,7 @@ public class AsynchronousFileImpl implements AsynchronousFile final int errorCode, final String errorMessage) { - HornetQJournalLogger.LOGGER.callbackError(errorMessage); + ActiveMQJournalLogger.LOGGER.callbackError(errorMessage); fireExceptionListener(errorCode, errorMessage); @@ -616,7 +616,7 @@ public class AsynchronousFileImpl implements AsynchronousFile */ private void fireExceptionListener(final int errorCode, final String errorMessage) { - HornetQJournalLogger.LOGGER.ioError(errorCode, errorMessage); + ActiveMQJournalLogger.LOGGER.ioError(errorCode, errorMessage); if (ioExceptionListener != null) { ioExceptionListener.onIOException(ActiveMQExceptionType.getType(errorCode).createException(errorMessage), errorMessage); @@ -649,7 +649,7 @@ public class AsynchronousFileImpl implements AsynchronousFile } catch (Exception ex) { - HornetQJournalLogger.LOGGER.errorStartingPoller(ex); + ActiveMQJournalLogger.LOGGER.errorStartingPoller(ex); } } } @@ -683,7 +683,7 @@ public class AsynchronousFileImpl implements AsynchronousFile { if (Native.flock(handle)) { - return new HornetQFileLock(handle); + return new ActiveMQFileLock(handle); } else { diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/Journal.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/Journal.java index c311f70b1a..a174aae70a 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/Journal.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/Journal.java @@ -16,7 +16,7 @@ import java.util.List; import java.util.Map; import org.apache.activemq.core.journal.impl.JournalFile; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; /** * Most methods on the journal provide a blocking version where you select the sync mode and a non @@ -28,7 +28,7 @@ import org.apache.activemq.core.server.HornetQComponent; * @author Clebert Suconic * @see org.apache.activemq.utils.IDGenerator */ -public interface Journal extends HornetQComponent +public interface Journal extends ActiveMQComponent { enum JournalState { diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AIOSequentialFileFactory.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AIOSequentialFileFactory.java index 1313546324..8002155ed7 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AIOSequentialFileFactory.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AIOSequentialFileFactory.java @@ -26,8 +26,8 @@ import org.apache.activemq.core.asyncio.impl.AsynchronousFileImpl; import org.apache.activemq.core.journal.IOCriticalErrorListener; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.libaio.Native; -import org.apache.activemq.journal.HornetQJournalLogger; -import org.apache.activemq.utils.HornetQThreadFactory; +import org.apache.activemq.journal.ActiveMQJournalLogger; +import org.apache.activemq.utils.ActiveMQThreadFactory; /** * A AIOSequentialFileFactory @@ -36,7 +36,7 @@ import org.apache.activemq.utils.HornetQThreadFactory; */ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactory { - private static final boolean trace = HornetQJournalLogger.LOGGER.isTraceEnabled(); + private static final boolean trace = ActiveMQJournalLogger.LOGGER.isTraceEnabled(); private final ReuseBuffersController buffersControl = new ReuseBuffersController(); @@ -47,7 +47,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor // Journal private static void trace(final String message) { - HornetQJournalLogger.LOGGER.trace(message); + ActiveMQJournalLogger.LOGGER.trace(message); } public AIOSequentialFileFactory(final String journalDir) @@ -181,7 +181,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor { super.start(); - pollerExecutor = Executors.newCachedThreadPool(new HornetQThreadFactory("ActiveMQ-AIO-poller-pool" + System.identityHashCode(this), + pollerExecutor = Executors.newCachedThreadPool(new ActiveMQThreadFactory("ActiveMQ-AIO-poller-pool" + System.identityHashCode(this), true, AIOSequentialFileFactory.getThisClassLoader())); @@ -200,7 +200,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor { if (!pollerExecutor.awaitTermination(AbstractSequentialFileFactory.EXECUTOR_TIMEOUT, TimeUnit.SECONDS)) { - HornetQJournalLogger.LOGGER.timeoutOnPollerShutdown(new Exception("trace")); + ActiveMQJournalLogger.LOGGER.timeoutOnPollerShutdown(new Exception("trace")); } } catch (InterruptedException e) diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AbstractSequentialFile.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AbstractSequentialFile.java index aebefb7547..ecf5e8759b 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AbstractSequentialFile.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AbstractSequentialFile.java @@ -29,8 +29,8 @@ import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.journal.SequentialFileFactory; -import org.apache.activemq.journal.HornetQJournalBundle; -import org.apache.activemq.journal.HornetQJournalLogger; +import org.apache.activemq.journal.ActiveMQJournalBundle; +import org.apache.activemq.journal.ActiveMQJournalLogger; /** * A AbstractSequentialFile @@ -100,7 +100,7 @@ public abstract class AbstractSequentialFile implements SequentialFile if (file.exists() && !file.delete()) { - HornetQJournalLogger.LOGGER.errorDeletingFile(this); + ActiveMQJournalLogger.LOGGER.errorDeletingFile(this); } } @@ -108,7 +108,7 @@ public abstract class AbstractSequentialFile implements SequentialFile { try { - HornetQJournalLogger.LOGGER.debug("Copying " + this + " as " + newFileName); + ActiveMQJournalLogger.LOGGER.debug("Copying " + this + " as " + newFileName); if (!newFileName.isOpen()) { newFileName.open(); @@ -175,7 +175,7 @@ public abstract class AbstractSequentialFile implements SequentialFile { if (!file.renameTo(newFile)) { - throw HornetQJournalBundle.BUNDLE.ioRenameFileError(file.getName(), newFileName); + throw ActiveMQJournalBundle.BUNDLE.ioRenameFileError(file.getName(), newFileName); } file = newFile; } @@ -201,7 +201,7 @@ public abstract class AbstractSequentialFile implements SequentialFile while (!donelatch.await(60, TimeUnit.SECONDS)) { - HornetQJournalLogger.LOGGER.couldNotCompleteTask(new Exception("trace"), file.getName()); + ActiveMQJournalLogger.LOGGER.couldNotCompleteTask(new Exception("trace"), file.getName()); } } } @@ -328,7 +328,7 @@ public abstract class AbstractSequentialFile implements SequentialFile } catch (Throwable e) { - HornetQJournalLogger.LOGGER.errorCompletingCallback(e); + ActiveMQJournalLogger.LOGGER.errorCompletingCallback(e); } } } @@ -343,7 +343,7 @@ public abstract class AbstractSequentialFile implements SequentialFile } catch (Throwable e) { - HornetQJournalLogger.LOGGER.errorCallingErrorCallback(e); + ActiveMQJournalLogger.LOGGER.errorCallingErrorCallback(e); } } } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AbstractSequentialFileFactory.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AbstractSequentialFileFactory.java index bec510659c..024b160301 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AbstractSequentialFileFactory.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AbstractSequentialFileFactory.java @@ -28,8 +28,8 @@ import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.core.journal.IOCriticalErrorListener; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.journal.SequentialFileFactory; -import org.apache.activemq.journal.HornetQJournalLogger; -import org.apache.activemq.utils.HornetQThreadFactory; +import org.apache.activemq.journal.ActiveMQJournalLogger; +import org.apache.activemq.utils.ActiveMQThreadFactory; /** * @@ -99,7 +99,7 @@ abstract class AbstractSequentialFileFactory implements SequentialFileFactory { if (!writeExecutor.awaitTermination(AbstractSequentialFileFactory.EXECUTOR_TIMEOUT, TimeUnit.SECONDS)) { - HornetQJournalLogger.LOGGER.timeoutOnWriterShutdown(new Exception("trace")); + ActiveMQJournalLogger.LOGGER.timeoutOnWriterShutdown(new Exception("trace")); } } catch (InterruptedException e) @@ -123,7 +123,7 @@ abstract class AbstractSequentialFileFactory implements SequentialFileFactory if (isSupportsCallbacks()) { - writeExecutor = Executors.newSingleThreadExecutor(new HornetQThreadFactory("HornetQ-Asynchronous-Persistent-Writes" + System.identityHashCode(this), + writeExecutor = Executors.newSingleThreadExecutor(new ActiveMQThreadFactory("ActiveMQ-Asynchronous-Persistent-Writes" + System.identityHashCode(this), true, AbstractSequentialFileFactory.getThisClassLoader())); } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/CompactJournal.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/CompactJournal.java index c2d68abdce..5ffe75d30f 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/CompactJournal.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/CompactJournal.java @@ -29,7 +29,7 @@ public final class CompactJournal // NO_UCD { if (arg.length != 4) { - System.err.println("Use: java -cp hornetq-core.jar org.apache.activemq.core.journal.impl.CompactJournal "); + System.err.println("Use: java -cp activemq-core.jar org.apache.activemq.core.journal.impl.CompactJournal "); return; } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/DummyCallback.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/DummyCallback.java index d0e3fb5679..41500082cc 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/DummyCallback.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/DummyCallback.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl; -import org.apache.activemq.journal.HornetQJournalLogger; +import org.apache.activemq.journal.ActiveMQJournalLogger; /** * A DummyCallback @@ -36,7 +36,7 @@ class DummyCallback extends SyncIOCompletion public void onError(final int errorCode, final String errorMessage) { - HornetQJournalLogger.LOGGER.errorWritingData(new Exception(errorMessage), errorMessage, errorCode); + ActiveMQJournalLogger.LOGGER.errorWritingData(new Exception(errorMessage), errorMessage, errorCode); } @Override diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/ExportJournal.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/ExportJournal.java index 87ff658eb4..ee55d6be91 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/ExportJournal.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/ExportJournal.java @@ -27,7 +27,7 @@ import org.apache.activemq.utils.Base64; * * If you use the main method, use it as * - * Example: java -cp hornetq-core.jar org.apache.activemq.core.journal.impl.ExportJournal /journalDir hornetq-data hq 2 10485760 /tmp/export.dat + * Example: java -cp activemq-core.jar org.apache.activemq.core.journal.impl.ExportJournal /journalDir activemq-data amq 2 10485760 /tmp/export.dat * * @author Clebert Suconic * @@ -50,7 +50,7 @@ public class ExportJournal { if (arg.length != 5) { - System.err.println("Use: java -cp hornetq-core.jar org.apache.activemq.core.journal.impl.ExportJournal "); + System.err.println("Use: java -cp activemq-core.jar org.apache.activemq.core.journal.impl.ExportJournal "); return; } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/ImportJournal.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/ImportJournal.java index d845e47e6f..047efde672 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/ImportJournal.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/ImportJournal.java @@ -40,7 +40,7 @@ import org.apache.activemq.utils.Base64; * Example: * *

- * java -cp hornetq-core.jar org.apache.activemq.core.journal.impl.ExportJournal /journalDir hornetq-data hq 2 10485760 /tmp/export.dat
+ * java -cp activemq-core.jar org.apache.activemq.core.journal.impl.ExportJournal /journalDir activemq-data amq 2 10485760 /tmp/export.dat
  * 
* @author Clebert Suconic */ @@ -61,7 +61,7 @@ public class ImportJournal { if (arg.length != 5) { - System.err.println("Use: java -cp hornetq-core.jar:netty.jar org.apache.activemq.core.journal.impl.ImportJournal "); + System.err.println("Use: java -cp activemq-core.jar:netty.jar org.apache.activemq.core.journal.impl.ImportJournal "); return; } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalCompactor.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalCompactor.java index d582be112b..5cbc654522 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalCompactor.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalCompactor.java @@ -34,7 +34,7 @@ import org.apache.activemq.core.journal.impl.dataformat.JournalCompleteRecordTX. import org.apache.activemq.core.journal.impl.dataformat.JournalDeleteRecordTX; import org.apache.activemq.core.journal.impl.dataformat.JournalInternalRecord; import org.apache.activemq.core.journal.impl.dataformat.JournalRollbackRecordTX; -import org.apache.activemq.journal.HornetQJournalLogger; +import org.apache.activemq.journal.ActiveMQJournalLogger; /** * A JournalCompactor @@ -284,7 +284,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ } catch (Exception e) { - HornetQJournalLogger.LOGGER.errorReplayingCommands(e); + ActiveMQJournalLogger.LOGGER.errorReplayingCommands(e); } } @@ -339,7 +339,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ if (pendingTransactions.get(transactionID) != null) { // Sanity check, this should never happen - HornetQJournalLogger.LOGGER.inconsistencyDuringCompacting(transactionID); + ActiveMQJournalLogger.LOGGER.inconsistencyDuringCompacting(transactionID); } else { @@ -363,7 +363,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ if (newRecords.get(recordID) != null) { // Sanity check, it should never happen - HornetQJournalLogger.LOGGER.inconsistencyDuringCompactingDelete(recordID); + ActiveMQJournalLogger.LOGGER.inconsistencyDuringCompactingDelete(recordID); } } @@ -454,7 +454,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ if (newRecord == null) { - HornetQJournalLogger.LOGGER.compactingWithNoAddRecord(info.id); + ActiveMQJournalLogger.LOGGER.compactingWithNoAddRecord(info.id); } else { @@ -529,7 +529,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ JournalRecord deleteRecord = journal.getRecords().remove(id); if (deleteRecord == null) { - HornetQJournalLogger.LOGGER.noRecordDuringCompactReplay(id); + ActiveMQJournalLogger.LOGGER.noRecordDuringCompactReplay(id); } else { diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalFilesRepository.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalFilesRepository.java index 81b31eb50b..9c7600beee 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalFilesRepository.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalFilesRepository.java @@ -29,7 +29,7 @@ import java.util.concurrent.atomic.AtomicLong; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.journal.SequentialFileFactory; -import org.apache.activemq.journal.HornetQJournalLogger; +import org.apache.activemq.journal.ActiveMQJournalLogger; /** * This is a helper class for the Journal, which will control access to dataFiles, openedFiles and freeFiles @@ -39,7 +39,7 @@ import org.apache.activemq.journal.HornetQJournalLogger; */ public class JournalFilesRepository { - private static final boolean trace = HornetQJournalLogger.LOGGER.isTraceEnabled(); + private static final boolean trace = ActiveMQJournalLogger.LOGGER.isTraceEnabled(); /** * Used to debug the consistency of the journal ordering. @@ -53,7 +53,7 @@ public class JournalFilesRepository // Journal private static void trace(final String message) { - HornetQJournalLogger.LOGGER.trace(message); + ActiveMQJournalLogger.LOGGER.trace(message); } private final SequentialFileFactory fileFactory; @@ -94,7 +94,7 @@ public class JournalFilesRepository } catch (Exception e) { - HornetQJournalLogger.LOGGER.errorPushingFile(e); + ActiveMQJournalLogger.LOGGER.errorPushingFile(e); } } }; @@ -153,7 +153,7 @@ public class JournalFilesRepository } catch (Exception e) { - HornetQJournalLogger.LOGGER.errorClosingFile(e); + ActiveMQJournalLogger.LOGGER.errorClosingFile(e); } } openedFiles.clear(); @@ -256,7 +256,7 @@ public class JournalFilesRepository { if (!dataFiles.remove(file)) { - HornetQJournalLogger.LOGGER.couldNotRemoveFile(file); + ActiveMQJournalLogger.LOGGER.couldNotRemoveFile(file); } } @@ -310,17 +310,17 @@ public class JournalFilesRepository { if (file.getFileID() <= seq) { - HornetQJournalLogger.LOGGER.checkFiles(); - HornetQJournalLogger.LOGGER.info(debugFiles()); - HornetQJournalLogger.LOGGER.seqOutOfOrder(); + ActiveMQJournalLogger.LOGGER.checkFiles(); + ActiveMQJournalLogger.LOGGER.info(debugFiles()); + ActiveMQJournalLogger.LOGGER.seqOutOfOrder(); System.exit(-1); } if (journal.getCurrentFile() != null && journal.getCurrentFile().getFileID() <= file.getFileID()) { - HornetQJournalLogger.LOGGER.checkFiles(); - HornetQJournalLogger.LOGGER.info(debugFiles()); - HornetQJournalLogger.LOGGER.currentFile(file.getFileID(), journal.getCurrentFile().getFileID(), + ActiveMQJournalLogger.LOGGER.checkFiles(); + ActiveMQJournalLogger.LOGGER.info(debugFiles()); + ActiveMQJournalLogger.LOGGER.currentFile(file.getFileID(), journal.getCurrentFile().getFileID(), file.getFileID(), (journal.getCurrentFile() == file)); // throw new RuntimeException ("Check failure!"); @@ -339,9 +339,9 @@ public class JournalFilesRepository { if (file.getFileID() <= lastFreeId) { - HornetQJournalLogger.LOGGER.checkFiles(); - HornetQJournalLogger.LOGGER.info(debugFiles()); - HornetQJournalLogger.LOGGER.fileIdOutOfOrder(); + ActiveMQJournalLogger.LOGGER.checkFiles(); + ActiveMQJournalLogger.LOGGER.info(debugFiles()); + ActiveMQJournalLogger.LOGGER.fileIdOutOfOrder(); throw new RuntimeException("Check failure!"); } @@ -350,9 +350,9 @@ public class JournalFilesRepository if (file.getFileID() < seq) { - HornetQJournalLogger.LOGGER.checkFiles(); - HornetQJournalLogger.LOGGER.info(debugFiles()); - HornetQJournalLogger.LOGGER.fileTooSmall(); + ActiveMQJournalLogger.LOGGER.checkFiles(); + ActiveMQJournalLogger.LOGGER.info(debugFiles()); + ActiveMQJournalLogger.LOGGER.fileTooSmall(); // throw new RuntimeException ("Check failure!"); } @@ -406,7 +406,7 @@ public class JournalFilesRepository } if (calculatedSize != fileSize) { - HornetQJournalLogger.LOGGER.deletingFile(file); + ActiveMQJournalLogger.LOGGER.deletingFile(file); file.getFile().delete(); } else @@ -433,11 +433,11 @@ public class JournalFilesRepository { if (trace) { - HornetQJournalLogger.LOGGER.trace("DataFiles.size() = " + dataFiles.size()); - HornetQJournalLogger.LOGGER.trace("openedFiles.size() = " + openedFiles.size()); - HornetQJournalLogger.LOGGER.trace("minfiles = " + minFiles); - HornetQJournalLogger.LOGGER.trace("Free Files = " + freeFilesCount.get()); - HornetQJournalLogger.LOGGER.trace("File " + file + + ActiveMQJournalLogger.LOGGER.trace("DataFiles.size() = " + dataFiles.size()); + ActiveMQJournalLogger.LOGGER.trace("openedFiles.size() = " + openedFiles.size()); + ActiveMQJournalLogger.LOGGER.trace("minfiles = " + minFiles); + ActiveMQJournalLogger.LOGGER.trace("Free Files = " + freeFilesCount.get()); + ActiveMQJournalLogger.LOGGER.trace("File " + file + " being deleted as freeFiles.size() + dataFiles.size() + 1 + openedFiles.size() (" + (freeFilesCount.get() + dataFiles.size() + 1 + openedFiles.size()) + ") < minFiles (" + minFiles + ")"); @@ -473,7 +473,7 @@ public class JournalFilesRepository /** *

This method will instantly return the opened file, and schedule opening and reclaiming.

*

In case there are no cached opened files, this method will block until the file was opened, - * what would happen only if the system is under heavy load by another system (like a backup system, or a DB sharing the same box as HornetQ).

+ * what would happen only if the system is under heavy load by another system (like a backup system, or a DB sharing the same box as ActiveMQ).

*/ public JournalFile openFile() throws InterruptedException { @@ -498,7 +498,7 @@ public class JournalFilesRepository nextFile = openedFiles.poll(5, TimeUnit.SECONDS); if (nextFile == null) { - HornetQJournalLogger.LOGGER.errorOpeningFile(new Exception("trace")); + ActiveMQJournalLogger.LOGGER.errorOpeningFile(new Exception("trace")); } } @@ -524,7 +524,7 @@ public class JournalFilesRepository if (!openedFiles.offer(nextOpenedFile)) { - HornetQJournalLogger.LOGGER.failedToAddFile(nextOpenedFile); + ActiveMQJournalLogger.LOGGER.failedToAddFile(nextOpenedFile); } } @@ -733,7 +733,7 @@ public class JournalFilesRepository } catch (Throwable e) { - HornetQJournalLogger.LOGGER.errorRetrievingID(e, fileName); + ActiveMQJournalLogger.LOGGER.errorRetrievingID(e, fileName); return 0; } } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalImpl.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalImpl.java index d5ba1cefee..206a9eb6c3 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalImpl.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalImpl.java @@ -62,8 +62,8 @@ import org.apache.activemq.core.journal.impl.dataformat.JournalDeleteRecord; import org.apache.activemq.core.journal.impl.dataformat.JournalDeleteRecordTX; import org.apache.activemq.core.journal.impl.dataformat.JournalInternalRecord; import org.apache.activemq.core.journal.impl.dataformat.JournalRollbackRecordTX; -import org.apache.activemq.journal.HornetQJournalBundle; -import org.apache.activemq.journal.HornetQJournalLogger; +import org.apache.activemq.journal.ActiveMQJournalBundle; +import org.apache.activemq.journal.ActiveMQJournalLogger; import org.apache.activemq.utils.ConcurrentHashSet; import org.apache.activemq.utils.DataConstants; @@ -85,7 +85,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal private static final int[] COMPATIBLE_VERSIONS = new int[]{1}; // Static -------------------------------------------------------- - private static final boolean trace = HornetQJournalLogger.LOGGER.isTraceEnabled(); + private static final boolean trace = ActiveMQJournalLogger.LOGGER.isTraceEnabled(); // This is useful at debug time... // if you set it to true, all the appends, deletes, rollbacks, commits, etc.. are sent to System.out @@ -96,12 +96,12 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal // Journal private static void trace(final String message) { - HornetQJournalLogger.LOGGER.trace(message); + ActiveMQJournalLogger.LOGGER.trace(message); } private static void traceRecord(final String message) { - HornetQJournalLogger.LOGGER.trace(message); + ActiveMQJournalLogger.LOGGER.trace(message); } // The sizes of primitive types @@ -288,7 +288,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal { final int numIts = 100000000; - HornetQJournalLogger.LOGGER.runningJournalBlast(numIts); + ActiveMQJournalLogger.LOGGER.runningJournalBlast(numIts); final CountDownLatch latch = new CountDownLatch(numIts * 2); @@ -747,7 +747,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } catch (Throwable e) { - HornetQJournalLogger.LOGGER.errorReadingFile(e); + ActiveMQJournalLogger.LOGGER.errorReadingFile(e); throw new Exception(e.getMessage(), e); } finally @@ -1329,7 +1329,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal // HORNETQ-482 - Flush deletes only if memory is critical if (recordsToDelete.size() > DELETE_FLUSH && runtime.freeMemory() < runtime.maxMemory() * 0.2) { - HornetQJournalLogger.LOGGER.debug("Flushing deletes during loading, deleteCount = " + recordsToDelete.size()); + ActiveMQJournalLogger.LOGGER.debug("Flushing deletes during loading, deleteCount = " + recordsToDelete.size()); // Clean up when the list is too large, or it won't be possible to load large sets of files // Done as part of JBMESSAGING-1678 Iterator iter = records.iterator(); @@ -1345,7 +1345,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal recordsToDelete.clear(); - HornetQJournalLogger.LOGGER.debug("flush delete done"); + ActiveMQJournalLogger.LOGGER.debug("flush delete done"); } } @@ -1418,7 +1418,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal catch (Throwable e) { errors.incrementAndGet(); - HornetQJournalLogger.LOGGER.errorCompacting(e); + ActiveMQJournalLogger.LOGGER.errorCompacting(e); e.printStackTrace(); } finally @@ -1467,7 +1467,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal try { - HornetQJournalLogger.LOGGER.debug("Starting compacting operation on journal"); + ActiveMQJournalLogger.LOGGER.debug("Starting compacting operation on journal"); onCompactStart(); @@ -1536,7 +1536,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } catch (Throwable e) { - HornetQJournalLogger.LOGGER.compactReadError(file); + ActiveMQJournalLogger.LOGGER.compactReadError(file); throw new Exception("Error on reading compacting for " + file, e); } } @@ -1612,7 +1612,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } else { - HornetQJournalLogger.LOGGER.compactMergeError(newTransaction.getId()); + ActiveMQJournalLogger.LOGGER.compactMergeError(newTransaction.getId()); } } } @@ -1625,7 +1625,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal renameFiles(dataFilesToProcess, newDatafiles); deleteControlFile(controlFile); - HornetQJournalLogger.LOGGER.debug("Finished compacting on journal"); + ActiveMQJournalLogger.LOGGER.debug("Finished compacting on journal"); } finally @@ -1896,7 +1896,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } else { - HornetQJournalLogger.LOGGER.preparedTXIncomplete(transactionID); + ActiveMQJournalLogger.LOGGER.preparedTXIncomplete(transactionID); tx.invalid = true; } } @@ -1946,7 +1946,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } else { - HornetQJournalLogger.LOGGER.txMissingElements(transactionID); + ActiveMQJournalLogger.LOGGER.txMissingElements(transactionID); journalTransaction.forget(); } @@ -2018,7 +2018,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal { if ((!transaction.prepared || transaction.invalid) && replicationSync != JournalState.SYNCING_UP_TO_DATE) { - HornetQJournalLogger.LOGGER.uncomittedTxFound(transaction.transactionID); + ActiveMQJournalLogger.LOGGER.uncomittedTxFound(transaction.transactionID); if (changeData) { @@ -2164,7 +2164,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } catch (Throwable e) { - HornetQJournalLogger.LOGGER.errorCompacting(e); + ActiveMQJournalLogger.LOGGER.errorCompacting(e); } finally { @@ -2350,7 +2350,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal new PerfBlast(pages).start(); } - // HornetQComponent implementation + // ActiveMQComponent implementation // --------------------------------------------------- public synchronized boolean isStarted() @@ -2412,7 +2412,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal if (!compactorExecutor.awaitTermination(120, TimeUnit.SECONDS)) { - HornetQJournalLogger.LOGGER.couldNotStopCompactor(); + ActiveMQJournalLogger.LOGGER.couldNotStopCompactor(); } filesExecutor.shutdown(); @@ -2421,7 +2421,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal if (!filesExecutor.awaitTermination(60, TimeUnit.SECONDS)) { - HornetQJournalLogger.LOGGER.couldNotStopJournalExecutor(); + ActiveMQJournalLogger.LOGGER.couldNotStopJournalExecutor(); } try @@ -2433,7 +2433,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } catch (Throwable e) { - HornetQJournalLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQJournalLogger.LOGGER.warn(e.getMessage(), e); } fileFactory.deactivateBuffer(); @@ -2515,7 +2515,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } catch (Throwable e) { - HornetQJournalLogger.LOGGER.errorReinitializingFile(e, file); + ActiveMQJournalLogger.LOGGER.errorReinitializingFile(e, file); } } } @@ -2690,7 +2690,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal if (!isCompatible) { - throw HornetQJournalBundle.BUNDLE.journalFileMisMatch(); + throw ActiveMQJournalBundle.BUNDLE.journalFileMisMatch(); } } @@ -2698,7 +2698,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal if (readUserVersion != userVersion) { - throw HornetQJournalBundle.BUNDLE.journalDifferentVersion(); + throw ActiveMQJournalBundle.BUNDLE.journalDifferentVersion(); } long fileID = bb.getLong(); @@ -2848,7 +2848,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } catch (Exception e) { - HornetQJournalLogger.LOGGER.errorSchedulingCompacting(e); + ActiveMQJournalLogger.LOGGER.errorSchedulingCompacting(e); } } }); @@ -2938,11 +2938,11 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal if (leftFiles.size() > 0) { - HornetQJournalLogger.LOGGER.tempFilesLeftOpen(); + ActiveMQJournalLogger.LOGGER.tempFilesLeftOpen(); for (String fileToDelete : leftFiles) { - HornetQJournalLogger.LOGGER.deletingOrphanedFile(fileToDelete); + ActiveMQJournalLogger.LOGGER.deletingOrphanedFile(fileToDelete); SequentialFile file = fileFactory.createSequentialFile(fileToDelete, 1); file.delete(); } @@ -3008,7 +3008,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal private PerfBlast(final int pages) { - super("hornetq-perfblast-thread"); + super("activemq-perfblast-thread"); this.pages = pages; } @@ -3044,7 +3044,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } catch (Exception e) { - HornetQJournalLogger.LOGGER.failedToPerfBlast(e); + ActiveMQJournalLogger.LOGGER.failedToPerfBlast(e); } finally { @@ -3219,7 +3219,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal if (trace) { - HornetQJournalLogger.LOGGER.trace("Moving next file " + currentFile); + ActiveMQJournalLogger.LOGGER.trace("Moving next file " + currentFile); } fileFactory.activateBuffer(currentFile.getFile()); diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/NIOSequentialFile.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/NIOSequentialFile.java index e8db83e50c..3dd74b377f 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/NIOSequentialFile.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/NIOSequentialFile.java @@ -28,8 +28,8 @@ import org.apache.activemq.api.core.ActiveMQIllegalStateException; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.journal.SequentialFileFactory; -import org.apache.activemq.journal.HornetQJournalBundle; -import org.apache.activemq.journal.HornetQJournalLogger; +import org.apache.activemq.journal.ActiveMQJournalBundle; +import org.apache.activemq.journal.ActiveMQJournalLogger; /** * A NIOSequentialFile @@ -162,7 +162,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile { while (!maxIOSemaphore.tryAcquire(maxIO, 60, TimeUnit.SECONDS)) { - HornetQJournalLogger.LOGGER.errorClosingFile(getFileName()); + ActiveMQJournalLogger.LOGGER.errorClosingFile(getFileName()); } } @@ -336,7 +336,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile } else { - throw HornetQJournalBundle.BUNDLE.fileNotOpened(); + throw ActiveMQJournalBundle.BUNDLE.fileNotOpened(); } return; } @@ -372,13 +372,13 @@ public final class NIOSequentialFile extends AbstractSequentialFile } catch (IOException e) { - HornetQJournalLogger.LOGGER.errorSubmittingWrite(e); + ActiveMQJournalLogger.LOGGER.errorSubmittingWrite(e); factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(), NIOSequentialFile.this); callback.onError(ActiveMQExceptionType.IO_ERROR.getCode(), e.getMessage()); } catch (Throwable e) { - HornetQJournalLogger.LOGGER.errorSubmittingWrite(e); + ActiveMQJournalLogger.LOGGER.errorSubmittingWrite(e); callback.onError(ActiveMQExceptionType.IO_ERROR.getCode(), e.getMessage()); } } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/Reclaimer.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/Reclaimer.java index 4638ff5ae9..72cd90d85f 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/Reclaimer.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/Reclaimer.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.journal.impl; -import org.apache.activemq.journal.HornetQJournalLogger; +import org.apache.activemq.journal.ActiveMQJournalLogger; /** * @@ -36,11 +36,11 @@ import org.apache.activemq.journal.HornetQJournalLogger; */ public class Reclaimer { - private static boolean trace = HornetQJournalLogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQJournalLogger.LOGGER.isTraceEnabled(); private static void trace(final String message) { - HornetQJournalLogger.LOGGER.trace(message); + ActiveMQJournalLogger.LOGGER.trace(message); } public void scan(final JournalFile[] files) diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/SimpleWaitIOCallback.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/SimpleWaitIOCallback.java index 5b17ddd2fe..5650aeec5f 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/SimpleWaitIOCallback.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/SimpleWaitIOCallback.java @@ -17,7 +17,7 @@ import java.util.concurrent.TimeUnit; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQExceptionType; -import org.apache.activemq.journal.HornetQJournalLogger; +import org.apache.activemq.journal.ActiveMQJournalLogger; /** * A SimpleWaitIOCallback @@ -51,7 +51,7 @@ public final class SimpleWaitIOCallback extends SyncIOCompletion this.errorMessage = errorMessage1; - HornetQJournalLogger.LOGGER.errorOnIOCallback(errorMessage1); + ActiveMQJournalLogger.LOGGER.errorOnIOCallback(errorMessage1); latch.countDown(); } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/SyncSpeedTest.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/SyncSpeedTest.java index 72059af352..0ca8aa0d72 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/SyncSpeedTest.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/SyncSpeedTest.java @@ -25,7 +25,7 @@ import java.util.concurrent.Executors; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.journal.SequentialFileFactory; -import org.apache.activemq.journal.HornetQJournalLogger; +import org.apache.activemq.journal.ActiveMQJournalLogger; /** * A SyncSpeedTest @@ -169,7 +169,7 @@ public class SyncSpeedTest { if (!file.delete()) { - HornetQJournalLogger.LOGGER.errorDeletingFile(file); + ActiveMQJournalLogger.LOGGER.errorDeletingFile(file); } } @@ -309,7 +309,7 @@ public class SyncSpeedTest for (Thread t : threads) { - HornetQJournalLogger.LOGGER.startingThread(); + ActiveMQJournalLogger.LOGGER.startingThread(); t.start(); } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/TimedBuffer.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/TimedBuffer.java index 50d71d1d36..3e54b70ab3 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/TimedBuffer.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/TimedBuffer.java @@ -27,7 +27,7 @@ import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.journal.impl.dataformat.ByteArrayEncoding; -import org.apache.activemq.journal.HornetQJournalLogger; +import org.apache.activemq.journal.ActiveMQJournalLogger; /** * A TimedBuffer @@ -151,7 +151,7 @@ public class TimedBuffer timerRunnable = new CheckTimer(); - timerThread = new Thread(timerRunnable, "hornetq-buffer-timeout"); + timerThread = new Thread(timerRunnable, "activemq-buffer-timeout"); timerThread.start(); @@ -373,9 +373,9 @@ public class TimedBuffer if (lastExecution != 0) { double rate = 1000 * (double) (bytesF - lastBytesFlushed) / (now - lastExecution); - HornetQJournalLogger.LOGGER.writeRate(rate, (long) (rate / (1024 * 1024))); + ActiveMQJournalLogger.LOGGER.writeRate(rate, (long) (rate / (1024 * 1024))); double flushRate = 1000 * (double) (flushesD - lastFlushesDone) / (now - lastExecution); - HornetQJournalLogger.LOGGER.flushRate(flushRate); + ActiveMQJournalLogger.LOGGER.flushRate(flushRate); } lastExecution = now; @@ -477,7 +477,7 @@ public class TimedBuffer catch (Exception e) { setUseSleep(false); - HornetQJournalLogger.LOGGER.warn(e.getMessage() + ", disabling sleep on TimedBuffer, using spin now", e); + ActiveMQJournalLogger.LOGGER.warn(e.getMessage() + ", disabling sleep on TimedBuffer, using spin now", e); } if (checks < MAX_CHECKS_ON_SLEEP) @@ -494,7 +494,7 @@ public class TimedBuffer { if (failedChecks > MAX_CHECKS_ON_SLEEP * 0.5) { - HornetQJournalLogger.LOGGER.debug("Thread.sleep with nano seconds is not working as expected, Your kernel possibly doesn't support real time. the Journal TimedBuffer will spin for timeouts"); + ActiveMQJournalLogger.LOGGER.debug("Thread.sleep with nano seconds is not working as expected, Your kernel possibly doesn't support real time. the Journal TimedBuffer will spin for timeouts"); setUseSleep(false); } } diff --git a/activemq-journal/src/main/java/org/apache/activemq/journal/HornetQJournalBundle.java b/activemq-journal/src/main/java/org/apache/activemq/journal/ActiveMQJournalBundle.java similarity index 92% rename from activemq-journal/src/main/java/org/apache/activemq/journal/HornetQJournalBundle.java rename to activemq-journal/src/main/java/org/apache/activemq/journal/ActiveMQJournalBundle.java index 39a2adf23e..4106e4edcd 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/journal/HornetQJournalBundle.java +++ b/activemq-journal/src/main/java/org/apache/activemq/journal/ActiveMQJournalBundle.java @@ -28,10 +28,10 @@ import org.jboss.logging.Messages; * * so 149000 to 149999 */ -@MessageBundle(projectCode = "HQ") -public interface HornetQJournalBundle +@MessageBundle(projectCode = "AMQ") +public interface ActiveMQJournalBundle { - HornetQJournalBundle BUNDLE = Messages.getBundle(HornetQJournalBundle.class); + ActiveMQJournalBundle BUNDLE = Messages.getBundle(ActiveMQJournalBundle.class); @Message(id = 149000, value = "failed to rename file {0} to {1}", format = Message.Format.MESSAGE_FORMAT) ActiveMQIOErrorException ioRenameFileError(String name, String newFileName); diff --git a/activemq-journal/src/main/java/org/apache/activemq/journal/HornetQJournalLogger.java b/activemq-journal/src/main/java/org/apache/activemq/journal/ActiveMQJournalLogger.java similarity index 98% rename from activemq-journal/src/main/java/org/apache/activemq/journal/HornetQJournalLogger.java rename to activemq-journal/src/main/java/org/apache/activemq/journal/ActiveMQJournalLogger.java index 1f6cf60ee7..331df411fa 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/journal/HornetQJournalLogger.java +++ b/activemq-journal/src/main/java/org/apache/activemq/journal/ActiveMQJournalLogger.java @@ -37,13 +37,13 @@ import org.jboss.logging.annotations.MessageLogger; * * so an INFO message would be 141000 to 141999 */ -@MessageLogger(projectCode = "HQ") -public interface HornetQJournalLogger extends BasicLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQJournalLogger extends BasicLogger { /** * The journal logger. */ - HornetQJournalLogger LOGGER = Logger.getMessageLogger(HornetQJournalLogger.class, HornetQJournalLogger.class.getPackage().getName()); + ActiveMQJournalLogger LOGGER = Logger.getMessageLogger(ActiveMQJournalLogger.class, ActiveMQJournalLogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.INFO) @Message(id = 141000, value = "*** running direct journal blast: {0}", format = Message.Format.MESSAGE_FORMAT) diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/HornetQProtonRemotingConnection.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ActiveMQProtonRemotingConnection.java similarity index 86% rename from activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/HornetQProtonRemotingConnection.java rename to activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ActiveMQProtonRemotingConnection.java index fec1eac3e0..6fbd6e4286 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/HornetQProtonRemotingConnection.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ActiveMQProtonRemotingConnection.java @@ -17,18 +17,18 @@ import java.util.concurrent.Executor; import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQException; -import org.apache.activemq.core.client.HornetQClientLogger; +import org.apache.activemq.core.client.ActiveMQClientLogger; import org.apache.activemq.spi.core.protocol.AbstractRemotingConnection; import org.apache.activemq.spi.core.remoting.Connection; import org.proton.plug.AMQPConnectionContext; /** * - * This is a Server's Connection representation used by HornetQ. + * This is a Server's Connection representation used by ActiveMQ. * @author Clebert Suconic */ -public class HornetQProtonRemotingConnection extends AbstractRemotingConnection +public class ActiveMQProtonRemotingConnection extends AbstractRemotingConnection { private final AMQPConnectionContext amqpConnection; @@ -37,7 +37,7 @@ public class HornetQProtonRemotingConnection extends AbstractRemotingConnection private final ProtonProtocolManager manager; - public HornetQProtonRemotingConnection(ProtonProtocolManager manager, AMQPConnectionContext amqpConnection, Connection transportConnection, Executor executor) + public ActiveMQProtonRemotingConnection(ProtonProtocolManager manager, AMQPConnectionContext amqpConnection, Connection transportConnection, Executor executor) { super(transportConnection, executor); this.manager = manager; @@ -61,7 +61,7 @@ public class HornetQProtonRemotingConnection extends AbstractRemotingConnection destroyed = true; - HornetQClientLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType()); + ActiveMQClientLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType()); // Then call the listeners callFailureListeners(me, scaleDownTargetNodeID); diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ProtonProtocolManager.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ProtonProtocolManager.java index cf5bb9ac9b..5e69aaecfe 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ProtonProtocolManager.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ProtonProtocolManager.java @@ -17,11 +17,11 @@ import java.util.concurrent.Executor; import io.netty.channel.ChannelPipeline; import org.apache.activemq.api.core.ActiveMQBuffer; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.core.protocol.proton.converter.ProtonMessageConverter; -import org.apache.activemq.core.protocol.proton.plug.HornetQProtonConnectionCallback; +import org.apache.activemq.core.protocol.proton.plug.ActiveMQProtonConnectionCallback; import org.apache.activemq.core.remoting.impl.netty.NettyServerConnection; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.management.Notification; import org.apache.activemq.core.server.management.NotificationListener; import org.apache.activemq.spi.core.protocol.ConnectionEntry; @@ -34,23 +34,23 @@ import org.proton.plug.AMQPServerConnectionContext; import org.proton.plug.context.server.ProtonServerConnectionContextFactory; /** - * A proton protocol manager, basically reads the Proton Input and maps proton resources to HornetQ resources + * A proton protocol manager, basically reads the Proton Input and maps proton resources to ActiveMQ resources * * @author Andy Taylor */ public class ProtonProtocolManager implements ProtocolManager, NotificationListener { - private final HornetQServer server; + private final ActiveMQServer server; private MessageConverter protonConverter; - public ProtonProtocolManager(HornetQServer server) + public ProtonProtocolManager(ActiveMQServer server) { this.server = server; this.protonConverter = new ProtonMessageConverter(server.getStorageManager()); } - public HornetQServer getServer() + public ActiveMQServer getServer() { return server; } @@ -71,18 +71,18 @@ public class ProtonProtocolManager implements ProtocolManager, NotificationListe @Override public ConnectionEntry createConnectionEntry(Acceptor acceptorUsed, Connection remotingConnection) { - HornetQProtonConnectionCallback connectionCallback = new HornetQProtonConnectionCallback(this, remotingConnection); + ActiveMQProtonConnectionCallback connectionCallback = new ActiveMQProtonConnectionCallback(this, remotingConnection); AMQPServerConnectionContext amqpConnection = ProtonServerConnectionContextFactory.getFactory().createConnection(connectionCallback); Executor executor = server.getExecutorFactory().getExecutor(); - HornetQProtonRemotingConnection delegate = new HornetQProtonRemotingConnection(this, amqpConnection, remotingConnection, executor); + ActiveMQProtonRemotingConnection delegate = new ActiveMQProtonRemotingConnection(this, amqpConnection, remotingConnection, executor); connectionCallback.setProtonConnectionDelegate(delegate); ConnectionEntry entry = new ConnectionEntry(delegate, executor, - System.currentTimeMillis(), HornetQClient.DEFAULT_CONNECTION_TTL); + System.currentTimeMillis(), ActiveMQClient.DEFAULT_CONNECTION_TTL); return entry; } @@ -96,7 +96,7 @@ public class ProtonProtocolManager implements ProtocolManager, NotificationListe @Override public void handleBuffer(RemotingConnection connection, ActiveMQBuffer buffer) { - HornetQProtonRemotingConnection protonConnection = (HornetQProtonRemotingConnection)connection; + ActiveMQProtonRemotingConnection protonConnection = (ActiveMQProtonRemotingConnection)connection; protonConnection.bufferReceived(protonConnection.getID(), buffer); } diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ProtonProtocolManagerFactory.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ProtonProtocolManagerFactory.java index e82202cff0..07877d2ee4 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ProtonProtocolManagerFactory.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ProtonProtocolManagerFactory.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.proton; import org.apache.activemq.api.core.Interceptor; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.spi.core.protocol.ProtocolManager; import org.apache.activemq.spi.core.protocol.ProtocolManagerFactory; @@ -30,7 +30,7 @@ public class ProtonProtocolManagerFactory implements ProtocolManagerFactory private static String[] SUPPORTED_PROTOCOLS = {AMQP_PROTOCOL_NAME}; @Override - public ProtocolManager createProtocolManager(HornetQServer server, List incomingInterceptors, List outgoingInterceptors) + public ProtocolManager createProtocolManager(ActiveMQServer server, List incomingInterceptors, List outgoingInterceptors) { return new ProtonProtocolManager(server); } diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/HornetQJMSVendor.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/ActiveMQJMSVendor.java similarity index 94% rename from activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/HornetQJMSVendor.java rename to activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/ActiveMQJMSVendor.java index 4c09836232..be8be9e9a4 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/HornetQJMSVendor.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/ActiveMQJMSVendor.java @@ -22,7 +22,7 @@ import javax.jms.StreamMessage; import javax.jms.TextMessage; import org.apache.qpid.proton.jms.JMSVendor; -import org.apache.activemq.core.buffers.impl.ResetLimitWrappedHornetQBuffer; +import org.apache.activemq.core.buffers.impl.ResetLimitWrappedActiveMQBuffer; import org.apache.activemq.core.protocol.proton.converter.jms.ServerJMSBytesMessage; import org.apache.activemq.core.protocol.proton.converter.jms.ServerJMSMapMessage; import org.apache.activemq.core.protocol.proton.converter.jms.ServerJMSMessage; @@ -36,12 +36,12 @@ import org.apache.activemq.utils.IDGenerator; * @author Clebert Suconic */ -public class HornetQJMSVendor extends JMSVendor +public class ActiveMQJMSVendor extends JMSVendor { private final IDGenerator serverGenerator; - HornetQJMSVendor(IDGenerator idGenerator) + ActiveMQJMSVendor(IDGenerator idGenerator) { this.serverGenerator = idGenerator; } @@ -148,7 +148,7 @@ public class HornetQJMSVendor extends JMSVendor { ServerMessageImpl message = new ServerMessageImpl(serverGenerator.generateID(), 512); message.setType(messageType); - ((ResetLimitWrappedHornetQBuffer)message.getBodyBuffer()).setMessage(null); + ((ResetLimitWrappedActiveMQBuffer)message.getBodyBuffer()).setMessage(null); return message; } diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/ProtonMessageConverter.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/ProtonMessageConverter.java index faf45f4436..18b7de1f79 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/ProtonMessageConverter.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/ProtonMessageConverter.java @@ -30,13 +30,13 @@ public class ProtonMessageConverter implements MessageConverter { - HornetQJMSVendor hornetQJMSVendor; + ActiveMQJMSVendor activeMQJMSVendor; public ProtonMessageConverter(IDGenerator idGenerator) { - hornetQJMSVendor = new HornetQJMSVendor(idGenerator); - inboundTransformer = new JMSMappingInboundTransformer(hornetQJMSVendor); - outboundTransformer = new JMSMappingOutboundTransformer(hornetQJMSVendor); + activeMQJMSVendor = new ActiveMQJMSVendor(idGenerator); + inboundTransformer = new JMSMappingInboundTransformer(activeMQJMSVendor); + outboundTransformer = new JMSMappingOutboundTransformer(activeMQJMSVendor); } private final InboundTransformer inboundTransformer; @@ -70,7 +70,7 @@ public class ProtonMessageConverter implements MessageConverter @Override public Object outbound(ServerMessage messageOutbound, int deliveryCount) throws Exception { - ServerJMSMessage jmsMessage = hornetQJMSVendor.wrapMessage(messageOutbound.getType(), messageOutbound, deliveryCount); + ServerJMSMessage jmsMessage = activeMQJMSVendor.wrapMessage(messageOutbound.getType(), messageOutbound, deliveryCount); jmsMessage.decode(); return outboundTransformer.convert(jmsMessage); diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMapMessage.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMapMessage.java index 36b9c96773..f2fd1b88fa 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMapMessage.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMapMessage.java @@ -30,7 +30,7 @@ import static org.apache.activemq.reader.MapMessageUtil.readBodyMap; import static org.apache.activemq.reader.MapMessageUtil.writeBodyMap; /** - * HornetQ implementation of a JMS MapMessage. + * ActiveMQ implementation of a JMS MapMessage. * * @author Norbert Lataille (Norbert.Lataille@m4x.org) * @author Adrian Brock diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMessage.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMessage.java index ab2d2b41e2..fdf14d92c8 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMessage.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMessage.java @@ -23,8 +23,8 @@ import java.util.Enumeration; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.message.impl.MessageInternal; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQQueue; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQQueue; import org.apache.activemq.reader.MessageUtil; /** @@ -111,7 +111,7 @@ public class ServerJMSMessage implements Message SimpleString reply = MessageUtil.getJMSReplyTo(message); if (reply != null) { - return HornetQDestination.fromAddress(reply.toString()); + return ActiveMQDestination.fromAddress(reply.toString()); } else { @@ -122,7 +122,7 @@ public class ServerJMSMessage implements Message @Override public final void setJMSReplyTo(Destination replyTo) throws JMSException { - MessageUtil.setJMSReplyTo(message, replyTo == null ? null : ((HornetQDestination) replyTo).getSimpleAddress()); + MessageUtil.setJMSReplyTo(message, replyTo == null ? null : ((ActiveMQDestination) replyTo).getSimpleAddress()); } @@ -138,11 +138,11 @@ public class ServerJMSMessage implements Message { if (!sdest.toString().startsWith("jms.")) { - return new HornetQQueue(sdest.toString(), sdest.toString()); + return new ActiveMQQueue(sdest.toString(), sdest.toString()); } else { - return HornetQDestination.fromAddress(sdest.toString()); + return ActiveMQDestination.fromAddress(sdest.toString()); } } } @@ -156,7 +156,7 @@ public class ServerJMSMessage implements Message } else { - message.setAddress(((HornetQDestination) destination).getSimpleAddress()); + message.setAddress(((ActiveMQDestination) destination).getSimpleAddress()); } } diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSStreamMessage.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSStreamMessage.java index 8c9ce31f21..927eb46cc3 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSStreamMessage.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSStreamMessage.java @@ -384,7 +384,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St getBuffer().resetReaderIndex(); } - // HornetQRAMessage overrides ---------------------------------------- + // ActiveMQRAMessage overrides ---------------------------------------- @Override public void clearBody() throws JMSException diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSTextMessage.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSTextMessage.java index 8db24a2f24..ff113cfd49 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSTextMessage.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSTextMessage.java @@ -24,7 +24,7 @@ import static org.apache.activemq.reader.TextMessageUtil.writeBodyText; /** - * HornetQ implementation of a JMS TextMessage. + * ActiveMQ implementation of a JMS TextMessage. *
* This class was ported from SpyTextMessage in JBossMQ. * diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/package-info.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/package-info.java index e45c8d744d..6c7a919819 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/package-info.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/package-info.java @@ -13,7 +13,7 @@ /** - * This package contains incomplete JMS implementations just to be used with converting amqp to hornetq and + * This package contains incomplete JMS implementations just to be used with converting amqp to activemq and * vice versa * @author Clebert Suconic */ diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/plug/HornetQProtonConnectionCallback.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/plug/ActiveMQProtonConnectionCallback.java similarity index 80% rename from activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/plug/HornetQProtonConnectionCallback.java rename to activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/plug/ActiveMQProtonConnectionCallback.java index 185220f37b..97c3174764 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/plug/HornetQProtonConnectionCallback.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/plug/ActiveMQProtonConnectionCallback.java @@ -19,9 +19,9 @@ import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFutureListener; import org.apache.activemq.core.buffers.impl.ChannelBufferWrapper; -import org.apache.activemq.core.protocol.proton.HornetQProtonRemotingConnection; +import org.apache.activemq.core.protocol.proton.ActiveMQProtonRemotingConnection; import org.apache.activemq.core.protocol.proton.ProtonProtocolManager; -import org.apache.activemq.core.protocol.proton.sasl.HornetQPlainSASL; +import org.apache.activemq.core.protocol.proton.sasl.ActiveMQPlainSASL; import org.apache.activemq.spi.core.remoting.Connection; import org.apache.activemq.utils.ReusableLatch; import org.proton.plug.AMQPConnectionCallback; @@ -34,19 +34,19 @@ import org.proton.plug.sasl.AnonymousServerSASL; * @author Clebert Suconic */ -public class HornetQProtonConnectionCallback implements AMQPConnectionCallback +public class ActiveMQProtonConnectionCallback implements AMQPConnectionCallback { private final ProtonProtocolManager manager; private final Connection connection; - protected HornetQProtonRemotingConnection protonConnectionDelegate; + protected ActiveMQProtonRemotingConnection protonConnectionDelegate; protected AMQPConnectionContext amqpConnection; private final ReusableLatch latch = new ReusableLatch(0); - public HornetQProtonConnectionCallback(ProtonProtocolManager manager, Connection connection) + public ActiveMQProtonConnectionCallback(ProtonProtocolManager manager, Connection connection) { this.manager = manager; this.connection = connection; @@ -55,7 +55,7 @@ public class HornetQProtonConnectionCallback implements AMQPConnectionCallback @Override public ServerSASL[] getSASLMechnisms() { - return new ServerSASL[]{new AnonymousServerSASL(), new HornetQPlainSASL(manager.getServer().getSecurityStore(), manager.getServer().getSecurityManager())}; + return new ServerSASL[]{new AnonymousServerSASL(), new ActiveMQPlainSASL(manager.getServer().getSecurityStore(), manager.getServer().getSecurityManager())}; } @Override @@ -76,12 +76,12 @@ public class HornetQProtonConnectionCallback implements AMQPConnectionCallback return amqpConnection; } - public HornetQProtonRemotingConnection getProtonConnectionDelegate() + public ActiveMQProtonRemotingConnection getProtonConnectionDelegate() { return protonConnectionDelegate; } - public void setProtonConnectionDelegate(HornetQProtonRemotingConnection protonConnectionDelegate) + public void setProtonConnectionDelegate(ActiveMQProtonRemotingConnection protonConnectionDelegate) { this.protonConnectionDelegate = protonConnectionDelegate; } diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/plug/ProtonSessionIntegrationCallback.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/plug/ProtonSessionIntegrationCallback.java index 38c105f887..5be9a13ba4 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/plug/ProtonSessionIntegrationCallback.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/plug/ProtonSessionIntegrationCallback.java @@ -24,7 +24,7 @@ import org.apache.qpid.proton.engine.Receiver; import org.apache.qpid.proton.jms.EncodedMessage; import org.apache.qpid.proton.message.ProtonJMessage; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.protocol.proton.ProtonProtocolManager; import org.apache.activemq.core.server.QueueQueryResult; @@ -52,7 +52,7 @@ public class ProtonSessionIntegrationCallback implements AMQPSessionCallback, Se { protected final IDGenerator consumerIDGenerator = new SimpleIDGenerator(0); - private final HornetQProtonConnectionCallback protonSPI; + private final ActiveMQProtonConnectionCallback protonSPI; private final ProtonProtocolManager manager; @@ -62,7 +62,7 @@ public class ProtonSessionIntegrationCallback implements AMQPSessionCallback, Se private AMQPSessionContext protonSession; - public ProtonSessionIntegrationCallback(HornetQProtonConnectionCallback protonSPI, ProtonProtocolManager manager, AMQPConnectionContext connection) + public ProtonSessionIntegrationCallback(ActiveMQProtonConnectionCallback protonSPI, ProtonProtocolManager manager, AMQPConnectionContext connection) { this.protonSPI = protonSPI; this.manager = manager; @@ -72,7 +72,7 @@ public class ProtonSessionIntegrationCallback implements AMQPSessionCallback, Se @Override public void onFlowConsumer(Object consumer, int credits) { - // We have our own flow control on AMQP, so we set hornetq's flow control to 0 + // We have our own flow control on AMQP, so we set activemq's flow control to 0 ((ServerConsumer) consumer).receiveCredits(-1); } @@ -98,7 +98,7 @@ public class ProtonSessionIntegrationCallback implements AMQPSessionCallback, Se serverSession = manager.getServer().createSession(name, user, passcode, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, protonSPI.getProtonConnectionDelegate(), // RemotingConnection remotingConnection, false, // boolean autoCommitSends false, // boolean autoCommitAcks, diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/sasl/HornetQPlainSASL.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/sasl/ActiveMQPlainSASL.java similarity index 81% rename from activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/sasl/HornetQPlainSASL.java rename to activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/sasl/ActiveMQPlainSASL.java index 389a474d28..0fafb315f7 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/sasl/HornetQPlainSASL.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/sasl/ActiveMQPlainSASL.java @@ -14,22 +14,22 @@ package org.apache.activemq.core.protocol.proton.sasl; import org.apache.activemq.core.security.SecurityStore; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; import org.proton.plug.sasl.ServerSASLPlain; /** * @author Clebert Suconic */ -public class HornetQPlainSASL extends ServerSASLPlain +public class ActiveMQPlainSASL extends ServerSASLPlain { - private final HornetQSecurityManager securityManager; + private final ActiveMQSecurityManager securityManager; private final SecurityStore securityStore; - public HornetQPlainSASL(SecurityStore securityStore, HornetQSecurityManager securityManager) + public ActiveMQPlainSASL(SecurityStore securityStore, ActiveMQSecurityManager securityManager) { this.securityManager = securityManager; this.securityStore = securityStore; diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/resources/META-INF/services/org.hornetq.spi.core.protocol.ProtocolManagerFactory b/activemq-protocols/activemq-amqp-protocol/src/main/resources/META-INF/services/org.apache.activemq.spi.core.protocol.ProtocolManagerFactory similarity index 100% rename from activemq-protocols/activemq-amqp-protocol/src/main/resources/META-INF/services/org.hornetq.spi.core.protocol.ProtocolManagerFactory rename to activemq-protocols/activemq-amqp-protocol/src/main/resources/META-INF/services/org.apache.activemq.spi.core.protocol.ProtocolManagerFactory diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireConnection.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireConnection.java index 6005b3da4f..86575b6a61 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireConnection.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireConnection.java @@ -93,7 +93,7 @@ import org.apache.activemq.core.protocol.openwire.amq.AMQTransportConnectionStat import org.apache.activemq.core.protocol.openwire.amq.AMQTransportConnectionStateRegister; import org.apache.activemq.core.remoting.CloseListener; import org.apache.activemq.core.remoting.FailureListener; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.remoting.Acceptor; import org.apache.activemq.spi.core.remoting.Connection; @@ -142,7 +142,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor private Throwable stopError = null; - // should come from hornetq server + // should come from activemq server private final TaskRunnerFactory stopTaskRunnerFactory = null; private boolean starting; @@ -204,7 +204,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor } catch (Throwable t) { - HornetQServerLogger.LOGGER.error("decoding error", t); + ActiveMQServerLogger.LOGGER.error("decoding error", t); return; } @@ -314,11 +314,11 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor } catch (IOException e) { - HornetQServerLogger.LOGGER.error("error decoding", e); + ActiveMQServerLogger.LOGGER.error("error decoding", e); } catch (Throwable t) { - HornetQServerLogger.LOGGER.error("error decoding", t); + ActiveMQServerLogger.LOGGER.error("error decoding", t); } } } @@ -444,7 +444,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor @Override public void fail(ActiveMQException me) { - HornetQServerLogger.LOGGER.connectionFailureDetected(me.getMessage(), + ActiveMQServerLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType()); // Then call the listeners callFailureListeners(me); @@ -543,7 +543,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor // Failure of one listener to execute shouldn't prevent others // from // executing - HornetQServerLogger.LOGGER.errorCallingFailureListener(t); + ActiveMQServerLogger.LOGGER.errorCallingFailureListener(t); } } } @@ -564,7 +564,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor // Failure of one listener to execute shouldn't prevent others // from // executing - HornetQServerLogger.LOGGER.errorCallingFailureListener(t); + ActiveMQServerLogger.LOGGER.errorCallingFailureListener(t); } } } @@ -586,7 +586,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor try { ByteSequence bytes = wireFormat.marshal(command); - ActiveMQBuffer buffer = OpenWireUtil.toHornetQBuffer(bytes); + ActiveMQBuffer buffer = OpenWireUtil.toActiveMQBuffer(bytes); synchronized (sendLock) { getTransportConnection().write(buffer, false, false); @@ -598,7 +598,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor } catch (Throwable t) { - HornetQServerLogger.LOGGER.error("error sending", t); + ActiveMQServerLogger.LOGGER.error("error sending", t); } } @@ -652,7 +652,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor context.setConnection(this); context.setConnectionId(info.getConnectionId()); // for now we pass the manager as the connector and see what happens - // it should be related to hornetq's Acceptor + // it should be related to activemq's Acceptor context.setConnector(this.acceptorUsed); context.setMessageAuthorizationPolicy(getMessageAuthorizationPolicy()); context.setNetworkConnection(networkConnection); diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireProtocolManager.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireProtocolManager.java index 65a8d714fa..e878763941 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireProtocolManager.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireProtocolManager.java @@ -50,6 +50,7 @@ import org.apache.activemq.command.TransactionId; import org.apache.activemq.command.TransactionInfo; import org.apache.activemq.command.WireFormatInfo; import org.apache.activemq.command.XATransactionId; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.openwire.OpenWireFormat; import org.apache.activemq.openwire.OpenWireFormatFactory; import org.apache.activemq.state.ConnectionState; @@ -68,16 +69,15 @@ import org.apache.activemq.core.protocol.openwire.amq.AMQSession; import org.apache.activemq.core.protocol.openwire.amq.AMQTransportConnectionState; import org.apache.activemq.core.remoting.impl.netty.NettyServerConnection; import org.apache.activemq.core.security.CheckType; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.spi.core.protocol.ConnectionEntry; import org.apache.activemq.spi.core.protocol.MessageConverter; import org.apache.activemq.spi.core.protocol.ProtocolManager; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.remoting.Acceptor; import org.apache.activemq.spi.core.remoting.Connection; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; public class OpenWireProtocolManager implements ProtocolManager { @@ -85,7 +85,7 @@ public class OpenWireProtocolManager implements ProtocolManager private static final IdGenerator ID_GENERATOR = new IdGenerator(); private final LongSequenceGenerator messageIdGenerator = new LongSequenceGenerator(); - private final HornetQServer server; + private final ActiveMQServer server; private OpenWireFormatFactory wireFactory; @@ -114,7 +114,7 @@ public class OpenWireProtocolManager implements ProtocolManager private Map transactions = new ConcurrentHashMap(); - public OpenWireProtocolManager(HornetQServer server) + public OpenWireProtocolManager(ActiveMQServer server) { this.server = server; this.wireFactory = new OpenWireFormatFactory(); @@ -223,7 +223,7 @@ public class OpenWireProtocolManager implements ProtocolManager { public void onError(final int errorCode, final String errorMessage) { - HornetQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, + ActiveMQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage); } @@ -236,9 +236,9 @@ public class OpenWireProtocolManager implements ProtocolManager public boolean send(final OpenWireConnection connection, final Command command) { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("sending " + command); + ActiveMQServerLogger.LOGGER.trace("sending " + command); } synchronized (connection) { @@ -642,7 +642,7 @@ public class OpenWireProtocolManager implements ProtocolManager AMQServerSession fakeSession = new AMQServerSession(user, pass); CheckType checkType = dest.isTemporary() ? CheckType.CREATE_NON_DURABLE_QUEUE : CheckType.CREATE_DURABLE_QUEUE; - ((HornetQServerImpl)server).getSecurityStore().check(qName, checkType, fakeSession); + ((ActiveMQServerImpl)server).getSecurityStore().check(qName, checkType, fakeSession); } this.server.createQueue(qName, qName, null, false, true); if (dest.isTemporary()) @@ -729,7 +729,7 @@ public class OpenWireProtocolManager implements ProtocolManager { boolean validated = true; - HornetQSecurityManager sm = server.getSecurityManager(); + ActiveMQSecurityManager sm = server.getSecurityManager(); if (sm != null && server.getConfiguration().isSecurityEnabled()) { diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireProtocolManagerFactory.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireProtocolManagerFactory.java index 25c5a46008..2582b8d36b 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireProtocolManagerFactory.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireProtocolManagerFactory.java @@ -15,7 +15,7 @@ package org.apache.activemq.core.protocol.openwire; import java.util.List; import org.apache.activemq.api.core.Interceptor; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.spi.core.protocol.ProtocolManager; import org.apache.activemq.spi.core.protocol.ProtocolManagerFactory; @@ -32,7 +32,7 @@ public class OpenWireProtocolManagerFactory implements ProtocolManagerFactory private static String[] SUPPORTED_PROTOCOLS = {OPENWIRE_PROTOCOL_NAME}; - public ProtocolManager createProtocolManager(final HornetQServer server, final List incomingInterceptors, List outgoingInterceptors) + public ProtocolManager createProtocolManager(final ActiveMQServer server, final List incomingInterceptors, List outgoingInterceptors) { return new OpenWireProtocolManager(server); } diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireUtil.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireUtil.java index 603c5c6eea..e55e7b1abc 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireUtil.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireUtil.java @@ -22,7 +22,7 @@ import org.apache.activemq.api.core.SimpleString; public class OpenWireUtil { - public static ActiveMQBuffer toHornetQBuffer(ByteSequence bytes) + public static ActiveMQBuffer toActiveMQBuffer(ByteSequence bytes) { ActiveMQBuffer buffer = ActiveMQBuffers.fixedBuffer(bytes.length); diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQConsumer.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQConsumer.java index 9e98de2c6f..a7f3527b29 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQConsumer.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQConsumer.java @@ -19,7 +19,6 @@ import java.util.UUID; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ConsumerId; import org.apache.activemq.command.ConsumerInfo; import org.apache.activemq.command.MessageAck; @@ -32,12 +31,12 @@ import org.apache.activemq.core.protocol.openwire.OpenWireMessageConverter; import org.apache.activemq.core.protocol.openwire.OpenWireUtil; import org.apache.activemq.core.server.QueueQueryResult; import org.apache.activemq.core.server.ServerMessage; -import org.apache.activemq.jms.client.HornetQDestination; +import org.apache.activemq.jms.client.ActiveMQDestination; public class AMQConsumer implements BrowserListener { private AMQSession session; - private ActiveMQDestination actualDest; + private org.apache.activemq.command.ActiveMQDestination actualDest; private ConsumerInfo info; private long nativeId = -1; private SimpleString subQueueName = null; @@ -46,7 +45,7 @@ public class AMQConsumer implements BrowserListener private AtomicInteger currentSize; private final java.util.Queue deliveringRefs = new ConcurrentLinkedQueue(); - public AMQConsumer(AMQSession amqSession, ActiveMQDestination d, ConsumerInfo info) + public AMQConsumer(AMQSession amqSession, org.apache.activemq.command.ActiveMQDestination d, ConsumerInfo info) { this.session = amqSession; this.actualDest = d; @@ -79,8 +78,8 @@ public class AMQConsumer implements BrowserListener if (info.isDurable()) { subQueueName = new SimpleString( - HornetQDestination.createQueueNameForDurableSubscription( - true, info.getClientId(), info.getSubscriptionName())); + ActiveMQDestination.createQueueNameForDurableSubscription( + true, info.getClientId(), info.getSubscriptionName())); QueueQueryResult result = coreSession.executeQueueQuery(subQueueName); if (result.isExists()) diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQProducer.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQProducer.java index e74032f469..a609186973 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQProducer.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQProducer.java @@ -27,7 +27,7 @@ public class AMQProducer public void init() { - //hornetq doesn't have producer at server. + //activemq doesn't have producer at server. } } diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerConsumer.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerConsumer.java index 5a1bcfc0a3..5c53d028d1 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerConsumer.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerConsumer.java @@ -18,8 +18,8 @@ import org.apache.activemq.core.filter.Filter; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.QueueBinding; import org.apache.activemq.core.protocol.openwire.OpenWireMessageConverter; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.HandleStatus; -import org.apache.activemq.core.server.HornetQServerLogger; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.server.impl.QueueImpl; @@ -83,7 +83,7 @@ public class AMQServerConsumer extends ServerConsumerImpl } catch (Exception e) { - HornetQServerLogger.LOGGER.errorBrowserHandlingMessage(e, current); + ActiveMQServerLogger.LOGGER.errorBrowserHandlingMessage(e, current); return; } } @@ -127,7 +127,7 @@ public class AMQServerConsumer extends ServerConsumerImpl } catch (Exception e) { - HornetQServerLogger.LOGGER.errorBrowserHandlingMessage(e, ref); + ActiveMQServerLogger.LOGGER.errorBrowserHandlingMessage(e, ref); break; } } diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSession.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSession.java index 1eb47c9cbc..6cb85b8cf6 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSession.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSession.java @@ -36,13 +36,13 @@ import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.postoffice.QueueBinding; import org.apache.activemq.core.protocol.openwire.AMQTransactionImpl; import org.apache.activemq.core.security.SecurityStore; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.ServerConsumer; import org.apache.activemq.core.server.ServerMessage; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.RefsOperation; import org.apache.activemq.core.server.impl.ServerConsumerImpl; import org.apache.activemq.core.server.impl.ServerSessionImpl; @@ -66,7 +66,7 @@ public class AMQServerSession extends ServerSessionImpl RemotingConnection connection, StorageManager storageManager, PostOffice postOffice, ResourceManager resourceManager, SecurityStore securityStore, ManagementService managementService, - HornetQServerImpl hornetQServerImpl, SimpleString managementAddress, + ActiveMQServerImpl activeMQServerImpl, SimpleString managementAddress, SimpleString simpleString, SessionCallback callback, OperationContext context) throws Exception { @@ -77,7 +77,7 @@ public class AMQServerSession extends ServerSessionImpl connection, storageManager, postOffice, resourceManager, securityStore, managementService, - hornetQServerImpl, managementAddress, + activeMQServerImpl, managementAddress, simpleString, callback, context, new AMQTransactionFactory()); } @@ -106,7 +106,7 @@ public class AMQServerSession extends ServerSessionImpl if (consumer == null) { - HornetQServerLogger.LOGGER.debug("There is no consumer with id " + consumerID); + ActiveMQServerLogger.LOGGER.debug("There is no consumer with id " + consumerID); return null; } @@ -231,7 +231,7 @@ public class AMQServerSession extends ServerSessionImpl } else { - HornetQServerLogger.LOGGER.cannotFindConsumer(consumerID); + ActiveMQServerLogger.LOGGER.cannotFindConsumer(consumerID); } } @@ -251,7 +251,7 @@ public class AMQServerSession extends ServerSessionImpl if (binding == null || binding.getType() != BindingType.LOCAL_QUEUE) { - throw HornetQMessageBundle.BUNDLE.noSuchQueue(queueName); + throw ActiveMQMessageBundle.BUNDLE.noSuchQueue(queueName); } Filter filter = FilterImpl.createFilter(filterString); @@ -304,9 +304,9 @@ public class AMQServerSession extends ServerSessionImpl Notification notification = new Notification(null, CoreNotificationType.CONSUMER_CREATED, props); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Session with user=" + username + ActiveMQServerLogger.LOGGER.debug("Session with user=" + username + ", connection=" + this.remotingConnection + " created a consumer on queue " + queueName + ", filter = " + filterString); @@ -354,9 +354,9 @@ public class AMQServerSession extends ServerSessionImpl tempQueueCleannerUppers.put(name, cleaner); } - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Queue " + name + " created on address " + name + + ActiveMQServerLogger.LOGGER.debug("Queue " + name + " created on address " + name + " with filter=" + filterString + " temporary = " + temporary + " durable=" + durable + " on session user=" + this.username + ", connection=" + this.remotingConnection); } diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSessionFactory.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSessionFactory.java index bb3f4b8024..61fac220b2 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSessionFactory.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSessionFactory.java @@ -18,7 +18,7 @@ import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.security.SecurityStore; import org.apache.activemq.core.server.ServerSessionFactory; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.ServerSessionImpl; import org.apache.activemq.core.server.management.ManagementService; import org.apache.activemq.core.transaction.ResourceManager; @@ -36,14 +36,14 @@ public class AMQServerSessionFactory implements ServerSessionFactory RemotingConnection connection, StorageManager storageManager, PostOffice postOffice, ResourceManager resourceManager, SecurityStore securityStore, ManagementService managementService, - HornetQServerImpl hornetQServerImpl, SimpleString managementAddress, + ActiveMQServerImpl activeMQServerImpl, SimpleString managementAddress, SimpleString simpleString, SessionCallback callback, OperationContext context) throws Exception { return new AMQServerSession(name, username, password, minLargeMessageSize, autoCommitSends, autoCommitAcks, preAcknowledge, persistDeliveryCountBeforeDelivery, xa, connection, storageManager, postOffice, resourceManager, securityStore, - managementService, hornetQServerImpl, managementAddress, simpleString, callback, + managementService, activeMQServerImpl, managementAddress, simpleString, callback, context); } diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQSession.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQSession.java index d74e091789..77b37e4c84 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQSession.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQSession.java @@ -42,6 +42,7 @@ import org.apache.activemq.command.SessionInfo; import org.apache.activemq.command.TransactionId; import org.apache.activemq.command.TransactionInfo; import org.apache.activemq.command.XATransactionId; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.wireformat.WireFormat; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.paging.impl.PagingStoreImpl; @@ -50,8 +51,7 @@ import org.apache.activemq.core.protocol.openwire.OpenWireMessageConverter; import org.apache.activemq.core.protocol.openwire.OpenWireProtocolManager; import org.apache.activemq.core.protocol.openwire.OpenWireUtil; import org.apache.activemq.core.protocol.openwire.SendingResult; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.ServerConsumer; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.server.impl.ServerMessageImpl; @@ -64,7 +64,7 @@ public class AMQSession implements SessionCallback private AMQServerSession coreSession; private ConnectionInfo connInfo; private SessionInfo sessInfo; - private HornetQServer server; + private ActiveMQServer server; private OpenWireConnection connection; //native id -> consumer private Map consumers = new ConcurrentHashMap(); @@ -82,7 +82,7 @@ public class AMQSession implements SessionCallback private OpenWireProtocolManager manager; public AMQSession(ConnectionInfo connInfo, SessionInfo sessInfo, - HornetQServer server, OpenWireConnection connection, OpenWireProtocolManager manager) + ActiveMQServer server, OpenWireConnection connection, OpenWireProtocolManager manager) { this.connInfo = connInfo; this.sessInfo = sessInfo; @@ -115,7 +115,7 @@ public class AMQSession implements SessionCallback } catch (Exception e) { - HornetQServerLogger.LOGGER.error("error init session", e); + ActiveMQServerLogger.LOGGER.error("error init session", e); } } @@ -221,7 +221,7 @@ public class AMQSession implements SessionCallback return this.coreSession; } - public HornetQServer getCoreServer() + public ActiveMQServer getCoreServer() { return this.server; } @@ -578,7 +578,7 @@ public class AMQSession implements SessionCallback long now = System.currentTimeMillis(); if (now >= nextWarn) { - HornetQServerLogger.LOGGER.warn("Memory Limit reached. Producer (" + producerId + ") stopped to prevent flooding " + ActiveMQServerLogger.LOGGER.warn("Memory Limit reached. Producer (" + producerId + ") stopped to prevent flooding " + result.getBlockingAddress() + " See http://activemq.apache.org/producer-flow-control.html for more info" + " (blocking for " + ((now - start) / 1000) + "s"); diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/resources/META-INF/services/org.hornetq.spi.core.protocol.ProtocolManagerFactory b/activemq-protocols/activemq-openwire-protocol/src/main/resources/META-INF/services/org.apache.activemq.spi.core.protocol.ProtocolManagerFactory similarity index 100% rename from activemq-protocols/activemq-openwire-protocol/src/main/resources/META-INF/services/org.hornetq.spi.core.protocol.ProtocolManagerFactory rename to activemq-protocols/activemq-openwire-protocol/src/main/resources/META-INF/services/org.apache.activemq.spi.core.protocol.ProtocolManagerFactory diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientConnectionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientConnectionContext.java index 5678a38c08..9b4e77ee4f 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientConnectionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientConnectionContext.java @@ -13,7 +13,7 @@ package org.proton.plug; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; /** * This is valid only on a client connection. @@ -30,5 +30,5 @@ public interface AMQPClientConnectionContext extends AMQPConnectionContext */ void clientOpen(ClientSASL sasl) throws Exception; - AMQPClientSessionContext createClientSession() throws HornetQAMQPException; + AMQPClientSessionContext createClientSession() throws ActiveMQAMQPException; } diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientSessionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientSessionContext.java index 45cbaad908..7f6797075e 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientSessionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientSessionContext.java @@ -13,7 +13,7 @@ package org.proton.plug; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; /** * @author Clebert Suconic @@ -21,7 +21,7 @@ import org.proton.plug.exceptions.HornetQAMQPException; public interface AMQPClientSessionContext extends AMQPSessionContext { - AMQPClientSenderContext createSender(String address, boolean preSettled) throws HornetQAMQPException; + AMQPClientSenderContext createSender(String address, boolean preSettled) throws ActiveMQAMQPException; - AMQPClientReceiverContext createReceiver(String address) throws HornetQAMQPException; + AMQPClientReceiverContext createReceiver(String address) throws ActiveMQAMQPException; } diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPSessionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPSessionContext.java index 2cc725d325..52d906c0de 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPSessionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPSessionContext.java @@ -15,7 +15,7 @@ package org.proton.plug; import org.apache.qpid.proton.engine.Receiver; import org.apache.qpid.proton.engine.Sender; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; /** * @author Clebert Suconic @@ -29,7 +29,7 @@ public interface AMQPSessionContext void close(); - void removeSender(Sender sender) throws HornetQAMQPException; + void removeSender(Sender sender) throws ActiveMQAMQPException; void removeReceiver(Receiver receiver); } diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java index 45a3ef0d72..86985eba75 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java @@ -25,7 +25,7 @@ import org.apache.qpid.proton.engine.Transport; import org.proton.plug.AMQPConnectionCallback; import org.proton.plug.AMQPConnectionContext; import org.proton.plug.SASLResult; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; import org.proton.plug.handler.ProtonHandler; import org.proton.plug.handler.impl.DefaultEventHandler; import org.proton.plug.util.ByteUtil; @@ -111,7 +111,7 @@ public abstract class AbstractConnectionContext extends ProtonInitializable impl handler.close(); } - protected AbstractProtonSessionContext getSessionExtension(Session realSession) throws HornetQAMQPException + protected AbstractProtonSessionContext getSessionExtension(Session realSession) throws ActiveMQAMQPException { AbstractProtonSessionContext sessionExtension = sessions.get(realSession); if (sessionExtension == null) @@ -127,7 +127,7 @@ public abstract class AbstractConnectionContext extends ProtonInitializable impl protected abstract void remoteLinkOpened(Link link) throws Exception; - protected abstract AbstractProtonSessionContext newSessionExtension(Session realSession) throws HornetQAMQPException; + protected abstract AbstractProtonSessionContext newSessionExtension(Session realSession) throws ActiveMQAMQPException; @Override public boolean checkDataReceived() diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonContextSender.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonContextSender.java index 45b5250c06..512bc07ea4 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonContextSender.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonContextSender.java @@ -20,12 +20,12 @@ import org.apache.qpid.proton.engine.Delivery; import org.apache.qpid.proton.engine.Sender; import org.apache.qpid.proton.message.ProtonJMessage; import org.proton.plug.AMQPSessionCallback; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; import org.proton.plug.util.CreditsSemaphore; import org.proton.plug.util.NettyWritable; /** - * A this is a wrapper around a HornetQ ServerConsumer for handling outgoing messages and incoming acks via a Proton Sender + * A this is a wrapper around a ActiveMQ ServerConsumer for handling outgoing messages and incoming acks via a Proton Sender * * @author Andy Taylor */ @@ -55,7 +55,7 @@ public abstract class AbstractProtonContextSender extends ProtonInitializable im /* * start the session * */ - public void start() throws HornetQAMQPException + public void start() throws ActiveMQAMQPException { sessionSPI.start(); // protonSession.getServerSession().start(); @@ -64,7 +64,7 @@ public abstract class AbstractProtonContextSender extends ProtonInitializable im /* * close the session * */ - public void close() throws HornetQAMQPException + public void close() throws ActiveMQAMQPException { closed = true; protonSession.removeSender(sender); @@ -78,9 +78,9 @@ public abstract class AbstractProtonContextSender extends ProtonInitializable im @Override /* - * handle an incoming Ack from Proton, basically pass to HornetQ to handle + * handle an incoming Ack from Proton, basically pass to ActiveMQ to handle * */ - public abstract void onMessage(Delivery delivery) throws HornetQAMQPException; + public abstract void onMessage(Delivery delivery) throws ActiveMQAMQPException; /* * check the state of the consumer, i.e. are there any more messages. only really needed for browsers? diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonReceiverContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonReceiverContext.java index fb4bb07791..3e3daeb129 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonReceiverContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonReceiverContext.java @@ -15,12 +15,12 @@ package org.proton.plug.context; import org.apache.qpid.proton.engine.Receiver; import org.proton.plug.AMQPSessionCallback; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; /** * @author Andy Taylor *

- * handles incoming messages via a Proton Receiver and forwards them to HornetQ + * handles incoming messages via a Proton Receiver and forwards them to ActiveMQ */ public abstract class AbstractProtonReceiverContext extends ProtonInitializable implements ProtonDeliveryHandler { @@ -51,7 +51,7 @@ public abstract class AbstractProtonReceiverContext extends ProtonInitializable } @Override - public void close() throws HornetQAMQPException + public void close() throws ActiveMQAMQPException { protonSession.removeReceiver(receiver); } diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonSessionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonSessionContext.java index 8f28039e60..d17e57857c 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonSessionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonSessionContext.java @@ -24,8 +24,8 @@ import org.apache.qpid.proton.engine.Sender; import org.apache.qpid.proton.engine.Session; import org.proton.plug.AMQPSessionCallback; import org.proton.plug.AMQPSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; -import org.proton.plug.exceptions.HornetQAMQPInternalErrorException; +import org.proton.plug.exceptions.ActiveMQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPInternalErrorException; /** * ProtonSession is a direct representation of the session on the broker. @@ -71,7 +71,7 @@ public abstract class AbstractProtonSessionContext extends ProtonInitializable i } catch (Exception e) { - throw new HornetQAMQPInternalErrorException(e.getMessage(), e); + throw new ActiveMQAMQPInternalErrorException(e.getMessage(), e); } } } @@ -93,7 +93,7 @@ public abstract class AbstractProtonSessionContext extends ProtonInitializable i { protonConsumer.close(); } - catch (HornetQAMQPException e) + catch (ActiveMQAMQPException e) { protonConsumer.getSender().setTarget(null); protonConsumer.getSender().setCondition(new ErrorCondition(e.getAmqpError(), e.getMessage())); @@ -176,7 +176,7 @@ public abstract class AbstractProtonSessionContext extends ProtonInitializable i } @Override - public void removeSender(Sender sender) throws HornetQAMQPException + public void removeSender(Sender sender) throws ActiveMQAMQPException { senders.remove(sender); } diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonDeliveryHandler.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonDeliveryHandler.java index 3436c5c9d0..2411e87c9c 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonDeliveryHandler.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonDeliveryHandler.java @@ -14,7 +14,7 @@ package org.proton.plug.context; import org.apache.qpid.proton.engine.Delivery; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; /** * @author Andy Taylor @@ -25,7 +25,7 @@ public interface ProtonDeliveryHandler { void onFlow(int currentCredits); - void onMessage(Delivery delivery) throws HornetQAMQPException; + void onMessage(Delivery delivery) throws ActiveMQAMQPException; - void close() throws HornetQAMQPException; + void close() throws ActiveMQAMQPException; } diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonInitializable.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonInitializable.java index 0dad6d73e8..bf481a162d 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonInitializable.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonInitializable.java @@ -15,9 +15,9 @@ package org.proton.plug.context; import java.util.concurrent.TimeUnit; -import org.proton.plug.exceptions.HornetQAMQPException; -import org.proton.plug.exceptions.HornetQAMQPIllegalStateException; -import org.proton.plug.exceptions.HornetQAMQPTimeoutException; +import org.proton.plug.exceptions.ActiveMQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPIllegalStateException; +import org.proton.plug.exceptions.ActiveMQAMQPTimeoutException; import org.proton.plug.util.FutureRunnable; /** @@ -63,20 +63,20 @@ public class ProtonInitializable } - public void waitWithTimeout(FutureRunnable latch) throws HornetQAMQPException + public void waitWithTimeout(FutureRunnable latch) throws ActiveMQAMQPException { try { // TODO Configure this if (!latch.await(30, TimeUnit.SECONDS)) { - throw new HornetQAMQPTimeoutException("Timed out waiting for response"); + throw new ActiveMQAMQPTimeoutException("Timed out waiting for response"); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); - throw new HornetQAMQPIllegalStateException(e.getMessage()); + throw new ActiveMQAMQPIllegalStateException(e.getMessage()); } } diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java index 9f53085686..e53e36a938 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java @@ -26,8 +26,8 @@ import org.apache.qpid.proton.engine.Delivery; import org.apache.qpid.proton.engine.Receiver; import org.apache.qpid.proton.message.impl.MessageImpl; import org.proton.plug.AMQPSessionCallback; -import org.proton.plug.exceptions.HornetQAMQPException; -import org.proton.plug.logger.HornetQAMQPProtocolMessageBundle; +import org.proton.plug.exceptions.ActiveMQAMQPException; +import org.proton.plug.logger.ActiveMQAMQPProtocolMessageBundle; import static org.proton.plug.util.DeliveryUtil.decodeMessageImpl; import static org.proton.plug.util.DeliveryUtil.readDelivery; @@ -46,7 +46,7 @@ public class ProtonTransactionHandler implements ProtonDeliveryHandler } @Override - public void onMessage(Delivery delivery) throws HornetQAMQPException + public void onMessage(Delivery delivery) throws ActiveMQAMQPException { ByteBuf buffer = PooledByteBufAllocator.DEFAULT.heapBuffer(1024); @@ -87,7 +87,7 @@ public class ProtonTransactionHandler implements ProtonDeliveryHandler } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorRollingbackCoordinator(e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorRollingbackCoordinator(e.getMessage()); } } else @@ -98,7 +98,7 @@ public class ProtonTransactionHandler implements ProtonDeliveryHandler } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorCommittingCoordinator(e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorCommittingCoordinator(e.getMessage()); } } delivery.settle(); @@ -127,7 +127,7 @@ public class ProtonTransactionHandler implements ProtonDeliveryHandler } @Override - public void close() throws HornetQAMQPException + public void close() throws ActiveMQAMQPException { //noop } diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContext.java index 95a7f612ae..d58a4ef8fb 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContext.java @@ -22,7 +22,7 @@ import org.proton.plug.AMQPConnectionCallback; import org.proton.plug.AMQPSessionCallback; import org.proton.plug.context.AbstractConnectionContext; import org.proton.plug.context.AbstractProtonSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; import org.proton.plug.context.ProtonInitializable; import org.proton.plug.util.FutureRunnable; @@ -56,7 +56,7 @@ public class ProtonClientConnectionContext extends AbstractConnectionContext imp waitWithTimeout(future); } - public AMQPClientSessionContext createClientSession() throws HornetQAMQPException + public AMQPClientSessionContext createClientSession() throws ActiveMQAMQPException { FutureRunnable futureRunnable = new FutureRunnable(1); @@ -76,7 +76,7 @@ public class ProtonClientConnectionContext extends AbstractConnectionContext imp } @Override - protected AbstractProtonSessionContext newSessionExtension(Session realSession) throws HornetQAMQPException + protected AbstractProtonSessionContext newSessionExtension(Session realSession) throws ActiveMQAMQPException { AMQPSessionCallback sessionSPI = connectionCallback.createSessionCallback(this); AbstractProtonSessionContext protonSession = new ProtonClientSessionContext(sessionSPI, this, realSession); diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientContext.java index f0dc46a6b6..bfe5f243bb 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientContext.java @@ -25,7 +25,7 @@ import org.proton.plug.AMQPSessionCallback; import org.proton.plug.context.AbstractConnectionContext; import org.proton.plug.context.AbstractProtonContextSender; import org.proton.plug.context.AbstractProtonSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; import org.proton.plug.util.FutureRunnable; /** @@ -44,7 +44,7 @@ public class ProtonClientContext extends AbstractProtonContextSender implements @Override - public void onMessage(Delivery delivery) throws HornetQAMQPException + public void onMessage(Delivery delivery) throws ActiveMQAMQPException { if (delivery.getRemoteState() instanceof Accepted) { diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientReceiverContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientReceiverContext.java index ebf7f7dbc9..f2fddf5df0 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientReceiverContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientReceiverContext.java @@ -28,7 +28,7 @@ import org.proton.plug.AMQPSessionCallback; import org.proton.plug.context.AbstractConnectionContext; import org.proton.plug.context.AbstractProtonReceiverContext; import org.proton.plug.context.AbstractProtonSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; import static org.proton.plug.util.DeliveryUtil.readDelivery; import static org.proton.plug.util.DeliveryUtil.decodeMessageImpl; @@ -55,7 +55,7 @@ public class ProtonClientReceiverContext extends AbstractProtonReceiverContext i * This may be called more than once per deliver so we have to cache the buffer until we have received it all. * * */ - public void onMessage(Delivery delivery) throws HornetQAMQPException + public void onMessage(Delivery delivery) throws ActiveMQAMQPException { ByteBuf buffer = PooledByteBufAllocator.DEFAULT.heapBuffer(1024); try diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientSessionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientSessionContext.java index e888ea9286..4e4c0802db 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientSessionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientSessionContext.java @@ -25,7 +25,7 @@ import org.proton.plug.AMQPClientSessionContext; import org.proton.plug.AMQPSessionCallback; import org.proton.plug.context.AbstractConnectionContext; import org.proton.plug.context.AbstractProtonSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; import org.proton.plug.util.FutureRunnable; /** @@ -39,7 +39,7 @@ public class ProtonClientSessionContext extends AbstractProtonSessionContext imp super(sessionSPI, connection, session); } - public AMQPClientSenderContext createSender(String address, boolean preSettled) throws HornetQAMQPException + public AMQPClientSenderContext createSender(String address, boolean preSettled) throws ActiveMQAMQPException { FutureRunnable futureRunnable = new FutureRunnable(1); @@ -63,7 +63,7 @@ public class ProtonClientSessionContext extends AbstractProtonSessionContext imp return amqpSender; } - public AMQPClientReceiverContext createReceiver(String address) throws HornetQAMQPException + public AMQPClientReceiverContext createReceiver(String address) throws ActiveMQAMQPException { FutureRunnable futureRunnable = new FutureRunnable(1); diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContext.java index 1d83e548a9..b26a82eafa 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContext.java @@ -23,7 +23,7 @@ import org.proton.plug.AMQPServerConnectionContext; import org.proton.plug.AMQPSessionCallback; import org.proton.plug.context.AbstractConnectionContext; import org.proton.plug.context.AbstractProtonSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; /** * @author Clebert Suconic @@ -36,7 +36,7 @@ public class ProtonServerConnectionContext extends AbstractConnectionContext imp super(connectionSP); } - protected AbstractProtonSessionContext newSessionExtension(Session realSession) throws HornetQAMQPException + protected AbstractProtonSessionContext newSessionExtension(Session realSession) throws ActiveMQAMQPException { AMQPSessionCallback sessionSPI = connectionCallback.createSessionCallback(this); AbstractProtonSessionContext protonSession = new ProtonServerSessionContext(sessionSPI, this, realSession); diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerReceiverContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerReceiverContext.java index 21ca2bcaab..bef429998c 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerReceiverContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerReceiverContext.java @@ -25,9 +25,9 @@ import org.proton.plug.AMQPSessionCallback; import org.proton.plug.context.AbstractConnectionContext; import org.proton.plug.context.AbstractProtonReceiverContext; import org.proton.plug.context.AbstractProtonSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; -import org.proton.plug.exceptions.HornetQAMQPInternalErrorException; -import org.proton.plug.logger.HornetQAMQPProtocolMessageBundle; +import org.proton.plug.exceptions.ActiveMQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPInternalErrorException; +import org.proton.plug.logger.ActiveMQAMQPProtocolMessageBundle; import static org.proton.plug.util.DeliveryUtil.readDelivery; @@ -71,7 +71,7 @@ public class ProtonServerReceiverContext extends AbstractProtonReceiverContext } catch (Exception e) { - throw new HornetQAMQPInternalErrorException(e.getMessage(), e); + throw new ActiveMQAMQPInternalErrorException(e.getMessage(), e); } target.setAddress(queue.toString()); } @@ -82,18 +82,18 @@ public class ProtonServerReceiverContext extends AbstractProtonReceiverContext String address = target.getAddress(); if (address == null) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.targetAddressNotSet(); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.targetAddressNotSet(); } try { if (!sessionSPI.queueQuery(address)) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.addressDoesntExist(); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.addressDoesntExist(); } } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorFindingTemporaryQueue(e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorFindingTemporaryQueue(e.getMessage()); } } } @@ -107,7 +107,7 @@ public class ProtonServerReceiverContext extends AbstractProtonReceiverContext * This may be called more than once per deliver so we have to cache the buffer until we have received it all. * * */ - public void onMessage(Delivery delivery) throws HornetQAMQPException + public void onMessage(Delivery delivery) throws ActiveMQAMQPException { Receiver receiver; try diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSenderContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSenderContext.java index 9b66de0ba9..380ea4f4b8 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSenderContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSenderContext.java @@ -30,9 +30,9 @@ import org.proton.plug.AMQPSessionCallback; import org.proton.plug.context.AbstractConnectionContext; import org.proton.plug.context.AbstractProtonContextSender; import org.proton.plug.context.AbstractProtonSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; -import org.proton.plug.exceptions.HornetQAMQPInternalErrorException; -import org.proton.plug.logger.HornetQAMQPProtocolMessageBundle; +import org.proton.plug.exceptions.ActiveMQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPInternalErrorException; +import org.proton.plug.logger.ActiveMQAMQPProtocolMessageBundle; import org.proton.plug.context.ProtonPlugSender; import org.apache.qpid.proton.amqp.messaging.Source; @@ -67,7 +67,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple /* * start the session * */ - public void start() throws HornetQAMQPException + public void start() throws ActiveMQAMQPException { super.start(); // protonSession.getServerSession().start(); @@ -81,12 +81,12 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorStartingConsumer(e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorStartingConsumer(e.getMessage()); } } /** - * create the actual underlying HornetQ Server Consumer + * create the actual underlying ActiveMQ Server Consumer */ @Override public void initialise() throws Exception @@ -122,7 +122,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorCreatingTemporaryQueue(e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorCreatingTemporaryQueue(e.getMessage()); } source.setAddress(queue); } @@ -133,19 +133,19 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple queue = source.getAddress(); if (queue == null) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.sourceAddressNotSet(); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.sourceAddressNotSet(); } try { if (!sessionSPI.queueQuery(queue)) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.sourceAddressDoesntExist(); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.sourceAddressDoesntExist(); } } catch (Exception e) { - throw new HornetQAMQPInternalErrorException(e.getMessage(), e); + throw new ActiveMQAMQPInternalErrorException(e.getMessage(), e); } } @@ -156,7 +156,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorCreatingHornetQConsumer(e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorCreatingActiveMQConsumer(e.getMessage()); } } } @@ -164,7 +164,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple /* * close the session * */ - public void close() throws HornetQAMQPException + public void close() throws ActiveMQAMQPException { super.close(); try @@ -174,12 +174,12 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple catch (Exception e) { e.printStackTrace(); - throw new HornetQAMQPInternalErrorException(e.getMessage()); + throw new ActiveMQAMQPInternalErrorException(e.getMessage()); } } - public void onMessage(Delivery delivery) throws HornetQAMQPException + public void onMessage(Delivery delivery) throws ActiveMQAMQPException { Object message = delivery.getContext(); @@ -200,7 +200,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorAcknowledgingMessage(message.toString(), e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorAcknowledgingMessage(message.toString(), e.getMessage()); } } else if (remoteState instanceof Released) @@ -211,7 +211,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorCancellingMessage(message.toString(), e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorCancellingMessage(message.toString(), e.getMessage()); } } else if (remoteState instanceof Rejected || remoteState instanceof Modified) @@ -222,7 +222,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorCancellingMessage(message.toString(), e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorCancellingMessage(message.toString(), e.getMessage()); } } //todo add tag caching @@ -253,7 +253,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple /** - * handle an out going message from HornetQ, send via the Proton Sender + * handle an out going message from ActiveMQ, send via the Proton Sender */ public int deliverMessage(Object message, int deliveryCount) throws Exception { @@ -273,7 +273,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple catch (Throwable e) { e.printStackTrace(); - throw new HornetQAMQPInternalErrorException(e.getMessage(), e); + throw new ActiveMQAMQPInternalErrorException(e.getMessage(), e); } return performSend(serverMessage, message); diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSessionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSessionContext.java index 1860c901e2..8ce784fd29 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSessionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSessionContext.java @@ -27,7 +27,7 @@ import org.proton.plug.context.AbstractProtonContextSender; import org.proton.plug.context.AbstractProtonReceiverContext; import org.proton.plug.context.AbstractProtonSessionContext; import org.proton.plug.context.ProtonTransactionHandler; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; /** * @author Clebert Suconic @@ -83,7 +83,7 @@ public class ProtonServerSessionContext extends AbstractProtonSessionContext sender.open(); protonSender.start(); } - catch (HornetQAMQPException e) + catch (ActiveMQAMQPException e) { senders.remove(sender); sender.setSource(null); @@ -92,7 +92,7 @@ public class ProtonServerSessionContext extends AbstractProtonSessionContext } } - public void removeSender(Sender sender) throws HornetQAMQPException + public void removeSender(Sender sender) throws ActiveMQAMQPException { ProtonServerSenderContext senderRemoved = (ProtonServerSenderContext) senders.remove(sender); if (senderRemoved != null) @@ -112,7 +112,7 @@ public class ProtonServerSessionContext extends AbstractProtonSessionContext receiver.setContext(protonReceiver); receiver.open(); } - catch (HornetQAMQPException e) + catch (ActiveMQAMQPException e) { receivers.remove(receiver); receiver.setTarget(null); diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPException.java similarity index 84% rename from activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPException.java rename to activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPException.java index 0a3c68ae4f..8effdd6c80 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPException.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPException.java @@ -19,7 +19,7 @@ import org.apache.qpid.proton.amqp.Symbol; * @author Andy Taylor * 6/6/13 */ -public class HornetQAMQPException extends Exception +public class ActiveMQAMQPException extends Exception { private static final String ERROR_PREFIX = "amqp:"; @@ -31,13 +31,13 @@ public class HornetQAMQPException extends Exception private final Symbol amqpError; - public HornetQAMQPException(Symbol amqpError, String message, Throwable e) + public ActiveMQAMQPException(Symbol amqpError, String message, Throwable e) { super(message, e); this.amqpError = amqpError; } - public HornetQAMQPException(Symbol amqpError, String message) + public ActiveMQAMQPException(Symbol amqpError, String message) { super(message); this.amqpError = amqpError; diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPIllegalStateException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPIllegalStateException.java similarity index 86% rename from activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPIllegalStateException.java rename to activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPIllegalStateException.java index f3e3b38fea..d1cf795479 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPIllegalStateException.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPIllegalStateException.java @@ -19,9 +19,9 @@ import org.apache.qpid.proton.amqp.transport.AmqpError; * @author Andy Taylor * 6/6/13 */ -public class HornetQAMQPIllegalStateException extends HornetQAMQPException +public class ActiveMQAMQPIllegalStateException extends ActiveMQAMQPException { - public HornetQAMQPIllegalStateException(String message) + public ActiveMQAMQPIllegalStateException(String message) { super(AmqpError.ILLEGAL_STATE, message); } diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPInternalErrorException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPInternalErrorException.java similarity index 81% rename from activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPInternalErrorException.java rename to activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPInternalErrorException.java index 7db34a79b5..065a8c829b 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPInternalErrorException.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPInternalErrorException.java @@ -19,14 +19,14 @@ import org.apache.qpid.proton.amqp.transport.AmqpError; * @author Andy Taylor * 6/6/13 */ -public class HornetQAMQPInternalErrorException extends HornetQAMQPException +public class ActiveMQAMQPInternalErrorException extends ActiveMQAMQPException { - public HornetQAMQPInternalErrorException(String message, Throwable e) + public ActiveMQAMQPInternalErrorException(String message, Throwable e) { super(AmqpError.INTERNAL_ERROR, message, e); } - public HornetQAMQPInternalErrorException(String message) + public ActiveMQAMQPInternalErrorException(String message) { super(AmqpError.INTERNAL_ERROR, message); } diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPInvalidFieldException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPInvalidFieldException.java similarity index 86% rename from activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPInvalidFieldException.java rename to activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPInvalidFieldException.java index 2f73de8abb..781d2dd9e8 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPInvalidFieldException.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPInvalidFieldException.java @@ -19,9 +19,9 @@ import org.apache.qpid.proton.amqp.transport.AmqpError; * @author Andy Taylor * 6/6/13 */ -public class HornetQAMQPInvalidFieldException extends HornetQAMQPException +public class ActiveMQAMQPInvalidFieldException extends ActiveMQAMQPException { - public HornetQAMQPInvalidFieldException(String message) + public ActiveMQAMQPInvalidFieldException(String message) { super(AmqpError.INVALID_FIELD, message); } diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPNotImplementedException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPNotImplementedException.java similarity index 86% rename from activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPNotImplementedException.java rename to activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPNotImplementedException.java index 35a2143678..cc19b335d1 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPNotImplementedException.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPNotImplementedException.java @@ -19,9 +19,9 @@ import org.apache.qpid.proton.amqp.transport.AmqpError; * @author Andy Taylor * 6/19/13 */ -public class HornetQAMQPNotImplementedException extends HornetQAMQPException +public class ActiveMQAMQPNotImplementedException extends ActiveMQAMQPException { - public HornetQAMQPNotImplementedException(String message) + public ActiveMQAMQPNotImplementedException(String message) { super(AmqpError.NOT_IMPLEMENTED, message); } diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPTimeoutException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPTimeoutException.java similarity index 86% rename from activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPTimeoutException.java rename to activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPTimeoutException.java index 50d72d82d1..11a595c081 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPTimeoutException.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPTimeoutException.java @@ -19,9 +19,9 @@ import org.apache.qpid.proton.amqp.transport.AmqpError; * @author Clebert Suconic */ -public class HornetQAMQPTimeoutException extends HornetQAMQPException +public class ActiveMQAMQPTimeoutException extends ActiveMQAMQPException { - public HornetQAMQPTimeoutException(String message) + public ActiveMQAMQPTimeoutException(String message) { super(AmqpError.ILLEGAL_STATE, message); } diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/logger/HornetQAMQPProtocolMessageBundle.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/logger/ActiveMQAMQPProtocolMessageBundle.java similarity index 58% rename from activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/logger/HornetQAMQPProtocolMessageBundle.java rename to activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/logger/ActiveMQAMQPProtocolMessageBundle.java index c4c22c892d..cf235962be 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/logger/HornetQAMQPProtocolMessageBundle.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/logger/ActiveMQAMQPProtocolMessageBundle.java @@ -12,9 +12,9 @@ */ package org.proton.plug.logger; -import org.proton.plug.exceptions.HornetQAMQPIllegalStateException; -import org.proton.plug.exceptions.HornetQAMQPInternalErrorException; -import org.proton.plug.exceptions.HornetQAMQPInvalidFieldException; +import org.proton.plug.exceptions.ActiveMQAMQPIllegalStateException; +import org.proton.plug.exceptions.ActiveMQAMQPInternalErrorException; +import org.proton.plug.exceptions.ActiveMQAMQPInvalidFieldException; import org.jboss.logging.annotations.Message; import org.jboss.logging.annotations.MessageBundle; import org.jboss.logging.Messages; @@ -30,53 +30,53 @@ import org.jboss.logging.Messages; * * @author Andy Taylor */ -@MessageBundle(projectCode = "HQ") -public interface HornetQAMQPProtocolMessageBundle +@MessageBundle(projectCode = "AMQ") +public interface ActiveMQAMQPProtocolMessageBundle { - HornetQAMQPProtocolMessageBundle BUNDLE = Messages.getBundle(HornetQAMQPProtocolMessageBundle.class); + ActiveMQAMQPProtocolMessageBundle BUNDLE = Messages.getBundle(ActiveMQAMQPProtocolMessageBundle.class); @Message(id = 219000, value = "target address not set", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPInvalidFieldException targetAddressNotSet(); + ActiveMQAMQPInvalidFieldException targetAddressNotSet(); @Message(id = 219001, value = "error creating temporary queue, {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPInternalErrorException errorCreatingTemporaryQueue(String message); + ActiveMQAMQPInternalErrorException errorCreatingTemporaryQueue(String message); @Message(id = 219002, value = "target address does not exist", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPIllegalStateException addressDoesntExist(); + ActiveMQAMQPIllegalStateException addressDoesntExist(); @Message(id = 219003, value = "error finding temporary queue, {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPInternalErrorException errorFindingTemporaryQueue(String message); + ActiveMQAMQPInternalErrorException errorFindingTemporaryQueue(String message); - @Message(id = 219004, value = "error creating HornetQ Session, {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPInternalErrorException errorCreatingHornetQSession(String message); + @Message(id = 219004, value = "error creating ActiveMQ Session, {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPInternalErrorException errorCreatingActiveMQSession(String message); - @Message(id = 219005, value = "error creating HornetQ Consumer, {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPInternalErrorException errorCreatingHornetQConsumer(String message); + @Message(id = 219005, value = "error creating ActiveMQ Consumer, {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPInternalErrorException errorCreatingActiveMQConsumer(String message); - @Message(id = 219006, value = "error starting HornetQ Consumer, {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPIllegalStateException errorStartingConsumer(String message); + @Message(id = 219006, value = "error starting ActiveMQ Consumer, {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPIllegalStateException errorStartingConsumer(String message); @Message(id = 219007, value = "error acknowledging message {0}, {1}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPIllegalStateException errorAcknowledgingMessage(String messageID, String message); + ActiveMQAMQPIllegalStateException errorAcknowledgingMessage(String messageID, String message); @Message(id = 219008, value = "error cancelling message {0}, {1}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPIllegalStateException errorCancellingMessage(String messageID, String message); + ActiveMQAMQPIllegalStateException errorCancellingMessage(String messageID, String message); @Message(id = 219009, value = "error closing consumer {0}, {1}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPIllegalStateException errorClosingConsumer(long consumerID, String message); + ActiveMQAMQPIllegalStateException errorClosingConsumer(long consumerID, String message); @Message(id = 219010, value = "source address does not exist", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPInvalidFieldException sourceAddressDoesntExist(); + ActiveMQAMQPInvalidFieldException sourceAddressDoesntExist(); @Message(id = 219011, value = "source address not set", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPInvalidFieldException sourceAddressNotSet(); + ActiveMQAMQPInvalidFieldException sourceAddressNotSet(); @Message(id = 219012, value = "error rolling back coordinator: {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPIllegalStateException errorRollingbackCoordinator(String message); + ActiveMQAMQPIllegalStateException errorRollingbackCoordinator(String message); @Message(id = 219013, value = "error committing coordinator: {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPIllegalStateException errorCommittingCoordinator(String message); + ActiveMQAMQPIllegalStateException errorCommittingCoordinator(String message); @Message(id = 219015, value = "error decoding AMQP frame", format = Message.Format.MESSAGE_FORMAT) String decodeError(); diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/util/ReusableLatch.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/util/ReusableLatch.java index 4f1f01e5a0..80285a453a 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/util/ReusableLatch.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/util/ReusableLatch.java @@ -23,7 +23,7 @@ import java.util.concurrent.locks.AbstractQueuedSynchronizer; *

*

It could be used for sync points when one process is feeding the latch while another will wait when everything is done. (e.g. waiting IO completions to finish)

*

- *

On HornetQ we have the requirement of increment and decrement a counter until the user fires a ready handler (commit). At that point we just act as a regular countDown.

+ *

On ActiveMQ we have the requirement of increment and decrement a counter until the user fires a ready handler (commit). At that point we just act as a regular countDown.

*

*

Note: This latch is reusable. Once it reaches zero, you can call up again, and reuse it on further waits.

*

diff --git a/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalServer.java b/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalServer.java index 0c20c0f37c..d3c4022658 100644 --- a/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalServer.java +++ b/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalServer.java @@ -114,9 +114,9 @@ public class MinimalServer // childOption(ChannelOption.AUTO_READ, false). childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT); - channelGroup = new DefaultChannelGroup("hornetq-accepted-channels", GlobalEventExecutor.INSTANCE); + channelGroup = new DefaultChannelGroup("activemq-accepted-channels", GlobalEventExecutor.INSTANCE); - serverChannelGroup = new DefaultChannelGroup("hornetq-acceptor-channels", GlobalEventExecutor.INSTANCE); + serverChannelGroup = new DefaultChannelGroup("activemq-acceptor-channels", GlobalEventExecutor.INSTANCE); SocketAddress address; diff --git a/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/SimpleServerThreadFactory.java b/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/SimpleServerThreadFactory.java index d33c2353c9..2919a801fe 100644 --- a/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/SimpleServerThreadFactory.java +++ b/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/SimpleServerThreadFactory.java @@ -18,7 +18,7 @@ import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; /** - * A HornetQThreadFactory + * A ActiveMQThreadFactory * * @author Tim Fox */ diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompException.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompException.java similarity index 91% rename from activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompException.java rename to activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompException.java index 82b775d869..f75356a279 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompException.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompException.java @@ -19,7 +19,7 @@ import java.util.List; /** * @author Howard Gao */ -public class HornetQStompException extends Exception +public class ActiveMQStompException extends Exception { public static final int NONE = 0; public static final int INVALID_EOL_V10 = 1; @@ -33,19 +33,19 @@ public class HornetQStompException extends Exception private VersionedStompFrameHandler handler; private boolean disconnect; - public HornetQStompException(StompConnection connection, String msg) + public ActiveMQStompException(StompConnection connection, String msg) { super(msg); handler = connection.getFrameHandler(); } - public HornetQStompException(String msg) + public ActiveMQStompException(String msg) { super(msg); handler = null; } - public HornetQStompException(String msg, Throwable t) + public ActiveMQStompException(String msg, Throwable t) { super(msg, t); this.body = t.getMessage(); @@ -53,7 +53,7 @@ public class HornetQStompException extends Exception } //used for version control logic - public HornetQStompException(int code, String details) + public ActiveMQStompException(int code, String details) { super(details); this.code = code; diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompProtocolLogger.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompProtocolLogger.java similarity index 87% rename from activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompProtocolLogger.java rename to activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompProtocolLogger.java index a30f4036e1..e5f740685e 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompProtocolLogger.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompProtocolLogger.java @@ -36,13 +36,13 @@ import org.jboss.logging.annotations.MessageLogger; * so an INFO message would be 101000 to 101999 */ -@MessageLogger(projectCode = "HQ") -public interface HornetQStompProtocolLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQStompProtocolLogger { /** * The default logger. */ - HornetQStompProtocolLogger LOGGER = Logger.getMessageLogger(HornetQStompProtocolLogger.class, HornetQStompProtocolLogger.class.getPackage().getName()); + ActiveMQStompProtocolLogger LOGGER = Logger.getMessageLogger(ActiveMQStompProtocolLogger.class, ActiveMQStompProtocolLogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.WARN) @Message(id = 222068, value = "connection closed {0}", format = Message.Format.MESSAGE_FORMAT) diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompProtocolMessageBundle.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompProtocolMessageBundle.java similarity index 75% rename from activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompProtocolMessageBundle.java rename to activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompProtocolMessageBundle.java index d895c47cc9..6eb5da0d81 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompProtocolMessageBundle.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompProtocolMessageBundle.java @@ -31,91 +31,91 @@ import org.jboss.logging.Messages; * @author Howard Gao */ -@MessageBundle(projectCode = "HQ") -public interface HornetQStompProtocolMessageBundle +@MessageBundle(projectCode = "AMQ") +public interface ActiveMQStompProtocolMessageBundle { - HornetQStompProtocolMessageBundle BUNDLE = Messages.getBundle(HornetQStompProtocolMessageBundle.class); + ActiveMQStompProtocolMessageBundle BUNDLE = Messages.getBundle(ActiveMQStompProtocolMessageBundle.class); @Message(id = 339000, value = "Stomp Connection TTL cannot be negative: {0}", format = Message.Format.MESSAGE_FORMAT) IllegalStateException negativeConnectionTTL(Long ttl); @Message(id = 339001, value = "Destination does not exist: {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException destinationNotExist(String destination); + ActiveMQStompException destinationNotExist(String destination); @Message(id = 339002, value = "Stomp versions not supported: {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException versionNotSupported(String acceptVersion); + ActiveMQStompException versionNotSupported(String acceptVersion); @Message(id = 339003, value = "Header host is null", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException nullHostHeader(); + ActiveMQStompException nullHostHeader(); @Message(id = 339004, value = "Cannot accept null as host", format = Message.Format.MESSAGE_FORMAT) String hostCannotBeNull(); @Message(id = 339005, value = "Header host does not match server host", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException hostNotMatch(); + ActiveMQStompException hostNotMatch(); @Message(id = 339006, value = "host {0} does not match server host name", format = Message.Format.MESSAGE_FORMAT) String hostNotMatchDetails(String host); @Message(id = 339007, value = "Connection was destroyed.", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException connectionDestroyed(); + ActiveMQStompException connectionDestroyed(); @Message(id = 339008, value = "Connection has not been established.", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException connectionNotEstablished(); + ActiveMQStompException connectionNotEstablished(); @Message(id = 339009, value = "Exception getting session", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException errorGetSession(@Cause Exception e); + ActiveMQStompException errorGetSession(@Cause Exception e); @Message(id = 339010, value = "Connection is not valid.", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException invalidConnection(); + ActiveMQStompException invalidConnection(); @Message(id = 339011, value = "Error sending message {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException errorSendMessage(ServerMessageImpl message, @Cause Exception e); + ActiveMQStompException errorSendMessage(ServerMessageImpl message, @Cause Exception e); @Message(id = 339012, value = "Error beginning a transaction {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException errorBeginTx(String txID, @Cause Exception e); + ActiveMQStompException errorBeginTx(String txID, @Cause Exception e); @Message(id = 339013, value = "Error committing {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException errorCommitTx(String txID, @Cause Exception e); + ActiveMQStompException errorCommitTx(String txID, @Cause Exception e); @Message(id = 339014, value = "Error aborting {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException errorAbortTx(String txID, @Cause Exception e); + ActiveMQStompException errorAbortTx(String txID, @Cause Exception e); @Message(id = 339015, value = "Client must set destination or id header to a SUBSCRIBE command", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException noDestination(); + ActiveMQStompException noDestination(); @Message(id = 339016, value = "Error creating subscription {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException errorCreatSubscription(String subscriptionID, @Cause Exception e); + ActiveMQStompException errorCreatSubscription(String subscriptionID, @Cause Exception e); @Message(id = 339017, value = "Error unsubscribing {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException errorUnsubscrib(String subscriptionID, @Cause Exception e); + ActiveMQStompException errorUnsubscrib(String subscriptionID, @Cause Exception e); @Message(id = 339018, value = "Error acknowledging message {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException errorAck(String messageID, @Cause Exception e); + ActiveMQStompException errorAck(String messageID, @Cause Exception e); @Message(id = 339019, value = "Invalid char sequence: two consecutive CRs.", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException invalidTwoCRs(); + ActiveMQStompException invalidTwoCRs(); @Message(id = 339020, value = "Invalid char sequence: There is a CR not followed by an LF", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException badCRs(); + ActiveMQStompException badCRs(); @Message(id = 339021, value = "Expect new line char but is {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException notValidNewLine(byte b); + ActiveMQStompException notValidNewLine(byte b); @Message(id = 339022, value = "Expect new line char but is {0}", format = Message.Format.MESSAGE_FORMAT) String unexpectedNewLine(byte b); @Message(id = 339023, value = "Invalid STOMP frame: {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException invalidCommand(String dumpByteArray); + ActiveMQStompException invalidCommand(String dumpByteArray); @Message(id = 339024, value = "Invalid STOMP frame: {0}", format = Message.Format.MESSAGE_FORMAT) String invalidFrame(String dumpByteArray); @Message(id = 339025, value = "failed to ack because no message with id: {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException failToAckMissingID(long id); + ActiveMQStompException failToAckMissingID(long id); @Message(id = 339026, value = "subscription id {0} does not match {1}", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException subscriptionIDMismatch(String subscriptionID, String actualID); + ActiveMQStompException subscriptionIDMismatch(String subscriptionID, String actualID); @Message(id = 339027, value = "Cannot create a subscriber on the durable subscription if the client-id of the connection is not set", format = Message.Format.MESSAGE_FORMAT) IllegalStateException missingClientID(); @@ -124,29 +124,29 @@ public interface HornetQStompProtocolMessageBundle Exception headerTooBig(); @Message(id = 339029, value = "Unsupported command: {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException unknownCommand(String command); + ActiveMQStompException unknownCommand(String command); @Message(id = 339030, value = "transaction header is mandatory to COMMIT a transaction", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException needTxIDHeader(); + ActiveMQStompException needTxIDHeader(); @Message(id = 339031, value = "Error handling send", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException errorHandleSend(@Cause Exception e); + ActiveMQStompException errorHandleSend(@Cause Exception e); @Message(id = 339032, value = "Need a transaction id to begin", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException beginTxNoID(); + ActiveMQStompException beginTxNoID(); @Message(id = 339033, value = "transaction header is mandatory to ABORT a transaction", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException abortTxNoID(); + ActiveMQStompException abortTxNoID(); @Message(id = 339034, value = "This method should not be called", format = Message.Format.MESSAGE_FORMAT) IllegalStateException invalidCall(); @Message(id = 339035, value = "Must specify the subscription''s id or the destination you are unsubscribing from", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException needIDorDestination(); + ActiveMQStompException needIDorDestination(); @Message(id = 339037, value = "Must specify the subscription''s id", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException needSubscriptionID(); + ActiveMQStompException needSubscriptionID(); @Message(id = 339039, value = "No id header in ACK/NACK frame.", format = Message.Format.MESSAGE_FORMAT) - HornetQStompException noIDInAck(); + ActiveMQStompException noIDInAck(); } diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompConnection.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompConnection.java index 733faf6fe3..40c13a3c30 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompConnection.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompConnection.java @@ -23,13 +23,13 @@ import java.util.concurrent.CopyOnWriteArrayList; import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.ActiveMQException; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.core.protocol.stomp.v10.StompFrameHandlerV10; import org.apache.activemq.core.protocol.stomp.v12.StompFrameHandlerV12; import org.apache.activemq.core.remoting.CloseListener; import org.apache.activemq.core.remoting.FailureListener; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.server.impl.ServerMessageImpl; import org.apache.activemq.spi.core.protocol.RemotingConnection; @@ -38,7 +38,7 @@ import org.apache.activemq.spi.core.remoting.Connection; import org.apache.activemq.utils.ConfigurationHelper; import org.apache.activemq.utils.VersionLoader; -import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE; +import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE; /** * A StompConnection @@ -48,8 +48,8 @@ import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessag public final class StompConnection implements RemotingConnection { protected static final String CONNECTION_ID_PROP = "__HQ_CID"; - private static final String SERVER_NAME = "HornetQ/" + VersionLoader.getVersion().getFullVersion() + - " HornetQ Messaging Engine"; + private static final String SERVER_NAME = "ActiveMQ/" + VersionLoader.getVersion().getFullVersion() + + " ActiveMQ Messaging Engine"; private final StompProtocolManager manager; @@ -93,24 +93,24 @@ public final class StompConnection implements RemotingConnection private int minLargeMessageSize; - public StompFrame decode(ActiveMQBuffer buffer) throws HornetQStompException + public StompFrame decode(ActiveMQBuffer buffer) throws ActiveMQStompException { StompFrame frame = null; try { frame = frameHandler.decode(buffer); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { switch (e.getCode()) { - case HornetQStompException.INVALID_EOL_V10: + case ActiveMQStompException.INVALID_EOL_V10: if (version != null) throw e; frameHandler = new StompFrameHandlerV12(this); buffer.resetReaderIndex(); frame = decode(buffer); break; - case HornetQStompException.INVALID_COMMAND: + case ActiveMQStompException.INVALID_COMMAND: frameHandler.onError(e); break; default: @@ -141,7 +141,7 @@ public final class StompConnection implements RemotingConnection false, acceptorUsed.getConfiguration()); this.minLargeMessageSize = ConfigurationHelper.getIntProperty(TransportConstants.STOMP_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, acceptorUsed.getConfiguration()); } @@ -239,7 +239,7 @@ public final class StompConnection implements RemotingConnection return res; } - public void checkDestination(String destination) throws HornetQStompException + public void checkDestination(String destination) throws ActiveMQStompException { if (!manager.destinationExists(destination)) { @@ -297,7 +297,7 @@ public final class StompConnection implements RemotingConnection destroyed = true; } - HornetQServerLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType()); + ActiveMQServerLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType()); // Then call the listeners callFailureListeners(me); @@ -402,7 +402,7 @@ public final class StompConnection implements RemotingConnection // Failure of one listener to execute shouldn't prevent others // from // executing - HornetQServerLogger.LOGGER.errorCallingFailureListener(t); + ActiveMQServerLogger.LOGGER.errorCallingFailureListener(t); } } } @@ -422,7 +422,7 @@ public final class StompConnection implements RemotingConnection // Failure of one listener to execute shouldn't prevent others // from // executing - HornetQServerLogger.LOGGER.errorCallingFailureListener(t); + ActiveMQServerLogger.LOGGER.errorCallingFailureListener(t); } } } @@ -431,7 +431,7 @@ public final class StompConnection implements RemotingConnection * accept-version value takes form of "v1,v2,v3..." * we need to return the highest supported version */ - public void negotiateVersion(StompFrame frame) throws HornetQStompException + public void negotiateVersion(StompFrame frame) throws ActiveMQStompException { String acceptVersion = frame.getHeader(Stomp.Headers.ACCEPT_VERSION); @@ -463,7 +463,7 @@ public final class StompConnection implements RemotingConnection else { //not a supported version! - HornetQStompException error = BUNDLE.versionNotSupported(acceptVersion); + ActiveMQStompException error = BUNDLE.versionNotSupported(acceptVersion); error.addHeader("version", acceptVersion); error.addHeader("content-type", "text/plain"); error.setBody("Supported protocol version are " + manager.getSupportedVersionsAsString()); @@ -483,11 +483,11 @@ public final class StompConnection implements RemotingConnection } //reject if the host doesn't match - public void setHost(String host) throws HornetQStompException + public void setHost(String host) throws ActiveMQStompException { if (host == null) { - HornetQStompException error = BUNDLE.nullHostHeader(); + ActiveMQStompException error = BUNDLE.nullHostHeader(); error.setBody(BUNDLE.hostCannotBeNull()); throw error; } @@ -495,7 +495,7 @@ public final class StompConnection implements RemotingConnection String localHost = manager.getVirtualHostName(); if (!host.equals(localHost)) { - HornetQStompException error = BUNDLE.hostNotMatch(); + ActiveMQStompException error = BUNDLE.hostNotMatch(); error.setBody(BUNDLE.hostNotMatchDetails(host)); throw error; } @@ -529,7 +529,7 @@ public final class StompConnection implements RemotingConnection reply = frameHandler.handleFrame(request); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { reply = e.getFrame(); } @@ -566,7 +566,7 @@ public final class StompConnection implements RemotingConnection return manager.createServerMessage(); } - public StompSession getSession(String txID) throws HornetQStompException + public StompSession getSession(String txID) throws ActiveMQStompException { StompSession session = null; try @@ -588,7 +588,7 @@ public final class StompConnection implements RemotingConnection return session; } - protected void validate() throws HornetQStompException + protected void validate() throws ActiveMQStompException { if (!this.valid) { @@ -596,7 +596,7 @@ public final class StompConnection implements RemotingConnection } } - protected void sendServerMessage(ServerMessageImpl message, String txID) throws HornetQStompException + protected void sendServerMessage(ServerMessageImpl message, String txID) throws ActiveMQStompException { StompSession stompSession = getSession(txID); @@ -638,13 +638,13 @@ public final class StompConnection implements RemotingConnection destroy(); } - protected void beginTransaction(String txID) throws HornetQStompException + protected void beginTransaction(String txID) throws ActiveMQStompException { try { manager.beginTransaction(this, txID); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { throw e; } @@ -654,7 +654,7 @@ public final class StompConnection implements RemotingConnection } } - public void commitTransaction(String txID) throws HornetQStompException + public void commitTransaction(String txID) throws ActiveMQStompException { try { @@ -666,13 +666,13 @@ public final class StompConnection implements RemotingConnection } } - public void abortTransaction(String txID) throws HornetQStompException + public void abortTransaction(String txID) throws ActiveMQStompException { try { manager.abortTransaction(this, txID); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { throw e; } @@ -683,7 +683,7 @@ public final class StompConnection implements RemotingConnection } void subscribe(String destination, String selector, String ack, - String id, String durableSubscriptionName, boolean noLocal) throws HornetQStompException + String id, String durableSubscriptionName, boolean noLocal) throws ActiveMQStompException { if (noLocal) { @@ -721,7 +721,7 @@ public final class StompConnection implements RemotingConnection { manager.createSubscription(this, subscriptionID, durableSubscriptionName, destination, selector, ack, noLocal); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { throw e; } @@ -731,13 +731,13 @@ public final class StompConnection implements RemotingConnection } } - public void unsubscribe(String subscriptionID, String durableSubscriberName) throws HornetQStompException + public void unsubscribe(String subscriptionID, String durableSubscriberName) throws ActiveMQStompException { try { manager.unsubscribe(this, subscriptionID, durableSubscriberName); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { throw e; } @@ -747,13 +747,13 @@ public final class StompConnection implements RemotingConnection } } - public void acknowledge(String messageID, String subscriptionID) throws HornetQStompException + public void acknowledge(String messageID, String subscriptionID) throws ActiveMQStompException { try { manager.acknowledge(this, messageID, subscriptionID); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { throw e; } @@ -768,7 +768,7 @@ public final class StompConnection implements RemotingConnection return String.valueOf(version); } - public String getHornetQServerName() + public String getActiveMQServerName() { return SERVER_NAME; } @@ -792,7 +792,7 @@ public final class StompConnection implements RemotingConnection public void physicalSend(StompFrame frame) throws Exception { - ActiveMQBuffer buffer = frame.toHornetQBuffer(); + ActiveMQBuffer buffer = frame.toActiveMQBuffer(); synchronized (sendLock) { getTransportConnection().write(buffer, false, false); diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompDecoder.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompDecoder.java index e7d15c228b..f122ccc8b1 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompDecoder.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompDecoder.java @@ -17,7 +17,7 @@ import java.util.Map; import org.apache.activemq.api.core.ActiveMQBuffer; -import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE; +import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE; /** * A StompDecoder @@ -188,7 +188,7 @@ public class StompDecoder * unsupported EOLs ("\r\n" valid for 1.2 only). The StompConnection will switch * to proper version decoders on catching such exceptions. */ - public synchronized StompFrame decode(final ActiveMQBuffer buffer) throws HornetQStompException + public synchronized StompFrame decode(final ActiveMQBuffer buffer) throws ActiveMQStompException { int readable = buffer.readableBytes(); @@ -225,7 +225,7 @@ public class StompDecoder return ret; } - protected StompFrame parseBody() throws HornetQStompException + protected StompFrame parseBody() throws ActiveMQStompException { byte[] content = null; @@ -293,7 +293,7 @@ public class StompDecoder } } - protected boolean parseHeaders() throws HornetQStompException + protected boolean parseHeaders() throws ActiveMQStompException { if (headerBytesCopyStart == -1) { @@ -399,7 +399,7 @@ public class StompDecoder return true; } - protected boolean parseCommand() throws HornetQStompException + protected boolean parseCommand() throws ActiveMQStompException { int offset = 0; boolean nextChar = false; @@ -621,8 +621,8 @@ public class StompDecoder if (workingBuffer[pos - 1] != NEW_LINE) { //give a signal to try other versions - HornetQStompException error = BUNDLE.notValidNewLine(workingBuffer[pos - 1]); - error.setCode(HornetQStompException.INVALID_EOL_V10); + ActiveMQStompException error = BUNDLE.notValidNewLine(workingBuffer[pos - 1]); + error.setCode(ActiveMQStompException.INVALID_EOL_V10); error.setBody(BUNDLE.unexpectedNewLine(workingBuffer[pos - 1])); throw error; } @@ -630,10 +630,10 @@ public class StompDecoder return true; } - public void throwInvalid() throws HornetQStompException + public void throwInvalid() throws ActiveMQStompException { - HornetQStompException error = BUNDLE.invalidCommand(this.dumpByteArray(workingBuffer)); - error.setCode(HornetQStompException.INVALID_COMMAND); + ActiveMQStompException error = BUNDLE.invalidCommand(this.dumpByteArray(workingBuffer)); + error.setCode(ActiveMQStompException.INVALID_COMMAND); error.setBody(BUNDLE.invalidFrame(this.dumpByteArray(workingBuffer))); throw error; } diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompFrame.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompFrame.java index 46aa639c19..525c514f7d 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompFrame.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompFrame.java @@ -75,7 +75,7 @@ public class StompFrame { if (buffer == null) { - buffer = toHornetQBuffer(); + buffer = toActiveMQBuffer(); } return size; } @@ -97,7 +97,7 @@ public class StompFrame isPing = ping; } - public ActiveMQBuffer toHornetQBuffer() throws Exception + public ActiveMQBuffer toActiveMQBuffer() throws Exception { if (buffer == null) { diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManager.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManager.java index 9e1a0b4200..24ea296885 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManager.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManager.java @@ -27,15 +27,15 @@ import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.management.CoreNotificationType; import org.apache.activemq.api.core.management.ManagementHelper; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.postoffice.BindingType; import org.apache.activemq.core.remoting.impl.netty.NettyServerConnection; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.ServerSession; import org.apache.activemq.core.server.impl.ServerMessageImpl; import org.apache.activemq.core.server.management.ManagementService; @@ -47,12 +47,12 @@ import org.apache.activemq.spi.core.protocol.ProtocolManager; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.remoting.Acceptor; import org.apache.activemq.spi.core.remoting.Connection; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; import org.apache.activemq.utils.ConcurrentHashSet; import org.apache.activemq.utils.TypedProperties; import org.apache.activemq.utils.UUIDGenerator; -import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE; +import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE; /** * StompProtocolManager @@ -65,7 +65,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener // Attributes ---------------------------------------------------- - private final HornetQServer server; + private final ActiveMQServer server; private final Executor executor; @@ -80,7 +80,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener // Constructors -------------------------------------------------- - public StompProtocolManager(final HornetQServer server, final List interceptors) + public StompProtocolManager(final ActiveMQServer server, final List interceptors) { this.server = server; this.executor = server.getExecutorFactory().getExecutor(); @@ -152,7 +152,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener } catch (Exception e) { - HornetQServerLogger.LOGGER.errorDecodingPacket(e); + ActiveMQServerLogger.LOGGER.errorDecodingPacket(e); return; } @@ -194,15 +194,15 @@ class StompProtocolManager implements ProtocolManager, NotificationListener public boolean send(final StompConnection connection, final StompFrame frame) { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("sent " + frame); + ActiveMQServerLogger.LOGGER.trace("sent " + frame); } synchronized (connection) { if (connection.isDestroyed()) { - HornetQStompProtocolLogger.LOGGER.connectionClosed(connection); + ActiveMQStompProtocolLogger.LOGGER.connectionClosed(connection); return false; } @@ -212,7 +212,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener } catch (Exception e) { - HornetQStompProtocolLogger.LOGGER.errorSendingFrame(e, frame); + ActiveMQStompProtocolLogger.LOGGER.errorSendingFrame(e, frame); return false; } return true; @@ -236,7 +236,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener ServerSession session = server.createSession(name, connection.getLogin(), connection.getPasscode(), - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, connection, true, false, @@ -261,7 +261,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener ServerSession session = server.createSession(name, connection.getLogin(), connection.getPasscode(), - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, connection, false, false, @@ -296,7 +296,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener } catch (Exception e) { - HornetQServerLogger.LOGGER.errorCleaningStompConn(e); + ActiveMQServerLogger.LOGGER.errorCleaningStompConn(e); } } @@ -315,7 +315,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener } catch (Exception e) { - HornetQServerLogger.LOGGER.errorCleaningStompConn(e); + ActiveMQServerLogger.LOGGER.errorCleaningStompConn(e); } iterator.remove(); } @@ -330,9 +330,9 @@ class StompProtocolManager implements ProtocolManager, NotificationListener { public void onError(final int errorCode, final String errorMessage) { - HornetQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage); + ActiveMQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage); - HornetQStompException e = new HornetQStompException("Error sending reply", + ActiveMQStompException e = new ActiveMQStompException("Error sending reply", ActiveMQExceptionType.createException(errorCode, errorMessage)); StompFrame error = e.getFrame(); @@ -353,14 +353,14 @@ class StompProtocolManager implements ProtocolManager, NotificationListener public String getVirtualHostName() { - return "hornetq"; + return "activemq"; } public boolean validateUser(String login, String passcode) { boolean validated = true; - HornetQSecurityManager sm = server.getSecurityManager(); + ActiveMQSecurityManager sm = server.getSecurityManager(); if (sm != null && server.getConfiguration().isSecurityEnabled()) { @@ -380,7 +380,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener StompSession session = getTransactedSession(connection, txID); if (session == null) { - throw new HornetQStompException("No transaction started: " + txID); + throw new ActiveMQStompException("No transaction started: " + txID); } transactedSessions.remove(txID); session.getSession().commit(); @@ -391,7 +391,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener StompSession session = getTransactedSession(connection, txID); if (session == null) { - throw new HornetQStompException("No transaction started: " + txID); + throw new ActiveMQStompException("No transaction started: " + txID); } transactedSessions.remove(txID); session.getSession().rollback(false); @@ -406,7 +406,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener stompSession.setNoLocal(noLocal); if (stompSession.containsSubscription(subscriptionID)) { - throw new HornetQStompException("There already is a subscription for: " + subscriptionID + + throw new ActiveMQStompException("There already is a subscription for: " + subscriptionID + ". Either use unique subscription IDs or do not create multiple subscriptions for the same destination"); } long consumerID = server.getStorageManager().generateID(); @@ -427,7 +427,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener boolean unsubscribed = stompSession.unsubscribe(subscriptionID, durableSubscriberName); if (!unsubscribed) { - throw new HornetQStompException("Cannot unsubscribe as no subscription exists for id: " + subscriptionID); + throw new ActiveMQStompException("Cannot unsubscribe as no subscription exists for id: " + subscriptionID); } } @@ -439,11 +439,11 @@ class StompProtocolManager implements ProtocolManager, NotificationListener public void beginTransaction(StompConnection connection, String txID) throws Exception { - HornetQServerLogger.LOGGER.stompBeginTX(txID); + ActiveMQServerLogger.LOGGER.stompBeginTX(txID); if (transactedSessions.containsKey(txID)) { - HornetQServerLogger.LOGGER.stompErrorTXExists(txID); - throw new HornetQStompException(connection, "Transaction already started: " + txID); + ActiveMQServerLogger.LOGGER.stompErrorTXExists(txID); + throw new ActiveMQStompException(connection, "Transaction already started: " + txID); } // create the transacted session getTransactedSession(connection, txID); @@ -469,7 +469,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener { if (!props.containsProperty(ManagementHelper.HDR_BINDING_TYPE)) { - throw HornetQMessageBundle.BUNDLE.bindingTypeNotSpecified(); + throw ActiveMQMessageBundle.BUNDLE.bindingTypeNotSpecified(); } Integer bindingType = props.getIntProperty(ManagementHelper.HDR_BINDING_TYPE); diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManagerFactory.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManagerFactory.java index 60f5810d9f..365a23c7bb 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManagerFactory.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManagerFactory.java @@ -15,7 +15,7 @@ package org.apache.activemq.core.protocol.stomp; import java.util.List; import org.apache.activemq.api.core.Interceptor; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.spi.core.protocol.ProtocolManager; import org.apache.activemq.spi.core.protocol.ProtocolManagerFactory; @@ -32,7 +32,7 @@ public class StompProtocolManagerFactory implements ProtocolManagerFactory private static String[] SUPPORTED_PROTOCOLS = {STOMP_PROTOCOL_NAME}; - public ProtocolManager createProtocolManager(final HornetQServer server, final List incomingInterceptors, List outgoingInterceptors) + public ProtocolManager createProtocolManager(final ActiveMQServer server, final List incomingInterceptors, List outgoingInterceptors) { return new StompProtocolManager(server, incomingInterceptors); } diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompSession.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompSession.java index 30baf5647f..96fb75ce31 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompSession.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompSession.java @@ -41,7 +41,7 @@ import org.apache.activemq.spi.core.remoting.ReadyListener; import org.apache.activemq.utils.ConfigurationHelper; import org.apache.activemq.utils.UUIDGenerator; -import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE; +import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE; /** * A StompSession diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/VersionedStompFrameHandler.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/VersionedStompFrameHandler.java index 8057a18db3..1500ab54a8 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/VersionedStompFrameHandler.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/VersionedStompFrameHandler.java @@ -26,7 +26,7 @@ import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.server.impl.ServerMessageImpl; import org.apache.activemq.utils.DataConstants; -import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE; +import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE; /** * @author Howard Gao @@ -58,7 +58,7 @@ public abstract class VersionedStompFrameHandler this.connection = connection; } - public StompFrame decode(ActiveMQBuffer buffer) throws HornetQStompException + public StompFrame decode(ActiveMQBuffer buffer) throws ActiveMQStompException { return decoder.decode(buffer); } @@ -157,7 +157,7 @@ public abstract class VersionedStompFrameHandler public StompFrame onUnknown(String command) { - HornetQStompException error = BUNDLE.unknownCommand(command); + ActiveMQStompException error = BUNDLE.unknownCommand(command); StompFrame response = error.getFrame(); return response; } @@ -177,7 +177,7 @@ public abstract class VersionedStompFrameHandler String txID = request.getHeader(Stomp.Headers.TRANSACTION); if (txID == null) { - HornetQStompException error = BUNDLE.needTxIDHeader(); + ActiveMQStompException error = BUNDLE.needTxIDHeader(); response = error.getFrame(); return response; } @@ -186,7 +186,7 @@ public abstract class VersionedStompFrameHandler { connection.commitTransaction(txID); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { response = e.getFrame(); } @@ -223,20 +223,20 @@ public abstract class VersionedStompFrameHandler connection.sendServerMessage(message, txID); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { response = e.getFrame(); } catch (Exception e) { - HornetQStompException error = BUNDLE.errorHandleSend(e); + ActiveMQStompException error = BUNDLE.errorHandleSend(e); response = error.getFrame(); } return response; } - private void checkDestination(String destination) throws HornetQStompException + private void checkDestination(String destination) throws ActiveMQStompException { connection.checkDestination(destination); } @@ -247,7 +247,7 @@ public abstract class VersionedStompFrameHandler String txID = frame.getHeader(Stomp.Headers.TRANSACTION); if (txID == null) { - HornetQStompException error = BUNDLE.beginTxNoID(); + ActiveMQStompException error = BUNDLE.beginTxNoID(); response = error.getFrame(); } else @@ -256,7 +256,7 @@ public abstract class VersionedStompFrameHandler { connection.beginTransaction(txID); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { response = e.getFrame(); } @@ -271,7 +271,7 @@ public abstract class VersionedStompFrameHandler if (txID == null) { - HornetQStompException error = BUNDLE.abortTxNoID(); + ActiveMQStompException error = BUNDLE.abortTxNoID(); response = error.getFrame(); return response; } @@ -280,7 +280,7 @@ public abstract class VersionedStompFrameHandler { connection.abortTransaction(txID); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { response = e.getFrame(); } @@ -308,7 +308,7 @@ public abstract class VersionedStompFrameHandler { connection.subscribe(destination, selector, ack, id, durableSubscriptionName, noLocal); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { response = e.getFrame(); } @@ -400,7 +400,7 @@ public abstract class VersionedStompFrameHandler } //sends an ERROR frame back to client if possible then close the connection - public void onError(HornetQStompException e) + public void onError(ActiveMQStompException e) { this.connection.sendFrame(e.getFrame()); connection.destroy(); diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v10/StompFrameHandlerV10.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v10/StompFrameHandlerV10.java index 6b20126cd8..94395f7aee 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v10/StompFrameHandlerV10.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v10/StompFrameHandlerV10.java @@ -15,15 +15,15 @@ package org.apache.activemq.core.protocol.stomp.v10; import java.util.Map; import org.apache.activemq.core.protocol.stomp.FrameEventListener; -import org.apache.activemq.core.protocol.stomp.HornetQStompException; +import org.apache.activemq.core.protocol.stomp.ActiveMQStompException; import org.apache.activemq.core.protocol.stomp.Stomp; import org.apache.activemq.core.protocol.stomp.StompConnection; import org.apache.activemq.core.protocol.stomp.StompDecoder; import org.apache.activemq.core.protocol.stomp.StompFrame; import org.apache.activemq.core.protocol.stomp.VersionedStompFrameHandler; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; -import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE; +import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE; /** * @@ -101,7 +101,7 @@ public class StompFrameHandlerV10 extends VersionedStompFrameHandler implements { if (destination == null) { - HornetQStompException error = BUNDLE.needIDorDestination(); + ActiveMQStompException error = BUNDLE.needIDorDestination(); response = error.getFrame(); return response; } @@ -112,7 +112,7 @@ public class StompFrameHandlerV10 extends VersionedStompFrameHandler implements { connection.unsubscribe(subscriptionID, durableSubscriberName); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { return e.getFrame(); } @@ -129,14 +129,14 @@ public class StompFrameHandlerV10 extends VersionedStompFrameHandler implements if (txID != null) { - HornetQServerLogger.LOGGER.stompTXAckNorSupported(); + ActiveMQServerLogger.LOGGER.stompTXAckNorSupported(); } try { connection.acknowledge(messageID, null); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { response = e.getFrame(); } diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameHandlerV11.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameHandlerV11.java index 9b6b108e38..bc77cb8cea 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameHandlerV11.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameHandlerV11.java @@ -15,17 +15,17 @@ package org.apache.activemq.core.protocol.stomp.v11; import java.util.Map; import java.util.concurrent.atomic.AtomicLong; +import org.apache.activemq.core.protocol.stomp.ActiveMQStompException; import org.apache.activemq.core.protocol.stomp.FrameEventListener; -import org.apache.activemq.core.protocol.stomp.HornetQStompException; import org.apache.activemq.core.protocol.stomp.SimpleBytes; import org.apache.activemq.core.protocol.stomp.Stomp; import org.apache.activemq.core.protocol.stomp.StompConnection; import org.apache.activemq.core.protocol.stomp.StompDecoder; import org.apache.activemq.core.protocol.stomp.StompFrame; import org.apache.activemq.core.protocol.stomp.VersionedStompFrameHandler; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; -import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE; +import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE; /** * @author Howard Gao @@ -73,7 +73,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements // server response.addHeader(Stomp.Headers.Connected.SERVER, - connection.getHornetQServerName()); + connection.getActiveMQServerName()); if (requestID != null) { @@ -107,7 +107,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements response.setBody("The login account is not valid."); } } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { response = e.getFrame(); } @@ -117,12 +117,12 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements //ping parameters, hard-code for now //the server can support min 20 milliseconds and receive ping at 100 milliseconds (20,100) - private void handleHeartBeat(String heartBeatHeader) throws HornetQStompException + private void handleHeartBeat(String heartBeatHeader) throws ActiveMQStompException { String[] params = heartBeatHeader.split(","); if (params.length != 2) { - throw new HornetQStompException("Incorrect heartbeat header " + heartBeatHeader); + throw new ActiveMQStompException("Incorrect heartbeat header " + heartBeatHeader); } //client ping @@ -148,7 +148,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements } catch (InterruptedException e) { - HornetQServerLogger.LOGGER.errorOnStompHeartBeat(e); + ActiveMQServerLogger.LOGGER.errorOnStompHeartBeat(e); } } return null; @@ -177,7 +177,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements { connection.unsubscribe(subscriptionID, durableSubscriberName); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { response = e.getFrame(); } @@ -195,7 +195,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements if (txID != null) { - HornetQServerLogger.LOGGER.stompTXAckNorSupported(); + ActiveMQServerLogger.LOGGER.stompTXAckNorSupported(); } if (subscriptionID == null) @@ -208,7 +208,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements { connection.acknowledge(messageID, subscriptionID); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { response = e.getFrame(); } @@ -444,7 +444,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements } @Override - protected boolean parseCommand() throws HornetQStompException + protected boolean parseCommand() throws ActiveMQStompException { int offset = 0; boolean nextChar = false; @@ -692,7 +692,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements return true; } - protected void checkEol() throws HornetQStompException + protected void checkEol() throws ActiveMQStompException { if (workingBuffer[pos - 1] != NEW_LINE) { @@ -701,7 +701,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements } @Override - protected boolean parseHeaders() throws HornetQStompException + protected boolean parseHeaders() throws ActiveMQStompException { @@ -822,7 +822,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements return true; } - protected StompFrame parseBody() throws HornetQStompException + protected StompFrame parseBody() throws ActiveMQStompException { byte[] content = null; diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameV11.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameV11.java index 2fef54e125..f8d265452f 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameV11.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameV11.java @@ -43,7 +43,7 @@ public class StompFrameV11 extends StompFrame } @Override - public ActiveMQBuffer toHornetQBuffer() throws Exception + public ActiveMQBuffer toActiveMQBuffer() throws Exception { if (buffer == null) { diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameHandlerV12.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameHandlerV12.java index 5047b3d997..79f7620c47 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameHandlerV12.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameHandlerV12.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.protocol.stomp.v12; import org.apache.activemq.core.protocol.stomp.FrameEventListener; -import org.apache.activemq.core.protocol.stomp.HornetQStompException; +import org.apache.activemq.core.protocol.stomp.ActiveMQStompException; import org.apache.activemq.core.protocol.stomp.Stomp; import org.apache.activemq.core.protocol.stomp.StompConnection; import org.apache.activemq.core.protocol.stomp.StompDecoder; @@ -21,10 +21,10 @@ import org.apache.activemq.core.protocol.stomp.StompFrame; import org.apache.activemq.core.protocol.stomp.StompSubscription; import org.apache.activemq.core.protocol.stomp.v11.StompFrameHandlerV11; import org.apache.activemq.core.protocol.stomp.v11.StompFrameV11; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.ServerMessage; -import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE; +import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE; /** * @author Howard Gao @@ -72,12 +72,12 @@ public class StompFrameHandlerV12 extends StompFrameHandlerV11 implements FrameE if (txID != null) { - HornetQServerLogger.LOGGER.stompTXAckNorSupported(); + ActiveMQServerLogger.LOGGER.stompTXAckNorSupported(); } if (messageID == null) { - HornetQStompException error = BUNDLE.noIDInAck(); + ActiveMQStompException error = BUNDLE.noIDInAck(); error.setHandler(connection.getFrameHandler()); return error.getFrame(); } @@ -86,7 +86,7 @@ public class StompFrameHandlerV12 extends StompFrameHandlerV11 implements FrameE { connection.acknowledge(messageID, null); } - catch (HornetQStompException e) + catch (ActiveMQStompException e) { response = e.getFrame(); } @@ -112,7 +112,7 @@ public class StompFrameHandlerV12 extends StompFrameHandlerV11 implements FrameE } @Override - protected void checkEol() throws HornetQStompException + protected void checkEol() throws ActiveMQStompException { //either \n or \r\n if (workingBuffer[pos - 2] == NEW_LINE) @@ -139,7 +139,7 @@ public class StompFrameHandlerV12 extends StompFrameHandlerV11 implements FrameE } @Override - protected boolean parseHeaders() throws HornetQStompException + protected boolean parseHeaders() throws ActiveMQStompException { outer: while (true) @@ -283,7 +283,7 @@ public class StompFrameHandlerV12 extends StompFrameHandlerV11 implements FrameE return true; } - protected StompFrame parseBody() throws HornetQStompException + protected StompFrame parseBody() throws ActiveMQStompException { byte[] content = null; diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameV12.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameV12.java index 675423287c..617b2cfbaa 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameV12.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameV12.java @@ -43,7 +43,7 @@ public class StompFrameV12 extends StompFrame } @Override - public ActiveMQBuffer toHornetQBuffer() throws Exception + public ActiveMQBuffer toActiveMQBuffer() throws Exception { if (buffer == null) { diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/resources/META-INF/services/org.hornetq.spi.core.protocol.ProtocolManagerFactory b/activemq-protocols/activemq-stomp-protocol/src/main/resources/META-INF/services/org.apache.activemq.spi.core.protocol.ProtocolManagerFactory similarity index 100% rename from activemq-protocols/activemq-stomp-protocol/src/main/resources/META-INF/services/org.hornetq.spi.core.protocol.ProtocolManagerFactory rename to activemq-protocols/activemq-stomp-protocol/src/main/resources/META-INF/services/org.apache.activemq.spi.core.protocol.ProtocolManagerFactory diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRABundle.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRABundle.java similarity index 95% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRABundle.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRABundle.java index 79979b7486..42953b2854 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRABundle.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRABundle.java @@ -33,13 +33,13 @@ import javax.resource.NotSupportedException; * * so 159000 to 159999 */ -@MessageBundle(projectCode = "HQ") -public interface HornetQRABundle +@MessageBundle(projectCode = "AMQ") +public interface ActiveMQRABundle { /** Error message for strict behaviour */ String ISE = "This method is not applicable inside the application server. See the JEE spec, e.g. JEE 7 Section 6.7"; - HornetQRABundle BUNDLE = Messages.getBundle(HornetQRABundle.class); + ActiveMQRABundle BUNDLE = Messages.getBundle(ActiveMQRABundle.class); @Message(id = 159000, value = "Error decoding password using codec instance", format = Message.Format.MESSAGE_FORMAT) ActiveMQIllegalStateException errorDecodingPassword(@Cause Exception e); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRABytesMessage.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRABytesMessage.java similarity index 71% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRABytesMessage.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRABytesMessage.java index a7de0d0fc5..c4a24c75f4 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRABytesMessage.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRABytesMessage.java @@ -24,23 +24,23 @@ import javax.jms.JMSException; * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMessage +public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMessage { /** Whether trace is enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * Create a new wrapper * @param message the message * @param session the session */ - public HornetQRABytesMessage(final BytesMessage message, final HornetQRASession session) + public ActiveMQRABytesMessage(final BytesMessage message, final ActiveMQRASession session) { super(message, session); - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")"); } } @@ -51,9 +51,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public long getBodyLength() throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("getBodyLength()"); + ActiveMQRALogger.LOGGER.trace("getBodyLength()"); } return ((BytesMessage)message).getBodyLength(); @@ -66,9 +66,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public boolean readBoolean() throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("readBoolean()"); + ActiveMQRALogger.LOGGER.trace("readBoolean()"); } return ((BytesMessage)message).readBoolean(); @@ -81,9 +81,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public byte readByte() throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("readByte()"); + ActiveMQRALogger.LOGGER.trace("readByte()"); } return ((BytesMessage)message).readByte(); @@ -98,9 +98,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public int readBytes(final byte[] value, final int length) throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("readBytes(" + Arrays.toString(value) + ", " + length + ")"); + ActiveMQRALogger.LOGGER.trace("readBytes(" + Arrays.toString(value) + ", " + length + ")"); } return ((BytesMessage)message).readBytes(value, length); @@ -114,9 +114,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public int readBytes(final byte[] value) throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("readBytes(" + Arrays.toString(value) + ")"); + ActiveMQRALogger.LOGGER.trace("readBytes(" + Arrays.toString(value) + ")"); } return ((BytesMessage)message).readBytes(value); @@ -129,9 +129,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public char readChar() throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("readChar()"); + ActiveMQRALogger.LOGGER.trace("readChar()"); } return ((BytesMessage)message).readChar(); @@ -144,9 +144,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public double readDouble() throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("readDouble()"); + ActiveMQRALogger.LOGGER.trace("readDouble()"); } return ((BytesMessage)message).readDouble(); @@ -159,9 +159,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public float readFloat() throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("readFloat()"); + ActiveMQRALogger.LOGGER.trace("readFloat()"); } return ((BytesMessage)message).readFloat(); @@ -174,9 +174,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public int readInt() throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("readInt()"); + ActiveMQRALogger.LOGGER.trace("readInt()"); } return ((BytesMessage)message).readInt(); @@ -189,9 +189,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public long readLong() throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("readLong()"); + ActiveMQRALogger.LOGGER.trace("readLong()"); } return ((BytesMessage)message).readLong(); @@ -204,9 +204,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public short readShort() throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("readShort()"); + ActiveMQRALogger.LOGGER.trace("readShort()"); } return ((BytesMessage)message).readShort(); @@ -219,9 +219,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public int readUnsignedByte() throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("readUnsignedByte()"); + ActiveMQRALogger.LOGGER.trace("readUnsignedByte()"); } return ((BytesMessage)message).readUnsignedByte(); @@ -234,9 +234,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public int readUnsignedShort() throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("readUnsignedShort()"); + ActiveMQRALogger.LOGGER.trace("readUnsignedShort()"); } return ((BytesMessage)message).readUnsignedShort(); @@ -249,9 +249,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public String readUTF() throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("readUTF()"); + ActiveMQRALogger.LOGGER.trace("readUTF()"); } return ((BytesMessage)message).readUTF(); @@ -263,9 +263,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public void reset() throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("reset()"); + ActiveMQRALogger.LOGGER.trace("reset()"); } ((BytesMessage)message).reset(); @@ -278,9 +278,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public void writeBoolean(final boolean value) throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("writeBoolean(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeBoolean(" + value + ")"); } ((BytesMessage)message).writeBoolean(value); @@ -293,9 +293,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public void writeByte(final byte value) throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("writeByte(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeByte(" + value + ")"); } ((BytesMessage)message).writeByte(value); @@ -310,9 +310,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("writeBytes(" + Arrays.toString(value) + ", " + offset + ", " + length + ")"); + ActiveMQRALogger.LOGGER.trace("writeBytes(" + Arrays.toString(value) + ", " + offset + ", " + length + ")"); } ((BytesMessage)message).writeBytes(value, offset, length); @@ -325,9 +325,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public void writeBytes(final byte[] value) throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("writeBytes(" + Arrays.toString(value) + ")"); + ActiveMQRALogger.LOGGER.trace("writeBytes(" + Arrays.toString(value) + ")"); } ((BytesMessage)message).writeBytes(value); @@ -340,9 +340,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public void writeChar(final char value) throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("writeChar(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeChar(" + value + ")"); } ((BytesMessage)message).writeChar(value); @@ -355,9 +355,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public void writeDouble(final double value) throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("writeDouble(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeDouble(" + value + ")"); } ((BytesMessage)message).writeDouble(value); @@ -370,9 +370,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public void writeFloat(final float value) throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("writeFloat(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeFloat(" + value + ")"); } ((BytesMessage)message).writeFloat(value); @@ -385,9 +385,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public void writeInt(final int value) throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("writeInt(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeInt(" + value + ")"); } ((BytesMessage)message).writeInt(value); @@ -400,9 +400,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public void writeLong(final long value) throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("writeLong(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeLong(" + value + ")"); } ((BytesMessage)message).writeLong(value); @@ -415,9 +415,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public void writeObject(final Object value) throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("writeObject(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeObject(" + value + ")"); } ((BytesMessage)message).writeObject(value); @@ -430,9 +430,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public void writeShort(final short value) throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("writeShort(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeShort(" + value + ")"); } ((BytesMessage)message).writeShort(value); @@ -445,9 +445,9 @@ public class HornetQRABytesMessage extends HornetQRAMessage implements BytesMess */ public void writeUTF(final String value) throws JMSException { - if (HornetQRABytesMessage.trace) + if (ActiveMQRABytesMessage.trace) { - HornetQRALogger.LOGGER.trace("writeUTF(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeUTF(" + value + ")"); } ((BytesMessage)message).writeUTF(value); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAConnectionFactory.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAConnectionFactory.java similarity index 86% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAConnectionFactory.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAConnectionFactory.java index 662506b4fe..0c1869eb2c 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAConnectionFactory.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAConnectionFactory.java @@ -18,7 +18,7 @@ import javax.resource.Referenceable; import javax.resource.ResourceException; import java.io.Serializable; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; /** * An aggregate interface for the JMS connection factories @@ -26,7 +26,7 @@ import org.apache.activemq.jms.client.HornetQConnectionFactory; * @author Adrian Brock * @author Jesper Pedersen */ -public interface HornetQRAConnectionFactory extends XAQueueConnectionFactory, +public interface ActiveMQRAConnectionFactory extends XAQueueConnectionFactory, XATopicConnectionFactory, Serializable, Referenceable { /** @@ -59,7 +59,7 @@ public interface HornetQRAConnectionFactory extends XAQueueConnectionFactory, */ int XA_TOPIC_CONNECTION = 5; - HornetQConnectionFactory getDefaultFactory() throws ResourceException; + ActiveMQConnectionFactory getDefaultFactory() throws ResourceException; - HornetQResourceAdapter getResourceAdapter(); + ActiveMQResourceAdapter getResourceAdapter(); } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAConnectionFactoryImpl.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAConnectionFactoryImpl.java similarity index 63% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAConnectionFactoryImpl.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAConnectionFactoryImpl.java index f4d7327c55..b0d6d00dfc 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAConnectionFactoryImpl.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAConnectionFactoryImpl.java @@ -30,7 +30,7 @@ import javax.naming.Reference; import javax.resource.ResourceException; import javax.resource.spi.ConnectionManager; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.jms.referenceable.ConnectionFactoryObjectFactory; import org.apache.activemq.jms.referenceable.SerializableObjectRefAddr; @@ -40,18 +40,18 @@ import org.apache.activemq.jms.referenceable.SerializableObjectRefAddr; * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactory +public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFactory { /** * Serial version UID */ static final long serialVersionUID = 7981708919479859360L; - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * The managed connection factory */ - private final HornetQRAManagedConnectionFactory mcf; + private final ActiveMQRAManagedConnectionFactory mcf; /** * The connection manager @@ -69,11 +69,11 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor * @param mcf The managed connection factory * @param cm The connection manager */ - public HornetQRAConnectionFactoryImpl(final HornetQRAManagedConnectionFactory mcf, final ConnectionManager cm) + public ActiveMQRAConnectionFactoryImpl(final ActiveMQRAManagedConnectionFactory mcf, final ConnectionManager cm) { - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + mcf + ", " + cm + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + mcf + ", " + cm + ")"); } this.mcf = mcf; @@ -81,10 +81,10 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor if (cm == null) { // This is standalone usage, no appserver - this.cm = new HornetQRAConnectionManager(); - if (HornetQRAConnectionFactoryImpl.trace) + this.cm = new ActiveMQRAConnectionManager(); + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Created new ConnectionManager=" + this.cm); + ActiveMQRALogger.LOGGER.trace("Created new ConnectionManager=" + this.cm); } } else @@ -92,9 +92,9 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor this.cm = cm; } - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Using ManagedConnectionFactory=" + mcf + ", ConnectionManager=" + cm); + ActiveMQRALogger.LOGGER.trace("Using ManagedConnectionFactory=" + mcf + ", ConnectionManager=" + cm); } } @@ -105,9 +105,9 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor */ public void setReference(final Reference reference) { - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("setReference(" + reference + ")"); + ActiveMQRALogger.LOGGER.trace("setReference(" + reference + ")"); } this.reference = reference; @@ -120,22 +120,22 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor */ public Reference getReference() { - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("getReference()"); + ActiveMQRALogger.LOGGER.trace("getReference()"); } if (reference == null) { try { reference = new Reference(this.getClass().getCanonicalName(), - new SerializableObjectRefAddr("HornetQ-CF", this), + new SerializableObjectRefAddr("ActiveMQ-CF", this), ConnectionFactoryObjectFactory.class.getCanonicalName(), null); } catch (NamingException e) { - HornetQRALogger.LOGGER.errorCreatingReference(e); + ActiveMQRALogger.LOGGER.errorCreatingReference(e); } } @@ -151,19 +151,19 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor */ public QueueConnection createQueueConnection() throws JMSException { - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createQueueConnection()"); + ActiveMQRALogger.LOGGER.trace("createQueueConnection()"); } - HornetQRASessionFactoryImpl s = new HornetQRASessionFactoryImpl(mcf, + ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), - HornetQRAConnectionFactory.QUEUE_CONNECTION); + ActiveMQRAConnectionFactory.QUEUE_CONNECTION); - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Created queue connection: " + s); + ActiveMQRALogger.LOGGER.trace("Created queue connection: " + s); } return s; @@ -179,23 +179,23 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor */ public QueueConnection createQueueConnection(final String userName, final String password) throws JMSException { - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createQueueConnection(" + userName + ", ****)"); + ActiveMQRALogger.LOGGER.trace("createQueueConnection(" + userName + ", ****)"); } - HornetQRASessionFactoryImpl s = new HornetQRASessionFactoryImpl(mcf, + ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), - HornetQRAConnectionFactory.QUEUE_CONNECTION); + ActiveMQRAConnectionFactory.QUEUE_CONNECTION); s.setUserName(userName); s.setPassword(password); validateUser(s); - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Created queue connection: " + s); + ActiveMQRALogger.LOGGER.trace("Created queue connection: " + s); } return s; @@ -209,19 +209,19 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor */ public TopicConnection createTopicConnection() throws JMSException { - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createTopicConnection()"); + ActiveMQRALogger.LOGGER.trace("createTopicConnection()"); } - HornetQRASessionFactoryImpl s = new HornetQRASessionFactoryImpl(mcf, + ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), - HornetQRAConnectionFactory.TOPIC_CONNECTION); + ActiveMQRAConnectionFactory.TOPIC_CONNECTION); - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Created topic connection: " + s); + ActiveMQRALogger.LOGGER.trace("Created topic connection: " + s); } return s; @@ -237,22 +237,22 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor */ public TopicConnection createTopicConnection(final String userName, final String password) throws JMSException { - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createTopicConnection(" + userName + ", ****)"); + ActiveMQRALogger.LOGGER.trace("createTopicConnection(" + userName + ", ****)"); } - HornetQRASessionFactoryImpl s = new HornetQRASessionFactoryImpl(mcf, + ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), - HornetQRAConnectionFactory.TOPIC_CONNECTION); + ActiveMQRAConnectionFactory.TOPIC_CONNECTION); s.setUserName(userName); s.setPassword(password); validateUser(s); - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Created topic connection: " + s); + ActiveMQRALogger.LOGGER.trace("Created topic connection: " + s); } return s; @@ -266,16 +266,16 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor */ public Connection createConnection() throws JMSException { - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createConnection()"); + ActiveMQRALogger.LOGGER.trace("createConnection()"); } - HornetQRASessionFactoryImpl s = new HornetQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), HornetQRAConnectionFactory.CONNECTION); + ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.CONNECTION); - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Created connection: " + s); + ActiveMQRALogger.LOGGER.trace("Created connection: " + s); } return s; @@ -291,20 +291,20 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor */ public Connection createConnection(final String userName, final String password) throws JMSException { - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createConnection(" + userName + ", ****)"); + ActiveMQRALogger.LOGGER.trace("createConnection(" + userName + ", ****)"); } - HornetQRASessionFactoryImpl s = new HornetQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), HornetQRAConnectionFactory.CONNECTION); + ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.CONNECTION); s.setUserName(userName); s.setPassword(password); validateUser(s); - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Created connection: " + s); + ActiveMQRALogger.LOGGER.trace("Created connection: " + s); } return s; @@ -318,19 +318,19 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor */ public XAQueueConnection createXAQueueConnection() throws JMSException { - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createXAQueueConnection()"); + ActiveMQRALogger.LOGGER.trace("createXAQueueConnection()"); } - HornetQRASessionFactoryImpl s = new HornetQRASessionFactoryImpl(mcf, + ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), - HornetQRAConnectionFactory.XA_QUEUE_CONNECTION); + ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION); - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Created queue connection: " + s); + ActiveMQRALogger.LOGGER.trace("Created queue connection: " + s); } return s; @@ -346,22 +346,22 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor */ public XAQueueConnection createXAQueueConnection(final String userName, final String password) throws JMSException { - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createXAQueueConnection(" + userName + ", ****)"); + ActiveMQRALogger.LOGGER.trace("createXAQueueConnection(" + userName + ", ****)"); } - HornetQRASessionFactoryImpl s = new HornetQRASessionFactoryImpl(mcf, + ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), - HornetQRAConnectionFactory.XA_QUEUE_CONNECTION); + ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION); s.setUserName(userName); s.setPassword(password); validateUser(s); - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Created queue connection: " + s); + ActiveMQRALogger.LOGGER.trace("Created queue connection: " + s); } return s; @@ -375,19 +375,19 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor */ public XATopicConnection createXATopicConnection() throws JMSException { - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createXATopicConnection()"); + ActiveMQRALogger.LOGGER.trace("createXATopicConnection()"); } - HornetQRASessionFactoryImpl s = new HornetQRASessionFactoryImpl(mcf, + ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), - HornetQRAConnectionFactory.XA_TOPIC_CONNECTION); + ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION); - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Created topic connection: " + s); + ActiveMQRALogger.LOGGER.trace("Created topic connection: " + s); } return s; @@ -403,22 +403,22 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor */ public XATopicConnection createXATopicConnection(final String userName, final String password) throws JMSException { - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createXATopicConnection(" + userName + ", ****)"); + ActiveMQRALogger.LOGGER.trace("createXATopicConnection(" + userName + ", ****)"); } - HornetQRASessionFactoryImpl s = new HornetQRASessionFactoryImpl(mcf, + ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), - HornetQRAConnectionFactory.XA_TOPIC_CONNECTION); + ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION); s.setUserName(userName); s.setPassword(password); validateUser(s); - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Created topic connection: " + s); + ActiveMQRALogger.LOGGER.trace("Created topic connection: " + s); } return s; @@ -432,16 +432,16 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor */ public XAConnection createXAConnection() throws JMSException { - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createXAConnection()"); + ActiveMQRALogger.LOGGER.trace("createXAConnection()"); } - HornetQRASessionFactoryImpl s = new HornetQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), HornetQRAConnectionFactory.XA_CONNECTION); + ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.XA_CONNECTION); - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Created connection: " + s); + ActiveMQRALogger.LOGGER.trace("Created connection: " + s); } return s; @@ -457,19 +457,19 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor */ public XAConnection createXAConnection(final String userName, final String password) throws JMSException { - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createXAConnection(" + userName + ", ****)"); + ActiveMQRALogger.LOGGER.trace("createXAConnection(" + userName + ", ****)"); } - HornetQRASessionFactoryImpl s = new HornetQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), HornetQRAConnectionFactory.XA_CONNECTION); + ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.XA_CONNECTION); s.setUserName(userName); s.setPassword(password); validateUser(s); - if (HornetQRAConnectionFactoryImpl.trace) + if (ActiveMQRAConnectionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Created connection: " + s); + ActiveMQRALogger.LOGGER.trace("Created connection: " + s); } return s; @@ -491,7 +491,7 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor public JMSContext createContext(String userName, String password, int sessionMode) { @SuppressWarnings("resource") - HornetQRASessionFactoryImpl conn = new HornetQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), HornetQRAConnectionFactory.CONNECTION); + ActiveMQRASessionFactoryImpl conn = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.CONNECTION); conn.setUserName(userName); conn.setPassword(password); try @@ -528,7 +528,7 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor @Override public XAJMSContext createXAContext(String userName, String password) { - HornetQRASessionFactoryImpl conn = new HornetQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), HornetQRAConnectionFactory.XA_CONNECTION); + ActiveMQRASessionFactoryImpl conn = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.XA_CONNECTION); conn.setUserName(userName); conn.setPassword(password); try @@ -550,21 +550,21 @@ public class HornetQRAConnectionFactoryImpl implements HornetQRAConnectionFactor return conn.createXAContext(); } - private void validateUser(HornetQRASessionFactoryImpl s) throws JMSException + private void validateUser(ActiveMQRASessionFactoryImpl s) throws JMSException { Session session = s.createSession(); session.close(); } @Override - public HornetQConnectionFactory getDefaultFactory() throws ResourceException + public ActiveMQConnectionFactory getDefaultFactory() throws ResourceException { - return ((HornetQResourceAdapter) mcf.getResourceAdapter()).getDefaultHornetQConnectionFactory(); + return ((ActiveMQResourceAdapter) mcf.getResourceAdapter()).getDefaultActiveMQConnectionFactory(); } @Override - public HornetQResourceAdapter getResourceAdapter() + public ActiveMQResourceAdapter getResourceAdapter() { - return (HornetQResourceAdapter) mcf.getResourceAdapter(); + return (ActiveMQResourceAdapter) mcf.getResourceAdapter(); } } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAConnectionManager.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAConnectionManager.java similarity index 79% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAConnectionManager.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAConnectionManager.java index ee1defe0ed..d41d9c77df 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAConnectionManager.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAConnectionManager.java @@ -27,21 +27,21 @@ import org.apache.activemq.utils.ConcurrentHashSet; * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRAConnectionManager implements ConnectionManager +public class ActiveMQRAConnectionManager implements ConnectionManager { /** Serial version UID */ static final long serialVersionUID = 4409118162975011014L; /** Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * Constructor */ - public HornetQRAConnectionManager() + public ActiveMQRAConnectionManager() { - if (HornetQRAConnectionManager.trace) + if (ActiveMQRAConnectionManager.trace) { - HornetQRALogger.LOGGER.trace("constructor()"); + ActiveMQRALogger.LOGGER.trace("constructor()"); } } @@ -56,17 +56,17 @@ public class HornetQRAConnectionManager implements ConnectionManager */ public Object allocateConnection(final ManagedConnectionFactory mcf, final ConnectionRequestInfo cxRequestInfo) throws ResourceException { - if (HornetQRAConnectionManager.trace) + if (ActiveMQRAConnectionManager.trace) { - HornetQRALogger.LOGGER.trace("allocateConnection(" + mcf + ", " + cxRequestInfo + ")"); + ActiveMQRALogger.LOGGER.trace("allocateConnection(" + mcf + ", " + cxRequestInfo + ")"); } ManagedConnection mc = mcf.createManagedConnection(null, cxRequestInfo); Object c = mc.getConnection(null, cxRequestInfo); - if (HornetQRAConnectionManager.trace) + if (ActiveMQRAConnectionManager.trace) { - HornetQRALogger.LOGGER.trace("Allocated connection: " + c + ", with managed connection: " + mc); + ActiveMQRALogger.LOGGER.trace("Allocated connection: " + c + ", with managed connection: " + mc); } connections.add(mc); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAConnectionMetaData.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAConnectionMetaData.java similarity index 68% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAConnectionMetaData.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAConnectionMetaData.java index a34db3674f..a2dbe98527 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAConnectionMetaData.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAConnectionMetaData.java @@ -24,19 +24,19 @@ import javax.jms.ConnectionMetaData; * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRAConnectionMetaData implements ConnectionMetaData +public class ActiveMQRAConnectionMetaData implements ConnectionMetaData { /** Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * Constructor */ - public HornetQRAConnectionMetaData() + public ActiveMQRAConnectionMetaData() { - if (HornetQRAConnectionMetaData.trace) + if (ActiveMQRAConnectionMetaData.trace) { - HornetQRALogger.LOGGER.trace("constructor()"); + ActiveMQRALogger.LOGGER.trace("constructor()"); } } @@ -46,9 +46,9 @@ public class HornetQRAConnectionMetaData implements ConnectionMetaData */ public String getJMSVersion() { - if (HornetQRAConnectionMetaData.trace) + if (ActiveMQRAConnectionMetaData.trace) { - HornetQRALogger.LOGGER.trace("getJMSVersion()"); + ActiveMQRALogger.LOGGER.trace("getJMSVersion()"); } return "2.0"; @@ -60,9 +60,9 @@ public class HornetQRAConnectionMetaData implements ConnectionMetaData */ public int getJMSMajorVersion() { - if (HornetQRAConnectionMetaData.trace) + if (ActiveMQRAConnectionMetaData.trace) { - HornetQRALogger.LOGGER.trace("getJMSMajorVersion()"); + ActiveMQRALogger.LOGGER.trace("getJMSMajorVersion()"); } return 2; @@ -74,9 +74,9 @@ public class HornetQRAConnectionMetaData implements ConnectionMetaData */ public int getJMSMinorVersion() { - if (HornetQRAConnectionMetaData.trace) + if (ActiveMQRAConnectionMetaData.trace) { - HornetQRALogger.LOGGER.trace("getJMSMinorVersion()"); + ActiveMQRALogger.LOGGER.trace("getJMSMinorVersion()"); } return 0; @@ -88,12 +88,12 @@ public class HornetQRAConnectionMetaData implements ConnectionMetaData */ public String getJMSProviderName() { - if (HornetQRAConnectionMetaData.trace) + if (ActiveMQRAConnectionMetaData.trace) { - HornetQRALogger.LOGGER.trace("getJMSProviderName()"); + ActiveMQRALogger.LOGGER.trace("getJMSProviderName()"); } - return "HornetQ"; + return "ActiveMQ"; } /** @@ -102,9 +102,9 @@ public class HornetQRAConnectionMetaData implements ConnectionMetaData */ public String getProviderVersion() { - if (HornetQRAConnectionMetaData.trace) + if (ActiveMQRAConnectionMetaData.trace) { - HornetQRALogger.LOGGER.trace("getJMSProviderName()"); + ActiveMQRALogger.LOGGER.trace("getJMSProviderName()"); } return "2.4"; @@ -116,9 +116,9 @@ public class HornetQRAConnectionMetaData implements ConnectionMetaData */ public int getProviderMajorVersion() { - if (HornetQRAConnectionMetaData.trace) + if (ActiveMQRAConnectionMetaData.trace) { - HornetQRALogger.LOGGER.trace("getProviderMajorVersion()"); + ActiveMQRALogger.LOGGER.trace("getProviderMajorVersion()"); } return 2; @@ -130,9 +130,9 @@ public class HornetQRAConnectionMetaData implements ConnectionMetaData */ public int getProviderMinorVersion() { - if (HornetQRAConnectionMetaData.trace) + if (ActiveMQRAConnectionMetaData.trace) { - HornetQRALogger.LOGGER.trace("getProviderMinorVersion()"); + ActiveMQRALogger.LOGGER.trace("getProviderMinorVersion()"); } return 4; diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAConnectionRequestInfo.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAConnectionRequestInfo.java similarity index 69% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAConnectionRequestInfo.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAConnectionRequestInfo.java index 96eea4856e..9a37a5df97 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAConnectionRequestInfo.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAConnectionRequestInfo.java @@ -23,10 +23,10 @@ import javax.resource.spi.ConnectionRequestInfo; * @author Jesper Pedersen * @author Andy Taylor */ -public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo +public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo { /** Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** The user name */ private String userName; @@ -51,11 +51,11 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo * @param prop The resource adapter properties * @param type The connection type */ - public HornetQRAConnectionRequestInfo(final HornetQRAProperties prop, final int type) + public ActiveMQRAConnectionRequestInfo(final ActiveMQRAProperties prop, final int type) { - if (HornetQRAConnectionRequestInfo.trace) + if (ActiveMQRAConnectionRequestInfo.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + prop + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + prop + ")"); } userName = prop.getUserName(); @@ -72,11 +72,11 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo * @param acknowledgeMode The acknowledge mode * @param type The connection type */ - public HornetQRAConnectionRequestInfo(final boolean transacted, final int acknowledgeMode, final int type) + public ActiveMQRAConnectionRequestInfo(final boolean transacted, final int acknowledgeMode, final int type) { - if (HornetQRAConnectionRequestInfo.trace) + if (ActiveMQRAConnectionRequestInfo.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + transacted + + ActiveMQRALogger.LOGGER.trace("constructor(" + transacted + ", " + acknowledgeMode + ", " + @@ -93,11 +93,11 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo * Fill in default values if they are missing * @param prop The resource adapter properties */ - public void setDefaults(final HornetQRAProperties prop) + public void setDefaults(final ActiveMQRAProperties prop) { - if (HornetQRAConnectionRequestInfo.trace) + if (ActiveMQRAConnectionRequestInfo.trace) { - HornetQRALogger.LOGGER.trace("setDefaults(" + prop + ")"); + ActiveMQRALogger.LOGGER.trace("setDefaults(" + prop + ")"); } if (userName == null) @@ -120,9 +120,9 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo */ public String getUserName() { - if (HornetQRAConnectionRequestInfo.trace) + if (ActiveMQRAConnectionRequestInfo.trace) { - HornetQRALogger.LOGGER.trace("getUserName()"); + ActiveMQRALogger.LOGGER.trace("getUserName()"); } return userName; @@ -134,9 +134,9 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo */ public void setUserName(final String userName) { - if (HornetQRAConnectionRequestInfo.trace) + if (ActiveMQRAConnectionRequestInfo.trace) { - HornetQRALogger.LOGGER.trace("setUserName(" + userName + ")"); + ActiveMQRALogger.LOGGER.trace("setUserName(" + userName + ")"); } this.userName = userName; @@ -148,9 +148,9 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo */ public String getPassword() { - if (HornetQRAConnectionRequestInfo.trace) + if (ActiveMQRAConnectionRequestInfo.trace) { - HornetQRALogger.LOGGER.trace("getPassword()"); + ActiveMQRALogger.LOGGER.trace("getPassword()"); } return password; @@ -162,9 +162,9 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo */ public void setPassword(final String password) { - if (HornetQRAConnectionRequestInfo.trace) + if (ActiveMQRAConnectionRequestInfo.trace) { - HornetQRALogger.LOGGER.trace("setPassword(****)"); + ActiveMQRALogger.LOGGER.trace("setPassword(****)"); } this.password = password; @@ -176,9 +176,9 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo */ public String getClientID() { - if (HornetQRAConnectionRequestInfo.trace) + if (ActiveMQRAConnectionRequestInfo.trace) { - HornetQRALogger.LOGGER.trace("getClientID()"); + ActiveMQRALogger.LOGGER.trace("getClientID()"); } return clientID; @@ -190,9 +190,9 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo */ public void setClientID(final String clientID) { - if (HornetQRAConnectionRequestInfo.trace) + if (ActiveMQRAConnectionRequestInfo.trace) { - HornetQRALogger.LOGGER.trace("setClientID(" + clientID + ")"); + ActiveMQRALogger.LOGGER.trace("setClientID(" + clientID + ")"); } this.clientID = clientID; @@ -204,9 +204,9 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo */ public int getType() { - if (HornetQRAConnectionRequestInfo.trace) + if (ActiveMQRAConnectionRequestInfo.trace) { - HornetQRALogger.LOGGER.trace("getType()"); + ActiveMQRALogger.LOGGER.trace("getType()"); } return type; @@ -218,9 +218,9 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo */ public boolean isTransacted() { - if (HornetQRAConnectionRequestInfo.trace) + if (ActiveMQRAConnectionRequestInfo.trace) { - HornetQRALogger.LOGGER.trace("isTransacted() " + transacted); + ActiveMQRALogger.LOGGER.trace("isTransacted() " + transacted); } return transacted; @@ -232,9 +232,9 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo */ public int getAcknowledgeMode() { - if (HornetQRAConnectionRequestInfo.trace) + if (ActiveMQRAConnectionRequestInfo.trace) { - HornetQRALogger.LOGGER.trace("getAcknowledgeMode()"); + ActiveMQRALogger.LOGGER.trace("getAcknowledgeMode()"); } return acknowledgeMode; @@ -248,9 +248,9 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo @Override public boolean equals(final Object obj) { - if (HornetQRAConnectionRequestInfo.trace) + if (ActiveMQRAConnectionRequestInfo.trace) { - HornetQRALogger.LOGGER.trace("equals(" + obj + ")"); + ActiveMQRALogger.LOGGER.trace("equals(" + obj + ")"); } if (obj == null) @@ -258,11 +258,11 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo return false; } - if (obj instanceof HornetQRAConnectionRequestInfo) + if (obj instanceof ActiveMQRAConnectionRequestInfo) { - HornetQRAConnectionRequestInfo you = (HornetQRAConnectionRequestInfo)obj; - return HornetQRaUtils.compare(userName, you.getUserName()) && HornetQRaUtils.compare(password, you.getPassword()) && - HornetQRaUtils.compare(clientID, you.getClientID()) && + ActiveMQRAConnectionRequestInfo you = (ActiveMQRAConnectionRequestInfo)obj; + return ActiveMQRaUtils.compare(userName, you.getUserName()) && ActiveMQRaUtils.compare(password, you.getPassword()) && + ActiveMQRaUtils.compare(clientID, you.getClientID()) && type == you.getType() && transacted == you.isTransacted() && acknowledgeMode == you.getAcknowledgeMode(); @@ -280,9 +280,9 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo @Override public int hashCode() { - if (HornetQRAConnectionRequestInfo.trace) + if (ActiveMQRAConnectionRequestInfo.trace) { - HornetQRALogger.LOGGER.trace("hashCode()"); + ActiveMQRALogger.LOGGER.trace("hashCode()"); } int hash = 7; @@ -299,7 +299,7 @@ public class HornetQRAConnectionRequestInfo implements ConnectionRequestInfo @Override public String toString() { - return "HornetQRAConnectionRequestInfo[type=" + type + + return "ActiveMQRAConnectionRequestInfo[type=" + type + ", transacted=" + transacted + ", acknowledgeMode=" + acknowledgeMode + ", clientID=" + clientID + ", userName=" + userName + ", password=****]"; } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRACredential.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRACredential.java similarity index 76% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRACredential.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRACredential.java index e67055c00b..69fee4b4de 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRACredential.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRACredential.java @@ -31,12 +31,12 @@ import javax.security.auth.Subject; * @author Jesper Pedersen * @version $Revision: 71554 $ */ -public class HornetQRACredential implements Serializable +public class ActiveMQRACredential implements Serializable { /** Serial version UID */ static final long serialVersionUID = 210476602237497193L; - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** The user name */ private String userName; @@ -47,11 +47,11 @@ public class HornetQRACredential implements Serializable /** * Private constructor */ - private HornetQRACredential() + private ActiveMQRACredential() { - if (HornetQRACredential.trace) + if (ActiveMQRACredential.trace) { - HornetQRALogger.LOGGER.trace("constructor()"); + ActiveMQRALogger.LOGGER.trace("constructor()"); } } @@ -61,9 +61,9 @@ public class HornetQRACredential implements Serializable */ public String getUserName() { - if (HornetQRACredential.trace) + if (ActiveMQRACredential.trace) { - HornetQRALogger.LOGGER.trace("getUserName()"); + ActiveMQRALogger.LOGGER.trace("getUserName()"); } return userName; @@ -75,9 +75,9 @@ public class HornetQRACredential implements Serializable */ private void setUserName(final String userName) { - if (HornetQRACredential.trace) + if (ActiveMQRACredential.trace) { - HornetQRALogger.LOGGER.trace("setUserName(" + userName + ")"); + ActiveMQRALogger.LOGGER.trace("setUserName(" + userName + ")"); } this.userName = userName; @@ -89,9 +89,9 @@ public class HornetQRACredential implements Serializable */ public String getPassword() { - if (HornetQRACredential.trace) + if (ActiveMQRACredential.trace) { - HornetQRALogger.LOGGER.trace("getPassword()"); + ActiveMQRALogger.LOGGER.trace("getPassword()"); } return password; @@ -103,9 +103,9 @@ public class HornetQRACredential implements Serializable */ private void setPassword(final String password) { - if (HornetQRACredential.trace) + if (ActiveMQRACredential.trace) { - HornetQRALogger.LOGGER.trace("setPassword(****)"); + ActiveMQRALogger.LOGGER.trace("setPassword(****)"); } this.password = password; @@ -119,20 +119,20 @@ public class HornetQRACredential implements Serializable * @return The credentials * @exception SecurityException Thrown if the credentials can't be retrieved */ - public static HornetQRACredential getCredential(final ManagedConnectionFactory mcf, + public static ActiveMQRACredential getCredential(final ManagedConnectionFactory mcf, final Subject subject, final ConnectionRequestInfo info) throws SecurityException { - if (HornetQRACredential.trace) + if (ActiveMQRACredential.trace) { - HornetQRALogger.LOGGER.trace("getCredential(" + mcf + ", " + subject + ", " + info + ")"); + ActiveMQRALogger.LOGGER.trace("getCredential(" + mcf + ", " + subject + ", " + info + ")"); } - HornetQRACredential jc = new HornetQRACredential(); + ActiveMQRACredential jc = new ActiveMQRACredential(); if (subject == null && info != null) { - jc.setUserName(((HornetQRAConnectionRequestInfo)info).getUserName()); - jc.setPassword(((HornetQRAConnectionRequestInfo)info).getPassword()); + jc.setUserName(((ActiveMQRAConnectionRequestInfo)info).getUserName()); + jc.setPassword(((ActiveMQRAConnectionRequestInfo)info).getPassword()); } else if (subject != null) { @@ -161,9 +161,9 @@ public class HornetQRACredential implements Serializable @Override public String toString() { - if (HornetQRACredential.trace) + if (ActiveMQRACredential.trace) { - HornetQRALogger.LOGGER.trace("toString()"); + ActiveMQRALogger.LOGGER.trace("toString()"); } return super.toString() + "{ username=" + userName + ", password=**** }"; @@ -187,9 +187,9 @@ public class HornetQRACredential implements Serializable */ GetCredentialAction(final Subject subject, final ManagedConnectionFactory mcf) { - if (HornetQRACredential.trace) + if (ActiveMQRACredential.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + subject + ", " + mcf + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + subject + ", " + mcf + ")"); } this.subject = subject; @@ -202,9 +202,9 @@ public class HornetQRACredential implements Serializable */ public PasswordCredential run() { - if (HornetQRACredential.trace) + if (ActiveMQRACredential.trace) { - HornetQRALogger.LOGGER.trace("run()"); + ActiveMQRALogger.LOGGER.trace("run()"); } Set creds = subject.getPrivateCredentials(PasswordCredential.class); @@ -229,9 +229,9 @@ public class HornetQRACredential implements Serializable */ static PasswordCredential getCredential(final Subject subject, final ManagedConnectionFactory mcf) { - if (HornetQRACredential.trace) + if (ActiveMQRACredential.trace) { - HornetQRALogger.LOGGER.trace("getCredential(" + subject + ", " + mcf + ")"); + ActiveMQRALogger.LOGGER.trace("getCredential(" + subject + ", " + mcf + ")"); } GetCredentialAction action = new GetCredentialAction(subject, mcf); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAJMSContext.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAJMSContext.java similarity index 64% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAJMSContext.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAJMSContext.java index 9185ac3e63..b02e6236fc 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAJMSContext.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAJMSContext.java @@ -12,21 +12,21 @@ */ package org.apache.activemq.ra; -import org.apache.activemq.jms.client.HornetQConnectionForContext; -import org.apache.activemq.jms.client.HornetQJMSContext; +import org.apache.activemq.jms.client.ActiveMQConnectionForContext; +import org.apache.activemq.jms.client.ActiveMQJMSContext; import org.apache.activemq.jms.client.ThreadAwareContext; import javax.jms.ExceptionListener; import javax.jms.JMSContext; -public class HornetQRAJMSContext extends HornetQJMSContext +public class ActiveMQRAJMSContext extends ActiveMQJMSContext { - public HornetQRAJMSContext(HornetQConnectionForContext connection, int ackMode, ThreadAwareContext threadAwareContext) + public ActiveMQRAJMSContext(ActiveMQConnectionForContext connection, int ackMode, ThreadAwareContext threadAwareContext) { super(connection, ackMode, threadAwareContext); } - public HornetQRAJMSContext(HornetQConnectionForContext connection, ThreadAwareContext threadAwareContext) + public ActiveMQRAJMSContext(ActiveMQConnectionForContext connection, ThreadAwareContext threadAwareContext) { super(connection, threadAwareContext); } @@ -34,24 +34,24 @@ public class HornetQRAJMSContext extends HornetQJMSContext @Override public JMSContext createContext(int sessionMode) { - throw HornetQRABundle.BUNDLE.illegalJEEMethod(); + throw ActiveMQRABundle.BUNDLE.illegalJEEMethod(); } @Override public void stop() { - throw HornetQRABundle.BUNDLE.illegalJEEMethod(); + throw ActiveMQRABundle.BUNDLE.illegalJEEMethod(); } @Override public void setClientID(String clientID) { - throw HornetQRABundle.BUNDLE.illegalJEEMethod(); + throw ActiveMQRABundle.BUNDLE.illegalJEEMethod(); } @Override public void setExceptionListener(ExceptionListener listener) { - throw HornetQRABundle.BUNDLE.illegalJEEMethod(); + throw ActiveMQRABundle.BUNDLE.illegalJEEMethod(); } } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRALocalTransaction.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRALocalTransaction.java similarity index 78% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRALocalTransaction.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRALocalTransaction.java index bb67f341a4..8de68ee402 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRALocalTransaction.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRALocalTransaction.java @@ -23,23 +23,23 @@ import javax.resource.spi.LocalTransaction; * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRALocalTransaction implements LocalTransaction +public class ActiveMQRALocalTransaction implements LocalTransaction { /** Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** The managed connection */ - private final HornetQRAManagedConnection mc; + private final ActiveMQRAManagedConnection mc; /** * Constructor * @param mc The managed connection */ - public HornetQRALocalTransaction(final HornetQRAManagedConnection mc) + public ActiveMQRALocalTransaction(final ActiveMQRAManagedConnection mc) { - if (HornetQRALocalTransaction.trace) + if (ActiveMQRALocalTransaction.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + mc + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + mc + ")"); } this.mc = mc; @@ -51,9 +51,9 @@ public class HornetQRALocalTransaction implements LocalTransaction */ public void begin() throws ResourceException { - if (HornetQRALocalTransaction.trace) + if (ActiveMQRALocalTransaction.trace) { - HornetQRALogger.LOGGER.trace("begin()"); + ActiveMQRALogger.LOGGER.trace("begin()"); } // mc.setInManagedTx(true); @@ -65,9 +65,9 @@ public class HornetQRALocalTransaction implements LocalTransaction */ public void commit() throws ResourceException { - if (HornetQRALocalTransaction.trace) + if (ActiveMQRALocalTransaction.trace) { - HornetQRALogger.LOGGER.trace("commit()"); + ActiveMQRALogger.LOGGER.trace("commit()"); } mc.lock(); @@ -95,9 +95,9 @@ public class HornetQRALocalTransaction implements LocalTransaction */ public void rollback() throws ResourceException { - if (HornetQRALocalTransaction.trace) + if (ActiveMQRALocalTransaction.trace) { - HornetQRALogger.LOGGER.trace("rollback()"); + ActiveMQRALogger.LOGGER.trace("rollback()"); } mc.lock(); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRALogger.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRALogger.java similarity index 73% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRALogger.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRALogger.java index d582e50480..8c0cf18a07 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRALogger.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRALogger.java @@ -13,7 +13,7 @@ package org.apache.activemq.ra; -import org.apache.activemq.ra.inflow.HornetQActivationSpec; +import org.apache.activemq.ra.inflow.ActiveMQActivationSpec; import org.jboss.logging.BasicLogger; import org.jboss.logging.Logger; import org.jboss.logging.annotations.Cause; @@ -40,13 +40,13 @@ import org.jboss.logging.annotations.MessageLogger; * * @author Andy Taylor 3/15/12 */ -@MessageLogger(projectCode = "HQ") -public interface HornetQRALogger extends BasicLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQRALogger extends BasicLogger { /** * The default logger. */ - HornetQRALogger LOGGER = Logger.getMessageLogger(HornetQRALogger.class, HornetQRALogger.class.getPackage().getName()); + ActiveMQRALogger LOGGER = Logger.getMessageLogger(ActiveMQRALogger.class, ActiveMQRALogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.INFO) @Message(id = 151000, value = "awaiting topic/queue creation {0}", format = Message.Format.MESSAGE_FORMAT) @@ -54,14 +54,14 @@ public interface HornetQRALogger extends BasicLogger @LogMessage(level = Logger.Level.INFO) @Message(id = 151001, value = "Attempting to reconnect {0}", format = Message.Format.MESSAGE_FORMAT) - void attemptingReconnect(HornetQActivationSpec spec); + void attemptingReconnect(ActiveMQActivationSpec spec); @LogMessage(level = Logger.Level.INFO) - @Message(id = 151002, value = "Reconnected with HornetQ", format = Message.Format.MESSAGE_FORMAT) + @Message(id = 151002, value = "Reconnected with ActiveMQ", format = Message.Format.MESSAGE_FORMAT) void reconnected(); @LogMessage(level = Logger.Level.INFO) - @Message(id = 151003, value = "HornetQ resource adaptor stopped", format = Message.Format.MESSAGE_FORMAT) + @Message(id = 151003, value = "ActiveMQ resource adaptor stopped", format = Message.Format.MESSAGE_FORMAT) void raStopped(); @LogMessage(level = Logger.Level.INFO) @@ -69,15 +69,15 @@ public interface HornetQRALogger extends BasicLogger void instantiatingDestination(String destinationType, String destination); @LogMessage(level = Logger.Level.INFO) - @Message(id = 151005, value = "awaiting HornetQ Server availability", format = Message.Format.MESSAGE_FORMAT) + @Message(id = 151005, value = "awaiting ActiveMQ Server availability", format = Message.Format.MESSAGE_FORMAT) void awaitingJMSServerCreation(); @LogMessage(level = Logger.Level.WARN) - @Message(id = 152000, value = "It wasn''t possible to lookup for a Transaction Manager through the configured properties TransactionManagerLocatorClass and TransactionManagerLocatorMethod\nHornetQ Resource Adapter won''t be able to set and verify transaction timeouts in certain cases.", format = Message.Format.MESSAGE_FORMAT) + @Message(id = 152000, value = "It wasn''t possible to lookup for a Transaction Manager through the configured properties TransactionManagerLocatorClass and TransactionManagerLocatorMethod\nActiveMQ Resource Adapter won''t be able to set and verify transaction timeouts in certain cases.", format = Message.Format.MESSAGE_FORMAT) void noTXLocator(); @LogMessage(level = Logger.Level.WARN) - @Message(id = 152001, value = "problem resetting HornetQ xa session after failure", format = Message.Format.MESSAGE_FORMAT) + @Message(id = 152001, value = "problem resetting ActiveMQ xa session after failure", format = Message.Format.MESSAGE_FORMAT) void problemResettingXASession(); @LogMessage(level = Logger.Level.WARN) @@ -93,8 +93,8 @@ public interface HornetQRALogger extends BasicLogger void handlingJMSFailure(@Cause Exception e); @LogMessage(level = Logger.Level.WARN) - @Message(id = 152005, value = "Failure in HornetQ activation {0}", format = Message.Format.MESSAGE_FORMAT) - void failureInActivation(@Cause Throwable t, HornetQActivationSpec spec); + @Message(id = 152005, value = "Failure in ActiveMQ activation {0}", format = Message.Format.MESSAGE_FORMAT) + void failureInActivation(@Cause Throwable t, ActiveMQActivationSpec spec); @LogMessage(level = Logger.Level.WARN) @Message(id = 152006, value = "Unable to call after delivery", format = Message.Format.MESSAGE_FORMAT) @@ -105,18 +105,18 @@ public interface HornetQRALogger extends BasicLogger void errorCreatingReference(@Cause Exception e); @LogMessage(level = Logger.Level.ERROR) - @Message(id = 154001, value = "Unable to stop HornetQ resource adapter.", format = Message.Format.MESSAGE_FORMAT) + @Message(id = 154001, value = "Unable to stop ActiveMQ resource adapter.", format = Message.Format.MESSAGE_FORMAT) void errorStoppingRA(@Cause Exception e); @LogMessage(level = Logger.Level.ERROR) @Message(id = 154003, value = "Unable to reconnect {0}", format = Message.Format.MESSAGE_FORMAT) - void errorReconnecting(@Cause Throwable t, HornetQActivationSpec spec); + void errorReconnecting(@Cause Throwable t, ActiveMQActivationSpec spec); @LogMessage(level = Logger.Level.ERROR) @Message(id = 154004, value = "Failed to deliver message", format = Message.Format.MESSAGE_FORMAT) void errorDeliveringMessage(@Cause Throwable t); @LogMessage(level = Logger.Level.DEBUG) - @Message(id = 153001, value = "using different HornetQRAConnectionFactory", format = Message.Format.MESSAGE_FORMAT) + @Message(id = 153001, value = "using different ActiveMQRAConnectionFactory", format = Message.Format.MESSAGE_FORMAT) void warnDifferentConnectionfactory(); } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMCFProperties.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMCFProperties.java similarity index 64% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMCFProperties.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMCFProperties.java index a16102791f..13db7a6151 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMCFProperties.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMCFProperties.java @@ -26,7 +26,7 @@ import javax.jms.Topic; * @author Clebert Suconic * @author Andy Taylor */ -public class HornetQRAMCFProperties extends ConnectionFactoryProperties implements Serializable +public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties implements Serializable { /** * Serial version UID @@ -35,7 +35,7 @@ public class HornetQRAMCFProperties extends ConnectionFactoryProperties implemen /** * Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * The queue type @@ -55,7 +55,7 @@ public class HornetQRAMCFProperties extends ConnectionFactoryProperties implemen /** * The connection type */ - private int type = HornetQRAConnectionFactory.CONNECTION; + private int type = ActiveMQRAConnectionFactory.CONNECTION; /** * Use tryLock @@ -65,11 +65,11 @@ public class HornetQRAMCFProperties extends ConnectionFactoryProperties implemen /** * Constructor */ - public HornetQRAMCFProperties() + public ActiveMQRAMCFProperties() { - if (HornetQRAMCFProperties.trace) + if (ActiveMQRAMCFProperties.trace) { - HornetQRALogger.LOGGER.trace("constructor()"); + ActiveMQRALogger.LOGGER.trace("constructor()"); } useTryLock = null; @@ -82,9 +82,9 @@ public class HornetQRAMCFProperties extends ConnectionFactoryProperties implemen */ public int getType() { - if (HornetQRAMCFProperties.trace) + if (ActiveMQRAMCFProperties.trace) { - HornetQRALogger.LOGGER.trace("getType()"); + ActiveMQRALogger.LOGGER.trace("getType()"); } return type; @@ -97,14 +97,14 @@ public class HornetQRAMCFProperties extends ConnectionFactoryProperties implemen public void setConnectorClassName(final String connectorClassName) { - if (HornetQRAMCFProperties.trace) + if (ActiveMQRAMCFProperties.trace) { - HornetQRALogger.LOGGER.trace("setConnectorClassName(" + connectorClassName + ")"); + ActiveMQRALogger.LOGGER.trace("setConnectorClassName(" + connectorClassName + ")"); } strConnectorClassName = connectorClassName; - setParsedConnectorClassNames(HornetQRaUtils.parseConnectorConnectorConfig(connectorClassName)); + setParsedConnectorClassNames(ActiveMQRaUtils.parseConnectorConnectorConfig(connectorClassName)); } /** * @return the connectionParameters @@ -117,7 +117,7 @@ public class HornetQRAMCFProperties extends ConnectionFactoryProperties implemen public void setConnectionParameters(final String configuration) { strConnectionParameters = configuration; - setParsedConnectionParameters(HornetQRaUtils.parseConfig(configuration)); + setParsedConnectionParameters(ActiveMQRaUtils.parseConfig(configuration)); } /** @@ -127,22 +127,22 @@ public class HornetQRAMCFProperties extends ConnectionFactoryProperties implemen */ public void setSessionDefaultType(final String defaultType) { - if (HornetQRAMCFProperties.trace) + if (ActiveMQRAMCFProperties.trace) { - HornetQRALogger.LOGGER.trace("setSessionDefaultType(" + type + ")"); + ActiveMQRALogger.LOGGER.trace("setSessionDefaultType(" + type + ")"); } - if (defaultType.equals(HornetQRAMCFProperties.QUEUE_TYPE)) + if (defaultType.equals(ActiveMQRAMCFProperties.QUEUE_TYPE)) { - type = HornetQRAConnectionFactory.QUEUE_CONNECTION; + type = ActiveMQRAConnectionFactory.QUEUE_CONNECTION; } - else if (defaultType.equals(HornetQRAMCFProperties.TOPIC_TYPE)) + else if (defaultType.equals(ActiveMQRAMCFProperties.TOPIC_TYPE)) { - type = HornetQRAConnectionFactory.TOPIC_CONNECTION; + type = ActiveMQRAConnectionFactory.TOPIC_CONNECTION; } else { - type = HornetQRAConnectionFactory.CONNECTION; + type = ActiveMQRAConnectionFactory.CONNECTION; } } @@ -153,22 +153,22 @@ public class HornetQRAMCFProperties extends ConnectionFactoryProperties implemen */ public String getSessionDefaultType() { - if (HornetQRAMCFProperties.trace) + if (ActiveMQRAMCFProperties.trace) { - HornetQRALogger.LOGGER.trace("getSessionDefaultType()"); + ActiveMQRALogger.LOGGER.trace("getSessionDefaultType()"); } - if (type == HornetQRAConnectionFactory.CONNECTION) + if (type == ActiveMQRAConnectionFactory.CONNECTION) { return "BOTH"; } - else if (type == HornetQRAConnectionFactory.QUEUE_CONNECTION) + else if (type == ActiveMQRAConnectionFactory.QUEUE_CONNECTION) { - return HornetQRAMCFProperties.TOPIC_TYPE; + return ActiveMQRAMCFProperties.TOPIC_TYPE; } else { - return HornetQRAMCFProperties.QUEUE_TYPE; + return ActiveMQRAMCFProperties.QUEUE_TYPE; } } @@ -179,9 +179,9 @@ public class HornetQRAMCFProperties extends ConnectionFactoryProperties implemen */ public Integer getUseTryLock() { - if (HornetQRAMCFProperties.trace) + if (ActiveMQRAMCFProperties.trace) { - HornetQRALogger.LOGGER.trace("getUseTryLock()"); + ActiveMQRALogger.LOGGER.trace("getUseTryLock()"); } return useTryLock; @@ -194,9 +194,9 @@ public class HornetQRAMCFProperties extends ConnectionFactoryProperties implemen */ public void setUseTryLock(final Integer useTryLock) { - if (HornetQRAMCFProperties.trace) + if (ActiveMQRAMCFProperties.trace) { - HornetQRALogger.LOGGER.trace("setUseTryLock(" + useTryLock + ")"); + ActiveMQRALogger.LOGGER.trace("setUseTryLock(" + useTryLock + ")"); } this.useTryLock = useTryLock; diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAManagedConnection.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAManagedConnection.java similarity index 72% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAManagedConnection.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAManagedConnection.java index d61c2b50c2..7ec8379b6d 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAManagedConnection.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAManagedConnection.java @@ -43,9 +43,9 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.locks.ReentrantLock; import org.apache.activemq.core.client.impl.ClientSessionInternal; -import org.apache.activemq.jms.client.HornetQConnection; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQXAConnection; +import org.apache.activemq.jms.client.ActiveMQConnection; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQXAConnection; /** * The managed connection @@ -54,27 +54,27 @@ import org.apache.activemq.jms.client.HornetQXAConnection; * @author Jesper Pedersen * @author Martyn Taylor */ -public final class HornetQRAManagedConnection implements ManagedConnection, ExceptionListener +public final class ActiveMQRAManagedConnection implements ManagedConnection, ExceptionListener { /** * Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * The managed connection factory */ - private final HornetQRAManagedConnectionFactory mcf; + private final ActiveMQRAManagedConnectionFactory mcf; /** * The connection request information */ - private final HornetQRAConnectionRequestInfo cri; + private final ActiveMQRAConnectionRequestInfo cri; /** * The resource adapter */ - private final HornetQResourceAdapter ra; + private final ActiveMQResourceAdapter ra; /** * The user name @@ -99,7 +99,7 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce /** * Handles */ - private final Set handles; + private final Set handles; /** * Lock @@ -107,9 +107,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce private ReentrantLock lock = new ReentrantLock(); // Physical connection stuff - private HornetQConnectionFactory connectionFactory; + private ActiveMQConnectionFactory connectionFactory; - private HornetQXAConnection connection; + private ActiveMQXAConnection connection; // The ManagedConnection will play with a XA and a NonXASession to couple with // cases where a commit is called on a non-XAed (or non-enlisted) case. @@ -131,15 +131,15 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce * @param userName The user name * @param password The password */ - public HornetQRAManagedConnection(final HornetQRAManagedConnectionFactory mcf, - final HornetQRAConnectionRequestInfo cri, - final HornetQResourceAdapter ra, - final String userName, - final String password) throws ResourceException + public ActiveMQRAManagedConnection(final ActiveMQRAManagedConnectionFactory mcf, + final ActiveMQRAConnectionRequestInfo cri, + final ActiveMQResourceAdapter ra, + final String userName, + final String password) throws ResourceException { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + mcf + ", " + cri + ", " + userName + ", ****)"); + ActiveMQRALogger.LOGGER.trace("constructor(" + mcf + ", " + cri + ", " + userName + ", ****)"); } this.mcf = mcf; @@ -149,7 +149,7 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce this.userName = userName; this.password = password; eventListeners = Collections.synchronizedList(new ArrayList()); - handles = Collections.synchronizedSet(new HashSet()); + handles = Collections.synchronizedSet(new HashSet()); connection = null; nonXAsession = null; @@ -195,13 +195,13 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ public synchronized Object getConnection(final Subject subject, final ConnectionRequestInfo cxRequestInfo) throws ResourceException { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("getConnection(" + subject + ", " + cxRequestInfo + ")"); + ActiveMQRALogger.LOGGER.trace("getConnection(" + subject + ", " + cxRequestInfo + ")"); } // Check user first - HornetQRACredential credential = HornetQRACredential.getCredential(mcf, subject, cxRequestInfo); + ActiveMQRACredential credential = ActiveMQRACredential.getCredential(mcf, subject, cxRequestInfo); // Null users are allowed! if (userName != null && !userName.equals(credential.getUserName())) @@ -219,7 +219,7 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce throw new IllegalStateException("The managed connection is already destroyed"); } - HornetQRASession session = new HornetQRASession(this, (HornetQRAConnectionRequestInfo) cxRequestInfo); + ActiveMQRASession session = new ActiveMQRASession(this, (ActiveMQRAConnectionRequestInfo) cxRequestInfo); handles.add(session); return session; } @@ -231,9 +231,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ private void destroyHandles() throws ResourceException { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("destroyHandles()"); + ActiveMQRALogger.LOGGER.trace("destroyHandles()"); } try @@ -246,10 +246,10 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce } catch (Throwable t) { - HornetQRALogger.LOGGER.trace("Ignored error stopping connection", t); + ActiveMQRALogger.LOGGER.trace("Ignored error stopping connection", t); } - for (HornetQRASession session : handles) + for (ActiveMQRASession session : handles) { session.destroy(); } @@ -264,9 +264,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ public void destroy() throws ResourceException { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("destroy()"); + ActiveMQRALogger.LOGGER.trace("destroy()"); } if (isDestroyed.get() || connection == null) @@ -282,7 +282,7 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce } catch (JMSException e) { - HornetQRALogger.LOGGER.debug("Error unsetting the exception listener " + this, e); + ActiveMQRALogger.LOGGER.debug("Error unsetting the exception listener " + this, e); } if (connection != null) { @@ -322,10 +322,10 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce } catch (JMSException e) { - HornetQRALogger.LOGGER.debug("Error closing session " + this, e); + ActiveMQRALogger.LOGGER.debug("Error closing session " + this, e); } - // we must close the HornetQConnectionFactory because it contains a ServerLocator + // we must close the ActiveMQConnectionFactory because it contains a ServerLocator if (connectionFactory != null) { connectionFactory.close(); @@ -344,9 +344,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ public void cleanup() throws ResourceException { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("cleanup()"); + ActiveMQRALogger.LOGGER.trace("cleanup()"); } if (isDestroyed.get()) @@ -370,20 +370,20 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce /** * Move a handler from one mc to this one. * - * @param obj An object of type HornetQSession. + * @param obj An object of type ActiveMQSession. * @throws ResourceException Failed to associate connection. * @throws IllegalStateException ManagedConnection in an illegal state. */ public void associateConnection(final Object obj) throws ResourceException { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("associateConnection(" + obj + ")"); + ActiveMQRALogger.LOGGER.trace("associateConnection(" + obj + ")"); } - if (!isDestroyed.get() && obj instanceof HornetQRASession) + if (!isDestroyed.get() && obj instanceof ActiveMQRASession) { - HornetQRASession h = (HornetQRASession) obj; + ActiveMQRASession h = (ActiveMQRASession) obj; h.setManagedConnection(this); handles.add(h); } @@ -428,9 +428,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ protected void lock() { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("lock()"); + ActiveMQRALogger.LOGGER.trace("lock()"); } lock.lock(); @@ -443,9 +443,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ protected void tryLock() throws JMSException { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("tryLock()"); + ActiveMQRALogger.LOGGER.trace("tryLock()"); } Integer tryLock = mcf.getUseTryLock(); @@ -472,9 +472,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ protected void unlock() { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("unlock()"); + ActiveMQRALogger.LOGGER.trace("unlock()"); } lock.unlock(); @@ -487,9 +487,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ public void addConnectionEventListener(final ConnectionEventListener l) { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("addConnectionEventListener(" + l + ")"); + ActiveMQRALogger.LOGGER.trace("addConnectionEventListener(" + l + ")"); } eventListeners.add(l); @@ -502,9 +502,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ public void removeConnectionEventListener(final ConnectionEventListener l) { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("removeConnectionEventListener(" + l + ")"); + ActiveMQRALogger.LOGGER.trace("removeConnectionEventListener(" + l + ")"); } eventListeners.remove(l); @@ -518,9 +518,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ public XAResource getXAResource() throws ResourceException { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("getXAResource()"); + ActiveMQRALogger.LOGGER.trace("getXAResource()"); } // @@ -530,13 +530,13 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce if (xaResource == null) { ClientSessionInternal csi = (ClientSessionInternal) xaSession.getXAResource(); - HornetQRAXAResource hqXAResource = new HornetQRAXAResource(this, xaSession.getXAResource()); - xaResource = new HornetQXAResourceWrapper(hqXAResource, ra.getJndiName(), csi.getNodeId()); + ActiveMQRAXAResource activeMQRAXAResource = new ActiveMQRAXAResource(this, xaSession.getXAResource()); + xaResource = new ActiveMQXAResourceWrapper(activeMQRAXAResource, ra.getJndiName(), csi.getNodeId()); } - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("XAResource=" + xaResource); + ActiveMQRALogger.LOGGER.trace("XAResource=" + xaResource); } return xaResource; @@ -550,16 +550,16 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ public LocalTransaction getLocalTransaction() throws ResourceException { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("getLocalTransaction()"); + ActiveMQRALogger.LOGGER.trace("getLocalTransaction()"); } - LocalTransaction tx = new HornetQRALocalTransaction(this); + LocalTransaction tx = new ActiveMQRALocalTransaction(this); - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("LocalTransaction=" + tx); + ActiveMQRALogger.LOGGER.trace("LocalTransaction=" + tx); } return tx; @@ -574,9 +574,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ public ManagedConnectionMetaData getMetaData() throws ResourceException { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("getMetaData()"); + ActiveMQRALogger.LOGGER.trace("getMetaData()"); } if (isDestroyed.get()) @@ -584,7 +584,7 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce throw new IllegalStateException("The managed connection is already destroyed"); } - return new HornetQRAMetaData(this); + return new ActiveMQRAMetaData(this); } /** @@ -595,9 +595,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ public void setLogWriter(final PrintWriter out) throws ResourceException { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("setLogWriter(" + out + ")"); + ActiveMQRALogger.LOGGER.trace("setLogWriter(" + out + ")"); } } @@ -609,9 +609,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ public PrintWriter getLogWriter() throws ResourceException { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("getLogWriter()"); + ActiveMQRALogger.LOGGER.trace("getLogWriter()"); } return null; @@ -624,25 +624,25 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ public void onException(final JMSException exception) { - if (HornetQConnection.EXCEPTION_FAILOVER.equals(exception.getErrorCode())) + if (ActiveMQConnection.EXCEPTION_FAILOVER.equals(exception.getErrorCode())) { return; } - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("onException(" + exception + ")"); + ActiveMQRALogger.LOGGER.trace("onException(" + exception + ")"); } if (isDestroyed.get()) { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("Ignoring error on already destroyed connection " + this, exception); + ActiveMQRALogger.LOGGER.trace("Ignoring error on already destroyed connection " + this, exception); } return; } - HornetQRALogger.LOGGER.handlingJMSFailure(exception); + ActiveMQRALogger.LOGGER.handlingJMSFailure(exception); try { @@ -650,7 +650,7 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce } catch (JMSException e) { - HornetQRALogger.LOGGER.debug("Unable to unset exception listener", e); + ActiveMQRALogger.LOGGER.debug("Unable to unset exception listener", e); } ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, exception); @@ -667,18 +667,18 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce { if (xaResource != null && inManagedTx) { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("getSession() -> XA session " + xaSession.getSession()); + ActiveMQRALogger.LOGGER.trace("getSession() -> XA session " + xaSession.getSession()); } return xaSession.getSession(); } else { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("getSession() -> non XA session " + nonXAsession); + ActiveMQRALogger.LOGGER.trace("getSession() -> non XA session " + nonXAsession); } return nonXAsession; @@ -692,9 +692,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ protected void sendEvent(final ConnectionEvent event) { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("sendEvent(" + event + ")"); + ActiveMQRALogger.LOGGER.trace("sendEvent(" + event + ")"); } int type = event.getId(); @@ -737,11 +737,11 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce * * @param handle The handle to remove. */ - protected void removeHandle(final HornetQRASession handle) + protected void removeHandle(final ActiveMQRASession handle) { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("removeHandle(" + handle + ")"); + ActiveMQRALogger.LOGGER.trace("removeHandle(" + handle + ")"); } handles.remove(handle); @@ -752,11 +752,11 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce * * @return The connection request info for this connection. */ - protected HornetQRAConnectionRequestInfo getCRI() + protected ActiveMQRAConnectionRequestInfo getCRI() { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("getCRI()"); + ActiveMQRALogger.LOGGER.trace("getCRI()"); } return cri; @@ -767,11 +767,11 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce * * @return The connection factory for this connection. */ - protected HornetQRAManagedConnectionFactory getManagedConnectionFactory() + protected ActiveMQRAManagedConnectionFactory getManagedConnectionFactory() { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("getManagedConnectionFactory()"); + ActiveMQRALogger.LOGGER.trace("getManagedConnectionFactory()"); } return mcf; @@ -784,9 +784,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ void start() throws JMSException { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("start()"); + ActiveMQRALogger.LOGGER.trace("start()"); } if (connection != null) @@ -802,9 +802,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ void stop() throws JMSException { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("stop()"); + ActiveMQRALogger.LOGGER.trace("stop()"); } if (connection != null) @@ -820,9 +820,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ protected String getUserName() { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("getUserName()"); + ActiveMQRALogger.LOGGER.trace("getUserName()"); } return userName; @@ -835,9 +835,9 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce */ private void setup() throws ResourceException { - if (HornetQRAManagedConnection.trace) + if (ActiveMQRAManagedConnection.trace) { - HornetQRALogger.LOGGER.trace("setup()"); + ActiveMQRALogger.LOGGER.trace("setup()"); } try @@ -847,15 +847,15 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce boolean transacted = cri.isTransacted(); int acknowledgeMode = Session.AUTO_ACKNOWLEDGE; - if (cri.getType() == HornetQRAConnectionFactory.TOPIC_CONNECTION) + if (cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION) { if (userName != null && password != null) { - connection = (HornetQXAConnection) connectionFactory.createXATopicConnection(userName, password); + connection = (ActiveMQXAConnection) connectionFactory.createXATopicConnection(userName, password); } else { - connection = (HornetQXAConnection) connectionFactory.createXATopicConnection(); + connection = (ActiveMQXAConnection) connectionFactory.createXATopicConnection(); } connection.setExceptionListener(this); @@ -864,15 +864,15 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce nonXAsession = connection.createNonXATopicSession(transacted, acknowledgeMode); } - else if (cri.getType() == HornetQRAConnectionFactory.QUEUE_CONNECTION) + else if (cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION) { if (userName != null && password != null) { - connection = (HornetQXAConnection) connectionFactory.createXAQueueConnection(userName, password); + connection = (ActiveMQXAConnection) connectionFactory.createXAQueueConnection(userName, password); } else { - connection = (HornetQXAConnection) connectionFactory.createXAQueueConnection(); + connection = (ActiveMQXAConnection) connectionFactory.createXAQueueConnection(); } connection.setExceptionListener(this); @@ -885,11 +885,11 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce { if (userName != null && password != null) { - connection = (HornetQXAConnection) connectionFactory.createXAConnection(userName, password); + connection = (ActiveMQXAConnection) connectionFactory.createXAConnection(userName, password); } else { - connection = (HornetQXAConnection) connectionFactory.createXAConnection(); + connection = (ActiveMQXAConnection) connectionFactory.createXAConnection(); } connection.setExceptionListener(this); @@ -909,7 +909,7 @@ public final class HornetQRAManagedConnection implements ManagedConnection, Exce { if (connectionFactory == null) { - connectionFactory = ra.createHornetQConnectionFactory(mcf.getProperties()); + connectionFactory = ra.createActiveMQConnectionFactory(mcf.getProperties()); } } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAManagedConnectionFactory.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAManagedConnectionFactory.java similarity index 76% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAManagedConnectionFactory.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAManagedConnectionFactory.java index 788d867864..8c40ab9834 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAManagedConnectionFactory.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAManagedConnectionFactory.java @@ -25,17 +25,17 @@ import java.io.PrintWriter; import java.util.Iterator; import java.util.Set; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.jms.server.recovery.XARecoveryConfig; /** - * HornetQ ManagedConnectionFactory + * ActiveMQ ManagedConnectionFactory * * @author Adrian Brock * @author Jesper Pedersen. * @author Andy Taylor */ -public final class HornetQRAManagedConnectionFactory implements ManagedConnectionFactory, ResourceAdapterAssociation +public final class ActiveMQRAManagedConnectionFactory implements ManagedConnectionFactory, ResourceAdapterAssociation { /** * Serial version UID @@ -44,12 +44,12 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio /** * Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * The resource adapter */ - private HornetQResourceAdapter ra; + private ActiveMQResourceAdapter ra; /** * Connection manager @@ -59,12 +59,12 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio /** * The managed connection factory properties */ - private final HornetQRAMCFProperties mcfProperties; + private final ActiveMQRAMCFProperties mcfProperties; /** * Connection Factory used if properties are set */ - private HornetQConnectionFactory recoveryConnectionFactory; + private ActiveMQConnectionFactory recoveryConnectionFactory; /* * The resource recovery if there is one @@ -74,16 +74,16 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio /** * Constructor */ - public HornetQRAManagedConnectionFactory() + public ActiveMQRAManagedConnectionFactory() { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("constructor()"); + ActiveMQRALogger.LOGGER.trace("constructor()"); } ra = null; cm = null; - mcfProperties = new HornetQRAMCFProperties(); + mcfProperties = new ActiveMQRAMCFProperties(); } /** @@ -94,12 +94,12 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio */ public Object createConnectionFactory() throws ResourceException { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.debug("createConnectionFactory()"); + ActiveMQRALogger.LOGGER.debug("createConnectionFactory()"); } - return createConnectionFactory(new HornetQRAConnectionManager()); + return createConnectionFactory(new ActiveMQRAConnectionManager()); } /** @@ -111,18 +111,18 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio */ public Object createConnectionFactory(final ConnectionManager cxManager) throws ResourceException { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("createConnectionFactory(" + cxManager + ")"); + ActiveMQRALogger.LOGGER.trace("createConnectionFactory(" + cxManager + ")"); } cm = cxManager; - HornetQRAConnectionFactory cf = new HornetQRAConnectionFactoryImpl(this, cm); + ActiveMQRAConnectionFactory cf = new ActiveMQRAConnectionFactoryImpl(this, cm); - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("Created connection factory: " + cf + + ActiveMQRALogger.LOGGER.trace("Created connection factory: " + cf + ", using connection manager: " + cm); } @@ -139,29 +139,29 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio */ public ManagedConnection createManagedConnection(final Subject subject, final ConnectionRequestInfo cxRequestInfo) throws ResourceException { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("createManagedConnection(" + subject + ", " + cxRequestInfo + ")"); + ActiveMQRALogger.LOGGER.trace("createManagedConnection(" + subject + ", " + cxRequestInfo + ")"); } - HornetQRAConnectionRequestInfo cri = getCRI((HornetQRAConnectionRequestInfo) cxRequestInfo); + ActiveMQRAConnectionRequestInfo cri = getCRI((ActiveMQRAConnectionRequestInfo) cxRequestInfo); - HornetQRACredential credential = HornetQRACredential.getCredential(this, subject, cri); + ActiveMQRACredential credential = ActiveMQRACredential.getCredential(this, subject, cri); - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("jms credential: " + credential); + ActiveMQRALogger.LOGGER.trace("jms credential: " + credential); } - HornetQRAManagedConnection mc = new HornetQRAManagedConnection(this, + ActiveMQRAManagedConnection mc = new ActiveMQRAManagedConnection(this, cri, ra, credential.getUserName(), credential.getPassword()); - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("created new managed connection: " + mc); + ActiveMQRALogger.LOGGER.trace("created new managed connection: " + mc); } registerRecovery(); @@ -173,7 +173,7 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio { if (recoveryConnectionFactory == null) { - recoveryConnectionFactory = ra.createRecoveryHornetQConnectionFactory(mcfProperties); + recoveryConnectionFactory = ra.createRecoveryActiveMQConnectionFactory(mcfProperties); resourceRecovery = ra.getRecoveryManager().register(recoveryConnectionFactory, null, null); } } @@ -194,9 +194,9 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio */ public ManagedConnection matchManagedConnections(@SuppressWarnings("rawtypes") final Set connectionSet, final Subject subject, final ConnectionRequestInfo cxRequestInfo) throws ResourceException { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("matchManagedConnections(" + connectionSet + + ActiveMQRALogger.LOGGER.trace("matchManagedConnections(" + connectionSet + ", " + subject + ", " + @@ -204,12 +204,12 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio ")"); } - HornetQRAConnectionRequestInfo cri = getCRI((HornetQRAConnectionRequestInfo) cxRequestInfo); - HornetQRACredential credential = HornetQRACredential.getCredential(this, subject, cri); + ActiveMQRAConnectionRequestInfo cri = getCRI((ActiveMQRAConnectionRequestInfo) cxRequestInfo); + ActiveMQRACredential credential = ActiveMQRACredential.getCredential(this, subject, cri); - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("Looking for connection matching credentials: " + credential); + ActiveMQRALogger.LOGGER.trace("Looking for connection matching credentials: " + credential); } Iterator connections = connectionSet.iterator(); @@ -218,9 +218,9 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio { Object obj = connections.next(); - if (obj instanceof HornetQRAManagedConnection) + if (obj instanceof ActiveMQRAManagedConnection) { - HornetQRAManagedConnection mc = (HornetQRAManagedConnection) obj; + ActiveMQRAManagedConnection mc = (ActiveMQRAManagedConnection) obj; ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); if ((mc.getUserName() == null || mc.getUserName() != null && mc.getUserName() @@ -228,9 +228,9 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio { if (cri.equals(mc.getCRI())) { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("Found matching connection: " + mc); + ActiveMQRALogger.LOGGER.trace("Found matching connection: " + mc); } return mc; @@ -239,9 +239,9 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio } } - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("No matching connection was found"); + ActiveMQRALogger.LOGGER.trace("No matching connection was found"); } return null; @@ -255,9 +255,9 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio */ public void setLogWriter(final PrintWriter out) throws ResourceException { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("setLogWriter(" + out + ")"); + ActiveMQRALogger.LOGGER.trace("setLogWriter(" + out + ")"); } } @@ -269,9 +269,9 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio */ public PrintWriter getLogWriter() throws ResourceException { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("getLogWriter()"); + ActiveMQRALogger.LOGGER.trace("getLogWriter()"); } return null; @@ -284,9 +284,9 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio */ public ResourceAdapter getResourceAdapter() { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("getResourceAdapter()"); + ActiveMQRALogger.LOGGER.trace("getResourceAdapter()"); } return ra; @@ -302,17 +302,17 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio */ public void setResourceAdapter(final ResourceAdapter ra) throws ResourceException { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("setResourceAdapter(" + ra + ")"); + ActiveMQRALogger.LOGGER.trace("setResourceAdapter(" + ra + ")"); } - if (ra == null || !(ra instanceof HornetQResourceAdapter)) + if (ra == null || !(ra instanceof ActiveMQResourceAdapter)) { throw new ResourceException("Resource adapter is " + ra); } - this.ra = (HornetQResourceAdapter) ra; + this.ra = (ActiveMQResourceAdapter) ra; this.ra.setManagedConnectionFactory(this); } @@ -325,9 +325,9 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio @Override public boolean equals(final Object obj) { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("equals(" + obj + ")"); + ActiveMQRALogger.LOGGER.trace("equals(" + obj + ")"); } if (obj == null) @@ -335,9 +335,9 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio return false; } - if (obj instanceof HornetQRAManagedConnectionFactory) + if (obj instanceof ActiveMQRAManagedConnectionFactory) { - HornetQRAManagedConnectionFactory other = (HornetQRAManagedConnectionFactory) obj; + ActiveMQRAManagedConnectionFactory other = (ActiveMQRAManagedConnectionFactory) obj; return mcfProperties.equals(other.getProperties()) && ra.equals(other.getResourceAdapter()); } @@ -355,9 +355,9 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio @Override public int hashCode() { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("hashCode()"); + ActiveMQRALogger.LOGGER.trace("hashCode()"); } int hash = mcfProperties.hashCode(); @@ -373,9 +373,9 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio */ public String getSessionDefaultType() { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("getSessionDefaultType()"); + ActiveMQRALogger.LOGGER.trace("getSessionDefaultType()"); } return mcfProperties.getSessionDefaultType(); @@ -388,9 +388,9 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio */ public void setSessionDefaultType(final String type) { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("setSessionDefaultType(" + type + ")"); + ActiveMQRALogger.LOGGER.trace("setSessionDefaultType(" + type + ")"); } mcfProperties.setSessionDefaultType(type); @@ -709,9 +709,9 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio */ public Integer getUseTryLock() { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("getUseTryLock()"); + ActiveMQRALogger.LOGGER.trace("getUseTryLock()"); } return mcfProperties.getUseTryLock(); @@ -724,9 +724,9 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio */ public void setUseTryLock(final Integer useTryLock) { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("setUseTryLock(" + useTryLock + ")"); + ActiveMQRALogger.LOGGER.trace("setUseTryLock(" + useTryLock + ")"); } mcfProperties.setUseTryLock(useTryLock); @@ -739,12 +739,12 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio */ public ConnectionMetaData getMetaData() { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("getMetadata()"); + ActiveMQRALogger.LOGGER.trace("getMetadata()"); } - return new HornetQRAConnectionMetaData(); + return new ActiveMQRAConnectionMetaData(); } /** @@ -752,11 +752,11 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio * * @return The properties */ - protected HornetQRAMCFProperties getProperties() + protected ActiveMQRAMCFProperties getProperties() { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("getProperties()"); + ActiveMQRALogger.LOGGER.trace("getProperties()"); } return mcfProperties; @@ -768,17 +768,17 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio * @param info The instance that should be updated; may be null * @return The instance */ - private HornetQRAConnectionRequestInfo getCRI(final HornetQRAConnectionRequestInfo info) + private ActiveMQRAConnectionRequestInfo getCRI(final ActiveMQRAConnectionRequestInfo info) { - if (HornetQRAManagedConnectionFactory.trace) + if (ActiveMQRAManagedConnectionFactory.trace) { - HornetQRALogger.LOGGER.trace("getCRI(" + info + ")"); + ActiveMQRALogger.LOGGER.trace("getCRI(" + info + ")"); } if (info == null) { // Create a default one - return new HornetQRAConnectionRequestInfo(ra.getProperties(), mcfProperties.getType()); + return new ActiveMQRAConnectionRequestInfo(ra.getProperties(), mcfProperties.getType()); } else { @@ -788,7 +788,7 @@ public final class HornetQRAManagedConnectionFactory implements ManagedConnectio } } - // this should be called when HornetQResourceAdapter.stop() is called since this MCF is registered with it + // this should be called when ActiveMQResourceAdapter.stop() is called since this MCF is registered with it public void stop() { if (resourceRecovery != null) diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMapMessage.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMapMessage.java similarity index 73% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMapMessage.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMapMessage.java index 30abb59bed..8affe60ebb 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMapMessage.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMapMessage.java @@ -26,10 +26,10 @@ import javax.jms.MapMessage; * @author Jesper Pedersen * @version $Revision: 71554 $ */ -public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage +public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessage { /** Whether trace is enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * Create a new wrapper @@ -37,13 +37,13 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage * @param message the message * @param session the session */ - public HornetQRAMapMessage(final MapMessage message, final HornetQRASession session) + public ActiveMQRAMapMessage(final MapMessage message, final ActiveMQRASession session) { super(message, session); - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")"); } } @@ -55,9 +55,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public boolean getBoolean(final String name) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("getBoolean(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getBoolean(" + name + ")"); } return ((MapMessage)message).getBoolean(name); @@ -71,9 +71,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public byte getByte(final String name) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("getByte(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getByte(" + name + ")"); } return ((MapMessage)message).getByte(name); @@ -87,9 +87,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public byte[] getBytes(final String name) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("getBytes(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getBytes(" + name + ")"); } return ((MapMessage)message).getBytes(name); @@ -103,9 +103,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public char getChar(final String name) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("getChar(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getChar(" + name + ")"); } return ((MapMessage)message).getChar(name); @@ -119,9 +119,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public double getDouble(final String name) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("getDouble(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getDouble(" + name + ")"); } return ((MapMessage)message).getDouble(name); @@ -135,9 +135,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public float getFloat(final String name) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("getFloat(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getFloat(" + name + ")"); } return ((MapMessage)message).getFloat(name); @@ -151,9 +151,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public int getInt(final String name) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("getInt(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getInt(" + name + ")"); } return ((MapMessage)message).getInt(name); @@ -167,9 +167,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public long getLong(final String name) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("getLong(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getLong(" + name + ")"); } return ((MapMessage)message).getLong(name); @@ -183,9 +183,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage @SuppressWarnings("rawtypes") public Enumeration getMapNames() throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("getMapNames()"); + ActiveMQRALogger.LOGGER.trace("getMapNames()"); } return ((MapMessage)message).getMapNames(); @@ -199,9 +199,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public Object getObject(final String name) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("getObject(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getObject(" + name + ")"); } return ((MapMessage)message).getObject(name); @@ -215,9 +215,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public short getShort(final String name) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("getShort(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getShort(" + name + ")"); } return ((MapMessage)message).getShort(name); @@ -231,9 +231,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public String getString(final String name) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("getString(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getString(" + name + ")"); } return ((MapMessage)message).getString(name); @@ -247,9 +247,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public boolean itemExists(final String name) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("itemExists(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("itemExists(" + name + ")"); } return ((MapMessage)message).itemExists(name); @@ -263,9 +263,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public void setBoolean(final String name, final boolean value) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("setBoolean(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setBoolean(" + name + ", " + value + ")"); } ((MapMessage)message).setBoolean(name, value); @@ -279,9 +279,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public void setByte(final String name, final byte value) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("setByte(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setByte(" + name + ", " + value + ")"); } ((MapMessage)message).setByte(name, value); @@ -297,9 +297,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public void setBytes(final String name, final byte[] value, final int offset, final int length) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("setBytes(" + name + ", " + Arrays.toString(value) + ", " + offset + ", " + + ActiveMQRALogger.LOGGER.trace("setBytes(" + name + ", " + Arrays.toString(value) + ", " + offset + ", " + length + ")"); } @@ -314,9 +314,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public void setBytes(final String name, final byte[] value) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("setBytes(" + name + ", " + Arrays.toString(value) + ")"); + ActiveMQRALogger.LOGGER.trace("setBytes(" + name + ", " + Arrays.toString(value) + ")"); } ((MapMessage)message).setBytes(name, value); @@ -330,9 +330,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public void setChar(final String name, final char value) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("setChar(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setChar(" + name + ", " + value + ")"); } ((MapMessage)message).setChar(name, value); @@ -346,9 +346,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public void setDouble(final String name, final double value) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("setDouble(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setDouble(" + name + ", " + value + ")"); } ((MapMessage)message).setDouble(name, value); @@ -362,9 +362,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public void setFloat(final String name, final float value) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("setFloat(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setFloat(" + name + ", " + value + ")"); } ((MapMessage)message).setFloat(name, value); @@ -378,9 +378,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public void setInt(final String name, final int value) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("setInt(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setInt(" + name + ", " + value + ")"); } ((MapMessage)message).setInt(name, value); @@ -394,9 +394,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public void setLong(final String name, final long value) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("setLong(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setLong(" + name + ", " + value + ")"); } ((MapMessage)message).setLong(name, value); @@ -410,9 +410,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public void setObject(final String name, final Object value) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("setObject(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setObject(" + name + ", " + value + ")"); } ((MapMessage)message).setObject(name, value); @@ -426,9 +426,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public void setShort(final String name, final short value) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("setShort(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setShort(" + name + ", " + value + ")"); } ((MapMessage)message).setShort(name, value); @@ -442,9 +442,9 @@ public class HornetQRAMapMessage extends HornetQRAMessage implements MapMessage */ public void setString(final String name, final String value) throws JMSException { - if (HornetQRAMapMessage.trace) + if (ActiveMQRAMapMessage.trace) { - HornetQRALogger.LOGGER.trace("setString(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setString(" + name + ", " + value + ")"); } ((MapMessage)message).setString(name, value); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMessage.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMessage.java similarity index 72% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMessage.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMessage.java index 952588d29b..565ab15ac8 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMessage.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMessage.java @@ -25,12 +25,12 @@ import java.util.Enumeration; * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRAMessage implements Message +public class ActiveMQRAMessage implements Message { /** * Whether trace is enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * The message @@ -40,7 +40,7 @@ public class HornetQRAMessage implements Message /** * The session */ - protected HornetQRASession session; + protected ActiveMQRASession session; /** * Create a new wrapper @@ -48,11 +48,11 @@ public class HornetQRAMessage implements Message * @param message the message * @param session the session */ - public HornetQRAMessage(final Message message, final HornetQRASession session) + public ActiveMQRAMessage(final Message message, final ActiveMQRASession session) { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")"); } this.message = message; @@ -66,9 +66,9 @@ public class HornetQRAMessage implements Message */ public void acknowledge() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("acknowledge()"); + ActiveMQRALogger.LOGGER.trace("acknowledge()"); } session.getSession(); // Check for closed @@ -82,9 +82,9 @@ public class HornetQRAMessage implements Message */ public void clearBody() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("clearBody()"); + ActiveMQRALogger.LOGGER.trace("clearBody()"); } message.clearBody(); @@ -97,9 +97,9 @@ public class HornetQRAMessage implements Message */ public void clearProperties() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("clearProperties()"); + ActiveMQRALogger.LOGGER.trace("clearProperties()"); } message.clearProperties(); @@ -114,9 +114,9 @@ public class HornetQRAMessage implements Message */ public boolean getBooleanProperty(final String name) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getBooleanProperty(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getBooleanProperty(" + name + ")"); } return message.getBooleanProperty(name); @@ -131,9 +131,9 @@ public class HornetQRAMessage implements Message */ public byte getByteProperty(final String name) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getByteProperty(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getByteProperty(" + name + ")"); } return message.getByteProperty(name); @@ -148,9 +148,9 @@ public class HornetQRAMessage implements Message */ public double getDoubleProperty(final String name) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getDoubleProperty(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getDoubleProperty(" + name + ")"); } return message.getDoubleProperty(name); @@ -165,9 +165,9 @@ public class HornetQRAMessage implements Message */ public float getFloatProperty(final String name) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getFloatProperty(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getFloatProperty(" + name + ")"); } return message.getFloatProperty(name); @@ -182,9 +182,9 @@ public class HornetQRAMessage implements Message */ public int getIntProperty(final String name) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getIntProperty(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getIntProperty(" + name + ")"); } return message.getIntProperty(name); @@ -198,9 +198,9 @@ public class HornetQRAMessage implements Message */ public String getJMSCorrelationID() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getJMSCorrelationID()"); + ActiveMQRALogger.LOGGER.trace("getJMSCorrelationID()"); } return message.getJMSCorrelationID(); @@ -214,9 +214,9 @@ public class HornetQRAMessage implements Message */ public byte[] getJMSCorrelationIDAsBytes() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getJMSCorrelationIDAsBytes()"); + ActiveMQRALogger.LOGGER.trace("getJMSCorrelationIDAsBytes()"); } return message.getJMSCorrelationIDAsBytes(); @@ -230,9 +230,9 @@ public class HornetQRAMessage implements Message */ public int getJMSDeliveryMode() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getJMSDeliveryMode()"); + ActiveMQRALogger.LOGGER.trace("getJMSDeliveryMode()"); } return message.getJMSDeliveryMode(); @@ -246,9 +246,9 @@ public class HornetQRAMessage implements Message */ public Destination getJMSDestination() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getJMSDestination()"); + ActiveMQRALogger.LOGGER.trace("getJMSDestination()"); } return message.getJMSDestination(); @@ -262,9 +262,9 @@ public class HornetQRAMessage implements Message */ public long getJMSExpiration() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getJMSExpiration()"); + ActiveMQRALogger.LOGGER.trace("getJMSExpiration()"); } return message.getJMSExpiration(); @@ -278,9 +278,9 @@ public class HornetQRAMessage implements Message */ public String getJMSMessageID() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getJMSMessageID()"); + ActiveMQRALogger.LOGGER.trace("getJMSMessageID()"); } return message.getJMSMessageID(); @@ -294,9 +294,9 @@ public class HornetQRAMessage implements Message */ public int getJMSPriority() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getJMSPriority()"); + ActiveMQRALogger.LOGGER.trace("getJMSPriority()"); } return message.getJMSPriority(); @@ -310,9 +310,9 @@ public class HornetQRAMessage implements Message */ public boolean getJMSRedelivered() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getJMSRedelivered()"); + ActiveMQRALogger.LOGGER.trace("getJMSRedelivered()"); } return message.getJMSRedelivered(); @@ -326,9 +326,9 @@ public class HornetQRAMessage implements Message */ public Destination getJMSReplyTo() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getJMSReplyTo()"); + ActiveMQRALogger.LOGGER.trace("getJMSReplyTo()"); } return message.getJMSReplyTo(); @@ -342,9 +342,9 @@ public class HornetQRAMessage implements Message */ public long getJMSTimestamp() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getJMSTimestamp()"); + ActiveMQRALogger.LOGGER.trace("getJMSTimestamp()"); } return message.getJMSTimestamp(); @@ -358,9 +358,9 @@ public class HornetQRAMessage implements Message */ public String getJMSType() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getJMSType()"); + ActiveMQRALogger.LOGGER.trace("getJMSType()"); } return message.getJMSType(); @@ -375,9 +375,9 @@ public class HornetQRAMessage implements Message */ public long getLongProperty(final String name) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getLongProperty(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getLongProperty(" + name + ")"); } return message.getLongProperty(name); @@ -392,9 +392,9 @@ public class HornetQRAMessage implements Message */ public Object getObjectProperty(final String name) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getObjectProperty(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getObjectProperty(" + name + ")"); } return message.getObjectProperty(name); @@ -409,9 +409,9 @@ public class HornetQRAMessage implements Message @SuppressWarnings("rawtypes") public Enumeration getPropertyNames() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getPropertyNames()"); + ActiveMQRALogger.LOGGER.trace("getPropertyNames()"); } return message.getPropertyNames(); @@ -426,9 +426,9 @@ public class HornetQRAMessage implements Message */ public short getShortProperty(final String name) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getShortProperty(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getShortProperty(" + name + ")"); } return message.getShortProperty(name); @@ -443,9 +443,9 @@ public class HornetQRAMessage implements Message */ public String getStringProperty(final String name) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getStringProperty(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("getStringProperty(" + name + ")"); } return message.getStringProperty(name); @@ -460,9 +460,9 @@ public class HornetQRAMessage implements Message */ public boolean propertyExists(final String name) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("propertyExists(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("propertyExists(" + name + ")"); } return message.propertyExists(name); @@ -477,9 +477,9 @@ public class HornetQRAMessage implements Message */ public void setBooleanProperty(final String name, final boolean value) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setBooleanProperty(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setBooleanProperty(" + name + ", " + value + ")"); } message.setBooleanProperty(name, value); @@ -494,9 +494,9 @@ public class HornetQRAMessage implements Message */ public void setByteProperty(final String name, final byte value) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setByteProperty(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setByteProperty(" + name + ", " + value + ")"); } message.setByteProperty(name, value); @@ -511,9 +511,9 @@ public class HornetQRAMessage implements Message */ public void setDoubleProperty(final String name, final double value) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setDoubleProperty(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setDoubleProperty(" + name + ", " + value + ")"); } message.setDoubleProperty(name, value); @@ -528,9 +528,9 @@ public class HornetQRAMessage implements Message */ public void setFloatProperty(final String name, final float value) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setFloatProperty(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setFloatProperty(" + name + ", " + value + ")"); } message.setFloatProperty(name, value); @@ -545,9 +545,9 @@ public class HornetQRAMessage implements Message */ public void setIntProperty(final String name, final int value) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setIntProperty(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setIntProperty(" + name + ", " + value + ")"); } message.setIntProperty(name, value); @@ -561,9 +561,9 @@ public class HornetQRAMessage implements Message */ public void setJMSCorrelationID(final String correlationID) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setJMSCorrelationID(" + correlationID + ")"); + ActiveMQRALogger.LOGGER.trace("setJMSCorrelationID(" + correlationID + ")"); } message.setJMSCorrelationID(correlationID); @@ -577,9 +577,9 @@ public class HornetQRAMessage implements Message */ public void setJMSCorrelationIDAsBytes(final byte[] correlationID) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setJMSCorrelationIDAsBytes(" + Arrays.toString(correlationID) + ")"); + ActiveMQRALogger.LOGGER.trace("setJMSCorrelationIDAsBytes(" + Arrays.toString(correlationID) + ")"); } message.setJMSCorrelationIDAsBytes(correlationID); @@ -593,9 +593,9 @@ public class HornetQRAMessage implements Message */ public void setJMSDeliveryMode(final int deliveryMode) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setJMSDeliveryMode(" + deliveryMode + ")"); + ActiveMQRALogger.LOGGER.trace("setJMSDeliveryMode(" + deliveryMode + ")"); } message.setJMSDeliveryMode(deliveryMode); @@ -609,9 +609,9 @@ public class HornetQRAMessage implements Message */ public void setJMSDestination(final Destination destination) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setJMSDestination(" + destination + ")"); + ActiveMQRALogger.LOGGER.trace("setJMSDestination(" + destination + ")"); } message.setJMSDestination(destination); @@ -625,9 +625,9 @@ public class HornetQRAMessage implements Message */ public void setJMSExpiration(final long expiration) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setJMSExpiration(" + expiration + ")"); + ActiveMQRALogger.LOGGER.trace("setJMSExpiration(" + expiration + ")"); } message.setJMSExpiration(expiration); @@ -641,9 +641,9 @@ public class HornetQRAMessage implements Message */ public void setJMSMessageID(final String id) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setJMSMessageID(" + id + ")"); + ActiveMQRALogger.LOGGER.trace("setJMSMessageID(" + id + ")"); } message.setJMSMessageID(id); @@ -657,9 +657,9 @@ public class HornetQRAMessage implements Message */ public void setJMSPriority(final int priority) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setJMSPriority(" + priority + ")"); + ActiveMQRALogger.LOGGER.trace("setJMSPriority(" + priority + ")"); } message.setJMSPriority(priority); @@ -673,9 +673,9 @@ public class HornetQRAMessage implements Message */ public void setJMSRedelivered(final boolean redelivered) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setJMSRedelivered(" + redelivered + ")"); + ActiveMQRALogger.LOGGER.trace("setJMSRedelivered(" + redelivered + ")"); } message.setJMSRedelivered(redelivered); @@ -689,9 +689,9 @@ public class HornetQRAMessage implements Message */ public void setJMSReplyTo(final Destination replyTo) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setJMSReplyTo(" + replyTo + ")"); + ActiveMQRALogger.LOGGER.trace("setJMSReplyTo(" + replyTo + ")"); } message.setJMSReplyTo(replyTo); @@ -705,9 +705,9 @@ public class HornetQRAMessage implements Message */ public void setJMSTimestamp(final long timestamp) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setJMSTimestamp(" + timestamp + ")"); + ActiveMQRALogger.LOGGER.trace("setJMSTimestamp(" + timestamp + ")"); } message.setJMSTimestamp(timestamp); @@ -721,9 +721,9 @@ public class HornetQRAMessage implements Message */ public void setJMSType(final String type) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setJMSType(" + type + ")"); + ActiveMQRALogger.LOGGER.trace("setJMSType(" + type + ")"); } message.setJMSType(type); @@ -738,9 +738,9 @@ public class HornetQRAMessage implements Message */ public void setLongProperty(final String name, final long value) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setLongProperty(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setLongProperty(" + name + ", " + value + ")"); } message.setLongProperty(name, value); @@ -755,9 +755,9 @@ public class HornetQRAMessage implements Message */ public void setObjectProperty(final String name, final Object value) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setObjectProperty(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setObjectProperty(" + name + ", " + value + ")"); } message.setObjectProperty(name, value); @@ -772,9 +772,9 @@ public class HornetQRAMessage implements Message */ public void setShortProperty(final String name, final short value) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setShortProperty(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setShortProperty(" + name + ", " + value + ")"); } message.setShortProperty(name, value); @@ -789,9 +789,9 @@ public class HornetQRAMessage implements Message */ public void setStringProperty(final String name, final String value) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setStringProperty(" + name + ", " + value + ")"); + ActiveMQRALogger.LOGGER.trace("setStringProperty(" + name + ", " + value + ")"); } message.setStringProperty(name, value); @@ -800,9 +800,9 @@ public class HornetQRAMessage implements Message @Override public long getJMSDeliveryTime() throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getJMSDeliveryTime()"); + ActiveMQRALogger.LOGGER.trace("getJMSDeliveryTime()"); } return message.getJMSDeliveryTime(); } @@ -811,9 +811,9 @@ public class HornetQRAMessage implements Message public void setJMSDeliveryTime(long deliveryTime) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("setJMSDeliveryTime(" + deliveryTime + ")"); + ActiveMQRALogger.LOGGER.trace("setJMSDeliveryTime(" + deliveryTime + ")"); } message.setJMSDeliveryTime(deliveryTime); } @@ -821,9 +821,9 @@ public class HornetQRAMessage implements Message @Override public T getBody(Class c) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("getBody(" + c + ")"); + ActiveMQRALogger.LOGGER.trace("getBody(" + c + ")"); } return message.getBody(c); } @@ -832,9 +832,9 @@ public class HornetQRAMessage implements Message public boolean isBodyAssignableTo(@SuppressWarnings("rawtypes") Class c) throws JMSException { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("isBodyAssignableTo(" + c + ")"); + ActiveMQRALogger.LOGGER.trace("isBodyAssignableTo(" + c + ")"); } return message.isBodyAssignableTo(c); } @@ -847,9 +847,9 @@ public class HornetQRAMessage implements Message @Override public int hashCode() { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("hashCode()"); + ActiveMQRALogger.LOGGER.trace("hashCode()"); } return message.hashCode(); @@ -864,14 +864,14 @@ public class HornetQRAMessage implements Message @Override public boolean equals(final Object object) { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("equals(" + object + ")"); + ActiveMQRALogger.LOGGER.trace("equals(" + object + ")"); } - if (object != null && object instanceof HornetQRAMessage) + if (object != null && object instanceof ActiveMQRAMessage) { - return message.equals(((HornetQRAMessage)object).message); + return message.equals(((ActiveMQRAMessage)object).message); } else { @@ -887,9 +887,9 @@ public class HornetQRAMessage implements Message @Override public String toString() { - if (HornetQRAMessage.trace) + if (ActiveMQRAMessage.trace) { - HornetQRALogger.LOGGER.trace("toString()"); + ActiveMQRALogger.LOGGER.trace("toString()"); } return message.toString(); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMessageConsumer.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMessageConsumer.java similarity index 71% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMessageConsumer.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMessageConsumer.java index 81e8ad6ba4..19c74b79e9 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMessageConsumer.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMessageConsumer.java @@ -29,30 +29,30 @@ import javax.jms.TextMessage; * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRAMessageConsumer implements MessageConsumer +public class ActiveMQRAMessageConsumer implements MessageConsumer { /** Whether trace is enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** The wrapped message consumer */ protected MessageConsumer consumer; /** The session for this consumer */ - protected HornetQRASession session; + protected ActiveMQRASession session; /** * Create a new wrapper * @param consumer the consumer * @param session the session */ - public HornetQRAMessageConsumer(final MessageConsumer consumer, final HornetQRASession session) + public ActiveMQRAMessageConsumer(final MessageConsumer consumer, final ActiveMQRASession session) { this.consumer = consumer; this.session = session; - if (HornetQRAMessageConsumer.trace) + if (ActiveMQRAMessageConsumer.trace) { - HornetQRALogger.LOGGER.trace("new HornetQMessageConsumer " + this + + ActiveMQRALogger.LOGGER.trace("new ActiveMQMessageConsumer " + this + " consumer=" + consumer + " session=" + @@ -66,9 +66,9 @@ public class HornetQRAMessageConsumer implements MessageConsumer */ public void close() throws JMSException { - if (HornetQRAMessageConsumer.trace) + if (ActiveMQRAMessageConsumer.trace) { - HornetQRALogger.LOGGER.trace("close " + this); + ActiveMQRALogger.LOGGER.trace("close " + this); } try { @@ -86,9 +86,9 @@ public class HornetQRAMessageConsumer implements MessageConsumer */ void checkState() throws JMSException { - if (HornetQRAMessageConsumer.trace) + if (ActiveMQRAMessageConsumer.trace) { - HornetQRALogger.LOGGER.trace("checkState()"); + ActiveMQRALogger.LOGGER.trace("checkState()"); } session.checkState(); } @@ -100,9 +100,9 @@ public class HornetQRAMessageConsumer implements MessageConsumer */ public MessageListener getMessageListener() throws JMSException { - if (HornetQRAMessageConsumer.trace) + if (ActiveMQRAMessageConsumer.trace) { - HornetQRALogger.LOGGER.trace("getMessageListener()"); + ActiveMQRALogger.LOGGER.trace("getMessageListener()"); } checkState(); @@ -144,9 +144,9 @@ public class HornetQRAMessageConsumer implements MessageConsumer */ public String getMessageSelector() throws JMSException { - if (HornetQRAMessageConsumer.trace) + if (ActiveMQRAMessageConsumer.trace) { - HornetQRALogger.LOGGER.trace("getMessageSelector()"); + ActiveMQRALogger.LOGGER.trace("getMessageSelector()"); } checkState(); @@ -163,17 +163,17 @@ public class HornetQRAMessageConsumer implements MessageConsumer session.lock(); try { - if (HornetQRAMessageConsumer.trace) + if (ActiveMQRAMessageConsumer.trace) { - HornetQRALogger.LOGGER.trace("receive " + this); + ActiveMQRALogger.LOGGER.trace("receive " + this); } checkState(); Message message = consumer.receive(); - if (HornetQRAMessageConsumer.trace) + if (ActiveMQRAMessageConsumer.trace) { - HornetQRALogger.LOGGER.trace("received " + this + " result=" + message); + ActiveMQRALogger.LOGGER.trace("received " + this + " result=" + message); } if (message == null) @@ -202,17 +202,17 @@ public class HornetQRAMessageConsumer implements MessageConsumer session.lock(); try { - if (HornetQRAMessageConsumer.trace) + if (ActiveMQRAMessageConsumer.trace) { - HornetQRALogger.LOGGER.trace("receive " + this + " timeout=" + timeout); + ActiveMQRALogger.LOGGER.trace("receive " + this + " timeout=" + timeout); } checkState(); Message message = consumer.receive(timeout); - if (HornetQRAMessageConsumer.trace) + if (ActiveMQRAMessageConsumer.trace) { - HornetQRALogger.LOGGER.trace("received " + this + " result=" + message); + ActiveMQRALogger.LOGGER.trace("received " + this + " result=" + message); } if (message == null) @@ -240,17 +240,17 @@ public class HornetQRAMessageConsumer implements MessageConsumer session.lock(); try { - if (HornetQRAMessageConsumer.trace) + if (ActiveMQRAMessageConsumer.trace) { - HornetQRALogger.LOGGER.trace("receiveNoWait " + this); + ActiveMQRALogger.LOGGER.trace("receiveNoWait " + this); } checkState(); Message message = consumer.receiveNoWait(); - if (HornetQRAMessageConsumer.trace) + if (ActiveMQRAMessageConsumer.trace) { - HornetQRALogger.LOGGER.trace("received " + this + " result=" + message); + ActiveMQRALogger.LOGGER.trace("received " + this + " result=" + message); } if (message == null) @@ -274,9 +274,9 @@ public class HornetQRAMessageConsumer implements MessageConsumer */ void closeConsumer() throws JMSException { - if (HornetQRAMessageConsumer.trace) + if (ActiveMQRAMessageConsumer.trace) { - HornetQRALogger.LOGGER.trace("closeConsumer()"); + ActiveMQRALogger.LOGGER.trace("closeConsumer()"); } consumer.close(); @@ -289,32 +289,32 @@ public class HornetQRAMessageConsumer implements MessageConsumer */ Message wrapMessage(final Message message) { - if (HornetQRAMessageConsumer.trace) + if (ActiveMQRAMessageConsumer.trace) { - HornetQRALogger.LOGGER.trace("wrapMessage(" + message + ")"); + ActiveMQRALogger.LOGGER.trace("wrapMessage(" + message + ")"); } if (message instanceof BytesMessage) { - return new HornetQRABytesMessage((BytesMessage)message, session); + return new ActiveMQRABytesMessage((BytesMessage)message, session); } else if (message instanceof MapMessage) { - return new HornetQRAMapMessage((MapMessage)message, session); + return new ActiveMQRAMapMessage((MapMessage)message, session); } else if (message instanceof ObjectMessage) { - return new HornetQRAObjectMessage((ObjectMessage)message, session); + return new ActiveMQRAObjectMessage((ObjectMessage)message, session); } else if (message instanceof StreamMessage) { - return new HornetQRAStreamMessage((StreamMessage)message, session); + return new ActiveMQRAStreamMessage((StreamMessage)message, session); } else if (message instanceof TextMessage) { - return new HornetQRATextMessage((TextMessage)message, session); + return new ActiveMQRATextMessage((TextMessage)message, session); } - return new HornetQRAMessage(message, session); + return new ActiveMQRAMessage(message, session); } /** @@ -324,11 +324,11 @@ public class HornetQRAMessageConsumer implements MessageConsumer */ MessageListener wrapMessageListener(final MessageListener listener) { - if (HornetQRAMessageConsumer.trace) + if (ActiveMQRAMessageConsumer.trace) { - HornetQRALogger.LOGGER.trace("getMessageSelector()"); + ActiveMQRALogger.LOGGER.trace("getMessageSelector()"); } - return new HornetQRAMessageListener(listener, this); + return new ActiveMQRAMessageListener(listener, this); } } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMessageListener.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMessageListener.java similarity index 72% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMessageListener.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMessageListener.java index 79f4604eb2..42f0a42140 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMessageListener.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMessageListener.java @@ -21,27 +21,27 @@ import javax.jms.MessageListener; * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRAMessageListener implements MessageListener +public class ActiveMQRAMessageListener implements MessageListener { /** Whether trace is enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** The message listener */ private final MessageListener listener; /** The consumer */ - private final HornetQRAMessageConsumer consumer; + private final ActiveMQRAMessageConsumer consumer; /** * Create a new wrapper * @param listener the listener * @param consumer the consumer */ - public HornetQRAMessageListener(final MessageListener listener, final HornetQRAMessageConsumer consumer) + public ActiveMQRAMessageListener(final MessageListener listener, final ActiveMQRAMessageConsumer consumer) { - if (HornetQRAMessageListener.trace) + if (ActiveMQRAMessageListener.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + listener + ", " + consumer + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + listener + ", " + consumer + ")"); } this.listener = listener; @@ -54,9 +54,9 @@ public class HornetQRAMessageListener implements MessageListener */ public void onMessage(Message message) { - if (HornetQRAMessageListener.trace) + if (ActiveMQRAMessageListener.trace) { - HornetQRALogger.LOGGER.trace("onMessage(" + message + ")"); + ActiveMQRALogger.LOGGER.trace("onMessage(" + message + ")"); } message = consumer.wrapMessage(message); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMessageProducer.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMessageProducer.java similarity index 73% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMessageProducer.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMessageProducer.java index a168c3e214..4ba4271ba5 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMessageProducer.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMessageProducer.java @@ -20,35 +20,35 @@ import javax.jms.MessageProducer; /** - * HornetQMessageProducer. + * ActiveMQMessageProducer. * * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRAMessageProducer implements MessageProducer +public class ActiveMQRAMessageProducer implements MessageProducer { /** Whether trace is enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** The wrapped message producer */ protected MessageProducer producer; /** The session for this consumer */ - protected HornetQRASession session; + protected ActiveMQRASession session; /** * Create a new wrapper * @param producer the producer * @param session the session */ - public HornetQRAMessageProducer(final MessageProducer producer, final HornetQRASession session) + public ActiveMQRAMessageProducer(final MessageProducer producer, final ActiveMQRASession session) { this.producer = producer; this.session = session; - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("new HornetQMessageProducer " + this + + ActiveMQRALogger.LOGGER.trace("new ActiveMQMessageProducer " + this + " producer=" + producer + " session=" + @@ -62,9 +62,9 @@ public class HornetQRAMessageProducer implements MessageProducer */ public void close() throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("close " + this); + ActiveMQRALogger.LOGGER.trace("close " + this); } try { @@ -94,9 +94,9 @@ public class HornetQRAMessageProducer implements MessageProducer session.lock(); try { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("send " + this + + ActiveMQRALogger.LOGGER.trace("send " + this + " destination=" + destination + " message=" + @@ -113,9 +113,9 @@ public class HornetQRAMessageProducer implements MessageProducer producer.send(destination, message, deliveryMode, priority, timeToLive); - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("sent " + this + " result=" + message); + ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message); } } finally @@ -135,18 +135,18 @@ public class HornetQRAMessageProducer implements MessageProducer session.lock(); try { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("send " + this + " destination=" + destination + " message=" + message); + ActiveMQRALogger.LOGGER.trace("send " + this + " destination=" + destination + " message=" + message); } checkState(); producer.send(destination, message); - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("sent " + this + " result=" + message); + ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message); } } finally @@ -168,9 +168,9 @@ public class HornetQRAMessageProducer implements MessageProducer session.lock(); try { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("send " + this + + ActiveMQRALogger.LOGGER.trace("send " + this + " message=" + message + " deliveryMode=" + @@ -185,9 +185,9 @@ public class HornetQRAMessageProducer implements MessageProducer producer.send(message, deliveryMode, priority, timeToLive); - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("sent " + this + " result=" + message); + ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message); } } finally @@ -206,18 +206,18 @@ public class HornetQRAMessageProducer implements MessageProducer session.lock(); try { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("send " + this + " message=" + message); + ActiveMQRALogger.LOGGER.trace("send " + this + " message=" + message); } checkState(); producer.send(message); - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("sent " + this + " result=" + message); + ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message); } } finally @@ -233,9 +233,9 @@ public class HornetQRAMessageProducer implements MessageProducer */ public int getDeliveryMode() throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("getDeliveryMode()"); + ActiveMQRALogger.LOGGER.trace("getDeliveryMode()"); } return producer.getDeliveryMode(); @@ -248,9 +248,9 @@ public class HornetQRAMessageProducer implements MessageProducer */ public Destination getDestination() throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("getDestination()"); + ActiveMQRALogger.LOGGER.trace("getDestination()"); } return producer.getDestination(); @@ -263,9 +263,9 @@ public class HornetQRAMessageProducer implements MessageProducer */ public boolean getDisableMessageID() throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("getDisableMessageID()"); + ActiveMQRALogger.LOGGER.trace("getDisableMessageID()"); } return producer.getDisableMessageID(); @@ -278,9 +278,9 @@ public class HornetQRAMessageProducer implements MessageProducer */ public boolean getDisableMessageTimestamp() throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("getDisableMessageTimestamp()"); + ActiveMQRALogger.LOGGER.trace("getDisableMessageTimestamp()"); } return producer.getDisableMessageTimestamp(); @@ -293,9 +293,9 @@ public class HornetQRAMessageProducer implements MessageProducer */ public int getPriority() throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("getPriority()"); + ActiveMQRALogger.LOGGER.trace("getPriority()"); } return producer.getPriority(); @@ -308,9 +308,9 @@ public class HornetQRAMessageProducer implements MessageProducer */ public long getTimeToLive() throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("getTimeToLive()"); + ActiveMQRALogger.LOGGER.trace("getTimeToLive()"); } return producer.getTimeToLive(); @@ -323,9 +323,9 @@ public class HornetQRAMessageProducer implements MessageProducer */ public void setDeliveryMode(final int deliveryMode) throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("setDeliveryMode(" + deliveryMode + ")"); + ActiveMQRALogger.LOGGER.trace("setDeliveryMode(" + deliveryMode + ")"); } producer.setDeliveryMode(deliveryMode); @@ -338,9 +338,9 @@ public class HornetQRAMessageProducer implements MessageProducer */ public void setDisableMessageID(final boolean value) throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("setDisableMessageID(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("setDisableMessageID(" + value + ")"); } producer.setDisableMessageID(value); @@ -353,9 +353,9 @@ public class HornetQRAMessageProducer implements MessageProducer */ public void setDisableMessageTimestamp(final boolean value) throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("setDisableMessageTimestamp(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("setDisableMessageTimestamp(" + value + ")"); } producer.setDisableMessageTimestamp(value); @@ -368,9 +368,9 @@ public class HornetQRAMessageProducer implements MessageProducer */ public void setPriority(final int defaultPriority) throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("setPriority(" + defaultPriority + ")"); + ActiveMQRALogger.LOGGER.trace("setPriority(" + defaultPriority + ")"); } producer.setPriority(defaultPriority); @@ -383,9 +383,9 @@ public class HornetQRAMessageProducer implements MessageProducer */ public void setTimeToLive(final long timeToLive) throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("setTimeToLive(" + timeToLive + ")"); + ActiveMQRALogger.LOGGER.trace("setTimeToLive(" + timeToLive + ")"); } producer.setTimeToLive(timeToLive); @@ -394,9 +394,9 @@ public class HornetQRAMessageProducer implements MessageProducer @Override public void setDeliveryDelay(long deliveryDelay) throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("setDeliveryDelay(" + deliveryDelay + ")"); + ActiveMQRALogger.LOGGER.trace("setDeliveryDelay(" + deliveryDelay + ")"); } producer.setDeliveryDelay(deliveryDelay); } @@ -404,9 +404,9 @@ public class HornetQRAMessageProducer implements MessageProducer @Override public long getDeliveryDelay() throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("getDeliveryDelay()"); + ActiveMQRALogger.LOGGER.trace("getDeliveryDelay()"); } return producer.getDeliveryDelay(); } @@ -414,9 +414,9 @@ public class HornetQRAMessageProducer implements MessageProducer @Override public void send(Message message, CompletionListener completionListener) throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("send(" + message + ", " + completionListener + ")"); + ActiveMQRALogger.LOGGER.trace("send(" + message + ", " + completionListener + ")"); } producer.send(message, completionListener); } @@ -424,9 +424,9 @@ public class HornetQRAMessageProducer implements MessageProducer @Override public void send(Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener) throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("send(" + message + ", " + deliveryMode + ", " + priority + ", " + timeToLive + + ActiveMQRALogger.LOGGER.trace("send(" + message + ", " + deliveryMode + ", " + priority + ", " + timeToLive + ", " + completionListener + ")"); } producer.send(message, deliveryMode, priority, timeToLive, completionListener); @@ -435,9 +435,9 @@ public class HornetQRAMessageProducer implements MessageProducer @Override public void send(Destination destination, Message message, CompletionListener completionListener) throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("send(" + destination + ", " + message + ", " + completionListener + ")"); + ActiveMQRALogger.LOGGER.trace("send(" + destination + ", " + message + ", " + completionListener + ")"); } producer.send(destination, message, completionListener); } @@ -445,9 +445,9 @@ public class HornetQRAMessageProducer implements MessageProducer @Override public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener) throws JMSException { - if (HornetQRAMessageProducer.trace) + if (ActiveMQRAMessageProducer.trace) { - HornetQRALogger.LOGGER.trace("send(" + destination + ", " + message + ", " + deliveryMode + ", " + priority + + ActiveMQRALogger.LOGGER.trace("send(" + destination + ", " + message + ", " + deliveryMode + ", " + priority + ", " + timeToLive + ", " + completionListener + ")"); } producer.send(destination, message, deliveryMode, priority, timeToLive, completionListener); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMetaData.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMetaData.java similarity index 72% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMetaData.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMetaData.java index 78d510a0be..d30c44dd5c 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAMetaData.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAMetaData.java @@ -22,23 +22,23 @@ import javax.resource.spi.ManagedConnectionMetaData; * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRAMetaData implements ManagedConnectionMetaData +public class ActiveMQRAMetaData implements ManagedConnectionMetaData { /** Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** The managed connection */ - private final HornetQRAManagedConnection mc; + private final ActiveMQRAManagedConnection mc; /** * Constructor * @param mc The managed connection */ - public HornetQRAMetaData(final HornetQRAManagedConnection mc) + public ActiveMQRAMetaData(final ActiveMQRAManagedConnection mc) { - if (HornetQRAMetaData.trace) + if (ActiveMQRAMetaData.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + mc + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + mc + ")"); } this.mc = mc; @@ -51,12 +51,12 @@ public class HornetQRAMetaData implements ManagedConnectionMetaData */ public String getEISProductName() throws ResourceException { - if (HornetQRAMetaData.trace) + if (ActiveMQRAMetaData.trace) { - HornetQRALogger.LOGGER.trace("getEISProductName()"); + ActiveMQRALogger.LOGGER.trace("getEISProductName()"); } - return "HornetQ"; + return "ActiveMQ"; } /** @@ -66,9 +66,9 @@ public class HornetQRAMetaData implements ManagedConnectionMetaData */ public String getEISProductVersion() throws ResourceException { - if (HornetQRAMetaData.trace) + if (ActiveMQRAMetaData.trace) { - HornetQRALogger.LOGGER.trace("getEISProductVersion()"); + ActiveMQRALogger.LOGGER.trace("getEISProductVersion()"); } return "2.0"; @@ -81,9 +81,9 @@ public class HornetQRAMetaData implements ManagedConnectionMetaData */ public String getUserName() throws ResourceException { - if (HornetQRAMetaData.trace) + if (ActiveMQRAMetaData.trace) { - HornetQRALogger.LOGGER.trace("getUserName()"); + ActiveMQRALogger.LOGGER.trace("getUserName()"); } return mc.getUserName(); @@ -96,9 +96,9 @@ public class HornetQRAMetaData implements ManagedConnectionMetaData */ public int getMaxConnections() throws ResourceException { - if (HornetQRAMetaData.trace) + if (ActiveMQRAMetaData.trace) { - HornetQRALogger.LOGGER.trace("getMaxConnections()"); + ActiveMQRALogger.LOGGER.trace("getMaxConnections()"); } return 0; diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAObjectMessage.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAObjectMessage.java similarity index 73% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAObjectMessage.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAObjectMessage.java index d64eff8d44..3fc843eb6c 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAObjectMessage.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAObjectMessage.java @@ -24,23 +24,23 @@ import javax.jms.ObjectMessage; * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRAObjectMessage extends HornetQRAMessage implements ObjectMessage +public class ActiveMQRAObjectMessage extends ActiveMQRAMessage implements ObjectMessage { /** Whether trace is enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * Create a new wrapper * @param message the message * @param session the session */ - public HornetQRAObjectMessage(final ObjectMessage message, final HornetQRASession session) + public ActiveMQRAObjectMessage(final ObjectMessage message, final ActiveMQRASession session) { super(message, session); - if (HornetQRAObjectMessage.trace) + if (ActiveMQRAObjectMessage.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")"); } } @@ -51,9 +51,9 @@ public class HornetQRAObjectMessage extends HornetQRAMessage implements ObjectMe */ public Serializable getObject() throws JMSException { - if (HornetQRAObjectMessage.trace) + if (ActiveMQRAObjectMessage.trace) { - HornetQRALogger.LOGGER.trace("getObject()"); + ActiveMQRALogger.LOGGER.trace("getObject()"); } return ((ObjectMessage)message).getObject(); @@ -66,9 +66,9 @@ public class HornetQRAObjectMessage extends HornetQRAMessage implements ObjectMe */ public void setObject(final Serializable object) throws JMSException { - if (HornetQRAObjectMessage.trace) + if (ActiveMQRAObjectMessage.trace) { - HornetQRALogger.LOGGER.trace("setObject(" + object + ")"); + ActiveMQRALogger.LOGGER.trace("setObject(" + object + ")"); } ((ObjectMessage)message).setObject(object); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAProperties.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAProperties.java similarity index 87% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAProperties.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAProperties.java index c0f1d9b178..c796271d59 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAProperties.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAProperties.java @@ -28,7 +28,7 @@ import org.apache.activemq.utils.SensitiveDataCodec; * @author Jesper Pedersen * @author Andy Taylor */ -public class HornetQRAProperties extends ConnectionFactoryProperties implements Serializable +public class ActiveMQRAProperties extends ConnectionFactoryProperties implements Serializable { /** * Serial version UID @@ -37,7 +37,7 @@ public class HornetQRAProperties extends ConnectionFactoryProperties implements /** * Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * The user name @@ -99,11 +99,11 @@ public class HornetQRAProperties extends ConnectionFactoryProperties implements /** * Constructor */ - public HornetQRAProperties() + public ActiveMQRAProperties() { - if (HornetQRAProperties.trace) + if (ActiveMQRAProperties.trace) { - HornetQRALogger.LOGGER.trace("constructor()"); + ActiveMQRALogger.LOGGER.trace("constructor()"); } } @@ -114,9 +114,9 @@ public class HornetQRAProperties extends ConnectionFactoryProperties implements */ public String getUserName() { - if (HornetQRAProperties.trace) + if (ActiveMQRAProperties.trace) { - HornetQRALogger.LOGGER.trace("getUserName()"); + ActiveMQRALogger.LOGGER.trace("getUserName()"); } return userName; @@ -129,9 +129,9 @@ public class HornetQRAProperties extends ConnectionFactoryProperties implements */ public void setUserName(final String userName) { - if (HornetQRAProperties.trace) + if (ActiveMQRAProperties.trace) { - HornetQRALogger.LOGGER.trace("setUserName(" + userName + ")"); + ActiveMQRALogger.LOGGER.trace("setUserName(" + userName + ")"); } this.userName = userName; @@ -144,9 +144,9 @@ public class HornetQRAProperties extends ConnectionFactoryProperties implements */ public String getPassword() { - if (HornetQRAProperties.trace) + if (ActiveMQRAProperties.trace) { - HornetQRALogger.LOGGER.trace("getPassword()"); + ActiveMQRALogger.LOGGER.trace("getPassword()"); } return password; @@ -164,9 +164,9 @@ public class HornetQRAProperties extends ConnectionFactoryProperties implements */ public void setPassword(final String password) { - if (HornetQRAProperties.trace) + if (ActiveMQRAProperties.trace) { - HornetQRALogger.LOGGER.trace("setPassword(****)"); + ActiveMQRALogger.LOGGER.trace("setPassword(****)"); } this.password = password; @@ -209,9 +209,9 @@ public class HornetQRAProperties extends ConnectionFactoryProperties implements */ public Boolean getUseLocalTx() { - if (HornetQRAProperties.trace) + if (ActiveMQRAProperties.trace) { - HornetQRALogger.LOGGER.trace("getUseLocalTx()"); + ActiveMQRALogger.LOGGER.trace("getUseLocalTx()"); } return localTx; @@ -224,9 +224,9 @@ public class HornetQRAProperties extends ConnectionFactoryProperties implements */ public void setUseLocalTx(final Boolean localTx) { - if (HornetQRAProperties.trace) + if (ActiveMQRAProperties.trace) { - HornetQRALogger.LOGGER.trace("setUseLocalTx(" + localTx + ")"); + ActiveMQRALogger.LOGGER.trace("setUseLocalTx(" + localTx + ")"); } this.localTx = localTx; @@ -296,7 +296,7 @@ public class HornetQRAProperties extends ConnectionFactoryProperties implements @Override public String toString() { - return "HornetQRAProperties[localTx=" + localTx + + return "ActiveMQRAProperties[localTx=" + localTx + ", userName=" + userName + ", password=****]"; } @@ -323,7 +323,7 @@ public class HornetQRAProperties extends ConnectionFactoryProperties implements } catch (Exception e) { - throw HornetQRABundle.BUNDLE.errorDecodingPassword(e); + throw ActiveMQRABundle.BUNDLE.errorDecodingPassword(e); } } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAQueueReceiver.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAQueueReceiver.java similarity index 73% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAQueueReceiver.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAQueueReceiver.java index de4a76d019..43c023e850 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAQueueReceiver.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAQueueReceiver.java @@ -23,23 +23,23 @@ import javax.jms.QueueReceiver; * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRAQueueReceiver extends HornetQRAMessageConsumer implements QueueReceiver +public class ActiveMQRAQueueReceiver extends ActiveMQRAMessageConsumer implements QueueReceiver { /** Whether trace is enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * Create a new wrapper * @param consumer the queue receiver * @param session the session */ - public HornetQRAQueueReceiver(final QueueReceiver consumer, final HornetQRASession session) + public ActiveMQRAQueueReceiver(final QueueReceiver consumer, final ActiveMQRASession session) { super(consumer, session); - if (HornetQRAQueueReceiver.trace) + if (ActiveMQRAQueueReceiver.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + consumer + ", " + session + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + consumer + ", " + session + ")"); } } @@ -50,9 +50,9 @@ public class HornetQRAQueueReceiver extends HornetQRAMessageConsumer implements */ public Queue getQueue() throws JMSException { - if (HornetQRAQueueReceiver.trace) + if (ActiveMQRAQueueReceiver.trace) { - HornetQRALogger.LOGGER.trace("getQueue()"); + ActiveMQRALogger.LOGGER.trace("getQueue()"); } checkState(); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAQueueSender.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAQueueSender.java similarity index 75% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAQueueSender.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAQueueSender.java index e18cfcf966..ea72d21e95 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAQueueSender.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAQueueSender.java @@ -19,28 +19,28 @@ import javax.jms.QueueSender; /** - * HornetQQueueSender. + * ActiveMQQueueSender. * * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRAQueueSender extends HornetQRAMessageProducer implements QueueSender +public class ActiveMQRAQueueSender extends ActiveMQRAMessageProducer implements QueueSender { /** Whether trace is enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * Create a new wrapper * @param producer the producer * @param session the session */ - public HornetQRAQueueSender(final QueueSender producer, final HornetQRASession session) + public ActiveMQRAQueueSender(final QueueSender producer, final ActiveMQRASession session) { super(producer, session); - if (HornetQRAQueueSender.trace) + if (ActiveMQRAQueueSender.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + producer + ", " + session + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + producer + ", " + session + ")"); } } @@ -51,9 +51,9 @@ public class HornetQRAQueueSender extends HornetQRAMessageProducer implements Qu */ public Queue getQueue() throws JMSException { - if (HornetQRAQueueSender.trace) + if (ActiveMQRAQueueSender.trace) { - HornetQRALogger.LOGGER.trace("getQueue()"); + ActiveMQRALogger.LOGGER.trace("getQueue()"); } return ((QueueSender)producer).getQueue(); @@ -77,9 +77,9 @@ public class HornetQRAQueueSender extends HornetQRAMessageProducer implements Qu session.lock(); try { - if (HornetQRAQueueSender.trace) + if (ActiveMQRAQueueSender.trace) { - HornetQRALogger.LOGGER.trace("send " + this + + ActiveMQRALogger.LOGGER.trace("send " + this + " destination=" + destination + " message=" + @@ -95,9 +95,9 @@ public class HornetQRAQueueSender extends HornetQRAMessageProducer implements Qu checkState(); producer.send(destination, message, deliveryMode, priority, timeToLive); - if (HornetQRAQueueSender.trace) + if (ActiveMQRAQueueSender.trace) { - HornetQRALogger.LOGGER.trace("sent " + this + " result=" + message); + ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message); } } finally @@ -117,17 +117,17 @@ public class HornetQRAQueueSender extends HornetQRAMessageProducer implements Qu session.lock(); try { - if (HornetQRAQueueSender.trace) + if (ActiveMQRAQueueSender.trace) { - HornetQRALogger.LOGGER.trace("send " + this + " destination=" + destination + " message=" + message); + ActiveMQRALogger.LOGGER.trace("send " + this + " destination=" + destination + " message=" + message); } checkState(); producer.send(destination, message); - if (HornetQRAQueueSender.trace) + if (ActiveMQRAQueueSender.trace) { - HornetQRALogger.LOGGER.trace("sent " + this + " result=" + message); + ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message); } } finally diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAService.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAService.java similarity index 89% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAService.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAService.java index f82ada93f9..430e85578c 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAService.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAService.java @@ -20,14 +20,14 @@ import javax.management.ObjectName; /** - * A HornetQRAService ensures that HornetQ Resource Adapter will be stopped *before* the HornetQ server. + * A ActiveMQRAService ensures that ActiveMQ Resource Adapter will be stopped *before* the ActiveMQ server. * https://jira.jboss.org/browse/HORNETQ-339 * * @author Jeff Mesnil * * */ -public class HornetQRAService +public class ActiveMQRAService { // Constants ----------------------------------------------------- // Attributes ---------------------------------------------------- @@ -40,7 +40,7 @@ public class HornetQRAService // Constructors -------------------------------------------------- - public HornetQRAService(final MBeanServer mBeanServer, final String resourceAdapterObjectName) + public ActiveMQRAService(final MBeanServer mBeanServer, final String resourceAdapterObjectName) { this.mBeanServer = mBeanServer; this.resourceAdapterObjectName = resourceAdapterObjectName; @@ -67,7 +67,7 @@ public class HornetQRAService } catch (Exception e) { - HornetQRALogger.LOGGER.errorStoppingRA(e); + ActiveMQRALogger.LOGGER.errorStoppingRA(e); } } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRASession.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRASession.java similarity index 69% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRASession.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRASession.java index b7a551bc30..d1cad59215 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRASession.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRASession.java @@ -50,7 +50,7 @@ import java.util.Iterator; import java.util.Set; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; -import org.apache.activemq.jms.client.HornetQSession; +import org.apache.activemq.jms.client.ActiveMQSession; /** @@ -60,27 +60,27 @@ import org.apache.activemq.jms.client.HornetQSession; * @author Jesper Pedersen * @author Martyn Taylor */ -public final class HornetQRASession implements QueueSession, TopicSession, XAQueueSession, XATopicSession +public final class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSession, XATopicSession { /** * Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * The managed connection */ - private HornetQRAManagedConnection mc; + private ActiveMQRAManagedConnection mc; /** * The connection request info */ - private final HornetQRAConnectionRequestInfo cri; + private final ActiveMQRAConnectionRequestInfo cri; /** * The session factory */ - private HornetQRASessionFactory sf; + private ActiveMQRASessionFactory sf; /** * The message consumers @@ -98,11 +98,11 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue * @param mc The managed connection * @param cri The connection request info */ - public HornetQRASession(final HornetQRAManagedConnection mc, final HornetQRAConnectionRequestInfo cri) + public ActiveMQRASession(final ActiveMQRAManagedConnection mc, final ActiveMQRAConnectionRequestInfo cri) { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + mc + ", " + cri + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + mc + ", " + cri + ")"); } this.mc = mc; @@ -117,11 +117,11 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue * * @param sf The session factory */ - public void setHornetQSessionFactory(final HornetQRASessionFactory sf) + public void setActiveMQSessionFactory(final ActiveMQRASessionFactory sf) { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("setHornetQSessionFactory(" + sf + ")"); + ActiveMQRALogger.LOGGER.trace("setActiveMQSessionFactory(" + sf + ")"); } this.sf = sf; @@ -135,12 +135,12 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ protected void lock() throws JMSException { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("lock()"); + ActiveMQRALogger.LOGGER.trace("lock()"); } - final HornetQRAManagedConnection mcLocal = this.mc; + final ActiveMQRAManagedConnection mcLocal = this.mc; if (mcLocal != null) { mcLocal.tryLock(); @@ -156,12 +156,12 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ protected void unlock() { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("unlock()"); + ActiveMQRALogger.LOGGER.trace("unlock()"); } - final HornetQRAManagedConnection mcLocal = this.mc; + final ActiveMQRAManagedConnection mcLocal = this.mc; if (mcLocal != null) { mcLocal.unlock(); @@ -181,9 +181,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createBytesMessage" + session); + ActiveMQRALogger.LOGGER.trace("createBytesMessage" + session); } return session.createBytesMessage(); @@ -199,9 +199,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createMapMessage(), " + session); + ActiveMQRALogger.LOGGER.trace("createMapMessage(), " + session); } return session.createMapMessage(); @@ -217,9 +217,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createMessage" + session); + ActiveMQRALogger.LOGGER.trace("createMessage" + session); } return session.createMessage(); @@ -235,9 +235,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createObjectMessage" + session); + ActiveMQRALogger.LOGGER.trace("createObjectMessage" + session); } return session.createObjectMessage(); @@ -254,9 +254,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createObjectMessage(" + object + ")" + session); + ActiveMQRALogger.LOGGER.trace("createObjectMessage(" + object + ")" + session); } return session.createObjectMessage(object); @@ -272,9 +272,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createStreamMessage" + session); + ActiveMQRALogger.LOGGER.trace("createStreamMessage" + session); } return session.createStreamMessage(); @@ -290,9 +290,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createTextMessage" + session); + ActiveMQRALogger.LOGGER.trace("createTextMessage" + session); } return session.createTextMessage(); @@ -309,9 +309,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createTextMessage(" + string + ")" + session); + ActiveMQRALogger.LOGGER.trace("createTextMessage(" + string + ")" + session); } return session.createTextMessage(string); @@ -325,9 +325,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public boolean getTransacted() throws JMSException { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("getTransacted()"); + ActiveMQRALogger.LOGGER.trace("getTransacted()"); } getSessionInternal(); @@ -342,9 +342,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public MessageListener getMessageListener() throws JMSException { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("getMessageListener()"); + ActiveMQRALogger.LOGGER.trace("getMessageListener()"); } throw new IllegalStateException("Method not allowed"); @@ -358,9 +358,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public void setMessageListener(final MessageListener listener) throws JMSException { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("setMessageListener(" + listener + ")"); + ActiveMQRALogger.LOGGER.trace("setMessageListener(" + listener + ")"); } throw new IllegalStateException("Method not allowed"); @@ -373,9 +373,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public void run() { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("run()"); + ActiveMQRALogger.LOGGER.trace("run()"); } throw new Error("Method not allowed"); @@ -389,9 +389,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public void close() throws JMSException { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("close()"); + ActiveMQRALogger.LOGGER.trace("close()"); } sf.closeSession(this); @@ -405,8 +405,8 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public void commit() throws JMSException { - if (cri.getType() == HornetQRAConnectionFactory.XA_CONNECTION || cri.getType() == HornetQRAConnectionFactory.XA_QUEUE_CONNECTION || - cri.getType() == HornetQRAConnectionFactory.XA_TOPIC_CONNECTION) + if (cri.getType() == ActiveMQRAConnectionFactory.XA_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION || + cri.getType() == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { throw new TransactionInProgressException("XA connection"); } @@ -421,9 +421,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue throw new IllegalStateException("Session is not transacted"); } - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("Commit session " + this); + ActiveMQRALogger.LOGGER.trace("Commit session " + this); } session.commit(); @@ -441,8 +441,8 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public void rollback() throws JMSException { - if (cri.getType() == HornetQRAConnectionFactory.XA_CONNECTION || cri.getType() == HornetQRAConnectionFactory.XA_QUEUE_CONNECTION || - cri.getType() == HornetQRAConnectionFactory.XA_TOPIC_CONNECTION) + if (cri.getType() == ActiveMQRAConnectionFactory.XA_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION || + cri.getType() == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { throw new TransactionInProgressException("XA connection"); } @@ -457,9 +457,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue throw new IllegalStateException("Session is not transacted"); } - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("Rollback session " + this); + ActiveMQRALogger.LOGGER.trace("Rollback session " + this); } session.rollback(); @@ -487,9 +487,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue throw new IllegalStateException("Session is transacted"); } - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("Recover session " + this); + ActiveMQRALogger.LOGGER.trace("Recover session " + this); } session.recover(); @@ -509,23 +509,23 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public Topic createTopic(final String topicName) throws JMSException { - if (cri.getType() == HornetQRAConnectionFactory.QUEUE_CONNECTION || cri.getType() == HornetQRAConnectionFactory.XA_QUEUE_CONNECTION) + if (cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION) { throw new IllegalStateException("Cannot create topic for javax.jms.QueueSession"); } Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createTopic " + session + " topicName=" + topicName); + ActiveMQRALogger.LOGGER.trace("createTopic " + session + " topicName=" + topicName); } Topic result = session.createTopic(topicName); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdTopic " + session + " topic=" + result); + ActiveMQRALogger.LOGGER.trace("createdTopic " + session + " topic=" + result); } return result; @@ -545,17 +545,17 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { TopicSession session = getTopicSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createSubscriber " + session + " topic=" + topic); + ActiveMQRALogger.LOGGER.trace("createSubscriber " + session + " topic=" + topic); } TopicSubscriber result = session.createSubscriber(topic); - result = new HornetQRATopicSubscriber(result, this); + result = new ActiveMQRATopicSubscriber(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdSubscriber " + session + " HornetQTopicSubscriber=" + result); + ActiveMQRALogger.LOGGER.trace("createdSubscriber " + session + " ActiveMQTopicSubscriber=" + result); } addConsumer(result); @@ -584,9 +584,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { TopicSession session = getTopicSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createSubscriber " + session + + ActiveMQRALogger.LOGGER.trace("createSubscriber " + session + " topic=" + topic + " selector=" + @@ -596,11 +596,11 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue } TopicSubscriber result = session.createSubscriber(topic, messageSelector, noLocal); - result = new HornetQRATopicSubscriber(result, this); + result = new ActiveMQRATopicSubscriber(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdSubscriber " + session + " HornetQTopicSubscriber=" + result); + ActiveMQRALogger.LOGGER.trace("createdSubscriber " + session + " ActiveMQTopicSubscriber=" + result); } addConsumer(result); @@ -623,7 +623,7 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public TopicSubscriber createDurableSubscriber(final Topic topic, final String name) throws JMSException { - if (cri.getType() == HornetQRAConnectionFactory.QUEUE_CONNECTION || cri.getType() == HornetQRAConnectionFactory.XA_QUEUE_CONNECTION) + if (cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION) { throw new IllegalStateException("Cannot create durable subscriber from javax.jms.QueueSession"); } @@ -633,17 +633,17 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createDurableSubscriber " + session + " topic=" + topic + " name=" + name); + ActiveMQRALogger.LOGGER.trace("createDurableSubscriber " + session + " topic=" + topic + " name=" + name); } TopicSubscriber result = session.createDurableSubscriber(topic, name); - result = new HornetQRATopicSubscriber(result, this); + result = new ActiveMQRATopicSubscriber(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdDurableSubscriber " + session + " HornetQTopicSubscriber=" + result); + ActiveMQRALogger.LOGGER.trace("createdDurableSubscriber " + session + " ActiveMQTopicSubscriber=" + result); } addConsumer(result); @@ -676,9 +676,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createDurableSubscriber " + session + + ActiveMQRALogger.LOGGER.trace("createDurableSubscriber " + session + " topic=" + topic + " name=" + @@ -690,11 +690,11 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue } TopicSubscriber result = session.createDurableSubscriber(topic, name, messageSelector, noLocal); - result = new HornetQRATopicSubscriber(result, this); + result = new ActiveMQRATopicSubscriber(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdDurableSubscriber " + session + " HornetQTopicSubscriber=" + result); + ActiveMQRALogger.LOGGER.trace("createdDurableSubscriber " + session + " ActiveMQTopicSubscriber=" + result); } addConsumer(result); @@ -721,17 +721,17 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { TopicSession session = getTopicSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createPublisher " + session + " topic=" + topic); + ActiveMQRALogger.LOGGER.trace("createPublisher " + session + " topic=" + topic); } TopicPublisher result = session.createPublisher(topic); - result = new HornetQRATopicPublisher(result, this); + result = new ActiveMQRATopicPublisher(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdPublisher " + session + " publisher=" + result); + ActiveMQRALogger.LOGGER.trace("createdPublisher " + session + " publisher=" + result); } addProducer(result); @@ -752,7 +752,7 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public TemporaryTopic createTemporaryTopic() throws JMSException { - if (cri.getType() == HornetQRAConnectionFactory.QUEUE_CONNECTION || cri.getType() == HornetQRAConnectionFactory.XA_QUEUE_CONNECTION) + if (cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION) { throw new IllegalStateException("Cannot create temporary topic for javax.jms.QueueSession"); } @@ -762,16 +762,16 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createTemporaryTopic " + session); + ActiveMQRALogger.LOGGER.trace("createTemporaryTopic " + session); } TemporaryTopic temp = session.createTemporaryTopic(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdTemporaryTopic " + session + " temp=" + temp); + ActiveMQRALogger.LOGGER.trace("createdTemporaryTopic " + session + " temp=" + temp); } sf.addTemporaryTopic(temp); @@ -792,7 +792,7 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public void unsubscribe(final String name) throws JMSException { - if (cri.getType() == HornetQRAConnectionFactory.QUEUE_CONNECTION || cri.getType() == HornetQRAConnectionFactory.XA_QUEUE_CONNECTION) + if (cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION) { throw new IllegalStateException("Cannot unsubscribe for javax.jms.QueueSession"); } @@ -802,9 +802,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("unsubscribe " + session + " name=" + name); + ActiveMQRALogger.LOGGER.trace("unsubscribe " + session + " name=" + name); } session.unsubscribe(name); @@ -824,23 +824,23 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public QueueBrowser createBrowser(final Queue queue) throws JMSException { - if (cri.getType() == HornetQRAConnectionFactory.TOPIC_CONNECTION || cri.getType() == HornetQRAConnectionFactory.XA_TOPIC_CONNECTION) + if (cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { throw new IllegalStateException("Cannot create browser for javax.jms.TopicSession"); } Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createBrowser " + session + " queue=" + queue); + ActiveMQRALogger.LOGGER.trace("createBrowser " + session + " queue=" + queue); } QueueBrowser result = session.createBrowser(queue); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdBrowser " + session + " browser=" + result); + ActiveMQRALogger.LOGGER.trace("createdBrowser " + session + " browser=" + result); } return result; @@ -856,23 +856,23 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public QueueBrowser createBrowser(final Queue queue, final String messageSelector) throws JMSException { - if (cri.getType() == HornetQRAConnectionFactory.TOPIC_CONNECTION || cri.getType() == HornetQRAConnectionFactory.XA_TOPIC_CONNECTION) + if (cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { throw new IllegalStateException("Cannot create browser for javax.jms.TopicSession"); } Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createBrowser " + session + " queue=" + queue + " selector=" + messageSelector); + ActiveMQRALogger.LOGGER.trace("createBrowser " + session + " queue=" + queue + " selector=" + messageSelector); } QueueBrowser result = session.createBrowser(queue, messageSelector); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdBrowser " + session + " browser=" + result); + ActiveMQRALogger.LOGGER.trace("createdBrowser " + session + " browser=" + result); } return result; @@ -887,23 +887,23 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public Queue createQueue(final String queueName) throws JMSException { - if (cri.getType() == HornetQRAConnectionFactory.TOPIC_CONNECTION || cri.getType() == HornetQRAConnectionFactory.XA_TOPIC_CONNECTION) + if (cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { throw new IllegalStateException("Cannot create browser or javax.jms.TopicSession"); } Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createQueue " + session + " queueName=" + queueName); + ActiveMQRALogger.LOGGER.trace("createQueue " + session + " queueName=" + queueName); } Queue result = session.createQueue(queueName); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdQueue " + session + " queue=" + result); + ActiveMQRALogger.LOGGER.trace("createdQueue " + session + " queue=" + result); } return result; @@ -923,17 +923,17 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { QueueSession session = getQueueSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createReceiver " + session + " queue=" + queue); + ActiveMQRALogger.LOGGER.trace("createReceiver " + session + " queue=" + queue); } QueueReceiver result = session.createReceiver(queue); - result = new HornetQRAQueueReceiver(result, this); + result = new ActiveMQRAQueueReceiver(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdReceiver " + session + " receiver=" + result); + ActiveMQRALogger.LOGGER.trace("createdReceiver " + session + " receiver=" + result); } addConsumer(result); @@ -961,17 +961,17 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { QueueSession session = getQueueSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createReceiver " + session + " queue=" + queue + " selector=" + messageSelector); + ActiveMQRALogger.LOGGER.trace("createReceiver " + session + " queue=" + queue + " selector=" + messageSelector); } QueueReceiver result = session.createReceiver(queue, messageSelector); - result = new HornetQRAQueueReceiver(result, this); + result = new ActiveMQRAQueueReceiver(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdReceiver " + session + " receiver=" + result); + ActiveMQRALogger.LOGGER.trace("createdReceiver " + session + " receiver=" + result); } addConsumer(result); @@ -998,17 +998,17 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { QueueSession session = getQueueSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createSender " + session + " queue=" + queue); + ActiveMQRALogger.LOGGER.trace("createSender " + session + " queue=" + queue); } QueueSender result = session.createSender(queue); - result = new HornetQRAQueueSender(result, this); + result = new ActiveMQRAQueueSender(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdSender " + session + " sender=" + result); + ActiveMQRALogger.LOGGER.trace("createdSender " + session + " sender=" + result); } addProducer(result); @@ -1029,7 +1029,7 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public TemporaryQueue createTemporaryQueue() throws JMSException { - if (cri.getType() == HornetQRAConnectionFactory.TOPIC_CONNECTION || cri.getType() == HornetQRAConnectionFactory.XA_TOPIC_CONNECTION) + if (cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { throw new IllegalStateException("Cannot create temporary queue for javax.jms.TopicSession"); } @@ -1039,16 +1039,16 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createTemporaryQueue " + session); + ActiveMQRALogger.LOGGER.trace("createTemporaryQueue " + session); } TemporaryQueue temp = session.createTemporaryQueue(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdTemporaryQueue " + session + " temp=" + temp); + ActiveMQRALogger.LOGGER.trace("createdTemporaryQueue " + session + " temp=" + temp); } sf.addTemporaryQueue(temp); @@ -1075,17 +1075,17 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createConsumer " + session + " dest=" + destination); + ActiveMQRALogger.LOGGER.trace("createConsumer " + session + " dest=" + destination); } MessageConsumer result = session.createConsumer(destination); - result = new HornetQRAMessageConsumer(result, this); + result = new ActiveMQRAMessageConsumer(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); + ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); } addConsumer(result); @@ -1113,9 +1113,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createConsumer " + session + + ActiveMQRALogger.LOGGER.trace("createConsumer " + session + " dest=" + destination + " messageSelector=" + @@ -1123,11 +1123,11 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue } MessageConsumer result = session.createConsumer(destination, messageSelector); - result = new HornetQRAMessageConsumer(result, this); + result = new ActiveMQRAMessageConsumer(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); + ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); } addConsumer(result); @@ -1158,9 +1158,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createConsumer " + session + + ActiveMQRALogger.LOGGER.trace("createConsumer " + session + " dest=" + destination + " messageSelector=" + @@ -1170,11 +1170,11 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue } MessageConsumer result = session.createConsumer(destination, messageSelector, noLocal); - result = new HornetQRAMessageConsumer(result, this); + result = new ActiveMQRAMessageConsumer(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); + ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); } addConsumer(result); @@ -1201,17 +1201,17 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createProducer " + session + " dest=" + destination); + ActiveMQRALogger.LOGGER.trace("createProducer " + session + " dest=" + destination); } MessageProducer result = session.createProducer(destination); - result = new HornetQRAMessageProducer(result, this); + result = new ActiveMQRAMessageProducer(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdProducer " + session + " producer=" + result); + ActiveMQRALogger.LOGGER.trace("createdProducer " + session + " producer=" + result); } addProducer(result); @@ -1232,9 +1232,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public int getAcknowledgeMode() throws JMSException { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("getAcknowledgeMode()"); + ActiveMQRALogger.LOGGER.trace("getAcknowledgeMode()"); } getSessionInternal(); @@ -1249,13 +1249,13 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public XAResource getXAResource() { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("getXAResource()"); + ActiveMQRALogger.LOGGER.trace("getXAResource()"); } - if (cri.getType() == HornetQRAConnectionFactory.CONNECTION || cri.getType() == HornetQRAConnectionFactory.QUEUE_CONNECTION || - cri.getType() == HornetQRAConnectionFactory.TOPIC_CONNECTION) + if (cri.getType() == ActiveMQRAConnectionFactory.CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || + cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION) { return null; } @@ -1283,7 +1283,7 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public String getNodeId() throws JMSException { - HornetQSession session = (HornetQSession) getSessionInternal(); + ActiveMQSession session = (ActiveMQSession) getSessionInternal(); ClientSessionFactoryInternal factory = (ClientSessionFactoryInternal) session.getCoreSession().getSessionFactory(); return factory.getLiveNodeId(); } @@ -1296,13 +1296,13 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public Session getSession() throws JMSException { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("getNonXAsession()"); + ActiveMQRALogger.LOGGER.trace("getNonXAsession()"); } - if (cri.getType() == HornetQRAConnectionFactory.CONNECTION || cri.getType() == HornetQRAConnectionFactory.QUEUE_CONNECTION || - cri.getType() == HornetQRAConnectionFactory.TOPIC_CONNECTION) + if (cri.getType() == ActiveMQRAConnectionFactory.CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || + cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION) { throw new IllegalStateException("Non XA connection"); } @@ -1326,13 +1326,13 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public QueueSession getQueueSession() throws JMSException { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("getQueueSession()"); + ActiveMQRALogger.LOGGER.trace("getQueueSession()"); } - if (cri.getType() == HornetQRAConnectionFactory.CONNECTION || cri.getType() == HornetQRAConnectionFactory.QUEUE_CONNECTION || - cri.getType() == HornetQRAConnectionFactory.TOPIC_CONNECTION) + if (cri.getType() == ActiveMQRAConnectionFactory.CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || + cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION) { throw new IllegalStateException("Non XA connection"); } @@ -1356,13 +1356,13 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ public TopicSession getTopicSession() throws JMSException { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("getTopicSession()"); + ActiveMQRALogger.LOGGER.trace("getTopicSession()"); } - if (cri.getType() == HornetQRAConnectionFactory.CONNECTION || cri.getType() == HornetQRAConnectionFactory.QUEUE_CONNECTION || - cri.getType() == HornetQRAConnectionFactory.TOPIC_CONNECTION) + if (cri.getType() == ActiveMQRAConnectionFactory.CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || + cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION) { throw new IllegalStateException("Non XA connection"); } @@ -1386,17 +1386,17 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createSharedConsumer " + session + " topic=" + topic + ", sharedSubscriptionName=" + sharedSubscriptionName); + ActiveMQRALogger.LOGGER.trace("createSharedConsumer " + session + " topic=" + topic + ", sharedSubscriptionName=" + sharedSubscriptionName); } MessageConsumer result = session.createSharedConsumer(topic, sharedSubscriptionName); - result = new HornetQRAMessageConsumer(result, this); + result = new ActiveMQRAMessageConsumer(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); + ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); } addConsumer(result); @@ -1418,18 +1418,18 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createSharedConsumer " + session + " topic=" + topic + + ActiveMQRALogger.LOGGER.trace("createSharedConsumer " + session + " topic=" + topic + ", sharedSubscriptionName=" + sharedSubscriptionName + ", messageSelector=" + messageSelector); } MessageConsumer result = session.createSharedConsumer(topic, sharedSubscriptionName, messageSelector); - result = new HornetQRAMessageConsumer(result, this); + result = new ActiveMQRAMessageConsumer(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); + ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); } addConsumer(result); @@ -1450,17 +1450,17 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createSharedConsumer " + session + " topic=" + topic + ", name=" + name); + ActiveMQRALogger.LOGGER.trace("createSharedConsumer " + session + " topic=" + topic + ", name=" + name); } MessageConsumer result = session.createDurableConsumer(topic, name); - result = new HornetQRAMessageConsumer(result, this); + result = new ActiveMQRAMessageConsumer(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); + ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); } addConsumer(result); @@ -1481,18 +1481,18 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createDurableConsumer " + session + " topic=" + topic + ", name=" + name + + ActiveMQRALogger.LOGGER.trace("createDurableConsumer " + session + " topic=" + topic + ", name=" + name + ", messageSelector=" + messageSelector + ", noLocal=" + noLocal); } MessageConsumer result = session.createDurableConsumer(topic, name, messageSelector, noLocal); - result = new HornetQRAMessageConsumer(result, this); + result = new ActiveMQRAMessageConsumer(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); + ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); } addConsumer(result); @@ -1513,18 +1513,18 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createSharedDurableConsumer " + session + " topic=" + topic + ", name=" + + ActiveMQRALogger.LOGGER.trace("createSharedDurableConsumer " + session + " topic=" + topic + ", name=" + name); } MessageConsumer result = session.createSharedDurableConsumer(topic, name); - result = new HornetQRAMessageConsumer(result, this); + result = new ActiveMQRAMessageConsumer(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); + ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); } addConsumer(result); @@ -1545,18 +1545,18 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { Session session = getSessionInternal(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createSharedDurableConsumer " + session + " topic=" + topic + ", name=" + + ActiveMQRALogger.LOGGER.trace("createSharedDurableConsumer " + session + " topic=" + topic + ", name=" + name + ", messageSelector=" + messageSelector); } MessageConsumer result = session.createSharedDurableConsumer(topic, name, messageSelector); - result = new HornetQRAMessageConsumer(result, this); + result = new ActiveMQRAMessageConsumer(result, this); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); + ActiveMQRALogger.LOGGER.trace("createdConsumer " + session + " consumer=" + result); } addConsumer(result); @@ -1574,11 +1574,11 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue * * @param managedConnection The managed connection */ - void setManagedConnection(final HornetQRAManagedConnection managedConnection) + void setManagedConnection(final ActiveMQRAManagedConnection managedConnection) { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("setManagedConnection(" + managedConnection + ")"); + ActiveMQRALogger.LOGGER.trace("setManagedConnection(" + managedConnection + ")"); } if (mc != null) @@ -1602,9 +1602,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ void destroy() { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("destroy()"); + ActiveMQRALogger.LOGGER.trace("destroy()"); } mc = null; @@ -1617,9 +1617,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ void start() throws JMSException { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("start()"); + ActiveMQRALogger.LOGGER.trace("start()"); } if (mc != null) @@ -1635,9 +1635,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ void stop() throws JMSException { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("stop()"); + ActiveMQRALogger.LOGGER.trace("stop()"); } if (mc != null) @@ -1653,14 +1653,14 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ void checkStrict() throws JMSException { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("checkStrict()"); + ActiveMQRALogger.LOGGER.trace("checkStrict()"); } if (mc != null) { - throw new IllegalStateException(HornetQRASessionFactory.ISE); + throw new IllegalStateException(ActiveMQRASessionFactory.ISE); } } @@ -1673,7 +1673,7 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { if (mc != null) { - HornetQRALogger.LOGGER.trace("Closing session"); + ActiveMQRALogger.LOGGER.trace("Closing session"); try { @@ -1681,21 +1681,21 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue } catch (Throwable t) { - HornetQRALogger.LOGGER.trace("Error stopping managed connection", t); + ActiveMQRALogger.LOGGER.trace("Error stopping managed connection", t); } synchronized (consumers) { for (Iterator i = consumers.iterator(); i.hasNext(); ) { - HornetQRAMessageConsumer consumer = (HornetQRAMessageConsumer) i.next(); + ActiveMQRAMessageConsumer consumer = (ActiveMQRAMessageConsumer) i.next(); try { consumer.closeConsumer(); } catch (Throwable t) { - HornetQRALogger.LOGGER.trace("Error closing consumer", t); + ActiveMQRALogger.LOGGER.trace("Error closing consumer", t); } i.remove(); } @@ -1705,14 +1705,14 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { for (Iterator i = producers.iterator(); i.hasNext(); ) { - HornetQRAMessageProducer producer = (HornetQRAMessageProducer) i.next(); + ActiveMQRAMessageProducer producer = (ActiveMQRAMessageProducer) i.next(); try { producer.closeProducer(); } catch (Throwable t) { - HornetQRALogger.LOGGER.trace("Error closing producer", t); + ActiveMQRALogger.LOGGER.trace("Error closing producer", t); } i.remove(); } @@ -1733,9 +1733,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ void addConsumer(final MessageConsumer consumer) { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("addConsumer(" + consumer + ")"); + ActiveMQRALogger.LOGGER.trace("addConsumer(" + consumer + ")"); } synchronized (consumers) @@ -1751,9 +1751,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ void removeConsumer(final MessageConsumer consumer) { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("removeConsumer(" + consumer + ")"); + ActiveMQRALogger.LOGGER.trace("removeConsumer(" + consumer + ")"); } synchronized (consumers) @@ -1769,9 +1769,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ void addProducer(final MessageProducer producer) { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("addProducer(" + producer + ")"); + ActiveMQRALogger.LOGGER.trace("addProducer(" + producer + ")"); } synchronized (producers) @@ -1787,9 +1787,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue */ void removeProducer(final MessageProducer producer) { - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("removeProducer(" + producer + ")"); + ActiveMQRALogger.LOGGER.trace("removeProducer(" + producer + ")"); } synchronized (producers) @@ -1814,9 +1814,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue Session session = mc.getSession(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("getSessionInternal " + session + " for " + this); + ActiveMQRALogger.LOGGER.trace("getSessionInternal " + session + " for " + this); } return session; @@ -1840,9 +1840,9 @@ public final class HornetQRASession implements QueueSession, TopicSession, XAQue { XAResource xares = mc.getXAResource(); - if (HornetQRASession.trace) + if (ActiveMQRASession.trace) { - HornetQRALogger.LOGGER.trace("getXAResourceInternal " + xares + " for " + this); + ActiveMQRALogger.LOGGER.trace("getXAResourceInternal " + xares + " for " + this); } return xares; diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRASessionFactory.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRASessionFactory.java similarity index 91% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRASessionFactory.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRASessionFactory.java index bcb631b9ee..eba16f5971 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRASessionFactory.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRASessionFactory.java @@ -25,7 +25,7 @@ import javax.jms.XATopicConnection; * @author Jesper Pedersen * @version $Revision: 71554 $ */ -public interface HornetQRASessionFactory extends XATopicConnection, XAQueueConnection +public interface ActiveMQRASessionFactory extends XATopicConnection, XAQueueConnection { /** Error message for strict behaviour */ String ISE = "This method is not applicable inside the application server. See the J2EE spec, e.g. J2EE1.4 Section 6.6"; @@ -47,5 +47,5 @@ public interface HornetQRASessionFactory extends XATopicConnection, XAQueueConne * @param session The session * @throws JMSException for any error */ - void closeSession(HornetQRASession session) throws JMSException; + void closeSession(ActiveMQRASession session) throws JMSException; } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRASessionFactoryImpl.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRASessionFactoryImpl.java similarity index 72% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRASessionFactoryImpl.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRASessionFactoryImpl.java index 37e0016c3e..ef743ac258 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRASessionFactoryImpl.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRASessionFactoryImpl.java @@ -41,23 +41,23 @@ import java.util.HashSet; import java.util.Iterator; import java.util.Set; -import org.apache.activemq.api.jms.HornetQJMSConstants; -import org.apache.activemq.jms.client.HornetQConnectionForContext; -import org.apache.activemq.jms.client.HornetQConnectionForContextImpl; +import org.apache.activemq.api.jms.ActiveMQJMSConstants; +import org.apache.activemq.jms.client.ActiveMQConnectionForContext; +import org.apache.activemq.jms.client.ActiveMQConnectionForContextImpl; /** - * Implements the JMS Connection API and produces {@link HornetQRASession} objects. + * Implements the JMS Connection API and produces {@link ActiveMQRASession} objects. * * @author Adrian Brock * @author Jesper Pedersen */ -public final class HornetQRASessionFactoryImpl extends HornetQConnectionForContextImpl implements - HornetQRASessionFactory, HornetQConnectionForContext, Referenceable +public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForContextImpl implements + ActiveMQRASessionFactory, ActiveMQConnectionForContext, Referenceable { /** * Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * Are we closed? @@ -97,7 +97,7 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte /** * The managed connection factory */ - private final HornetQRAManagedConnectionFactory mcf; + private final ActiveMQRAManagedConnectionFactory mcf; private TransactionManager tm; /** @@ -108,7 +108,7 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte /** * The sessions */ - private final Set sessions = new HashSet(); + private final Set sessions = new HashSet(); /** * The temporary queues @@ -127,10 +127,10 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte * @param cm The connection manager * @param type The connection type */ - public HornetQRASessionFactoryImpl(final HornetQRAManagedConnectionFactory mcf, - final ConnectionManager cm, - final TransactionManager tm, - final int type) + public ActiveMQRASessionFactoryImpl(final ActiveMQRAManagedConnectionFactory mcf, + final ConnectionManager cm, + final TransactionManager tm, + final int type) { this.mcf = mcf; @@ -138,7 +138,7 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte if (cm == null) { - this.cm = new HornetQRAConnectionManager(); + this.cm = new ActiveMQRAConnectionManager(); } else { @@ -147,9 +147,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte this.type = type; - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + mcf + ", " + cm + ", " + type); + ActiveMQRALogger.LOGGER.trace("constructor(" + mcf + ", " + cm + ", " + type); } } @@ -161,38 +161,38 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte { case Session.AUTO_ACKNOWLEDGE: case Session.DUPS_OK_ACKNOWLEDGE: - case HornetQJMSConstants.INDIVIDUAL_ACKNOWLEDGE: - case HornetQJMSConstants.PRE_ACKNOWLEDGE: + case ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE: + case ActiveMQJMSConstants.PRE_ACKNOWLEDGE: sessionModeToUse = sessionMode; break; //these are prohibited in JEE unless not in a JTA tx where they should be ignored and auto_ack used case Session.CLIENT_ACKNOWLEDGE: if (!inJtaTx) { - throw HornetQRABundle.BUNDLE.invalidSessionTransactedModeRuntime(); + throw ActiveMQRABundle.BUNDLE.invalidSessionTransactedModeRuntime(); } sessionModeToUse = Session.AUTO_ACKNOWLEDGE; break; case Session.SESSION_TRANSACTED: if (!inJtaTx) { - throw HornetQRABundle.BUNDLE.invalidClientAcknowledgeModeRuntime(); + throw ActiveMQRABundle.BUNDLE.invalidClientAcknowledgeModeRuntime(); } sessionModeToUse = Session.AUTO_ACKNOWLEDGE; break; default: - throw HornetQRABundle.BUNDLE.invalidAcknowledgeMode(sessionMode); + throw ActiveMQRABundle.BUNDLE.invalidAcknowledgeMode(sessionMode); } incrementRefCounter(); - return new HornetQRAJMSContext(this, sessionModeToUse, threadAwareContext); + return new ActiveMQRAJMSContext(this, sessionModeToUse, threadAwareContext); } public XAJMSContext createXAContext() { incrementRefCounter(); - return new HornetQRAXAJMSContext(this, threadAwareContext); + return new ActiveMQRAXAJMSContext(this, threadAwareContext); } /** @@ -202,9 +202,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte */ public void setReference(final Reference reference) { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("setReference(" + reference + ")"); + ActiveMQRALogger.LOGGER.trace("setReference(" + reference + ")"); } this.reference = reference; @@ -217,9 +217,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte */ public Reference getReference() { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("getReference()"); + ActiveMQRALogger.LOGGER.trace("getReference()"); } return reference; @@ -232,9 +232,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte */ public void setUserName(final String name) { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("setUserName(" + name + ")"); + ActiveMQRALogger.LOGGER.trace("setUserName(" + name + ")"); } userName = name; @@ -247,9 +247,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte */ public void setPassword(final String password) { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("setPassword(****)"); + ActiveMQRALogger.LOGGER.trace("setPassword(****)"); } this.password = password; @@ -264,16 +264,16 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte @Override public String getClientID() throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("getClientID()"); + ActiveMQRALogger.LOGGER.trace("getClientID()"); } checkClosed(); if (clientID == null) { - return ((HornetQResourceAdapter) mcf.getResourceAdapter()).getProperties().getClientID(); + return ((ActiveMQResourceAdapter) mcf.getResourceAdapter()).getProperties().getClientID(); } return clientID; @@ -288,12 +288,12 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte @Override public void setClientID(final String cID) throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("setClientID(" + cID + ")"); + ActiveMQRALogger.LOGGER.trace("setClientID(" + cID + ")"); } - throw new IllegalStateException(HornetQRASessionFactory.ISE); + throw new IllegalStateException(ActiveMQRASessionFactory.ISE); } /** @@ -306,14 +306,14 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte */ public QueueSession createQueueSession(final boolean transacted, final int acknowledgeMode) throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createQueueSession(" + transacted + ", " + acknowledgeMode + ")"); + ActiveMQRALogger.LOGGER.trace("createQueueSession(" + transacted + ", " + acknowledgeMode + ")"); } checkClosed(); - if (type == HornetQRAConnectionFactory.TOPIC_CONNECTION || type == HornetQRAConnectionFactory.XA_TOPIC_CONNECTION) + if (type == ActiveMQRAConnectionFactory.TOPIC_CONNECTION || type == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { throw new IllegalStateException("Can not get a queue session from a topic connection"); } @@ -329,15 +329,15 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte */ public XAQueueSession createXAQueueSession() throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createXAQueueSession()"); + ActiveMQRALogger.LOGGER.trace("createXAQueueSession()"); } checkClosed(); - if (type == HornetQRAConnectionFactory.CONNECTION || type == HornetQRAConnectionFactory.TOPIC_CONNECTION || - type == HornetQRAConnectionFactory.XA_TOPIC_CONNECTION) + if (type == ActiveMQRAConnectionFactory.CONNECTION || type == ActiveMQRAConnectionFactory.TOPIC_CONNECTION || + type == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { throw new IllegalStateException("Can not get a topic session from a queue connection"); } @@ -360,9 +360,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte final ServerSessionPool sessionPool, final int maxMessages) throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createConnectionConsumer(" + queue + + ActiveMQRALogger.LOGGER.trace("createConnectionConsumer(" + queue + ", " + messageSelector + ", " + @@ -372,7 +372,7 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte ")"); } - throw new IllegalStateException(HornetQRASessionFactory.ISE); + throw new IllegalStateException(ActiveMQRASessionFactory.ISE); } /** @@ -385,14 +385,14 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte */ public TopicSession createTopicSession(final boolean transacted, final int acknowledgeMode) throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createTopicSession(" + transacted + ", " + acknowledgeMode + ")"); + ActiveMQRALogger.LOGGER.trace("createTopicSession(" + transacted + ", " + acknowledgeMode + ")"); } checkClosed(); - if (type == HornetQRAConnectionFactory.QUEUE_CONNECTION || type == HornetQRAConnectionFactory.XA_QUEUE_CONNECTION) + if (type == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || type == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION) { throw new IllegalStateException("Can not get a topic session from a queue connection"); } @@ -408,15 +408,15 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte */ public XATopicSession createXATopicSession() throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createXATopicSession()"); + ActiveMQRALogger.LOGGER.trace("createXATopicSession()"); } checkClosed(); - if (type == HornetQRAConnectionFactory.CONNECTION || type == HornetQRAConnectionFactory.QUEUE_CONNECTION || - type == HornetQRAConnectionFactory.XA_QUEUE_CONNECTION) + if (type == ActiveMQRAConnectionFactory.CONNECTION || type == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || + type == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION) { throw new IllegalStateException("Can not get a topic session from a queue connection"); } @@ -439,9 +439,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte final ServerSessionPool sessionPool, final int maxMessages) throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createConnectionConsumer(" + topic + + ActiveMQRALogger.LOGGER.trace("createConnectionConsumer(" + topic + ", " + messageSelector + ", " + @@ -451,7 +451,7 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte ")"); } - throw new IllegalStateException(HornetQRASessionFactory.ISE); + throw new IllegalStateException(ActiveMQRASessionFactory.ISE); } /** @@ -472,9 +472,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte final ServerSessionPool sessionPool, final int maxMessages) throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createConnectionConsumer(" + topic + + ActiveMQRALogger.LOGGER.trace("createConnectionConsumer(" + topic + ", " + subscriptionName + ", " + @@ -486,7 +486,7 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte ")"); } - throw new IllegalStateException(HornetQRASessionFactory.ISE); + throw new IllegalStateException(ActiveMQRASessionFactory.ISE); } /** @@ -502,9 +502,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte final ServerSessionPool pool, final int maxMessages) throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createConnectionConsumer(" + destination + + ActiveMQRALogger.LOGGER.trace("createConnectionConsumer(" + destination + ", " + pool + ", " + @@ -512,7 +512,7 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte ")"); } - throw new IllegalStateException(HornetQRASessionFactory.ISE); + throw new IllegalStateException(ActiveMQRASessionFactory.ISE); } /** @@ -531,9 +531,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte final ServerSessionPool pool, final int maxMessages) throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createConnectionConsumer(" + destination + + ActiveMQRALogger.LOGGER.trace("createConnectionConsumer(" + destination + ", " + name + ", " + @@ -543,7 +543,7 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte ")"); } - throw new IllegalStateException(HornetQRASessionFactory.ISE); + throw new IllegalStateException(ActiveMQRASessionFactory.ISE); } /** @@ -557,9 +557,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte @Override public Session createSession(final boolean transacted, final int acknowledgeMode) throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createSession(" + transacted + ", " + acknowledgeMode + ")"); + ActiveMQRALogger.LOGGER.trace("createSession(" + transacted + ", " + acknowledgeMode + ")"); } checkClosed(); @@ -574,9 +574,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte */ public XASession createXASession() throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createXASession()"); + ActiveMQRALogger.LOGGER.trace("createXASession()"); } checkClosed(); @@ -592,9 +592,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte @Override public ConnectionMetaData getMetaData() throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("getMetaData()"); + ActiveMQRALogger.LOGGER.trace("getMetaData()"); } checkClosed(); @@ -610,12 +610,12 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte @Override public ExceptionListener getExceptionListener() throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("getExceptionListener()"); + ActiveMQRALogger.LOGGER.trace("getExceptionListener()"); } - throw new IllegalStateException(HornetQRASessionFactory.ISE); + throw new IllegalStateException(ActiveMQRASessionFactory.ISE); } /** @@ -627,12 +627,12 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte @Override public void setExceptionListener(final ExceptionListener listener) throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("setExceptionListener(" + listener + ")"); + ActiveMQRALogger.LOGGER.trace("setExceptionListener(" + listener + ")"); } - throw new IllegalStateException(HornetQRASessionFactory.ISE); + throw new IllegalStateException(ActiveMQRASessionFactory.ISE); } /** @@ -645,9 +645,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte { checkClosed(); - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("start() " + this); + ActiveMQRALogger.LOGGER.trace("start() " + this); } synchronized (sessions) @@ -657,7 +657,7 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte return; } started = true; - for (HornetQRASession session : sessions) + for (ActiveMQRASession session : sessions) { session.start(); } @@ -673,12 +673,12 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte @Override public void stop() throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("stop() " + this); + ActiveMQRALogger.LOGGER.trace("stop() " + this); } - throw new IllegalStateException(HornetQRASessionFactory.ISE); + throw new IllegalStateException(ActiveMQRASessionFactory.ISE); } /** @@ -689,9 +689,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte @Override public void close() throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("close() " + this); + ActiveMQRALogger.LOGGER.trace("close() " + this); } if (closed) @@ -703,16 +703,16 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte synchronized (sessions) { - for (Iterator i = sessions.iterator(); i.hasNext(); ) + for (Iterator i = sessions.iterator(); i.hasNext(); ) { - HornetQRASession session = i.next(); + ActiveMQRASession session = i.next(); try { session.closeSession(); } catch (Throwable t) { - HornetQRALogger.LOGGER.trace("Error closing session", t); + ActiveMQRALogger.LOGGER.trace("Error closing session", t); } i.remove(); } @@ -725,15 +725,15 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte TemporaryQueue temp = i.next(); try { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Closing temporary queue " + temp + " for " + this); + ActiveMQRALogger.LOGGER.trace("Closing temporary queue " + temp + " for " + this); } temp.delete(); } catch (Throwable t) { - HornetQRALogger.LOGGER.trace("Error deleting temporary queue", t); + ActiveMQRALogger.LOGGER.trace("Error deleting temporary queue", t); } i.remove(); } @@ -746,15 +746,15 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte TemporaryTopic temp = i.next(); try { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Closing temporary topic " + temp + " for " + this); + ActiveMQRALogger.LOGGER.trace("Closing temporary topic " + temp + " for " + this); } temp.delete(); } catch (Throwable t) { - HornetQRALogger.LOGGER.trace("Error deleting temporary queue", t); + ActiveMQRALogger.LOGGER.trace("Error deleting temporary queue", t); } i.remove(); } @@ -767,11 +767,11 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte * @param session The session * @throws JMSException Thrown if an error occurs */ - public void closeSession(final HornetQRASession session) throws JMSException + public void closeSession(final ActiveMQRASession session) throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("closeSession(" + session + ")"); + ActiveMQRALogger.LOGGER.trace("closeSession(" + session + ")"); } synchronized (sessions) @@ -787,9 +787,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte */ public void addTemporaryQueue(final TemporaryQueue temp) { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("addTemporaryQueue(" + temp + ")"); + ActiveMQRALogger.LOGGER.trace("addTemporaryQueue(" + temp + ")"); } synchronized (tempQueues) @@ -805,9 +805,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte */ public void addTemporaryTopic(final TemporaryTopic temp) { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("addTemporaryTopic(" + temp + ")"); + ActiveMQRALogger.LOGGER.trace("addTemporaryTopic(" + temp + ")"); } synchronized (tempTopics) @@ -831,25 +831,25 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte @Override public ConnectionConsumer createSharedConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createSharedConnectionConsumer(" + topic + ", " + subscriptionName + ", " + + ActiveMQRALogger.LOGGER.trace("createSharedConnectionConsumer(" + topic + ", " + subscriptionName + ", " + messageSelector + ", " + sessionPool + ", " + maxMessages + ")"); } - throw new IllegalStateException(HornetQRASessionFactory.ISE); + throw new IllegalStateException(ActiveMQRASessionFactory.ISE); } @Override public ConnectionConsumer createSharedDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("createSharedDurableConnectionConsumer(" + topic + ", " + subscriptionName + + ActiveMQRALogger.LOGGER.trace("createSharedDurableConnectionConsumer(" + topic + ", " + subscriptionName + ", " + messageSelector + ", " + sessionPool + ", " + maxMessages + ")"); } - throw new IllegalStateException(HornetQRASessionFactory.ISE); + throw new IllegalStateException(ActiveMQRASessionFactory.ISE); } /** @@ -859,7 +859,7 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte * @return The session * @throws JMSException Thrown if an error occurs */ - protected HornetQRASession allocateConnection(final int sessionType) throws JMSException + protected ActiveMQRASession allocateConnection(final int sessionType) throws JMSException { return allocateConnection(false, Session.AUTO_ACKNOWLEDGE, sessionType); } @@ -873,11 +873,11 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte * @return The session * @throws JMSException Thrown if an error occurs */ - protected HornetQRASession allocateConnection(boolean transacted, int acknowledgeMode, final int sessionType) throws JMSException + protected ActiveMQRASession allocateConnection(boolean transacted, int acknowledgeMode, final int sessionType) throws JMSException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("allocateConnection(" + transacted + + ActiveMQRALogger.LOGGER.trace("allocateConnection(" + transacted + ", " + acknowledgeMode + ", " + @@ -918,43 +918,43 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte case Session.AUTO_ACKNOWLEDGE: case Session.DUPS_OK_ACKNOWLEDGE: //plus our own - case HornetQJMSConstants.INDIVIDUAL_ACKNOWLEDGE: - case HornetQJMSConstants.PRE_ACKNOWLEDGE: + case ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE: + case ActiveMQJMSConstants.PRE_ACKNOWLEDGE: break; //The value {@code Session.CLIENT_ACKNOWLEDGE} may not be used. case Session.CLIENT_ACKNOWLEDGE: - throw HornetQRABundle.BUNDLE.invalidClientAcknowledgeModeRuntime(); + throw ActiveMQRABundle.BUNDLE.invalidClientAcknowledgeModeRuntime(); //same with this although the spec doesn't explicitly say case Session.SESSION_TRANSACTED: - throw HornetQRABundle.BUNDLE.invalidSessionTransactedModeRuntime(); + throw ActiveMQRABundle.BUNDLE.invalidSessionTransactedModeRuntime(); default: - throw HornetQRABundle.BUNDLE.invalidAcknowledgeMode(acknowledgeMode); + throw ActiveMQRABundle.BUNDLE.invalidAcknowledgeMode(acknowledgeMode); } } - HornetQRAConnectionRequestInfo info = new HornetQRAConnectionRequestInfo(transacted, + ActiveMQRAConnectionRequestInfo info = new ActiveMQRAConnectionRequestInfo(transacted, acknowledgeMode, sessionType); info.setUserName(userName); info.setPassword(password); info.setClientID(clientID); - info.setDefaults(((HornetQResourceAdapter) mcf.getResourceAdapter()).getProperties()); + info.setDefaults(((ActiveMQResourceAdapter) mcf.getResourceAdapter()).getProperties()); - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Allocating session for " + this + " with request info=" + info); + ActiveMQRALogger.LOGGER.trace("Allocating session for " + this + " with request info=" + info); } - HornetQRASession session = (HornetQRASession) cm.allocateConnection(mcf, info); + ActiveMQRASession session = (ActiveMQRASession) cm.allocateConnection(mcf, info); try { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("Allocated " + this + " session=" + session); + ActiveMQRALogger.LOGGER.trace("Allocated " + this + " session=" + session); } - session.setHornetQSessionFactory(this); + session.setActiveMQSessionFactory(this); if (started) { @@ -1014,9 +1014,9 @@ public final class HornetQRASessionFactoryImpl extends HornetQConnectionForConte */ protected void checkClosed() throws IllegalStateException { - if (HornetQRASessionFactoryImpl.trace) + if (ActiveMQRASessionFactoryImpl.trace) { - HornetQRALogger.LOGGER.trace("checkClosed()" + this); + ActiveMQRALogger.LOGGER.trace("checkClosed()" + this); } if (closed) diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAStreamMessage.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAStreamMessage.java similarity index 71% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAStreamMessage.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAStreamMessage.java index 96ac8d97b3..4fcb0c48a2 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAStreamMessage.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAStreamMessage.java @@ -24,23 +24,23 @@ import javax.jms.StreamMessage; * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMessage +public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements StreamMessage { /** Whether trace is enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * Create a new wrapper * @param message the message * @param session the session */ - public HornetQRAStreamMessage(final StreamMessage message, final HornetQRASession session) + public ActiveMQRAStreamMessage(final StreamMessage message, final ActiveMQRASession session) { super(message, session); - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")"); } } @@ -51,9 +51,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public boolean readBoolean() throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("readBoolean()"); + ActiveMQRALogger.LOGGER.trace("readBoolean()"); } return ((StreamMessage)message).readBoolean(); @@ -66,9 +66,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public byte readByte() throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("readByte()"); + ActiveMQRALogger.LOGGER.trace("readByte()"); } return ((StreamMessage)message).readByte(); @@ -82,9 +82,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public int readBytes(final byte[] value) throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("readBytes(" + Arrays.toString(value) + ")"); + ActiveMQRALogger.LOGGER.trace("readBytes(" + Arrays.toString(value) + ")"); } return ((StreamMessage)message).readBytes(value); @@ -97,9 +97,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public char readChar() throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("readChar()"); + ActiveMQRALogger.LOGGER.trace("readChar()"); } return ((StreamMessage)message).readChar(); @@ -112,9 +112,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public double readDouble() throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("readDouble()"); + ActiveMQRALogger.LOGGER.trace("readDouble()"); } return ((StreamMessage)message).readDouble(); @@ -127,9 +127,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public float readFloat() throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("readFloat()"); + ActiveMQRALogger.LOGGER.trace("readFloat()"); } return ((StreamMessage)message).readFloat(); @@ -142,9 +142,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public int readInt() throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("readInt()"); + ActiveMQRALogger.LOGGER.trace("readInt()"); } return ((StreamMessage)message).readInt(); @@ -157,9 +157,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public long readLong() throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("readLong()"); + ActiveMQRALogger.LOGGER.trace("readLong()"); } return ((StreamMessage)message).readLong(); @@ -172,9 +172,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public Object readObject() throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("readObject()"); + ActiveMQRALogger.LOGGER.trace("readObject()"); } return ((StreamMessage)message).readObject(); @@ -187,9 +187,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public short readShort() throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("readShort()"); + ActiveMQRALogger.LOGGER.trace("readShort()"); } return ((StreamMessage)message).readShort(); @@ -202,9 +202,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public String readString() throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("readString()"); + ActiveMQRALogger.LOGGER.trace("readString()"); } return ((StreamMessage)message).readString(); @@ -216,9 +216,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public void reset() throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("reset()"); + ActiveMQRALogger.LOGGER.trace("reset()"); } ((StreamMessage)message).reset(); @@ -231,9 +231,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public void writeBoolean(final boolean value) throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("writeBoolean(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeBoolean(" + value + ")"); } ((StreamMessage)message).writeBoolean(value); @@ -246,9 +246,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public void writeByte(final byte value) throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("writeByte(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeByte(" + value + ")"); } ((StreamMessage)message).writeByte(value); @@ -263,9 +263,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("writeBytes(" + value + ", " + offset + ", " + length + ")"); + ActiveMQRALogger.LOGGER.trace("writeBytes(" + value + ", " + offset + ", " + length + ")"); } ((StreamMessage)message).writeBytes(value, offset, length); @@ -278,9 +278,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public void writeBytes(final byte[] value) throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("writeBytes(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeBytes(" + value + ")"); } ((StreamMessage)message).writeBytes(value); @@ -293,9 +293,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public void writeChar(final char value) throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("writeChar(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeChar(" + value + ")"); } ((StreamMessage)message).writeChar(value); @@ -308,9 +308,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public void writeDouble(final double value) throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("writeDouble(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeDouble(" + value + ")"); } ((StreamMessage)message).writeDouble(value); @@ -323,9 +323,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public void writeFloat(final float value) throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("writeFloat(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeFloat(" + value + ")"); } ((StreamMessage)message).writeFloat(value); @@ -338,9 +338,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public void writeInt(final int value) throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("writeInt(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeInt(" + value + ")"); } ((StreamMessage)message).writeInt(value); @@ -353,9 +353,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public void writeLong(final long value) throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("writeLong(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeLong(" + value + ")"); } ((StreamMessage)message).writeLong(value); @@ -368,9 +368,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public void writeObject(final Object value) throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("writeObject(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeObject(" + value + ")"); } ((StreamMessage)message).writeObject(value); @@ -383,9 +383,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public void writeShort(final short value) throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("writeShort(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeShort(" + value + ")"); } ((StreamMessage)message).writeShort(value); @@ -398,9 +398,9 @@ public class HornetQRAStreamMessage extends HornetQRAMessage implements StreamMe */ public void writeString(final String value) throws JMSException { - if (HornetQRAStreamMessage.trace) + if (ActiveMQRAStreamMessage.trace) { - HornetQRALogger.LOGGER.trace("writeString(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("writeString(" + value + ")"); } ((StreamMessage)message).writeString(value); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRATextMessage.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRATextMessage.java similarity index 73% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRATextMessage.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRATextMessage.java index 2d83d6e86f..f326992855 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRATextMessage.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRATextMessage.java @@ -22,23 +22,23 @@ import javax.jms.TextMessage; * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRATextMessage extends HornetQRAMessage implements TextMessage +public class ActiveMQRATextMessage extends ActiveMQRAMessage implements TextMessage { /** Whether trace is enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * Create a new wrapper * @param message the message * @param session the session */ - public HornetQRATextMessage(final TextMessage message, final HornetQRASession session) + public ActiveMQRATextMessage(final TextMessage message, final ActiveMQRASession session) { super(message, session); - if (HornetQRATextMessage.trace) + if (ActiveMQRATextMessage.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + message + ", " + session + ")"); } } @@ -49,9 +49,9 @@ public class HornetQRATextMessage extends HornetQRAMessage implements TextMessag */ public String getText() throws JMSException { - if (HornetQRATextMessage.trace) + if (ActiveMQRATextMessage.trace) { - HornetQRALogger.LOGGER.trace("getText()"); + ActiveMQRALogger.LOGGER.trace("getText()"); } return ((TextMessage)message).getText(); @@ -64,9 +64,9 @@ public class HornetQRATextMessage extends HornetQRAMessage implements TextMessag */ public void setText(final String string) throws JMSException { - if (HornetQRATextMessage.trace) + if (ActiveMQRATextMessage.trace) { - HornetQRALogger.LOGGER.trace("setText(" + string + ")"); + ActiveMQRALogger.LOGGER.trace("setText(" + string + ")"); } ((TextMessage)message).setText(string); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRATopicPublisher.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRATopicPublisher.java similarity index 76% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRATopicPublisher.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRATopicPublisher.java index e732841058..99062c81e2 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRATopicPublisher.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRATopicPublisher.java @@ -19,28 +19,28 @@ import javax.jms.TopicPublisher; /** - * HornetQQueueSender. + * ActiveMQQueueSender. * * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRATopicPublisher extends HornetQRAMessageProducer implements TopicPublisher +public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implements TopicPublisher { /** Whether trace is enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * Create a new wrapper * @param producer the producer * @param session the session */ - public HornetQRATopicPublisher(final TopicPublisher producer, final HornetQRASession session) + public ActiveMQRATopicPublisher(final TopicPublisher producer, final ActiveMQRASession session) { super(producer, session); - if (HornetQRATopicPublisher.trace) + if (ActiveMQRATopicPublisher.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + producer + ", " + session + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + producer + ", " + session + ")"); } } @@ -51,9 +51,9 @@ public class HornetQRATopicPublisher extends HornetQRAMessageProducer implements */ public Topic getTopic() throws JMSException { - if (HornetQRATopicPublisher.trace) + if (ActiveMQRATopicPublisher.trace) { - HornetQRALogger.LOGGER.trace("getTopic()"); + ActiveMQRALogger.LOGGER.trace("getTopic()"); } return ((TopicPublisher)producer).getTopic(); @@ -72,9 +72,9 @@ public class HornetQRATopicPublisher extends HornetQRAMessageProducer implements session.lock(); try { - if (HornetQRATopicPublisher.trace) + if (ActiveMQRATopicPublisher.trace) { - HornetQRALogger.LOGGER.trace("send " + this + + ActiveMQRALogger.LOGGER.trace("send " + this + " message=" + message + " deliveryMode=" + @@ -89,9 +89,9 @@ public class HornetQRATopicPublisher extends HornetQRAMessageProducer implements ((TopicPublisher)producer).publish(message, deliveryMode, priority, timeToLive); - if (HornetQRATopicPublisher.trace) + if (ActiveMQRATopicPublisher.trace) { - HornetQRALogger.LOGGER.trace("sent " + this + " result=" + message); + ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message); } } finally @@ -110,18 +110,18 @@ public class HornetQRATopicPublisher extends HornetQRAMessageProducer implements session.lock(); try { - if (HornetQRATopicPublisher.trace) + if (ActiveMQRATopicPublisher.trace) { - HornetQRALogger.LOGGER.trace("send " + this + " message=" + message); + ActiveMQRALogger.LOGGER.trace("send " + this + " message=" + message); } checkState(); ((TopicPublisher)producer).publish(message); - if (HornetQRATopicPublisher.trace) + if (ActiveMQRATopicPublisher.trace) { - HornetQRALogger.LOGGER.trace("sent " + this + " result=" + message); + ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message); } } finally @@ -148,9 +148,9 @@ public class HornetQRATopicPublisher extends HornetQRAMessageProducer implements session.lock(); try { - if (HornetQRATopicPublisher.trace) + if (ActiveMQRATopicPublisher.trace) { - HornetQRALogger.LOGGER.trace("send " + this + + ActiveMQRALogger.LOGGER.trace("send " + this + " destination=" + destination + " message=" + @@ -167,9 +167,9 @@ public class HornetQRATopicPublisher extends HornetQRAMessageProducer implements ((TopicPublisher)producer).publish(destination, message, deliveryMode, priority, timeToLive); - if (HornetQRATopicPublisher.trace) + if (ActiveMQRATopicPublisher.trace) { - HornetQRALogger.LOGGER.trace("sent " + this + " result=" + message); + ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message); } } finally @@ -189,18 +189,18 @@ public class HornetQRATopicPublisher extends HornetQRAMessageProducer implements session.lock(); try { - if (HornetQRATopicPublisher.trace) + if (ActiveMQRATopicPublisher.trace) { - HornetQRALogger.LOGGER.trace("send " + this + " destination=" + destination + " message=" + message); + ActiveMQRALogger.LOGGER.trace("send " + this + " destination=" + destination + " message=" + message); } checkState(); ((TopicPublisher)producer).publish(destination, message); - if (HornetQRATopicPublisher.trace) + if (ActiveMQRATopicPublisher.trace) { - HornetQRALogger.LOGGER.trace("sent " + this + " result=" + message); + ActiveMQRALogger.LOGGER.trace("sent " + this + " result=" + message); } } finally diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRATopicSubscriber.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRATopicSubscriber.java similarity index 73% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRATopicSubscriber.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRATopicSubscriber.java index 5383df7fac..25087a15df 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRATopicSubscriber.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRATopicSubscriber.java @@ -23,23 +23,23 @@ import javax.jms.TopicSubscriber; * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRATopicSubscriber extends HornetQRAMessageConsumer implements TopicSubscriber +public class ActiveMQRATopicSubscriber extends ActiveMQRAMessageConsumer implements TopicSubscriber { /** Whether trace is enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * Create a new wrapper * @param consumer the topic subscriber * @param session the session */ - public HornetQRATopicSubscriber(final TopicSubscriber consumer, final HornetQRASession session) + public ActiveMQRATopicSubscriber(final TopicSubscriber consumer, final ActiveMQRASession session) { super(consumer, session); - if (HornetQRATopicSubscriber.trace) + if (ActiveMQRATopicSubscriber.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + consumer + ", " + session + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + consumer + ", " + session + ")"); } } @@ -50,9 +50,9 @@ public class HornetQRATopicSubscriber extends HornetQRAMessageConsumer implement */ public boolean getNoLocal() throws JMSException { - if (HornetQRATopicSubscriber.trace) + if (ActiveMQRATopicSubscriber.trace) { - HornetQRALogger.LOGGER.trace("getNoLocal()"); + ActiveMQRALogger.LOGGER.trace("getNoLocal()"); } checkState(); @@ -66,9 +66,9 @@ public class HornetQRATopicSubscriber extends HornetQRAMessageConsumer implement */ public Topic getTopic() throws JMSException { - if (HornetQRATopicSubscriber.trace) + if (ActiveMQRATopicSubscriber.trace) { - HornetQRALogger.LOGGER.trace("getTopic()"); + ActiveMQRALogger.LOGGER.trace("getTopic()"); } checkState(); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAXAJMSContext.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAXAJMSContext.java similarity index 74% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAXAJMSContext.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAXAJMSContext.java index bbdd116b12..75e4fda584 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAXAJMSContext.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAXAJMSContext.java @@ -12,14 +12,14 @@ */ package org.apache.activemq.ra; -import org.apache.activemq.jms.client.HornetQConnectionForContext; +import org.apache.activemq.jms.client.ActiveMQConnectionForContext; import org.apache.activemq.jms.client.ThreadAwareContext; import javax.jms.XAJMSContext; -public class HornetQRAXAJMSContext extends HornetQRAJMSContext implements XAJMSContext +public class ActiveMQRAXAJMSContext extends ActiveMQRAJMSContext implements XAJMSContext { - public HornetQRAXAJMSContext(HornetQConnectionForContext connection, ThreadAwareContext threadAwareContext) + public ActiveMQRAXAJMSContext(ActiveMQConnectionForContext connection, ThreadAwareContext threadAwareContext) { super(connection, threadAwareContext); } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAXAResource.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAXAResource.java similarity index 76% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAXAResource.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAXAResource.java index 773d065431..cd61b20cbd 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAXAResource.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRAXAResource.java @@ -18,35 +18,35 @@ import javax.transaction.xa.Xid; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.client.impl.ClientSessionInternal; -import org.apache.activemq.core.client.impl.HornetQXAResource; +import org.apache.activemq.core.client.impl.ActiveMQXAResource; /** - * HornetQXAResource. + * ActiveMQXAResource. * * @author Adrian Brock * @author Jesper Pedersen */ -public class HornetQRAXAResource implements HornetQXAResource +public class ActiveMQRAXAResource implements ActiveMQXAResource { /** Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** The managed connection */ - private final HornetQRAManagedConnection managedConnection; + private final ActiveMQRAManagedConnection managedConnection; /** The resource */ private final XAResource xaResource; /** - * Create a new HornetQXAResource. + * Create a new ActiveMQXAResource. * @param managedConnection the managed connection * @param xaResource the xa resource */ - public HornetQRAXAResource(final HornetQRAManagedConnection managedConnection, final XAResource xaResource) + public ActiveMQRAXAResource(final ActiveMQRAManagedConnection managedConnection, final XAResource xaResource) { - if (HornetQRAXAResource.trace) + if (ActiveMQRAXAResource.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + managedConnection + ", " + xaResource + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + managedConnection + ", " + xaResource + ")"); } this.managedConnection = managedConnection; @@ -61,9 +61,9 @@ public class HornetQRAXAResource implements HornetQXAResource */ public void start(final Xid xid, final int flags) throws XAException { - if (HornetQRAXAResource.trace) + if (ActiveMQRAXAResource.trace) { - HornetQRALogger.LOGGER.trace("start(" + xid + ", " + flags + ")"); + ActiveMQRALogger.LOGGER.trace("start(" + xid + ", " + flags + ")"); } managedConnection.lock(); @@ -76,7 +76,7 @@ public class HornetQRAXAResource implements HornetQXAResource } catch (ActiveMQException e) { - HornetQRALogger.LOGGER.problemResettingXASession(); + ActiveMQRALogger.LOGGER.problemResettingXASession(); } try { @@ -97,9 +97,9 @@ public class HornetQRAXAResource implements HornetQXAResource */ public void end(final Xid xid, final int flags) throws XAException { - if (HornetQRAXAResource.trace) + if (ActiveMQRAXAResource.trace) { - HornetQRALogger.LOGGER.trace("end(" + xid + ", " + flags + ")"); + ActiveMQRALogger.LOGGER.trace("end(" + xid + ", " + flags + ")"); } managedConnection.lock(); @@ -122,9 +122,9 @@ public class HornetQRAXAResource implements HornetQXAResource */ public int prepare(final Xid xid) throws XAException { - if (HornetQRAXAResource.trace) + if (ActiveMQRAXAResource.trace) { - HornetQRALogger.LOGGER.trace("prepare(" + xid + ")"); + ActiveMQRALogger.LOGGER.trace("prepare(" + xid + ")"); } return xaResource.prepare(xid); @@ -138,9 +138,9 @@ public class HornetQRAXAResource implements HornetQXAResource */ public void commit(final Xid xid, final boolean onePhase) throws XAException { - if (HornetQRAXAResource.trace) + if (ActiveMQRAXAResource.trace) { - HornetQRALogger.LOGGER.trace("commit(" + xid + ", " + onePhase + ")"); + ActiveMQRALogger.LOGGER.trace("commit(" + xid + ", " + onePhase + ")"); } xaResource.commit(xid, onePhase); @@ -153,9 +153,9 @@ public class HornetQRAXAResource implements HornetQXAResource */ public void rollback(final Xid xid) throws XAException { - if (HornetQRAXAResource.trace) + if (ActiveMQRAXAResource.trace) { - HornetQRALogger.LOGGER.trace("rollback(" + xid + ")"); + ActiveMQRALogger.LOGGER.trace("rollback(" + xid + ")"); } xaResource.rollback(xid); @@ -168,9 +168,9 @@ public class HornetQRAXAResource implements HornetQXAResource */ public void forget(final Xid xid) throws XAException { - if (HornetQRAXAResource.trace) + if (ActiveMQRAXAResource.trace) { - HornetQRALogger.LOGGER.trace("forget(" + xid + ")"); + ActiveMQRALogger.LOGGER.trace("forget(" + xid + ")"); } managedConnection.lock(); @@ -194,9 +194,9 @@ public class HornetQRAXAResource implements HornetQXAResource */ public boolean isSameRM(final XAResource xaRes) throws XAException { - if (HornetQRAXAResource.trace) + if (ActiveMQRAXAResource.trace) { - HornetQRALogger.LOGGER.trace("isSameRM(" + xaRes + ")"); + ActiveMQRALogger.LOGGER.trace("isSameRM(" + xaRes + ")"); } return xaResource.isSameRM(xaRes); @@ -210,9 +210,9 @@ public class HornetQRAXAResource implements HornetQXAResource */ public Xid[] recover(final int flag) throws XAException { - if (HornetQRAXAResource.trace) + if (ActiveMQRAXAResource.trace) { - HornetQRALogger.LOGGER.trace("recover(" + flag + ")"); + ActiveMQRALogger.LOGGER.trace("recover(" + flag + ")"); } return xaResource.recover(flag); @@ -225,9 +225,9 @@ public class HornetQRAXAResource implements HornetQXAResource */ public int getTransactionTimeout() throws XAException { - if (HornetQRAXAResource.trace) + if (ActiveMQRAXAResource.trace) { - HornetQRALogger.LOGGER.trace("getTransactionTimeout()"); + ActiveMQRALogger.LOGGER.trace("getTransactionTimeout()"); } return xaResource.getTransactionTimeout(); @@ -241,9 +241,9 @@ public class HornetQRAXAResource implements HornetQXAResource */ public boolean setTransactionTimeout(final int seconds) throws XAException { - if (HornetQRAXAResource.trace) + if (ActiveMQRAXAResource.trace) { - HornetQRALogger.LOGGER.trace("setTransactionTimeout(" + seconds + ")"); + ActiveMQRALogger.LOGGER.trace("setTransactionTimeout(" + seconds + ")"); } return xaResource.setTransactionTimeout(seconds); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRaUtils.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRaUtils.java similarity index 97% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRaUtils.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRaUtils.java index e29906ac57..377e9801a6 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRaUtils.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQRaUtils.java @@ -31,12 +31,12 @@ import org.jgroups.JChannel; * @author Adrian Brock * @author Jesper Pedersen */ -public final class HornetQRaUtils +public final class ActiveMQRaUtils { /** * Private constructor */ - private HornetQRaUtils() + private ActiveMQRaUtils() { } @@ -276,7 +276,7 @@ public final class HornetQRaUtils } catch (Throwable e) { - HornetQRALogger.LOGGER.debug(e.getMessage(), e); + ActiveMQRALogger.LOGGER.debug(e.getMessage(), e); return null; } } @@ -304,7 +304,7 @@ public final class HornetQRaUtils } catch (Throwable e) { - HornetQRALogger.LOGGER.debug(e.getMessage(), e); + ActiveMQRALogger.LOGGER.debug(e.getMessage(), e); return null; } } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQResourceAdapter.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java similarity index 73% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQResourceAdapter.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java index 508c53347d..ec67e9d411 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQResourceAdapter.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java @@ -42,37 +42,37 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.core.client.ActiveMQClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.ra.inflow.HornetQActivation; -import org.apache.activemq.ra.inflow.HornetQActivationSpec; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.ra.inflow.ActiveMQActivation; +import org.apache.activemq.ra.inflow.ActiveMQActivationSpec; import org.apache.activemq.ra.recovery.RecoveryManager; import org.apache.activemq.utils.SensitiveDataCodec; import org.jgroups.JChannel; /** - * The resource adapter for HornetQ + * The resource adapter for ActiveMQ * * @author Adrian Brock * @author Jesper Pedersen * @author Andy Taylor * @author Martyn Taylor */ -public class HornetQResourceAdapter implements ResourceAdapter, Serializable +public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable { private static final long serialVersionUID = 4756893709825838770L; /** * The Name of the product that this resource adapter represents. */ - public static final String PRODUCT_NAME = "HornetQ"; + public static final String PRODUCT_NAME = "ActiveMQ"; /** * Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * The bootstrap context @@ -82,7 +82,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable /** * The resource adapter properties */ - private final HornetQRAProperties raProperties; + private final ActiveMQRAProperties raProperties; /** * The resource adapter properties before parsing @@ -103,11 +103,11 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable /** * The activations by activation spec */ - private final Map activations; + private final Map activations; - private HornetQConnectionFactory defaultHornetQConnectionFactory; + private ActiveMQConnectionFactory defaultActiveMQConnectionFactory; - private HornetQConnectionFactory recoveryHornetQConnectionFactory; + private ActiveMQConnectionFactory recoveryActiveMQConnectionFactory; private TransactionManager tm; @@ -117,23 +117,23 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable private boolean useAutoRecovery = true; - private final List managedConnectionFactories = new ArrayList(); + private final List managedConnectionFactories = new ArrayList(); private String entries; /** * Constructor */ - public HornetQResourceAdapter() + public ActiveMQResourceAdapter() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("constructor()"); + ActiveMQRALogger.LOGGER.trace("constructor()"); } - raProperties = new HornetQRAProperties(); + raProperties = new ActiveMQRAProperties(); configured = new AtomicBoolean(false); - activations = new ConcurrentHashMap(); + activations = new ConcurrentHashMap(); recoveryManager = new RecoveryManager(); } @@ -153,7 +153,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable { if (spec == null) { - throw HornetQRABundle.BUNDLE.noActivationSpec(); + throw ActiveMQRABundle.BUNDLE.noActivationSpec(); } if (!configured.getAndSet(true)) { @@ -166,12 +166,12 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable throw new ResourceException("Unable to create activation", e); } } - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("endpointActivation(" + endpointFactory + ", " + spec + ")"); + ActiveMQRALogger.LOGGER.trace("endpointActivation(" + endpointFactory + ", " + spec + ")"); } - HornetQActivation activation = new HornetQActivation(this, endpointFactory, (HornetQActivationSpec) spec); + ActiveMQActivation activation = new ActiveMQActivation(this, endpointFactory, (ActiveMQActivationSpec) spec); activations.put(spec, activation); activation.start(); } @@ -184,12 +184,12 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void endpointDeactivation(final MessageEndpointFactory endpointFactory, final ActivationSpec spec) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("endpointDeactivation(" + endpointFactory + ", " + spec + ")"); + ActiveMQRALogger.LOGGER.trace("endpointDeactivation(" + endpointFactory + ", " + spec + ")"); } - HornetQActivation activation = activations.remove(spec); + ActiveMQActivation activation = activations.remove(spec); if (activation != null) { activation.stop(); @@ -205,9 +205,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public XAResource[] getXAResources(final ActivationSpec[] specs) throws ResourceException { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getXAResources(" + Arrays.toString(specs) + ")"); + ActiveMQRALogger.LOGGER.trace("getXAResources(" + Arrays.toString(specs) + ")"); } if (useAutoRecovery) @@ -220,7 +220,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable List xaresources = new ArrayList(); for (ActivationSpec spec : specs) { - HornetQActivation activation = activations.get(spec); + ActiveMQActivation activation = activations.get(spec); if (activation != null) { xaresources.addAll(activation.getXAResources()); @@ -238,9 +238,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void start(final BootstrapContext ctx) throws ResourceAdapterInternalException { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("start(" + ctx + ")"); + ActiveMQRALogger.LOGGER.trace("start(" + ctx + ")"); } locateTM(); @@ -261,7 +261,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable } } - HornetQRALogger.LOGGER.info("HornetQ resource adaptor started"); + ActiveMQRALogger.LOGGER.info("ActiveMQ resource adaptor started"); } /** @@ -269,12 +269,12 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void stop() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("stop()"); + ActiveMQRALogger.LOGGER.trace("stop()"); } - for (Map.Entry entry : activations.entrySet()) + for (Map.Entry entry : activations.entrySet()) { try { @@ -282,32 +282,32 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable } catch (Exception ignored) { - HornetQRALogger.LOGGER.debug("Ignored", ignored); + ActiveMQRALogger.LOGGER.debug("Ignored", ignored); } } activations.clear(); - for (HornetQRAManagedConnectionFactory managedConnectionFactory : managedConnectionFactories) + for (ActiveMQRAManagedConnectionFactory managedConnectionFactory : managedConnectionFactories) { managedConnectionFactory.stop(); } managedConnectionFactories.clear(); - if (defaultHornetQConnectionFactory != null) + if (defaultActiveMQConnectionFactory != null) { - defaultHornetQConnectionFactory.close(); + defaultActiveMQConnectionFactory.close(); } - if (recoveryHornetQConnectionFactory != null) + if (recoveryActiveMQConnectionFactory != null) { - recoveryHornetQConnectionFactory.close(); + recoveryActiveMQConnectionFactory.close(); } recoveryManager.stop(); - HornetQRALogger.LOGGER.raStopped(); + ActiveMQRALogger.LOGGER.raStopped(); } public void setUseAutoRecovery(Boolean useAutoRecovery) @@ -342,13 +342,13 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable public void setConnectorClassName(final String connectorClassName) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setTransportType(" + connectorClassName + ")"); + ActiveMQRALogger.LOGGER.trace("setTransportType(" + connectorClassName + ")"); } unparsedConnectors = connectorClassName; - raProperties.setParsedConnectorClassNames(HornetQRaUtils.parseConnectorConnectorConfig(connectorClassName)); + raProperties.setParsedConnectorClassNames(ActiveMQRaUtils.parseConnectorConnectorConfig(connectorClassName)); } public String getConnectorClassName() @@ -366,7 +366,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable if (config != null) { this.unparsedProperties = config; - raProperties.setParsedConnectionParameters(HornetQRaUtils.parseConfig(config)); + raProperties.setParsedConnectionParameters(ActiveMQRaUtils.parseConfig(config)); } } @@ -411,9 +411,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public String getDiscoveryAddress() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getDiscoveryGroupAddress()"); + ActiveMQRALogger.LOGGER.trace("getDiscoveryGroupAddress()"); } return raProperties.getDiscoveryAddress(); @@ -446,9 +446,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setDiscoveryAddress(final String dgn) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setDiscoveryGroupAddress(" + dgn + ")"); + ActiveMQRALogger.LOGGER.trace("setDiscoveryGroupAddress(" + dgn + ")"); } raProperties.setDiscoveryAddress(dgn); @@ -461,9 +461,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Integer getDiscoveryPort() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getDiscoveryGroupPort()"); + ActiveMQRALogger.LOGGER.trace("getDiscoveryGroupPort()"); } return raProperties.getDiscoveryPort(); @@ -476,9 +476,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setDiscoveryLocalBindAddress(final String discoveryLocalBindAddress) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setDiscoveryLocalBindAddress(" + discoveryLocalBindAddress + ")"); + ActiveMQRALogger.LOGGER.trace("setDiscoveryLocalBindAddress(" + discoveryLocalBindAddress + ")"); } raProperties.setDiscoveryLocalBindAddress(discoveryLocalBindAddress); @@ -491,9 +491,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public String getDiscoveryLocalBindAddress() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getDiscoveryLocalBindAddress()"); + ActiveMQRALogger.LOGGER.trace("getDiscoveryLocalBindAddress()"); } return raProperties.getDiscoveryLocalBindAddress(); @@ -506,9 +506,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setDiscoveryPort(final Integer dgp) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setDiscoveryGroupPort(" + dgp + ")"); + ActiveMQRALogger.LOGGER.trace("setDiscoveryGroupPort(" + dgp + ")"); } raProperties.setDiscoveryPort(dgp); @@ -521,9 +521,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Long getDiscoveryRefreshTimeout() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getDiscoveryRefreshTimeout()"); + ActiveMQRALogger.LOGGER.trace("getDiscoveryRefreshTimeout()"); } return raProperties.getDiscoveryRefreshTimeout(); @@ -536,9 +536,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setDiscoveryRefreshTimeout(final Long discoveryRefreshTimeout) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setDiscoveryRefreshTimeout(" + discoveryRefreshTimeout + ")"); + ActiveMQRALogger.LOGGER.trace("setDiscoveryRefreshTimeout(" + discoveryRefreshTimeout + ")"); } raProperties.setDiscoveryRefreshTimeout(discoveryRefreshTimeout); @@ -551,9 +551,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Long getDiscoveryInitialWaitTimeout() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getDiscoveryInitialWaitTimeout()"); + ActiveMQRALogger.LOGGER.trace("getDiscoveryInitialWaitTimeout()"); } return raProperties.getDiscoveryInitialWaitTimeout(); @@ -566,9 +566,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setDiscoveryInitialWaitTimeout(final Long discoveryInitialWaitTimeout) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setDiscoveryInitialWaitTimeout(" + discoveryInitialWaitTimeout + ")"); + ActiveMQRALogger.LOGGER.trace("setDiscoveryInitialWaitTimeout(" + discoveryInitialWaitTimeout + ")"); } raProperties.setDiscoveryInitialWaitTimeout(discoveryInitialWaitTimeout); @@ -581,9 +581,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Long getClientFailureCheckPeriod() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getClientFailureCheckPeriod()"); + ActiveMQRALogger.LOGGER.trace("getClientFailureCheckPeriod()"); } return raProperties.getClientFailureCheckPeriod(); @@ -596,9 +596,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setClientFailureCheckPeriod(final Long clientFailureCheckPeriod) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setClientFailureCheckPeriod(" + clientFailureCheckPeriod + ")"); + ActiveMQRALogger.LOGGER.trace("setClientFailureCheckPeriod(" + clientFailureCheckPeriod + ")"); } raProperties.setClientFailureCheckPeriod(clientFailureCheckPeriod); @@ -611,9 +611,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Long getConnectionTTL() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getConnectionTTL()"); + ActiveMQRALogger.LOGGER.trace("getConnectionTTL()"); } return raProperties.getConnectionTTL(); @@ -626,9 +626,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setConnectionTTL(final Long connectionTTL) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setConnectionTTL(" + connectionTTL + ")"); + ActiveMQRALogger.LOGGER.trace("setConnectionTTL(" + connectionTTL + ")"); } raProperties.setConnectionTTL(connectionTTL); @@ -641,9 +641,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Boolean isCacheLargeMessagesClient() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("isCacheLargeMessagesClient()"); + ActiveMQRALogger.LOGGER.trace("isCacheLargeMessagesClient()"); } return raProperties.isCacheLargeMessagesClient(); @@ -656,9 +656,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setCacheLargeMessagesClient(final Boolean cacheLargeMessagesClient) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setCacheLargeMessagesClient(" + cacheLargeMessagesClient + ")"); + ActiveMQRALogger.LOGGER.trace("setCacheLargeMessagesClient(" + cacheLargeMessagesClient + ")"); } raProperties.setCacheLargeMessagesClient(cacheLargeMessagesClient); @@ -671,9 +671,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Boolean isCompressLargeMessage() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("isCompressLargeMessage()"); + ActiveMQRALogger.LOGGER.trace("isCompressLargeMessage()"); } return raProperties.isCompressLargeMessage(); @@ -686,9 +686,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setFailoverOnInitialConnection(final Boolean failoverOnInitialConnection) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setFailoverOnInitialConnection(" + failoverOnInitialConnection + ")"); + ActiveMQRALogger.LOGGER.trace("setFailoverOnInitialConnection(" + failoverOnInitialConnection + ")"); } raProperties.setFailoverOnInitialConnection(failoverOnInitialConnection); @@ -701,9 +701,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Boolean isFailoverOnInitialConnection() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("isFailoverOnInitialConnection()"); + ActiveMQRALogger.LOGGER.trace("isFailoverOnInitialConnection()"); } return raProperties.isFailoverOnInitialConnection(); @@ -716,9 +716,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setCompressLargeMessage(final Boolean compressLargeMessage) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setCompressLargeMessage(" + compressLargeMessage + ")"); + ActiveMQRALogger.LOGGER.trace("setCompressLargeMessage(" + compressLargeMessage + ")"); } raProperties.setCompressLargeMessage(compressLargeMessage); @@ -731,9 +731,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Long getCallTimeout() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getCallTimeout()"); + ActiveMQRALogger.LOGGER.trace("getCallTimeout()"); } return raProperties.getCallTimeout(); @@ -746,9 +746,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setCallTimeout(final Long callTimeout) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setCallTimeout(" + callTimeout + ")"); + ActiveMQRALogger.LOGGER.trace("setCallTimeout(" + callTimeout + ")"); } raProperties.setCallTimeout(callTimeout); @@ -761,9 +761,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Long getCallFailoverTimeout() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getCallFailoverTimeout()"); + ActiveMQRALogger.LOGGER.trace("getCallFailoverTimeout()"); } return raProperties.getCallFailoverTimeout(); @@ -776,9 +776,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setCallFailoverTimeout(final Long callFailoverTimeout) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setCallFailoverTimeout(" + callFailoverTimeout + ")"); + ActiveMQRALogger.LOGGER.trace("setCallFailoverTimeout(" + callFailoverTimeout + ")"); } raProperties.setCallFailoverTimeout(callFailoverTimeout); @@ -791,9 +791,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Integer getDupsOKBatchSize() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getDupsOKBatchSize()"); + ActiveMQRALogger.LOGGER.trace("getDupsOKBatchSize()"); } return raProperties.getDupsOKBatchSize(); @@ -806,9 +806,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setDupsOKBatchSize(final Integer dupsOKBatchSize) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setDupsOKBatchSize(" + dupsOKBatchSize + ")"); + ActiveMQRALogger.LOGGER.trace("setDupsOKBatchSize(" + dupsOKBatchSize + ")"); } raProperties.setDupsOKBatchSize(dupsOKBatchSize); @@ -821,9 +821,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Integer getTransactionBatchSize() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getTransactionBatchSize()"); + ActiveMQRALogger.LOGGER.trace("getTransactionBatchSize()"); } return raProperties.getTransactionBatchSize(); @@ -836,9 +836,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setTransactionBatchSize(final Integer transactionBatchSize) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setTransactionBatchSize(" + transactionBatchSize + ")"); + ActiveMQRALogger.LOGGER.trace("setTransactionBatchSize(" + transactionBatchSize + ")"); } raProperties.setTransactionBatchSize(transactionBatchSize); @@ -851,9 +851,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Integer getConsumerWindowSize() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getConsumerWindowSize()"); + ActiveMQRALogger.LOGGER.trace("getConsumerWindowSize()"); } return raProperties.getConsumerWindowSize(); @@ -866,9 +866,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setConsumerWindowSize(final Integer consumerWindowSize) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setConsumerWindowSize(" + consumerWindowSize + ")"); + ActiveMQRALogger.LOGGER.trace("setConsumerWindowSize(" + consumerWindowSize + ")"); } raProperties.setConsumerWindowSize(consumerWindowSize); @@ -881,9 +881,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Integer getConsumerMaxRate() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getConsumerMaxRate()"); + ActiveMQRALogger.LOGGER.trace("getConsumerMaxRate()"); } return raProperties.getConsumerMaxRate(); @@ -896,9 +896,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setConsumerMaxRate(final Integer consumerMaxRate) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setConsumerMaxRate(" + consumerMaxRate + ")"); + ActiveMQRALogger.LOGGER.trace("setConsumerMaxRate(" + consumerMaxRate + ")"); } raProperties.setConsumerMaxRate(consumerMaxRate); @@ -911,9 +911,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Integer getConfirmationWindowSize() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getConfirmationWindowSize()"); + ActiveMQRALogger.LOGGER.trace("getConfirmationWindowSize()"); } return raProperties.getConfirmationWindowSize(); @@ -926,9 +926,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setConfirmationWindowSize(final Integer confirmationWindowSize) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setConfirmationWindowSize(" + confirmationWindowSize + ")"); + ActiveMQRALogger.LOGGER.trace("setConfirmationWindowSize(" + confirmationWindowSize + ")"); } raProperties.setConfirmationWindowSize(confirmationWindowSize); @@ -941,9 +941,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Integer getProducerMaxRate() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getProducerMaxRate()"); + ActiveMQRALogger.LOGGER.trace("getProducerMaxRate()"); } return raProperties.getProducerMaxRate(); @@ -956,9 +956,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setProducerMaxRate(final Integer producerMaxRate) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setProducerMaxRate(" + producerMaxRate + ")"); + ActiveMQRALogger.LOGGER.trace("setProducerMaxRate(" + producerMaxRate + ")"); } raProperties.setProducerMaxRate(producerMaxRate); @@ -971,9 +971,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Integer getProducerWindowSize() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getProducerWindowSize()"); + ActiveMQRALogger.LOGGER.trace("getProducerWindowSize()"); } return raProperties.getProducerWindowSize(); @@ -986,9 +986,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setProducerWindowSize(final Integer producerWindowSize) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setProducerWindowSize(" + producerWindowSize + ")"); + ActiveMQRALogger.LOGGER.trace("setProducerWindowSize(" + producerWindowSize + ")"); } raProperties.setProducerWindowSize(producerWindowSize); @@ -1001,9 +1001,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Integer getMinLargeMessageSize() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getMinLargeMessageSize()"); + ActiveMQRALogger.LOGGER.trace("getMinLargeMessageSize()"); } return raProperties.getMinLargeMessageSize(); @@ -1016,9 +1016,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setMinLargeMessageSize(final Integer minLargeMessageSize) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setMinLargeMessageSize(" + minLargeMessageSize + ")"); + ActiveMQRALogger.LOGGER.trace("setMinLargeMessageSize(" + minLargeMessageSize + ")"); } raProperties.setMinLargeMessageSize(minLargeMessageSize); @@ -1031,9 +1031,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Boolean getBlockOnAcknowledge() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getBlockOnAcknowledge()"); + ActiveMQRALogger.LOGGER.trace("getBlockOnAcknowledge()"); } return raProperties.isBlockOnAcknowledge(); @@ -1046,9 +1046,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setBlockOnAcknowledge(final Boolean blockOnAcknowledge) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setBlockOnAcknowledge(" + blockOnAcknowledge + ")"); + ActiveMQRALogger.LOGGER.trace("setBlockOnAcknowledge(" + blockOnAcknowledge + ")"); } raProperties.setBlockOnAcknowledge(blockOnAcknowledge); @@ -1061,9 +1061,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Boolean getBlockOnNonDurableSend() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getBlockOnNonDurableSend()"); + ActiveMQRALogger.LOGGER.trace("getBlockOnNonDurableSend()"); } return raProperties.isBlockOnNonDurableSend(); @@ -1076,9 +1076,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setBlockOnNonDurableSend(final Boolean blockOnNonDurableSend) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setBlockOnNonDurableSend(" + blockOnNonDurableSend + ")"); + ActiveMQRALogger.LOGGER.trace("setBlockOnNonDurableSend(" + blockOnNonDurableSend + ")"); } raProperties.setBlockOnNonDurableSend(blockOnNonDurableSend); @@ -1091,9 +1091,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Boolean getBlockOnDurableSend() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getBlockOnDurableSend()"); + ActiveMQRALogger.LOGGER.trace("getBlockOnDurableSend()"); } return raProperties.isBlockOnDurableSend(); @@ -1106,9 +1106,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setBlockOnDurableSend(final Boolean blockOnDurableSend) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setBlockOnDurableSend(" + blockOnDurableSend + ")"); + ActiveMQRALogger.LOGGER.trace("setBlockOnDurableSend(" + blockOnDurableSend + ")"); } raProperties.setBlockOnDurableSend(blockOnDurableSend); @@ -1121,9 +1121,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Boolean getAutoGroup() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getAutoGroup()"); + ActiveMQRALogger.LOGGER.trace("getAutoGroup()"); } return raProperties.isAutoGroup(); @@ -1136,9 +1136,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setAutoGroup(final Boolean autoGroup) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setAutoGroup(" + autoGroup + ")"); + ActiveMQRALogger.LOGGER.trace("setAutoGroup(" + autoGroup + ")"); } raProperties.setAutoGroup(autoGroup); @@ -1151,9 +1151,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Boolean getPreAcknowledge() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getPreAcknowledge()"); + ActiveMQRALogger.LOGGER.trace("getPreAcknowledge()"); } return raProperties.isPreAcknowledge(); @@ -1166,9 +1166,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setPreAcknowledge(final Boolean preAcknowledge) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setPreAcknowledge(" + preAcknowledge + ")"); + ActiveMQRALogger.LOGGER.trace("setPreAcknowledge(" + preAcknowledge + ")"); } raProperties.setPreAcknowledge(preAcknowledge); @@ -1181,9 +1181,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Integer getInitialConnectAttempts() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getInitialConnectAttempts()"); + ActiveMQRALogger.LOGGER.trace("getInitialConnectAttempts()"); } return raProperties.getInitialConnectAttempts(); @@ -1196,9 +1196,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setInitialConnectAttempts(final Integer initialConnectAttempts) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setInitialConnectionAttempts(" + initialConnectAttempts + ")"); + ActiveMQRALogger.LOGGER.trace("setInitialConnectionAttempts(" + initialConnectAttempts + ")"); } raProperties.setInitialConnectAttempts(initialConnectAttempts); @@ -1211,9 +1211,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Integer getInitialMessagePacketSize() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getInitialMessagePacketSize()"); + ActiveMQRALogger.LOGGER.trace("getInitialMessagePacketSize()"); } return raProperties.getInitialMessagePacketSize(); @@ -1226,9 +1226,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setInitialMessagePacketSize(final Integer initialMessagePacketSize) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setInitialMessagePacketSize(" + initialMessagePacketSize + ")"); + ActiveMQRALogger.LOGGER.trace("setInitialMessagePacketSize(" + initialMessagePacketSize + ")"); } raProperties.setInitialMessagePacketSize(initialMessagePacketSize); @@ -1241,9 +1241,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Long getRetryInterval() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getRetryInterval()"); + ActiveMQRALogger.LOGGER.trace("getRetryInterval()"); } return raProperties.getRetryInterval(); @@ -1256,9 +1256,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setRetryInterval(final Long retryInterval) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setRetryInterval(" + retryInterval + ")"); + ActiveMQRALogger.LOGGER.trace("setRetryInterval(" + retryInterval + ")"); } raProperties.setRetryInterval(retryInterval); @@ -1271,9 +1271,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Double getRetryIntervalMultiplier() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getRetryIntervalMultiplier()"); + ActiveMQRALogger.LOGGER.trace("getRetryIntervalMultiplier()"); } return raProperties.getRetryIntervalMultiplier(); @@ -1286,9 +1286,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setRetryIntervalMultiplier(final Double retryIntervalMultiplier) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setRetryIntervalMultiplier(" + retryIntervalMultiplier + ")"); + ActiveMQRALogger.LOGGER.trace("setRetryIntervalMultiplier(" + retryIntervalMultiplier + ")"); } raProperties.setRetryIntervalMultiplier(retryIntervalMultiplier); @@ -1301,9 +1301,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Long getMaxRetryInterval() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getMaxRetryInterval()"); + ActiveMQRALogger.LOGGER.trace("getMaxRetryInterval()"); } return raProperties.getMaxRetryInterval(); @@ -1316,9 +1316,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setMaxRetryInterval(final Long maxRetryInterval) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setMaxRetryInterval(" + maxRetryInterval + ")"); + ActiveMQRALogger.LOGGER.trace("setMaxRetryInterval(" + maxRetryInterval + ")"); } raProperties.setMaxRetryInterval(maxRetryInterval); @@ -1331,9 +1331,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Integer getReconnectAttempts() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getReconnectAttempts()"); + ActiveMQRALogger.LOGGER.trace("getReconnectAttempts()"); } return raProperties.getReconnectAttempts(); @@ -1346,9 +1346,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setReconnectAttempts(final Integer reconnectAttempts) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setReconnectAttempts(" + reconnectAttempts + ")"); + ActiveMQRALogger.LOGGER.trace("setReconnectAttempts(" + reconnectAttempts + ")"); } raProperties.setReconnectAttempts(reconnectAttempts); @@ -1361,9 +1361,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable public void setConnectionLoadBalancingPolicyClassName(final String connectionLoadBalancingPolicyClassName) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setFailoverOnServerShutdown(" + connectionLoadBalancingPolicyClassName + ")"); + ActiveMQRALogger.LOGGER.trace("setFailoverOnServerShutdown(" + connectionLoadBalancingPolicyClassName + ")"); } raProperties.setConnectionLoadBalancingPolicyClassName(connectionLoadBalancingPolicyClassName); } @@ -1375,9 +1375,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable public void setScheduledThreadPoolMaxSize(final Integer scheduledThreadPoolMaxSize) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setFailoverOnServerShutdown(" + scheduledThreadPoolMaxSize + ")"); + ActiveMQRALogger.LOGGER.trace("setFailoverOnServerShutdown(" + scheduledThreadPoolMaxSize + ")"); } raProperties.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize); } @@ -1389,9 +1389,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable public void setThreadPoolMaxSize(final Integer threadPoolMaxSize) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setFailoverOnServerShutdown(" + threadPoolMaxSize + ")"); + ActiveMQRALogger.LOGGER.trace("setFailoverOnServerShutdown(" + threadPoolMaxSize + ")"); } raProperties.setThreadPoolMaxSize(threadPoolMaxSize); } @@ -1403,9 +1403,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable public void setUseGlobalPools(final Boolean useGlobalPools) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setFailoverOnServerShutdown(" + useGlobalPools + ")"); + ActiveMQRALogger.LOGGER.trace("setFailoverOnServerShutdown(" + useGlobalPools + ")"); } raProperties.setUseGlobalPools(useGlobalPools); } @@ -1417,9 +1417,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public String getUserName() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getUserName()"); + ActiveMQRALogger.LOGGER.trace("getUserName()"); } return raProperties.getUserName(); @@ -1432,9 +1432,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setUserName(final String userName) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setUserName(" + userName + ")"); + ActiveMQRALogger.LOGGER.trace("setUserName(" + userName + ")"); } raProperties.setUserName(userName); @@ -1447,9 +1447,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public String getPassword() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getPassword()"); + ActiveMQRALogger.LOGGER.trace("getPassword()"); } return raProperties.getPassword(); @@ -1462,9 +1462,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setPassword(final String password) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setPassword(****)"); + ActiveMQRALogger.LOGGER.trace("setPassword(****)"); } raProperties.setPassword(password); @@ -1497,7 +1497,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable public void setJndiParams(String jndiParams) { unparsedJndiParams = jndiParams; - raProperties.setParsedJndiParams(HornetQRaUtils.parseHashtableConfig(jndiParams)); + raProperties.setParsedJndiParams(ActiveMQRaUtils.parseHashtableConfig(jndiParams)); } public Hashtable getParsedJndiParams() @@ -1512,9 +1512,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public String getClientID() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getClientID()"); + ActiveMQRALogger.LOGGER.trace("getClientID()"); } return raProperties.getClientID(); @@ -1527,9 +1527,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setClientID(final String clientID) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setClientID(" + clientID + ")"); + ActiveMQRALogger.LOGGER.trace("setClientID(" + clientID + ")"); } raProperties.setClientID(clientID); @@ -1542,9 +1542,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public String getGroupID() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getGroupID()"); + ActiveMQRALogger.LOGGER.trace("getGroupID()"); } return raProperties.getGroupID(); @@ -1557,9 +1557,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setGroupID(final String groupID) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setGroupID(" + groupID + ")"); + ActiveMQRALogger.LOGGER.trace("setGroupID(" + groupID + ")"); } raProperties.setGroupID(groupID); @@ -1572,9 +1572,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public Boolean getUseLocalTx() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getUseLocalTx()"); + ActiveMQRALogger.LOGGER.trace("getUseLocalTx()"); } return raProperties.getUseLocalTx(); @@ -1587,9 +1587,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public void setUseLocalTx(final Boolean localTx) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setUseXA(" + localTx + ")"); + ActiveMQRALogger.LOGGER.trace("setUseXA(" + localTx + ")"); } raProperties.setUseLocalTx(localTx); @@ -1597,36 +1597,36 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable public int getSetupAttempts() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getSetupAttempts()"); + ActiveMQRALogger.LOGGER.trace("getSetupAttempts()"); } return raProperties.getSetupAttempts(); } public void setSetupAttempts(Integer setupAttempts) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setSetupAttempts(" + setupAttempts + ")"); + ActiveMQRALogger.LOGGER.trace("setSetupAttempts(" + setupAttempts + ")"); } raProperties.setSetupAttempts(setupAttempts); } public long getSetupInterval() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getSetupInterval()"); + ActiveMQRALogger.LOGGER.trace("getSetupInterval()"); } return raProperties.getSetupInterval(); } public void setSetupInterval(Long interval) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("setSetupInterval(" + interval + ")"); + ActiveMQRALogger.LOGGER.trace("setSetupInterval(" + interval + ")"); } raProperties.setSetupInterval(interval); } @@ -1640,9 +1640,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable @Override public boolean equals(final Object obj) { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("equals(" + obj + ")"); + ActiveMQRALogger.LOGGER.trace("equals(" + obj + ")"); } if (obj == null) @@ -1650,9 +1650,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable return false; } - if (obj instanceof HornetQResourceAdapter) + if (obj instanceof ActiveMQResourceAdapter) { - return raProperties.equals(((HornetQResourceAdapter) obj).getProperties()); + return raProperties.equals(((ActiveMQResourceAdapter) obj).getProperties()); } return false; } @@ -1665,9 +1665,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable @Override public int hashCode() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("hashCode()"); + ActiveMQRALogger.LOGGER.trace("hashCode()"); } return raProperties.hashCode(); @@ -1680,9 +1680,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable */ public WorkManager getWorkManager() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getWorkManager()"); + ActiveMQRALogger.LOGGER.trace("getWorkManager()"); } if (ctx == null) @@ -1738,7 +1738,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable break; case Session.DUPS_OK_ACKNOWLEDGE: int actDupsOkBatchSize = dupsOkBatchSize != null ? dupsOkBatchSize - : HornetQClient.DEFAULT_ACK_BATCH_SIZE; + : ActiveMQClient.DEFAULT_ACK_BATCH_SIZE; result = parameterFactory.createSession(user, pass, false, true, true, false, actDupsOkBatchSize); break; default: @@ -1747,7 +1747,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable } } - HornetQRALogger.LOGGER.debug("Using queue connection " + result); + ActiveMQRALogger.LOGGER.debug("Using queue connection " + result); return result; @@ -1764,11 +1764,11 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable * * @return The properties */ - protected HornetQRAProperties getProperties() + protected ActiveMQRAProperties getProperties() { - if (HornetQResourceAdapter.trace) + if (ActiveMQResourceAdapter.trace) { - HornetQRALogger.LOGGER.trace("getProperties()"); + ActiveMQRALogger.LOGGER.trace("getProperties()"); } return raProperties; @@ -1780,17 +1780,17 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable protected void setup() throws ActiveMQException { raProperties.init(); - defaultHornetQConnectionFactory = createHornetQConnectionFactory(raProperties); - recoveryHornetQConnectionFactory = createRecoveryHornetQConnectionFactory(raProperties); - recoveryManager.register(recoveryHornetQConnectionFactory, raProperties.getUserName(), raProperties.getPassword()); + defaultActiveMQConnectionFactory = createActiveMQConnectionFactory(raProperties); + recoveryActiveMQConnectionFactory = createRecoveryActiveMQConnectionFactory(raProperties); + recoveryManager.register(recoveryActiveMQConnectionFactory, raProperties.getUserName(), raProperties.getPassword()); } - public Map getActivations() + public Map getActivations() { return activations; } - public HornetQConnectionFactory getDefaultHornetQConnectionFactory() throws ResourceException + public ActiveMQConnectionFactory getDefaultActiveMQConnectionFactory() throws ResourceException { if (!configured.getAndSet(true)) { @@ -1803,12 +1803,12 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable throw new ResourceException("Unable to create activation", e); } } - return defaultHornetQConnectionFactory; + return defaultActiveMQConnectionFactory; } /** * @param transactionManagerLocatorClass - * @see org.apache.activemq.ra.HornetQRAProperties#setTransactionManagerLocatorClass(java.lang.String) + * @see ActiveMQRAProperties#setTransactionManagerLocatorClass(java.lang.String) */ public void setTransactionManagerLocatorClass(String transactionManagerLocatorClass) { @@ -1817,7 +1817,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable /** * @return - * @see org.apache.activemq.ra.HornetQRAProperties#getTransactionManagerLocatorClass() + * @see ActiveMQRAProperties#getTransactionManagerLocatorClass() */ public String getTransactionManagerLocatorClass() { @@ -1826,7 +1826,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable /** * @return - * @see org.apache.activemq.ra.HornetQRAProperties#getJgroupsChannelLocatorClass() + * @see ActiveMQRAProperties#getJgroupsChannelLocatorClass() */ public String getJgroupsChannelLocatorClass() { @@ -1835,7 +1835,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable /** * @return - * @see org.apache.activemq.ra.HornetQRAProperties#setJgroupsChannelLocatorClass() + * @see ActiveMQRAProperties#setJgroupsChannelLocatorClass() */ public void setJgroupsChannelLocatorClass(String jgroupsChannelLocatorClass) { @@ -1844,7 +1844,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable /** * @return - * @see org.apache.activemq.ra.HornetQRAProperties#getJgroupsChannelRefName() + * @see ActiveMQRAProperties#getJgroupsChannelRefName() */ public String getJgroupsChannelRefName() { @@ -1853,7 +1853,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable /** * @return - * @see org.apache.activemq.ra.HornetQRAProperties#setJgroupsChannelRefName() + * @see ActiveMQRAProperties#setJgroupsChannelRefName() */ public void setJgroupsChannelRefName(String jgroupsChannelRefName) { @@ -1862,7 +1862,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable /** * @return - * @see org.apache.activemq.ra.HornetQRAProperties#getTransactionManagerLocatorMethod() + * @see ActiveMQRAProperties#getTransactionManagerLocatorMethod() */ public String getTransactionManagerLocatorMethod() { @@ -1871,16 +1871,16 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable /** * @param transactionManagerLocatorMethod - * @see org.apache.activemq.ra.HornetQRAProperties#setTransactionManagerLocatorMethod(java.lang.String) + * @see ActiveMQRAProperties#setTransactionManagerLocatorMethod(java.lang.String) */ public void setTransactionManagerLocatorMethod(String transactionManagerLocatorMethod) { raProperties.setTransactionManagerLocatorMethod(transactionManagerLocatorMethod); } - public HornetQConnectionFactory createHornetQConnectionFactory(final ConnectionFactoryProperties overrideProperties) + public ActiveMQConnectionFactory createActiveMQConnectionFactory(final ConnectionFactoryProperties overrideProperties) { - HornetQConnectionFactory cf; + ActiveMQConnectionFactory cf; List connectorClassName = overrideProperties.getParsedConnectorClassNames() != null ? overrideProperties.getParsedConnectorClassNames() : raProperties.getParsedConnectorClassNames(); @@ -1899,7 +1899,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable if (ha == null) { - ha = HornetQClient.DEFAULT_IS_HA; + ha = ActiveMQClient.DEFAULT_IS_HA; } if (discoveryAddress != null || jgroupsFileName != null || jgroupsLocatorClassName != null) @@ -1909,7 +1909,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable if (jgroupsLocatorClassName != null) { String jchannelRefName = raProperties.getJgroupsChannelRefName(); - JChannel jchannel = HornetQRaUtils.locateJGroupsChannel(jgroupsLocatorClassName, jchannelRefName); + JChannel jchannel = ActiveMQRaUtils.locateJGroupsChannel(jgroupsLocatorClassName, jchannelRefName); endpointFactoryConfiguration = new JGroupsBroadcastGroupConfiguration(jchannel, jgroupsChannel); } else if (discoveryAddress != null) @@ -1918,7 +1918,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable : getDiscoveryPort(); if (discoveryPort == null) { - discoveryPort = HornetQClient.DEFAULT_DISCOVERY_PORT; + discoveryPort = ActiveMQClient.DEFAULT_DISCOVERY_PORT; } String localBindAddress = overrideProperties.getDiscoveryLocalBindAddress() != null ? overrideProperties.getDiscoveryLocalBindAddress() @@ -1937,7 +1937,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable : raProperties.getDiscoveryRefreshTimeout(); if (refreshTimeout == null) { - refreshTimeout = HornetQClient.DEFAULT_DISCOVERY_REFRESH_TIMEOUT; + refreshTimeout = ActiveMQClient.DEFAULT_DISCOVERY_REFRESH_TIMEOUT; } Long initialTimeout = overrideProperties.getDiscoveryInitialWaitTimeout() != null ? overrideProperties.getDiscoveryInitialWaitTimeout() @@ -1945,7 +1945,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable if (initialTimeout == null) { - initialTimeout = HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT; + initialTimeout = ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT; } DiscoveryGroupConfiguration groupConfiguration = new DiscoveryGroupConfiguration() @@ -1953,18 +1953,18 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable .setDiscoveryInitialWaitTimeout(initialTimeout) .setBroadcastEndpointFactoryConfiguration(endpointFactoryConfiguration); - if (HornetQRALogger.LOGGER.isDebugEnabled()) + if (ActiveMQRALogger.LOGGER.isDebugEnabled()) { - HornetQRALogger.LOGGER.debug("Creating Connection Factory on the resource adapter for discovery=" + groupConfiguration + " with ha=" + ha); + ActiveMQRALogger.LOGGER.debug("Creating Connection Factory on the resource adapter for discovery=" + groupConfiguration + " with ha=" + ha); } if (ha) { - cf = HornetQJMSClient.createConnectionFactoryWithHA(groupConfiguration, JMSFactoryType.XA_CF); + cf = ActiveMQJMSClient.createConnectionFactoryWithHA(groupConfiguration, JMSFactoryType.XA_CF); } else { - cf = HornetQJMSClient.createConnectionFactoryWithoutHA(groupConfiguration, JMSFactoryType.XA_CF); + cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(groupConfiguration, JMSFactoryType.XA_CF); } } else if (connectorClassName != null) @@ -1987,7 +1987,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable if (connectionParams == null || i >= connectionParams.size()) { tc = new TransportConfiguration(connectorClassName.get(i)); - HornetQRALogger.LOGGER.debug("No connector params provided using default"); + ActiveMQRALogger.LOGGER.debug("No connector params provided using default"); } else { @@ -1998,33 +1998,33 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable } - if (HornetQRALogger.LOGGER.isDebugEnabled()) + if (ActiveMQRALogger.LOGGER.isDebugEnabled()) { - HornetQRALogger.LOGGER.debug("Creating Connection Factory on the resource adapter for transport=" + + ActiveMQRALogger.LOGGER.debug("Creating Connection Factory on the resource adapter for transport=" + Arrays.toString(transportConfigurations) + " with ha=" + ha); } if (ha) { - cf = HornetQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.XA_CF, transportConfigurations); + cf = ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.XA_CF, transportConfigurations); } else { - cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.XA_CF, transportConfigurations); + cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.XA_CF, transportConfigurations); } } else { - throw new IllegalArgumentException("must provide either TransportType or DiscoveryGroupAddress and DiscoveryGroupPort for HornetQ ResourceAdapter Connection Factory"); + throw new IllegalArgumentException("must provide either TransportType or DiscoveryGroupAddress and DiscoveryGroupPort for ActiveMQ ResourceAdapter Connection Factory"); } setParams(cf, overrideProperties); return cf; } - public HornetQConnectionFactory createRecoveryHornetQConnectionFactory(final ConnectionFactoryProperties overrideProperties) + public ActiveMQConnectionFactory createRecoveryActiveMQConnectionFactory(final ConnectionFactoryProperties overrideProperties) { - HornetQConnectionFactory cf; + ActiveMQConnectionFactory cf; List connectorClassName = overrideProperties.getParsedConnectorClassNames() != null ? overrideProperties.getParsedConnectorClassNames() : raProperties.getParsedConnectorClassNames(); @@ -2046,7 +2046,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable : getDiscoveryPort(); if (discoveryPort == null) { - discoveryPort = HornetQClient.DEFAULT_DISCOVERY_PORT; + discoveryPort = ActiveMQClient.DEFAULT_DISCOVERY_PORT; } String localBindAddress = overrideProperties.getDiscoveryLocalBindAddress() != null ? overrideProperties.getDiscoveryLocalBindAddress() @@ -2067,12 +2067,12 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable if (jgroupsLocatorClass != null) { String jgroupsChannelRefName = raProperties.getJgroupsChannelRefName(); - JChannel jchannel = HornetQRaUtils.locateJGroupsChannel(jgroupsLocatorClass, jgroupsChannelRefName); + JChannel jchannel = ActiveMQRaUtils.locateJGroupsChannel(jgroupsLocatorClass, jgroupsChannelRefName); endpointFactoryConfiguration = new JGroupsBroadcastGroupConfiguration(jchannel, jgroupsChannel); } if (endpointFactoryConfiguration == null) { - throw new IllegalArgumentException("must provide either TransportType or DiscoveryGroupAddress and DiscoveryGroupPort for HornetQ ResourceAdapter Connection Factory"); + throw new IllegalArgumentException("must provide either TransportType or DiscoveryGroupAddress and DiscoveryGroupPort for ActiveMQ ResourceAdapter Connection Factory"); } } @@ -2080,14 +2080,14 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable : raProperties.getDiscoveryRefreshTimeout(); if (refreshTimeout == null) { - refreshTimeout = HornetQClient.DEFAULT_DISCOVERY_REFRESH_TIMEOUT; + refreshTimeout = ActiveMQClient.DEFAULT_DISCOVERY_REFRESH_TIMEOUT; } Long initialTimeout = overrideProperties.getDiscoveryInitialWaitTimeout() != null ? overrideProperties.getDiscoveryInitialWaitTimeout() : raProperties.getDiscoveryInitialWaitTimeout(); if (initialTimeout == null) { - initialTimeout = HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT; + initialTimeout = ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT; } DiscoveryGroupConfiguration groupConfiguration = new DiscoveryGroupConfiguration() .setRefreshTimeout(refreshTimeout) @@ -2096,12 +2096,12 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable groupConfiguration.setRefreshTimeout(refreshTimeout); - if (HornetQRALogger.LOGGER.isDebugEnabled()) + if (ActiveMQRALogger.LOGGER.isDebugEnabled()) { - HornetQRALogger.LOGGER.debug("Creating Recovery Connection Factory on the resource adapter for discovery=" + groupConfiguration); + ActiveMQRALogger.LOGGER.debug("Creating Recovery Connection Factory on the resource adapter for discovery=" + groupConfiguration); } - cf = HornetQJMSClient.createConnectionFactoryWithoutHA(groupConfiguration, JMSFactoryType.XA_CF); + cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(groupConfiguration, JMSFactoryType.XA_CF); } else { @@ -2123,7 +2123,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable if (connectionParams == null || i >= connectionParams.size()) { tc = new TransportConfiguration(connectorClassName.get(i)); - HornetQRALogger.LOGGER.debug("No connector params provided using default"); + ActiveMQRALogger.LOGGER.debug("No connector params provided using default"); } else { @@ -2134,13 +2134,13 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable } - if (HornetQRALogger.LOGGER.isDebugEnabled()) + if (ActiveMQRALogger.LOGGER.isDebugEnabled()) { - HornetQRALogger.LOGGER.debug("Creating Recovery Connection Factory on the resource adapter for transport=" + + ActiveMQRALogger.LOGGER.debug("Creating Recovery Connection Factory on the resource adapter for transport=" + Arrays.toString(transportConfigurations)); } - cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.XA_CF, transportConfigurations); + cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.XA_CF, transportConfigurations); } setParams(cf, overrideProperties); @@ -2176,7 +2176,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable for (int i = 0; i < locatorClasses.length; i++) { - tm = HornetQRaUtils.locateTM(locatorClasses[i], locatorMethods[i]); + tm = ActiveMQRaUtils.locateTM(locatorClasses[i], locatorMethods[i]); if (tm != null) { break; @@ -2185,16 +2185,16 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable if (tm == null) { - HornetQRALogger.LOGGER.noTXLocator(); + ActiveMQRALogger.LOGGER.noTXLocator(); } else { - HornetQRALogger.LOGGER.debug("TM located = " + tm); + ActiveMQRALogger.LOGGER.debug("TM located = " + tm); } } - private void setParams(final HornetQConnectionFactory cf, + private void setParams(final ActiveMQConnectionFactory cf, final ConnectionFactoryProperties overrideProperties) { Boolean val = overrideProperties.isAutoGroup() != null ? overrideProperties.isAutoGroup() @@ -2399,9 +2399,9 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable } } - public void setManagedConnectionFactory(HornetQRAManagedConnectionFactory hornetQRAManagedConnectionFactory) + public void setManagedConnectionFactory(ActiveMQRAManagedConnectionFactory activeMQRAManagedConnectionFactory) { - managedConnectionFactories.add(hornetQRAManagedConnectionFactory); + managedConnectionFactories.add(activeMQRAManagedConnectionFactory); } public SensitiveDataCodec getCodecInstance() diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQXAResourceWrapper.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQXAResourceWrapper.java similarity index 87% rename from activemq-ra/src/main/java/org/apache/activemq/ra/HornetQXAResourceWrapper.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQXAResourceWrapper.java index 4861a9473e..b8624249d9 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQXAResourceWrapper.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQXAResourceWrapper.java @@ -17,7 +17,7 @@ import javax.transaction.xa.XAException; import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; -import org.apache.activemq.core.client.impl.HornetQXAResource; +import org.apache.activemq.core.client.impl.ActiveMQXAResource; import org.apache.activemq.utils.VersionLoader; /** @@ -27,7 +27,7 @@ import org.apache.activemq.utils.VersionLoader; * Transaction Manager for recovery scenarios. */ -public class HornetQXAResourceWrapper implements org.jboss.tm.XAResourceWrapper, org.jboss.jca.core.spi.transaction.xa.XAResourceWrapper, HornetQXAResource +public class ActiveMQXAResourceWrapper implements org.jboss.tm.XAResourceWrapper, org.jboss.jca.core.spi.transaction.xa.XAResourceWrapper, ActiveMQXAResource { private final XAResource xaResource; @@ -42,16 +42,16 @@ public class HornetQXAResourceWrapper implements org.jboss.tm.XAResourceWrapper, /** * Creates a new XAResourceWrapper. PRODUCT_NAME, productVersion and jndiName are useful for log output in the - * Transaction Manager. For HornetQ only the resourceManagerID is required to allow Transaction Manager to recover + * Transaction Manager. For ActiveMQ only the resourceManagerID is required to allow Transaction Manager to recover * from relevant recovery scenarios. * * @param xaResource * @param jndiName */ - public HornetQXAResourceWrapper(XAResource xaResource, String jndiName, String nodeId) + public ActiveMQXAResourceWrapper(XAResource xaResource, String jndiName, String nodeId) { this.xaResource = xaResource; - this.productName = HornetQResourceAdapter.PRODUCT_NAME; + this.productName = ActiveMQResourceAdapter.PRODUCT_NAME; this.productVersion = VersionLoader.getVersion().getFullVersion(); this.jndiNameNodeId = jndiName + " NodeId:" + nodeId; } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ConnectionFactoryProperties.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ConnectionFactoryProperties.java index f05809b425..7139f8584f 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ConnectionFactoryProperties.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ConnectionFactoryProperties.java @@ -24,7 +24,7 @@ public class ConnectionFactoryProperties /** * Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); private boolean hasBeenUpdated = false; @@ -180,7 +180,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getConnectionLoadBalancingPolicyClassName()"); + ActiveMQRALogger.LOGGER.trace("getConnectionLoadBalancingPolicyClassName()"); } return connectionLoadBalancingPolicyClassName; } @@ -189,7 +189,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setSessionDefaultType(" + connectionLoadBalancingPolicyClassName + ")"); + ActiveMQRALogger.LOGGER.trace("setSessionDefaultType(" + connectionLoadBalancingPolicyClassName + ")"); } hasBeenUpdated = true; this.connectionLoadBalancingPolicyClassName = connectionLoadBalancingPolicyClassName; @@ -199,7 +199,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getDiscoveryAddress()"); + ActiveMQRALogger.LOGGER.trace("getDiscoveryAddress()"); } return discoveryAddress; } @@ -208,7 +208,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setDiscoveryAddress(" + discoveryAddress + ")"); + ActiveMQRALogger.LOGGER.trace("setDiscoveryAddress(" + discoveryAddress + ")"); } hasBeenUpdated = true; this.discoveryAddress = discoveryAddress; @@ -218,7 +218,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getDiscoveryPort()"); + ActiveMQRALogger.LOGGER.trace("getDiscoveryPort()"); } return discoveryPort; } @@ -227,7 +227,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setDiscoveryLocalBindAddress(" + discoveryLocalBindAddress + ")"); + ActiveMQRALogger.LOGGER.trace("setDiscoveryLocalBindAddress(" + discoveryLocalBindAddress + ")"); } hasBeenUpdated = true; this.discoveryLocalBindAddress = discoveryLocalBindAddress; @@ -237,7 +237,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getDiscoveryLocalBindAddress()"); + ActiveMQRALogger.LOGGER.trace("getDiscoveryLocalBindAddress()"); } return discoveryLocalBindAddress; } @@ -246,7 +246,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setDiscoveryPort(" + discoveryPort + ")"); + ActiveMQRALogger.LOGGER.trace("setDiscoveryPort(" + discoveryPort + ")"); } hasBeenUpdated = true; this.discoveryPort = discoveryPort; @@ -256,7 +256,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getDiscoveryRefreshTimeout()"); + ActiveMQRALogger.LOGGER.trace("getDiscoveryRefreshTimeout()"); } return discoveryRefreshTimeout; } @@ -265,7 +265,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setDiscoveryRefreshTimeout(" + discoveryRefreshTimeout + ")"); + ActiveMQRALogger.LOGGER.trace("setDiscoveryRefreshTimeout(" + discoveryRefreshTimeout + ")"); } hasBeenUpdated = true; this.discoveryRefreshTimeout = discoveryRefreshTimeout; @@ -275,7 +275,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getDiscoveryInitialWaitTimeout()"); + ActiveMQRALogger.LOGGER.trace("getDiscoveryInitialWaitTimeout()"); } return discoveryInitialWaitTimeout; } @@ -284,7 +284,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setDiscoveryInitialWaitTimeout(" + discoveryInitialWaitTimeout + ")"); + ActiveMQRALogger.LOGGER.trace("setDiscoveryInitialWaitTimeout(" + discoveryInitialWaitTimeout + ")"); } hasBeenUpdated = true; this.discoveryInitialWaitTimeout = discoveryInitialWaitTimeout; @@ -294,7 +294,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getClientID()"); + ActiveMQRALogger.LOGGER.trace("getClientID()"); } return clientID; } @@ -303,7 +303,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setClientID(" + clientID + ")"); + ActiveMQRALogger.LOGGER.trace("setClientID(" + clientID + ")"); } hasBeenUpdated = true; this.clientID = clientID; @@ -324,7 +324,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getDupsOKBatchSize()"); + ActiveMQRALogger.LOGGER.trace("getDupsOKBatchSize()"); } return dupsOKBatchSize; } @@ -333,7 +333,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setDupsOKBatchSize(" + dupsOKBatchSize + ")"); + ActiveMQRALogger.LOGGER.trace("setDupsOKBatchSize(" + dupsOKBatchSize + ")"); } hasBeenUpdated = true; this.dupsOKBatchSize = dupsOKBatchSize; @@ -343,7 +343,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getTransactionBatchSize()"); + ActiveMQRALogger.LOGGER.trace("getTransactionBatchSize()"); } return transactionBatchSize; } @@ -352,7 +352,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setTransactionBatchSize(" + transactionBatchSize + ")"); + ActiveMQRALogger.LOGGER.trace("setTransactionBatchSize(" + transactionBatchSize + ")"); } hasBeenUpdated = true; this.transactionBatchSize = transactionBatchSize; @@ -362,7 +362,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getClientFailureCheckPeriod()"); + ActiveMQRALogger.LOGGER.trace("getClientFailureCheckPeriod()"); } return clientFailureCheckPeriod; } @@ -371,7 +371,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setClientFailureCheckPeriod(" + clientFailureCheckPeriod + ")"); + ActiveMQRALogger.LOGGER.trace("setClientFailureCheckPeriod(" + clientFailureCheckPeriod + ")"); } hasBeenUpdated = true; this.clientFailureCheckPeriod = clientFailureCheckPeriod; @@ -381,7 +381,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getConnectionTTL()"); + ActiveMQRALogger.LOGGER.trace("getConnectionTTL()"); } return connectionTTL; } @@ -390,7 +390,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setConnectionTTL(" + connectionTTL + ")"); + ActiveMQRALogger.LOGGER.trace("setConnectionTTL(" + connectionTTL + ")"); } hasBeenUpdated = true; this.connectionTTL = connectionTTL; @@ -400,7 +400,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getCallTimeout()"); + ActiveMQRALogger.LOGGER.trace("getCallTimeout()"); } return callTimeout; } @@ -409,7 +409,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setCallTimeout(" + callTimeout + ")"); + ActiveMQRALogger.LOGGER.trace("setCallTimeout(" + callTimeout + ")"); } hasBeenUpdated = true; this.callTimeout = callTimeout; @@ -419,7 +419,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getCallFailoverTimeout()"); + ActiveMQRALogger.LOGGER.trace("getCallFailoverTimeout()"); } return callFailoverTimeout; } @@ -428,7 +428,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setCallFailoverTimeout(" + callFailoverTimeout + ")"); + ActiveMQRALogger.LOGGER.trace("setCallFailoverTimeout(" + callFailoverTimeout + ")"); } hasBeenUpdated = true; this.callFailoverTimeout = callFailoverTimeout; @@ -438,7 +438,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getConsumerWindowSize()"); + ActiveMQRALogger.LOGGER.trace("getConsumerWindowSize()"); } return consumerWindowSize; } @@ -447,7 +447,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setConsumerWindowSize(" + consumerWindowSize + ")"); + ActiveMQRALogger.LOGGER.trace("setConsumerWindowSize(" + consumerWindowSize + ")"); } hasBeenUpdated = true; this.consumerWindowSize = consumerWindowSize; @@ -457,7 +457,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getConsumerMaxRate()"); + ActiveMQRALogger.LOGGER.trace("getConsumerMaxRate()"); } return consumerMaxRate; } @@ -466,7 +466,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setConsumerMaxRate(" + consumerMaxRate + ")"); + ActiveMQRALogger.LOGGER.trace("setConsumerMaxRate(" + consumerMaxRate + ")"); } hasBeenUpdated = true; this.consumerMaxRate = consumerMaxRate; @@ -476,7 +476,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getConfirmationWindowSize()"); + ActiveMQRALogger.LOGGER.trace("getConfirmationWindowSize()"); } return confirmationWindowSize; } @@ -485,7 +485,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setConfirmationWindowSize(" + confirmationWindowSize + ")"); + ActiveMQRALogger.LOGGER.trace("setConfirmationWindowSize(" + confirmationWindowSize + ")"); } hasBeenUpdated = true; this.confirmationWindowSize = confirmationWindowSize; @@ -506,7 +506,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getProducerMaxRate()"); + ActiveMQRALogger.LOGGER.trace("getProducerMaxRate()"); } return producerMaxRate; } @@ -515,7 +515,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setProducerMaxRate(" + producerMaxRate + ")"); + ActiveMQRALogger.LOGGER.trace("setProducerMaxRate(" + producerMaxRate + ")"); } hasBeenUpdated = true; this.producerMaxRate = producerMaxRate; @@ -525,7 +525,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getProducerWindowSize()"); + ActiveMQRALogger.LOGGER.trace("getProducerWindowSize()"); } return producerWindowSize; } @@ -534,7 +534,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setProducerWindowSize(" + producerWindowSize + ")"); + ActiveMQRALogger.LOGGER.trace("setProducerWindowSize(" + producerWindowSize + ")"); } hasBeenUpdated = true; this.producerWindowSize = producerWindowSize; @@ -544,7 +544,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getMinLargeMessageSize()"); + ActiveMQRALogger.LOGGER.trace("getMinLargeMessageSize()"); } return minLargeMessageSize; } @@ -553,7 +553,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setMinLargeMessageSize(" + minLargeMessageSize + ")"); + ActiveMQRALogger.LOGGER.trace("setMinLargeMessageSize(" + minLargeMessageSize + ")"); } hasBeenUpdated = true; this.minLargeMessageSize = minLargeMessageSize; @@ -563,7 +563,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("isBlockOnAcknowledge()"); + ActiveMQRALogger.LOGGER.trace("isBlockOnAcknowledge()"); } return blockOnAcknowledge; } @@ -572,7 +572,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setBlockOnAcknowledge(" + blockOnAcknowledge + ")"); + ActiveMQRALogger.LOGGER.trace("setBlockOnAcknowledge(" + blockOnAcknowledge + ")"); } hasBeenUpdated = true; this.blockOnAcknowledge = blockOnAcknowledge; @@ -582,7 +582,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("isBlockOnNonDurableSend()"); + ActiveMQRALogger.LOGGER.trace("isBlockOnNonDurableSend()"); } return blockOnNonDurableSend; } @@ -591,7 +591,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setBlockOnNonDurableSend(" + blockOnNonDurableSend + ")"); + ActiveMQRALogger.LOGGER.trace("setBlockOnNonDurableSend(" + blockOnNonDurableSend + ")"); } hasBeenUpdated = true; this.blockOnNonDurableSend = blockOnNonDurableSend; @@ -601,7 +601,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("isBlockOnDurableSend()"); + ActiveMQRALogger.LOGGER.trace("isBlockOnDurableSend()"); } return blockOnDurableSend; } @@ -610,7 +610,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setBlockOnDurableSend(" + blockOnDurableSend + ")"); + ActiveMQRALogger.LOGGER.trace("setBlockOnDurableSend(" + blockOnDurableSend + ")"); } hasBeenUpdated = true; this.blockOnDurableSend = blockOnDurableSend; @@ -620,7 +620,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("isAutoGroup()"); + ActiveMQRALogger.LOGGER.trace("isAutoGroup()"); } return autoGroup; } @@ -629,7 +629,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setAutoGroup(" + autoGroup + ")"); + ActiveMQRALogger.LOGGER.trace("setAutoGroup(" + autoGroup + ")"); } hasBeenUpdated = true; this.autoGroup = autoGroup; @@ -639,7 +639,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("isPreAcknowledge()"); + ActiveMQRALogger.LOGGER.trace("isPreAcknowledge()"); } return preAcknowledge; } @@ -648,7 +648,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setPreAcknowledge(" + preAcknowledge + ")"); + ActiveMQRALogger.LOGGER.trace("setPreAcknowledge(" + preAcknowledge + ")"); } hasBeenUpdated = true; this.preAcknowledge = preAcknowledge; @@ -658,7 +658,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getRetryInterval()"); + ActiveMQRALogger.LOGGER.trace("getRetryInterval()"); } return retryInterval; } @@ -667,7 +667,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setRetryInterval(" + retryInterval + ")"); + ActiveMQRALogger.LOGGER.trace("setRetryInterval(" + retryInterval + ")"); } hasBeenUpdated = true; this.retryInterval = retryInterval; @@ -677,7 +677,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getRetryIntervalMultiplier()"); + ActiveMQRALogger.LOGGER.trace("getRetryIntervalMultiplier()"); } return retryIntervalMultiplier; } @@ -686,7 +686,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setRetryIntervalMultiplier(" + retryIntervalMultiplier + ")"); + ActiveMQRALogger.LOGGER.trace("setRetryIntervalMultiplier(" + retryIntervalMultiplier + ")"); } hasBeenUpdated = true; this.retryIntervalMultiplier = retryIntervalMultiplier; @@ -707,7 +707,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getReconnectAttempts()"); + ActiveMQRALogger.LOGGER.trace("getReconnectAttempts()"); } return reconnectAttempts; } @@ -716,7 +716,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setReconnectAttempts(" + reconnectAttempts + ")"); + ActiveMQRALogger.LOGGER.trace("setReconnectAttempts(" + reconnectAttempts + ")"); } hasBeenUpdated = true; this.reconnectAttempts = reconnectAttempts; @@ -726,7 +726,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("isUseGlobalPools()"); + ActiveMQRALogger.LOGGER.trace("isUseGlobalPools()"); } return useGlobalPools; } @@ -735,7 +735,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setUseGlobalPools(" + useGlobalPools + ")"); + ActiveMQRALogger.LOGGER.trace("setUseGlobalPools(" + useGlobalPools + ")"); } hasBeenUpdated = true; this.useGlobalPools = useGlobalPools; @@ -745,7 +745,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getScheduledThreadPoolMaxSize()"); + ActiveMQRALogger.LOGGER.trace("getScheduledThreadPoolMaxSize()"); } return scheduledThreadPoolMaxSize; } @@ -754,7 +754,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setScheduledThreadPoolMaxSize(" + scheduledThreadPoolMaxSize + ")"); + ActiveMQRALogger.LOGGER.trace("setScheduledThreadPoolMaxSize(" + scheduledThreadPoolMaxSize + ")"); } hasBeenUpdated = true; this.scheduledThreadPoolMaxSize = scheduledThreadPoolMaxSize; @@ -764,7 +764,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("getThreadPoolMaxSize()"); + ActiveMQRALogger.LOGGER.trace("getThreadPoolMaxSize()"); } return threadPoolMaxSize; } @@ -773,7 +773,7 @@ public class ConnectionFactoryProperties { if (ConnectionFactoryProperties.trace) { - HornetQRALogger.LOGGER.trace("setThreadPoolMaxSize(" + threadPoolMaxSize + ")"); + ActiveMQRALogger.LOGGER.trace("setThreadPoolMaxSize(" + threadPoolMaxSize + ")"); } hasBeenUpdated = true; this.threadPoolMaxSize = threadPoolMaxSize; diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/inflow/HornetQActivation.java b/activemq-ra/src/main/java/org/apache/activemq/ra/inflow/ActiveMQActivation.java similarity index 75% rename from activemq-ra/src/main/java/org/apache/activemq/ra/inflow/HornetQActivation.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/inflow/ActiveMQActivation.java index 8bf12b67ca..d618e42194 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/inflow/HornetQActivation.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/inflow/ActiveMQActivation.java @@ -36,16 +36,16 @@ import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.core.client.impl.ClientSessionInternal; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; import org.apache.activemq.jms.server.recovery.XARecoveryConfig; -import org.apache.activemq.ra.HornetQRABundle; -import org.apache.activemq.ra.HornetQRAConnectionFactory; -import org.apache.activemq.ra.HornetQRALogger; -import org.apache.activemq.ra.HornetQRaUtils; -import org.apache.activemq.ra.HornetQResourceAdapter; +import org.apache.activemq.ra.ActiveMQRABundle; +import org.apache.activemq.ra.ActiveMQRAConnectionFactory; +import org.apache.activemq.ra.ActiveMQRALogger; +import org.apache.activemq.ra.ActiveMQRaUtils; +import org.apache.activemq.ra.ActiveMQResourceAdapter; import org.apache.activemq.utils.FutureLatch; import org.apache.activemq.utils.SensitiveDataCodec; @@ -56,12 +56,12 @@ import org.apache.activemq.utils.SensitiveDataCodec; * @author Jesper Pedersen * @author Andy Taylor */ -public class HornetQActivation +public class ActiveMQActivation { /** * Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * The onMessage method @@ -71,12 +71,12 @@ public class HornetQActivation /** * The resource adapter */ - private final HornetQResourceAdapter ra; + private final ActiveMQResourceAdapter ra; /** * The activation spec */ - private final HornetQActivationSpec spec; + private final ActiveMQActivationSpec spec; /** * The message endpoint factory @@ -98,16 +98,16 @@ public class HornetQActivation */ private boolean isDeliveryTransacted; - private HornetQDestination destination; + private ActiveMQDestination destination; /** * The name of the temporary subscription name that all the sessions will share */ private SimpleString topicTemporaryQueue; - private final List handlers = new ArrayList(); + private final List handlers = new ArrayList(); - private HornetQConnectionFactory factory; + private ActiveMQConnectionFactory factory; // Whether we are in the failure recovery loop private final AtomicBoolean inFailure = new AtomicBoolean(false); @@ -133,15 +133,15 @@ public class HornetQActivation * @param spec The activation spec * @throws ResourceException Thrown if an error occurs */ - public HornetQActivation(final HornetQResourceAdapter ra, - final MessageEndpointFactory endpointFactory, - final HornetQActivationSpec spec) throws ResourceException + public ActiveMQActivation(final ActiveMQResourceAdapter ra, + final MessageEndpointFactory endpointFactory, + final ActiveMQActivationSpec spec) throws ResourceException { spec.validate(); - if (HornetQActivation.trace) + if (ActiveMQActivation.trace) { - HornetQRALogger.LOGGER.trace("constructor(" + ra + ", " + endpointFactory + ", " + spec + ")"); + ActiveMQRALogger.LOGGER.trace("constructor(" + ra + ", " + endpointFactory + ", " + spec + ")"); } if (ra.isUseMaskedPassword()) @@ -167,7 +167,7 @@ public class HornetQActivation this.spec = spec; try { - isDeliveryTransacted = endpointFactory.isDeliveryTransacted(HornetQActivation.ONMESSAGE); + isDeliveryTransacted = endpointFactory.isDeliveryTransacted(ActiveMQActivation.ONMESSAGE); } catch (Exception e) { @@ -180,11 +180,11 @@ public class HornetQActivation * * @return The value */ - public HornetQActivationSpec getActivationSpec() + public ActiveMQActivationSpec getActivationSpec() { - if (HornetQActivation.trace) + if (ActiveMQActivation.trace) { - HornetQRALogger.LOGGER.trace("getActivationSpec()"); + ActiveMQRALogger.LOGGER.trace("getActivationSpec()"); } return spec; @@ -197,9 +197,9 @@ public class HornetQActivation */ public MessageEndpointFactory getMessageEndpointFactory() { - if (HornetQActivation.trace) + if (ActiveMQActivation.trace) { - HornetQRALogger.LOGGER.trace("getMessageEndpointFactory()"); + ActiveMQRALogger.LOGGER.trace("getMessageEndpointFactory()"); } return endpointFactory; @@ -212,9 +212,9 @@ public class HornetQActivation */ public boolean isDeliveryTransacted() { - if (HornetQActivation.trace) + if (ActiveMQActivation.trace) { - HornetQRALogger.LOGGER.trace("isDeliveryTransacted()"); + ActiveMQRALogger.LOGGER.trace("isDeliveryTransacted()"); } return isDeliveryTransacted; @@ -227,9 +227,9 @@ public class HornetQActivation */ public WorkManager getWorkManager() { - if (HornetQActivation.trace) + if (ActiveMQActivation.trace) { - HornetQRALogger.LOGGER.trace("getWorkManager()"); + ActiveMQRALogger.LOGGER.trace("getWorkManager()"); } return ra.getWorkManager(); @@ -242,9 +242,9 @@ public class HornetQActivation */ public boolean isTopic() { - if (HornetQActivation.trace) + if (ActiveMQActivation.trace) { - HornetQRALogger.LOGGER.trace("isTopic()"); + ActiveMQRALogger.LOGGER.trace("isTopic()"); } return isTopic; @@ -257,9 +257,9 @@ public class HornetQActivation */ public void start() throws ResourceException { - if (HornetQActivation.trace) + if (ActiveMQActivation.trace) { - HornetQRALogger.LOGGER.trace("start()"); + ActiveMQRALogger.LOGGER.trace("start()"); } deliveryActive.set(true); ra.getWorkManager().scheduleWork(new SetupActivation()); @@ -287,7 +287,7 @@ public class HornetQActivation public List getXAResources() { List xaresources = new ArrayList(); - for (HornetQMessageHandler handler : handlers) + for (ActiveMQMessageHandler handler : handlers) { XAResource xares = handler.getXAResource(); if (xares != null) @@ -303,9 +303,9 @@ public class HornetQActivation */ public void stop() { - if (HornetQActivation.trace) + if (ActiveMQActivation.trace) { - HornetQRALogger.LOGGER.trace("stop()"); + ActiveMQRALogger.LOGGER.trace("stop()"); } deliveryActive.set(false); @@ -319,7 +319,7 @@ public class HornetQActivation */ protected synchronized void setup() throws Exception { - HornetQRALogger.LOGGER.debug("Setting up " + spec); + ActiveMQRALogger.LOGGER.debug("Setting up " + spec); setupCF(); @@ -336,7 +336,7 @@ public class HornetQActivation { cf = factory.getServerLocator().createSessionFactory(); session = setupSession(cf); - HornetQMessageHandler handler = new HornetQMessageHandler(this, ra.getTM(), (ClientSessionInternal) session, cf, i); + ActiveMQMessageHandler handler = new ActiveMQMessageHandler(this, ra.getTM(), (ClientSessionInternal) session, cf, i); handler.setup(); handlers.add(handler); } @@ -360,7 +360,7 @@ public class HornetQActivation //we don't want partially configured activations, i.e. only 8 out of 15 sessions started so best to stop and log the error. if (firstException != null) { - for (HornetQMessageHandler handler : handlers) + for (ActiveMQMessageHandler handler : handlers) { handler.teardown(); } @@ -368,14 +368,14 @@ public class HornetQActivation } //now start them all together. - for (HornetQMessageHandler handler : handlers) + for (ActiveMQMessageHandler handler : handlers) { handler.start(); } resourceRecovery = ra.getRecoveryManager().register(factory, spec.getUser(), spec.getPassword()); - HornetQRALogger.LOGGER.debug("Setup complete " + this); + ActiveMQRALogger.LOGGER.debug("Setup complete " + this); } /** @@ -383,14 +383,14 @@ public class HornetQActivation */ protected synchronized void teardown() { - HornetQRALogger.LOGGER.debug("Tearing down " + spec); + ActiveMQRALogger.LOGGER.debug("Tearing down " + spec); if (resourceRecovery != null) { ra.getRecoveryManager().unRegister(resourceRecovery); } - final HornetQMessageHandler[] handlersCopy = new HornetQMessageHandler[handlers.size()]; + final ActiveMQMessageHandler[] handlersCopy = new ActiveMQMessageHandler[handlers.size()]; // We need to do from last to first as any temporary queue will have been created on the first handler // So we invert the handlers here @@ -404,7 +404,7 @@ public class HornetQActivation FutureLatch future = new FutureLatch(handlersCopy.length); List interruptThreads = new ArrayList<>(); - for (HornetQMessageHandler handler : handlersCopy) + for (ActiveMQMessageHandler handler : handlersCopy) { Thread thread = handler.interruptConsumer(future); if (thread != null) @@ -431,11 +431,11 @@ public class HornetQActivation } } - Thread threadTearDown = new Thread("TearDown/HornetQActivation") + Thread threadTearDown = new Thread("TearDown/ActiveMQActivation") { public void run() { - for (HornetQMessageHandler handler : handlersCopy) + for (ActiveMQMessageHandler handler : handlersCopy) { handler.teardown(); } @@ -477,7 +477,7 @@ public class HornetQActivation if (threadTearDown.isAlive()) { - HornetQRALogger.LOGGER.warn("Thread " + threadTearDown + " couldn't be finished"); + ActiveMQRALogger.LOGGER.warn("Thread " + threadTearDown + " couldn't be finished"); } } @@ -488,7 +488,7 @@ public class HornetQActivation } - HornetQRALogger.LOGGER.debug("Tearing down complete " + this); + ActiveMQRALogger.LOGGER.debug("Tearing down complete " + this); } protected void setupCF() throws Exception @@ -505,34 +505,34 @@ public class HornetQActivation ctx = new InitialContext(spec.getParsedJndiParams()); } Object fac = ctx.lookup(spec.getConnectionFactoryLookup()); - if (fac instanceof HornetQConnectionFactory) + if (fac instanceof ActiveMQConnectionFactory) { - factory = (HornetQConnectionFactory) fac; + factory = (ActiveMQConnectionFactory) fac; } else { - HornetQRAConnectionFactory raFact = (HornetQRAConnectionFactory) fac; + ActiveMQRAConnectionFactory raFact = (ActiveMQRAConnectionFactory) fac; if (spec.isHasBeenUpdated()) { - factory = raFact.getResourceAdapter().createHornetQConnectionFactory(spec); + factory = raFact.getResourceAdapter().createActiveMQConnectionFactory(spec); } else { factory = raFact.getDefaultFactory(); - if (factory != ra.getDefaultHornetQConnectionFactory()) + if (factory != ra.getDefaultActiveMQConnectionFactory()) { - HornetQRALogger.LOGGER.warnDifferentConnectionfactory(); + ActiveMQRALogger.LOGGER.warnDifferentConnectionfactory(); } } } } else if (spec.isHasBeenUpdated()) { - factory = ra.createHornetQConnectionFactory(spec); + factory = ra.createActiveMQConnectionFactory(spec); } else { - factory = ra.getDefaultHornetQConnectionFactory(); + factory = ra.getDefaultActiveMQConnectionFactory(); } } @@ -568,7 +568,7 @@ public class HornetQActivation result.addMetaData("jms-client-id", clientID); } - HornetQRALogger.LOGGER.debug("Using queue connection " + result); + ActiveMQRALogger.LOGGER.debug("Using queue connection " + result); return result; } @@ -583,7 +583,7 @@ public class HornetQActivation } catch (Exception e) { - HornetQRALogger.LOGGER.trace("Ignored error closing connection", e); + ActiveMQRALogger.LOGGER.trace("Ignored error closing connection", e); } if (t instanceof Exception) { @@ -614,16 +614,16 @@ public class HornetQActivation { ctx = new InitialContext(spec.getParsedJndiParams()); } - HornetQRALogger.LOGGER.debug("Using context " + ctx.getEnvironment() + " for " + spec); - if (HornetQActivation.trace) + ActiveMQRALogger.LOGGER.debug("Using context " + ctx.getEnvironment() + " for " + spec); + if (ActiveMQActivation.trace) { - HornetQRALogger.LOGGER.trace("setupDestination(" + ctx + ")"); + ActiveMQRALogger.LOGGER.trace("setupDestination(" + ctx + ")"); } String destinationTypeString = spec.getDestinationType(); if (destinationTypeString != null && !destinationTypeString.trim().equals("")) { - HornetQRALogger.LOGGER.debug("Destination type defined as " + destinationTypeString); + ActiveMQRALogger.LOGGER.debug("Destination type defined as " + destinationTypeString); Class destinationType; if (Topic.class.getName().equals(destinationTypeString)) @@ -636,42 +636,42 @@ public class HornetQActivation destinationType = Queue.class; } - HornetQRALogger.LOGGER.debug("Retrieving " + destinationType.getName() + " \"" + destinationName + "\" from JNDI"); + ActiveMQRALogger.LOGGER.debug("Retrieving " + destinationType.getName() + " \"" + destinationName + "\" from JNDI"); try { - destination = (HornetQDestination) HornetQRaUtils.lookup(ctx, destinationName, destinationType); + destination = (ActiveMQDestination) ActiveMQRaUtils.lookup(ctx, destinationName, destinationType); } catch (Exception e) { if (destinationName == null) { - throw HornetQRABundle.BUNDLE.noDestinationName(); + throw ActiveMQRABundle.BUNDLE.noDestinationName(); } String calculatedDestinationName = destinationName.substring(destinationName.lastIndexOf('/') + 1); - HornetQRALogger.LOGGER.debug("Unable to retrieve " + destinationName + + ActiveMQRALogger.LOGGER.debug("Unable to retrieve " + destinationName + " from JNDI. Creating a new " + destinationType.getName() + " named " + calculatedDestinationName + " to be used by the MDB."); // If there is no binding on naming, we will just create a new instance if (isTopic) { - destination = (HornetQDestination) HornetQJMSClient.createTopic(calculatedDestinationName); + destination = (ActiveMQDestination) ActiveMQJMSClient.createTopic(calculatedDestinationName); } else { - destination = (HornetQDestination) HornetQJMSClient.createQueue(calculatedDestinationName); + destination = (ActiveMQDestination) ActiveMQJMSClient.createQueue(calculatedDestinationName); } } } else { - HornetQRALogger.LOGGER.debug("Destination type not defined in MDB activation configuration."); - HornetQRALogger.LOGGER.debug("Retrieving " + Destination.class.getName() + " \"" + destinationName + "\" from JNDI"); + ActiveMQRALogger.LOGGER.debug("Destination type not defined in MDB activation configuration."); + ActiveMQRALogger.LOGGER.debug("Retrieving " + Destination.class.getName() + " \"" + destinationName + "\" from JNDI"); - destination = (HornetQDestination) HornetQRaUtils.lookup(ctx, destinationName, Destination.class); + destination = (ActiveMQDestination) ActiveMQRaUtils.lookup(ctx, destinationName, Destination.class); if (destination instanceof Topic) { isTopic = true; @@ -680,16 +680,16 @@ public class HornetQActivation } else { - HornetQRALogger.LOGGER.instantiatingDestination(spec.getDestinationType(), spec.getDestination()); + ActiveMQRALogger.LOGGER.instantiatingDestination(spec.getDestinationType(), spec.getDestination()); if (Topic.class.getName().equals(spec.getDestinationType())) { - destination = (HornetQDestination) HornetQJMSClient.createTopic(spec.getDestination()); + destination = (ActiveMQDestination) ActiveMQJMSClient.createTopic(spec.getDestination()); isTopic = true; } else { - destination = (HornetQDestination) HornetQJMSClient.createQueue(spec.getDestination()); + destination = (ActiveMQDestination) ActiveMQJMSClient.createQueue(spec.getDestination()); } } } @@ -703,7 +703,7 @@ public class HornetQActivation public String toString() { StringBuffer buffer = new StringBuffer(); - buffer.append(HornetQActivation.class.getName()).append('('); + buffer.append(ActiveMQActivation.class.getName()).append('('); buffer.append("spec=").append(spec.getClass().getName()); buffer.append(" mepf=").append(endpointFactory.getClass().getName()); buffer.append(" active=").append(deliveryActive.get()); @@ -725,15 +725,15 @@ public class HornetQActivation { if (failure instanceof ActiveMQException && ((ActiveMQException) failure).getType() == ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST) { - HornetQRALogger.LOGGER.awaitingTopicQueueCreation(getActivationSpec().getDestination()); + ActiveMQRALogger.LOGGER.awaitingTopicQueueCreation(getActivationSpec().getDestination()); } else if (failure instanceof ActiveMQException && ((ActiveMQException) failure).getType() == ActiveMQExceptionType.NOT_CONNECTED) { - HornetQRALogger.LOGGER.awaitingJMSServerCreation(); + ActiveMQRALogger.LOGGER.awaitingJMSServerCreation(); } else { - HornetQRALogger.LOGGER.failureInActivation(failure, spec); + ActiveMQRALogger.LOGGER.failureInActivation(failure, spec); } int reconnectCount = 0; int setupAttempts = spec.getSetupAttempts(); @@ -755,18 +755,18 @@ public class HornetQActivation } catch (InterruptedException e) { - HornetQRALogger.LOGGER.debug("Interrupted trying to reconnect " + spec, e); + ActiveMQRALogger.LOGGER.debug("Interrupted trying to reconnect " + spec, e); break; } if (reconnectCount < 1) { - HornetQRALogger.LOGGER.attemptingReconnect(spec); + ActiveMQRALogger.LOGGER.attemptingReconnect(spec); } try { setup(); - HornetQRALogger.LOGGER.reconnected(); + ActiveMQRALogger.LOGGER.reconnected(); break; } catch (Throwable t) @@ -776,7 +776,7 @@ public class HornetQActivation if (lastException == null || !(t instanceof ActiveMQNonExistentQueueException)) { lastException = t; - HornetQRALogger.LOGGER.awaitingTopicQueueCreation(getActivationSpec().getDestination()); + ActiveMQRALogger.LOGGER.awaitingTopicQueueCreation(getActivationSpec().getDestination()); } } else if (failure instanceof ActiveMQException && ((ActiveMQException) failure).getType() == ActiveMQExceptionType.NOT_CONNECTED) @@ -784,12 +784,12 @@ public class HornetQActivation if (lastException == null || !(t instanceof ActiveMQNotConnectedException)) { lastException = t; - HornetQRALogger.LOGGER.awaitingJMSServerCreation(); + ActiveMQRALogger.LOGGER.awaitingJMSServerCreation(); } } else { - HornetQRALogger.LOGGER.errorReconnecting(t, spec); + ActiveMQRALogger.LOGGER.errorReconnecting(t, spec); } } ++reconnectCount; @@ -802,7 +802,7 @@ public class HornetQActivation } } - public HornetQConnectionFactory getConnectionFactory() + public ActiveMQConnectionFactory getConnectionFactory() { return this.factory; } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/inflow/HornetQActivationSpec.java b/activemq-ra/src/main/java/org/apache/activemq/ra/inflow/ActiveMQActivationSpec.java similarity index 77% rename from activemq-ra/src/main/java/org/apache/activemq/ra/inflow/HornetQActivationSpec.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/inflow/ActiveMQActivationSpec.java index 9a87d34c85..06f9c7a949 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/inflow/HornetQActivationSpec.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/inflow/ActiveMQActivationSpec.java @@ -28,9 +28,9 @@ import java.util.Iterator; import java.util.List; import org.apache.activemq.ra.ConnectionFactoryProperties; -import org.apache.activemq.ra.HornetQRALogger; -import org.apache.activemq.ra.HornetQRaUtils; -import org.apache.activemq.ra.HornetQResourceAdapter; +import org.apache.activemq.ra.ActiveMQRALogger; +import org.apache.activemq.ra.ActiveMQRaUtils; +import org.apache.activemq.ra.ActiveMQResourceAdapter; /** * The activation spec @@ -41,7 +41,7 @@ import org.apache.activemq.ra.HornetQResourceAdapter; * @author Andy Taylor * @author Clebert Suconic */ -public class HornetQActivationSpec extends ConnectionFactoryProperties implements ActivationSpec, Serializable +public class ActiveMQActivationSpec extends ConnectionFactoryProperties implements ActivationSpec, Serializable { private static final long serialVersionUID = -7997041053897964654L; @@ -50,7 +50,7 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement /** * Whether trace is enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); public String strConnectorClassName; @@ -59,7 +59,7 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement /** * The resource adapter */ - private HornetQResourceAdapter ra; + private ActiveMQResourceAdapter ra; /** * The connection factory lookup @@ -130,20 +130,20 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement /* use local tx instead of XA*/ private Boolean localTx; - // undefined by default, default is specified at the RA level in HornetQRAProperties + // undefined by default, default is specified at the RA level in ActiveMQRAProperties private Integer setupAttempts; - // undefined by default, default is specified at the RA level in HornetQRAProperties + // undefined by default, default is specified at the RA level in ActiveMQRAProperties private Long setupInterval; /** * Constructor */ - public HornetQActivationSpec() + public ActiveMQActivationSpec() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("constructor()"); + ActiveMQRALogger.LOGGER.trace("constructor()"); } ra = null; @@ -166,9 +166,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public ResourceAdapter getResourceAdapter() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("getResourceAdapter()"); + ActiveMQRALogger.LOGGER.trace("getResourceAdapter()"); } return ra; @@ -209,7 +209,7 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement public void setJndiParams(String jndiParams) { this.jndiParams = jndiParams; - parsedJndiParams = HornetQRaUtils.parseHashtableConfig(jndiParams); + parsedJndiParams = ActiveMQRaUtils.parseHashtableConfig(jndiParams); } public Hashtable getParsedJndiParams() @@ -229,17 +229,17 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public void setResourceAdapter(final ResourceAdapter ra) throws ResourceException { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setResourceAdapter(" + ra + ")"); + ActiveMQRALogger.LOGGER.trace("setResourceAdapter(" + ra + ")"); } - if (ra == null || !(ra instanceof HornetQResourceAdapter)) + if (ra == null || !(ra instanceof ActiveMQResourceAdapter)) { throw new ResourceException("Resource adapter is " + ra); } - this.ra = (HornetQResourceAdapter) ra; + this.ra = (ActiveMQResourceAdapter) ra; } /** @@ -249,9 +249,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public String getConnectionFactoryLookup() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("getConnectionFactoryLookup() ->" + connectionFactoryLookup); + ActiveMQRALogger.LOGGER.trace("getConnectionFactoryLookup() ->" + connectionFactoryLookup); } return connectionFactoryLookup; @@ -264,9 +264,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public void setConnectionFactoryLookup(final String value) { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setConnectionFactoryLookup(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("setConnectionFactoryLookup(" + value + ")"); } connectionFactoryLookup = value; @@ -279,9 +279,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public String getDestination() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("getDestination()"); + ActiveMQRALogger.LOGGER.trace("getDestination()"); } return destination; @@ -294,9 +294,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public void setDestination(final String value) { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setDestination(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("setDestination(" + value + ")"); } destination = value; @@ -330,9 +330,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public String getDestinationType() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("getDestinationType()"); + ActiveMQRALogger.LOGGER.trace("getDestinationType()"); } return destinationType; @@ -345,9 +345,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public void setDestinationType(final String value) { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setDestinationType(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("setDestinationType(" + value + ")"); } destinationType = value; @@ -360,9 +360,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public String getMessageSelector() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("getMessageSelector()"); + ActiveMQRALogger.LOGGER.trace("getMessageSelector()"); } return messageSelector; @@ -375,9 +375,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public void setMessageSelector(final String value) { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setMessageSelector(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("setMessageSelector(" + value + ")"); } messageSelector = value; @@ -390,9 +390,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public String getAcknowledgeMode() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("getAcknowledgeMode()"); + ActiveMQRALogger.LOGGER.trace("getAcknowledgeMode()"); } if (Session.DUPS_OK_ACKNOWLEDGE == acknowledgeMode) @@ -412,9 +412,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public void setAcknowledgeMode(final String value) { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setAcknowledgeMode(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("setAcknowledgeMode(" + value + ")"); } if ("DUPS_OK_ACKNOWLEDGE".equalsIgnoreCase(value) || "Dups-ok-acknowledge".equalsIgnoreCase(value)) @@ -436,9 +436,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public int getAcknowledgeModeInt() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("getAcknowledgeMode()"); + ActiveMQRALogger.LOGGER.trace("getAcknowledgeMode()"); } return acknowledgeMode; @@ -451,9 +451,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public String getSubscriptionDurability() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("getSubscriptionDurability()"); + ActiveMQRALogger.LOGGER.trace("getSubscriptionDurability()"); } if (subscriptionDurability) @@ -473,9 +473,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public void setSubscriptionDurability(final String value) { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setSubscriptionDurability(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("setSubscriptionDurability(" + value + ")"); } subscriptionDurability = "Durable".equals(value); @@ -488,9 +488,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public boolean isSubscriptionDurable() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("isSubscriptionDurable()"); + ActiveMQRALogger.LOGGER.trace("isSubscriptionDurable()"); } return subscriptionDurability; @@ -503,9 +503,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public String getSubscriptionName() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("getSubscriptionName()"); + ActiveMQRALogger.LOGGER.trace("getSubscriptionName()"); } return subscriptionName; @@ -518,9 +518,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public void setSubscriptionName(final String value) { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setSubscriptionName(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("setSubscriptionName(" + value + ")"); } subscriptionName = value; @@ -532,9 +532,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public boolean isShareSubscriptions() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("isShareSubscriptions() = " + shareSubscriptions); + ActiveMQRALogger.LOGGER.trace("isShareSubscriptions() = " + shareSubscriptions); } return shareSubscriptions; @@ -545,9 +545,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public void setShareSubscriptions(boolean shareSubscriptions) { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setShareSubscriptions(" + shareSubscriptions + ")"); + ActiveMQRALogger.LOGGER.trace("setShareSubscriptions(" + shareSubscriptions + ")"); } this.shareSubscriptions = shareSubscriptions; @@ -560,9 +560,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public String getUser() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("getUser()"); + ActiveMQRALogger.LOGGER.trace("getUser()"); } if (user == null) @@ -582,9 +582,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public void setUser(final String value) { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setUser(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("setUser(" + value + ")"); } user = value; @@ -597,9 +597,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public String getPassword() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("getPassword()"); + ActiveMQRALogger.LOGGER.trace("getPassword()"); } if (password == null) @@ -624,9 +624,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public void setPassword(final String value) throws Exception { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setPassword(****)"); + ActiveMQRALogger.LOGGER.trace("setPassword(****)"); } password = value; @@ -639,9 +639,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public Integer getMaxSession() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("getMaxSession()"); + ActiveMQRALogger.LOGGER.trace("getMaxSession()"); } if (maxSession == null) @@ -659,9 +659,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public void setMaxSession(final Integer value) { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setMaxSession(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("setMaxSession(" + value + ")"); } maxSession = value; @@ -674,9 +674,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public Integer getTransactionTimeout() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("getTransactionTimeout()"); + ActiveMQRALogger.LOGGER.trace("getTransactionTimeout()"); } return transactionTimeout; @@ -689,9 +689,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public void setTransactionTimeout(final Integer value) { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setTransactionTimeout(" + value + ")"); + ActiveMQRALogger.LOGGER.trace("setTransactionTimeout(" + value + ")"); } transactionTimeout = value; @@ -716,9 +716,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement public int getSetupAttempts() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("getSetupAttempts()"); + ActiveMQRALogger.LOGGER.trace("getSetupAttempts()"); } if (setupAttempts == null) @@ -733,9 +733,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement public void setSetupAttempts(int setupAttempts) { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setSetupAttempts(" + setupAttempts + ")"); + ActiveMQRALogger.LOGGER.trace("setSetupAttempts(" + setupAttempts + ")"); } this.setupAttempts = setupAttempts; @@ -743,9 +743,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement public long getSetupInterval() { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("getSetupInterval()"); + ActiveMQRALogger.LOGGER.trace("getSetupInterval()"); } if (setupInterval == null) @@ -760,9 +760,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement public void setSetupInterval(long setupInterval) { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setSetupInterval(" + setupInterval + ")"); + ActiveMQRALogger.LOGGER.trace("setSetupInterval(" + setupInterval + ")"); } this.setupInterval = setupInterval; @@ -775,9 +775,9 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement */ public void validate() throws InvalidPropertyException { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("validate()"); + ActiveMQRALogger.LOGGER.trace("validate()"); } List errorMessages = new ArrayList(); @@ -787,19 +787,19 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement { if (destination == null || destination.trim().equals("")) { - propsNotSet.add(new PropertyDescriptor("destination", HornetQActivationSpec.class)); + propsNotSet.add(new PropertyDescriptor("destination", ActiveMQActivationSpec.class)); errorMessages.add("Destination is mandatory."); } if (destinationType != null && !Topic.class.getName().equals(destinationType) && !Queue.class.getName().equals(destinationType)) { - propsNotSet.add(new PropertyDescriptor("destinationType", HornetQActivationSpec.class)); + propsNotSet.add(new PropertyDescriptor("destinationType", ActiveMQActivationSpec.class)); errorMessages.add("If set, the destinationType must be either 'javax.jms.Topic' or 'javax.jms.Queue'."); } if ((destinationType == null || destinationType.length() == 0 || Topic.class.getName().equals(destinationType)) && isSubscriptionDurable() && (subscriptionName == null || subscriptionName.length() == 0)) { - propsNotSet.add(new PropertyDescriptor("subscriptionName", HornetQActivationSpec.class)); + propsNotSet.add(new PropertyDescriptor("subscriptionName", ActiveMQActivationSpec.class)); errorMessages.add("If subscription is durable then subscription name must be specified."); } } @@ -831,14 +831,14 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement public void setConnectorClassName(final String connectorClassName) { - if (HornetQActivationSpec.trace) + if (ActiveMQActivationSpec.trace) { - HornetQRALogger.LOGGER.trace("setConnectorClassName(" + connectorClassName + ")"); + ActiveMQRALogger.LOGGER.trace("setConnectorClassName(" + connectorClassName + ")"); } strConnectorClassName = connectorClassName; - setParsedConnectorClassNames(HornetQRaUtils.parseConnectorConnectorConfig(connectorClassName)); + setParsedConnectorClassNames(ActiveMQRaUtils.parseConnectorConnectorConfig(connectorClassName)); } /** @@ -852,7 +852,7 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement public void setConnectionParameters(final String configuration) { strConnectionParameters = configuration; - setParsedConnectionParameters(HornetQRaUtils.parseConfig(configuration)); + setParsedConnectionParameters(ActiveMQRaUtils.parseConfig(configuration)); } /** @@ -864,7 +864,7 @@ public class HornetQActivationSpec extends ConnectionFactoryProperties implement public String toString() { StringBuffer buffer = new StringBuffer(); - buffer.append(HornetQActivationSpec.class.getName()).append('('); + buffer.append(ActiveMQActivationSpec.class.getName()).append('('); buffer.append("ra=").append(ra); if (messageSelector != null) { diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/inflow/HornetQMessageHandler.java b/activemq-ra/src/main/java/org/apache/activemq/ra/inflow/ActiveMQMessageHandler.java similarity index 79% rename from activemq-ra/src/main/java/org/apache/activemq/ra/inflow/HornetQMessageHandler.java rename to activemq-ra/src/main/java/org/apache/activemq/ra/inflow/ActiveMQMessageHandler.java index 45933fc3ad..abd68d0697 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/inflow/HornetQMessageHandler.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/inflow/ActiveMQMessageHandler.java @@ -30,11 +30,11 @@ import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.core.client.impl.ClientConsumerInternal; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.client.impl.ClientSessionInternal; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQMessage; -import org.apache.activemq.ra.HornetQRALogger; -import org.apache.activemq.ra.HornetQResourceAdapter; -import org.apache.activemq.ra.HornetQXAResourceWrapper; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQMessage; +import org.apache.activemq.ra.ActiveMQRALogger; +import org.apache.activemq.ra.ActiveMQResourceAdapter; +import org.apache.activemq.ra.ActiveMQXAResourceWrapper; import org.apache.activemq.utils.FutureLatch; /** @@ -45,12 +45,12 @@ import org.apache.activemq.utils.FutureLatch; * @author Andy Taylor * @author Martyn Taylor */ -public class HornetQMessageHandler implements MessageHandler +public class ActiveMQMessageHandler implements MessageHandler { /** * Trace enabled */ - private static boolean trace = HornetQRALogger.LOGGER.isTraceEnabled(); + private static boolean trace = ActiveMQRALogger.LOGGER.isTraceEnabled(); /** * The session */ @@ -63,7 +63,7 @@ public class HornetQMessageHandler implements MessageHandler */ private MessageEndpoint endpoint; - private final HornetQActivation activation; + private final ActiveMQActivation activation; private boolean useLocalTx; @@ -77,11 +77,11 @@ public class HornetQMessageHandler implements MessageHandler private ClientSessionFactory cf; - public HornetQMessageHandler(final HornetQActivation activation, - final TransactionManager tm, - final ClientSessionInternal session, - final ClientSessionFactory cf, - final int sessionNr) + public ActiveMQMessageHandler(final ActiveMQActivation activation, + final TransactionManager tm, + final ClientSessionInternal session, + final ClientSessionFactory cf, + final int sessionNr) { this.activation = activation; this.session = session; @@ -92,21 +92,21 @@ public class HornetQMessageHandler implements MessageHandler public void setup() throws Exception { - if (HornetQMessageHandler.trace) + if (ActiveMQMessageHandler.trace) { - HornetQRALogger.LOGGER.trace("setup()"); + ActiveMQRALogger.LOGGER.trace("setup()"); } - HornetQActivationSpec spec = activation.getActivationSpec(); + ActiveMQActivationSpec spec = activation.getActivationSpec(); String selector = spec.getMessageSelector(); // Create the message consumer SimpleString selectorString = selector == null || selector.trim().equals("") ? null : new SimpleString(selector); if (activation.isTopic() && spec.isSubscriptionDurable()) { - SimpleString queueName = new SimpleString(HornetQDestination.createQueueNameForDurableSubscription(true, - spec.getClientID(), - spec.getSubscriptionName())); + SimpleString queueName = new SimpleString(ActiveMQDestination.createQueueNameForDurableSubscription(true, + spec.getClientID(), + spec.getSubscriptionName())); QueueQuery subResponse = session.queueQuery(queueName); @@ -124,9 +124,9 @@ public class HornetQMessageHandler implements MessageHandler { throw new javax.jms.IllegalStateException("Cannot create a subscriber on the durable subscription since it already has subscriber(s)"); } - else if (HornetQRALogger.LOGGER.isDebugEnabled()) + else if (ActiveMQRALogger.LOGGER.isDebugEnabled()) { - HornetQRALogger.LOGGER.debug("the mdb on destination " + queueName + " already had " + + ActiveMQRALogger.LOGGER.debug("the mdb on destination " + queueName + " already had " + subResponse.getConsumerCount() + " consumers but the MDB is configured to share subscriptions, so no exceptions are thrown"); } @@ -191,8 +191,8 @@ public class HornetQMessageHandler implements MessageHandler transacted = activation.isDeliveryTransacted(); if (activation.isDeliveryTransacted() && !activation.getActivationSpec().isUseLocalTx()) { - XAResource xaResource = new HornetQXAResourceWrapper(session, - ((HornetQResourceAdapter) spec.getResourceAdapter()).getJndiName(), + XAResource xaResource = new ActiveMQXAResourceWrapper(session, + ((ActiveMQResourceAdapter) spec.getResourceAdapter()).getJndiName(), ((ClientSessionFactoryInternal) cf).getLiveNodeId()); endpoint = endpointFactory.createEndpoint(xaResource); useXA = true; @@ -221,7 +221,7 @@ public class HornetQMessageHandler implements MessageHandler } catch (Throwable e) { - HornetQRALogger.LOGGER.warn("Error interrupting handler on endpoint " + endpoint + " handler=" + consumer); + ActiveMQRALogger.LOGGER.warn("Error interrupting handler on endpoint " + endpoint + " handler=" + consumer); } return null; } @@ -231,9 +231,9 @@ public class HornetQMessageHandler implements MessageHandler */ public void teardown() { - if (HornetQMessageHandler.trace) + if (ActiveMQMessageHandler.trace) { - HornetQRALogger.LOGGER.trace("teardown()"); + ActiveMQRALogger.LOGGER.trace("teardown()"); } try @@ -246,7 +246,7 @@ public class HornetQMessageHandler implements MessageHandler } catch (Throwable t) { - HornetQRALogger.LOGGER.debug("Error releasing endpoint " + endpoint, t); + ActiveMQRALogger.LOGGER.debug("Error releasing endpoint " + endpoint, t); } try @@ -267,7 +267,7 @@ public class HornetQMessageHandler implements MessageHandler } catch (Throwable t) { - HornetQRALogger.LOGGER.debug("Error closing core-queue consumer", t); + ActiveMQRALogger.LOGGER.debug("Error closing core-queue consumer", t); } try @@ -279,7 +279,7 @@ public class HornetQMessageHandler implements MessageHandler } catch (Throwable t) { - HornetQRALogger.LOGGER.debug("Error releasing session " + session, t); + ActiveMQRALogger.LOGGER.debug("Error releasing session " + session, t); } try @@ -291,18 +291,18 @@ public class HornetQMessageHandler implements MessageHandler } catch (Throwable t) { - HornetQRALogger.LOGGER.debug("Error releasing session factory " + session, t); + ActiveMQRALogger.LOGGER.debug("Error releasing session factory " + session, t); } } public void onMessage(final ClientMessage message) { - if (HornetQMessageHandler.trace) + if (ActiveMQMessageHandler.trace) { - HornetQRALogger.LOGGER.trace("onMessage(" + message + ")"); + ActiveMQRALogger.LOGGER.trace("onMessage(" + message + ")"); } - HornetQMessage msg = HornetQMessage.createMessage(message, session); + ActiveMQMessage msg = ActiveMQMessage.createMessage(message, session); boolean beforeDelivery = false; try @@ -311,7 +311,7 @@ public class HornetQMessageHandler implements MessageHandler { tm.setTransactionTimeout(activation.getActivationSpec().getTransactionTimeout()); } - endpoint.beforeDelivery(HornetQActivation.ONMESSAGE); + endpoint.beforeDelivery(ActiveMQActivation.ONMESSAGE); beforeDelivery = true; msg.doBeforeReceive(); @@ -335,7 +335,7 @@ public class HornetQMessageHandler implements MessageHandler } catch (ResourceException e) { - HornetQRALogger.LOGGER.unableToCallAfterDelivery(e); + ActiveMQRALogger.LOGGER.unableToCallAfterDelivery(e); return; } if (useLocalTx) @@ -345,12 +345,12 @@ public class HornetQMessageHandler implements MessageHandler if (trace) { - HornetQRALogger.LOGGER.trace("finished onMessage on " + message); + ActiveMQRALogger.LOGGER.trace("finished onMessage on " + message); } } catch (Throwable e) { - HornetQRALogger.LOGGER.errorDeliveringMessage(e); + ActiveMQRALogger.LOGGER.errorDeliveringMessage(e); // we need to call before/afterDelivery as a pair if (beforeDelivery) { @@ -370,14 +370,14 @@ public class HornetQMessageHandler implements MessageHandler } catch (Exception e1) { - HornetQRALogger.LOGGER.warn("unnable to clear the transaction", e1); + ActiveMQRALogger.LOGGER.warn("unnable to clear the transaction", e1); try { session.rollback(); } catch (ActiveMQException e2) { - HornetQRALogger.LOGGER.warn("Unable to rollback", e2); + ActiveMQRALogger.LOGGER.warn("Unable to rollback", e2); return; } } @@ -394,7 +394,7 @@ public class HornetQMessageHandler implements MessageHandler } catch (ResourceException e1) { - HornetQRALogger.LOGGER.unableToCallAfterDelivery(e1); + ActiveMQRALogger.LOGGER.unableToCallAfterDelivery(e1); } } if (useLocalTx || !activation.isDeliveryTransacted()) @@ -405,7 +405,7 @@ public class HornetQMessageHandler implements MessageHandler } catch (ActiveMQException e1) { - HornetQRALogger.LOGGER.unableToRollbackTX(); + ActiveMQRALogger.LOGGER.unableToRollbackTX(); } } } @@ -417,7 +417,7 @@ public class HornetQMessageHandler implements MessageHandler } catch (ActiveMQException e) { - HornetQRALogger.LOGGER.unableToResetSession(); + ActiveMQRALogger.LOGGER.unableToResetSession(); } } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/recovery/RecoveryManager.java b/activemq-ra/src/main/java/org/apache/activemq/ra/recovery/RecoveryManager.java index cba59e20c3..057abe7e5d 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/recovery/RecoveryManager.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/recovery/RecoveryManager.java @@ -17,10 +17,10 @@ import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Set; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.server.recovery.HornetQRegistryBase; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.server.recovery.ActiveMQRegistryBase; import org.apache.activemq.jms.server.recovery.XARecoveryConfig; -import org.apache.activemq.ra.HornetQRALogger; +import org.apache.activemq.ra.ActiveMQRALogger; import org.apache.activemq.utils.ClassloadingUtil; import org.apache.activemq.utils.ConcurrentHashSet; @@ -30,10 +30,10 @@ import org.apache.activemq.utils.ConcurrentHashSet; */ public final class RecoveryManager { - private HornetQRegistryBase registry; + private ActiveMQRegistryBase registry; private static final String RESOURCE_RECOVERY_CLASS_NAMES = "org.jboss.as.messaging.jms.AS7RecoveryRegistry;" - + "org.jboss.as.integration.hornetq.recovery.AS5RecoveryRegistry"; + + "org.jboss.as.integration.activemq.recovery.AS5RecoveryRegistry"; private final Set resources = new ConcurrentHashSet(); @@ -49,9 +49,9 @@ public final class RecoveryManager } } - public XARecoveryConfig register(HornetQConnectionFactory factory, String userName, String password) + public XARecoveryConfig register(ActiveMQConnectionFactory factory, String userName, String password) { - HornetQRALogger.LOGGER.debug("registering recovery for factory : " + factory); + ActiveMQRALogger.LOGGER.debug("registering recovery for factory : " + factory); XARecoveryConfig config = XARecoveryConfig.newConfig(factory, userName, password); resources.add(config); @@ -94,11 +94,11 @@ public final class RecoveryManager { try { - registry = (HornetQRegistryBase) safeInitNewInstance(locatorClasse); + registry = (ActiveMQRegistryBase) safeInitNewInstance(locatorClasse); } catch (Throwable e) { - HornetQRALogger.LOGGER.debug("unable to load recovery registry " + locatorClasse, e); + ActiveMQRALogger.LOGGER.debug("unable to load recovery registry " + locatorClasse, e); } if (registry != null) { @@ -108,7 +108,7 @@ public final class RecoveryManager if (registry != null) { - HornetQRALogger.LOGGER.debug("Recovery Registry located = " + registry); + ActiveMQRALogger.LOGGER.debug("Recovery Registry located = " + registry); } } diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/Hornetq.java b/activemq-rest/src/main/java/org/apache/activemq/rest/ActiveMQ.java similarity index 98% rename from activemq-rest/src/main/java/org/apache/activemq/rest/Hornetq.java rename to activemq-rest/src/main/java/org/apache/activemq/rest/ActiveMQ.java index 4f9e79dd8f..d2ffa67320 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/Hornetq.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/ActiveMQ.java @@ -32,7 +32,7 @@ import org.jboss.resteasy.util.GenericType; * @author Bill Burke * @version $Revision: 1 $ */ -public class Hornetq +public class ActiveMQ { /** @@ -178,7 +178,7 @@ public class Hornetq } /** - * Was this HornetQ message generated from a REST call? + * Was this ActiveMQ message generated from a REST call? * * @param msg * @return diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/HornetQRestBundle.java b/activemq-rest/src/main/java/org/apache/activemq/rest/ActiveMQRestBundle.java similarity index 93% rename from activemq-rest/src/main/java/org/apache/activemq/rest/HornetQRestBundle.java rename to activemq-rest/src/main/java/org/apache/activemq/rest/ActiveMQRestBundle.java index 83bf74afaf..16d20a7b23 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/HornetQRestBundle.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/ActiveMQRestBundle.java @@ -25,7 +25,7 @@ import org.jboss.logging.annotations.MessageBundle; * * so 199000 to 199999 */ -@MessageBundle(projectCode = "HQ") -public class HornetQRestBundle +@MessageBundle(projectCode = "AMQ") +public class ActiveMQRestBundle { } diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/HornetQRestLogger.java b/activemq-rest/src/main/java/org/apache/activemq/rest/ActiveMQRestLogger.java similarity index 93% rename from activemq-rest/src/main/java/org/apache/activemq/rest/HornetQRestLogger.java rename to activemq-rest/src/main/java/org/apache/activemq/rest/ActiveMQRestLogger.java index c706deb7dd..473c8d5ad3 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/HornetQRestLogger.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/ActiveMQRestLogger.java @@ -39,13 +39,13 @@ import org.jboss.logging.annotations.MessageLogger; * * so an INFO message would be 191000 to 191999 */ -@MessageLogger(projectCode = "HQ") -public interface HornetQRestLogger extends BasicLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQRestLogger extends BasicLogger { /** * The twitter logger. */ - HornetQRestLogger LOGGER = Logger.getMessageLogger(HornetQRestLogger.class, HornetQRestLogger.class.getPackage().getName()); + ActiveMQRestLogger LOGGER = Logger.getMessageLogger(ActiveMQRestLogger.class, ActiveMQRestLogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.INFO) @Message(id = 181000, value = "Loading REST push store from: {0}", format = Message.Format.MESSAGE_FORMAT) diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/MessageServiceManager.java b/activemq-rest/src/main/java/org/apache/activemq/rest/MessageServiceManager.java index 80b4c5d16d..c06af01bf4 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/MessageServiceManager.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/MessageServiceManager.java @@ -159,7 +159,7 @@ public class MessageServiceManager ServerLocator consumerLocator = new ServerLocatorImpl(false, new TransportConfiguration(InVMConnectorFactory.class.getName(), transportConfig)); - HornetQRestLogger.LOGGER.debug("Created ServerLocator: " + consumerLocator); + ActiveMQRestLogger.LOGGER.debug("Created ServerLocator: " + consumerLocator); if (configuration.getConsumerWindowSize() != -1) { @@ -167,7 +167,7 @@ public class MessageServiceManager } ClientSessionFactory consumerSessionFactory = consumerLocator.createSessionFactory(); - HornetQRestLogger.LOGGER.debug("Created ClientSessionFactory: " + consumerSessionFactory); + ActiveMQRestLogger.LOGGER.debug("Created ClientSessionFactory: " + consumerSessionFactory); ServerLocator defaultLocator = new ServerLocatorImpl(false, new TransportConfiguration(InVMConnectorFactory.class.getName(), transportConfig)); diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/integration/HornetqBootstrapListener.java b/activemq-rest/src/main/java/org/apache/activemq/rest/integration/ActiveMQBootstrapListener.java similarity index 95% rename from activemq-rest/src/main/java/org/apache/activemq/rest/integration/HornetqBootstrapListener.java rename to activemq-rest/src/main/java/org/apache/activemq/rest/integration/ActiveMQBootstrapListener.java index f24038fe71..b9e0657a9c 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/integration/HornetqBootstrapListener.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/integration/ActiveMQBootstrapListener.java @@ -22,7 +22,7 @@ import javax.servlet.ServletContextListener; * @author Bill Burke * @version $Revision: 1 $ */ -public class HornetqBootstrapListener implements ServletContextListener +public class ActiveMQBootstrapListener implements ServletContextListener { private EmbeddedJMS jms; diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestHornetQ.java b/activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestActiveMQ.java similarity index 82% rename from activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestHornetQ.java rename to activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestActiveMQ.java index fffcc8e080..3aa8b47a8f 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestHornetQ.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestActiveMQ.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.rest.integration; -import org.apache.activemq.core.server.embedded.EmbeddedHornetQ; +import org.apache.activemq.core.server.embedded.EmbeddedActiveMQ; import org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer; import org.apache.activemq.rest.MessageServiceManager; import org.jboss.resteasy.test.TestPortProvider; @@ -21,24 +21,24 @@ import org.jboss.resteasy.test.TestPortProvider; * @author Bill Burke * @version $Revision: 1 $ */ -public class EmbeddedRestHornetQ +public class EmbeddedRestActiveMQ { protected TJWSEmbeddedJaxrsServer tjws = new TJWSEmbeddedJaxrsServer(); - protected EmbeddedHornetQ embeddedHornetQ; + protected EmbeddedActiveMQ embeddedActiveMQ; protected MessageServiceManager manager = new MessageServiceManager(); - public EmbeddedRestHornetQ() + public EmbeddedRestActiveMQ() { int port = TestPortProvider.getPort(); tjws.setPort(port); tjws.setRootResourcePath(""); tjws.setSecurityDomain(null); - initEmbeddedHornetQ(); + initEmbeddedActiveMQ(); } - protected void initEmbeddedHornetQ() + protected void initEmbeddedActiveMQ() { - embeddedHornetQ = new EmbeddedHornetQ(); + embeddedActiveMQ = new EmbeddedActiveMQ(); } public TJWSEmbeddedJaxrsServer getTjws() @@ -51,9 +51,9 @@ public class EmbeddedRestHornetQ this.tjws = tjws; } - public EmbeddedHornetQ getEmbeddedHornetQ() + public EmbeddedActiveMQ getEmbeddedActiveMQ() { - return embeddedHornetQ; + return embeddedActiveMQ; } public MessageServiceManager getManager() @@ -63,7 +63,7 @@ public class EmbeddedRestHornetQ public void start() throws Exception { - embeddedHornetQ.start(); + embeddedActiveMQ.start(); tjws.start(); manager.start(); tjws.getDeployment().getRegistry().addSingletonResource(manager.getQueueManager().getDestination()); @@ -86,7 +86,7 @@ public class EmbeddedRestHornetQ catch (Exception e) { } - embeddedHornetQ.stop(); + embeddedActiveMQ.stop(); } } diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestHornetQJMS.java b/activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestActiveMQJMS.java similarity index 78% rename from activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestHornetQJMS.java rename to activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestActiveMQJMS.java index 3284eb1a18..419af8fb96 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestHornetQJMS.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestActiveMQJMS.java @@ -19,18 +19,18 @@ import org.apache.activemq.spi.core.naming.BindingRegistry; * @author Bill Burke * @version $Revision: 1 $ */ -public class EmbeddedRestHornetQJMS extends EmbeddedRestHornetQ +public class EmbeddedRestActiveMQJMS extends EmbeddedRestActiveMQ { @Override - protected void initEmbeddedHornetQ() + protected void initEmbeddedActiveMQ() { - embeddedHornetQ = new EmbeddedJMS(); + embeddedActiveMQ = new EmbeddedJMS(); } public BindingRegistry getRegistry() { - if (embeddedHornetQ == null) return null; - return ((EmbeddedJMS)embeddedHornetQ).getRegistry(); + if (embeddedActiveMQ == null) return null; + return ((EmbeddedJMS) embeddedActiveMQ).getRegistry(); } } diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/AcknowledgedQueueConsumer.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/AcknowledgedQueueConsumer.java index c3cefd50d4..9b00af2e10 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/AcknowledgedQueueConsumer.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/AcknowledgedQueueConsumer.java @@ -30,7 +30,7 @@ import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.util.Constants; import org.apache.activemq.rest.util.LinkStrategy; @@ -61,7 +61,7 @@ public class AcknowledgedQueueConsumer extends QueueConsumer @PathParam("index") long index, @Context UriInfo info) { - HornetQRestLogger.LOGGER.debug("Handling POST request for \"" + info.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling POST request for \"" + info.getPath() + "\""); if (closed) { @@ -97,7 +97,7 @@ public class AcknowledgedQueueConsumer extends QueueConsumer @FormParam("acknowledge") boolean doAcknowledge, @Context UriInfo uriInfo) { - HornetQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); ping(0); String basePath = uriInfo.getMatchedURIs().get(1); diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/ConsumedMessage.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/ConsumedMessage.java index a9d53d5dc2..ac8b7d32a5 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/ConsumedMessage.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/ConsumedMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.rest.queue; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientMessage; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.HttpHeaderProperty; import javax.ws.rs.core.Response; @@ -51,7 +51,7 @@ public abstract class ConsumedMessage continue; } builder.header(headerName, message.getStringProperty(k)); - HornetQRestLogger.LOGGER.debug("Adding " + headerName + "=" + message.getStringProperty(k)); + ActiveMQRestLogger.LOGGER.debug("Adding " + headerName + "=" + message.getStringProperty(k)); } } diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/ConsumersResource.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/ConsumersResource.java index 9ad454667f..f3a9e6f342 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/ConsumersResource.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/ConsumersResource.java @@ -30,7 +30,7 @@ import java.util.concurrent.atomic.AtomicLong; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.util.TimeoutTask; /** @@ -96,7 +96,7 @@ public class ConsumersResource implements TimeoutTask.Callback if (consumer == null) return false; if (System.currentTimeMillis() - consumer.getLastPingTime() > consumerTimeoutSeconds * 1000) { - HornetQRestLogger.LOGGER.shutdownRestConsumer(consumer.getId()); + ActiveMQRestLogger.LOGGER.shutdownRestConsumer(consumer.getId()); if (autoShutdown) { shutdown(consumer); @@ -138,7 +138,7 @@ public class ConsumersResource implements TimeoutTask.Callback @FormParam("selector") String selector, @Context UriInfo uriInfo) { - HornetQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); try { @@ -214,7 +214,7 @@ public class ConsumersResource implements TimeoutTask.Callback @PathParam("consumer-id") String consumerId, @Context UriInfo uriInfo) throws Exception { - HornetQRestLogger.LOGGER.debug("Handling GET request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling GET request for \"" + uriInfo.getPath() + "\""); return headConsumer(attributes, consumerId, uriInfo); } @@ -225,7 +225,7 @@ public class ConsumersResource implements TimeoutTask.Callback @PathParam("consumer-id") String consumerId, @Context UriInfo uriInfo) throws Exception { - HornetQRestLogger.LOGGER.debug("Handling HEAD request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling HEAD request for \"" + uriInfo.getPath() + "\""); QueueConsumer consumer = findConsumer(attributes, consumerId, uriInfo); Response.ResponseBuilder builder = Response.noContent(); @@ -313,7 +313,7 @@ public class ConsumersResource implements TimeoutTask.Callback @PathParam("consumer-id") String consumerId, @Context UriInfo uriInfo) { - HornetQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); QueueConsumer consumer = queueConsumers.remove(consumerId); if (consumer == null) diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/DestinationServiceManager.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/DestinationServiceManager.java index da58b8032e..6f6b3fb5fa 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/DestinationServiceManager.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/DestinationServiceManager.java @@ -14,7 +14,7 @@ package org.apache.activemq.rest.queue; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; import org.apache.activemq.rest.util.LinkStrategy; @@ -160,7 +160,7 @@ public abstract class DestinationServiceManager { if (locator == null) { - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(InVMConnectorFactory.class.getName())); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(InVMConnectorFactory.class.getName())); } if (sessionFactory == null) { diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/PostMessage.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/PostMessage.java index 45e8effa5d..7894424ae0 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/PostMessage.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/PostMessage.java @@ -34,7 +34,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.util.HttpMessageHelper; import org.apache.activemq.utils.UUID; import org.apache.activemq.utils.UUIDGenerator; @@ -82,10 +82,10 @@ public class PostMessage try { ClientProducer producer = pooled.producer; - ClientMessage message = createHornetQMessage(headers, body, durable, ttl, expiration, priority, pooled.session); + ClientMessage message = createActiveMQMessage(headers, body, durable, ttl, expiration, priority, pooled.session); message.putStringProperty(ClientMessage.HDR_DUPLICATE_DETECTION_ID.toString(), dup); producer.send(message); - HornetQRestLogger.LOGGER.debug("Sent message: " + message); + ActiveMQRestLogger.LOGGER.debug("Sent message: " + message); pool.add(pooled); } catch (Exception ex) @@ -110,7 +110,7 @@ public class PostMessage @QueryParam("priority") Integer priority, @Context HttpHeaders headers, @Context UriInfo uriInfo, byte[] body) { - HornetQRestLogger.LOGGER.debug("Handling PUT request for \"" + uriInfo.getRequestUri() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling PUT request for \"" + uriInfo.getRequestUri() + "\""); return internalPostWithId(dupId, durable, ttl, expiration, priority, headers, uriInfo, body); } @@ -123,7 +123,7 @@ public class PostMessage @QueryParam("priority") Integer priority, @Context HttpHeaders headers, @Context UriInfo uriInfo, byte[] body) { - HornetQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getRequestUri() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getRequestUri() + "\""); return internalPostWithId(dupId, durable, ttl, expiration, priority, headers, uriInfo, body); } @@ -261,12 +261,12 @@ public class PostMessage } - protected ClientMessage createHornetQMessage(HttpHeaders headers, byte[] body, - boolean durable, - Long ttl, - Long expiration, - Integer priority, - ClientSession session) throws Exception + protected ClientMessage createActiveMQMessage(HttpHeaders headers, byte[] body, + boolean durable, + Long ttl, + Long expiration, + Integer priority, + ClientSession session) throws Exception { ClientMessage message = session.createMessage(Message.BYTES_TYPE, durable); diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/PostMessageDupsOk.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/PostMessageDupsOk.java index 60fa2b7905..b9b9d9a2c2 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/PostMessageDupsOk.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/PostMessageDupsOk.java @@ -15,7 +15,7 @@ package org.apache.activemq.rest.queue; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import javax.ws.rs.POST; import javax.ws.rs.QueryParam; @@ -45,9 +45,9 @@ public class PostMessageDupsOk extends PostMessage try { ClientProducer producer = pooled.producer; - ClientMessage message = createHornetQMessage(headers, body, durable, ttl, expiration, priority, pooled.session); + ClientMessage message = createActiveMQMessage(headers, body, durable, ttl, expiration, priority, pooled.session); producer.send(message); - HornetQRestLogger.LOGGER.debug("Sent message: " + message); + ActiveMQRestLogger.LOGGER.debug("Sent message: " + message); pool.add(pooled); } catch (Exception ex) @@ -73,7 +73,7 @@ public class PostMessageDupsOk extends PostMessage @Context UriInfo uriInfo, byte[] body) { - HornetQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getRequestUri() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getRequestUri() + "\""); try { diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/PostMessageNoDups.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/PostMessageNoDups.java index 609df82ea2..6f5d17d8bc 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/PostMessageNoDups.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/PostMessageNoDups.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.rest.queue; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import javax.ws.rs.POST; import javax.ws.rs.core.Context; @@ -31,7 +31,7 @@ public class PostMessageNoDups extends PostMessage @POST public Response redirectCreation(@Context UriInfo uriInfo) { - HornetQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); String id = generateDupId(); Response.ResponseBuilder res = Response.status(Response.Status.TEMPORARY_REDIRECT.getStatusCode()); diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueConsumer.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueConsumer.java index 618c57458f..7669727b13 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueConsumer.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueConsumer.java @@ -30,7 +30,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.jms.client.SelectorTranslator; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.util.Constants; import org.apache.activemq.rest.util.LinkStrategy; @@ -114,7 +114,7 @@ public class QueueConsumer try { consumer.close(); - HornetQRestLogger.LOGGER.debug("Closed consumer: " + consumer); + ActiveMQRestLogger.LOGGER.debug("Closed consumer: " + consumer); } catch (Exception e) { @@ -123,7 +123,7 @@ public class QueueConsumer try { session.close(); - HornetQRestLogger.LOGGER.debug("Closed session: " + session); + ActiveMQRestLogger.LOGGER.debug("Closed session: " + session); } catch (Exception e) { @@ -139,7 +139,7 @@ public class QueueConsumer @PathParam("index") long index, @Context UriInfo info) { - HornetQRestLogger.LOGGER.debug("Handling POST request for \"" + info.getRequestUri() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling POST request for \"" + info.getRequestUri() + "\""); if (closed) { @@ -213,16 +213,16 @@ public class QueueConsumer protected void createSession() throws ActiveMQException { session = factory.createSession(true, true, 0); - HornetQRestLogger.LOGGER.debug("Created session: " + session); + ActiveMQRestLogger.LOGGER.debug("Created session: " + session); if (selector == null) { consumer = session.createConsumer(destination); } else { - consumer = session.createConsumer(destination, SelectorTranslator.convertToHornetQFilterString(selector)); + consumer = session.createConsumer(destination, SelectorTranslator.convertToActiveMQFilterString(selector)); } - HornetQRestLogger.LOGGER.debug("Created consumer: " + consumer); + ActiveMQRestLogger.LOGGER.debug("Created consumer: " + consumer); session.start(); } @@ -238,7 +238,7 @@ public class QueueConsumer m = consumer.receive(timeoutSecs * 1000); } - HornetQRestLogger.LOGGER.debug("Returning message " + m + " from consumer: " + consumer); + ActiveMQRestLogger.LOGGER.debug("Returning message " + m + " from consumer: " + consumer); return m; } diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueDestinationsResource.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueDestinationsResource.java index 7de0945ee4..f47067e6e3 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueDestinationsResource.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueDestinationsResource.java @@ -28,11 +28,11 @@ import java.util.concurrent.ConcurrentHashMap; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQQueue; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQQueue; import org.apache.activemq.jms.server.config.JMSQueueConfiguration; import org.apache.activemq.jms.server.impl.JMSServerConfigParserImpl; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.queue.push.PushConsumerResource; import org.apache.activemq.rest.queue.push.xml.PushRegistration; import org.apache.activemq.rest.util.Constants; @@ -54,17 +54,17 @@ public class QueueDestinationsResource } @POST - @Consumes("application/hornetq.jms.queue+xml") + @Consumes("application/activemq.jms.queue+xml") public Response createJmsQueue(@Context UriInfo uriInfo, Document document) { - HornetQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); try { JMSServerConfigParserImpl parser = new JMSServerConfigParserImpl(); JMSQueueConfiguration queue = parser.parseQueueConfiguration(document.getDocumentElement()); - HornetQQueue hqQueue = HornetQDestination.createQueue(queue.getName()); - String queueName = hqQueue.getAddress(); + ActiveMQQueue activeMQQueue = ActiveMQDestination.createQueue(queue.getName()); + String queueName = activeMQQueue.getAddress(); ClientSession session = manager.getSessionFactory().createSession(false, false, false); try { @@ -101,7 +101,7 @@ public class QueueDestinationsResource { for (String binding : queue.getBindings()) { - manager.getRegistry().bind(binding, hqQueue); + manager.getRegistry().bind(binding, activeMQQueue); } } URI uri = uriInfo.getRequestUriBuilder().path(queueName).build(); diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueResource.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueResource.java index c46ebaa2a2..1ad264da38 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueResource.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueResource.java @@ -25,7 +25,7 @@ import javax.ws.rs.core.UriInfo; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.queue.push.PushConsumerResource; /** @@ -53,7 +53,7 @@ public class QueueResource extends DestinationResource @Produces("application/xml") public Response get(@Context UriInfo uriInfo, @Context HttpServletRequest requestContext) { - HornetQRestLogger.LOGGER.debug("Handling GET request for \"" + destination + "\" from " + requestContext.getRemoteAddr() + ":" + requestContext.getRemotePort()); + ActiveMQRestLogger.LOGGER.debug("Handling GET request for \"" + destination + "\" from " + requestContext.getRemoteAddr() + ":" + requestContext.getRemotePort()); StringBuilder msg = new StringBuilder(); msg.append("") @@ -77,7 +77,7 @@ public class QueueResource extends DestinationResource @Produces("application/xml") public Response head(@Context UriInfo uriInfo) { - HornetQRestLogger.LOGGER.debug("Handling HEAD request for \"" + uriInfo.getRequestUri() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling HEAD request for \"" + uriInfo.getRequestUri() + "\""); Response.ResponseBuilder builder = Response.ok(); setSenderLink(builder, uriInfo); @@ -183,7 +183,7 @@ public class QueueResource extends DestinationResource @DELETE public void deleteQueue(@Context UriInfo uriInfo) throws Exception { - HornetQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); queueDestinationsResource.getQueues().remove(destination); stop(); diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/HornetQPushStrategy.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/ActiveMQPushStrategy.java similarity index 91% rename from activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/HornetQPushStrategy.java rename to activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/ActiveMQPushStrategy.java index f93a499b82..adccf874c9 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/HornetQPushStrategy.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/ActiveMQPushStrategy.java @@ -20,12 +20,12 @@ import org.jboss.resteasy.specimpl.ResteasyUriBuilder; import org.jboss.resteasy.spi.Link; /** - * Forwarding to a HornetQ/REST-* endpoing + * Forwarding to a ActiveMQ/REST-* endpoing * * @author Bill Burke * @version $Revision: 1 $ */ -public class HornetQPushStrategy extends UriTemplateStrategy +public class ActiveMQPushStrategy extends UriTemplateStrategy { protected boolean initialized = false; @@ -47,7 +47,7 @@ public class HornetQPushStrategy extends UriTemplateStrategy ClientResponse res = request.head(); if (res.getStatus() != 200) { - throw new RuntimeException("Failed to query HornetQ REST destination for init information. Status: " + res.getStatus()); + throw new RuntimeException("Failed to query ActiveMQ REST destination for init information. Status: " + res.getStatus()); } String url = (String)res.getHeaders().getFirst("msg-create-with-id"); if (url == null) diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/FilePushStore.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/FilePushStore.java index 707ef196fd..d230e2bbad 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/FilePushStore.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/FilePushStore.java @@ -21,7 +21,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.queue.push.xml.PushRegistration; import org.apache.activemq.rest.topic.PushTopicRegistration; @@ -41,7 +41,7 @@ public class FilePushStore implements PushStore this.ctx = JAXBContext.newInstance(PushRegistration.class, PushTopicRegistration.class); if (this.dir.exists()) { - HornetQRestLogger.LOGGER.loadingRestStore(dir.getAbsolutePath()); + ActiveMQRestLogger.LOGGER.loadingRestStore(dir.getAbsolutePath()); for (File file : this.dir.listFiles()) { if (!file.isFile()) continue; @@ -50,12 +50,12 @@ public class FilePushStore implements PushStore { reg = (PushRegistration)ctx.createUnmarshaller().unmarshal(file); reg.setLoadedFrom(file); - HornetQRestLogger.LOGGER.addingPushRegistration(reg.getId()); + ActiveMQRestLogger.LOGGER.addingPushRegistration(reg.getId()); map.put(reg.getId(), reg); } catch (Exception e) { - HornetQRestLogger.LOGGER.errorLoadingStore(e, file.getName()); + ActiveMQRestLogger.LOGGER.errorLoadingStore(e, file.getName()); } } } diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushConsumer.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushConsumer.java index b8671a4390..432e737345 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushConsumer.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushConsumer.java @@ -17,7 +17,7 @@ import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.jms.client.SelectorTranslator; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.queue.push.xml.PushRegistration; import java.util.ArrayList; @@ -73,7 +73,7 @@ public class PushConsumer { if (registration.getTarget().getRelationship().equals("destination")) { - strategy = new HornetQPushStrategy(); + strategy = new ActiveMQPushStrategy(); } else if (registration.getTarget().getRelationship().equals("template")) { @@ -98,7 +98,7 @@ public class PushConsumer if (registration.getSelector() != null) { - consumer = session.createConsumer(destination, SelectorTranslator.convertToHornetQFilterString(registration.getSelector())); + consumer = session.createConsumer(destination, SelectorTranslator.convertToActiveMQFilterString(registration.getSelector())); } else { @@ -106,7 +106,7 @@ public class PushConsumer } consumer.setMessageHandler(new PushConsumerMessageHandler(this, session)); session.start(); - HornetQRestLogger.LOGGER.startingPushConsumer(registration.getTarget()); + ActiveMQRestLogger.LOGGER.startingPushConsumer(registration.getTarget()); consumers.add(consumer); sessions.add(session); @@ -154,7 +154,7 @@ public class PushConsumer } catch (Exception e) { - HornetQRestLogger.LOGGER.errorUpdatingStore(e); + ActiveMQRestLogger.LOGGER.errorUpdatingStore(e); } stop(); } diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushConsumerMessageHandler.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushConsumerMessageHandler.java index 04961ec3ed..421e554151 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushConsumerMessageHandler.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushConsumerMessageHandler.java @@ -16,7 +16,7 @@ import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.MessageHandler; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; public class PushConsumerMessageHandler implements MessageHandler { @@ -32,26 +32,26 @@ public class PushConsumerMessageHandler implements MessageHandler @Override public void onMessage(ClientMessage clientMessage) { - HornetQRestLogger.LOGGER.debug(this + ": receiving " + clientMessage); + ActiveMQRestLogger.LOGGER.debug(this + ": receiving " + clientMessage); try { clientMessage.acknowledge(); - HornetQRestLogger.LOGGER.debug(this + ": acknowledged " + clientMessage); + ActiveMQRestLogger.LOGGER.debug(this + ": acknowledged " + clientMessage); } catch (ActiveMQException e) { throw new RuntimeException(e.getMessage(), e); } - HornetQRestLogger.LOGGER.debug(this + ": pushing " + clientMessage + " via " + pushConsumer.getStrategy()); + ActiveMQRestLogger.LOGGER.debug(this + ": pushing " + clientMessage + " via " + pushConsumer.getStrategy()); boolean acknowledge = pushConsumer.getStrategy().push(clientMessage); if (acknowledge) { try { - HornetQRestLogger.LOGGER.debug("Acknowledging: " + clientMessage.getMessageID()); + ActiveMQRestLogger.LOGGER.debug("Acknowledging: " + clientMessage.getMessageID()); session.commit(); return; } @@ -72,7 +72,7 @@ public class PushConsumerMessageHandler implements MessageHandler } if (pushConsumer.getRegistration().isDisableOnFailure()) { - HornetQRestLogger.LOGGER.errorPushingMessage(pushConsumer.getRegistration().getTarget()); + ActiveMQRestLogger.LOGGER.errorPushingMessage(pushConsumer.getRegistration().getTarget()); pushConsumer.disableFromFailure(); return; } diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushConsumerResource.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushConsumerResource.java index aa13dd16d9..6669a53e99 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushConsumerResource.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushConsumerResource.java @@ -29,7 +29,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.queue.push.xml.PushRegistration; /** @@ -80,7 +80,7 @@ public class PushConsumerResource @Consumes("application/xml") public Response create(@Context UriInfo uriInfo, PushRegistration registration) { - HornetQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); // todo put some logic here to check for duplicates String genId = sessionCounter.getAndIncrement() + "-" + startup; @@ -112,7 +112,7 @@ public class PushConsumerResource @Produces("application/xml") public PushRegistration getConsumer(@Context UriInfo uriInfo, @PathParam("consumer-id") String consumerId) { - HornetQRestLogger.LOGGER.debug("Handling GET request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling GET request for \"" + uriInfo.getPath() + "\""); PushConsumer consumer = consumers.get(consumerId); if (consumer == null) @@ -126,7 +126,7 @@ public class PushConsumerResource @Path("{consumer-id}") public void deleteConsumer(@Context UriInfo uriInfo, @PathParam("consumer-id") String consumerId) { - HornetQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); PushConsumer consumer = consumers.remove(consumerId); if (consumer == null) diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushStrategy.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushStrategy.java index 1437655e25..e58a4f6b0d 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushStrategy.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/PushStrategy.java @@ -24,7 +24,7 @@ public interface PushStrategy /** * Return false if unable to connect. Push consumer may be disabled if configured to do so when * unable to connect. Throw an exception if the message sent was unaccepted by the receiver. - * Hornetq's retry and dead letter logic will take over from there. + * ActiveMQ's retry and dead letter logic will take over from there. * * @param message * @return {@code false} if unable to connect diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/UriStrategy.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/UriStrategy.java index 3137c192a9..82fe8e1624 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/UriStrategy.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/push/UriStrategy.java @@ -34,7 +34,7 @@ import org.apache.http.protocol.BasicHttpContext; import org.apache.http.protocol.ExecutionContext; import org.apache.http.protocol.HttpContext; import org.apache.activemq.api.core.client.ClientMessage; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.queue.push.xml.BasicAuth; import org.apache.activemq.rest.queue.push.xml.PushRegistration; import org.apache.activemq.rest.queue.push.xml.XmlHttpHeader; @@ -110,7 +110,7 @@ public class UriStrategy implements PushStrategy public boolean push(ClientMessage message) { - HornetQRestLogger.LOGGER.debug("Pushing " + message); + ActiveMQRestLogger.LOGGER.debug("Pushing " + message); String uri = createUri(message); for (int i = 0; i < registration.getMaxRetries(); i++) { @@ -118,21 +118,21 @@ public class UriStrategy implements PushStrategy System.out.println("Creating request from " + uri); ClientRequest request = executor.createRequest(uri); request.followRedirects(false); - HornetQRestLogger.LOGGER.debug("Created request " + request); + ActiveMQRestLogger.LOGGER.debug("Created request " + request); for (XmlHttpHeader header : registration.getHeaders()) { - HornetQRestLogger.LOGGER.debug("Setting XmlHttpHeader: " + header.getName() + "=" + header.getValue()); + ActiveMQRestLogger.LOGGER.debug("Setting XmlHttpHeader: " + header.getName() + "=" + header.getValue()); request.header(header.getName(), header.getValue()); } HttpMessageHelper.buildMessage(message, request, contentType); ClientResponse res = null; try { - HornetQRestLogger.LOGGER.debug(method + " " + uri); + ActiveMQRestLogger.LOGGER.debug(method + " " + uri); res = request.httpMethod(method); int status = res.getStatus(); - HornetQRestLogger.LOGGER.debug("Status of push: " + status); + ActiveMQRestLogger.LOGGER.debug("Status of push: " + status); if (status == 503) { String retryAfter = res.getStringHeaders().getFirst("Retry-After"); @@ -148,7 +148,7 @@ public class UriStrategy implements PushStrategy } else if ((status >= 200 && status < 299) || status == 303 || status == 304) { - HornetQRestLogger.LOGGER.debug("Success"); + ActiveMQRestLogger.LOGGER.debug("Success"); return true; } else if (status >= 400) @@ -184,7 +184,7 @@ public class UriStrategy implements PushStrategy } catch (Exception e) { - HornetQRestLogger.LOGGER.debug("failed to push message to " + uri, e); + ActiveMQRestLogger.LOGGER.debug("failed to push message to " + uri, e); e.printStackTrace(); return false; } diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/PushSubscription.java b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/PushSubscription.java index 82c17e2ff8..cf4d672eef 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/PushSubscription.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/PushSubscription.java @@ -15,7 +15,7 @@ package org.apache.activemq.rest.topic; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.queue.push.PushConsumer; import org.apache.activemq.rest.queue.push.PushStore; import org.apache.activemq.rest.queue.push.xml.PushRegistration; @@ -50,7 +50,7 @@ public class PushSubscription extends PushConsumer } catch (ActiveMQException e) { - HornetQRestLogger.LOGGER.errorDeletingSubscriberQueue(e); + ActiveMQRestLogger.LOGGER.errorDeletingSubscriberQueue(e); } finally { diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/PushSubscriptionsResource.java b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/PushSubscriptionsResource.java index d97e010c56..a376100196 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/PushSubscriptionsResource.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/PushSubscriptionsResource.java @@ -16,7 +16,7 @@ import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.queue.push.PushConsumer; import javax.ws.rs.DELETE; @@ -141,7 +141,7 @@ public class PushSubscriptionsResource @POST public Response create(@Context UriInfo uriInfo, PushTopicRegistration registration) { - HornetQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); //System.out.println("PushRegistration: " + registration); // todo put some logic here to check for duplicates @@ -186,7 +186,7 @@ public class PushSubscriptionsResource @Produces("application/xml") public PushTopicRegistration getConsumer(@Context UriInfo uriInfo, @PathParam("consumer-id") String consumerId) { - HornetQRestLogger.LOGGER.debug("Handling GET request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling GET request for \"" + uriInfo.getPath() + "\""); PushConsumer consumer = consumers.get(consumerId); if (consumer == null) @@ -200,7 +200,7 @@ public class PushSubscriptionsResource @Path("{consumer-id}") public void deleteConsumer(@Context UriInfo uriInfo, @PathParam("consumer-id") String consumerId) { - HornetQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); PushConsumer consumer = consumers.remove(consumerId); if (consumer == null) diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/SubscriptionsResource.java b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/SubscriptionsResource.java index a501e294de..53a2eeeddc 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/SubscriptionsResource.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/SubscriptionsResource.java @@ -32,7 +32,7 @@ import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.queue.AcknowledgedQueueConsumer; import org.apache.activemq.rest.queue.Acknowledgement; import org.apache.activemq.rest.queue.DestinationServiceManager; @@ -100,7 +100,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback if (consumer == null) return false; if (System.currentTimeMillis() - consumer.getLastPingTime() > subscription.getTimeout()) { - HornetQRestLogger.LOGGER.shutdownRestSubscription(consumer.getId()); + ActiveMQRestLogger.LOGGER.shutdownRestSubscription(consumer.getId()); if (autoShutdown) { shutdown(consumer); @@ -160,7 +160,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback @FormParam("idle-timeout") Long timeout, @Context UriInfo uriInfo) { - HornetQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); if (timeout == null) timeout = Long.valueOf(consumerTimeoutSeconds * 1000); @@ -289,7 +289,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback public Response getAutoAckSubscription(@PathParam("consumer-id") String consumerId, @Context UriInfo uriInfo) throws Exception { - HornetQRestLogger.LOGGER.debug("Handling GET request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling GET request for \"" + uriInfo.getPath() + "\""); return internalHeadAutoAckSubscription(uriInfo, consumerId); } @@ -299,7 +299,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback public Response headAutoAckSubscription(@PathParam("consumer-id") String consumerId, @Context UriInfo uriInfo) throws Exception { - HornetQRestLogger.LOGGER.debug("Handling HEAD request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling HEAD request for \"" + uriInfo.getPath() + "\""); return internalHeadAutoAckSubscription(uriInfo, consumerId); } @@ -340,7 +340,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback public Response getAcknowledgedConsumer(@PathParam("consumer-id") String consumerId, @Context UriInfo uriInfo) throws Exception { - HornetQRestLogger.LOGGER.debug("Handling GET request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling GET request for \"" + uriInfo.getPath() + "\""); return internalHeadAcknowledgedConsumer(uriInfo, consumerId); } @@ -350,7 +350,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback public Response headAcknowledgedConsumer(@PathParam("consumer-id") String consumerId, @Context UriInfo uriInfo) throws Exception { - HornetQRestLogger.LOGGER.debug("Handling HEAD request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling HEAD request for \"" + uriInfo.getPath() + "\""); return internalHeadAcknowledgedConsumer(uriInfo, consumerId); } @@ -461,7 +461,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback @DELETE public void deleteAckSubscription(@Context UriInfo uriInfo, @PathParam("subscription-id") String consumerId) { - HornetQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); internalDeleteSubscription(consumerId); } @@ -470,7 +470,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback @DELETE public void deleteSubscription(@Context UriInfo uriInfo, @PathParam("subscription-id") String consumerId) { - HornetQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); internalDeleteSubscription(consumerId); } diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/TopicDestinationsResource.java b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/TopicDestinationsResource.java index 8a0168a2db..80499fd15b 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/TopicDestinationsResource.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/TopicDestinationsResource.java @@ -28,11 +28,11 @@ import java.util.concurrent.ConcurrentHashMap; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQTopic; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQTopic; import org.apache.activemq.jms.server.config.TopicConfiguration; import org.apache.activemq.jms.server.impl.JMSServerConfigParserImpl; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.queue.DestinationSettings; import org.apache.activemq.rest.queue.PostMessage; import org.apache.activemq.rest.queue.PostMessageDupsOk; @@ -55,17 +55,17 @@ public class TopicDestinationsResource } @POST - @Consumes("application/hornetq.jms.topic+xml") + @Consumes("application/activemq.jms.topic+xml") public Response createJmsQueue(@Context UriInfo uriInfo, Document document) { - HornetQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling POST request for \"" + uriInfo.getPath() + "\""); try { JMSServerConfigParserImpl parser = new JMSServerConfigParserImpl(); TopicConfiguration topic = parser.parseTopicConfiguration(document.getDocumentElement()); - HornetQTopic hqTopic = HornetQDestination.createTopic(topic.getName()); - String topicName = hqTopic.getAddress(); + ActiveMQTopic activeMQTopic = ActiveMQDestination.createTopic(topic.getName()); + String topicName = activeMQTopic.getAddress(); ClientSession session = manager.getSessionFactory().createSession(false, false, false); try { @@ -95,7 +95,7 @@ public class TopicDestinationsResource { for (String binding : topic.getBindings()) { - manager.getRegistry().bind(binding, hqTopic); + manager.getRegistry().bind(binding, activeMQTopic); } } URI uri = uriInfo.getRequestUriBuilder().path(topicName).build(); diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/TopicResource.java b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/TopicResource.java index 61c2481c60..c5ef33f514 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/TopicResource.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/TopicResource.java @@ -24,7 +24,7 @@ import javax.ws.rs.core.UriInfo; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.queue.DestinationResource; import org.apache.activemq.rest.queue.PostMessage; @@ -53,7 +53,7 @@ public class TopicResource extends DestinationResource @Produces("application/xml") public Response get(@Context UriInfo uriInfo) { - HornetQRestLogger.LOGGER.debug("Handling GET request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling GET request for \"" + uriInfo.getPath() + "\""); StringBuilder msg = new StringBuilder(); msg.append("") @@ -77,7 +77,7 @@ public class TopicResource extends DestinationResource @Produces("application/xml") public Response head(@Context UriInfo uriInfo) { - HornetQRestLogger.LOGGER.debug("Handling HEAD request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling HEAD request for \"" + uriInfo.getPath() + "\""); Response.ResponseBuilder builder = Response.ok(); setSenderLink(builder, uriInfo); @@ -176,7 +176,7 @@ public class TopicResource extends DestinationResource @DELETE public void deleteTopic(@Context UriInfo uriInfo) throws Exception { - HornetQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); + ActiveMQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); topicDestinationsResource.getTopics().remove(destination); diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/util/HttpMessageHelper.java b/activemq-rest/src/main/java/org/apache/activemq/rest/util/HttpMessageHelper.java index 920df2358f..0d12f3c380 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/util/HttpMessageHelper.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/util/HttpMessageHelper.java @@ -14,7 +14,7 @@ package org.apache.activemq.rest.util; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientMessage; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; import org.apache.activemq.rest.HttpHeaderProperty; import org.jboss.resteasy.client.ClientRequest; @@ -93,12 +93,12 @@ public class HttpMessageHelper String value = message.getStringProperty(k); request.header(headerName, value); - HornetQRestLogger.LOGGER.debug("Examining " + headerName + ": " + value); + ActiveMQRestLogger.LOGGER.debug("Examining " + headerName + ": " + value); // override default content type if it is set as a message property if (headerName.equalsIgnoreCase("content-type")) { contentType = value; - HornetQRestLogger.LOGGER.debug("Using contentType: " + contentType); + ActiveMQRestLogger.LOGGER.debug("Using contentType: " + contentType); } } int size = message.getBodySize(); @@ -109,12 +109,12 @@ public class HttpMessageHelper { byte[] body = new byte[size]; message.getBodyBuffer().readBytes(body); - HornetQRestLogger.LOGGER.debug("Building Message from HTTP message"); + ActiveMQRestLogger.LOGGER.debug("Building Message from HTTP message"); request.body(contentType, body); } else { - // assume posted as a JMS or HornetQ object message + // assume posted as a JMS or ActiveMQ object message size = message.getBodyBuffer().readInt(); byte[] body = new byte[size]; message.getBodyBuffer().readBytes(body); @@ -124,7 +124,7 @@ public class HttpMessageHelper { ObjectInputStream ois = new ObjectInputStream(bais); obj = ois.readObject(); - HornetQRestLogger.LOGGER.debug("**** Building Message from object: " + obj.toString()); + ActiveMQRestLogger.LOGGER.debug("**** Building Message from object: " + obj.toString()); request.body(contentType, obj); } catch (Exception e) diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/util/TimeoutTask.java b/activemq-rest/src/main/java/org/apache/activemq/rest/util/TimeoutTask.java index d371aa269d..363a9cff44 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/util/TimeoutTask.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/util/TimeoutTask.java @@ -19,7 +19,7 @@ import java.util.Map; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import org.apache.activemq.rest.HornetQRestLogger; +import org.apache.activemq.rest.ActiveMQRestLogger; /** * @author Bill Burke @@ -153,7 +153,7 @@ public class TimeoutTask implements Runnable liveConsumers += 1; } } - HornetQRestLogger.LOGGER.debug("Finished testing callbacks for timeouts in " + + ActiveMQRestLogger.LOGGER.debug("Finished testing callbacks for timeouts in " + (System.currentTimeMillis() - startTime) + "ms. " + "(Live: " + liveConsumers + ", Expired: " + deadConsumers + ")"); @@ -163,7 +163,7 @@ public class TimeoutTask implements Runnable { if (pendingCallbacks.size() > 0) { - HornetQRestLogger.LOGGER.debug("Found " + pendingCallbacks.size() + " callbacks to add."); + ActiveMQRestLogger.LOGGER.debug("Found " + pendingCallbacks.size() + " callbacks to add."); callbacks.putAll(pendingCallbacks); pendingCallbacks.clear(); } diff --git a/activemq-rest/src/test/java/org/apache/activemq/rest/test/CreateDestinationTest.java b/activemq-rest/src/test/java/org/apache/activemq/rest/test/CreateDestinationTest.java index d0d0e60300..5692f9c5af 100644 --- a/activemq-rest/src/test/java/org/apache/activemq/rest/test/CreateDestinationTest.java +++ b/activemq-rest/src/test/java/org/apache/activemq/rest/test/CreateDestinationTest.java @@ -38,7 +38,7 @@ public class CreateDestinationTest extends MessageTestBase { String queueConfig = "true"; ClientRequest create = new ClientRequest(TestPortProvider.generateURL("/queues")); - ClientResponse cRes = create.body("application/hornetq.jms.queue+xml", queueConfig).post(); + ClientResponse cRes = create.body("application/activemq.jms.queue+xml", queueConfig).post(); cRes.releaseConnection(); Assert.assertEquals(201, cRes.getStatus()); System.out.println("Location: " + cRes.getLocationLink()); @@ -93,7 +93,7 @@ public class CreateDestinationTest extends MessageTestBase { String queueConfig = ""; ClientRequest create = new ClientRequest(TestPortProvider.generateURL("/topics")); - ClientResponse cRes = create.body("application/hornetq.jms.topic+xml", queueConfig).post(); + ClientResponse cRes = create.body("application/activemq.jms.topic+xml", queueConfig).post(); cRes.releaseConnection(); Assert.assertEquals(201, cRes.getStatus()); diff --git a/activemq-rest/src/test/java/org/apache/activemq/rest/test/Embedded.java b/activemq-rest/src/test/java/org/apache/activemq/rest/test/Embedded.java index e31c090d2f..f3fdcb46ab 100644 --- a/activemq-rest/src/test/java/org/apache/activemq/rest/test/Embedded.java +++ b/activemq-rest/src/test/java/org/apache/activemq/rest/test/Embedded.java @@ -16,8 +16,8 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer; import org.apache.activemq.rest.MessageServiceConfiguration; import org.apache.activemq.rest.MessageServiceManager; @@ -31,7 +31,7 @@ public class Embedded { protected MessageServiceManager manager = new MessageServiceManager(); protected MessageServiceConfiguration config = new MessageServiceConfiguration(); - protected HornetQServer hornetqServer; + protected ActiveMQServer activeMQServer; protected TJWSEmbeddedJaxrsServer tjws = new TJWSEmbeddedJaxrsServer(); public Embedded() @@ -53,14 +53,14 @@ public class Embedded this.config = config; } - public HornetQServer getHornetqServer() + public ActiveMQServer getActiveMQServer() { - return hornetqServer; + return activeMQServer; } - public void setHornetqServer(HornetQServer hornetqServer) + public void setActiveMQServer(ActiveMQServer activeMQServer) { - this.hornetqServer = hornetqServer; + this.activeMQServer = activeMQServer; } public TJWSEmbeddedJaxrsServer getJaxrsServer() @@ -76,15 +76,15 @@ public class Embedded public void start() throws Exception { System.out.println("\nStarting Embedded"); - if (hornetqServer == null) + if (activeMQServer == null) { Configuration configuration = new ConfigurationImpl() .setPersistenceEnabled(false) .setSecurityEnabled(false) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - hornetqServer = HornetQServers.newHornetQServer(configuration); - hornetqServer.start(); + activeMQServer = ActiveMQServers.newActiveMQServer(configuration); + activeMQServer.start(); } tjws.start(); manager.setConfiguration(config); @@ -99,6 +99,6 @@ public class Embedded System.out.println("\nStopping Embedded"); manager.stop(); tjws.stop(); - hornetqServer.stop(); + activeMQServer.stop(); } } diff --git a/activemq-rest/src/test/java/org/apache/activemq/rest/test/EmbeddedTest.java b/activemq-rest/src/test/java/org/apache/activemq/rest/test/EmbeddedTest.java index b2421f7167..5b210f363d 100644 --- a/activemq-rest/src/test/java/org/apache/activemq/rest/test/EmbeddedTest.java +++ b/activemq-rest/src/test/java/org/apache/activemq/rest/test/EmbeddedTest.java @@ -21,7 +21,7 @@ import javax.jms.Session; import java.io.Serializable; import org.apache.activemq.rest.HttpHeaderProperty; -import org.apache.activemq.rest.integration.EmbeddedRestHornetQJMS; +import org.apache.activemq.rest.integration.EmbeddedRestActiveMQJMS; import org.apache.activemq.spi.core.naming.BindingRegistry; import org.jboss.resteasy.client.ClientRequest; import org.jboss.resteasy.client.ClientResponse; @@ -37,13 +37,13 @@ import org.junit.Test; */ public class EmbeddedTest { - public static EmbeddedRestHornetQJMS server; + public static EmbeddedRestActiveMQJMS server; @BeforeClass public static void startEmbedded() throws Exception { - server = new EmbeddedRestHornetQJMS(); - server.getManager().setConfigResourcePath("hornetq-rest.xml"); + server = new EmbeddedRestActiveMQJMS(); + server.getManager().setConfigResourcePath("activemq-rest.xml"); server.start(); } diff --git a/activemq-rest/src/test/java/org/apache/activemq/rest/test/FindDestinationTest.java b/activemq-rest/src/test/java/org/apache/activemq/rest/test/FindDestinationTest.java index d4b300bf45..7582daf1c0 100644 --- a/activemq-rest/src/test/java/org/apache/activemq/rest/test/FindDestinationTest.java +++ b/activemq-rest/src/test/java/org/apache/activemq/rest/test/FindDestinationTest.java @@ -29,7 +29,7 @@ public class FindDestinationTest extends MessageTestBase public void testFindQueue() throws Exception { String testName = "testFindQueue"; - server.getHornetqServer().createQueue(new SimpleString(testName), new SimpleString(testName), null, false, false); + server.getActiveMQServer().createQueue(new SimpleString(testName), new SimpleString(testName), null, false, false); ClientRequest request = new ClientRequest(TestPortProvider.generateURL("/queues/" + testName)); @@ -60,7 +60,7 @@ public class FindDestinationTest extends MessageTestBase @Test public void testFindTopic() throws Exception { - server.getHornetqServer().createQueue(new SimpleString("testTopic"), new SimpleString("testTopic"), null, false, false); + server.getActiveMQServer().createQueue(new SimpleString("testTopic"), new SimpleString("testTopic"), null, false, false); ClientRequest request = new ClientRequest(TestPortProvider.generateURL("/topics/testTopic")); ClientResponse response = request.head(); diff --git a/activemq-rest/src/test/java/org/apache/activemq/rest/test/JMSTest.java b/activemq-rest/src/test/java/org/apache/activemq/rest/test/JMSTest.java index 972078de31..635365b7f6 100644 --- a/activemq-rest/src/test/java/org/apache/activemq/rest/test/JMSTest.java +++ b/activemq-rest/src/test/java/org/apache/activemq/rest/test/JMSTest.java @@ -26,8 +26,8 @@ import java.io.Serializable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQJMSConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory; import org.apache.activemq.rest.HttpHeaderProperty; import org.apache.activemq.rest.Jms; import org.apache.activemq.rest.queue.QueueDeployment; @@ -51,7 +51,7 @@ public class JMSTest extends MessageTestBase @BeforeClass public static void setup() throws Exception { - connectionFactory = new HornetQJMSConnectionFactory(manager.getQueueManager().getServerLocator()); + connectionFactory = new ActiveMQJMSConnectionFactory(manager.getQueueManager().getServerLocator()); } @XmlRootElement @@ -118,7 +118,7 @@ public class JMSTest extends MessageTestBase public static Destination createDestination(String dest) { - HornetQDestination destination = (HornetQDestination) HornetQDestination.fromAddress(dest); + ActiveMQDestination destination = (ActiveMQDestination) ActiveMQDestination.fromAddress(dest); System.out.println("SimpleAddress: " + destination.getSimpleAddress()); return destination; } @@ -172,7 +172,7 @@ public class JMSTest extends MessageTestBase @Test public void testJmsConsumer() throws Exception { - String queueName = HornetQDestination.createQueueAddressFromName("testQueue2").toString(); + String queueName = ActiveMQDestination.createQueueAddressFromName("testQueue2").toString(); System.out.println("Queue name: " + queueName); QueueDeployment deployment = new QueueDeployment(); deployment.setDuplicatesAllowed(true); @@ -223,7 +223,7 @@ public class JMSTest extends MessageTestBase @Test public void testJmsProducer() throws Exception { - String queueName = HornetQDestination.createQueueAddressFromName("testQueue").toString(); + String queueName = ActiveMQDestination.createQueueAddressFromName("testQueue").toString(); System.out.println("Queue name: " + queueName); QueueDeployment deployment = new QueueDeployment(); deployment.setDuplicatesAllowed(true); diff --git a/activemq-rest/src/test/java/org/apache/activemq/rest/test/MessageTestBase.java b/activemq-rest/src/test/java/org/apache/activemq/rest/test/MessageTestBase.java index 942fae7753..74cb6a88b5 100644 --- a/activemq-rest/src/test/java/org/apache/activemq/rest/test/MessageTestBase.java +++ b/activemq-rest/src/test/java/org/apache/activemq/rest/test/MessageTestBase.java @@ -46,7 +46,7 @@ public class MessageTestBase } @BeforeClass - public static void setupHornetQServerAndManager() throws Exception + public static void setupActiveMQServerAndManager() throws Exception { server = new Embedded(); server.start(); @@ -54,7 +54,7 @@ public class MessageTestBase } @AfterClass - public static void shutdownHornetqServerAndManager() throws Exception + public static void shutdownActiveMQServerAndManager() throws Exception { manager = null; server.stop(); diff --git a/activemq-rest/src/test/java/org/apache/activemq/rest/test/PersistentPushQueueConsumerTest.java b/activemq-rest/src/test/java/org/apache/activemq/rest/test/PersistentPushQueueConsumerTest.java index 3ab1acc15a..ec47d3bbd3 100644 --- a/activemq-rest/src/test/java/org/apache/activemq/rest/test/PersistentPushQueueConsumerTest.java +++ b/activemq-rest/src/test/java/org/apache/activemq/rest/test/PersistentPushQueueConsumerTest.java @@ -16,8 +16,8 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.rest.MessageServiceManager; import org.apache.activemq.rest.queue.QueueDeployment; import org.apache.activemq.rest.queue.push.xml.PushRegistration; @@ -42,7 +42,7 @@ public class PersistentPushQueueConsumerTest { public static MessageServiceManager manager; protected static ResteasyDeployment deployment; - public static HornetQServer hornetqServer; + public static ActiveMQServer activeMQServer; public static void startup() throws Exception { @@ -51,8 +51,8 @@ public class PersistentPushQueueConsumerTest .setSecurityEnabled(false) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - hornetqServer = HornetQServers.newHornetQServer(configuration); - hornetqServer.start(); + activeMQServer = ActiveMQServers.newActiveMQServer(configuration); + activeMQServer.start(); deployment = EmbeddedContainer.start(); manager = new MessageServiceManager(); @@ -67,8 +67,8 @@ public class PersistentPushQueueConsumerTest manager = null; EmbeddedContainer.stop(); deployment = null; - hornetqServer.stop(); - hornetqServer = null; + activeMQServer.stop(); + activeMQServer = null; } @Test diff --git a/activemq-rest/src/test/java/org/apache/activemq/rest/test/PersistentPushTopicConsumerTest.java b/activemq-rest/src/test/java/org/apache/activemq/rest/test/PersistentPushTopicConsumerTest.java index 091c0a3ceb..cae94e66ac 100644 --- a/activemq-rest/src/test/java/org/apache/activemq/rest/test/PersistentPushTopicConsumerTest.java +++ b/activemq-rest/src/test/java/org/apache/activemq/rest/test/PersistentPushTopicConsumerTest.java @@ -24,8 +24,8 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.rest.MessageServiceManager; import org.apache.activemq.rest.queue.push.xml.XmlLink; import org.apache.activemq.rest.topic.PushTopicRegistration; @@ -50,7 +50,7 @@ import static org.jboss.resteasy.test.TestPortProvider.generateURL; */ public class PersistentPushTopicConsumerTest { - public static HornetQServer server; + public static ActiveMQServer server; public static MessageServiceManager manager; protected static ResteasyDeployment deployment; @@ -62,7 +62,7 @@ public class PersistentPushTopicConsumerTest .setSecurityEnabled(false) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - server = HornetQServers.newHornetQServer(configuration); + server = ActiveMQServers.newActiveMQServer(configuration); server.start(); } diff --git a/activemq-rest/src/test/java/org/apache/activemq/rest/test/PushQueueConsumerTest.java b/activemq-rest/src/test/java/org/apache/activemq/rest/test/PushQueueConsumerTest.java index 05ad32eb41..23d03ff2bb 100644 --- a/activemq-rest/src/test/java/org/apache/activemq/rest/test/PushQueueConsumerTest.java +++ b/activemq-rest/src/test/java/org/apache/activemq/rest/test/PushQueueConsumerTest.java @@ -13,7 +13,7 @@ package org.apache.activemq.rest.test; import org.apache.activemq.rest.queue.QueueDeployment; -import org.apache.activemq.rest.queue.push.HornetQPushStrategy; +import org.apache.activemq.rest.queue.push.ActiveMQPushStrategy; import org.apache.activemq.rest.queue.push.xml.PushRegistration; import org.apache.activemq.rest.queue.push.xml.XmlLink; import org.apache.activemq.rest.util.Constants; @@ -347,7 +347,7 @@ public class PushQueueConsumerTest extends MessageTestBase if (pushRegistrationType == PushRegistrationType.CLASS) { target.setHref(generateURL(Util.getUrlPath(queueToPushTo))); - target.setClassName(HornetQPushStrategy.class.getName()); + target.setClassName(ActiveMQPushStrategy.class.getName()); } else if (pushRegistrationType == PushRegistrationType.BRIDGE) { diff --git a/activemq-rest/src/test/java/org/apache/activemq/rest/test/PushTopicConsumerTest.java b/activemq-rest/src/test/java/org/apache/activemq/rest/test/PushTopicConsumerTest.java index b8c483b2b3..ff9251d97c 100644 --- a/activemq-rest/src/test/java/org/apache/activemq/rest/test/PushTopicConsumerTest.java +++ b/activemq-rest/src/test/java/org/apache/activemq/rest/test/PushTopicConsumerTest.java @@ -17,7 +17,7 @@ import javax.ws.rs.Path; import java.util.concurrent.atomic.AtomicInteger; import org.apache.activemq.rest.queue.QueueDeployment; -import org.apache.activemq.rest.queue.push.HornetQPushStrategy; +import org.apache.activemq.rest.queue.push.ActiveMQPushStrategy; import org.apache.activemq.rest.queue.push.xml.XmlLink; import org.apache.activemq.rest.topic.PushTopicRegistration; import org.apache.activemq.rest.topic.TopicDeployment; @@ -146,7 +146,7 @@ public class PushTopicConsumerTest extends MessageTestBase reg.setDurable(false); XmlLink target = new XmlLink(); target.setHref(generateURL("/queues/testClassForwardQueue")); - target.setClassName(HornetQPushStrategy.class.getName()); + target.setClassName(ActiveMQPushStrategy.class.getName()); reg.setTarget(target); response = pushSubscriptions.request().body("application/xml", reg).post(); Assert.assertEquals(201, response.getStatus()); diff --git a/activemq-rest/src/test/java/org/apache/activemq/rest/test/RawAckTest.java b/activemq-rest/src/test/java/org/apache/activemq/rest/test/RawAckTest.java index 901f1c602e..9560f47ecb 100644 --- a/activemq-rest/src/test/java/org/apache/activemq/rest/test/RawAckTest.java +++ b/activemq-rest/src/test/java/org/apache/activemq/rest/test/RawAckTest.java @@ -28,22 +28,22 @@ import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; /** - * Play with HornetQ + * Play with ActiveMQ * * @author Bill Burke * @version $Revision: 1 $ */ public class RawAckTest { - protected static HornetQServer hornetqServer; + protected static ActiveMQServer activeMQServer; static ServerLocator serverLocator; static ClientSessionFactory sessionFactory; static ClientSessionFactory consumerSessionFactory; @@ -58,8 +58,8 @@ public class RawAckTest .setSecurityEnabled(false) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - hornetqServer = HornetQServers.newHornetQServer(configuration); - hornetqServer.start(); + activeMQServer = ActiveMQServers.newActiveMQServer(configuration); + activeMQServer.start(); HashMap transportConfig = new HashMap(); @@ -67,7 +67,7 @@ public class RawAckTest sessionFactory = serverLocator.createSessionFactory(); consumerSessionFactory = serverLocator.createSessionFactory(); - hornetqServer.createQueue(new SimpleString("testQueue"), new SimpleString("testQueue"), null, false, false); + activeMQServer.createQueue(new SimpleString("testQueue"), new SimpleString("testQueue"), null, false, false); session = sessionFactory.createSession(true, true); producer = session.createProducer("testQueue"); session.start(); @@ -77,7 +77,7 @@ public class RawAckTest public static void shutdown() throws Exception { serverLocator.close(); - hornetqServer.stop(); + activeMQServer.stop(); } static boolean passed = false; diff --git a/activemq-rest/src/test/java/org/apache/activemq/rest/test/SelectorTest.java b/activemq-rest/src/test/java/org/apache/activemq/rest/test/SelectorTest.java index 82dc66464b..ebe49dcbe9 100644 --- a/activemq-rest/src/test/java/org/apache/activemq/rest/test/SelectorTest.java +++ b/activemq-rest/src/test/java/org/apache/activemq/rest/test/SelectorTest.java @@ -23,8 +23,8 @@ import javax.ws.rs.Path; import javax.xml.bind.annotation.XmlRootElement; import java.io.Serializable; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQJMSConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory; import org.apache.activemq.rest.HttpHeaderProperty; import org.apache.activemq.rest.queue.push.xml.XmlLink; import org.apache.activemq.rest.topic.PushTopicRegistration; @@ -45,12 +45,12 @@ import static org.jboss.resteasy.test.TestPortProvider.generateURL; public class SelectorTest extends MessageTestBase { public static ConnectionFactory connectionFactory; - public static String topicName = HornetQDestination.createQueueAddressFromName("testTopic").toString(); + public static String topicName = ActiveMQDestination.createQueueAddressFromName("testTopic").toString(); @BeforeClass public static void setup() throws Exception { - connectionFactory = new HornetQJMSConnectionFactory(manager.getQueueManager().getServerLocator()); + connectionFactory = new ActiveMQJMSConnectionFactory(manager.getQueueManager().getServerLocator()); System.out.println("Queue name: " + topicName); TopicDeployment deployment = new TopicDeployment(); deployment.setDuplicatesAllowed(true); @@ -131,7 +131,7 @@ public class SelectorTest extends MessageTestBase public static Destination createDestination(String dest) { - HornetQDestination destination = (HornetQDestination) HornetQDestination.fromAddress(dest); + ActiveMQDestination destination = (ActiveMQDestination) ActiveMQDestination.fromAddress(dest); System.out.println("SimpleAddress: " + destination.getSimpleAddress()); return destination; } diff --git a/activemq-rest/src/test/java/org/apache/activemq/rest/test/TransformTest.java b/activemq-rest/src/test/java/org/apache/activemq/rest/test/TransformTest.java index 465ba304de..737403e7f8 100644 --- a/activemq-rest/src/test/java/org/apache/activemq/rest/test/TransformTest.java +++ b/activemq-rest/src/test/java/org/apache/activemq/rest/test/TransformTest.java @@ -22,7 +22,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.MessageHandler; -import org.apache.activemq.rest.Hornetq; +import org.apache.activemq.rest.ActiveMQ; import org.apache.activemq.rest.queue.QueueDeployment; import org.jboss.resteasy.client.ClientRequest; import org.jboss.resteasy.client.ClientResponse; @@ -109,9 +109,9 @@ public class TransformTest extends MessageTestBase ClientMessage message = session.createMessage(Message.OBJECT_TYPE, false); if (contentType == null) { - Hornetq.setEntity(message, object); + ActiveMQ.setEntity(message, object); } - else Hornetq.setEntity(message, object, contentType); + else ActiveMQ.setEntity(message, object, contentType); producer.send(message); session.start(); } @@ -203,7 +203,7 @@ public class TransformTest extends MessageTestBase System.out.println("onMessage!"); try { - order = Hornetq.getEntity(clientMessage, Order.class); + order = ActiveMQ.getEntity(clientMessage, Order.class); } catch (Exception e) { 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 6b60332a2d..d3d7ca85ea 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 @@ -16,7 +16,7 @@ import java.io.Serializable; import java.util.List; import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; /** * A BridgeConfiguration @@ -42,9 +42,9 @@ public final class BridgeConfiguration implements Serializable private String transformerClassName = null; - private long retryInterval = HornetQClient.DEFAULT_RETRY_INTERVAL; + private long retryInterval = ActiveMQClient.DEFAULT_RETRY_INTERVAL; - private double retryIntervalMultiplier = HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER; + private double retryIntervalMultiplier = ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER; private int initialConnectAttempts = ActiveMQDefaultConfiguration.getDefaultBridgeInitialConnectAttempts(); @@ -54,23 +54,23 @@ public final class BridgeConfiguration implements Serializable private boolean useDuplicateDetection = ActiveMQDefaultConfiguration.isDefaultBridgeDuplicateDetection(); - private int confirmationWindowSize = HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE; + private int confirmationWindowSize = ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE; - private long clientFailureCheckPeriod = HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD; + private long clientFailureCheckPeriod = ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD; private String user = ActiveMQDefaultConfiguration.getDefaultClusterUser(); private String password = ActiveMQDefaultConfiguration.getDefaultClusterPassword(); - private long connectionTTL = HornetQClient.DEFAULT_CONNECTION_TTL; + private long connectionTTL = ActiveMQClient.DEFAULT_CONNECTION_TTL; - private long maxRetryInterval = HornetQClient.DEFAULT_MAX_RETRY_INTERVAL; + private long maxRetryInterval = ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL; - private int minLargeMessageSize = HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; + private int minLargeMessageSize = ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; // At this point this is only changed on testcases // The bridge shouldn't be sending blocking anyways - private long callTimeout = HornetQClient.DEFAULT_CALL_TIMEOUT; + private long callTimeout = ActiveMQClient.DEFAULT_CALL_TIMEOUT; public BridgeConfiguration() 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 7cfd8a2b76..16a5e84b05 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 @@ -17,7 +17,7 @@ import java.util.Collections; import java.util.List; import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; /** * A ClusterConnectionConfiguration @@ -66,7 +66,7 @@ public final class ClusterConnectionConfiguration implements Serializable private boolean allowDirectConnectionsOnly = false; - private int minLargeMessageSize = HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; + private int minLargeMessageSize = ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; private long clusterNotificationInterval = ActiveMQDefaultConfiguration.getDefaultClusterNotificationInterval(); 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 e0eb4e5456..8efdb7849c 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 @@ -27,7 +27,7 @@ import org.apache.activemq.core.server.group.impl.GroupingHandlerConfiguration; import org.apache.activemq.core.settings.impl.AddressSettings; /** - * A Configuration is used to configure HornetQ servers. + * A Configuration is used to configure ActiveMQ servers. * * @author Tim Fox */ @@ -225,7 +225,7 @@ public interface Configuration extends Serializable /** * Sets the domain used by JMX MBeans (provided JMX management is enabled). *

- * Changing this JMX domain is required if multiple HornetQ servers are run inside + * Changing this JMX domain is required if multiple ActiveMQ servers are run inside * the same JVM and all servers are using the same MBeanServer. */ Configuration setJMXDomain(String domain); @@ -234,7 +234,7 @@ public interface Configuration extends Serializable * Returns the list of interceptors classes used by this server for incoming messages (i.e. those being delivered to * the server from clients). Invoking this method is the same as invoking getIncomingInterceptorClassNames(). * - * @deprecated As of HornetQ 2.3.0.Final, replaced by + * @deprecated As of ActiveMQ 2.3.0.Final, replaced by * {@link #getIncomingInterceptorClassNames()} and * {@link #getOutgoingInterceptorClassNames()} */ @@ -261,7 +261,7 @@ public interface Configuration extends Serializable *

* Deprecated but not immediately deleted, as embedded users may be using this file. * - * @deprecated As of HornetQ 2.3.0.Final, replaced by + * @deprecated As of ActiveMQ 2.3.0.Final, replaced by * {@link #setIncomingInterceptorClassNames(List)} and * {@link #setOutgoingInterceptorClassNames(List)} */ @@ -990,14 +990,14 @@ public interface Configuration extends Serializable String getReplicationClustername(); /* - * Whether or not that HornetQ should use all protocols available on the classpath. If false only the core protocol will - * be set, any other protocols will need to be set directly on the HornetQServer + * Whether or not that ActiveMQ should use all protocols available on the classpath. If false only the core protocol will + * be set, any other protocols will need to be set directly on the ActiveMQServer * */ Configuration setResolveProtocols(boolean resolveProtocols); /* * @see #setResolveProtocols() - * @return whether HornetQ should resolve and use any Protocols available on the classpath + * @return whether ActiveMQ should resolve and use any Protocols available on the classpath * Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_RESOLVE_PROTOCOLS}. * */ boolean isResolveProtocols(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/ConfigurationUtils.java b/activemq-server/src/main/java/org/apache/activemq/core/config/ConfigurationUtils.java index 056211d9d3..ded18908f1 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/config/ConfigurationUtils.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/config/ConfigurationUtils.java @@ -19,7 +19,7 @@ import org.apache.activemq.core.config.ha.ReplicaPolicyConfiguration; import org.apache.activemq.core.config.ha.ReplicatedPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration; -import org.apache.activemq.core.server.HornetQMessageBundle; +import org.apache.activemq.core.server.ActiveMQMessageBundle; import org.apache.activemq.core.server.cluster.ha.BackupPolicy; import org.apache.activemq.core.server.cluster.ha.ColocatedPolicy; import org.apache.activemq.core.server.cluster.ha.HAPolicy; @@ -119,7 +119,7 @@ public final class ConfigurationUtils } } - throw HornetQMessageBundle.BUNDLE.unsupportedHAPolicyConfiguration(conf); + throw ActiveMQMessageBundle.BUNDLE.unsupportedHAPolicyConfiguration(conf); } public static ScaleDownPolicy getScaleDownPolicy(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 adb971fba2..bcab5ec1ad 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 @@ -1069,7 +1069,7 @@ public class ConfigurationImpl implements Configuration @Override public String toString() { - StringBuilder sb = new StringBuilder("HornetQ Configuration ("); + StringBuilder sb = new StringBuilder("ActiveMQ Configuration ("); sb.append("clustered=").append(isClustered()).append(","); sb.append("journalDirectory=").append(journalDirectory).append(","); sb.append("bindingsDirectory=").append(bindingsDirectory).append(","); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/impl/FileConfiguration.java b/activemq-server/src/main/java/org/apache/activemq/core/config/impl/FileConfiguration.java index 86ec8c8474..92986dc0ae 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/config/impl/FileConfiguration.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/config/impl/FileConfiguration.java @@ -17,7 +17,7 @@ import java.io.Reader; import java.net.URL; import org.apache.activemq.core.deployers.impl.FileConfigurationParser; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.utils.XMLUtil; import org.w3c.dom.Element; @@ -67,7 +67,7 @@ public final class FileConfiguration extends ConfigurationImpl url = new URL(configurationUrl); } - HornetQServerLogger.LOGGER.debug("Loading server configuration from " + url); + ActiveMQServerLogger.LOGGER.debug("Loading server configuration from " + url); Reader reader = new InputStreamReader(url.openStream()); String xml = org.apache.activemq.utils.XMLUtil.readerToString(reader); @@ -78,7 +78,7 @@ public final class FileConfiguration extends ConfigurationImpl // https://jira.jboss.org/browse/HORNETQ-478 - We only want to validate AIO when // starting the server - // and we don't want to do it when deploying hornetq-queues.xml which uses the same parser and XML format + // and we don't want to do it when deploying activemq-queues.xml which uses the same parser and XML format parser.setValidateAIO(true); parser.parseMainConfig(e, this); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/impl/Validators.java b/activemq-server/src/main/java/org/apache/activemq/core/config/impl/Validators.java index 9a760b40fc..bf40f4e231 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/config/impl/Validators.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/config/impl/Validators.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.config.impl; -import org.apache.activemq.core.server.HornetQMessageBundle; +import org.apache.activemq.core.server.ActiveMQMessageBundle; import org.apache.activemq.core.server.JournalType; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.SlowConsumerPolicy; @@ -44,7 +44,7 @@ public final class Validators String str = (String) value; if (str == null || str.length() == 0) { - throw HornetQMessageBundle.BUNDLE.emptyOrNull(name); + throw ActiveMQMessageBundle.BUNDLE.emptyOrNull(name); } } }; @@ -60,7 +60,7 @@ public final class Validators } else { - throw HornetQMessageBundle.BUNDLE.greaterThanZero(name, val); + throw ActiveMQMessageBundle.BUNDLE.greaterThanZero(name, val); } } }; @@ -72,7 +72,7 @@ public final class Validators Number val = (Number) value; if (val == null || (val.intValue() < 0 || val.intValue() > 100)) { - throw HornetQMessageBundle.BUNDLE.notPercent(name, val); + throw ActiveMQMessageBundle.BUNDLE.notPercent(name, val); } } }; @@ -88,7 +88,7 @@ public final class Validators } else { - throw HornetQMessageBundle.BUNDLE.greaterThanZero(name, val); + throw ActiveMQMessageBundle.BUNDLE.greaterThanZero(name, val); } } }; @@ -104,7 +104,7 @@ public final class Validators } else { - throw HornetQMessageBundle.BUNDLE.greaterThanMinusOne(name, val); + throw ActiveMQMessageBundle.BUNDLE.greaterThanMinusOne(name, val); } } }; @@ -120,7 +120,7 @@ public final class Validators } else { - throw HornetQMessageBundle.BUNDLE.greaterThanZeroOrMinusOne(name, val); + throw ActiveMQMessageBundle.BUNDLE.greaterThanZeroOrMinusOne(name, val); } } }; @@ -136,7 +136,7 @@ public final class Validators } else { - throw HornetQMessageBundle.BUNDLE.mustbeBetween(name, Thread.MIN_PRIORITY, Thread.MAX_PRIORITY, value); + throw ActiveMQMessageBundle.BUNDLE.mustbeBetween(name, Thread.MIN_PRIORITY, Thread.MAX_PRIORITY, value); } } }; @@ -148,7 +148,7 @@ public final class Validators String val = (String) value; if (val == null || !val.equals(JournalType.NIO.toString()) && !val.equals(JournalType.ASYNCIO.toString())) { - throw HornetQMessageBundle.BUNDLE.invalidJournalType(val); + throw ActiveMQMessageBundle.BUNDLE.invalidJournalType(val); } } }; @@ -163,7 +163,7 @@ public final class Validators !val.equals(AddressFullMessagePolicy.BLOCK.toString()) && !val.equals(AddressFullMessagePolicy.FAIL.toString())) { - throw HornetQMessageBundle.BUNDLE.invalidAddressFullPolicyType(val); + throw ActiveMQMessageBundle.BUNDLE.invalidAddressFullPolicyType(val); } } }; @@ -176,7 +176,7 @@ public final class Validators if (val == null || !val.equals(SlowConsumerPolicy.KILL.toString()) && !val.equals(SlowConsumerPolicy.NOTIFY.toString())) { - throw HornetQMessageBundle.BUNDLE.invalidSlowConsumerPolicyType(val); + throw ActiveMQMessageBundle.BUNDLE.invalidSlowConsumerPolicyType(val); } } }; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/deployers/Deployer.java b/activemq-server/src/main/java/org/apache/activemq/core/deployers/Deployer.java index 3b585af94f..1329486564 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/deployers/Deployer.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/deployers/Deployer.java @@ -14,14 +14,14 @@ package org.apache.activemq.core.deployers; import java.net.URI; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; /** * abstract class that helps with deployment of messaging components. * * @author Andy Taylor */ -public interface Deployer extends HornetQComponent +public interface Deployer extends ActiveMQComponent { /** * The name of the configuration files to look for for deployment diff --git a/activemq-server/src/main/java/org/apache/activemq/core/deployers/DeploymentManager.java b/activemq-server/src/main/java/org/apache/activemq/core/deployers/DeploymentManager.java index d39d2e4c1a..430122b1dc 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/deployers/DeploymentManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/deployers/DeploymentManager.java @@ -12,14 +12,14 @@ */ package org.apache.activemq.core.deployers; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; /** * This class manages any configuration files available. It will notify any deployers registered with it on changes. * * @author Andy Taylor */ -public interface DeploymentManager extends HornetQComponent +public interface DeploymentManager extends ActiveMQComponent { /** * registers a deployable object which will handle the deployment of URL's diff --git a/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/BasicUserCredentialsDeployer.java b/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/BasicUserCredentialsDeployer.java index c72f90d836..4bd0d129a7 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/BasicUserCredentialsDeployer.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/BasicUserCredentialsDeployer.java @@ -13,20 +13,20 @@ package org.apache.activemq.core.deployers.impl; import org.apache.activemq.core.deployers.DeploymentManager; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; import org.apache.activemq.utils.PasswordMaskingUtil; import org.apache.activemq.utils.SensitiveDataCodec; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** - * deployer for adding security loaded from the file "hornetq-users.xml" + * deployer for adding security loaded from the file "activemq-users.xml" * * @author Andy Taylor */ public class BasicUserCredentialsDeployer extends XmlDeployer { - private final HornetQSecurityManager hornetQSecurityManager; + private final ActiveMQSecurityManager activeMQSecurityManager; private static final String PASSWORD_ATTRIBUTE = "password"; @@ -47,11 +47,11 @@ public class BasicUserCredentialsDeployer extends XmlDeployer private SensitiveDataCodec passwordCodec; public BasicUserCredentialsDeployer(final DeploymentManager deploymentManager, - final HornetQSecurityManager hornetQSecurityManager) + final ActiveMQSecurityManager activeMQSecurityManager) { super(deploymentManager); - this.hornetQSecurityManager = hornetQSecurityManager; + this.activeMQSecurityManager = activeMQSecurityManager; } @Override @@ -109,11 +109,11 @@ public class BasicUserCredentialsDeployer extends XmlDeployer } // add the user - hornetQSecurityManager.addUser(username, password); + activeMQSecurityManager.addUser(username, password); if (BasicUserCredentialsDeployer.DEFAULT_USER.equalsIgnoreCase(nodeName)) { - hornetQSecurityManager.setDefaultUser(username); + activeMQSecurityManager.setDefaultUser(username); } NodeList children = node.getChildNodes(); for (int i = 0; i < children.getLength(); i++) @@ -125,7 +125,7 @@ public class BasicUserCredentialsDeployer extends XmlDeployer String role = child.getAttributes() .getNamedItem(BasicUserCredentialsDeployer.ROLE_ATTR_NAME) .getNodeValue(); - hornetQSecurityManager.addRole(username, role); + activeMQSecurityManager.addRole(username, role); } } } @@ -134,7 +134,7 @@ public class BasicUserCredentialsDeployer extends XmlDeployer public void undeploy(final Node node) throws Exception { String username = node.getAttributes().getNamedItem("name").getNodeValue(); - hornetQSecurityManager.removeUser(username); + activeMQSecurityManager.removeUser(username); } @Override 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 739bd4d7a9..b78ce3e0ae 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 @@ -31,7 +31,7 @@ import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.core.config.BridgeConfiguration; import org.apache.activemq.core.config.ClusterConnectionConfiguration; import org.apache.activemq.core.config.Configuration; @@ -52,7 +52,7 @@ import org.apache.activemq.core.config.impl.Validators; import org.apache.activemq.core.journal.impl.AIOSequentialFileFactory; import org.apache.activemq.core.journal.impl.JournalConstants; import org.apache.activemq.core.security.Role; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.JournalType; import org.apache.activemq.core.server.group.impl.GroupingHandlerConfiguration; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; @@ -204,7 +204,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil NodeList elems = e.getElementsByTagName("clustered"); if (elems != null && elems.getLength() > 0) { - HornetQServerLogger.LOGGER.deprecatedConfigurationOption("clustered"); + ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("clustered"); } // these are combined because they are both required for setting the correct HAPolicyConfiguration @@ -217,24 +217,24 @@ public final class FileConfigurationParser extends XMLConfigurationUtil { if (parameterExists(e, "backup")) { - HornetQServerLogger.LOGGER.incompatibleWithHAPolicy("backup"); + ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("backup"); } if (parameterExists(e, "shared-store")) { - HornetQServerLogger.LOGGER.incompatibleWithHAPolicy("shared-store"); + ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("shared-store"); } } else { if (parameterExists(e, "backup")) { - HornetQServerLogger.LOGGER.deprecatedConfigurationOption("backup"); + ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("backup"); } if (parameterExists(e, "shared-store")) { - HornetQServerLogger.LOGGER.deprecatedConfigurationOption("shared-store"); + ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("shared-store"); } if (backup && sharedStore) @@ -262,11 +262,11 @@ public final class FileConfigurationParser extends XMLConfigurationUtil { if (containsHAPolicy) { - HornetQServerLogger.LOGGER.incompatibleWithHAPolicy("check-for-live-server"); + ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("check-for-live-server"); } else { - HornetQServerLogger.LOGGER.deprecatedConfigurationOption("check-for-live-server"); + ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("check-for-live-server"); if (haPolicyConfig instanceof ReplicatedPolicyConfiguration) { @@ -280,11 +280,11 @@ public final class FileConfigurationParser extends XMLConfigurationUtil { if (containsHAPolicy) { - HornetQServerLogger.LOGGER.incompatibleWithHAPolicy("allow-failback"); + ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("allow-failback"); } else { - HornetQServerLogger.LOGGER.deprecatedConfigurationOption("allow-failback"); + ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("allow-failback"); if (haPolicyConfig instanceof ReplicaPolicyConfiguration) { @@ -298,7 +298,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil } else { - HornetQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("check-for-live-server"); + ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("check-for-live-server"); } } } @@ -307,11 +307,11 @@ public final class FileConfigurationParser extends XMLConfigurationUtil { if (containsHAPolicy) { - HornetQServerLogger.LOGGER.incompatibleWithHAPolicy("backup-group-name"); + ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("backup-group-name"); } else { - HornetQServerLogger.LOGGER.deprecatedConfigurationOption("backup-group-name"); + ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("backup-group-name"); if (haPolicyConfig instanceof ReplicaPolicyConfiguration) { @@ -325,7 +325,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil } else { - HornetQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("backup-group-name"); + ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("backup-group-name"); } } } @@ -334,11 +334,11 @@ public final class FileConfigurationParser extends XMLConfigurationUtil { if (containsHAPolicy) { - HornetQServerLogger.LOGGER.incompatibleWithHAPolicy("failback-delay"); + ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("failback-delay"); } else { - HornetQServerLogger.LOGGER.deprecatedConfigurationOption("failback-delay"); + ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("failback-delay"); if (haPolicyConfig instanceof ReplicaPolicyConfiguration) { @@ -357,7 +357,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil } else { - HornetQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("failback-delay"); + ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("failback-delay"); } } } @@ -366,11 +366,11 @@ public final class FileConfigurationParser extends XMLConfigurationUtil { if (containsHAPolicy) { - HornetQServerLogger.LOGGER.incompatibleWithHAPolicy("failover-on-shutdown"); + ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("failover-on-shutdown"); } else { - HornetQServerLogger.LOGGER.deprecatedConfigurationOption("failover-on-shutdown"); + ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("failover-on-shutdown"); if (haPolicyConfig instanceof SharedStoreMasterPolicyConfiguration) { @@ -384,7 +384,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil } else { - HornetQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("failover-on-shutdown"); + ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("failover-on-shutdown"); } } } @@ -393,11 +393,11 @@ public final class FileConfigurationParser extends XMLConfigurationUtil { if (containsHAPolicy) { - HornetQServerLogger.LOGGER.incompatibleWithHAPolicy("replication-clustername"); + ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("replication-clustername"); } else { - HornetQServerLogger.LOGGER.deprecatedConfigurationOption("replication-clustername"); + ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("replication-clustername"); if (haPolicyConfig instanceof ReplicaPolicyConfiguration) { @@ -411,7 +411,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil } else { - HornetQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("replication-clustername"); + ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("replication-clustername"); } } } @@ -420,11 +420,11 @@ public final class FileConfigurationParser extends XMLConfigurationUtil { if (containsHAPolicy) { - HornetQServerLogger.LOGGER.incompatibleWithHAPolicy("max-saved-replicated-journals-size"); + ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("max-saved-replicated-journals-size"); } else { - HornetQServerLogger.LOGGER.deprecatedConfigurationOption("max-saved-replicated-journals-size"); + ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("max-saved-replicated-journals-size"); if (haPolicyConfig instanceof ReplicaPolicyConfiguration) { @@ -435,7 +435,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil } else { - HornetQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("max-saved-replicated-journals-size"); + ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("max-saved-replicated-journals-size"); } } } @@ -619,14 +619,14 @@ public final class FileConfigurationParser extends XMLConfigurationUtil if (connectorConfig.getName() == null) { - HornetQServerLogger.LOGGER.connectorWithNoName(); + ActiveMQServerLogger.LOGGER.connectorWithNoName(); continue; } if (config.getConnectorConfigurations().containsKey(connectorConfig.getName())) { - HornetQServerLogger.LOGGER.connectorAlreadyDeployed(connectorConfig.getName()); + ActiveMQServerLogger.LOGGER.connectorAlreadyDeployed(connectorConfig.getName()); continue; } @@ -756,7 +756,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil { if (validateAIO) { - HornetQServerLogger.LOGGER.AIONotFound(); + ActiveMQServerLogger.LOGGER.AIONotFound(); } config.setJournalType(JournalType.NIO); @@ -1003,7 +1003,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil } else { - HornetQServerLogger.LOGGER.rolePermissionConfigurationError(type); + ActiveMQServerLogger.LOGGER.rolePermissionConfigurationError(type); } if (!allRoles.contains(role.trim())) { @@ -1528,7 +1528,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil String name = e.getAttribute("name"); long discoveryInitialWaitTimeout = - getLong(e, "initial-wait-timeout", HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, + getLong(e, "initial-wait-timeout", ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, Validators.GT_ZERO); long refreshTimeout = @@ -1570,7 +1570,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil if (mainConfig.getDiscoveryGroupConfigurations().containsKey(name)) { - HornetQServerLogger.LOGGER.discoveryGroupAlreadyDeployed(name); + ActiveMQServerLogger.LOGGER.discoveryGroupAlreadyDeployed(name); return; } @@ -1612,14 +1612,14 @@ public final class FileConfigurationParser extends XMLConfigurationUtil getLong(e, "retry-interval", ActiveMQDefaultConfiguration.getDefaultClusterRetryInterval(), Validators.GT_ZERO); - long callTimeout = getLong(e, "call-timeout", HornetQClient.DEFAULT_CALL_TIMEOUT, Validators.GT_ZERO); + long callTimeout = getLong(e, "call-timeout", ActiveMQClient.DEFAULT_CALL_TIMEOUT, Validators.GT_ZERO); - long callFailoverTimeout = getLong(e, "call-failover-timeout", HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, Validators.MINUS_ONE_OR_GT_ZERO); + long callFailoverTimeout = getLong(e, "call-failover-timeout", ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, Validators.MINUS_ONE_OR_GT_ZERO); double retryIntervalMultiplier = getDouble(e, "retry-interval-multiplier", ActiveMQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(), Validators.GT_ZERO); - int minLargeMessageSize = getInteger(e, "min-large-message-size", HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, Validators.GT_ZERO); + int minLargeMessageSize = getInteger(e, "min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, Validators.GT_ZERO); long maxRetryInterval = getLong(e, "max-retry-interval", ActiveMQDefaultConfiguration.getDefaultClusterMaxRetryInterval(), Validators.GT_ZERO); @@ -1734,22 +1734,22 @@ public final class FileConfigurationParser extends XMLConfigurationUtil getInteger(brNode, "confirmation-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize(), Validators.GT_ZERO); - long retryInterval = getLong(brNode, "retry-interval", HornetQClient.DEFAULT_RETRY_INTERVAL, Validators.GT_ZERO); + long retryInterval = getLong(brNode, "retry-interval", ActiveMQClient.DEFAULT_RETRY_INTERVAL, Validators.GT_ZERO); long clientFailureCheckPeriod = - getLong(brNode, "check-period", HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, Validators.GT_ZERO); + getLong(brNode, "check-period", ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, Validators.GT_ZERO); - long connectionTTL = getLong(brNode, "connection-ttl", HornetQClient.DEFAULT_CONNECTION_TTL, Validators.GT_ZERO); + long connectionTTL = getLong(brNode, "connection-ttl", ActiveMQClient.DEFAULT_CONNECTION_TTL, Validators.GT_ZERO); int minLargeMessageSize = - getInteger(brNode, "min-large-message-size", HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + getInteger(brNode, "min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, Validators.GT_ZERO); - long maxRetryInterval = getLong(brNode, "max-retry-interval", HornetQClient.DEFAULT_MAX_RETRY_INTERVAL, Validators.GT_ZERO); + long maxRetryInterval = getLong(brNode, "max-retry-interval", ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, Validators.GT_ZERO); double retryIntervalMultiplier = - getDouble(brNode, "retry-interval-multiplier", HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + getDouble(brNode, "retry-interval-multiplier", ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, Validators.GT_ZERO); int initialConnectAttempts = diff --git a/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/FileDeploymentManager.java b/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/FileDeploymentManager.java index 84121ae7fd..238879b7c3 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/FileDeploymentManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/FileDeploymentManager.java @@ -33,7 +33,7 @@ import java.util.concurrent.TimeUnit; import org.apache.activemq.api.core.Pair; import org.apache.activemq.core.deployers.Deployer; import org.apache.activemq.core.deployers.DeploymentManager; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; /** * @author Andy Taylor @@ -114,7 +114,7 @@ public class FileDeploymentManager implements Runnable, DeploymentManager for (String filename : filenames) { - HornetQServerLogger.LOGGER.debug("the filename is " + filename); + ActiveMQServerLogger.LOGGER.debug("the filename is " + filename); Enumeration urls = Thread.currentThread().getContextClassLoader().getResources(filename); @@ -122,16 +122,16 @@ public class FileDeploymentManager implements Runnable, DeploymentManager { URI uri = urls.nextElement().toURI(); - HornetQServerLogger.LOGGER.debug("Got URI " + uri); + ActiveMQServerLogger.LOGGER.debug("Got URI " + uri); try { - HornetQServerLogger.LOGGER.debug("Deploying " + uri + " for " + deployer.getClass().getSimpleName()); + ActiveMQServerLogger.LOGGER.debug("Deploying " + uri + " for " + deployer.getClass().getSimpleName()); deployer.deploy(uri); } catch (Exception e) { - HornetQServerLogger.LOGGER.errorDeployingURI(e, uri); + ActiveMQServerLogger.LOGGER.errorDeployingURI(e, uri); } Pair pair = new Pair(uri, deployer); @@ -198,7 +198,7 @@ public class FileDeploymentManager implements Runnable, DeploymentManager } catch (URISyntaxException e) { - HornetQServerLogger.LOGGER.errorDeployingURI(e); + ActiveMQServerLogger.LOGGER.errorDeployingURI(e); continue; } @@ -218,7 +218,7 @@ public class FileDeploymentManager implements Runnable, DeploymentManager } catch (Exception e) { - HornetQServerLogger.LOGGER.errorDeployingURI(e, uri); + ActiveMQServerLogger.LOGGER.errorDeployingURI(e, uri); } } else if (newLastModified > info.lastModified) @@ -231,7 +231,7 @@ public class FileDeploymentManager implements Runnable, DeploymentManager } catch (Exception e) { - HornetQServerLogger.LOGGER.errorDeployingURI(e, uri); + ActiveMQServerLogger.LOGGER.errorDeployingURI(e, uri); } } } @@ -246,18 +246,18 @@ public class FileDeploymentManager implements Runnable, DeploymentManager if (!fileExists(pair.getA())) { Deployer deployer = entry.getValue().deployer; - HornetQServerLogger.LOGGER.debug("Undeploying " + deployer + " with url " + pair.getA()); + ActiveMQServerLogger.LOGGER.debug("Undeploying " + deployer + " with url " + pair.getA()); deployer.undeploy(pair.getA()); toRemove.add(pair); } } catch (URISyntaxException e) { - HornetQServerLogger.LOGGER.errorUnDeployingURI(e, pair.getA()); + ActiveMQServerLogger.LOGGER.errorUnDeployingURI(e, pair.getA()); } catch (Exception e) { - HornetQServerLogger.LOGGER.errorUnDeployingURI(e, pair.getA()); + ActiveMQServerLogger.LOGGER.errorUnDeployingURI(e, pair.getA()); } } for (Pair pair : toRemove) @@ -267,7 +267,7 @@ public class FileDeploymentManager implements Runnable, DeploymentManager } catch (IOException e) { - HornetQServerLogger.LOGGER.errorScanningURLs(e); + ActiveMQServerLogger.LOGGER.errorScanningURLs(e); } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/QueueDeployer.java b/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/QueueDeployer.java index ece4fac248..9df79615a8 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/QueueDeployer.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/QueueDeployer.java @@ -15,7 +15,7 @@ package org.apache.activemq.core.deployers.impl; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.config.CoreQueueConfiguration; import org.apache.activemq.core.deployers.DeploymentManager; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.w3c.dom.Node; /** @@ -27,11 +27,11 @@ import org.w3c.dom.Node; */ public class QueueDeployer extends XmlDeployer { - private final HornetQServer server; + private final ActiveMQServer server; private final FileConfigurationParser parser = new FileConfigurationParser(); - public QueueDeployer(final DeploymentManager deploymentManager, final HornetQServer server) + public QueueDeployer(final DeploymentManager deploymentManager, final ActiveMQServer server) { super(deploymentManager); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/SecurityDeployer.java b/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/SecurityDeployer.java index dce1bda9f0..55a8822dd5 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/SecurityDeployer.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/SecurityDeployer.java @@ -27,7 +27,7 @@ import org.w3c.dom.Node; */ public class SecurityDeployer extends XmlDeployer { - private static final String QUEUES_XML = "hornetq-queues.xml"; + private static final String QUEUES_XML = "activemq-queues.xml"; private static final String MATCH = "match"; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/XmlDeployer.java b/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/XmlDeployer.java index 87c47240fb..75dd47fa12 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/XmlDeployer.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/XmlDeployer.java @@ -25,7 +25,7 @@ import java.util.Set; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.deployers.Deployer; import org.apache.activemq.core.deployers.DeploymentManager; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.utils.XMLUtil; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -182,7 +182,7 @@ public abstract class XmlDeployer implements Deployer } catch (Exception e1) { - HornetQServerLogger.LOGGER.unableToDeployNode(e1, node); + ActiveMQServerLogger.LOGGER.unableToDeployNode(e1, node); continue; } @@ -232,7 +232,7 @@ public abstract class XmlDeployer implements Deployer } catch (Exception e) { - HornetQServerLogger.LOGGER.problemUndeployingNode(e, node); + ActiveMQServerLogger.LOGGER.problemUndeployingNode(e, node); } } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/filter/impl/FilterImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/filter/impl/FilterImpl.java index ac2df63f92..16fa5d9306 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/filter/impl/FilterImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/filter/impl/FilterImpl.java @@ -13,6 +13,7 @@ package org.apache.activemq.core.filter.impl; import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.selector.filter.BooleanExpression; import org.apache.activemq.selector.filter.FilterException; import org.apache.activemq.selector.filter.Filterable; @@ -20,17 +21,16 @@ import org.apache.activemq.selector.SelectorParser; import org.apache.activemq.api.core.FilterConstants; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.filter.Filter; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; import org.apache.activemq.core.server.ServerMessage; /** -* This class implements a HornetQ filter +* This class implements a ActiveMQ filter * * @author Tim Fox * @author Jeff Mesnil * -* HornetQ filters have the same syntax as JMS 1.1 selectors, but the identifiers are different. +* ActiveMQ filters have the same syntax as JMS 1.1 selectors, but the identifiers are different. * * Valid identifiers that can be used are: * @@ -93,8 +93,8 @@ public class FilterImpl implements Filter } catch (Throwable e) { - HornetQServerLogger.LOGGER.invalidFilter(e, filterStr); - throw HornetQMessageBundle.BUNDLE.invalidFilter(e, filterStr); + ActiveMQServerLogger.LOGGER.invalidFilter(e, filterStr); + throw ActiveMQMessageBundle.BUNDLE.invalidFilter(e, filterStr); } return new FilterImpl(filterStr, booleanExpression); } @@ -123,7 +123,7 @@ public class FilterImpl implements Filter } catch (Exception e) { - HornetQServerLogger.LOGGER.invalidFilter(e, sfilterString); + ActiveMQServerLogger.LOGGER.invalidFilter(e, sfilterString); return false; } } @@ -167,28 +167,28 @@ public class FilterImpl implements Filter private static Object getHeaderFieldValue(final ServerMessage msg, final SimpleString fieldName) { - if (FilterConstants.HORNETQ_USERID.equals(fieldName)) + if (FilterConstants.ACTIVEMQ_USERID.equals(fieldName)) { // It's the stringified (hex) representation of a user id that can be used in a selector expression return new SimpleString("ID:" + msg.getUserID()); } - else if (FilterConstants.HORNETQ_PRIORITY.equals(fieldName)) + else if (FilterConstants.ACTIVEMQ_PRIORITY.equals(fieldName)) { return Integer.valueOf(msg.getPriority()); } - else if (FilterConstants.HORNETQ_TIMESTAMP.equals(fieldName)) + else if (FilterConstants.ACTIVEMQ_TIMESTAMP.equals(fieldName)) { return msg.getTimestamp(); } - else if (FilterConstants.HORNETQ_DURABLE.equals(fieldName)) + else if (FilterConstants.ACTIVEMQ_DURABLE.equals(fieldName)) { return msg.isDurable() ? FilterConstants.DURABLE : FilterConstants.NON_DURABLE; } - else if (FilterConstants.HORNETQ_EXPIRATION.equals(fieldName)) + else if (FilterConstants.ACTIVEMQ_EXPIRATION.equals(fieldName)) { return msg.getExpiration(); } - else if (FilterConstants.HORNETQ_SIZE.equals(fieldName)) + else if (FilterConstants.ACTIVEMQ_SIZE.equals(fieldName)) { return msg.getEncodeSize(); } @@ -211,7 +211,7 @@ public class FilterImpl implements Filter public Object getProperty(String id) { Object result = null; - if (id.startsWith(FilterConstants.HORNETQ_PREFIX.toString())) + if (id.startsWith(FilterConstants.ACTIVEMQ_PREFIX.toString())) { result = getHeaderFieldValue(message, new SimpleString(id)); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/management/impl/HornetQServerControlImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/management/impl/ActiveMQServerControlImpl.java similarity index 96% rename from activemq-server/src/main/java/org/apache/activemq/core/management/impl/HornetQServerControlImpl.java rename to activemq-server/src/main/java/org/apache/activemq/core/management/impl/ActiveMQServerControlImpl.java index e5efd6bd7d..92b3fe6447 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/management/impl/HornetQServerControlImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/management/impl/ActiveMQServerControlImpl.java @@ -42,7 +42,7 @@ import org.apache.activemq.api.core.management.AddressControl; import org.apache.activemq.api.core.management.BridgeControl; import org.apache.activemq.api.core.management.CoreNotificationType; import org.apache.activemq.api.core.management.DivertControl; -import org.apache.activemq.api.core.management.HornetQServerControl; +import org.apache.activemq.api.core.management.ActiveMQServerControl; import org.apache.activemq.api.core.management.QueueControl; import org.apache.activemq.core.config.BridgeConfiguration; import org.apache.activemq.core.config.Configuration; @@ -59,10 +59,10 @@ import org.apache.activemq.core.postoffice.impl.LocalQueueBinding; import org.apache.activemq.core.remoting.server.RemotingService; import org.apache.activemq.core.security.CheckType; import org.apache.activemq.core.security.Role; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.Consumer; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.JournalType; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.ServerConsumer; @@ -91,7 +91,7 @@ import org.apache.activemq.utils.json.JSONObject; * * */ -public class HornetQServerControlImpl extends AbstractControl implements HornetQServerControl, NotificationEmitter, +public class ActiveMQServerControlImpl extends AbstractControl implements ActiveMQServerControl, NotificationEmitter, org.apache.activemq.core.server.management.NotificationListener { // Constants ----------------------------------------------------- @@ -106,7 +106,7 @@ public class HornetQServerControlImpl extends AbstractControl implements HornetQ private final RemotingService remotingService; - private final HornetQServer server; + private final ActiveMQServer server; private final MessageCounterManager messageCounterManager; @@ -117,16 +117,16 @@ public class HornetQServerControlImpl extends AbstractControl implements HornetQ // Constructors -------------------------------------------------- - public HornetQServerControlImpl(final PostOffice postOffice, - final Configuration configuration, - final ResourceManager resourceManager, - final RemotingService remotingService, - final HornetQServer messagingServer, - final MessageCounterManager messageCounterManager, - final StorageManager storageManager, - final NotificationBroadcasterSupport broadcaster) throws Exception + public ActiveMQServerControlImpl(final PostOffice postOffice, + final Configuration configuration, + final ResourceManager resourceManager, + final RemotingService remotingService, + final ActiveMQServer messagingServer, + final MessageCounterManager messageCounterManager, + final StorageManager storageManager, + final NotificationBroadcasterSupport broadcaster) throws Exception { - super(HornetQServerControl.class, storageManager); + super(ActiveMQServerControl.class, storageManager); this.postOffice = postOffice; this.configuration = configuration; this.resourceManager = resourceManager; @@ -137,7 +137,7 @@ public class HornetQServerControlImpl extends AbstractControl implements HornetQ server.getManagementService().addNotificationListener(this); } - // HornetQServerControlMBean implementation -------------------- + // ActiveMQServerControlMBean implementation -------------------- public boolean isStarted() { @@ -887,7 +887,7 @@ public class HornetQServerControlImpl extends AbstractControl implements HornetQ { if (newPeriod < MessageCounterManagerImpl.MIN_SAMPLE_PERIOD) { - throw HornetQMessageBundle.BUNDLE.invalidMessageCounterPeriod(MessageCounterManagerImpl.MIN_SAMPLE_PERIOD); + throw ActiveMQMessageBundle.BUNDLE.invalidMessageCounterPeriod(MessageCounterManagerImpl.MIN_SAMPLE_PERIOD); } if (messageCounterManager != null && newPeriod != messageCounterManager.getSamplePeriod()) @@ -925,7 +925,7 @@ public class HornetQServerControlImpl extends AbstractControl implements HornetQ { if (count <= 0) { - throw HornetQMessageBundle.BUNDLE.greaterThanZero(count); + throw ActiveMQMessageBundle.BUNDLE.greaterThanZero(count); } messageCounterManager.setMaxDayCount(count); } @@ -1265,7 +1265,7 @@ public class HornetQServerControlImpl extends AbstractControl implements HornetQ String remoteAddress = connection.getRemoteAddress(); if (remoteAddress.contains(ipAddress)) { - connection.fail(HornetQMessageBundle.BUNDLE.connectionsClosedByManagement(ipAddress)); + connection.fail(ActiveMQMessageBundle.BUNDLE.connectionsClosedByManagement(ipAddress)); remotingService.removeConnection(connection.getID()); closed = true; } @@ -1311,7 +1311,7 @@ public class HornetQServerControlImpl extends AbstractControl implements HornetQ if (connection != null) { remotingService.removeConnection(connection.getID()); - connection.fail(HornetQMessageBundle.BUNDLE.consumerConnectionsClosedByManagement(address)); + connection.fail(ActiveMQMessageBundle.BUNDLE.consumerConnectionsClosedByManagement(address)); closed = true; } } @@ -1321,7 +1321,7 @@ public class HornetQServerControlImpl extends AbstractControl implements HornetQ } catch (Exception e) { - HornetQServerLogger.LOGGER.failedToCloseConsumerConnectionsForAddress(address, e); + ActiveMQServerLogger.LOGGER.failedToCloseConsumerConnectionsForAddress(address, e); } finally { @@ -1355,7 +1355,7 @@ public class HornetQServerControlImpl extends AbstractControl implements HornetQ if (connection != null) { remotingService.removeConnection(connection.getID()); - connection.fail(HornetQMessageBundle.BUNDLE.connectionsForUserClosedByManagement(userName)); + connection.fail(ActiveMQMessageBundle.BUNDLE.connectionsForUserClosedByManagement(userName)); closed = true; } } @@ -1414,7 +1414,7 @@ public class HornetQServerControlImpl extends AbstractControl implements HornetQ /* (non-Javadoc) - * @see org.apache.activemq.api.core.management.HornetQServerControl#listProducersInfoAsJSON() + * @see org.apache.activemq.api.core.management.ActiveMQServerControl#listProducersInfoAsJSON() */ public String listProducersInfoAsJSON() throws Exception { @@ -2136,14 +2136,14 @@ public class HornetQServerControlImpl extends AbstractControl implements HornetQ @Override protected MBeanOperationInfo[] fillMBeanOperationInfo() { - return MBeanInfoHelper.getMBeanOperationsInfo(HornetQServerControl.class); + return MBeanInfoHelper.getMBeanOperationsInfo(ActiveMQServerControl.class); } private void checkStarted() { if (!server.isStarted()) { - throw new IllegalStateException("HornetQ Server is not started. It can not be managed yet"); + throw new IllegalStateException("ActiveMQ Server is not started. It can not be managed yet"); } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/management/impl/QueueControlImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/management/impl/QueueControlImpl.java index d021712108..34174d9bf1 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/management/impl/QueueControlImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/management/impl/QueueControlImpl.java @@ -32,7 +32,7 @@ import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.server.Consumer; -import org.apache.activemq.core.server.HornetQMessageBundle; +import org.apache.activemq.core.server.ActiveMQMessageBundle; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.ServerConsumer; @@ -696,7 +696,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl if (binding == null) { - throw HornetQMessageBundle.BUNDLE.noQueueFound(otherQueueName); + throw ActiveMQMessageBundle.BUNDLE.noQueueFound(otherQueueName); } return queue.moveReference(messageID, binding.getAddress(), rejectDuplicates); @@ -726,7 +726,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl if (binding == null) { - throw HornetQMessageBundle.BUNDLE.noQueueFound(otherQueueName); + throw ActiveMQMessageBundle.BUNDLE.noQueueFound(otherQueueName); } int retValue = queue.moveReferences(flushLimit, filter, binding.getAddress(), rejectDuplicates); @@ -786,7 +786,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { if (newPriority < 0 || newPriority > 9) { - throw HornetQMessageBundle.BUNDLE.invalidNewPriority(newPriority); + throw ActiveMQMessageBundle.BUNDLE.invalidNewPriority(newPriority); } Filter filter = FilterImpl.createFilter(filterStr); @@ -807,7 +807,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { if (newPriority < 0 || newPriority > 9) { - throw HornetQMessageBundle.BUNDLE.invalidNewPriority(newPriority); + throw ActiveMQMessageBundle.BUNDLE.invalidNewPriority(newPriority); } return queue.changeReferencePriority(messageID, (byte) newPriority); } @@ -1044,7 +1044,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { if (!postOffice.isStarted()) { - throw new IllegalStateException("HornetQ Server is not started. Queue can not be managed yet"); + throw new IllegalStateException("ActiveMQ Server is not started. Queue can not be managed yet"); } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/messagecounter/impl/MessageCounterHelper.java b/activemq-server/src/main/java/org/apache/activemq/core/messagecounter/impl/MessageCounterHelper.java index becf9713b5..94a14f1703 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/messagecounter/impl/MessageCounterHelper.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/messagecounter/impl/MessageCounterHelper.java @@ -60,7 +60,7 @@ public class MessageCounterHelper } String ret0 = - "\n" + "" + "
\n" + "" + "" + "" + "" @@ -136,7 +136,7 @@ public class MessageCounterHelper ret.append("
  • "); // table header - ret.append("
  • TypeNameSubscription
    \n"); + ret.append("
    \n"); ret.append(""); for (int j = 0; j < 24; j++) diff --git a/activemq-server/src/main/java/org/apache/activemq/core/paging/PagingManager.java b/activemq-server/src/main/java/org/apache/activemq/core/paging/PagingManager.java index f42f1614f9..2bffb46a81 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/paging/PagingManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/paging/PagingManager.java @@ -15,7 +15,7 @@ package org.apache.activemq.core.paging; import java.util.Map; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.core.settings.HierarchicalRepositoryChangeListener; /** @@ -36,7 +36,7 @@ import org.apache.activemq.core.settings.HierarchicalRepositoryChangeListener; * @author Tim Fox * @author Clebert Suconic * @see PagingManager */ -public interface PagingStore extends HornetQComponent +public interface PagingStore extends ActiveMQComponent { SimpleString getAddress(); @@ -103,7 +103,7 @@ public interface PagingStore extends HornetQComponent * The file will still exist until Page.delete is called, * So, case the system is reloaded the same Page will be loaded back if delete is not called. * - * @throws Exception Note: This should still be part of the interface, even though HornetQ only uses through the + * @throws Exception Note: This should still be part of the interface, even though ActiveMQ only uses through the */ Page depage() throws Exception; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/PagedReferenceImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/PagedReferenceImpl.java index fd9257e9de..35ab54b8b7 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/PagedReferenceImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/PagedReferenceImpl.java @@ -17,7 +17,7 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.activemq.api.core.Message; import org.apache.activemq.core.paging.PagedMessage; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.ServerMessage; @@ -29,7 +29,7 @@ import org.apache.activemq.core.server.ServerMessage; */ public class PagedReferenceImpl implements PagedReference { - private static final boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); private final PagePosition position; @@ -169,7 +169,7 @@ public class PagedReferenceImpl implements PagedReference deliveryCount.incrementAndGet(); if (isTrace) { - HornetQServerLogger.LOGGER.trace("++deliveryCount = " + deliveryCount + " for " + this, new Exception("trace")); + ActiveMQServerLogger.LOGGER.trace("++deliveryCount = " + deliveryCount + " for " + this, new Exception("trace")); } } @@ -180,7 +180,7 @@ public class PagedReferenceImpl implements PagedReference deliveryCount.decrementAndGet(); if (isTrace) { - HornetQServerLogger.LOGGER.trace("--deliveryCount = " + deliveryCount + " for " + this, new Exception("trace")); + ActiveMQServerLogger.LOGGER.trace("--deliveryCount = " + deliveryCount + " for " + this, new Exception("trace")); } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/impl/PageCursorProviderImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/impl/PageCursorProviderImpl.java index 842c22017c..e5eec98eee 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/impl/PageCursorProviderImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/impl/PageCursorProviderImpl.java @@ -31,7 +31,7 @@ import org.apache.activemq.core.paging.cursor.PagedReference; import org.apache.activemq.core.paging.cursor.PagedReferenceImpl; import org.apache.activemq.core.paging.impl.Page; import org.apache.activemq.core.persistence.StorageManager; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.transaction.Transaction; import org.apache.activemq.core.transaction.impl.TransactionImpl; import org.apache.activemq.utils.FutureLatch; @@ -50,7 +50,7 @@ public class PageCursorProviderImpl implements PageCursorProvider { // Constants ----------------------------------------------------- - boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); // Attributes ---------------------------------------------------- @@ -91,9 +91,9 @@ public class PageCursorProviderImpl implements PageCursorProvider public synchronized PageSubscription createSubscription(long cursorID, Filter filter, boolean persistent) { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace(this.pagingStore.getAddress() + " creating subscription " + cursorID + " with filter " + filter, new Exception("trace")); + ActiveMQServerLogger.LOGGER.trace(this.pagingStore.getAddress() + " creating subscription " + cursorID + " with filter " + filter, new Exception("trace")); } if (activeCursors.containsKey(cursorID)) @@ -160,7 +160,7 @@ public class PageCursorProviderImpl implements PageCursorProvider cache.lock(); if (isTrace) { - HornetQServerLogger.LOGGER.trace("adding " + pageId + " into cursor = " + this.pagingStore.getAddress()); + ActiveMQServerLogger.LOGGER.trace("adding " + pageId + " into cursor = " + this.pagingStore.getAddress()); } softCache.put(pageId, cache); } @@ -285,7 +285,7 @@ public class PageCursorProviderImpl implements PageCursorProvider while (!future.await(10000)) { - HornetQServerLogger.LOGGER.timedOutStoppingPagingCursor(future, executor); + ActiveMQServerLogger.LOGGER.timedOutStoppingPagingCursor(future, executor); } } @@ -355,7 +355,7 @@ public class PageCursorProviderImpl implements PageCursorProvider } catch (Exception e) { - HornetQServerLogger.LOGGER.warn("Error while cleaning paging on queue " + sub.getQueue().getName(), e); + ActiveMQServerLogger.LOGGER.warn("Error while cleaning paging on queue " + sub.getQueue().getName(), e); } } @@ -365,7 +365,7 @@ public class PageCursorProviderImpl implements PageCursorProvider } catch (Exception e) { - HornetQServerLogger.LOGGER.warn("Error while cleaning page, during the commit", e); + ActiveMQServerLogger.LOGGER.warn("Error while cleaning page, during the commit", e); } } @@ -408,9 +408,9 @@ public class PageCursorProviderImpl implements PageCursorProvider return; } - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Asserting cleanup for address " + this.pagingStore.getAddress()); + ActiveMQServerLogger.LOGGER.debug("Asserting cleanup for address " + this.pagingStore.getAddress()); } ArrayList cursorList = cloneSubscriptions(); @@ -427,9 +427,9 @@ public class PageCursorProviderImpl implements PageCursorProvider { if (!cursor.isComplete(minPage)) { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Cursor " + cursor + " was considered incomplete at page " + minPage); + ActiveMQServerLogger.LOGGER.debug("Cursor " + cursor + " was considered incomplete at page " + minPage); } complete = false; @@ -437,9 +437,9 @@ public class PageCursorProviderImpl implements PageCursorProvider } else { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Cursor " + cursor + "was considered **complete** at page " + minPage); + ActiveMQServerLogger.LOGGER.debug("Cursor " + cursor + "was considered **complete** at page " + minPage); } } } @@ -453,9 +453,9 @@ public class PageCursorProviderImpl implements PageCursorProvider if (complete) { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Address " + pagingStore.getAddress() + + ActiveMQServerLogger.LOGGER.debug("Address " + pagingStore.getAddress() + " is leaving page mode as all messages are consumed and acknowledged from the page store"); } @@ -486,9 +486,9 @@ public class PageCursorProviderImpl implements PageCursorProvider } else { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("Couldn't cleanup page on address " + this.pagingStore.getAddress() + + ActiveMQServerLogger.LOGGER.trace("Couldn't cleanup page on address " + this.pagingStore.getAddress() + " as numberOfPages == " + pagingStore.getNumberOfPages() + " and currentPage.numberOfMessages = " + @@ -498,7 +498,7 @@ public class PageCursorProviderImpl implements PageCursorProvider } catch (Exception ex) { - HornetQServerLogger.LOGGER.problemCleaningPageAddress(ex, pagingStore.getAddress()); + ActiveMQServerLogger.LOGGER.problemCleaningPageAddress(ex, pagingStore.getAddress()); return; } finally @@ -520,7 +520,7 @@ public class PageCursorProviderImpl implements PageCursorProvider if (isTrace) { - HornetQServerLogger.LOGGER.trace("Removing page " + depagedPage.getPageId() + " from page-cache"); + ActiveMQServerLogger.LOGGER.trace("Removing page " + depagedPage.getPageId() + " from page-cache"); } if (cache == null) @@ -567,7 +567,7 @@ public class PageCursorProviderImpl implements PageCursorProvider } catch (Exception ex) { - HornetQServerLogger.LOGGER.problemCleaningPageAddress(ex, pagingStore.getAddress()); + ActiveMQServerLogger.LOGGER.problemCleaningPageAddress(ex, pagingStore.getAddress()); return; } @@ -608,7 +608,7 @@ public class PageCursorProviderImpl implements PageCursorProvider while (!storageManager.waitOnOperations(5000)) { - HornetQServerLogger.LOGGER.problemCompletingOperations(storageManager.getContext()); + ActiveMQServerLogger.LOGGER.problemCompletingOperations(storageManager.getContext()); } } finally @@ -651,9 +651,9 @@ public class PageCursorProviderImpl implements PageCursorProvider for (PageSubscription cursor : cursorList) { long firstPage = cursor.getFirstPage(); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(this.pagingStore.getAddress() + " has a cursor " + cursor + " with first page=" + firstPage); + ActiveMQServerLogger.LOGGER.debug(this.pagingStore.getAddress() + " has a cursor " + cursor + " with first page=" + firstPage); } // the cursor will return -1 if the cursor is empty @@ -663,9 +663,9 @@ public class PageCursorProviderImpl implements PageCursorProvider } } - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(this.pagingStore.getAddress() + " has minPage=" + minPage); + ActiveMQServerLogger.LOGGER.debug(this.pagingStore.getAddress() + " has minPage=" + minPage); } return minPage; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/impl/PageSubscriptionCounterImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/impl/PageSubscriptionCounterImpl.java index 57f43ea50b..1beb556c2d 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/impl/PageSubscriptionCounterImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/impl/PageSubscriptionCounterImpl.java @@ -25,7 +25,7 @@ import org.apache.activemq.core.paging.cursor.PageSubscription; import org.apache.activemq.core.paging.cursor.PageSubscriptionCounter; import org.apache.activemq.core.paging.impl.Page; import org.apache.activemq.core.persistence.StorageManager; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.transaction.Transaction; import org.apache.activemq.core.transaction.TransactionOperation; import org.apache.activemq.core.transaction.TransactionOperationAbstract; @@ -39,7 +39,7 @@ import org.apache.activemq.core.transaction.impl.TransactionImpl; */ public class PageSubscriptionCounterImpl implements PageSubscriptionCounter { - private static final boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); private static final int FLUSH_COUNTER = 1000; @@ -364,7 +364,7 @@ public class PageSubscriptionCounterImpl implements PageSubscriptionCounter if (isTrace) { - HornetQServerLogger.LOGGER.trace("Replacing page-counter record = " + recordID + " by record = " + newRecordID + " on subscriptionID = " + this.subscriptionID + " for queue = " + this.subscription.getQueue().getName()); + ActiveMQServerLogger.LOGGER.trace("Replacing page-counter record = " + recordID + " by record = " + newRecordID + " on subscriptionID = " + this.subscriptionID + " for queue = " + this.subscription.getQueue().getName()); } storage.commit(txCleanup); @@ -373,7 +373,7 @@ public class PageSubscriptionCounterImpl implements PageSubscriptionCounter { newRecordID = recordID; - HornetQServerLogger.LOGGER.problemCleaningPagesubscriptionCounter(e); + ActiveMQServerLogger.LOGGER.problemCleaningPagesubscriptionCounter(e); try { storage.rollback(txCleanup); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/impl/PageSubscriptionImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/impl/PageSubscriptionImpl.java index 2f93ffeeac..f92a8e64a0 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/impl/PageSubscriptionImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/paging/cursor/impl/PageSubscriptionImpl.java @@ -41,7 +41,7 @@ import org.apache.activemq.core.paging.cursor.PageSubscriptionCounter; import org.apache.activemq.core.paging.cursor.PagedReference; import org.apache.activemq.core.paging.impl.Page; import org.apache.activemq.core.persistence.StorageManager; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.ServerMessage; @@ -60,7 +60,7 @@ import org.apache.activemq.utils.LinkedListIterator; */ final class PageSubscriptionImpl implements PageSubscription { - private final boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); private boolean empty = true; @@ -229,7 +229,7 @@ final class PageSubscriptionImpl implements PageSubscription } catch (Exception e) { - HornetQServerLogger.LOGGER.problemCleaningCursorPages(e); + ActiveMQServerLogger.LOGGER.problemCleaningCursorPages(e); } finally { @@ -285,7 +285,7 @@ final class PageSubscriptionImpl implements PageSubscription if (currentPage != null && entry.getKey() == pageStore.getCurrentPage().getPageId() && currentPage.isLive()) { - HornetQServerLogger.LOGGER.trace("We can't clear page " + entry.getKey() + + ActiveMQServerLogger.LOGGER.trace("We can't clear page " + entry.getKey() + " now since it's the current page"); } else @@ -533,7 +533,7 @@ final class PageSubscriptionImpl implements PageSubscription public void onError(final int errorCode, final String errorMessage) { error = " errorCode=" + errorCode + ", msg=" + errorMessage; - HornetQServerLogger.LOGGER.pageSubscriptionError(this, error); + ActiveMQServerLogger.LOGGER.pageSubscriptionError(this, error); } @Override @@ -737,7 +737,7 @@ final class PageSubscriptionImpl implements PageSubscription { if (isTrace) { - HornetQServerLogger.LOGGER.trace("********** processing reload!!!!!!!"); + ActiveMQServerLogger.LOGGER.trace("********** processing reload!!!!!!!"); } Collections.sort(recoveredACK); @@ -750,7 +750,7 @@ final class PageSubscriptionImpl implements PageSubscription if (pageInfo == null) { - HornetQServerLogger.LOGGER.pageNotFound(pos); + ActiveMQServerLogger.LOGGER.pageNotFound(pos); if (txDeleteCursorOnReload == -1) { txDeleteCursorOnReload = store.generateID(); @@ -779,7 +779,7 @@ final class PageSubscriptionImpl implements PageSubscription executor.execute(future); while (!future.await(1000)) { - HornetQServerLogger.LOGGER.timedOutFlushingExecutorsPagingCursor(this); + ActiveMQServerLogger.LOGGER.timedOutFlushingExecutorsPagingCursor(this); } } @@ -821,7 +821,7 @@ final class PageSubscriptionImpl implements PageSubscription } catch (Exception e) { - HornetQServerLogger.LOGGER.warn("Error while deleting page-complete-record", e); + ActiveMQServerLogger.LOGGER.warn("Error while deleting page-complete-record", e); } info.setCompleteInfo(null); } @@ -835,7 +835,7 @@ final class PageSubscriptionImpl implements PageSubscription } catch (Exception e) { - HornetQServerLogger.LOGGER.warn("Error while deleting page-complete-record", e); + ActiveMQServerLogger.LOGGER.warn("Error while deleting page-complete-record", e); } } } @@ -906,13 +906,13 @@ final class PageSubscriptionImpl implements PageSubscription { if (isTrace) { - HornetQServerLogger.LOGGER.trace("a new position is being processed as ACK"); + ActiveMQServerLogger.LOGGER.trace("a new position is being processed as ACK"); } if (lastAckedPosition != null && lastAckedPosition.getPageNr() != pos.getPageNr()) { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Scheduling cleanup on pageSubscription for address = " + pageStore.getAddress() + " queue = " + this.getQueue().getName()); + ActiveMQServerLogger.LOGGER.trace("Scheduling cleanup on pageSubscription for address = " + pageStore.getAddress() + " queue = " + this.getQueue().getName()); } // there's a different page being acked, we will do the check right away @@ -930,7 +930,7 @@ final class PageSubscriptionImpl implements PageSubscription { // This could become null if the page file was deleted, or if the queue was removed maybe? // it's better to diagnose it (based on support tickets) instead of NPE - HornetQServerLogger.LOGGER.warn("PageCursorInfo == null on address " + this.getPagingStore().getAddress() + ", pos = " + pos + ", queue = " + cursorId); + ActiveMQServerLogger.LOGGER.warn("PageCursorInfo == null on address " + this.getPagingStore().getAddress() + ", pos = " + pos + ", queue = " + cursorId); } else { @@ -1130,7 +1130,7 @@ final class PageSubscriptionImpl implements PageSubscription if (isTrace) { - HornetQServerLogger.LOGGER.trace("numberOfMessages = " + getNumberOfMessages() + + ActiveMQServerLogger.LOGGER.trace("numberOfMessages = " + getNumberOfMessages() + " confirmed = " + (confirmed.get() + 1) + " pendingTX = " + pendingTX + @@ -1379,7 +1379,7 @@ final class PageSubscriptionImpl implements PageSubscription .getTransactionID()); if (tx == null) { - HornetQServerLogger.LOGGER.pageSubscriptionCouldntLoad(message.getPagedMessage().getTransactionID(), + ActiveMQServerLogger.LOGGER.pageSubscriptionCouldntLoad(message.getPagedMessage().getTransactionID(), message.getPosition(), pageStore.getAddress(), queue.getName()); valid = false; ignored = true; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/Page.java b/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/Page.java index 883ef3b881..95f9d32462 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/Page.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/Page.java @@ -27,8 +27,8 @@ import org.apache.activemq.core.paging.PagedMessage; import org.apache.activemq.core.paging.cursor.LivePageCache; import org.apache.activemq.core.paging.cursor.PageSubscriptionCounter; import org.apache.activemq.core.persistence.StorageManager; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.LargeServerMessage; import org.apache.activemq.utils.ConcurrentHashSet; import org.apache.activemq.utils.DataConstants; @@ -39,8 +39,8 @@ import org.apache.activemq.utils.DataConstants; public final class Page implements Comparable { // Constants ----------------------------------------------------- - private static final boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); - private static final boolean isDebug = HornetQServerLogger.LOGGER.isDebugEnabled(); + private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean isDebug = ActiveMQServerLogger.LOGGER.isDebugEnabled(); public static final int SIZE_RECORD = DataConstants.SIZE_BYTE + DataConstants.SIZE_INT + DataConstants.SIZE_BYTE; @@ -103,12 +103,12 @@ public final class Page implements Comparable { if (isDebug) { - HornetQServerLogger.LOGGER.debug("reading page " + this.pageId + " on address = " + storeName); + ActiveMQServerLogger.LOGGER.debug("reading page " + this.pageId + " on address = " + storeName); } if (!file.isOpen()) { - throw HornetQMessageBundle.BUNDLE.invalidPageIO(); + throw ActiveMQMessageBundle.BUNDLE.invalidPageIO(); } ArrayList messages = new ArrayList(); @@ -156,7 +156,7 @@ public final class Page implements Comparable msg.initMessage(storage); if (isTrace) { - HornetQServerLogger.LOGGER.trace("Reading message " + msg + " on pageId=" + this.pageId + " for address=" + storeName); + ActiveMQServerLogger.LOGGER.trace("Reading message " + msg + " on pageId=" + this.pageId + " for address=" + storeName); } messages.add(msg); } @@ -277,7 +277,7 @@ public final class Page implements Comparable if (isDebug) { - HornetQServerLogger.LOGGER.debug("Deleting pageId=" + pageId + " on store " + storeName); + ActiveMQServerLogger.LOGGER.debug("Deleting pageId=" + pageId + " on store " + storeName); } if (messages != null) @@ -300,7 +300,7 @@ public final class Page implements Comparable { if (suspiciousRecords) { - HornetQServerLogger.LOGGER.pageInvalid(file.getFileName(), file.getFileName()); + ActiveMQServerLogger.LOGGER.pageInvalid(file.getFileName(), file.getFileName()); file.renameTo(file.getFileName() + ".invalidPage"); } else @@ -312,7 +312,7 @@ public final class Page implements Comparable } catch (Exception e) { - HornetQServerLogger.LOGGER.pageDeleteError(e); + ActiveMQServerLogger.LOGGER.pageDeleteError(e); return false; } } @@ -351,7 +351,7 @@ public final class Page implements Comparable } catch (Exception e) { - HornetQServerLogger.LOGGER.pageFinaliseError(e); + ActiveMQServerLogger.LOGGER.pageFinaliseError(e); } } @@ -385,7 +385,7 @@ public final class Page implements Comparable */ private void markFileAsSuspect(final String fileName, final int position, final int msgNumber) { - HornetQServerLogger.LOGGER.pageSuspectFile(fileName, position, msgNumber); + ActiveMQServerLogger.LOGGER.pageSuspectFile(fileName, position, msgNumber); suspiciousRecords = true; } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PageTransactionInfoImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PageTransactionInfoImpl.java index dd172db65e..ea17a60b4a 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PageTransactionInfoImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PageTransactionInfoImpl.java @@ -25,7 +25,7 @@ import org.apache.activemq.core.paging.PagingManager; import org.apache.activemq.core.paging.cursor.PagePosition; import org.apache.activemq.core.paging.cursor.PageSubscription; import org.apache.activemq.core.persistence.StorageManager; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.transaction.Transaction; import org.apache.activemq.core.transaction.TransactionOperationAbstract; import org.apache.activemq.core.transaction.TransactionPropertyIndexes; @@ -98,7 +98,7 @@ public final class PageTransactionInfoImpl implements PageTransactionInfo } catch (Exception e) { - HornetQServerLogger.LOGGER.pageTxDeleteError(e, recordID); + ActiveMQServerLogger.LOGGER.pageTxDeleteError(e, recordID); } pagingManager.removeTransaction(this.transactionID); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagingManagerImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagingManagerImpl.java index ea87e288d7..fb7549f7f7 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagingManagerImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagingManagerImpl.java @@ -24,7 +24,7 @@ import org.apache.activemq.core.paging.PageTransactionInfo; import org.apache.activemq.core.paging.PagingManager; import org.apache.activemq.core.paging.PagingStore; import org.apache.activemq.core.paging.PagingStoreFactory; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.settings.HierarchicalRepository; import org.apache.activemq.core.settings.impl.AddressSettings; @@ -59,7 +59,7 @@ public final class PagingManagerImpl implements PagingManager // Static // -------------------------------------------------------------------------------------------------------------------------- - private static boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); // Constructors // -------------------------------------------------------------------------------------------------------------------- @@ -200,7 +200,7 @@ public final class PagingManagerImpl implements PagingManager { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Adding pageTransaction " + pageTransaction.getTransactionID()); + ActiveMQServerLogger.LOGGER.trace("Adding pageTransaction " + pageTransaction.getTransactionID()); } transactions.put(pageTransaction.getTransactionID(), pageTransaction); } @@ -209,7 +209,7 @@ public final class PagingManagerImpl implements PagingManager { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Removing pageTransaction " + id); + ActiveMQServerLogger.LOGGER.trace("Removing pageTransaction " + id); } transactions.remove(id); } @@ -218,7 +218,7 @@ public final class PagingManagerImpl implements PagingManager { if (isTrace) { - HornetQServerLogger.LOGGER.trace("looking up pageTX = " + id); + ActiveMQServerLogger.LOGGER.trace("looking up pageTX = " + id); } return transactions.get(id); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagingStoreFactoryNIO.java b/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagingStoreFactoryNIO.java index 7a427baba4..fe6361361c 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagingStoreFactoryNIO.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagingStoreFactoryNIO.java @@ -32,7 +32,7 @@ import org.apache.activemq.core.paging.PagingManager; import org.apache.activemq.core.paging.PagingStore; import org.apache.activemq.core.paging.PagingStoreFactory; import org.apache.activemq.core.persistence.StorageManager; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.settings.HierarchicalRepository; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.utils.ExecutorFactory; @@ -164,7 +164,7 @@ public class PagingStoreFactoryNIO implements PagingStoreFactory if (!addressFile.exists()) { - HornetQServerLogger.LOGGER.pageStoreFactoryNoIdFile(file.toString(), PagingStoreFactoryNIO.ADDRESS_FILE); + ActiveMQServerLogger.LOGGER.pageStoreFactoryNoIdFile(file.toString(), PagingStoreFactoryNIO.ADDRESS_FILE); continue; } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagingStoreImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagingStoreImpl.java index 7609165740..d0c8ae16c5 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagingStoreImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagingStoreImpl.java @@ -26,8 +26,8 @@ import org.apache.activemq.core.paging.cursor.impl.LivePageCacheImpl; import org.apache.activemq.core.paging.cursor.impl.PageCursorProviderImpl; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.replication.ReplicationManager; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.LargeServerMessage; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.RouteContextList; @@ -118,7 +118,7 @@ public class PagingStoreImpl implements PagingStore private volatile AtomicBoolean blocking = new AtomicBoolean(false); - private static final boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); public PagingStoreImpl(final SimpleString address, final ScheduledExecutorService scheduledExecutor, @@ -391,7 +391,7 @@ public class PagingStoreImpl implements PagingStore if (!future.await(60000)) { - HornetQServerLogger.LOGGER.pageStoreTimeout(address); + ActiveMQServerLogger.LOGGER.pageStoreTimeout(address); } } @@ -550,7 +550,7 @@ public class PagingStoreImpl implements PagingStore { // If not possible to starting page due to an IO error, we will just consider it non paging. // This shouldn't happen anyway - HornetQServerLogger.LOGGER.pageStoreStartIOError(e); + ActiveMQServerLogger.LOGGER.pageStoreStartIOError(e); return false; } } @@ -661,7 +661,7 @@ public class PagingStoreImpl implements PagingStore returnPage.delete(null); // This will trigger this address to exit the page mode, - // and this will make HornetQ start using the journal again + // and this will make ActiveMQ start using the journal again return null; } else @@ -747,7 +747,7 @@ public class PagingStoreImpl implements PagingStore } else if (!blocking.get()) { - HornetQServerLogger.LOGGER.blockingMessageProduction(address, sizeInBytes.get(), maxSize); + ActiveMQServerLogger.LOGGER.blockingMessageProduction(address, sizeInBytes.get(), maxSize); blocking.set(true); } @@ -782,7 +782,7 @@ public class PagingStoreImpl implements PagingStore executor.execute(memoryFreedRunnablesExecutor); if (blocking.get()) { - HornetQServerLogger.LOGGER.unblockingMessageProduction(address, sizeInBytes.get(), maxSize); + ActiveMQServerLogger.LOGGER.unblockingMessageProduction(address, sizeInBytes.get(), maxSize); blocking.set(false); } } @@ -801,7 +801,7 @@ public class PagingStoreImpl implements PagingStore { if (startPaging()) { - HornetQServerLogger.LOGGER.pageStoreStart(storeName, addressSize, maxSize); + ActiveMQServerLogger.LOGGER.pageStoreStart(storeName, addressSize, maxSize); } } } @@ -835,7 +835,7 @@ public class PagingStoreImpl implements PagingStore { printedDropMessagesWarning = true; - HornetQServerLogger.LOGGER.pageStoreDropMessages(storeName, sizeInBytes.get(), maxSize); + ActiveMQServerLogger.LOGGER.pageStoreDropMessages(storeName, sizeInBytes.get(), maxSize); } if (message.isLargeMessage()) @@ -845,7 +845,7 @@ public class PagingStoreImpl implements PagingStore if (addressFullMessagePolicy == AddressFullMessagePolicy.FAIL) { - throw HornetQMessageBundle.BUNDLE.addressIsFull(address.toString()); + throw ActiveMQMessageBundle.BUNDLE.addressIsFull(address.toString()); } // Address is full, we just pretend we are paging, and drop the data @@ -933,7 +933,7 @@ public class PagingStoreImpl implements PagingStore if (isTrace) { - HornetQServerLogger.LOGGER.trace("Paging message " + pagedMessage + " on pageStore " + this.getStoreName() + + ActiveMQServerLogger.LOGGER.trace("Paging message " + pagedMessage + " on pageStore " + this.getStoreName() + " pageId=" + currentPage.getPageId()); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/persistence/StorageManager.java b/activemq-server/src/main/java/org/apache/activemq/core/persistence/StorageManager.java index 77415a4fb4..02b9345188 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/persistence/StorageManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/persistence/StorageManager.java @@ -37,7 +37,7 @@ import org.apache.activemq.core.persistence.impl.PageCountPending; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.replication.ReplicationManager; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.core.server.LargeServerMessage; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.RouteContextList; @@ -64,7 +64,7 @@ import org.apache.activemq.utils.IDGenerator; * */ -public interface StorageManager extends IDGenerator, HornetQComponent +public interface StorageManager extends IDGenerator, ActiveMQComponent { /** @@ -405,7 +405,7 @@ public interface StorageManager extends IDGenerator, HornetQComponent * Closes the {@link org.apache.activemq.utils.IDGenerator} persisting the current record ID. *

    * Effectively a "pre-stop" method. Necessary due to the "stop"-order at - * {@link org.apache.activemq.core.server.impl.HornetQServerImpl} + * {@link org.apache.activemq.core.server.impl.ActiveMQServerImpl} */ void persistIdGenerator(); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/BatchingIDGenerator.java b/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/BatchingIDGenerator.java index 07d6121c4c..09fd1a7671 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/BatchingIDGenerator.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/BatchingIDGenerator.java @@ -17,7 +17,7 @@ import java.util.concurrent.atomic.AtomicLong; import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.persistence.StorageManager; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.utils.DataConstants; import org.apache.activemq.utils.IDGenerator; @@ -101,7 +101,7 @@ public final class BatchingIDGenerator implements IDGenerator } catch (Exception e) { - HornetQServerLogger.LOGGER.batchingIdError(e); + ActiveMQServerLogger.LOGGER.batchingIdError(e); } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/DescribeJournal.java b/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/DescribeJournal.java index 836b2be645..e03f311c46 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/DescribeJournal.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/DescribeJournal.java @@ -86,7 +86,7 @@ public final class DescribeJournal SequentialFileFactory bindingsFF = new NIOSequentialFileFactory(bindingsDir, null); - JournalImpl bindings = new JournalImpl(1024 * 1024, 2, -1, 0, bindingsFF, "hornetq-bindings", "bindings", 1); + JournalImpl bindings = new JournalImpl(1024 * 1024, 2, -1, 0, bindingsFF, "activemq-bindings", "bindings", 1); describeJournal(bindingsFF, bindings, bindingsDir); } @@ -103,8 +103,8 @@ public final class DescribeJournal 0, 0, messagesFF, - "hornetq-data", - "hq", + "activemq-data", + "amq", 1); describeJournal(messagesFF, messagesJournal, messagesDir); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/JournalStorageManager.java b/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/JournalStorageManager.java index 039eca2ba8..2c630ed2d3 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/JournalStorageManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/JournalStorageManager.java @@ -88,8 +88,8 @@ import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationLiveIsStoppingMessage.LiveStopping; import org.apache.activemq.core.replication.ReplicatedJournal; import org.apache.activemq.core.replication.ReplicationManager; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.JournalType; import org.apache.activemq.core.server.LargeServerMessage; import org.apache.activemq.core.server.MessageReference; @@ -110,7 +110,7 @@ import org.apache.activemq.utils.Base64; import org.apache.activemq.utils.ByteUtil; import org.apache.activemq.utils.DataConstants; import org.apache.activemq.utils.ExecutorFactory; -import org.apache.activemq.utils.HornetQThreadFactory; +import org.apache.activemq.utils.ActiveMQThreadFactory; import org.apache.activemq.utils.XidCodecSupport; import static org.apache.activemq.core.persistence.impl.journal.JournalRecordIds.ACKNOWLEDGE_CURSOR; @@ -235,7 +235,7 @@ public class JournalStorageManager implements StorageManager if (config.getJournalType() != JournalType.NIO && config.getJournalType() != JournalType.ASYNCIO) { - throw HornetQMessageBundle.BUNDLE.invalidJournal(); + throw ActiveMQMessageBundle.BUNDLE.invalidJournal(); } bindingsDir = config.getBindingsDirectory(); @@ -255,7 +255,7 @@ public class JournalStorageManager implements StorageManager config.getJournalCompactMinFiles(), config.getJournalCompactPercentage(), bindingsFF, - "hornetq-bindings", + "activemq-bindings", "bindings", 1); @@ -275,7 +275,7 @@ public class JournalStorageManager implements StorageManager if (config.getJournalType() == JournalType.ASYNCIO) { - HornetQServerLogger.LOGGER.journalUseAIO(); + ActiveMQServerLogger.LOGGER.journalUseAIO(); journalFF = new AIOSequentialFileFactory(journalDir, config.getJournalBufferSize_AIO(), @@ -285,7 +285,7 @@ public class JournalStorageManager implements StorageManager } else if (config.getJournalType() == JournalType.NIO) { - HornetQServerLogger.LOGGER.journalUseNIO(); + ActiveMQServerLogger.LOGGER.journalUseNIO(); journalFF = new NIOSequentialFileFactory(journalDir, true, config.getJournalBufferSize_NIO(), @@ -295,7 +295,7 @@ public class JournalStorageManager implements StorageManager } else { - throw HornetQMessageBundle.BUNDLE.invalidJournalType2(config.getJournalType()); + throw ActiveMQMessageBundle.BUNDLE.invalidJournalType2(config.getJournalType()); } idGenerator = new BatchingIDGenerator(0, JournalStorageManager.CHECKPOINT_BATCH_SIZE, this); @@ -305,8 +305,8 @@ public class JournalStorageManager implements StorageManager config.getJournalCompactMinFiles(), config.getJournalCompactPercentage(), journalFF, - "hornetq-data", - "hq", + "activemq-data", + "amq", config.getJournalType() == JournalType.ASYNCIO ? config.getJournalMaxIO_AIO() : config.getJournalMaxIO_NIO()); @@ -370,7 +370,7 @@ public class JournalStorageManager implements StorageManager if (!(messageJournal instanceof JournalImpl) || !(bindingsJournal instanceof JournalImpl)) { - throw HornetQMessageBundle.BUNDLE.notJournalImpl(); + throw ActiveMQMessageBundle.BUNDLE.notJournalImpl(); } @@ -512,7 +512,7 @@ public class JournalStorageManager implements StorageManager } catch (Exception e) { - HornetQServerLogger.LOGGER.errorStoppingReplicationManager(e); + ActiveMQServerLogger.LOGGER.errorStoppingReplicationManager(e); } replicator = null; // delete inside the writeLock. Avoids a lot of state checking and races with @@ -540,7 +540,7 @@ public class JournalStorageManager implements StorageManager } catch (Exception e) { - HornetQServerLogger.LOGGER.journalErrorDeletingMessage(e, largeMsgId); + ActiveMQServerLogger.LOGGER.journalErrorDeletingMessage(e, largeMsgId); } if (replicator != null) { @@ -664,7 +664,7 @@ public class JournalStorageManager implements StorageManager { if (!started) { - HornetQServerLogger.LOGGER.serverIsStopped(); + ActiveMQServerLogger.LOGGER.serverIsStopped(); throw new IllegalStateException("Server is stopped"); } waitOnOperations(0); @@ -675,7 +675,7 @@ public class JournalStorageManager implements StorageManager { if (!started) { - HornetQServerLogger.LOGGER.serverIsStopped(); + ActiveMQServerLogger.LOGGER.serverIsStopped(); throw new IllegalStateException("Server is stopped"); } return getContext().waitCompletion(timeout); @@ -898,7 +898,7 @@ public class JournalStorageManager implements StorageManager if (message.getMessageID() <= 0) { // Sanity check only... this shouldn't happen unless there is a bug - throw HornetQMessageBundle.BUNDLE.messageIdNotAssigned(); + throw ActiveMQMessageBundle.BUNDLE.messageIdNotAssigned(); } readLock(); @@ -1058,7 +1058,7 @@ public class JournalStorageManager implements StorageManager { if (message.getMessageID() <= 0) { - throw HornetQMessageBundle.BUNDLE.messageIdNotAssigned(); + throw ActiveMQMessageBundle.BUNDLE.messageIdNotAssigned(); } readLock(); @@ -1556,7 +1556,7 @@ public class JournalStorageManager implements StorageManager { long percent = (long) ((((double) reccount) / ((double) totalSize)) * 100f); - HornetQServerLogger.LOGGER.percentLoaded(percent); + ActiveMQServerLogger.LOGGER.percentLoaded(percent); } RecordInfo record = records.get(reccount); @@ -1622,7 +1622,7 @@ public class JournalStorageManager implements StorageManager if (message == null) { - HornetQServerLogger.LOGGER.cannotFindMessage(record.id); + ActiveMQServerLogger.LOGGER.cannotFindMessage(record.id); } else { @@ -1643,7 +1643,7 @@ public class JournalStorageManager implements StorageManager if (queueMessages == null) { - HornetQServerLogger.LOGGER.journalCannotFindQueue(encoding.queueID, messageID); + ActiveMQServerLogger.LOGGER.journalCannotFindQueue(encoding.queueID, messageID); } else { @@ -1651,7 +1651,7 @@ public class JournalStorageManager implements StorageManager if (rec == null) { - HornetQServerLogger.LOGGER.cannotFindMessage(messageID); + ActiveMQServerLogger.LOGGER.cannotFindMessage(messageID); } } @@ -1669,7 +1669,7 @@ public class JournalStorageManager implements StorageManager if (queueMessages == null) { - HornetQServerLogger.LOGGER.journalCannotFindQueueDelCount(encoding.queueID); + ActiveMQServerLogger.LOGGER.journalCannotFindQueueDelCount(encoding.queueID); } else { @@ -1677,7 +1677,7 @@ public class JournalStorageManager implements StorageManager if (rec == null) { - HornetQServerLogger.LOGGER.journalCannotFindMessageDelCount(messageID); + ActiveMQServerLogger.LOGGER.journalCannotFindMessageDelCount(messageID); } else { @@ -1724,7 +1724,7 @@ public class JournalStorageManager implements StorageManager if (queueMessages == null) { - HornetQServerLogger.LOGGER.journalCannotFindQueueScheduled(encoding.queueID, messageID); + ActiveMQServerLogger.LOGGER.journalCannotFindQueueScheduled(encoding.queueID, messageID); } else { @@ -1733,7 +1733,7 @@ public class JournalStorageManager implements StorageManager if (rec == null) { - HornetQServerLogger.LOGGER.cannotFindMessage(messageID); + ActiveMQServerLogger.LOGGER.cannotFindMessage(messageID); } else { @@ -1784,7 +1784,7 @@ public class JournalStorageManager implements StorageManager } else { - HornetQServerLogger.LOGGER.journalCannotFindQueueReloading(encoding.queueID); + ActiveMQServerLogger.LOGGER.journalCannotFindQueueReloading(encoding.queueID); messageJournal.appendDeleteRecord(record.id, false); } @@ -1805,7 +1805,7 @@ public class JournalStorageManager implements StorageManager } else { - HornetQServerLogger.LOGGER.journalCannotFindQueueReloadingPage(encoding.queueID); + ActiveMQServerLogger.LOGGER.journalCannotFindQueueReloadingPage(encoding.queueID); messageJournal.appendDeleteRecord(record.id, false); } @@ -1826,7 +1826,7 @@ public class JournalStorageManager implements StorageManager } else { - HornetQServerLogger.LOGGER.journalCannotFindQueueReloadingPageCursor(encoding.queueID); + ActiveMQServerLogger.LOGGER.journalCannotFindQueueReloadingPageCursor(encoding.queueID); messageJournal.appendDeleteRecord(record.id, false); } @@ -1848,7 +1848,7 @@ public class JournalStorageManager implements StorageManager } else { - HornetQServerLogger.LOGGER.cantFindQueueOnPageComplete(encoding.queueID); + ActiveMQServerLogger.LOGGER.cantFindQueueOnPageComplete(encoding.queueID); messageJournal.appendDeleteRecord(record.id, false); } @@ -1908,7 +1908,7 @@ public class JournalStorageManager implements StorageManager { if (msg.getRefCount() == 0) { - HornetQServerLogger.LOGGER.largeMessageWithNoRef(msg.getMessageID()); + ActiveMQServerLogger.LOGGER.largeMessageWithNoRef(msg.getMessageID()); msg.decrementDelayDeletionCount(); } } @@ -2211,7 +2211,7 @@ public class JournalStorageManager implements StorageManager } } - // HornetQComponent implementation + // ActiveMQComponent implementation // ------------------------------------------------------ public synchronized void start() throws Exception @@ -2229,7 +2229,7 @@ public class JournalStorageManager implements StorageManager cleanupIncompleteFiles(); - singleThreadExecutor = Executors.newSingleThreadExecutor(new HornetQThreadFactory("HornetQ-IO-SingleThread", + singleThreadExecutor = Executors.newSingleThreadExecutor(new ActiveMQThreadFactory("ActiveMQ-IO-SingleThread", true, getThisClassLoader())); @@ -2392,7 +2392,7 @@ public class JournalStorageManager implements StorageManager } catch (Exception e) { - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); } } } @@ -2466,7 +2466,7 @@ public class JournalStorageManager implements StorageManager } catch (Exception e) { - HornetQServerLogger.LOGGER.journalErrorDeletingMessage(e, largeServerMessage.getMessageID()); + ActiveMQServerLogger.LOGGER.journalErrorDeletingMessage(e, largeServerMessage.getMessageID()); } } @@ -2518,7 +2518,7 @@ public class JournalStorageManager implements StorageManager } else { - throw HornetQMessageBundle.BUNDLE.cannotCreateDir(dir); + throw ActiveMQMessageBundle.BUNDLE.cannotCreateDir(dir); } } } @@ -2708,13 +2708,13 @@ public class JournalStorageManager implements StorageManager } else { - HornetQServerLogger.LOGGER.journalCannotFindQueueReloadingACK(encoding.queueID); + ActiveMQServerLogger.LOGGER.journalCannotFindQueueReloadingACK(encoding.queueID); } break; } case PAGE_CURSOR_COUNTER_VALUE: { - HornetQServerLogger.LOGGER.journalPAGEOnPrepared(); + ActiveMQServerLogger.LOGGER.journalPAGEOnPrepared(); break; } @@ -2737,7 +2737,7 @@ public class JournalStorageManager implements StorageManager } else { - HornetQServerLogger.LOGGER.journalCannotFindQueueReloadingACK(encoding.queueID); + ActiveMQServerLogger.LOGGER.journalCannotFindQueueReloadingACK(encoding.queueID); } break; @@ -2745,7 +2745,7 @@ public class JournalStorageManager implements StorageManager default: { - HornetQServerLogger.LOGGER.journalInvalidRecordType(recordType); + ActiveMQServerLogger.LOGGER.journalInvalidRecordType(recordType); } } } @@ -2767,13 +2767,13 @@ public class JournalStorageManager implements StorageManager if (!pendingLargeMessages.remove(new Pair(recordDeleted.id, messageID))) { // TODO: Logging - HornetQServerLogger.LOGGER.warn("Large message " + recordDeleted.id + " wasn't found when dealing with add pending large message"); + ActiveMQServerLogger.LOGGER.warn("Large message " + recordDeleted.id + " wasn't found when dealing with add pending large message"); } installLargeMessageConfirmationOnTX(tx, recordDeleted.id); break; } default: - HornetQServerLogger.LOGGER.journalInvalidRecordTypeOnPreparedTX(b); + ActiveMQServerLogger.LOGGER.journalInvalidRecordTypeOnPreparedTX(b); } } @@ -3110,7 +3110,7 @@ public class JournalStorageManager implements StorageManager } /* (non-Javadoc) - * @see org.apache.activemq.core.journal.EncodingSupport#decode(org.apache.activemq.spi.core.remoting.HornetQBuffer) + * @see org.apache.activemq.core.journal.EncodingSupport#decode(org.apache.activemq.spi.core.remoting.ActiveMQBuffer) */ public void decode(final ActiveMQBuffer buffer) { @@ -3118,7 +3118,7 @@ public class JournalStorageManager implements StorageManager } /* (non-Javadoc) - * @see org.apache.activemq.core.journal.EncodingSupport#encode(org.apache.activemq.spi.core.remoting.HornetQBuffer) + * @see org.apache.activemq.core.journal.EncodingSupport#encode(org.apache.activemq.spi.core.remoting.ActiveMQBuffer) */ public void encode(final ActiveMQBuffer buffer) { @@ -3149,7 +3149,7 @@ public class JournalStorageManager implements StorageManager } /* (non-Javadoc) - * @see org.apache.activemq.core.journal.EncodingSupport#decode(org.apache.activemq.spi.core.remoting.HornetQBuffer) + * @see org.apache.activemq.core.journal.EncodingSupport#decode(org.apache.activemq.spi.core.remoting.ActiveMQBuffer) */ public void decode(final ActiveMQBuffer buffer) { @@ -3157,7 +3157,7 @@ public class JournalStorageManager implements StorageManager } /* (non-Javadoc) - * @see org.apache.activemq.core.journal.EncodingSupport#encode(org.apache.activemq.spi.core.remoting.HornetQBuffer) + * @see org.apache.activemq.core.journal.EncodingSupport#encode(org.apache.activemq.spi.core.remoting.ActiveMQBuffer) */ public void encode(final ActiveMQBuffer buffer) { @@ -3283,7 +3283,7 @@ public class JournalStorageManager implements StorageManager } /* (non-Javadoc) - * @see org.apache.activemq.core.journal.EncodingSupport#encode(org.apache.activemq.api.core.HornetQBuffer) + * @see org.apache.activemq.core.journal.EncodingSupport#encode(org.apache.activemq.api.core.ActiveMQBuffer) */ @Override public void encode(ActiveMQBuffer buffer) @@ -3293,7 +3293,7 @@ public class JournalStorageManager implements StorageManager } /* (non-Javadoc) - * @see org.apache.activemq.core.journal.EncodingSupport#decode(org.apache.activemq.api.core.HornetQBuffer) + * @see org.apache.activemq.core.journal.EncodingSupport#decode(org.apache.activemq.api.core.ActiveMQBuffer) */ @Override public void decode(ActiveMQBuffer buffer) @@ -3730,7 +3730,7 @@ public class JournalStorageManager implements StorageManager } catch (Exception e) { - HornetQServerLogger.LOGGER.journalError(e); + ActiveMQServerLogger.LOGGER.journalError(e); } } } @@ -3853,7 +3853,7 @@ public class JournalStorageManager implements StorageManager } catch (Throwable e) { - HornetQServerLogger.LOGGER.journalErrorConfirmingLargeMessage(e, msg); + ActiveMQServerLogger.LOGGER.journalErrorConfirmingLargeMessage(e, msg); } } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/LargeServerMessageImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/LargeServerMessageImpl.java index 5781e65b8a..e8fca87983 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/LargeServerMessageImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/LargeServerMessageImpl.java @@ -22,7 +22,7 @@ import org.apache.activemq.api.core.ActiveMQInternalErrorException; import org.apache.activemq.api.core.Message; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.message.BodyEncoder; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.LargeServerMessage; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.ServerMessage; @@ -38,7 +38,7 @@ import org.apache.activemq.utils.TypedProperties; public final class LargeServerMessageImpl extends ServerMessageImpl implements LargeServerMessage { // Constants ----------------------------------------------------- - private static boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); // Attributes ---------------------------------------------------- @@ -171,7 +171,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } catch (Exception e) { - HornetQServerLogger.LOGGER.errorIncrementDelayDeletionCount(e); + ActiveMQServerLogger.LOGGER.errorIncrementDelayDeletionCount(e); } } @@ -200,7 +200,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L { if (LargeServerMessageImpl.isTrace) { - HornetQServerLogger.LOGGER.trace("Deleting file " + file + " as the usage was complete"); + ActiveMQServerLogger.LOGGER.trace("Deleting file " + file + " as the usage was complete"); } try @@ -209,7 +209,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } catch (Exception e) { - HornetQServerLogger.LOGGER.error(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.error(e.getMessage(), e); } } } @@ -273,7 +273,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } catch (Exception e) { - HornetQServerLogger.LOGGER.largeMessageErrorReleasingResources(e); + ActiveMQServerLogger.LOGGER.largeMessageErrorReleasingResources(e); } } } @@ -356,7 +356,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } catch (Exception e) { - HornetQServerLogger.LOGGER.lareMessageErrorCopying(e, this); + ActiveMQServerLogger.LOGGER.lareMessageErrorCopying(e, this); return null; } } @@ -522,7 +522,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } catch (Exception e) { - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); } } return bodySize; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/LargeServerMessageInSync.java b/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/LargeServerMessageInSync.java index 25461f31cd..a8b46ae8d0 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/LargeServerMessageInSync.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/LargeServerMessageInSync.java @@ -23,7 +23,7 @@ import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.persistence.StorageManager.LargeMessageExtension; import org.apache.activemq.core.replication.ReplicatedLargeMessage; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.LargeServerMessage; public final class LargeServerMessageInSync implements ReplicatedLargeMessage @@ -103,7 +103,7 @@ public final class LargeServerMessageInSync implements ReplicatedLargeMessage } catch (Exception e) { - HornetQServerLogger.LOGGER.largeMessageErrorReleasingResources(e); + ActiveMQServerLogger.LOGGER.largeMessageErrorReleasingResources(e); } } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/OperationContextImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/OperationContextImpl.java index 8bdb709bfd..8d6d1c738c 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/OperationContextImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/journal/OperationContextImpl.java @@ -24,7 +24,7 @@ import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.journal.impl.SimpleWaitIOCallback; import org.apache.activemq.core.persistence.OperationContext; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.utils.ExecutorFactory; /** @@ -241,7 +241,7 @@ public class OperationContextImpl implements OperationContext } catch (Throwable e) { - HornetQServerLogger.LOGGER.errorExecutingIOAsyncTask(e); + ActiveMQServerLogger.LOGGER.errorExecutingIOAsyncTask(e); executorsPending.decrementAndGet(); task.onError(ActiveMQExceptionType.INTERNAL_ERROR.getCode(), "It wasn't possible to complete IO operation - " + e.getMessage()); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/postoffice/BindingType.java b/activemq-server/src/main/java/org/apache/activemq/core/postoffice/BindingType.java index 7e7be9dd68..0cd4ca88e7 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/postoffice/BindingType.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/postoffice/BindingType.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.postoffice; -import org.apache.activemq.core.server.HornetQMessageBundle; +import org.apache.activemq.core.server.ActiveMQMessageBundle; /** * A BindingType @@ -49,7 +49,7 @@ public enum BindingType } else { - throw HornetQMessageBundle.BUNDLE.cannotConvertToInt(); + throw ActiveMQMessageBundle.BUNDLE.cannotConvertToInt(); } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/postoffice/PostOffice.java b/activemq-server/src/main/java/org/apache/activemq/core/postoffice/PostOffice.java index 7874779d48..2bd7218a0e 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/postoffice/PostOffice.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/postoffice/PostOffice.java @@ -16,7 +16,7 @@ import java.util.Map; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.RoutingContext; @@ -38,7 +38,7 @@ import org.apache.activemq.core.transaction.Transaction; * @author Tim Fox * */ -public interface PostOffice extends HornetQComponent +public interface PostOffice extends ActiveMQComponent { void addBinding(Binding binding) throws Exception; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/postoffice/QueueInfo.java b/activemq-server/src/main/java/org/apache/activemq/core/postoffice/QueueInfo.java index 2cc396ea76..0fc360fd83 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/postoffice/QueueInfo.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/postoffice/QueueInfo.java @@ -16,7 +16,7 @@ import java.io.Serializable; import java.util.List; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.core.server.HornetQMessageBundle; +import org.apache.activemq.core.server.ActiveMQMessageBundle; /** * A QueueInfo @@ -56,15 +56,15 @@ public class QueueInfo implements Serializable { if (routingName == null) { - throw HornetQMessageBundle.BUNDLE.routeNameIsNull(); + throw ActiveMQMessageBundle.BUNDLE.routeNameIsNull(); } if (clusterName == null) { - throw HornetQMessageBundle.BUNDLE.clusterNameIsNull(); + throw ActiveMQMessageBundle.BUNDLE.clusterNameIsNull(); } if (address == null) { - throw HornetQMessageBundle.BUNDLE.addressIsNull(); + throw ActiveMQMessageBundle.BUNDLE.addressIsNull(); } this.routingName = routingName; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/BindingsImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/BindingsImpl.java index 900dbdbe97..9744d89e52 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/BindingsImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/BindingsImpl.java @@ -30,7 +30,7 @@ import org.apache.activemq.core.message.impl.MessageImpl; import org.apache.activemq.core.paging.PagingStore; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.Bindings; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.RoutingContext; import org.apache.activemq.core.server.ServerMessage; @@ -51,7 +51,7 @@ public final class BindingsImpl implements Bindings // This is public as we use on test assertions public static final int MAX_GROUP_RETRY = 10; - private static boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); private final ConcurrentMap> routingNameBindingMap = new ConcurrentHashMap>(); @@ -98,7 +98,7 @@ public final class BindingsImpl implements Bindings { if (isTrace) { - HornetQServerLogger.LOGGER.trace("addBinding(" + binding + ") being called"); + ActiveMQServerLogger.LOGGER.trace("addBinding(" + binding + ") being called"); } if (binding.isExclusive()) { @@ -129,7 +129,7 @@ public final class BindingsImpl implements Bindings if (isTrace) { - HornetQServerLogger.LOGGER.trace("Adding binding " + binding + " into " + this + " bindingTable: " + debugBindings()); + ActiveMQServerLogger.LOGGER.trace("Adding binding " + binding + " into " + this + " bindingTable: " + debugBindings()); } } @@ -161,7 +161,7 @@ public final class BindingsImpl implements Bindings if (isTrace) { - HornetQServerLogger.LOGGER.trace("Removing binding " + binding + " into " + this + " bindingTable: " + debugBindings()); + ActiveMQServerLogger.LOGGER.trace("Removing binding " + binding + " into " + this + " bindingTable: " + debugBindings()); } } @@ -174,7 +174,7 @@ public final class BindingsImpl implements Bindings if (isTrace) { - HornetQServerLogger.LOGGER.trace("Redistributing message " + message); + ActiveMQServerLogger.LOGGER.trace("Redistributing message " + message); } SimpleString routingName = originatingQueue.getName(); @@ -326,7 +326,7 @@ public final class BindingsImpl implements Bindings { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Routing message " + message + " on binding=" + this); + ActiveMQServerLogger.LOGGER.trace("Routing message " + message + " on binding=" + this); } for (Map.Entry> entry : routingNameBindingMap.entrySet()) { @@ -512,7 +512,7 @@ public final class BindingsImpl implements Bindings if (resp == null) { - HornetQServerLogger.LOGGER.debug("it got a timeout on propose, trying again, number of retries: " + tries); + ActiveMQServerLogger.LOGGER.debug("it got a timeout on propose, trying again, number of retries: " + tries); // it timed out, so we will check it through routeAndcheckNull theBinding = null; } @@ -572,7 +572,7 @@ public final class BindingsImpl implements Bindings } else { - HornetQServerLogger.LOGGER.impossibleToRouteGrouped(); + ActiveMQServerLogger.LOGGER.impossibleToRouteGrouped(); route(message, context, false); } } @@ -683,7 +683,7 @@ public final class BindingsImpl implements Bindings } else { - HornetQServerLogger.LOGGER.warn("Couldn't find binding with id=" + bindingID + " on routeFromCluster for message=" + message + " binding = " + this); + ActiveMQServerLogger.LOGGER.warn("Couldn't find binding with id=" + bindingID + " on routeFromCluster for message=" + message + " binding = " + this); } } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/DuplicateIDCacheImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/DuplicateIDCacheImpl.java index f4d09de533..5e55ded0ec 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/DuplicateIDCacheImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/DuplicateIDCacheImpl.java @@ -21,7 +21,7 @@ import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.DuplicateIDCache; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.transaction.Transaction; import org.apache.activemq.core.transaction.TransactionOperationAbstract; @@ -213,7 +213,7 @@ public class DuplicateIDCacheImpl implements DuplicateIDCache } catch (Exception e) { - HornetQServerLogger.LOGGER.errorDeletingDuplicateCache(e); + ActiveMQServerLogger.LOGGER.errorDeletingDuplicateCache(e); } } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/PostOfficeImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/PostOfficeImpl.java index 59d5133290..c57d79cec7 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/PostOfficeImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/PostOfficeImpl.java @@ -51,9 +51,9 @@ import org.apache.activemq.core.postoffice.BindingsFactory; import org.apache.activemq.core.postoffice.DuplicateIDCache; import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.postoffice.QueueInfo; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.LargeServerMessage; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; @@ -86,7 +86,7 @@ import org.apache.activemq.utils.UUIDGenerator; */ public class PostOfficeImpl implements PostOffice, NotificationListener, BindingsFactory { - private static final boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); public static final SimpleString HDR_RESET_QUEUE_DATA = new SimpleString("_HQ_RESET_QUEUE_DATA"); @@ -126,9 +126,9 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding private final HierarchicalRepository addressSettingsRepository; - private final HornetQServer server; + private final ActiveMQServer server; - public PostOfficeImpl(final HornetQServer server, + public PostOfficeImpl(final ActiveMQServer server, final StorageManager storageManager, final PagingManager pagingManager, final QueueFactory bindableFactory, @@ -171,7 +171,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding this.server = server; } - // HornetQComponent implementation --------------------------------------- + // ActiveMQComponent implementation --------------------------------------- public synchronized void start() throws Exception { @@ -223,7 +223,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding if (isTrace) { - HornetQServerLogger.LOGGER.trace("Receiving notification : " + notification + " on server " + this.server); + ActiveMQServerLogger.LOGGER.trace("Receiving notification : " + notification + " on server " + this.server); } synchronized (notificationLock) { @@ -237,7 +237,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding if (!props.containsProperty(ManagementHelper.HDR_BINDING_TYPE)) { - throw HornetQMessageBundle.BUNDLE.bindingTypeNotSpecified(); + throw ActiveMQMessageBundle.BUNDLE.bindingTypeNotSpecified(); } Integer bindingType = props.getIntProperty(ManagementHelper.HDR_BINDING_TYPE); @@ -256,7 +256,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding if (!props.containsProperty(ManagementHelper.HDR_BINDING_ID)) { - throw HornetQMessageBundle.BUNDLE.bindingIdNotSpecified(); + throw ActiveMQMessageBundle.BUNDLE.bindingIdNotSpecified(); } long id = props.getLongProperty(ManagementHelper.HDR_BINDING_ID); @@ -265,7 +265,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding if (!props.containsProperty(ManagementHelper.HDR_DISTANCE)) { - throw HornetQMessageBundle.BUNDLE.distancenotSpecified(); + throw ActiveMQMessageBundle.BUNDLE.distancenotSpecified(); } int distance = props.getIntProperty(ManagementHelper.HDR_DISTANCE); @@ -481,9 +481,9 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding String uid = UUIDGenerator.getInstance().generateStringUUID(); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("ClusterCommunication::Sending notification for addBinding " + binding + " from server " + server); + ActiveMQServerLogger.LOGGER.debug("ClusterCommunication::Sending notification for addBinding " + binding + " from server " + server); } managementService.sendNotification(new Notification(uid, CoreNotificationType.BINDING_ADDED, props)); @@ -671,15 +671,15 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding else { // this is a debug and not warn because this could be a regular scenario on publish-subscribe queues (or topic subscriptions on JMS) - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Couldn't find any bindings for address=" + address + " on message=" + message); + ActiveMQServerLogger.LOGGER.debug("Couldn't find any bindings for address=" + address + " on message=" + message); } } - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("Message after routed=" + message); + ActiveMQServerLogger.LOGGER.trace("Message after routed=" + message); } if (context.getQueueCount() == 0) @@ -696,14 +696,14 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding SimpleString dlaAddress = addressSettings.getDeadLetterAddress(); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("sending message to dla address = " + dlaAddress + ", message=" + message); + ActiveMQServerLogger.LOGGER.debug("sending message to dla address = " + dlaAddress + ", message=" + message); } if (dlaAddress == null) { - HornetQServerLogger.LOGGER.noDLA(address); + ActiveMQServerLogger.LOGGER.noDLA(address); } else { @@ -716,9 +716,9 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding } else { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Message " + message + " is not going anywhere as it didn't have a binding on address:" + address); + ActiveMQServerLogger.LOGGER.debug("Message " + message + " is not going anywhere as it didn't have a binding on address:" + address); } if (message.isLargeMessage()) @@ -869,9 +869,9 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding throw new IllegalStateException("Cannot find queue " + queueName); } - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("PostOffice.sendQueueInfoToQueue on server=" + this.server + ", queueName=" + queueName + " and address=" + address); + ActiveMQServerLogger.LOGGER.debug("PostOffice.sendQueueInfoToQueue on server=" + this.server + ", queueName=" + queueName + " and address=" + address); } Queue queue = (Queue) binding.getBindable(); @@ -889,9 +889,9 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding for (QueueInfo info : queueInfos.values()) { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("QueueInfo on sendQueueInfoToQueue = " + info); + ActiveMQServerLogger.LOGGER.trace("QueueInfo on sendQueueInfoToQueue = " + info); } if (info.matchesAddress(address)) { @@ -1162,7 +1162,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding { public void onError(final int errorCode, final String errorMessage) { - HornetQServerLogger.LOGGER.ioErrorAddingReferences(errorCode, errorMessage); + ActiveMQServerLogger.LOGGER.ioErrorAddingReferences(errorCode, errorMessage); } public void done() @@ -1264,7 +1264,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding if (cacheBridge.contains(bridgeDupBytes)) { - HornetQServerLogger.LOGGER.duplicateMessageDetectedThruBridge(message); + ActiveMQServerLogger.LOGGER.duplicateMessageDetectedThruBridge(message); if (context.getTransaction() != null) { @@ -1307,7 +1307,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding if (rejectDuplicates && isDuplicate) { - HornetQServerLogger.LOGGER.duplicateMessageDetected(message); + ActiveMQServerLogger.LOGGER.duplicateMessageDetected(message); String warnMessage = "Duplicate message detected - message will not be routed. Message information:" + message.toString(); @@ -1360,7 +1360,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding if (reaperRunnable != null) reaperRunnable.stop(); reaperRunnable = new Reaper(); - reaperThread = new Thread(reaperRunnable, "hornetq-expiry-reaper-thread"); + reaperThread = new Thread(reaperRunnable, "activemq-expiry-reaper-thread"); reaperThread.setPriority(reaperPriority); @@ -1433,7 +1433,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding } catch (Exception e) { - HornetQServerLogger.LOGGER.errorExpiringMessages(e); + ActiveMQServerLogger.LOGGER.errorExpiringMessages(e); } } } @@ -1530,7 +1530,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding return addressManager; } - public HornetQServer getServer() + public ActiveMQServer getServer() { return server; } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/SimpleAddressManager.java b/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/SimpleAddressManager.java index 51c038b608..2cf3dd4a7a 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/SimpleAddressManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/postoffice/impl/SimpleAddressManager.java @@ -22,8 +22,8 @@ import org.apache.activemq.core.postoffice.AddressManager; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.Bindings; import org.apache.activemq.core.postoffice.BindingsFactory; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.transaction.Transaction; import org.apache.activemq.core.transaction.TransactionOperationAbstract; import org.apache.activemq.utils.ConcurrentHashSet; @@ -60,12 +60,12 @@ public class SimpleAddressManager implements AddressManager { if (nameMap.putIfAbsent(binding.getUniqueName(), binding) != null || pendingDeletes.contains(binding.getUniqueName())) { - throw HornetQMessageBundle.BUNDLE.bindingAlreadyExists(binding); + throw ActiveMQMessageBundle.BUNDLE.bindingAlreadyExists(binding); } - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("Adding binding " + binding + " with address = " + binding.getUniqueName(), new Exception("trace")); + ActiveMQServerLogger.LOGGER.trace("Adding binding " + binding + " with address = " + binding.getUniqueName(), new Exception("trace")); } return addMappingInternal(binding.getAddress(), binding); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/ProtocolHandler.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/ProtocolHandler.java index a305c9c337..68c07ff35b 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/ProtocolHandler.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/ProtocolHandler.java @@ -31,7 +31,7 @@ import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpObjectAggregator; import io.netty.handler.codec.http.HttpRequestDecoder; import io.netty.handler.codec.http.HttpResponseEncoder; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.core.buffers.impl.ChannelBufferWrapper; import org.apache.activemq.core.protocol.stomp.WebSocketServerHandler; import org.apache.activemq.core.remoting.impl.netty.ConnectionCreator; @@ -112,7 +112,7 @@ public class ProtocolHandler ctx.fireChannelRead(msg); } // HORNETQ-1391 - else if (upgrade != null && upgrade.equalsIgnoreCase(NettyConnector.HORNETQ_REMOTING)) + else if (upgrade != null && upgrade.equalsIgnoreCase(NettyConnector.ACTIVEMQ_REMOTING)) { // Send the response and close the connection if necessary. ctx.writeAndFlush(new DefaultFullHttpResponse(HTTP_1_1, FORBIDDEN)).addListener(ChannelFutureListener.CLOSE); @@ -168,7 +168,7 @@ public class ProtocolHandler //if we get here we assume we use the core protocol as we match nothing else if (protocolToUse == null) { - protocolToUse = HornetQClient.DEFAULT_CORE_PROTOCOL; + protocolToUse = ActiveMQClient.DEFAULT_CORE_PROTOCOL; } ProtocolManager protocolManagerToUse = protocolMap.get(protocolToUse); ConnectionCreator channelHandler = nettyAcceptor.createConnectionCreator(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/ServerSessionPacketHandler.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/ServerSessionPacketHandler.java index 02904272b6..764fbb8d11 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/ServerSessionPacketHandler.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/ServerSessionPacketHandler.java @@ -54,13 +54,13 @@ import javax.transaction.xa.Xid; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.ActiveMQInternalErrorException; -import org.apache.activemq.core.exception.HornetQXAException; +import org.apache.activemq.core.exception.ActiveMQXAException; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.core.protocol.core.impl.wireformat.CreateQueueMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.CreateSharedQueueMessage; -import org.apache.activemq.core.protocol.core.impl.wireformat.HornetQExceptionMessage; +import org.apache.activemq.core.protocol.core.impl.wireformat.ActiveMQExceptionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.NullResponseMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.RollbackMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionAcknowledgeMessage; @@ -99,9 +99,9 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.SessionXAStartMess import org.apache.activemq.core.remoting.CloseListener; import org.apache.activemq.core.remoting.FailureListener; import org.apache.activemq.core.remoting.impl.netty.NettyConnection; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.BindingQueryResult; -import org.apache.activemq.core.server.HornetQServerLogger; -import org.apache.activemq.core.server.HornetQMessageBundle; +import org.apache.activemq.core.server.ActiveMQMessageBundle; import org.apache.activemq.core.server.QueueQueryResult; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.server.ServerSession; @@ -164,7 +164,7 @@ public class ServerSessionPacketHandler implements ChannelHandler public void connectionFailed(final ActiveMQException exception, boolean failedOver) { - HornetQServerLogger.LOGGER.clientConnectionFailed(session.getName()); + ActiveMQServerLogger.LOGGER.clientConnectionFailed(session.getName()); try { @@ -172,10 +172,10 @@ public class ServerSessionPacketHandler implements ChannelHandler } catch (Exception e) { - HornetQServerLogger.LOGGER.errorClosingSession(e); + ActiveMQServerLogger.LOGGER.errorClosingSession(e); } - HornetQServerLogger.LOGGER.clearingUpSession(session.getName()); + ActiveMQServerLogger.LOGGER.clearingUpSession(session.getName()); } public void close() @@ -188,7 +188,7 @@ public class ServerSessionPacketHandler implements ChannelHandler } catch (Exception e) { - HornetQServerLogger.LOGGER.errorClosingSession(e); + ActiveMQServerLogger.LOGGER.errorClosingSession(e); } } @@ -529,40 +529,40 @@ public class ServerSessionPacketHandler implements ChannelHandler } else { - response = new HornetQExceptionMessage(HornetQMessageBundle.BUNDLE.duplicateMetadata(message.getKey(), message.getData())); + response = new ActiveMQExceptionMessage(ActiveMQMessageBundle.BUNDLE.duplicateMetadata(message.getKey(), message.getData())); } break; } } } - catch (HornetQXAException e) + catch (ActiveMQXAException e) { if (requiresResponse) { - HornetQServerLogger.LOGGER.debug("Sending exception to client", e); + ActiveMQServerLogger.LOGGER.debug("Sending exception to client", e); response = new SessionXAResponseMessage(true, e.errorCode, e.getMessage()); } else { - HornetQServerLogger.LOGGER.caughtXaException(e); + ActiveMQServerLogger.LOGGER.caughtXaException(e); } } catch (ActiveMQException e) { if (requiresResponse) { - HornetQServerLogger.LOGGER.debug("Sending exception to client", e); - response = new HornetQExceptionMessage(e); + ActiveMQServerLogger.LOGGER.debug("Sending exception to client", e); + response = new ActiveMQExceptionMessage(e); } else { if (e.getType() == ActiveMQExceptionType.QUEUE_EXISTS) { - HornetQServerLogger.LOGGER.debug("Caught exception", e); + ActiveMQServerLogger.LOGGER.debug("Caught exception", e); } else { - HornetQServerLogger.LOGGER.caughtException(e); + ActiveMQServerLogger.LOGGER.caughtException(e); } } } @@ -570,14 +570,14 @@ public class ServerSessionPacketHandler implements ChannelHandler { if (requiresResponse) { - HornetQServerLogger.LOGGER.warn("Sending unexpected exception to the client", t); - ActiveMQException hqe = new ActiveMQInternalErrorException(); - hqe.initCause(t); - response = new HornetQExceptionMessage(hqe); + ActiveMQServerLogger.LOGGER.warn("Sending unexpected exception to the client", t); + ActiveMQException activeMQInternalErrorException = new ActiveMQInternalErrorException(); + activeMQInternalErrorException.initCause(t); + response = new ActiveMQExceptionMessage(activeMQInternalErrorException); } else { - HornetQServerLogger.LOGGER.caughtException(t); + ActiveMQServerLogger.LOGGER.caughtException(t); } } @@ -598,9 +598,9 @@ public class ServerSessionPacketHandler implements ChannelHandler { public void onError(final int errorCode, final String errorMessage) { - HornetQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage); + ActiveMQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage); - HornetQExceptionMessage exceptionMessage = new HornetQExceptionMessage( ActiveMQExceptionType.createException(errorCode, errorMessage)); + ActiveMQExceptionMessage exceptionMessage = new ActiveMQExceptionMessage( ActiveMQExceptionType.createException(errorCode, errorMessage)); doConfirmAndResponse(confirmPacket, exceptionMessage, flush, closeChannel); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQPacketHandler.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/ActiveMQPacketHandler.java similarity index 80% rename from activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQPacketHandler.java rename to activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/ActiveMQPacketHandler.java index 231b2c60bd..1b7b9aff05 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQPacketHandler.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/ActiveMQPacketHandler.java @@ -26,13 +26,13 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.CheckFailoverReply import org.apache.activemq.core.protocol.core.impl.wireformat.CreateQueueMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.CreateSessionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.CreateSessionResponseMessage; -import org.apache.activemq.core.protocol.core.impl.wireformat.HornetQExceptionMessage; +import org.apache.activemq.core.protocol.core.impl.wireformat.ActiveMQExceptionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReattachSessionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReattachSessionResponseMessage; -import org.apache.activemq.core.security.HornetQPrincipal; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.security.ActiveMQPrincipal; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.ServerSession; import org.apache.activemq.core.version.Version; @@ -43,9 +43,9 @@ import org.apache.activemq.core.version.Version; * @author Tim Fox * @author Andy Taylor */ -public class HornetQPacketHandler implements ChannelHandler +public class ActiveMQPacketHandler implements ChannelHandler { - private final HornetQServer server; + private final ActiveMQServer server; private final Channel channel1; @@ -53,10 +53,10 @@ public class HornetQPacketHandler implements ChannelHandler private final CoreProtocolManager protocolManager; - public HornetQPacketHandler(final CoreProtocolManager protocolManager, - final HornetQServer server, - final Channel channel1, - final CoreRemotingConnection connection) + public ActiveMQPacketHandler(final CoreProtocolManager protocolManager, + final ActiveMQServer server, + final Channel channel1, + final CoreRemotingConnection connection) { this.protocolManager = protocolManager; @@ -109,7 +109,7 @@ public class HornetQPacketHandler implements ChannelHandler } default: { - HornetQServerLogger.LOGGER.invalidPacket(packet); + ActiveMQServerLogger.LOGGER.invalidPacket(packet); } } } @@ -131,12 +131,12 @@ public class HornetQPacketHandler implements ChannelHandler Version version = server.getVersion(); if (!version.isCompatible(request.getVersion())) { - throw HornetQMessageBundle.BUNDLE.incompatibleClientServer(); + throw ActiveMQMessageBundle.BUNDLE.incompatibleClientServer(); } if (!server.isStarted()) { - throw HornetQMessageBundle.BUNDLE.serverNotStarted(); + throw ActiveMQMessageBundle.BUNDLE.serverNotStarted(); } // XXX HORNETQ-720 Taylor commented out this test. Should be verified. @@ -153,21 +153,21 @@ public class HornetQPacketHandler implements ChannelHandler } else if (connection.getClientVersion() != request.getVersion()) { - HornetQServerLogger.LOGGER.incompatibleVersionAfterConnect(request.getVersion(), connection.getClientVersion()); + ActiveMQServerLogger.LOGGER.incompatibleVersionAfterConnect(request.getVersion(), connection.getClientVersion()); } Channel channel = connection.getChannel(request.getSessionChannelID(), request.getWindowSize()); - HornetQPrincipal hornetQPrincipal = null; + ActiveMQPrincipal activeMQPrincipal = null; if (request.getUsername() == null) { - hornetQPrincipal = connection.getDefaultHornetQPrincipal(); + activeMQPrincipal = connection.getDefaultActiveMQPrincipal(); } ServerSession session = server.createSession(request.getName(), - hornetQPrincipal == null ? request.getUsername() : hornetQPrincipal.getUserName(), - hornetQPrincipal == null ? request.getPassword() : hornetQPrincipal.getPassword(), + activeMQPrincipal == null ? request.getUsername() : activeMQPrincipal.getUserName(), + activeMQPrincipal == null ? request.getPassword() : activeMQPrincipal.getPassword(), request.getMinLargeMessageSize(), connection, request.isAutoCommitSends(), @@ -194,20 +194,20 @@ public class HornetQPacketHandler implements ChannelHandler if (e.getType() == ActiveMQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS) { incompatibleVersion = true; - HornetQServerLogger.LOGGER.debug("Sending ActiveMQException after Incompatible client", e); + ActiveMQServerLogger.LOGGER.debug("Sending ActiveMQException after Incompatible client", e); } else { - HornetQServerLogger.LOGGER.failedToCreateSession(e); + ActiveMQServerLogger.LOGGER.failedToCreateSession(e); } - response = new HornetQExceptionMessage(e); + response = new ActiveMQExceptionMessage(e); } catch (Exception e) { - HornetQServerLogger.LOGGER.failedToCreateSession(e); + ActiveMQServerLogger.LOGGER.failedToCreateSession(e); - response = new HornetQExceptionMessage(new ActiveMQInternalErrorException()); + response = new ActiveMQExceptionMessage(new ActiveMQInternalErrorException()); } // send the exception to the client and destroy @@ -235,7 +235,7 @@ public class HornetQPacketHandler implements ChannelHandler response = new ReattachSessionResponseMessage(-1, false); } - HornetQServerLogger.LOGGER.debug("Reattaching request from " + connection.getRemoteAddress()); + ActiveMQServerLogger.LOGGER.debug("Reattaching request from " + connection.getRemoteAddress()); ServerSessionPacketHandler sessionHandler = protocolManager.getSessionHandler(request.getName()); @@ -253,7 +253,7 @@ public class HornetQPacketHandler implements ChannelHandler // i.e. we don't have a resend cache for commands, so we just close the old session // and let the client recreate - HornetQServerLogger.LOGGER.reattachRequestFailed(connection.getRemoteAddress()); + ActiveMQServerLogger.LOGGER.reattachRequestFailed(connection.getRemoteAddress()); sessionHandler.closeListeners(); sessionHandler.close(); @@ -272,9 +272,9 @@ public class HornetQPacketHandler implements ChannelHandler } catch (Exception e) { - HornetQServerLogger.LOGGER.failedToReattachSession(e); + ActiveMQServerLogger.LOGGER.failedToReattachSession(e); - response = new HornetQExceptionMessage(new ActiveMQInternalErrorException()); + response = new ActiveMQExceptionMessage(new ActiveMQInternalErrorException()); } channel1.send(response); @@ -292,7 +292,7 @@ public class HornetQPacketHandler implements ChannelHandler } catch (Exception e) { - HornetQServerLogger.LOGGER.failedToHandleCreateQueue(e); + ActiveMQServerLogger.LOGGER.failedToHandleCreateQueue(e); } } } \ No newline at end of file diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/CoreProtocolManager.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/CoreProtocolManager.java index 956b67d218..add0cbe4ef 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/CoreProtocolManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/CoreProtocolManager.java @@ -25,7 +25,7 @@ import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClusterTopologyListener; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.TopologyMember; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.protocol.ServerPacketDecoder; @@ -42,10 +42,10 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.Ping; import org.apache.activemq.core.protocol.core.impl.wireformat.SubscribeClusterTopologyUpdatesMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.SubscribeClusterTopologyUpdatesMessageV2; import org.apache.activemq.core.remoting.CloseListener; -import org.apache.activemq.core.remoting.impl.netty.HornetQFrameDecoder2; +import org.apache.activemq.core.remoting.impl.netty.ActiveMQFrameDecoder2; import org.apache.activemq.core.remoting.impl.netty.NettyServerConnection; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.spi.core.protocol.ConnectionEntry; import org.apache.activemq.spi.core.protocol.MessageConverter; import org.apache.activemq.spi.core.protocol.ProtocolManager; @@ -60,15 +60,15 @@ import org.apache.activemq.spi.core.remoting.Connection; */ class CoreProtocolManager implements ProtocolManager { - private static final boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); - private final HornetQServer server; + private final ActiveMQServer server; private final List incomingInterceptors; private final List outgoingInterceptors; - CoreProtocolManager(final HornetQServer server, final List incomingInterceptors, List outgoingInterceptors) + CoreProtocolManager(final ActiveMQServer server, final List incomingInterceptors, List outgoingInterceptors) { this.server = server; @@ -102,11 +102,11 @@ class CoreProtocolManager implements ProtocolManager Channel channel1 = rc.getChannel(CHANNEL_ID.SESSION.id, -1); - ChannelHandler handler = new HornetQPacketHandler(this, server, channel1, rc); + ChannelHandler handler = new ActiveMQPacketHandler(this, server, channel1, rc); channel1.setHandler(handler); - long ttl = HornetQClient.DEFAULT_CONNECTION_TTL; + long ttl = ActiveMQClient.DEFAULT_CONNECTION_TTL; if (config.getConnectionTTLOverride() != -1) { @@ -148,30 +148,31 @@ class CoreProtocolManager implements ProtocolManager @Override public void addChannelHandlers(ChannelPipeline pipeline) { - pipeline.addLast("hornetq-decoder", new HornetQFrameDecoder2()); + pipeline.addLast("activemq-decoder", new ActiveMQFrameDecoder2()); } @Override public boolean isProtocol(byte[] array) { String frameStart = new String(array, StandardCharsets.US_ASCII); - return frameStart.startsWith("HORNETQ"); + return frameStart.startsWith("ACTIVEMQ"); } @Override public void handshake(NettyServerConnection connection, ActiveMQBuffer buffer) { //if we are not an old client then handshake - if (buffer.getByte(0) == 'H' && - buffer.getByte(1) == 'O' && - buffer.getByte(2) == 'R' && - buffer.getByte(3) == 'N' && - buffer.getByte(4) == 'E' && - buffer.getByte(5) == 'T' && - buffer.getByte(6) == 'Q') + if (buffer.getByte(0) == 'A' && + buffer.getByte(1) == 'C' && + buffer.getByte(2) == 'T' && + buffer.getByte(3) == 'I' && + buffer.getByte(4) == 'V' && + buffer.getByte(5) == 'E' && + buffer.getByte(6) == 'M' && + buffer.getByte(7) == 'Q') { //todo add some handshaking - buffer.readBytes(7); + buffer.readBytes(8); } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/CoreProtocolManagerFactory.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/CoreProtocolManagerFactory.java index 43af54c01f..69302b8d25 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/CoreProtocolManagerFactory.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/CoreProtocolManagerFactory.java @@ -15,8 +15,8 @@ package org.apache.activemq.core.protocol.core.impl; import java.util.List; import org.apache.activemq.api.core.Interceptor; -import org.apache.activemq.api.core.client.HornetQClient; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.api.core.client.ActiveMQClient; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.spi.core.protocol.ProtocolManager; import org.apache.activemq.spi.core.protocol.ProtocolManagerFactory; @@ -29,9 +29,9 @@ import org.apache.activemq.spi.core.protocol.ProtocolManagerFactory; */ public class CoreProtocolManagerFactory implements ProtocolManagerFactory { - private static String[] SUPPORTED_PROTOCOLS = {HornetQClient.DEFAULT_CORE_PROTOCOL}; + private static String[] SUPPORTED_PROTOCOLS = {ActiveMQClient.DEFAULT_CORE_PROTOCOL}; - public ProtocolManager createProtocolManager(final HornetQServer server, final List incomingInterceptors, List outgoingInterceptors) + public ProtocolManager createProtocolManager(final ActiveMQServer server, final List incomingInterceptors, List outgoingInterceptors) { return new CoreProtocolManager(server, incomingInterceptors, outgoingInterceptors); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/CoreSessionCallback.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/CoreSessionCallback.java index f0933fdfe1..f5763eda35 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/CoreSessionCallback.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/CoreSessionCallback.java @@ -21,7 +21,7 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.SessionProducerCre import org.apache.activemq.core.protocol.core.impl.wireformat.SessionReceiveContinuationMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionReceiveLargeMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionReceiveMessage; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.ServerConsumer; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.spi.core.protocol.ProtocolManager; @@ -121,7 +121,7 @@ public final class CoreSessionCallback implements SessionCallback } else { - HornetQServerLogger.LOGGER.warnDisconnectOldClient(queueName); + ActiveMQServerLogger.LOGGER.warnDisconnectOldClient(queueName); } } @@ -130,7 +130,7 @@ public final class CoreSessionCallback implements SessionCallback public boolean hasCredits(ServerConsumer consumer) { // This one will always return has credits - // as the flow control is done by hornetq + // as the flow control is done by activemq return true; } } \ No newline at end of file diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupRegistrationMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupRegistrationMessage.java index 430b3f5f76..968f1eb162 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupRegistrationMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupRegistrationMessage.java @@ -18,7 +18,7 @@ import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** * Registers a given backup-server as the replicating backup of a live server (i.e. a regular - * HornetQ). + * ActiveMQ). *

    * If it succeeds the backup will start synchronization of its state with the new backup node, and * replicating any new data. If it fails the backup server will receive a message indicating diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/stomp/WebSocketServerHandler.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/stomp/WebSocketServerHandler.java index 16bd901ca4..6a089d7f75 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/stomp/WebSocketServerHandler.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/stomp/WebSocketServerHandler.java @@ -101,7 +101,7 @@ public class WebSocketServerHandler extends SimpleChannelInboundHandler { if (future.isSuccess()) { - // we need to insert an encoder that takes the underlying ChannelBuffer of a StompFrame.toHornetQBuffer and + // we need to insert an encoder that takes the underlying ChannelBuffer of a StompFrame.toActiveMQBuffer and // wrap it in a binary web socket frame before letting the wsencoder send it on the wire future.channel().pipeline().addAfter("wsencoder", "binary-websocket-encoder", BINARY_WEBSOCKET_ENCODER); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMAcceptor.java b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMAcceptor.java index c573cab55c..75e0f60033 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMAcceptor.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMAcceptor.java @@ -19,11 +19,11 @@ import java.util.concurrent.Executor; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.management.CoreNotificationType; -import org.apache.activemq.core.security.HornetQPrincipal; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQMessageBundle; +import org.apache.activemq.core.security.ActiveMQPrincipal; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQMessageBundle; import org.apache.activemq.core.server.cluster.ClusterConnection; import org.apache.activemq.core.server.management.Notification; import org.apache.activemq.core.server.management.NotificationService; @@ -63,7 +63,7 @@ public final class InVMAcceptor implements Acceptor private final Map configuration; - private HornetQPrincipal defaultHornetQPrincipal; + private ActiveMQPrincipal defaultActiveMQPrincipal; public InVMAcceptor(final ClusterConnection clusterConnection, final Map configuration, @@ -212,9 +212,9 @@ public final class InVMAcceptor implements Acceptor Listener connectionListener = new Listener(connector); - InVMConnection inVMConnection = new InVMConnection(id, connectionID, remoteHandler, connectionListener, clientExecutor, defaultHornetQPrincipal); + InVMConnection inVMConnection = new InVMConnection(id, connectionID, remoteHandler, connectionListener, clientExecutor, defaultActiveMQPrincipal); - connectionListener.connectionCreated(this, inVMConnection, HornetQClient.DEFAULT_CORE_PROTOCOL); + connectionListener.connectionCreated(this, inVMConnection, ActiveMQClient.DEFAULT_CORE_PROTOCOL); } public void disconnect(final String connectionID) @@ -242,9 +242,9 @@ public final class InVMAcceptor implements Acceptor return true; } - public void setDefaultHornetQPrincipal(HornetQPrincipal defaultHornetQPrincipal) + public void setDefaultActiveMQPrincipal(ActiveMQPrincipal defaultActiveMQPrincipal) { - this.defaultHornetQPrincipal = defaultHornetQPrincipal; + this.defaultActiveMQPrincipal = defaultActiveMQPrincipal; } private class Listener implements ConnectionLifeCycleListener @@ -258,11 +258,11 @@ public final class InVMAcceptor implements Acceptor this.connector = connector; } - public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) + public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { if (connections.putIfAbsent((String) connection.getID(), connection) != null) { - throw HornetQMessageBundle.BUNDLE.connectionExists(connection.getID()); + throw ActiveMQMessageBundle.BUNDLE.connectionExists(connection.getID()); } listener.connectionCreated(component, connection, protocol); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMConnection.java b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMConnection.java index ec4ae0a818..0a2d027b35 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMConnection.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMConnection.java @@ -24,8 +24,8 @@ import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.core.security.HornetQPrincipal; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.security.ActiveMQPrincipal; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.remoting.BufferHandler; import org.apache.activemq.spi.core.remoting.Connection; @@ -40,7 +40,7 @@ import org.apache.activemq.utils.UUIDGenerator; */ public class InVMConnection implements Connection { - private static final boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); private final BufferHandler handler; @@ -59,7 +59,7 @@ public class InVMConnection implements Connection private volatile boolean closing; - private final HornetQPrincipal defaultHornetQPrincipal; + private final ActiveMQPrincipal defaultActiveMQPrincipal; private RemotingConnection protocolConnection; @@ -85,7 +85,7 @@ public class InVMConnection implements Connection final BufferHandler handler, final ConnectionLifeCycleListener listener, final Executor executor, - final HornetQPrincipal defaultHornetQPrincipal) + final ActiveMQPrincipal defaultActiveMQPrincipal) { this.serverID = serverID; @@ -97,7 +97,7 @@ public class InVMConnection implements Connection this.executor = executor; - this.defaultHornetQPrincipal = defaultHornetQPrincipal; + this.defaultActiveMQPrincipal = defaultActiveMQPrincipal; } @@ -181,7 +181,7 @@ public class InVMConnection implements Connection copied.readInt(); // read and discard if (isTrace) { - HornetQServerLogger.LOGGER.trace(InVMConnection.this + "::Sending inVM packet"); + ActiveMQServerLogger.LOGGER.trace(InVMConnection.this + "::Sending inVM packet"); } handler.bufferReceived(id, copied); if (futureListener != null) @@ -194,14 +194,14 @@ public class InVMConnection implements Connection catch (Exception e) { final String msg = "Failed to write to handler on connector " + this; - HornetQServerLogger.LOGGER.errorWritingToInvmConnector(e, this); + ActiveMQServerLogger.LOGGER.errorWritingToInvmConnector(e, this); throw new IllegalStateException(msg, e); } finally { if (isTrace) { - HornetQServerLogger.LOGGER.trace(InVMConnection.this + "::packet sent done"); + ActiveMQServerLogger.LOGGER.trace(InVMConnection.this + "::packet sent done"); } } } @@ -222,7 +222,7 @@ public class InVMConnection implements Connection { if (!latch.await(10, TimeUnit.SECONDS)) { - HornetQServerLogger.LOGGER.timedOutFlushingInvmChannel(); + ActiveMQServerLogger.LOGGER.timedOutFlushingInvmChannel(); } } catch (InterruptedException e) @@ -262,9 +262,9 @@ public class InVMConnection implements Connection return false; } - public HornetQPrincipal getDefaultHornetQPrincipal() + public ActiveMQPrincipal getDefaultActiveMQPrincipal() { - return defaultHornetQPrincipal; + return defaultActiveMQPrincipal; } public static void setFlushEnabled(boolean enable) diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMConnector.java b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMConnector.java index d5f9480d65..6e187af2a5 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMConnector.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMConnector.java @@ -20,9 +20,9 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executor; import org.apache.activemq.api.core.ActiveMQException; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQServerLogger; -import org.apache.activemq.core.server.HornetQMessageBundle; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; import org.apache.activemq.spi.core.remoting.AbstractConnector; import org.apache.activemq.spi.core.remoting.Acceptor; import org.apache.activemq.spi.core.remoting.BufferHandler; @@ -147,7 +147,7 @@ public class InVMConnector extends AbstractConnector { InVMConnector.incFailures(); - HornetQServerLogger.LOGGER.debug("Returning null on InVMConnector for tests"); + ActiveMQServerLogger.LOGGER.debug("Returning null on InVMConnector for tests"); // For testing only return null; } @@ -211,11 +211,11 @@ public class InVMConnector extends AbstractConnector private class Listener implements ConnectionLifeCycleListener { - public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) + public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { if (connections.putIfAbsent((String)connection.getID(), connection) != null) { - throw HornetQMessageBundle.BUNDLE.connectionExists(connection.getID()); + throw ActiveMQMessageBundle.BUNDLE.connectionExists(connection.getID()); } listener.connectionCreated(component, connection, protocol); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMRegistry.java b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMRegistry.java index 4247aad011..255bf31462 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMRegistry.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMRegistry.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.remoting.impl.invm; -import org.apache.activemq.core.server.HornetQMessageBundle; +import org.apache.activemq.core.server.ActiveMQMessageBundle; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; @@ -33,7 +33,7 @@ public final class InVMRegistry { if (acceptors.putIfAbsent(id, acceptor) != null) { - throw HornetQMessageBundle.BUNDLE.acceptorExists(id); + throw ActiveMQMessageBundle.BUNDLE.acceptorExists(id); } } @@ -41,7 +41,7 @@ public final class InVMRegistry { if (acceptors.remove(id) == null) { - throw HornetQMessageBundle.BUNDLE.acceptorNotExists(id); + throw ActiveMQMessageBundle.BUNDLE.acceptorNotExists(id); } } 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 b490ce197c..4ad7c100df 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 @@ -58,10 +58,10 @@ import org.apache.activemq.api.core.management.CoreNotificationType; import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl; import org.apache.activemq.core.protocol.ProtocolHandler; import org.apache.activemq.core.remoting.impl.ssl.SSLSupport; -import org.apache.activemq.core.security.HornetQPrincipal; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.security.ActiveMQPrincipal; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.cluster.ClusterConnection; import org.apache.activemq.core.server.management.Notification; import org.apache.activemq.core.server.management.NotificationService; @@ -71,7 +71,7 @@ import org.apache.activemq.spi.core.remoting.BufferHandler; import org.apache.activemq.spi.core.remoting.Connection; import org.apache.activemq.spi.core.remoting.ConnectionLifeCycleListener; import org.apache.activemq.utils.ConfigurationHelper; -import org.apache.activemq.utils.HornetQThreadFactory; +import org.apache.activemq.utils.ActiveMQThreadFactory; import org.apache.activemq.utils.TypedProperties; /** @@ -316,7 +316,7 @@ public class NettyAcceptor implements Acceptor threadsToUse = this.nioRemotingThreads; } channelClazz = NioServerSocketChannel.class; - eventLoopGroup = new NioEventLoopGroup(threadsToUse, new HornetQThreadFactory("hornetq-netty-threads", true, getThisClassLoader())); + eventLoopGroup = new NioEventLoopGroup(threadsToUse, new ActiveMQThreadFactory("activemq-netty-threads", true, getThisClassLoader())); } bootstrap = new ServerBootstrap(); @@ -374,7 +374,7 @@ public class NettyAcceptor implements Acceptor } catch (IllegalArgumentException e) { - HornetQServerLogger.LOGGER.invalidCipherSuite(SSLSupport.parseArrayIntoCommandSeparatedList(engine.getSupportedCipherSuites())); + ActiveMQServerLogger.LOGGER.invalidCipherSuite(SSLSupport.parseArrayIntoCommandSeparatedList(engine.getSupportedCipherSuites())); throw e; } } @@ -387,7 +387,7 @@ public class NettyAcceptor implements Acceptor } catch (IllegalArgumentException e) { - HornetQServerLogger.LOGGER.invalidProtocol(SSLSupport.parseArrayIntoCommandSeparatedList(engine.getSupportedProtocols())); + ActiveMQServerLogger.LOGGER.invalidProtocol(SSLSupport.parseArrayIntoCommandSeparatedList(engine.getSupportedProtocols())); throw e; } } @@ -404,7 +404,7 @@ public class NettyAcceptor implements Acceptor { if (s.equals("SSLv3") || s.equals("SSLv2Hello")) { - HornetQServerLogger.LOGGER.disallowedProtocol(s); + ActiveMQServerLogger.LOGGER.disallowedProtocol(s); continue; } set.add(s); @@ -438,9 +438,9 @@ public class NettyAcceptor implements Acceptor bootstrap.childOption(ChannelOption.SO_REUSEADDR, true); bootstrap.childOption(ChannelOption.SO_KEEPALIVE, true); bootstrap.childOption(ChannelOption.ALLOCATOR, PartialPooledByteBufAllocator.INSTANCE); - channelGroup = new DefaultChannelGroup("hornetq-accepted-channels", GlobalEventExecutor.INSTANCE); + channelGroup = new DefaultChannelGroup("activemq-accepted-channels", GlobalEventExecutor.INSTANCE); - serverChannelGroup = new DefaultChannelGroup("hornetq-acceptor-channels", GlobalEventExecutor.INSTANCE); + serverChannelGroup = new DefaultChannelGroup("activemq-acceptor-channels", GlobalEventExecutor.INSTANCE); if (httpUpgradeEnabled) { @@ -474,7 +474,7 @@ public class NettyAcceptor implements Acceptor TimeUnit.MILLISECONDS); } - HornetQServerLogger.LOGGER.startedNettyAcceptor(TransportConstants.NETTY_VERSION, host, port); + ActiveMQServerLogger.LOGGER.startedNettyAcceptor(TransportConstants.NETTY_VERSION, host, port); } } @@ -543,14 +543,14 @@ public class NettyAcceptor implements Acceptor if (!future.isSuccess()) { - HornetQServerLogger.LOGGER.nettyChannelGroupError(); + ActiveMQServerLogger.LOGGER.nettyChannelGroupError(); Iterator iterator = future.group().iterator(); while (iterator.hasNext()) { Channel channel = iterator.next(); if (channel.isActive()) { - HornetQServerLogger.LOGGER.nettyChannelStillOpen(channel, channel.remoteAddress()); + ActiveMQServerLogger.LOGGER.nettyChannelStillOpen(channel, channel.remoteAddress()); } } } @@ -612,14 +612,14 @@ public class NettyAcceptor implements Acceptor ChannelGroupFuture future = serverChannelGroup.close().awaitUninterruptibly(); if (!future.isSuccess()) { - HornetQServerLogger.LOGGER.nettyChannelGroupBindError(); + ActiveMQServerLogger.LOGGER.nettyChannelGroupBindError(); Iterator iterator = future.group().iterator(); while (iterator.hasNext()) { Channel channel = iterator.next(); if (channel.isActive()) { - HornetQServerLogger.LOGGER.nettyChannelStillBound(channel, channel.remoteAddress()); + ActiveMQServerLogger.LOGGER.nettyChannelStillBound(channel, channel.remoteAddress()); } } } @@ -634,9 +634,9 @@ public class NettyAcceptor implements Acceptor /** * not allowed * - * @param defaultHornetQPrincipal + * @param defaultActiveMQPrincipal */ - public void setDefaultHornetQPrincipal(HornetQPrincipal defaultHornetQPrincipal) + public void setDefaultActiveMQPrincipal(ActiveMQPrincipal defaultActiveMQPrincipal) { throw new IllegalStateException("unsecure connections not allowed"); } @@ -659,17 +659,17 @@ public class NettyAcceptor implements Acceptor public ConnectionCreator createConnectionCreator() { - return new HornetQServerChannelHandler(channelGroup, handler, new Listener()); + return new ActiveMQServerChannelHandler(channelGroup, handler, new Listener()); } // Inner classes ----------------------------------------------------------------------------- - private final class HornetQServerChannelHandler extends HornetQChannelHandler implements ConnectionCreator + private final class ActiveMQServerChannelHandler extends ActiveMQChannelHandler implements ConnectionCreator { - HornetQServerChannelHandler(final ChannelGroup group, - final BufferHandler handler, - final ConnectionLifeCycleListener listener) + ActiveMQServerChannelHandler(final ChannelGroup group, + final BufferHandler handler, + final ConnectionLifeCycleListener listener) { super(group, handler, listener); } @@ -711,11 +711,11 @@ public class NettyAcceptor implements Acceptor private class Listener implements ConnectionLifeCycleListener { - public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) + public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { if (connections.putIfAbsent(connection.getID(), (NettyServerConnection) connection) != null) { - throw HornetQMessageBundle.BUNDLE.connectionExists(connection.getID()); + throw ActiveMQMessageBundle.BUNDLE.connectionExists(connection.getID()); } listener.connectionCreated(component, connection, protocol); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/RemotingService.java b/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/RemotingService.java index cf0b0db950..f73a2bac36 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/RemotingService.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/RemotingService.java @@ -16,7 +16,7 @@ import java.util.Set; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.core.protocol.core.CoreRemotingConnection; -import org.apache.activemq.core.security.HornetQPrincipal; +import org.apache.activemq.core.security.ActiveMQPrincipal; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.remoting.Acceptor; @@ -60,7 +60,7 @@ public interface RemotingService * * @param principal */ - void allowInvmSecurityOverride(HornetQPrincipal principal); + void allowInvmSecurityOverride(ActiveMQPrincipal principal); /** * Freezes and then disconnects all connections except the given one and tells the client where else diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/impl/RemotingServiceImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/impl/RemotingServiceImpl.java index 7fd9a46533..2ee1c3ed27 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/impl/RemotingServiceImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/impl/RemotingServiceImpl.java @@ -42,11 +42,11 @@ import org.apache.activemq.core.protocol.core.impl.CoreProtocolManagerFactory; import org.apache.activemq.core.remoting.FailureListener; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; import org.apache.activemq.core.remoting.server.RemotingService; -import org.apache.activemq.core.security.HornetQPrincipal; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.security.ActiveMQPrincipal; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.cluster.ClusterConnection; import org.apache.activemq.core.server.cluster.ClusterManager; import org.apache.activemq.core.server.impl.ServiceRegistry; @@ -63,7 +63,7 @@ import org.apache.activemq.spi.core.remoting.Connection; import org.apache.activemq.spi.core.remoting.ConnectionLifeCycleListener; import org.apache.activemq.utils.ClassloadingUtil; import org.apache.activemq.utils.ConfigurationHelper; -import org.apache.activemq.utils.HornetQThreadFactory; +import org.apache.activemq.utils.ActiveMQThreadFactory; /** * @author Jeff Mesnil @@ -75,7 +75,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle { // Constants ----------------------------------------------------- - private static final boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); public static final long CONNECTION_TTL_CHECK_INTERVAL = 2000; @@ -93,7 +93,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle private final Map connections = new ConcurrentHashMap(); - private final HornetQServer server; + private final ActiveMQServer server; private final ManagementService managementService; @@ -109,7 +109,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle private final Map protocolMap = new ConcurrentHashMap(); - private HornetQPrincipal defaultInvmSecurityPrincipal; + private ActiveMQPrincipal defaultInvmSecurityPrincipal; private ServiceRegistry serviceRegistry; @@ -119,7 +119,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle public RemotingServiceImpl(final ClusterManager clusterManager, final Configuration config, - final HornetQServer server, + final ActiveMQServer server, final ManagementService managementService, final ScheduledExecutorService scheduledThreadPool, List protocolManagerFactories, @@ -144,7 +144,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle //i know there is only 1 this.flushExecutor = flushExecutor; - HornetQServerLogger.LOGGER.addingProtocolSupport(coreProtocolManagerFactory.getProtocols()[0]); + ActiveMQServerLogger.LOGGER.addingProtocolSupport(coreProtocolManagerFactory.getProtocols()[0]); this.protocolMap.put(coreProtocolManagerFactory.getProtocols()[0], coreProtocolManagerFactory.createProtocolManager(server, incomingInterceptors, outgoingInterceptors)); @@ -158,7 +158,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle String[] protocols = next.getProtocols(); for (String protocol : protocols) { - HornetQServerLogger.LOGGER.addingProtocolSupport(protocol); + ActiveMQServerLogger.LOGGER.addingProtocolSupport(protocol); protocolMap.put(protocol, next.createProtocolManager(server, incomingInterceptors, outgoingInterceptors)); } } @@ -172,7 +172,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle String[] protocols = protocolManagerFactory.getProtocols(); for (String protocol : protocols) { - HornetQServerLogger.LOGGER.addingProtocolSupport(protocol); + ActiveMQServerLogger.LOGGER.addingProtocolSupport(protocol); protocolMap.put(protocol, protocolManagerFactory.createProtocolManager(server, incomingInterceptors, outgoingInterceptors)); } } @@ -219,7 +219,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle // This needs to be a different thread pool to the main thread pool especially for OIO where we may need // to support many hundreds of connections, but the main thread pool must be kept small for better performance - ThreadFactory tFactory = new HornetQThreadFactory("HornetQ-remoting-threads-" + server.toString() + + ThreadFactory tFactory = new ActiveMQThreadFactory("ActiveMQ-remoting-threads-" + server.toString() + "-" + System.identityHashCode(this), false, tccl); @@ -244,7 +244,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle if (!invalid.isEmpty()) { - HornetQServerLogger.LOGGER.invalidAcceptorKeys(ConfigurationHelper.stringSetToCommaListString(invalid)); + ActiveMQServerLogger.LOGGER.invalidAcceptorKeys(ConfigurationHelper.stringSetToCommaListString(invalid)); continue; } @@ -257,12 +257,12 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle if (protocol != null) { - HornetQServerLogger.LOGGER.warnDeprecatedProtocol(); + ActiveMQServerLogger.LOGGER.warnDeprecatedProtocol(); ProtocolManager protocolManager = protocolMap.get(protocol); if (protocolManager == null) { - throw HornetQMessageBundle.BUNDLE.noProtocolManagerFound(protocol); + throw ActiveMQMessageBundle.BUNDLE.noProtocolManagerFound(protocol); } else { @@ -285,7 +285,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle if (protocolManager == null) { - throw HornetQMessageBundle.BUNDLE.noProtocolManagerFound(actualProtocol); + throw ActiveMQMessageBundle.BUNDLE.noProtocolManagerFound(actualProtocol); } else { @@ -308,7 +308,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle if (defaultInvmSecurityPrincipal != null && acceptor.isUnsecurable()) { - acceptor.setDefaultHornetQPrincipal(defaultInvmSecurityPrincipal); + acceptor.setDefaultActiveMQPrincipal(defaultInvmSecurityPrincipal); } acceptors.put(info.getName(), acceptor); @@ -322,7 +322,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } catch (Exception e) { - HornetQServerLogger.LOGGER.errorCreatingAcceptor(e, info.getFactoryClassName()); + ActiveMQServerLogger.LOGGER.errorCreatingAcceptor(e, info.getFactoryClassName()); } } @@ -339,14 +339,14 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle started = true; } - public synchronized void allowInvmSecurityOverride(HornetQPrincipal principal) + public synchronized void allowInvmSecurityOverride(ActiveMQPrincipal principal) { defaultInvmSecurityPrincipal = principal; for (Acceptor acceptor : acceptors.values()) { if (acceptor.isUnsecurable()) { - acceptor.setDefaultHornetQPrincipal(principal); + acceptor.setDefaultActiveMQPrincipal(principal); } } } @@ -365,7 +365,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } catch (Exception e) { - HornetQServerLogger.LOGGER.errorStoppingAcceptor(); + ActiveMQServerLogger.LOGGER.errorStoppingAcceptor(); } } HashMap connectionEntries = new HashMap(connections); @@ -379,9 +379,9 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle if (conn.equals(connectionToKeepOpen)) continue; - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("Sending connection.disconnection packet to " + conn); + ActiveMQServerLogger.LOGGER.trace("Sending connection.disconnection packet to " + conn); } if (!conn.isClient()) @@ -404,16 +404,16 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle // We need to stop them accepting first so no new connections are accepted after we send the disconnect message for (Acceptor acceptor : acceptors.values()) { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Pausing acceptor " + acceptor); + ActiveMQServerLogger.LOGGER.debug("Pausing acceptor " + acceptor); } acceptor.pause(); } - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Sending disconnect on live connections"); + ActiveMQServerLogger.LOGGER.debug("Sending disconnect on live connections"); } HashSet connectionEntries = new HashSet(connections.values()); @@ -424,9 +424,9 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle { RemotingConnection conn = entry.connection; - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("Sending connection.disconnection packet to " + conn); + ActiveMQServerLogger.LOGGER.trace("Sending connection.disconnection packet to " + conn); } conn.disconnect(criticalError); @@ -454,7 +454,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle if (!ok) { - HornetQServerLogger.LOGGER.timeoutRemotingThreadPool(); + ActiveMQServerLogger.LOGGER.timeoutRemotingThreadPool(); } } @@ -484,7 +484,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } else { - HornetQServerLogger.LOGGER.errorRemovingConnection(); + ActiveMQServerLogger.LOGGER.errorRemovingConnection(); return null; } @@ -500,7 +500,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } else { - HornetQServerLogger.LOGGER.errorRemovingConnection(); + ActiveMQServerLogger.LOGGER.errorRemovingConnection(); return null; } @@ -525,7 +525,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle return protocolMap.get(protocol); } - public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) + public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { if (server == null) { @@ -536,14 +536,14 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle if (pmgr == null) { - throw HornetQMessageBundle.BUNDLE.unknownProtocol(protocol); + throw ActiveMQMessageBundle.BUNDLE.unknownProtocol(protocol); } ConnectionEntry entry = pmgr.createConnectionEntry((Acceptor) component, connection); if (isTrace) { - HornetQServerLogger.LOGGER.trace("Connection created " + connection); + ActiveMQServerLogger.LOGGER.trace("Connection created " + connection); } connections.put(connection.getID(), entry); @@ -554,7 +554,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle if (isTrace) { - HornetQServerLogger.LOGGER.trace("Connection removed " + connectionID + " from server " + this.server, new Exception("trace")); + ActiveMQServerLogger.LOGGER.trace("Connection removed " + connectionID + " from server " + this.server, new Exception("trace")); } ConnectionEntry conn = connections.get(connectionID); @@ -662,9 +662,9 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } else { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("ConnectionID = " + connectionID + " was already closed, so ignoring packet"); + ActiveMQServerLogger.LOGGER.trace("ConnectionID = " + connectionID + " was already closed, so ignoring packet"); } } } @@ -679,7 +679,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle FailureCheckAndFlushThread(final long pauseInterval) { - super("hornetq-failure-check-thread"); + super("activemq-failure-check-thread"); this.pauseInterval = pauseInterval; } @@ -752,7 +752,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } catch (Throwable e) { - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); } } @@ -765,7 +765,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle RemotingConnection conn = getConnection(id); if (conn != null) { - conn.fail(HornetQMessageBundle.BUNDLE.clientExited(conn.getRemoteAddress())); + conn.fail(ActiveMQMessageBundle.BUNDLE.clientExited(conn.getRemoteAddress())); removeConnection(id); } } @@ -775,7 +775,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } catch (Throwable e) { - HornetQServerLogger.LOGGER.errorOnFailureCheck(e); + ActiveMQServerLogger.LOGGER.errorOnFailureCheck(e); } } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicatedJournal.java b/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicatedJournal.java index eb8e2d55e3..765edb3d84 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicatedJournal.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicatedJournal.java @@ -439,7 +439,7 @@ public class ReplicatedJournal implements Journal /** * @throws Exception - * @see org.apache.activemq.core.server.HornetQComponent#start() + * @see org.apache.activemq.core.server.ActiveMQComponent#start() */ public void start() throws Exception { @@ -448,7 +448,7 @@ public class ReplicatedJournal implements Journal /** * @throws Exception - * @see org.apache.activemq.core.server.HornetQComponent#stop() + * @see org.apache.activemq.core.server.ActiveMQComponent#stop() */ public void stop() throws Exception { diff --git a/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationEndpoint.java b/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationEndpoint.java index a65ac05210..2914448b57 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationEndpoint.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationEndpoint.java @@ -50,7 +50,7 @@ import org.apache.activemq.core.protocol.core.ChannelHandler; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.core.protocol.core.impl.wireformat.BackupReplicationStartFailedMessage; -import org.apache.activemq.core.protocol.core.impl.wireformat.HornetQExceptionMessage; +import org.apache.activemq.core.protocol.core.impl.wireformat.ActiveMQExceptionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationAddMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationAddTXMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationCommitMessage; @@ -68,12 +68,12 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationStartSy import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationStartSyncMessage.SyncDataType; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationSyncFileMessage; import org.apache.activemq.core.replication.ReplicationManager.ADD_OPERATION_TYPE; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.server.cluster.qourum.SharedNothingBackupQuorum; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.SharedNothingBackupActivation; /** @@ -82,12 +82,12 @@ import org.apache.activemq.core.server.impl.SharedNothingBackupActivation; * * @author Clebert Suconic */ -public final class ReplicationEndpoint implements ChannelHandler, HornetQComponent +public final class ReplicationEndpoint implements ChannelHandler, ActiveMQComponent { - private static final boolean trace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean trace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); private final IOCriticalErrorListener criticalErrorListener; - private final HornetQServerImpl server; + private final ActiveMQServerImpl server; private final boolean wantedFailBack; private final SharedNothingBackupActivation activation; private final boolean noSync = false; @@ -126,7 +126,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone private Executor executor; // Constructors -------------------------------------------------- - public ReplicationEndpoint(final HornetQServerImpl server, IOCriticalErrorListener criticalErrorListener, + public ReplicationEndpoint(final ActiveMQServerImpl server, IOCriticalErrorListener criticalErrorListener, boolean wantedFailBack, SharedNothingBackupActivation activation) { this.server = server; @@ -231,19 +231,19 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone } else { - HornetQServerLogger.LOGGER.invalidPacketForReplication(packet); + ActiveMQServerLogger.LOGGER.invalidPacketForReplication(packet); } } catch (ActiveMQException e) { - HornetQServerLogger.LOGGER.errorHandlingReplicationPacket(e, packet); - response = new HornetQExceptionMessage(e); + ActiveMQServerLogger.LOGGER.errorHandlingReplicationPacket(e, packet); + response = new ActiveMQExceptionMessage(e); } catch (Exception e) { - HornetQServerLogger.LOGGER.errorHandlingReplicationPacket(e, packet); + ActiveMQServerLogger.LOGGER.errorHandlingReplicationPacket(e, packet); response = - new HornetQExceptionMessage(HornetQMessageBundle.BUNDLE.replicationUnhandledError(e)); + new ActiveMQExceptionMessage(ActiveMQMessageBundle.BUNDLE.replicationUnhandledError(e)); } channel.send(response); } @@ -253,7 +253,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone */ private void handleFatalError(BackupReplicationStartFailedMessage packet) { - HornetQServerLogger.LOGGER.errorStartingReplication(packet.getRegistrationProblem()); + ActiveMQServerLogger.LOGGER.errorStartingReplication(packet.getRegistrationProblem()); server.stopTheServer(false); } @@ -359,7 +359,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone } catch (Exception e) { - HornetQServerLogger.LOGGER.errorClosingPageOnReplication(e); + ActiveMQServerLogger.LOGGER.errorClosingPageOnReplication(e); } } } @@ -399,20 +399,20 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone { if (!activation.isRemoteBackupUpToDate()) { - throw HornetQMessageBundle.BUNDLE.journalsNotInSync(); + throw ActiveMQMessageBundle.BUNDLE.journalsNotInSync(); } if (journalLoadInformation == null || journalLoadInformation.length != journalInformation.length) { - throw HornetQMessageBundle.BUNDLE.replicationTooManyJournals(); + throw ActiveMQMessageBundle.BUNDLE.replicationTooManyJournals(); } for (int i = 0; i < journalInformation.length; i++) { if (!journalInformation[i].equals(journalLoadInformation[i])) { - HornetQServerLogger.LOGGER.journalcomparisonMismatch(journalParametersToString(journalInformation)); - throw HornetQMessageBundle.BUNDLE.replicationTooManyJournals(); + ActiveMQServerLogger.LOGGER.journalcomparisonMismatch(journalParametersToString(journalInformation)); + throw ActiveMQMessageBundle.BUNDLE.replicationTooManyJournals(); } } @@ -485,7 +485,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone journalsHolder = null; backupQuorum.liveIDSet(liveID); activation.setRemoteBackupUpToDate(); - HornetQServerLogger.LOGGER.backupServerSynched(server); + ActiveMQServerLogger.LOGGER.backupServerSynched(server); return; } @@ -507,7 +507,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone ReplicatedLargeMessage largeMessage = lookupLargeMessage(id, false); if (!(largeMessage instanceof LargeServerMessageInSync)) { - HornetQServerLogger.LOGGER.largeMessageIncompatible(); + ActiveMQServerLogger.LOGGER.largeMessageIncompatible(); return; } LargeServerMessageInSync largeMessageInSync = (LargeServerMessageInSync) largeMessage; @@ -533,7 +533,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone return; } default: - throw HornetQMessageBundle.BUNDLE.replicationUnhandledFileType(msg.getFileType()); + throw ActiveMQMessageBundle.BUNDLE.replicationUnhandledFileType(msg.getFileType()); } if (data == null) @@ -560,7 +560,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone { if (activation.isRemoteBackupUpToDate()) { - throw HornetQMessageBundle.BUNDLE.replicationBackupUpToDate(); + throw ActiveMQMessageBundle.BUNDLE.replicationBackupUpToDate(); } @@ -587,7 +587,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone case JournalMessages: if (wantedFailBack && !packet.isServerToFailBack()) { - HornetQServerLogger.LOGGER.autoFailBackDenied(); + ActiveMQServerLogger.LOGGER.autoFailBackDenied(); } final JournalContent journalContent = SyncDataType.getJournalContentType(packet.getDataType()); @@ -609,7 +609,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone registerJournal(journalContent.typeByte, syncJournal); break; default: - throw HornetQMessageBundle.BUNDLE.replicationUnhandledDataType(); + throw ActiveMQMessageBundle.BUNDLE.replicationUnhandledDataType(); } } } @@ -630,7 +630,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone } catch (Exception e) { - HornetQServerLogger.LOGGER.errorDeletingLargeMessage(e, packet.getMessageId()); + ActiveMQServerLogger.LOGGER.errorDeletingLargeMessage(e, packet.getMessageId()); } } }); @@ -663,7 +663,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone if (message == null) { // No warnings if it's a delete, as duplicate deletes may be sent repeatedly. - HornetQServerLogger.LOGGER.largeMessageNotAvailable(messageId); + ActiveMQServerLogger.LOGGER.largeMessageNotAvailable(messageId); } } @@ -679,7 +679,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone { final long id = packet.getMessageId(); createLargeMessage(id, false); - HornetQServerLogger.LOGGER.trace("Receiving Large Message " + id + " on backup"); + ActiveMQServerLogger.LOGGER.trace("Receiving Large Message " + id + " on backup"); } private void createLargeMessage(final long id, boolean liveToBackupSync) @@ -777,7 +777,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone { if (ReplicationEndpoint.trace) { - HornetQServerLogger.LOGGER.trace("Endpoint appendUpdate id = " + packet.getId()); + ActiveMQServerLogger.LOGGER.trace("Endpoint appendUpdate id = " + packet.getId()); } journalToUse.appendUpdateRecord(packet.getId(), packet.getJournalRecordType(), packet.getRecordData(), noSync); } @@ -785,7 +785,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone { if (ReplicationEndpoint.trace) { - HornetQServerLogger.LOGGER.trace("Endpoint append id = " + packet.getId()); + ActiveMQServerLogger.LOGGER.trace("Endpoint append id = " + packet.getId()); } journalToUse.appendAddRecord(packet.getId(), packet.getJournalRecordType(), packet.getRecordData(), noSync); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationManager.java b/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationManager.java index ced14b102c..8dbe0c8a24 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationManager.java @@ -56,8 +56,8 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationPageWri import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationPrepareMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationStartSyncMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationSyncFileMessage; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.utils.ExecutorFactory; @@ -70,7 +70,7 @@ import org.apache.activemq.utils.ExecutorFactory; * @author Clebert Suconic * @see ReplicationEndpoint */ -public final class ReplicationManager implements HornetQComponent +public final class ReplicationManager implements ActiveMQComponent { public enum ADD_OPERATION_TYPE { @@ -323,7 +323,7 @@ public final class ReplicationManager implements HornetQComponent } catch (Throwable e) { - HornetQServerLogger.LOGGER.errorCompletingCallbackOnReplicationManager(e); + ActiveMQServerLogger.LOGGER.errorCompletingCallbackOnReplicationManager(e); } } } @@ -417,11 +417,11 @@ public final class ReplicationManager implements HornetQComponent if (me.getType() == ActiveMQExceptionType.DISCONNECTED) { // Backup has shut down - no need to log a stack trace - HornetQServerLogger.LOGGER.replicationStopOnBackupShutdown(); + ActiveMQServerLogger.LOGGER.replicationStopOnBackupShutdown(); } else { - HornetQServerLogger.LOGGER.replicationStopOnBackupFail(me); + ActiveMQServerLogger.LOGGER.replicationStopOnBackupFail(me); } try @@ -430,7 +430,7 @@ public final class ReplicationManager implements HornetQComponent } catch (Exception e) { - HornetQServerLogger.LOGGER.errorStoppingReplication(e); + ActiveMQServerLogger.LOGGER.errorStoppingReplication(e); } } @@ -490,7 +490,7 @@ public final class ReplicationManager implements HornetQComponent SequentialFile file = jf.getFile().cloneFile(); try { - HornetQServerLogger.LOGGER.journalSynch(jf, file.size(), file); + ActiveMQServerLogger.LOGGER.journalSynch(jf, file.size(), file); sendLargeFile(content, null, jf.getFileID(), file, Long.MAX_VALUE); } finally @@ -543,7 +543,7 @@ public final class ReplicationManager implements HornetQComponent { // We can afford having a single buffer here for this entire loop // because sendReplicatePacket will encode the packet as a NettyBuffer - // through HornetQBuffer class leaving this buffer free to be reused on the next copy + // through ActiveMQBuffer class leaving this buffer free to be reused on the next copy final ByteBuffer buffer = ByteBuffer.allocate(1 << 17); // 1 << 17 == 131072 == 128 * 1024 while (true) { @@ -646,10 +646,10 @@ public final class ReplicationManager implements HornetQComponent */ public OperationContext sendLiveIsStopping(final LiveStopping finalMessage) { - HornetQServerLogger.LOGGER.warn("LIVE IS STOPPING?!? message=" + finalMessage + " enabled=" + enabled); + ActiveMQServerLogger.LOGGER.warn("LIVE IS STOPPING?!? message=" + finalMessage + " enabled=" + enabled); if (enabled) { - HornetQServerLogger.LOGGER.warn("LIVE IS STOPPING?!? message=" + finalMessage + " " + enabled); + ActiveMQServerLogger.LOGGER.warn("LIVE IS STOPPING?!? message=" + finalMessage + " " + enabled); return sendReplicatePacket(new ReplicationLiveIsStoppingMessage(finalMessage)); } return null; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/security/impl/SecurityStoreImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/security/impl/SecurityStoreImpl.java index 2fbc96f34d..cfe144a098 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/security/impl/SecurityStoreImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/security/impl/SecurityStoreImpl.java @@ -22,19 +22,19 @@ import org.apache.activemq.api.core.management.ManagementHelper; import org.apache.activemq.core.security.CheckType; import org.apache.activemq.core.security.Role; import org.apache.activemq.core.security.SecurityStore; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.ServerSession; import org.apache.activemq.core.server.management.Notification; import org.apache.activemq.core.server.management.NotificationService; import org.apache.activemq.core.settings.HierarchicalRepository; import org.apache.activemq.core.settings.HierarchicalRepositoryChangeListener; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; import org.apache.activemq.utils.ConcurrentHashSet; import org.apache.activemq.utils.TypedProperties; /** - * The HornetQ SecurityStore implementation + * The ActiveMQ SecurityStore implementation * * @author Tim Fox * @author Andy Taylor @@ -51,11 +51,11 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC // Attributes ---------------------------------------------------- - private final boolean trace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private final boolean trace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); private final HierarchicalRepository> securityRepository; - private final HornetQSecurityManager securityManager; + private final ActiveMQSecurityManager securityManager; private final ConcurrentMap> cache = new ConcurrentHashMap>(); @@ -77,7 +77,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC * @param notificationService can be null */ public SecurityStoreImpl(final HierarchicalRepository> securityRepository, - final HornetQSecurityManager securityManager, + final ActiveMQSecurityManager securityManager, final long invalidationInterval, final boolean securityEnabled, final String managementClusterUser, @@ -116,7 +116,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC { if (trace) { - HornetQServerLogger.LOGGER.trace("Authenticating cluster admin user"); + ActiveMQServerLogger.LOGGER.trace("Authenticating cluster admin user"); } /* @@ -125,7 +125,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC */ if (!managementClusterPassword.equals(password)) { - throw HornetQMessageBundle.BUNDLE.unableToValidateClusterUser(user); + throw ActiveMQMessageBundle.BUNDLE.unableToValidateClusterUser(user); } else { @@ -146,7 +146,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC notificationService.sendNotification(notification); } - throw HornetQMessageBundle.BUNDLE.unableToValidateUser(user); + throw ActiveMQMessageBundle.BUNDLE.unableToValidateUser(user); } } } @@ -157,7 +157,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC { if (trace) { - HornetQServerLogger.LOGGER.trace("checking access permissions to " + address); + ActiveMQServerLogger.LOGGER.trace("checking access permissions to " + address); } String user = session.getUsername(); @@ -192,7 +192,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC notificationService.sendNotification(notification); } - throw HornetQMessageBundle.BUNDLE.userNoPermissions(session.getUsername(), checkType, saddress); + throw ActiveMQMessageBundle.BUNDLE.userNoPermissions(session.getUsername(), checkType, saddress); } // if we get here we're granted, add to the cache ConcurrentHashSet set = new ConcurrentHashSet(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/HornetQMessageBundle.java b/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQMessageBundle.java similarity index 97% rename from activemq-server/src/main/java/org/apache/activemq/core/server/HornetQMessageBundle.java rename to activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQMessageBundle.java index cd530c3fcc..14270a783d 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/HornetQMessageBundle.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQMessageBundle.java @@ -52,13 +52,13 @@ import java.io.File; * * @author Andy Taylor */ -@MessageBundle(projectCode = "HQ") -public interface HornetQMessageBundle +@MessageBundle(projectCode = "AMQ") +public interface ActiveMQMessageBundle { - HornetQMessageBundle BUNDLE = Messages.getBundle(HornetQMessageBundle.class); + ActiveMQMessageBundle BUNDLE = Messages.getBundle(ActiveMQMessageBundle.class); @Message(id = 119000, value = "Activation for server {0}", format = Message.Format.MESSAGE_FORMAT) - String activationForServer(HornetQServer server); + String activationForServer(ActiveMQServer server); @Message(id = 119001, value = "Generating thread dump because - {0}", format = Message.Format.MESSAGE_FORMAT) String generatingThreadDump(String reason); @@ -292,25 +292,25 @@ public interface HornetQMessageBundle IllegalArgumentException autoConvertError(Class aClass); /** - * Message used on on {@link org.apache.activemq.core.server.impl.HornetQServerImpl#destroyConnectionWithSessionMetadata(String, String)} + * Message used on on {@link org.apache.activemq.core.server.impl.ActiveMQServerImpl#destroyConnectionWithSessionMetadata(String, String)} */ @Message(id = 119076, value = "Executing destroyConnection with {0}={1} through management''s request", format = Message.Format.MESSAGE_FORMAT) String destroyConnectionWithSessionMetadataHeader(String key, String value); /** - * Message used on on {@link org.apache.activemq.core.server.impl.HornetQServerImpl#destroyConnectionWithSessionMetadata(String, String)} + * Message used on on {@link org.apache.activemq.core.server.impl.ActiveMQServerImpl#destroyConnectionWithSessionMetadata(String, String)} */ @Message(id = 119077, value = "Closing connection {0}", format = Message.Format.MESSAGE_FORMAT) String destroyConnectionWithSessionMetadataClosingConnection(String serverSessionString); /** - * Exception used on on {@link org.apache.activemq.core.server.impl.HornetQServerImpl#destroyConnectionWithSessionMetadata(String, String)} + * Exception used on on {@link org.apache.activemq.core.server.impl.ActiveMQServerImpl#destroyConnectionWithSessionMetadata(String, String)} */ @Message(id = 119078, value = "Disconnected per admin''s request on {0}={1}", format = Message.Format.MESSAGE_FORMAT) ActiveMQDisconnectedException destroyConnectionWithSessionMetadataSendException(String key, String value); /** - * Message used on on {@link org.apache.activemq.core.server.impl.HornetQServerImpl#destroyConnectionWithSessionMetadata(String, String)} + * Message used on on {@link org.apache.activemq.core.server.impl.ActiveMQServerImpl#destroyConnectionWithSessionMetadata(String, String)} */ @Message(id = 119079, value = "No session found with {0}={1}", format = Message.Format.MESSAGE_FORMAT) String destroyConnectionWithSessionMetadataNoSessionFound(String key, String value); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/HornetQServer.java b/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServer.java similarity index 93% rename from activemq-server/src/main/java/org/apache/activemq/core/server/HornetQServer.java rename to activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServer.java index fa493aebf8..438203e7ef 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/HornetQServer.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServer.java @@ -20,7 +20,7 @@ import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.config.BridgeConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.DivertConfiguration; -import org.apache.activemq.core.management.impl.HornetQServerControlImpl; +import org.apache.activemq.core.management.impl.ActiveMQServerControlImpl; import org.apache.activemq.core.paging.PagingManager; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.PostOffice; @@ -41,18 +41,18 @@ import org.apache.activemq.core.version.Version; import org.apache.activemq.spi.core.protocol.ProtocolManagerFactory; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.protocol.SessionCallback; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; import org.apache.activemq.utils.ExecutorFactory; /** - * This interface defines the internal interface of the HornetQ Server exposed to other components + * This interface defines the internal interface of the ActiveMQ Server exposed to other components * of the server. *

    * This is not part of our public API. * @author Tim Fox * @author Andy Taylor */ -public interface HornetQServer extends HornetQComponent +public interface ActiveMQServer extends ActiveMQComponent { /** @@ -82,17 +82,17 @@ public interface HornetQServer extends HornetQComponent ManagementService getManagementService(); - HornetQSecurityManager getSecurityManager(); + ActiveMQSecurityManager getSecurityManager(); Version getVersion(); NodeManager getNodeManager(); /** - * Returns the resource to manage this HornetQ server. + * Returns the resource to manage this ActiveMQ server. * @throws IllegalStateException if the server is not properly started. */ - HornetQServerControlImpl getHornetQServerControl(); + ActiveMQServerControlImpl getActiveMQServerControl(); void registerActivateCallback(ActivateCallback callback); @@ -235,7 +235,7 @@ public interface HornetQServer extends HornetQComponent * */ void removeProtocolManagerFactory(ProtocolManagerFactory factory); - HornetQServer createBackupServer(Configuration configuration); + ActiveMQServer createBackupServer(Configuration configuration); void addScaledDownNode(SimpleString scaledDownNodeId); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/HornetQServerLogger.java b/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServerLogger.java similarity index 98% rename from activemq-server/src/main/java/org/apache/activemq/core/server/HornetQServerLogger.java rename to activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServerLogger.java index 1647d03e23..150628b202 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/HornetQServerLogger.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServerLogger.java @@ -56,7 +56,7 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.BackupReplicationS import org.apache.activemq.core.server.cluster.Bridge; import org.apache.activemq.core.server.cluster.impl.BridgeImpl; import org.apache.activemq.core.server.cluster.impl.ClusterConnectionImpl; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.ServerSessionImpl; import org.apache.activemq.core.server.management.Notification; import org.apache.activemq.utils.FutureLatch; @@ -68,24 +68,24 @@ import org.jboss.logging.annotations.Message; import org.jboss.logging.annotations.MessageLogger; import org.w3c.dom.Node; -@MessageLogger(projectCode = "HQ") -public interface HornetQServerLogger extends BasicLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQServerLogger extends BasicLogger { /** * The default logger. */ - HornetQServerLogger LOGGER = Logger.getMessageLogger(HornetQServerLogger.class, HornetQServerLogger.class.getPackage().getName()); + ActiveMQServerLogger LOGGER = Logger.getMessageLogger(ActiveMQServerLogger.class, ActiveMQServerLogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.INFO) @Message(id = 221000, value = "{0} server is starting with configuration {1}", format = Message.Format.MESSAGE_FORMAT) void serverStarting(String type, Configuration configuration); @LogMessage(level = Logger.Level.INFO) - @Message(id = 221001, value = "HornetQ Server version {0} [{1}] {2}", format = Message.Format.MESSAGE_FORMAT) + @Message(id = 221001, value = "ActiveMQ Server version {0} [{1}] {2}", format = Message.Format.MESSAGE_FORMAT) void serverStarted(String fullVersion, SimpleString nodeId, String identity); @LogMessage(level = Logger.Level.INFO) - @Message(id = 221002, value = "HornetQ Server version {0} [{1}] stopped", format = Message.Format.MESSAGE_FORMAT) + @Message(id = 221002, value = "ActiveMQ Server version {0} [{1}] stopped", format = Message.Format.MESSAGE_FORMAT) void serverStopped(String version, SimpleString nodeId); @LogMessage(level = Logger.Level.INFO) @@ -114,7 +114,7 @@ public interface HornetQServerLogger extends BasicLogger void awaitFailBack(); @LogMessage(level = Logger.Level.INFO) - @Message(id = 221109, value = "HornetQ Backup Server version {0} [{1}] started, waiting live to fail before it gets active", + @Message(id = 221109, value = "ActiveMQ Backup Server version {0} [{1}] started, waiting live to fail before it gets active", format = Message.Format.MESSAGE_FORMAT) void backupServerStarted(String version, SimpleString nodeID); @@ -181,7 +181,7 @@ public interface HornetQServerLogger extends BasicLogger @LogMessage(level = Logger.Level.INFO) @Message(id = 221024, value = "Backup server {0} is synchronized with live-server.", format = Message.Format.MESSAGE_FORMAT) - void backupServerSynched(HornetQServerImpl server); + void backupServerSynched(ActiveMQServerImpl server); @LogMessage(level = Logger.Level.INFO) @Message(id = 221025, value = "Replication: sending {0} (size={1}) to backup. {2}", format = Message.Format.MESSAGE_FORMAT) @@ -237,7 +237,7 @@ public interface HornetQServerLogger extends BasicLogger @LogMessage(level = Logger.Level.INFO) @Message(id = 221037, value = "{0} to become ''live''", format = Message.Format.MESSAGE_FORMAT) - void becomingLive(HornetQServer server); + void becomingLive(ActiveMQServer server); @LogMessage(level = Logger.Level.INFO) @Message(id = 221038, value = "Configuration option ''{0}'' is deprecated. Consult the manual for details.", @@ -293,7 +293,7 @@ public interface HornetQServerLogger extends BasicLogger void activatingSharedStoreSlave(); @LogMessage(level = Logger.Level.WARN) - @Message(id = 222000, value = "HornetQServer is being finalized and has not been stopped. Please remember to stop the server before letting it go out of scope", + @Message(id = 222000, value = "ActiveMQServer is being finalized and has not been stopped. Please remember to stop the server before letting it go out of scope", format = Message.Format.MESSAGE_FORMAT) void serverFinalisedWIthoutBeingSTopped(); @@ -322,7 +322,7 @@ public interface HornetQServerLogger extends BasicLogger void divertBindingNotExists(SimpleString bindingName); @LogMessage(level = Logger.Level.WARN) - @Message(id = 222007, value = "Security risk! HornetQ is running with the default cluster admin user and default password. Please see the HornetQ user guide, cluster chapter, for instructions on how to change this.", format = Message.Format.MESSAGE_FORMAT) + @Message(id = 222007, value = "Security risk! ActiveMQ is running with the default cluster admin user and default password. Please see the cluster chapter in the ActiveMQ User Guide for instructions on how to change this.", format = Message.Format.MESSAGE_FORMAT) void clusterSecurityRisk(); @LogMessage(level = Logger.Level.WARN) @@ -964,7 +964,7 @@ public interface HornetQServerLogger extends BasicLogger @LogMessage(level = Logger.Level.WARN) @Message(id = 222158, value = "{0} backup activation thread did not finish.", format = Message.Format.MESSAGE_FORMAT) - void backupActivationDidntFinish(HornetQServer server); + void backupActivationDidntFinish(ActiveMQServer server); @LogMessage(level = Logger.Level.WARN) @Message(id = 222159, value = "unable to send notification when broadcast group is stopped", format = Message.Format.MESSAGE_FORMAT) @@ -983,7 +983,7 @@ public interface HornetQServerLogger extends BasicLogger void backupMovingDataAway(String oldPath, String newPath); @LogMessage(level = Logger.Level.WARN) - @Message(id = 222163, value = "Server is being completely stopped, since this was a replicated backup there may be journal files that need cleaning up. The HornetQ server will have to be manually restarted.", + @Message(id = 222163, value = "Server is being completely stopped, since this was a replicated backup there may be journal files that need cleaning up. The ActiveMQ server will have to be manually restarted.", format = Message.Format.MESSAGE_FORMAT) void stopReplicatedBackupAfterFailback(); @@ -1266,7 +1266,7 @@ public interface HornetQServerLogger extends BasicLogger @LogMessage(level = Logger.Level.ERROR) @Message(id = 224042, value = "Error while restarting the backup server: {0}", format = Message.Format.MESSAGE_FORMAT) - void errorRestartingBackupServer(@Cause Exception e, HornetQServer backup); + void errorRestartingBackupServer(@Cause Exception e, ActiveMQServer backup); @LogMessage(level = Logger.Level.ERROR) @Message(id = 224043, value = "Failed to send forced delivery message", format = Message.Format.MESSAGE_FORMAT) diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServers.java b/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServers.java new file mode 100644 index 0000000000..411f68c5b9 --- /dev/null +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServers.java @@ -0,0 +1,123 @@ +/* + * 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.core.server; + +import java.lang.management.ManagementFactory; + +import javax.management.MBeanServer; + +import org.apache.activemq.core.config.Configuration; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl; + +/** + * ActiveMQServers is a factory class for instantiating ActiveMQServer instances. + *

    + * This class should be used when you want to instantiate a ActiveMQServer instance for embedding in + * your own application, as opposed to directly instantiating an implementing instance. + * @author Tim Fox + */ +public final class ActiveMQServers +{ + + private ActiveMQServers() + { + // Utility class + } + + public static ActiveMQServer newActiveMQServer(final Configuration config, final boolean enablePersistence) + { + ActiveMQSecurityManager securityManager = new ActiveMQSecurityManagerImpl(); + + ActiveMQServer server = ActiveMQServers.newActiveMQServer(config, + ManagementFactory.getPlatformMBeanServer(), + securityManager, + enablePersistence); + + return server; + } + + public static ActiveMQServer newActiveMQServer(final Configuration config) + { + return ActiveMQServers.newActiveMQServer(config, config.isPersistenceEnabled()); + } + + public static ActiveMQServer newActiveMQServer(final Configuration config, + final MBeanServer mbeanServer, + final boolean enablePersistence) + { + ActiveMQSecurityManager securityManager = new ActiveMQSecurityManagerImpl(); + + ActiveMQServer server = ActiveMQServers.newActiveMQServer(config, mbeanServer, securityManager, enablePersistence); + + return server; + } + + public static ActiveMQServer newActiveMQServer(final Configuration config, final MBeanServer mbeanServer) + { + return ActiveMQServers.newActiveMQServer(config, mbeanServer, true); + } + + public static ActiveMQServer newActiveMQServer(final Configuration config, + final MBeanServer mbeanServer, + final ActiveMQSecurityManager securityManager) + { + ActiveMQServer server = ActiveMQServers.newActiveMQServer(config, mbeanServer, securityManager, true); + + return server; + } + + public static ActiveMQServer newActiveMQServer(final Configuration config, + final MBeanServer mbeanServer, + final ActiveMQSecurityManager securityManager, + final boolean enablePersistence) + { + config.setPersistenceEnabled(enablePersistence); + + ActiveMQServer server = new ActiveMQServerImpl(config, mbeanServer, securityManager); + + return server; + } + + public static ActiveMQServer newActiveMQServer(Configuration config, + String defUser, String defPass) + { + ActiveMQSecurityManager securityManager = new ActiveMQSecurityManagerImpl(); + + securityManager.addUser(defUser, defPass); + + ActiveMQServer server = ActiveMQServers.newActiveMQServer(config, + ManagementFactory.getPlatformMBeanServer(), + securityManager, + config.isPersistenceEnabled()); + + return server; + } + + public static ActiveMQServer newActiveMQServer(final Configuration config, + final MBeanServer mbeanServer, + final boolean enablePersistence, + String user, + String password) + { + ActiveMQSecurityManager securityManager = new ActiveMQSecurityManagerImpl(); + + securityManager.addUser(user, password); + + ActiveMQServer server = ActiveMQServers.newActiveMQServer(config, mbeanServer, securityManager, enablePersistence); + + return server; + } + +} diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/ConnectorService.java b/activemq-server/src/main/java/org/apache/activemq/core/server/ConnectorService.java index 9e76264584..96a91b4815 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/ConnectorService.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/ConnectorService.java @@ -16,7 +16,7 @@ package org.apache.activemq.core.server; * @author Andy Taylor * Created Jun 29, 2010 */ -public interface ConnectorService extends HornetQComponent +public interface ConnectorService extends ActiveMQComponent { String getName(); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/HornetQServers.java b/activemq-server/src/main/java/org/apache/activemq/core/server/HornetQServers.java deleted file mode 100644 index 54ddda9d6e..0000000000 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/HornetQServers.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * 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.core.server; - -import java.lang.management.ManagementFactory; - -import javax.management.MBeanServer; - -import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.impl.HornetQServerImpl; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; -import org.apache.activemq.spi.core.security.HornetQSecurityManagerImpl; - -/** - * HornetQServers is a factory class for instantiating HornetQServer instances. - *

    - * This class should be used when you want to instantiate a HornetQServer instance for embedding in - * your own application, as opposed to directly instantiating an implementing instance. - * @author Tim Fox - */ -public final class HornetQServers -{ - - private HornetQServers() - { - // Utility class - } - - public static HornetQServer newHornetQServer(final Configuration config, final boolean enablePersistence) - { - HornetQSecurityManager securityManager = new HornetQSecurityManagerImpl(); - - HornetQServer server = HornetQServers.newHornetQServer(config, - ManagementFactory.getPlatformMBeanServer(), - securityManager, - enablePersistence); - - return server; - } - - public static HornetQServer newHornetQServer(final Configuration config) - { - return HornetQServers.newHornetQServer(config, config.isPersistenceEnabled()); - } - - public static HornetQServer newHornetQServer(final Configuration config, - final MBeanServer mbeanServer, - final boolean enablePersistence) - { - HornetQSecurityManager securityManager = new HornetQSecurityManagerImpl(); - - HornetQServer server = HornetQServers.newHornetQServer(config, mbeanServer, securityManager, enablePersistence); - - return server; - } - - public static HornetQServer newHornetQServer(final Configuration config, final MBeanServer mbeanServer) - { - return HornetQServers.newHornetQServer(config, mbeanServer, true); - } - - public static HornetQServer newHornetQServer(final Configuration config, - final MBeanServer mbeanServer, - final HornetQSecurityManager securityManager) - { - HornetQServer server = HornetQServers.newHornetQServer(config, mbeanServer, securityManager, true); - - return server; - } - - public static HornetQServer newHornetQServer(final Configuration config, - final MBeanServer mbeanServer, - final HornetQSecurityManager securityManager, - final boolean enablePersistence) - { - config.setPersistenceEnabled(enablePersistence); - - HornetQServer server = new HornetQServerImpl(config, mbeanServer, securityManager); - - return server; - } - - public static HornetQServer newHornetQServer(Configuration config, - String defUser, String defPass) - { - HornetQSecurityManager securityManager = new HornetQSecurityManagerImpl(); - - securityManager.addUser(defUser, defPass); - - HornetQServer server = HornetQServers.newHornetQServer(config, - ManagementFactory.getPlatformMBeanServer(), - securityManager, - config.isPersistenceEnabled()); - - return server; - } - - public static HornetQServer newHornetQServer(final Configuration config, - final MBeanServer mbeanServer, - final boolean enablePersistence, - String user, - String password) - { - HornetQSecurityManager securityManager = new HornetQSecurityManagerImpl(); - - securityManager.addUser(user, password); - - HornetQServer server = HornetQServers.newHornetQServer(config, mbeanServer, securityManager, enablePersistence); - - return server; - } - -} diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/MemoryManager.java b/activemq-server/src/main/java/org/apache/activemq/core/server/MemoryManager.java index b8544e765a..d0c2139fe0 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/MemoryManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/MemoryManager.java @@ -21,7 +21,7 @@ import org.apache.activemq.utils.SizeFormatterUtil; * memory. * @author Tim Fox */ -public class MemoryManager implements HornetQComponent +public class MemoryManager implements ActiveMQComponent { private final Runtime runtime; @@ -56,7 +56,7 @@ public class MemoryManager implements HornetQComponent public synchronized void start() { - HornetQServerLogger.LOGGER.debug("Starting MemoryManager with MEASURE_INTERVAL: " + measureInterval + + ActiveMQServerLogger.LOGGER.debug("Starting MemoryManager with MEASURE_INTERVAL: " + measureInterval + " FREE_MEMORY_PERCENT: " + memoryWarningThreshold); @@ -68,7 +68,7 @@ public class MemoryManager implements HornetQComponent started = true; - thread = new Thread(new MemoryRunnable(), "hornetq-memory-manager-thread"); + thread = new Thread(new MemoryRunnable(), "activemq-memory-manager-thread"); thread.setDaemon(true); @@ -135,14 +135,14 @@ public class MemoryManager implements HornetQComponent info.append(String.format("total memory: %s%n", SizeFormatterUtil.sizeof(totalMemory))); info.append(String.format("available memory: %.2f%%%n", availableMemoryPercent)); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(info); + ActiveMQServerLogger.LOGGER.debug(info); } if (availableMemoryPercent <= memoryWarningThreshold) { - HornetQServerLogger.LOGGER.memoryError(memoryWarningThreshold, info.toString()); + ActiveMQServerLogger.LOGGER.memoryError(memoryWarningThreshold, info.toString()); low = true; } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/NodeManager.java b/activemq-server/src/main/java/org/apache/activemq/core/server/NodeManager.java index 5828bdf263..4bd17721ee 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/NodeManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/NodeManager.java @@ -28,7 +28,7 @@ import org.apache.activemq.utils.UUIDGenerator; * Date: Oct 13, 2010 * Time: 2:38:40 PM */ -public abstract class NodeManager implements HornetQComponent +public abstract class NodeManager implements ActiveMQComponent { protected static final byte FIRST_TIME_START = '0'; private static final String SERVER_LOCK_NAME = "server.lock"; @@ -175,7 +175,7 @@ public abstract class NodeManager implements HornetQComponent } catch (RuntimeException e) { - HornetQServerLogger.LOGGER.nodeManagerCantOpenFile(e, serverLockFile); + ActiveMQServerLogger.LOGGER.nodeManagerCantOpenFile(e, serverLockFile); throw e; } catch (IOException e) @@ -195,7 +195,7 @@ public abstract class NodeManager implements HornetQComponent count++; continue; } - HornetQServerLogger.LOGGER.nodeManagerCantOpenFile(e, serverLockFile); + ActiveMQServerLogger.LOGGER.nodeManagerCantOpenFile(e, serverLockFile); throw e; } if (!fileCreated) diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/Queue.java b/activemq-server/src/main/java/org/apache/activemq/core/server/Queue.java index b85c3c52b9..136c021bcc 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/Queue.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/Queue.java @@ -58,7 +58,7 @@ public interface Queue extends Bindable * on shared subscriptions where the queue needs to be deleted when all the * consumers are closed. */ - void setConsumersRefCount(HornetQServer server); + void setConsumersRefCount(ActiveMQServer server); ReferenceCounter getConsumersRefCount(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/ServerSessionFactory.java b/activemq-server/src/main/java/org/apache/activemq/core/server/ServerSessionFactory.java index cb4faa8e12..bea7067c69 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/ServerSessionFactory.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/ServerSessionFactory.java @@ -17,7 +17,7 @@ import org.apache.activemq.core.persistence.OperationContext; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.security.SecurityStore; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.ServerSessionImpl; import org.apache.activemq.core.server.management.ManagementService; import org.apache.activemq.core.transaction.ResourceManager; @@ -34,7 +34,7 @@ public interface ServerSessionFactory RemotingConnection connection, StorageManager storageManager, PostOffice postOffice, ResourceManager resourceManager, SecurityStore securityStore, ManagementService managementService, - HornetQServerImpl hornetQServerImpl, SimpleString managementAddress, + ActiveMQServerImpl activeMQServerImpl, SimpleString managementAddress, SimpleString simpleString, SessionCallback callback, OperationContext context) throws Exception; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/HornetQServerSideProtocolManagerFactory.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ActiveMQServerSideProtocolManagerFactory.java similarity index 71% rename from activemq-server/src/main/java/org/apache/activemq/core/server/cluster/HornetQServerSideProtocolManagerFactory.java rename to activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ActiveMQServerSideProtocolManagerFactory.java index a08a3b1622..6922004e27 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/HornetQServerSideProtocolManagerFactory.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ActiveMQServerSideProtocolManagerFactory.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.server.cluster; import org.apache.activemq.core.protocol.ServerPacketDecoder; -import org.apache.activemq.core.protocol.core.impl.HornetQClientProtocolManager; +import org.apache.activemq.core.protocol.core.impl.ActiveMQClientProtocolManager; import org.apache.activemq.core.protocol.core.impl.PacketDecoder; import org.apache.activemq.spi.core.remoting.ClientProtocolManager; import org.apache.activemq.spi.core.remoting.ClientProtocolManagerFactory; @@ -23,16 +23,16 @@ import org.apache.activemq.spi.core.remoting.ClientProtocolManagerFactory; * A protocol manager that will replace the packet manager for inter-server communications * @author Clebert Suconic */ -public class HornetQServerSideProtocolManagerFactory implements ClientProtocolManagerFactory +public class ActiveMQServerSideProtocolManagerFactory implements ClientProtocolManagerFactory { - private static final HornetQServerSideProtocolManagerFactory INSTANCE = new HornetQServerSideProtocolManagerFactory(); + private static final ActiveMQServerSideProtocolManagerFactory INSTANCE = new ActiveMQServerSideProtocolManagerFactory(); - public static HornetQServerSideProtocolManagerFactory getInstance() + public static ActiveMQServerSideProtocolManagerFactory getInstance() { return INSTANCE; } - private HornetQServerSideProtocolManagerFactory() + private ActiveMQServerSideProtocolManagerFactory() { } @@ -41,10 +41,10 @@ public class HornetQServerSideProtocolManagerFactory implements ClientProtocolMa @Override public ClientProtocolManager newProtocolManager() { - return new HornetQReplicationProtocolManager(); + return new ActiveMQReplicationProtocolManager(); } - class HornetQReplicationProtocolManager extends HornetQClientProtocolManager + class ActiveMQReplicationProtocolManager extends ActiveMQClientProtocolManager { @Override protected PacketDecoder getPacketDecoder() diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/BackupManager.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/BackupManager.java index ef6af0201e..8a7c428d5a 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/BackupManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/BackupManager.java @@ -29,18 +29,18 @@ import org.apache.activemq.core.client.impl.ServerLocatorInternal; import org.apache.activemq.core.client.impl.Topology; import org.apache.activemq.core.config.ClusterConnectionConfiguration; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.utils.ExecutorFactory; /* * takes care of updating the cluster with a backups transport configuration which is based on each cluster connection. * */ -public class BackupManager implements HornetQComponent +public class BackupManager implements ActiveMQComponent { - private HornetQServer server; + private ActiveMQServer server; private Executor executor; private ScheduledExecutorService scheduledExecutor; private NodeManager nodeManager; @@ -51,7 +51,7 @@ public class BackupManager implements HornetQComponent private boolean started; - public BackupManager(HornetQServer server, ExecutorFactory executorFactory, ScheduledExecutorService scheduledExecutor, NodeManager nodeManager, + public BackupManager(ActiveMQServer server, ExecutorFactory executorFactory, ScheduledExecutorService scheduledExecutor, NodeManager nodeManager, Configuration configuration, ClusterManager clusterManager) { this.server = server; @@ -218,7 +218,7 @@ public class BackupManager implements HornetQComponent backupServerLocator.setIdentity("backupLocatorFor='" + server + "'"); backupServerLocator.setReconnectAttempts(-1); backupServerLocator.setInitialConnectAttempts(-1); - backupServerLocator.setProtocolManagerFactory(HornetQServerSideProtocolManagerFactory.getInstance()); + backupServerLocator.setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance()); } } @@ -242,12 +242,12 @@ public class BackupManager implements HornetQComponent if (localBackupLocator == null) { if (!stopping) - HornetQServerLogger.LOGGER.error("Error announcing backup: backupServerLocator is null. " + this); + ActiveMQServerLogger.LOGGER.error("Error announcing backup: backupServerLocator is null. " + this); return; } - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(BackupConnector.this + ":: announcing " + connector + " to " + backupServerLocator); + ActiveMQServerLogger.LOGGER.debug(BackupConnector.this + ":: announcing " + connector + " to " + backupServerLocator); } announcingBackup = true; //connect to the cluster @@ -264,7 +264,7 @@ public class BackupManager implements HornetQComponent true, connector, null); - HornetQServerLogger.LOGGER.backupAnnounced(); + ActiveMQServerLogger.LOGGER.backupAnnounced(); backupAnnounced = true; } } @@ -278,7 +278,7 @@ public class BackupManager implements HornetQComponent return; if (stopping) return; - HornetQServerLogger.LOGGER.errorAnnouncingBackup(); + ActiveMQServerLogger.LOGGER.errorAnnouncingBackup(); scheduledExecutor.schedule(new Runnable() { @@ -365,13 +365,13 @@ public class BackupManager implements HornetQComponent { if (tcConfigs != null && tcConfigs.length > 0) { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(BackupManager.this + "Creating a serverLocator for " + Arrays.toString(tcConfigs)); + ActiveMQServerLogger.LOGGER.debug(BackupManager.this + "Creating a serverLocator for " + Arrays.toString(tcConfigs)); } ServerLocatorImpl locator = new ServerLocatorImpl(topology, true, tcConfigs); locator.setClusterConnection(true); - locator.setProtocolManagerFactory(HornetQServerSideProtocolManagerFactory.getInstance()); + locator.setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance()); return locator; } return null; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/Bridge.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/Bridge.java index 9e68b40f38..e4cc604c70 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/Bridge.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/Bridge.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.server.cluster; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.server.Consumer; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.management.NotificationService; import org.apache.activemq.spi.core.protocol.RemotingConnection; @@ -29,7 +29,7 @@ import org.apache.activemq.spi.core.protocol.RemotingConnection; * * */ -public interface Bridge extends Consumer, HornetQComponent +public interface Bridge extends Consumer, ActiveMQComponent { SimpleString getName(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/BroadcastGroup.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/BroadcastGroup.java index 996b3a6374..4853c0eac4 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/BroadcastGroup.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/BroadcastGroup.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.server.cluster; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.core.server.management.NotificationService; /** @@ -26,7 +26,7 @@ import org.apache.activemq.core.server.management.NotificationService; * * */ -public interface BroadcastGroup extends HornetQComponent +public interface BroadcastGroup extends ActiveMQComponent { void setNotificationService(NotificationService notificationService); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterConfigurationUtil.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterConfigurationUtil.java index 8cd4ddaa4c..48fe1926df 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterConfigurationUtil.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterConfigurationUtil.java @@ -17,7 +17,7 @@ import org.apache.activemq.api.core.DiscoveryGroupConfiguration; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.ClusterConnectionConfiguration; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import java.lang.reflect.Array; import java.util.List; @@ -28,14 +28,14 @@ public class ClusterConfigurationUtil { if (config.getName() == null) { - HornetQServerLogger.LOGGER.clusterConnectionNotUnique(); + ActiveMQServerLogger.LOGGER.clusterConnectionNotUnique(); return null; } if (config.getAddress() == null) { - HornetQServerLogger.LOGGER.clusterConnectionNoForwardAddress(); + ActiveMQServerLogger.LOGGER.clusterConnectionNoForwardAddress(); return null; } @@ -44,7 +44,7 @@ public class ClusterConfigurationUtil if (connector == null) { - HornetQServerLogger.LOGGER.clusterConnectionNoConnector(config.getConnectorName()); + ActiveMQServerLogger.LOGGER.clusterConnectionNoConnector(config.getConnectorName()); return null; } return connector; @@ -57,7 +57,7 @@ public class ClusterConfigurationUtil if (dg == null) { - HornetQServerLogger.LOGGER.clusterConnectionNoDiscoveryGroup(config.getDiscoveryGroupName()); + ActiveMQServerLogger.LOGGER.clusterConnectionNoDiscoveryGroup(config.getDiscoveryGroupName()); return null; } return dg; @@ -80,7 +80,7 @@ public class ClusterConfigurationUtil if (connector == null) { - HornetQServerLogger.LOGGER.bridgeNoConnector(connectorName); + ActiveMQServerLogger.LOGGER.bridgeNoConnector(connectorName); return null; } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterConnection.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterConnection.java index e5facf744a..dcabbc3547 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterConnection.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterConnection.java @@ -19,8 +19,8 @@ import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClusterTopologyListener; import org.apache.activemq.core.client.impl.Topology; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQServer; /** * A ClusterConnection @@ -31,13 +31,13 @@ import org.apache.activemq.core.server.HornetQServer; * * */ -public interface ClusterConnection extends HornetQComponent, ClusterTopologyListener +public interface ClusterConnection extends ActiveMQComponent, ClusterTopologyListener { SimpleString getName(); String getNodeID(); - HornetQServer getServer(); + ActiveMQServer getServer(); void nodeAnnounced(long eventUID, String nodeID, String backupGroupName, String scaleDownGroupName, Pair connectorPair, boolean backup); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterControl.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterControl.java index ccd4805f88..1567374fbb 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterControl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterControl.java @@ -33,9 +33,9 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.NodeAnnounceMessag import org.apache.activemq.core.protocol.core.impl.wireformat.QuorumVoteMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.QuorumVoteReplyMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ScaleDownAnnounceMessage; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.cluster.qourum.QuorumVoteHandler; import org.apache.activemq.core.server.cluster.qourum.Vote; @@ -49,13 +49,13 @@ public class ClusterControl implements AutoCloseable private final ClientSessionFactoryInternal sessionFactory; - private final HornetQServer server; + private final ActiveMQServer server; private final String clusterUser; private final String clusterPassword; - public ClusterControl(ClientSessionFactoryInternal sessionFactory, HornetQServer server) + public ClusterControl(ClientSessionFactoryInternal sessionFactory, ActiveMQServer server) { this.sessionFactory = sessionFactory; this.server = server; @@ -80,7 +80,7 @@ public class ClusterControl implements AutoCloseable if (!packet.isAuthorized()) { - throw HornetQMessageBundle.BUNDLE.unableToValidateClusterUser(clusterUser); + throw ActiveMQMessageBundle.BUNDLE.unableToValidateClusterUser(clusterUser); } } @@ -98,7 +98,7 @@ public class ClusterControl implements AutoCloseable ClusterConnectionConfiguration config = ConfigurationUtils.getReplicationClusterConfiguration(server.getConfiguration(), replicationClusterName); if (config == null) { - HornetQServerLogger.LOGGER.announceBackupNoClusterConnections(); + ActiveMQServerLogger.LOGGER.announceBackupNoClusterConnections(); throw new ActiveMQException("lacking cluster connection"); } @@ -106,7 +106,7 @@ public class ClusterControl implements AutoCloseable if (connector == null) { - HornetQServerLogger.LOGGER.announceBackupNoConnector(config.getConnectorName()); + ActiveMQServerLogger.LOGGER.announceBackupNoConnector(config.getConnectorName()); throw new ActiveMQException("lacking cluster connection"); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterController.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterController.java index 383678881a..371994e813 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterController.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterController.java @@ -27,7 +27,7 @@ import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClusterTopologyListener; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.client.impl.ServerLocatorImpl; @@ -44,9 +44,9 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.NodeAnnounceMessag import org.apache.activemq.core.protocol.core.impl.wireformat.QuorumVoteMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.QuorumVoteReplyMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ScaleDownAnnounceMessage; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.cluster.qourum.QuorumManager; import org.apache.activemq.core.server.cluster.qourum.QuorumVoteHandler; import org.apache.activemq.core.server.cluster.qourum.Vote; @@ -56,13 +56,13 @@ import org.apache.activemq.spi.core.remoting.Acceptor; /** * used for creating and managing cluster control connections for each cluster connection and the replication connection */ -public class ClusterController implements HornetQComponent +public class ClusterController implements ActiveMQComponent { - private static final boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); private final QuorumManager quorumManager; - private final HornetQServer server; + private final ActiveMQServer server; private Map locators = new HashMap<>(); @@ -79,7 +79,7 @@ public class ClusterController implements HornetQComponent private boolean started; private SimpleString replicatedClusterName; - public ClusterController(HornetQServer server, ScheduledExecutorService scheduledExecutor) + public ClusterController(ActiveMQServer server, ScheduledExecutorService scheduledExecutor) { this.server = server; executor = server.getExecutorFactory().getExecutor(); @@ -99,7 +99,7 @@ public class ClusterController implements HornetQComponent replicationLocator = locators.get(replicatedClusterName); if (replicationLocator == null) { - HornetQServerLogger.LOGGER.noClusterConnectionForReplicationCluster(); + ActiveMQServerLogger.LOGGER.noClusterConnectionForReplicationCluster(); replicationLocator = defaultLocator; } } @@ -162,12 +162,12 @@ public class ClusterController implements HornetQComponent */ public void addClusterConnection(SimpleString name, DiscoveryGroupConfiguration dg) { - ServerLocatorImpl serverLocator = (ServerLocatorImpl) HornetQClient.createServerLocatorWithHA(dg); + ServerLocatorImpl serverLocator = (ServerLocatorImpl) ActiveMQClient.createServerLocatorWithHA(dg); //if the cluster isn't available we want to hang around until it is serverLocator.setReconnectAttempts(-1); serverLocator.setInitialConnectAttempts(-1); //this is used for replication so need to use the server packet decoder - serverLocator.setProtocolManagerFactory(HornetQServerSideProtocolManagerFactory.getInstance()); + serverLocator.setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance()); locators.put(name, serverLocator); } @@ -179,12 +179,12 @@ public class ClusterController implements HornetQComponent */ public void addClusterConnection(SimpleString name, TransportConfiguration[] tcConfigs) { - ServerLocatorImpl serverLocator = (ServerLocatorImpl) HornetQClient.createServerLocatorWithHA(tcConfigs); + ServerLocatorImpl serverLocator = (ServerLocatorImpl) ActiveMQClient.createServerLocatorWithHA(tcConfigs); //if the cluster isn't available we want to hang around until it is serverLocator.setReconnectAttempts(-1); serverLocator.setInitialConnectAttempts(-1); //this is used for replication so need to use the server packet decoder - serverLocator.setProtocolManagerFactory(HornetQServerSideProtocolManagerFactory.getInstance()); + serverLocator.setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance()); locators.put(name, serverLocator); } @@ -248,7 +248,7 @@ public class ClusterController implements HornetQComponent */ public ClusterControl connectToNodeInCluster(ClientSessionFactoryInternal sf) { - sf.getServerLocator().setProtocolManagerFactory(HornetQServerSideProtocolManagerFactory.getInstance()); + sf.getServerLocator().setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance()); return new ClusterControl(sf, server); } @@ -374,7 +374,7 @@ public class ClusterController implements HornetQComponent } if (isTrace) { - HornetQServerLogger.LOGGER.trace("Server " + server + " receiving nodeUp from NodeID=" + msg.getNodeID() + ", pair=" + pair); + ActiveMQServerLogger.LOGGER.trace("Server " + server + " receiving nodeUp from NodeID=" + msg.getNodeID() + ", pair=" + pair); } if (acceptorUsed != null) @@ -387,12 +387,12 @@ public class ClusterController implements HornetQComponent } else { - HornetQServerLogger.LOGGER.debug("Cluster connection is null on acceptor = " + acceptorUsed); + ActiveMQServerLogger.LOGGER.debug("Cluster connection is null on acceptor = " + acceptorUsed); } } else { - HornetQServerLogger.LOGGER.debug("there is no acceptor used configured at the CoreProtocolManager " + this); + ActiveMQServerLogger.LOGGER.debug("there is no acceptor used configured at the CoreProtocolManager " + this); } } else if (packet.getType() == PacketImpl.QUORUM_VOTE) diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterManager.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterManager.java index 3ecdbaa015..5da2be867b 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterManager.java @@ -31,7 +31,7 @@ import org.apache.activemq.api.core.DiscoveryGroupConfiguration; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.core.client.impl.ServerLocatorInternal; import org.apache.activemq.core.config.BridgeConfiguration; import org.apache.activemq.core.config.ClusterConnectionConfiguration; @@ -43,11 +43,11 @@ import org.apache.activemq.core.protocol.core.Channel; import org.apache.activemq.core.protocol.core.CoreRemotingConnection; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.PacketImpl; -import org.apache.activemq.core.protocol.core.impl.wireformat.HornetQExceptionMessage; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.protocol.core.impl.wireformat.ActiveMQExceptionMessage; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.cluster.ha.HAManager; @@ -73,7 +73,7 @@ import org.apache.activemq.utils.FutureLatch; * @author Tim Fox * @author Clebert Suconic */ -public final class ClusterManager implements HornetQComponent +public final class ClusterManager implements ActiveMQComponent { private ClusterController clusterController; @@ -85,7 +85,7 @@ public final class ClusterManager implements HornetQComponent private final ExecutorFactory executorFactory; - private final HornetQServer server; + private final ActiveMQServer server; private final PostOffice postOffice; @@ -146,7 +146,7 @@ public final class ClusterManager implements HornetQComponent private final NodeManager nodeManager; public ClusterManager(final ExecutorFactory executorFactory, - final HornetQServer server, + final ActiveMQServer server, final PostOffice postOffice, final ScheduledExecutorService scheduledExecutor, final ManagementService managementService, @@ -288,7 +288,7 @@ public final class ClusterManager implements HornetQComponent } catch (Exception e) { - HornetQServerLogger.LOGGER.unableToStartBroadcastGroup(e, group.getName()); + ActiveMQServerLogger.LOGGER.unableToStartBroadcastGroup(e, group.getName()); } } @@ -300,7 +300,7 @@ public final class ClusterManager implements HornetQComponent } catch (Exception e) { - HornetQServerLogger.LOGGER.unableToStartClusterConnection(e, conn.getName()); + ActiveMQServerLogger.LOGGER.unableToStartClusterConnection(e, conn.getName()); } } @@ -314,7 +314,7 @@ public final class ClusterManager implements HornetQComponent } catch (Exception e) { - HornetQServerLogger.LOGGER.unableToStartBridge(e, bridge.getName()); + ActiveMQServerLogger.LOGGER.unableToStartBridge(e, bridge.getName()); } } @@ -376,7 +376,7 @@ public final class ClusterManager implements HornetQComponent } catch (Exception e) { - HornetQServerLogger.LOGGER.errorClosingServerLocator(e, clusterLocator); + ActiveMQServerLogger.LOGGER.errorClosingServerLocator(e, clusterLocator); } } clusterLocators.clear(); @@ -433,26 +433,26 @@ public final class ClusterManager implements HornetQComponent { if (config.getName() == null) { - HornetQServerLogger.LOGGER.bridgeNotUnique(); + ActiveMQServerLogger.LOGGER.bridgeNotUnique(); return; } if (config.getQueueName() == null) { - HornetQServerLogger.LOGGER.bridgeNoQueue(config.getName()); + ActiveMQServerLogger.LOGGER.bridgeNoQueue(config.getName()); return; } if (config.getForwardingAddress() == null) { - HornetQServerLogger.LOGGER.bridgeNoForwardAddress(config.getName()); + ActiveMQServerLogger.LOGGER.bridgeNoForwardAddress(config.getName()); } if (bridges.containsKey(config.getName())) { - HornetQServerLogger.LOGGER.bridgeAlreadyDeployed(config.getName()); + ActiveMQServerLogger.LOGGER.bridgeAlreadyDeployed(config.getName()); return; } @@ -463,7 +463,7 @@ public final class ClusterManager implements HornetQComponent if (binding == null) { - HornetQServerLogger.LOGGER.bridgeQueueNotFound(config.getQueueName(), config.getName()); + ActiveMQServerLogger.LOGGER.bridgeQueueNotFound(config.getQueueName(), config.getName()); return; } @@ -478,18 +478,18 @@ public final class ClusterManager implements HornetQComponent .get(config.getDiscoveryGroupName()); if (discoveryGroupConfiguration == null) { - HornetQServerLogger.LOGGER.bridgeNoDiscoveryGroup(config.getDiscoveryGroupName()); + ActiveMQServerLogger.LOGGER.bridgeNoDiscoveryGroup(config.getDiscoveryGroupName()); return; } if (config.isHA()) { - serverLocator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithHA(discoveryGroupConfiguration); + serverLocator = (ServerLocatorInternal) ActiveMQClient.createServerLocatorWithHA(discoveryGroupConfiguration); } else { - serverLocator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithoutHA(discoveryGroupConfiguration); + serverLocator = (ServerLocatorInternal) ActiveMQClient.createServerLocatorWithoutHA(discoveryGroupConfiguration); } } @@ -499,17 +499,17 @@ public final class ClusterManager implements HornetQComponent if (tcConfigs == null) { - HornetQServerLogger.LOGGER.bridgeCantFindConnectors(config.getName()); + ActiveMQServerLogger.LOGGER.bridgeCantFindConnectors(config.getName()); return; } if (config.isHA()) { - serverLocator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithHA(tcConfigs); + serverLocator = (ServerLocatorInternal) ActiveMQClient.createServerLocatorWithHA(tcConfigs); } else { - serverLocator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithoutHA(tcConfigs); + serverLocator = (ServerLocatorInternal) ActiveMQClient.createServerLocatorWithoutHA(tcConfigs); } } @@ -541,7 +541,7 @@ public final class ClusterManager implements HornetQComponent if (!config.isUseDuplicateDetection()) { - HornetQServerLogger.LOGGER.debug("Bridge " + config.getName() + + ActiveMQServerLogger.LOGGER.debug("Bridge " + config.getName() + " is configured to not use duplicate detecion, it will send messages synchronously"); } @@ -595,11 +595,11 @@ public final class ClusterManager implements HornetQComponent { if (packet.getType() == PacketImpl.EXCEPTION) { - HornetQExceptionMessage msg = (HornetQExceptionMessage) packet; + ActiveMQExceptionMessage msg = (ActiveMQExceptionMessage) packet; final ActiveMQException exception = msg.getException(); if (exception.getType() == ActiveMQExceptionType.CLUSTER_SECURITY_EXCEPTION) { - HornetQServerLogger.LOGGER.clusterManagerAuthenticationError(exception.getMessage()); + ActiveMQServerLogger.LOGGER.clusterManagerAuthenticationError(exception.getMessage()); executor.execute(new Runnable() { @Override @@ -652,7 +652,7 @@ public final class ClusterManager implements HornetQComponent } catch (Exception e) { - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); } } bridges.clear(); @@ -696,7 +696,7 @@ public final class ClusterManager implements HornetQComponent if (clusterConnections.containsKey(config.getName())) { - HornetQServerLogger.LOGGER.clusterConnectionAlreadyExists(config.getConnectorName()); + ActiveMQServerLogger.LOGGER.clusterConnectionAlreadyExists(config.getConnectorName()); return; } @@ -708,9 +708,9 @@ public final class ClusterManager implements HornetQComponent if (dg == null) return; - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(this + " Starting a Discovery Group Cluster Connection, name=" + + ActiveMQServerLogger.LOGGER.debug(this + " Starting a Discovery Group Cluster Connection, name=" + config.getDiscoveryGroupName() + ", dg=" + dg); @@ -753,9 +753,9 @@ public final class ClusterManager implements HornetQComponent { TransportConfiguration[] tcConfigs = ClusterConfigurationUtil.getTransportConfigurations(config, configuration); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(this + " defining cluster connection towards " + Arrays.toString(tcConfigs)); + ActiveMQServerLogger.LOGGER.debug(this + " defining cluster connection towards " + Arrays.toString(tcConfigs)); } clusterConnection = new ClusterConnectionImpl(this, @@ -804,9 +804,9 @@ public final class ClusterManager implements HornetQComponent clusterConnections.put(config.getName(), clusterConnection); - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("ClusterConnection.start at " + clusterConnection, new Exception("trace")); + ActiveMQServerLogger.LOGGER.trace("ClusterConnection.start at " + clusterConnection, new Exception("trace")); } } @@ -824,7 +824,7 @@ public final class ClusterManager implements HornetQComponent } catch (Exception e) { - throw HornetQMessageBundle.BUNDLE.errorCreatingTransformerClass(e, transformerClassName); + throw ActiveMQMessageBundle.BUNDLE.errorCreatingTransformerClass(e, transformerClassName); } } return transformer; @@ -835,7 +835,7 @@ public final class ClusterManager implements HornetQComponent { if (broadcastGroups.containsKey(config.getName())) { - HornetQServerLogger.LOGGER.broadcastGroupAlreadyExists(config.getName()); + ActiveMQServerLogger.LOGGER.broadcastGroupAlreadyExists(config.getName()); return; } @@ -882,7 +882,7 @@ public final class ClusterManager implements HornetQComponent private void logWarnNoConnector(final String connectorName, final String bgName) { - HornetQServerLogger.LOGGER.broadcastGroupNoConnector(connectorName, bgName); + ActiveMQServerLogger.LOGGER.broadcastGroupNoConnector(connectorName, bgName); } private synchronized Collection cloneClusterConnections() diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ColocatedHAManager.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ColocatedHAManager.java index b53a2be812..bf1a58c1ae 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ColocatedHAManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ColocatedHAManager.java @@ -18,8 +18,8 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.TopologyMember; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.server.ActivationParams; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.cluster.ClusterControl; import org.apache.activemq.core.server.cluster.ClusterController; @@ -33,16 +33,16 @@ public class ColocatedHAManager implements HAManager private final ColocatedPolicy haPolicy; - private final HornetQServer server; + private final ActiveMQServer server; - private Map backupServers = new HashMap<>(); + private Map backupServers = new HashMap<>(); private boolean started; - public ColocatedHAManager(ColocatedPolicy haPolicy, HornetQServer hornetQServer) + public ColocatedHAManager(ColocatedPolicy haPolicy, ActiveMQServer activeMQServer) { this.haPolicy = haPolicy; - server = hornetQServer; + server = activeMQServer; } /** @@ -63,11 +63,11 @@ public class ColocatedHAManager implements HAManager */ public void stop() { - for (HornetQServer hornetQServer : backupServers.values()) + for (ActiveMQServer activeMQServer : backupServers.values()) { try { - hornetQServer.stop(); + activeMQServer.stop(); } catch (Exception e) { @@ -107,7 +107,7 @@ public class ColocatedHAManager implements HAManager * * @return the backups */ - public Map getBackupServers() + public Map getBackupServers() { return backupServers; } @@ -149,7 +149,7 @@ public class ColocatedHAManager implements HAManager private synchronized boolean activateSharedStoreBackup(String journalDirectory, String bindingsDirectory, String largeMessagesDirectory, String pagingDirectory) throws Exception { Configuration configuration = server.getConfiguration().copy(); - HornetQServer backup = server.createBackupServer(configuration); + ActiveMQServer backup = server.createBackupServer(configuration); try { int portOffset = haPolicy.getBackupPortOffset() * (backupServers.size() + 1); @@ -166,10 +166,10 @@ public class ColocatedHAManager implements HAManager catch (Exception e) { backup.stop(); - HornetQServerLogger.LOGGER.activateSharedStoreSlaveFailed(e); + ActiveMQServerLogger.LOGGER.activateSharedStoreSlaveFailed(e); return false; } - HornetQServerLogger.LOGGER.activatingSharedStoreSlave(); + ActiveMQServerLogger.LOGGER.activatingSharedStoreSlave(); return true; } @@ -184,7 +184,7 @@ public class ColocatedHAManager implements HAManager private synchronized boolean activateReplicatedBackup(SimpleString nodeID) throws Exception { Configuration configuration = server.getConfiguration().copy(); - HornetQServer backup = server.createBackupServer(configuration); + ActiveMQServer backup = server.createBackupServer(configuration); try { TopologyMember member = server.getClusterManager().getDefaultConnection(null).getTopology().getMember(nodeID.toString()); @@ -202,10 +202,10 @@ public class ColocatedHAManager implements HAManager catch (Exception e) { backup.stop(); - HornetQServerLogger.LOGGER.activateReplicatedBackupFailed(e); + ActiveMQServerLogger.LOGGER.activateReplicatedBackupFailed(e); return false; } - HornetQServerLogger.LOGGER.activatingReplica(nodeID); + ActiveMQServerLogger.LOGGER.activatingReplica(nodeID); return true; } 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 bd897a43bb..3f32ca8b11 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 @@ -14,7 +14,7 @@ package org.apache.activemq.core.server.cluster.ha; 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.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.LiveActivation; import java.util.ArrayList; @@ -86,7 +86,7 @@ public class ColocatedPolicy implements HAPolicy } @Override - public LiveActivation createActivation(HornetQServerImpl server, boolean wasLive, Map activationParams, HornetQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO) throws Exception + public LiveActivation createActivation(ActiveMQServerImpl server, boolean wasLive, Map activationParams, ActiveMQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO) throws Exception { return new ColocatedActivation(server, this, livePolicy.createActivation(server, wasLive, activationParams, shutdownOnCriticalIO)); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/HAManager.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/HAManager.java index c5ca29bbb8..b9d041088f 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/HAManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/HAManager.java @@ -12,20 +12,20 @@ */ package org.apache.activemq.core.server.cluster.ha; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQServer; import java.util.Map; /* * An HAManager takes care of any colocated backups in a VM. * */ -public interface HAManager extends HornetQComponent +public interface HAManager extends ActiveMQComponent { /** * return the current backup servers * * @return the backups */ - Map getBackupServers(); + Map getBackupServers(); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/HAPolicy.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/HAPolicy.java index 747b864f48..44274d2d4a 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/HAPolicy.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/HAPolicy.java @@ -15,7 +15,7 @@ package org.apache.activemq.core.server.cluster.ha; import java.util.Map; import org.apache.activemq.core.server.impl.Activation; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; /** * Every live server will have an HAPolicy that configures the type of server that it should be either live, backup or @@ -26,7 +26,7 @@ public interface HAPolicy /* * created the Activation associated with this policy. * */ - T createActivation(HornetQServerImpl server, boolean wasLive, Map activationParams, HornetQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO) throws Exception; + T createActivation(ActiveMQServerImpl server, boolean wasLive, Map activationParams, ActiveMQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO) throws Exception; boolean isSharedStore(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/LiveOnlyPolicy.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/LiveOnlyPolicy.java index 1b83bb2e75..25b17987b4 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/LiveOnlyPolicy.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/LiveOnlyPolicy.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.server.cluster.ha; import org.apache.activemq.core.server.impl.Activation; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.LiveOnlyActivation; import java.util.Map; @@ -32,7 +32,7 @@ public class LiveOnlyPolicy implements HAPolicy } @Override - public Activation createActivation(HornetQServerImpl server, boolean wasLive, Map activationParams, HornetQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO) + public Activation createActivation(ActiveMQServerImpl server, boolean wasLive, Map activationParams, ActiveMQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO) { return new LiveOnlyActivation(server, this); } 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 f0c623dcab..c472e28048 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 @@ -14,7 +14,7 @@ package org.apache.activemq.core.server.cluster.ha; 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.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.SharedNothingBackupActivation; import java.util.Map; @@ -125,9 +125,9 @@ public class ReplicaPolicy extends BackupPolicy } @Override - public Activation createActivation(HornetQServerImpl server, boolean wasLive, + public Activation createActivation(ActiveMQServerImpl server, boolean wasLive, Map activationParams, - HornetQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO) throws Exception + ActiveMQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO) throws Exception { SharedNothingBackupActivation backupActivation = new SharedNothingBackupActivation(server, wasLive, activationParams, shutdownOnCriticalIO, this); backupActivation.init(); 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 e528d37d1d..94929c25e8 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 @@ -13,7 +13,7 @@ package org.apache.activemq.core.server.cluster.ha; import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.LiveActivation; import org.apache.activemq.core.server.impl.SharedNothingLiveActivation; @@ -160,7 +160,7 @@ public class ReplicatedPolicy implements HAPolicy } @Override - public LiveActivation createActivation(HornetQServerImpl server, boolean wasLive, Map activationParams, HornetQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO) + public LiveActivation createActivation(ActiveMQServerImpl server, boolean wasLive, Map activationParams, ActiveMQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO) { return new SharedNothingLiveActivation(server, this); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ScaleDownPolicy.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ScaleDownPolicy.java index dfb6f5720f..f36a8bc35e 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ScaleDownPolicy.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/ScaleDownPolicy.java @@ -15,12 +15,12 @@ package org.apache.activemq.core.server.cluster.ha; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.core.client.impl.ServerLocatorInternal; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import java.lang.reflect.Array; import java.util.ArrayList; @@ -110,48 +110,48 @@ public class ScaleDownPolicy this.enabled = enabled; } - public static ServerLocatorInternal getScaleDownConnector(ScaleDownPolicy scaleDownPolicy, HornetQServer hornetQServer) throws ActiveMQException + public static ServerLocatorInternal getScaleDownConnector(ScaleDownPolicy scaleDownPolicy, ActiveMQServer activeMQServer) throws ActiveMQException { if (!scaleDownPolicy.getConnectors().isEmpty()) { - return (ServerLocatorInternal) HornetQClient.createServerLocatorWithHA(connectorNameListToArray(scaleDownPolicy.getConnectors(), hornetQServer)); + return (ServerLocatorInternal) ActiveMQClient.createServerLocatorWithHA(connectorNameListToArray(scaleDownPolicy.getConnectors(), activeMQServer)); } else if (scaleDownPolicy.getDiscoveryGroup() != null) { - DiscoveryGroupConfiguration dg = hornetQServer.getConfiguration().getDiscoveryGroupConfigurations().get(scaleDownPolicy.getDiscoveryGroup()); + DiscoveryGroupConfiguration dg = activeMQServer.getConfiguration().getDiscoveryGroupConfigurations().get(scaleDownPolicy.getDiscoveryGroup()); if (dg == null) { - throw HornetQMessageBundle.BUNDLE.noDiscoveryGroupFound(dg); + throw ActiveMQMessageBundle.BUNDLE.noDiscoveryGroupFound(dg); } - return (ServerLocatorInternal) HornetQClient.createServerLocatorWithHA(dg); + return (ServerLocatorInternal) ActiveMQClient.createServerLocatorWithHA(dg); } else { - Map connectorConfigurations = hornetQServer.getConfiguration().getConnectorConfigurations(); + Map connectorConfigurations = activeMQServer.getConfiguration().getConnectorConfigurations(); for (TransportConfiguration transportConfiguration : connectorConfigurations.values()) { if (transportConfiguration.getFactoryClassName().equals(InVMConnectorFactory.class.getName())) { - return (ServerLocatorInternal) HornetQClient.createServerLocatorWithHA(transportConfiguration); + return (ServerLocatorInternal) ActiveMQClient.createServerLocatorWithHA(transportConfiguration); } } } - throw HornetQMessageBundle.BUNDLE.noConfigurationFoundForScaleDown(); + throw ActiveMQMessageBundle.BUNDLE.noConfigurationFoundForScaleDown(); } - private static TransportConfiguration[] connectorNameListToArray(final List connectorNames, HornetQServer hornetQServer) + private static TransportConfiguration[] connectorNameListToArray(final List connectorNames, ActiveMQServer activeMQServer) { TransportConfiguration[] tcConfigs = (TransportConfiguration[]) Array.newInstance(TransportConfiguration.class, connectorNames.size()); int count = 0; for (String connectorName : connectorNames) { - TransportConfiguration connector = hornetQServer.getConfiguration().getConnectorConfigurations().get(connectorName); + TransportConfiguration connector = activeMQServer.getConfiguration().getConnectorConfigurations().get(connectorName); if (connector == null) { - HornetQServerLogger.LOGGER.bridgeNoConnector(connectorName); + ActiveMQServerLogger.LOGGER.bridgeNoConnector(connectorName); return null; } 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 4f625c3102..682c9f54ec 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 @@ -13,7 +13,7 @@ package org.apache.activemq.core.server.cluster.ha; import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.LiveActivation; import org.apache.activemq.core.server.impl.SharedStoreLiveActivation; @@ -86,7 +86,7 @@ public class SharedStoreMasterPolicy implements HAPolicy } @Override - public LiveActivation createActivation(HornetQServerImpl server, boolean wasLive, Map activationParams, HornetQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO) + public LiveActivation createActivation(ActiveMQServerImpl server, boolean wasLive, Map activationParams, ActiveMQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO) { return new SharedStoreLiveActivation(server, this); } 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 51ad6e9f65..56e5faa578 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 @@ -14,7 +14,7 @@ package org.apache.activemq.core.server.cluster.ha; 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.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.SharedStoreBackupActivation; import java.util.Map; @@ -97,7 +97,7 @@ public class SharedStoreSlavePolicy extends BackupPolicy } @Override - public Activation createActivation(HornetQServerImpl server, boolean wasLive, Map activationParams, HornetQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO) + public Activation createActivation(ActiveMQServerImpl server, boolean wasLive, Map activationParams, ActiveMQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO) { return new SharedStoreBackupActivation(server, this); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/StandaloneHAManager.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/StandaloneHAManager.java index 94cedb24e5..a828cdffa6 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/StandaloneHAManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ha/StandaloneHAManager.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.server.cluster.ha; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import java.util.HashMap; import java.util.Map; @@ -22,12 +22,12 @@ import java.util.Map; * */ public class StandaloneHAManager implements HAManager { - Map servers = new HashMap<>(); + Map servers = new HashMap<>(); boolean isStarted = false; @Override - public Map getBackupServers() + public Map getBackupServers() { return servers; } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/BridgeImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/BridgeImpl.java index 93af434426..9bead5d9e0 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/BridgeImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/BridgeImpl.java @@ -41,8 +41,8 @@ import org.apache.activemq.core.client.impl.ServerLocatorInternal; import org.apache.activemq.core.filter.Filter; import org.apache.activemq.core.message.impl.MessageImpl; import org.apache.activemq.core.persistence.StorageManager; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.HandleStatus; -import org.apache.activemq.core.server.HornetQServerLogger; import org.apache.activemq.core.server.LargeServerMessage; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; @@ -72,7 +72,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled { // Constants ----------------------------------------------------- - private static final boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); // Attributes ---------------------------------------------------- @@ -282,14 +282,14 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Cancelling reference " + ref + " on bridge " + this); + ActiveMQServerLogger.LOGGER.trace("Cancelling reference " + ref + " on bridge " + this); } list.addFirst(ref); } if (isTrace && list.isEmpty()) { - HornetQServerLogger.LOGGER.trace("didn't have any references to cancel on bridge " + this); + ActiveMQServerLogger.LOGGER.trace("didn't have any references to cancel on bridge " + this); } Queue refqueue = null; @@ -307,7 +307,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled catch (Exception e) { // There isn't much we can do besides log an error - HornetQServerLogger.LOGGER.errorCancellingRefOnBridge(e, ref2); + ActiveMQServerLogger.LOGGER.errorCancellingRefOnBridge(e, ref2); } } } @@ -323,7 +323,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled if (!ok) { - HornetQServerLogger.LOGGER.timedOutWaitingToStopBridge(); + ActiveMQServerLogger.LOGGER.timedOutWaitingToStopBridge(); } } @@ -341,7 +341,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } catch (Exception dontcare) { - HornetQServerLogger.LOGGER.debug(dontcare.getMessage(), dontcare); + ActiveMQServerLogger.LOGGER.debug(dontcare.getMessage(), dontcare); } session = null; } @@ -372,9 +372,9 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled stopping = true; - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Bridge " + this.name + " being stopped"); + ActiveMQServerLogger.LOGGER.debug("Bridge " + this.name + " being stopped"); } if (futureScheduledReconnection != null) @@ -395,16 +395,16 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } catch (Exception e) { - HornetQServerLogger.LOGGER.broadcastBridgeStoppedError(e); + ActiveMQServerLogger.LOGGER.broadcastBridgeStoppedError(e); } } } public void pause() throws Exception { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Bridge " + this.name + " being paused"); + ActiveMQServerLogger.LOGGER.debug("Bridge " + this.name + " being paused"); } executor.execute(new PauseRunnable()); @@ -420,7 +420,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } catch (Exception e) { - HornetQServerLogger.LOGGER.notificationBridgeStoppedError(e); + ActiveMQServerLogger.LOGGER.notificationBridgeStoppedError(e); } } } @@ -491,7 +491,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled { if (isTrace) { - HornetQServerLogger.LOGGER.trace(this + " Acking " + ref + " on queue " + ref.getQueue()); + ActiveMQServerLogger.LOGGER.trace(this + " Acking " + ref + " on queue " + ref.getQueue()); } ref.getQueue().acknowledge(ref); pendingAcks.countDown(); @@ -499,7 +499,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } catch (Exception e) { - HornetQServerLogger.LOGGER.bridgeFailedToAck(e); + ActiveMQServerLogger.LOGGER.bridgeFailedToAck(e); } } } @@ -525,9 +525,9 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled final ServerMessage transformedMessage = transformer.transform(message); if (transformedMessage != message) { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("The transformer " + transformer + + ActiveMQServerLogger.LOGGER.debug("The transformer " + transformer + " made a copy of the message " + message + " as transformedMessage"); @@ -552,9 +552,9 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled { if (!active) { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(this + "::Ignoring reference on bridge as it is set to inactive ref=" + ref); + ActiveMQServerLogger.LOGGER.debug(this + "::Ignoring reference on bridge as it is set to inactive ref=" + ref); } return HandleStatus.BUSY; } @@ -566,7 +566,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled if (isTrace) { - HornetQServerLogger.LOGGER.trace("Bridge " + this + " is handling reference=" + ref); + ActiveMQServerLogger.LOGGER.trace("Bridge " + this + " is handling reference=" + ref); } ref.handled(); @@ -626,7 +626,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { - HornetQServerLogger.LOGGER.bridgeConnectionFailed(me, failedOver); + ActiveMQServerLogger.LOGGER.bridgeConnectionFailed(me, failedOver); synchronized (connectionGuard) { @@ -660,7 +660,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled { try { - HornetQServerLogger.LOGGER.debug("Moving " + queue.getMessageCount() + " messages from " + queue.getName() + " to " + scaleDownTargetNodeID); + ActiveMQServerLogger.LOGGER.debug("Moving " + queue.getMessageCount() + " messages from " + queue.getName() + " to " + scaleDownTargetNodeID); ((QueueImpl)queue).moveReferencesBetweenSnFQueues(SimpleString.toSimpleString(scaleDownTargetNodeID)); // stop the bridge from trying to reconnect and clean up all the bindings @@ -668,19 +668,19 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } catch (Exception e) { - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); } } } else if (scaleDownTargetNodeID != null) { // the disconnected node is scaling down to me, no need to reconnect to it - HornetQServerLogger.LOGGER.debug("Received scaleDownTargetNodeID: " + scaleDownTargetNodeID + "; cancelling reconnect."); + ActiveMQServerLogger.LOGGER.debug("Received scaleDownTargetNodeID: " + scaleDownTargetNodeID + "; cancelling reconnect."); fail(true); } else { - HornetQServerLogger.LOGGER.debug("Received invalid scaleDownTargetNodeID: " + scaleDownTargetNodeID); + ActiveMQServerLogger.LOGGER.debug("Received invalid scaleDownTargetNodeID: " + scaleDownTargetNodeID); //we never fail permanently here, this only happens once all reconnect tries have happened fail(false); @@ -725,7 +725,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled catch (final ActiveMQException e) { unsetLargeMessageDelivery(); - HornetQServerLogger.LOGGER.bridgeUnableToSendMessage(e, ref); + ActiveMQServerLogger.LOGGER.bridgeUnableToSendMessage(e, ref); connectionFailed(e, false); } @@ -745,9 +745,9 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled // from the acks so it will get resent, duplicate detection will cope // with any messages resent - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("going to send message: " + message + " from " + this.getQueue()); + ActiveMQServerLogger.LOGGER.trace("going to send message: " + message + " from " + this.getQueue()); } try @@ -756,7 +756,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } catch (final ActiveMQException e) { - HornetQServerLogger.LOGGER.bridgeUnableToSendMessage(e, ref); + ActiveMQServerLogger.LOGGER.bridgeUnableToSendMessage(e, ref); // We remove this reference as we are returning busy which means the reference will never leave the Queue. // because of this we have to remove the reference here @@ -810,7 +810,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } protected void fail(final boolean permanently) { - HornetQServerLogger.LOGGER.debug(this + "\n\t::fail being called, permanently=" + permanently); + ActiveMQServerLogger.LOGGER.debug(this + "\n\t::fail being called, permanently=" + permanently); if (queue != null) { @@ -818,13 +818,13 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Removing consumer on fail " + this + " from queue " + queue); + ActiveMQServerLogger.LOGGER.trace("Removing consumer on fail " + this + " from queue " + queue); } queue.removeConsumer(this); } catch (Exception dontcare) { - HornetQServerLogger.LOGGER.debug(dontcare); + ActiveMQServerLogger.LOGGER.debug(dontcare); } } @@ -916,7 +916,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled { if (!keepConnecting) return; - HornetQServerLogger.LOGGER.debug("Connecting " + this + " to its destination [" + nodeUUID.toString() + "], csf=" + this.csf); + ActiveMQServerLogger.LOGGER.debug("Connecting " + this + " to its destination [" + nodeUUID.toString() + "], csf=" + this.csf); retryCount++; @@ -947,7 +947,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } catch (Throwable e) { - HornetQServerLogger.LOGGER.errorQueryingBridge(e, name); + ActiveMQServerLogger.LOGGER.errorQueryingBridge(e, name); // This was an issue during startup, we will not count this retry retryCount--; @@ -959,7 +959,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled { if (!query.isExists()) { - HornetQServerLogger.LOGGER.errorQueryingBridge(forwardingAddress, retryCount); + ActiveMQServerLogger.LOGGER.errorQueryingBridge(forwardingAddress, retryCount); scheduleRetryConnect(); return; } @@ -968,7 +968,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled { if (!query.isExists()) { - HornetQServerLogger.LOGGER.bridgeNoBindings(getName(), getForwardingAddress(), getForwardingAddress()); + ActiveMQServerLogger.LOGGER.bridgeNoBindings(getName(), getForwardingAddress(), getForwardingAddress()); } } } @@ -985,7 +985,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled queue.addConsumer(BridgeImpl.this); queue.deliverAsync(); - HornetQServerLogger.LOGGER.bridgeConnected(this); + ActiveMQServerLogger.LOGGER.bridgeConnected(this); // We only do this on plain core bridges if (isPlainCoreBridge()) @@ -1001,7 +1001,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled // the session was created while its server was starting, retry it: if (e.getType() == ActiveMQExceptionType.SESSION_CREATION_REJECTED) { - HornetQServerLogger.LOGGER.errorStartingBridge(name); + ActiveMQServerLogger.LOGGER.errorStartingBridge(name); // We are not going to count this one as a retry retryCount--; @@ -1011,9 +1011,9 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } else { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Bridge " + this + " is unable to connect to destination. Retrying", e); + ActiveMQServerLogger.LOGGER.debug("Bridge " + this + " is unable to connect to destination. Retrying", e); } scheduleRetryConnect(); @@ -1021,7 +1021,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } catch (Exception e) { - HornetQServerLogger.LOGGER.errorConnectingBridge(e, this); + ActiveMQServerLogger.LOGGER.errorConnectingBridge(e, this); } } } @@ -1030,19 +1030,19 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled { if (serverLocator.isClosed()) { - HornetQServerLogger.LOGGER.bridgeLocatorShutdown(); + ActiveMQServerLogger.LOGGER.bridgeLocatorShutdown(); return; } if (stopping) { - HornetQServerLogger.LOGGER.bridgeStopping(); + ActiveMQServerLogger.LOGGER.bridgeStopping(); return; } if (reconnectAttemptsInUse >= 0 && retryCount > reconnectAttemptsInUse) { - HornetQServerLogger.LOGGER.bridgeAbortStart(name, retryCount, reconnectAttempts); + ActiveMQServerLogger.LOGGER.bridgeAbortStart(name, retryCount, reconnectAttempts); fail(true); return; } @@ -1057,7 +1057,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled timeout = maxRetryInterval; } - HornetQServerLogger.LOGGER.debug("Bridge " + this + + ActiveMQServerLogger.LOGGER.debug("Bridge " + this + " retrying connection #" + retryCount + ", maxRetry=" + @@ -1084,9 +1084,9 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled if (stopping) return; - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Scheduling retry for bridge " + this.name + " in " + milliseconds + " milliseconds"); + ActiveMQServerLogger.LOGGER.debug("Scheduling retry for bridge " + this.name + " in " + milliseconds + " milliseconds"); } futureScheduledReconnection = @@ -1154,18 +1154,18 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled { try { - HornetQServerLogger.LOGGER.debug("stopping bridge " + BridgeImpl.this); + ActiveMQServerLogger.LOGGER.debug("stopping bridge " + BridgeImpl.this); queue.removeConsumer(BridgeImpl.this); if (!pendingAcks.await(10, TimeUnit.SECONDS)) { - HornetQServerLogger.LOGGER.timedOutWaitingCompletions(BridgeImpl.this.toString(), + ActiveMQServerLogger.LOGGER.timedOutWaitingCompletions(BridgeImpl.this.toString(), pendingAcks.getCount()); } synchronized (BridgeImpl.this) { - HornetQServerLogger.LOGGER.debug("Closing Session for bridge " + BridgeImpl.this.name); + ActiveMQServerLogger.LOGGER.debug("Closing Session for bridge " + BridgeImpl.this.name); started = false; @@ -1178,7 +1178,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled if (session != null) { - HornetQServerLogger.LOGGER.debug("Cleaning up session " + session); + ActiveMQServerLogger.LOGGER.debug("Cleaning up session " + session); session.removeFailureListener(BridgeImpl.this); try { @@ -1202,17 +1202,17 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled if (isTrace) { - HornetQServerLogger.LOGGER.trace("Removing consumer on stopRunnable " + this + " from queue " + queue); + ActiveMQServerLogger.LOGGER.trace("Removing consumer on stopRunnable " + this + " from queue " + queue); } - HornetQServerLogger.LOGGER.bridgeStopped(name); + ActiveMQServerLogger.LOGGER.bridgeStopped(name); } catch (RuntimeException e) { - HornetQServerLogger.LOGGER.error("Failed to stop bridge", e); + ActiveMQServerLogger.LOGGER.error("Failed to stop bridge", e); } catch (InterruptedException e) { - HornetQServerLogger.LOGGER.error("Failed to stop bridge", e); + ActiveMQServerLogger.LOGGER.error("Failed to stop bridge", e); } } } @@ -1227,7 +1227,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled if (!pendingAcks.await(60, TimeUnit.SECONDS)) { - HornetQServerLogger.LOGGER.timedOutWaitingCompletions(BridgeImpl.this.toString(), + ActiveMQServerLogger.LOGGER.timedOutWaitingCompletions(BridgeImpl.this.toString(), pendingAcks.getCount()); } @@ -1239,11 +1239,11 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled internalCancelReferences(); - HornetQServerLogger.LOGGER.bridgePaused(name); + ActiveMQServerLogger.LOGGER.bridgePaused(name); } catch (Exception e) { - HornetQServerLogger.LOGGER.errorPausingBridge(e); + ActiveMQServerLogger.LOGGER.errorPausingBridge(e); } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/BroadcastGroupImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/BroadcastGroupImpl.java index 33e8faeeaa..46ae3b77ce 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/BroadcastGroupImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/BroadcastGroupImpl.java @@ -25,7 +25,7 @@ import org.apache.activemq.api.core.BroadcastEndpointFactory; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.CoreNotificationType; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.cluster.BroadcastGroup; import org.apache.activemq.core.server.management.Notification; @@ -137,7 +137,7 @@ public class BroadcastGroupImpl implements BroadcastGroup, Runnable } catch (Exception e1) { - HornetQServerLogger.LOGGER.broadcastGroupClosed(e1); + ActiveMQServerLogger.LOGGER.broadcastGroupClosed(e1); } started = false; @@ -153,7 +153,7 @@ public class BroadcastGroupImpl implements BroadcastGroup, Runnable } catch (Exception e) { - HornetQServerLogger.LOGGER.broadcastGroupClosed(e); + ActiveMQServerLogger.LOGGER.broadcastGroupClosed(e); } } @@ -232,12 +232,12 @@ public class BroadcastGroupImpl implements BroadcastGroup, Runnable // only log the exception at ERROR level once, even if it fails multiple times in a row - HORNETQ-919 if (!loggedBroadcastException) { - HornetQServerLogger.LOGGER.errorBroadcastingConnectorConfigs(e); + ActiveMQServerLogger.LOGGER.errorBroadcastingConnectorConfigs(e); loggedBroadcastException = true; } else { - HornetQServerLogger.LOGGER.debug("Failed to broadcast connector configs...again", e); + ActiveMQServerLogger.LOGGER.debug("Failed to broadcast connector configs...again", e); } } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/ClusterConnectionBridge.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/ClusterConnectionBridge.java index 9d43f5892f..e86a22ff15 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/ClusterConnectionBridge.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/ClusterConnectionBridge.java @@ -35,12 +35,12 @@ import org.apache.activemq.core.filter.Filter; import org.apache.activemq.core.message.impl.MessageImpl; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.BindingType; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.server.cluster.ClusterConnection; import org.apache.activemq.core.server.cluster.ClusterManager; -import org.apache.activemq.core.server.cluster.HornetQServerSideProtocolManagerFactory; +import org.apache.activemq.core.server.cluster.ActiveMQServerSideProtocolManagerFactory; import org.apache.activemq.core.server.cluster.MessageFlowRecord; import org.apache.activemq.core.server.cluster.Transformer; import org.apache.activemq.utils.UUID; @@ -139,9 +139,9 @@ public class ClusterConnectionBridge extends BridgeImpl // we need to disable DLQ check on the clustered bridges queue.setInternalQueue(true); - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("Setting up bridge between " + clusterConnection.getConnector() + " and " + targetLocator, + ActiveMQServerLogger.LOGGER.trace("Setting up bridge between " + clusterConnection.getConnector() + " and " + targetLocator, new Exception("trace")); } } @@ -149,13 +149,13 @@ public class ClusterConnectionBridge extends BridgeImpl @Override protected ClientSessionFactoryInternal createSessionFactory() throws Exception { - serverLocator.setProtocolManagerFactory(HornetQServerSideProtocolManagerFactory.getInstance()); + serverLocator.setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance()); ClientSessionFactoryInternal factory = (ClientSessionFactoryInternal) serverLocator.createSessionFactory(targetNodeID); setSessionFactory(factory); if (factory == null) { - HornetQServerLogger.LOGGER.nodeNotAvailable(targetNodeID); + ActiveMQServerLogger.LOGGER.nodeNotAvailable(targetNodeID); return null; } factory.setReconnectAttempts(0); @@ -173,9 +173,9 @@ public class ClusterConnectionBridge extends BridgeImpl // Note we must copy since same message may get routed to other nodes which require different headers ServerMessage messageCopy = message.copy(); - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("Clustered bridge copied message " + message + " as " + messageCopy + " before delivery"); + ActiveMQServerLogger.LOGGER.trace("Clustered bridge copied message " + message + " as " + messageCopy + " before delivery"); } // TODO - we can optimise this @@ -187,7 +187,7 @@ public class ClusterConnectionBridge extends BridgeImpl if (queueIds == null) { // Sanity check only - HornetQServerLogger.LOGGER.noQueueIdDefined(message, messageCopy, idsHeaderName); + ActiveMQServerLogger.LOGGER.noQueueIdDefined(message, messageCopy, idsHeaderName); throw new IllegalStateException("no queueIDs defined"); } @@ -208,9 +208,9 @@ public class ClusterConnectionBridge extends BridgeImpl private void setupNotificationConsumer() throws Exception { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Setting up notificationConsumer between " + this.clusterConnection.getConnector() + + ActiveMQServerLogger.LOGGER.debug("Setting up notificationConsumer between " + this.clusterConnection.getConnector() + " and " + flowRecord.getBridge().getForwardingConnection() + " clusterConnection = " + @@ -226,7 +226,7 @@ public class ClusterConnectionBridge extends BridgeImpl { try { - HornetQServerLogger.LOGGER.debug("Closing notification Consumer for reopening " + notifConsumer + + ActiveMQServerLogger.LOGGER.debug("Closing notification Consumer for reopening " + notifConsumer + " on bridge " + this.getName()); notifConsumer.close(); @@ -235,7 +235,7 @@ public class ClusterConnectionBridge extends BridgeImpl } catch (ActiveMQException e) { - HornetQServerLogger.LOGGER.errorClosingConsumer(e); + ActiveMQServerLogger.LOGGER.errorClosingConsumer(e); } } @@ -282,9 +282,9 @@ public class ClusterConnectionBridge extends BridgeImpl session.start(); ClientMessage message = session.createMessage(false); - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("Requesting sendQueueInfoToQueue through " + this, new Exception("trace")); + ActiveMQServerLogger.LOGGER.trace("Requesting sendQueueInfoToQueue through " + this, new Exception("trace")); } ManagementHelper.putOperationInvocation(message, ResourceNames.CORE_SERVER, @@ -294,9 +294,9 @@ public class ClusterConnectionBridge extends BridgeImpl ClientProducer prod = session.createProducer(managementAddress); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Cluster connetion bridge on " + clusterConnection + " requesting information on queues"); + ActiveMQServerLogger.LOGGER.debug("Cluster connetion bridge on " + clusterConnection + " requesting information on queues"); } prod.send(message); @@ -392,12 +392,12 @@ public class ClusterConnectionBridge extends BridgeImpl @Override protected void fail(final boolean permanently) { - HornetQServerLogger.LOGGER.debug("Cluster Bridge " + this.getName() + " failed, permanently=" + permanently); + ActiveMQServerLogger.LOGGER.debug("Cluster Bridge " + this.getName() + " failed, permanently=" + permanently); super.fail(permanently); if (permanently) { - HornetQServerLogger.LOGGER.debug("cluster node for bridge " + this.getName() + " is permanently down"); + ActiveMQServerLogger.LOGGER.debug("cluster node for bridge " + this.getName() + " is permanently down"); clusterConnection.removeRecord(targetNodeID); } else diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/ClusterConnectionImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/ClusterConnectionImpl.java index eb13e7e2a0..0755f52ef2 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/ClusterConnectionImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/ClusterConnectionImpl.java @@ -45,9 +45,9 @@ import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.Bindings; import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.postoffice.impl.PostOfficeImpl; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.cluster.Bridge; @@ -55,7 +55,7 @@ import org.apache.activemq.core.server.cluster.ClusterConnection; import org.apache.activemq.core.server.cluster.ClusterControl; import org.apache.activemq.core.server.cluster.ClusterManager; import org.apache.activemq.core.server.cluster.ClusterManager.IncomingInterceptorLookingForExceptionMessage; -import org.apache.activemq.core.server.cluster.HornetQServerSideProtocolManagerFactory; +import org.apache.activemq.core.server.cluster.ActiveMQServerSideProtocolManagerFactory; import org.apache.activemq.core.server.cluster.MessageFlowRecord; import org.apache.activemq.core.server.cluster.RemoteQueueBinding; import org.apache.activemq.core.server.group.impl.Proposal; @@ -75,13 +75,13 @@ import org.apache.activemq.utils.TypedProperties; */ public final class ClusterConnectionImpl implements ClusterConnection, AfterConnectInternalListener { - private static final boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); private final ExecutorFactory executorFactory; private final Executor executor; - private final HornetQServer server; + private final ActiveMQServer server; private final PostOffice postOffice; @@ -182,7 +182,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn final boolean routeWhenNoConsumers, final int confirmationWindowSize, final ExecutorFactory executorFactory, - final HornetQServer server, + final ActiveMQServer server, final PostOffice postOffice, final ManagementService managementService, final ScheduledExecutorService scheduledExecutor, @@ -289,7 +289,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn final boolean routeWhenNoConsumers, final int confirmationWindowSize, final ExecutorFactory executorFactory, - final HornetQServer server, + final ActiveMQServer server, final PostOffice postOffice, final ManagementService managementService, final ScheduledExecutorService scheduledExecutor, @@ -399,9 +399,9 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn return; } stopping = true; - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(this + "::stopping ClusterConnection"); + ActiveMQServerLogger.LOGGER.debug(this + "::stopping ClusterConnection"); } if (serverLocator != null) @@ -409,7 +409,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn serverLocator.removeClusterTopologyListener(this); } - HornetQServerLogger.LOGGER.debug("Cluster connection being stopped for node" + nodeManager.getNodeId() + + ActiveMQServerLogger.LOGGER.debug("Cluster connection being stopped for node" + nodeManager.getNodeId() + ", server = " + this.server + " serverLocator = " + @@ -490,9 +490,9 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn final Pair connectorPair, final boolean backup) { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(this + "::NodeAnnounced, backup=" + backup + nodeID + connectorPair); + ActiveMQServerLogger.LOGGER.debug(this + "::NodeAnnounced, backup=" + backup + nodeID + connectorPair); } TransportConfiguration live = connectorPair.getA(); @@ -528,12 +528,12 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn } catch (ActiveMQException e) { - HornetQServerLogger.LOGGER.clusterControlAuthfailure(); + ActiveMQServerLogger.LOGGER.clusterControlAuthfailure(); } } else { - HornetQServerLogger.LOGGER.noLocalMemborOnClusterConnection(this); + ActiveMQServerLogger.LOGGER.noLocalMemborOnClusterConnection(this); } // TODO: shouldn't we send the current time here? and change the current topology? @@ -559,7 +559,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn return nodeManager.getNodeId().toString(); } - public HornetQServer getServer() + public ActiveMQServer getServer() { return server; } @@ -598,9 +598,9 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn return; } - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Activating cluster connection nodeID=" + nodeManager.getNodeId() + " for server=" + this.server); + ActiveMQServerLogger.LOGGER.debug("Activating cluster connection nodeID=" + nodeManager.getNodeId() + " for server=" + this.server); } liveNotifier = new LiveNotifier(); @@ -614,7 +614,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn if (!useDuplicateDetection) { - HornetQServerLogger.LOGGER.debug("DuplicateDetection is disabled, sending clustered messages blocked"); + ActiveMQServerLogger.LOGGER.debug("DuplicateDetection is disabled, sending clustered messages blocked"); } final TopologyMember currentMember = topology.getMember(manager.getNodeId()); @@ -649,7 +649,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn serverLocator.setAfterConnectionInternalListener(this); - serverLocator.setProtocolManagerFactory(HornetQServerSideProtocolManagerFactory.getInstance()); + serverLocator.setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance()); serverLocator.start(server.getExecutorFactory().getExecutor()); } @@ -661,7 +661,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn Notification notification = new Notification(nodeManager.getNodeId().toString(), CoreNotificationType.CLUSTER_CONNECTION_STARTED, props); - HornetQServerLogger.LOGGER.debug("sending notification: " + notification); + ActiveMQServerLogger.LOGGER.debug("sending notification: " + notification); managementService.sendNotification(notification); } //we add as a listener after we have sent the cluster start notif as the listener may start sending notifs before @@ -691,18 +691,18 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn return; } final String nodeID = topologyMember.getNodeId(); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { String ClusterTestBase = "receiving nodeUP for nodeID="; - HornetQServerLogger.LOGGER.debug(this + ClusterTestBase + nodeID + " connectionPair=" + topologyMember); + ActiveMQServerLogger.LOGGER.debug(this + ClusterTestBase + nodeID + " connectionPair=" + topologyMember); } // discard notifications about ourselves unless its from our backup if (nodeID.equals(nodeManager.getNodeId().toString())) { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace(this + "::informing about backup to itself, nodeUUID=" + + ActiveMQServerLogger.LOGGER.trace(this + "::informing about backup to itself, nodeUUID=" + nodeManager.getNodeId() + ", connectorPair=" + topologyMember + ", this = " + this); } return; @@ -725,7 +725,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn { if (isTrace) { - HornetQServerLogger.LOGGER.trace(this + " ignoring call with nodeID=" + nodeID + ", topologyMember=" + + ActiveMQServerLogger.LOGGER.trace(this + " ignoring call with nodeID=" + nodeID + ", topologyMember=" + topologyMember + ", last=" + last); } return; @@ -739,9 +739,9 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn if (record == null) { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(this + "::Creating record for nodeID=" + nodeID + ", topologyMember=" + + ActiveMQServerLogger.LOGGER.debug(this + "::Creating record for nodeID=" + nodeID + ", topologyMember=" + topologyMember); } @@ -774,14 +774,14 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn { if (isTrace) { - HornetQServerLogger.LOGGER.trace(this + " ignored nodeUp record for " + topologyMember + " on nodeID=" + + ActiveMQServerLogger.LOGGER.trace(this + " ignored nodeUp record for " + topologyMember + " on nodeID=" + nodeID + " as the record already existed"); } } } catch (Exception e) { - HornetQServerLogger.LOGGER.errorUpdatingTopology(e); + ActiveMQServerLogger.LOGGER.errorUpdatingTopology(e); } } } @@ -842,7 +842,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn targetLocator.setAfterConnectionInternalListener(this); - serverLocator.setProtocolManagerFactory(HornetQServerSideProtocolManagerFactory.getInstance()); + serverLocator.setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance()); targetLocator.setNodeID(nodeId); @@ -893,9 +893,9 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn targetLocator.setIdentity("(Cluster-connection-bridge::" + bridge.toString() + "::" + this.toString() + ")"); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("creating record between " + this.connector + " and " + connector + bridge); + ActiveMQServerLogger.LOGGER.debug("creating record between " + this.connector + " and " + connector + bridge); } record.setBridge(bridge); @@ -1032,7 +1032,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Stopping bridge " + bridge); + ActiveMQServerLogger.LOGGER.trace("Stopping bridge " + bridge); } isClosed = true; @@ -1063,7 +1063,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn } catch (Exception ignored) { - HornetQServerLogger.LOGGER.debug(ignored.getMessage(), ignored); + ActiveMQServerLogger.LOGGER.debug(ignored.getMessage(), ignored); } } }); @@ -1091,9 +1091,9 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn public synchronized void onMessage(final ClientMessage message) { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("ClusterCommunication::Flow record on " + clusterConnector + " Receiving message " + message); + ActiveMQServerLogger.LOGGER.debug("ClusterCommunication::Flow record on " + clusterConnector + " Receiving message " + message); } try { @@ -1112,7 +1112,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn if (!reset) { - HornetQServerLogger.LOGGER.debug("Notification being ignored since first reset wasn't received yet: " + message); + ActiveMQServerLogger.LOGGER.debug("Notification being ignored since first reset wasn't received yet: " + message); return; } @@ -1120,7 +1120,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn } catch (Exception e) { - HornetQServerLogger.LOGGER.errorHandlingMessage(e); + ActiveMQServerLogger.LOGGER.errorHandlingMessage(e); } } @@ -1176,7 +1176,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn } default: { - throw HornetQMessageBundle.BUNDLE.invalidType(ntype); + throw ActiveMQMessageBundle.BUNDLE.invalidType(ntype); } } } @@ -1263,7 +1263,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn private synchronized void clearBindings() throws Exception { - HornetQServerLogger.LOGGER.debug(ClusterConnectionImpl.this + " clearing bindings"); + ActiveMQServerLogger.LOGGER.debug(ClusterConnectionImpl.this + " clearing bindings"); for (RemoteQueueBinding binding : new HashSet(bindings.values())) { removeBinding(binding.getClusterName()); @@ -1272,7 +1272,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn private synchronized void resetBindings() throws Exception { - HornetQServerLogger.LOGGER.debug(ClusterConnectionImpl.this + " reset bindings"); + ActiveMQServerLogger.LOGGER.debug(ClusterConnectionImpl.this + " reset bindings"); for (RemoteQueueBinding binding : new HashSet<>(bindings.values())) { resetBinding(binding.getClusterName()); @@ -1281,7 +1281,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn private synchronized void clearDisconnectedBindings() throws Exception { - HornetQServerLogger.LOGGER.debug(ClusterConnectionImpl.this + " reset bindings"); + ActiveMQServerLogger.LOGGER.debug(ClusterConnectionImpl.this + " reset bindings"); for (RemoteQueueBinding binding : new HashSet<>(bindings.values())) { if (!binding.isConnected()) @@ -1294,7 +1294,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn public synchronized void disconnectBindings() throws Exception { - HornetQServerLogger.LOGGER.debug(ClusterConnectionImpl.this + " disconnect bindings"); + ActiveMQServerLogger.LOGGER.debug(ClusterConnectionImpl.this + " disconnect bindings"); reset = false; for (RemoteQueueBinding binding : new HashSet<>(bindings.values())) { @@ -1304,9 +1304,9 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn private synchronized void doBindingAdded(final ClientMessage message) throws Exception { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace(ClusterConnectionImpl.this + " Adding binding " + message); + ActiveMQServerLogger.LOGGER.trace(ClusterConnectionImpl.this + " Adding binding " + message); } if (!message.containsProperty(ManagementHelper.HDR_DISTANCE)) { @@ -1358,7 +1358,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn // hops is too high // or there are multiple cluster connections for the same address - HornetQServerLogger.LOGGER.remoteQueueAlreadyBoundOnClusterConnection(this, clusterName); + ActiveMQServerLogger.LOGGER.remoteQueueAlreadyBoundOnClusterConnection(this, clusterName); return; } @@ -1375,7 +1375,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn if (isTrace) { - HornetQServerLogger.LOGGER.trace("Adding binding " + clusterName + " into " + ClusterConnectionImpl.this); + ActiveMQServerLogger.LOGGER.trace("Adding binding " + clusterName + " into " + ClusterConnectionImpl.this); } bindings.put(clusterName, binding); @@ -1396,9 +1396,9 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn private void doBindingRemoved(final ClientMessage message) throws Exception { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace(ClusterConnectionImpl.this + " Removing binding " + message); + ActiveMQServerLogger.LOGGER.trace(ClusterConnectionImpl.this + " Removing binding " + message); } if (!message.containsProperty(ManagementHelper.HDR_CLUSTER_NAME)) { @@ -1447,9 +1447,9 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn private synchronized void doConsumerCreated(final ClientMessage message) throws Exception { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace(ClusterConnectionImpl.this + " Consumer created " + message); + ActiveMQServerLogger.LOGGER.trace(ClusterConnectionImpl.this + " Consumer created " + message); } if (!message.containsProperty(ManagementHelper.HDR_DISTANCE)) { @@ -1507,9 +1507,9 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn private synchronized void doConsumerClosed(final ClientMessage message) throws Exception { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace(ClusterConnectionImpl.this + " Consumer closed " + message); + ActiveMQServerLogger.LOGGER.trace(ClusterConnectionImpl.this + " Consumer closed " + message); } if (!message.containsProperty(ManagementHelper.HDR_DISTANCE)) { @@ -1621,9 +1621,9 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn { if (tcConfigs != null && tcConfigs.length > 0) { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(ClusterConnectionImpl.this + "Creating a serverLocator for " + Arrays.toString(tcConfigs)); + ActiveMQServerLogger.LOGGER.debug(ClusterConnectionImpl.this + "Creating a serverLocator for " + Arrays.toString(tcConfigs)); } ServerLocatorImpl locator = new ServerLocatorImpl(topology, true, tcConfigs); locator.setClusterConnection(true); @@ -1664,7 +1664,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn @Override public void removeRecord(String targetNodeID) { - HornetQServerLogger.LOGGER.debug("Removing record for: " + targetNodeID); + ActiveMQServerLogger.LOGGER.debug("Removing record for: " + targetNodeID); MessageFlowRecord record = records.remove(targetNodeID); try { @@ -1679,7 +1679,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn @Override public void disconnectRecord(String targetNodeID) { - HornetQServerLogger.LOGGER.debug("Disconnecting record for: " + targetNodeID); + ActiveMQServerLogger.LOGGER.debug("Disconnecting record for: " + targetNodeID); MessageFlowRecord record = records.get(targetNodeID); try { diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/Redistributor.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/Redistributor.java index 1826cd77fb..e35616287e 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/Redistributor.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/Redistributor.java @@ -24,7 +24,7 @@ import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.server.Consumer; import org.apache.activemq.core.server.HandleStatus; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.RoutingContext; @@ -112,7 +112,7 @@ public class Redistributor implements Consumer if (!ok) { - HornetQServerLogger.LOGGER.errorStoppingRedistributor(); + ActiveMQServerLogger.LOGGER.errorStoppingRedistributor(); } } @@ -137,7 +137,7 @@ public class Redistributor implements Consumer } catch (InterruptedException e) { - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); return false; } } @@ -206,7 +206,7 @@ public class Redistributor implements Consumer // Nothing much we can do now // TODO log - HornetQServerLogger.LOGGER.warn(e2.getMessage(), e2); + ActiveMQServerLogger.LOGGER.warn(e2.getMessage(), e2); } } } @@ -255,7 +255,7 @@ public class Redistributor implements Consumer public void onError(final int errorCode, final String errorMessage) { - HornetQServerLogger.LOGGER.ioErrorRedistributing(errorCode, errorMessage); + ActiveMQServerLogger.LOGGER.ioErrorRedistributing(errorCode, errorMessage); } public void done() diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/RemoteQueueBindingImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/RemoteQueueBindingImpl.java index 77032e0d19..d218e42ec1 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/RemoteQueueBindingImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/impl/RemoteQueueBindingImpl.java @@ -25,7 +25,7 @@ import org.apache.activemq.core.filter.impl.FilterImpl; import org.apache.activemq.core.message.impl.MessageImpl; import org.apache.activemq.core.postoffice.BindingType; import org.apache.activemq.core.server.Bindable; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.RoutingContext; import org.apache.activemq.core.server.ServerMessage; @@ -370,9 +370,9 @@ public class RemoteQueueBindingImpl implements RemoteQueueBinding message.putBytesProperty(idsHeaderName, ids); - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("Adding remoteQueue ID = " + remoteQueueID + " into message=" + message + " store-forward-queue=" + storeAndForwardQueue); + ActiveMQServerLogger.LOGGER.trace("Adding remoteQueue ID = " + remoteQueueID + " into message=" + message + " store-forward-queue=" + storeAndForwardQueue); } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/QuorumManager.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/QuorumManager.java index 1ac2475d6a..b52f8e80f8 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/QuorumManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/QuorumManager.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClusterTopologyListener; import org.apache.activemq.api.core.client.TopologyMember; import org.apache.activemq.core.client.impl.TopologyMemberImpl; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.core.server.cluster.ClusterControl; import org.apache.activemq.core.server.cluster.ClusterController; @@ -32,7 +32,7 @@ import org.apache.activemq.core.server.cluster.ClusterController; * about changes to the cluster. A {@link org.apache.activemq.core.server.cluster.qourum.Quorum} can then issue a vote to the * remaining nodes in a cluster for a specific outcome */ -public final class QuorumManager implements ClusterTopologyListener, HornetQComponent +public final class QuorumManager implements ClusterTopologyListener, ActiveMQComponent { private final ExecutorService executor; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/SharedNothingBackupQuorum.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/SharedNothingBackupQuorum.java index 2285b5adfd..05dee26b49 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/SharedNothingBackupQuorum.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/SharedNothingBackupQuorum.java @@ -25,7 +25,7 @@ import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.protocol.core.CoreRemotingConnection; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationLiveIsStoppingMessage; import org.apache.activemq.core.remoting.FailureListener; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.NodeManager; /** @@ -108,7 +108,7 @@ public class SharedNothingBackupQuorum implements Quorum, FailureListener catch (ActiveMQException e) { if (e.getType() != ActiveMQExceptionType.NOT_CONNECTED) - HornetQServerLogger.LOGGER.errorReConnecting(e); + ActiveMQServerLogger.LOGGER.errorReConnecting(e); } } // live is assumed to be down, backup fails-over diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/embedded/EmbeddedHornetQ.java b/activemq-server/src/main/java/org/apache/activemq/core/server/embedded/EmbeddedActiveMQ.java similarity index 67% rename from activemq-server/src/main/java/org/apache/activemq/core/server/embedded/EmbeddedHornetQ.java rename to activemq-server/src/main/java/org/apache/activemq/core/server/embedded/EmbeddedActiveMQ.java index bd9acde61e..313ae7108d 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/embedded/EmbeddedHornetQ.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/embedded/EmbeddedActiveMQ.java @@ -16,27 +16,27 @@ import javax.management.MBeanServer; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.impl.FileConfiguration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.impl.HornetQServerImpl; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; -import org.apache.activemq.spi.core.security.HornetQSecurityManagerImpl; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl; /** - * Helper class to simplify bootstrap of HornetQ server. Bootstraps from classpath-based config files. + * Helper class to simplify bootstrap of ActiveMQ server. Bootstraps from classpath-based config files. * * @author Bill Burke * @version $Revision: 1 $ */ -public class EmbeddedHornetQ +public class EmbeddedActiveMQ { - protected HornetQSecurityManager securityManager; + protected ActiveMQSecurityManager securityManager; protected String configResourcePath = null; protected Configuration configuration; - protected HornetQServer hornetQServer; + protected ActiveMQServer activeMQServer; protected MBeanServer mbeanServer; /** - * Classpath resource for hornetq server config. Defaults to 'activemq-configuration.xml'. + * Classpath resource for activemq server config. Defaults to 'activemq-configuration.xml'. * * @param filename */ @@ -46,11 +46,11 @@ public class EmbeddedHornetQ } /** - * Set the hornetq security manager. This defaults to org.apache.activemq.spi.core.security.HornetQSecurityManagerImpl + * Set the activemq security manager. This defaults to org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl * * @param securityManager */ - public void setSecurityManager(HornetQSecurityManager securityManager) + public void setSecurityManager(ActiveMQSecurityManager securityManager) { this.securityManager = securityManager; } @@ -76,15 +76,15 @@ public class EmbeddedHornetQ this.configuration = configuration; } - public HornetQServer getHornetQServer() + public ActiveMQServer getActiveMQServer() { - return hornetQServer; + return activeMQServer; } public void start() throws Exception { initStart(); - hornetQServer.start(); + activeMQServer.start(); } @@ -99,20 +99,20 @@ public class EmbeddedHornetQ } if (securityManager == null) { - securityManager = new HornetQSecurityManagerImpl(); + securityManager = new ActiveMQSecurityManagerImpl(); } if (mbeanServer == null) { - hornetQServer = new HornetQServerImpl(configuration, securityManager); + activeMQServer = new ActiveMQServerImpl(configuration, securityManager); } else { - hornetQServer = new HornetQServerImpl(configuration, mbeanServer, securityManager); + activeMQServer = new ActiveMQServerImpl(configuration, mbeanServer, securityManager); } } public void stop() throws Exception { - hornetQServer.stop(); + activeMQServer.stop(); } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/group/GroupingHandler.java b/activemq-server/src/main/java/org/apache/activemq/core/server/group/GroupingHandler.java index d840f72d50..418e6a63bf 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/group/GroupingHandler.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/group/GroupingHandler.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.server.group; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.core.server.group.impl.GroupBinding; import org.apache.activemq.core.server.group.impl.Proposal; import org.apache.activemq.core.server.group.impl.Response; @@ -22,7 +22,7 @@ import org.apache.activemq.core.server.management.NotificationListener; /** * @author Andy Taylor */ -public interface GroupingHandler extends NotificationListener, HornetQComponent +public interface GroupingHandler extends NotificationListener, ActiveMQComponent { // this method should maintain a WeakHash list, no need to remove the elements void addListener(UnproposalListener listener); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/GroupHandlingAbstract.java b/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/GroupHandlingAbstract.java index 8dd9be91f0..a92190f4df 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/GroupHandlingAbstract.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/GroupHandlingAbstract.java @@ -22,7 +22,7 @@ import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.management.CoreNotificationType; import org.apache.activemq.api.core.management.ManagementHelper; import org.apache.activemq.core.postoffice.BindingType; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.group.GroupingHandler; import org.apache.activemq.core.server.group.UnproposalListener; import org.apache.activemq.core.server.management.ManagementService; @@ -117,7 +117,7 @@ public abstract class GroupHandlingAbstract implements GroupingHandler } catch (Exception e) { - HornetQServerLogger.LOGGER.errorHandlingMessage(e); + ActiveMQServerLogger.LOGGER.errorHandlingMessage(e); } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/LocalGroupingHandler.java b/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/LocalGroupingHandler.java index 1e62b037e4..d8763dc6b8 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/LocalGroupingHandler.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/LocalGroupingHandler.java @@ -31,7 +31,7 @@ import org.apache.activemq.api.core.management.ManagementHelper; import org.apache.activemq.core.persistence.OperationContext; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.BindingType; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.management.ManagementService; import org.apache.activemq.core.server.management.Notification; import org.apache.activemq.utils.ExecutorFactory; @@ -200,7 +200,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract public Response receive(final Proposal proposal, final int distance) throws Exception { - HornetQServerLogger.LOGGER.trace("received proposal " + proposal); + ActiveMQServerLogger.LOGGER.trace("received proposal " + proposal); return propose(proposal); } @@ -251,7 +251,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract catch (Exception e) { // nothing we can do being log - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); } } } @@ -287,12 +287,12 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract if (expectedBindings.size() > 0) { - HornetQServerLogger.LOGGER.debug("Waiting remote group bindings to arrive before starting the server. timeout=" + timeout + " milliseconds"); + ActiveMQServerLogger.LOGGER.debug("Waiting remote group bindings to arrive before starting the server. timeout=" + timeout + " milliseconds"); //now we wait here for the rest to be received in onNotification, it will signal once all have been received. //if we arent signaled then bindingsAdded still has some groupids we need to remove. if (!awaitCondition.await(timeout, TimeUnit.MILLISECONDS)) { - HornetQServerLogger.LOGGER.remoteGroupCoordinatorsNotStarted(); + ActiveMQServerLogger.LOGGER.remoteGroupCoordinatorsNotStarted(); } } @@ -330,24 +330,24 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract { if (expectedBindings.remove(clusterName)) { - HornetQServerLogger.LOGGER.debug("OnNotification for waitForbindings::Removed clusterName=" + clusterName + " from lis succesffully"); + ActiveMQServerLogger.LOGGER.debug("OnNotification for waitForbindings::Removed clusterName=" + clusterName + " from lis succesffully"); } else { - HornetQServerLogger.LOGGER.debug("OnNotification for waitForbindings::Couldn't remove clusterName=" + clusterName + " as it wasn't on the original list"); + ActiveMQServerLogger.LOGGER.debug("OnNotification for waitForbindings::Couldn't remove clusterName=" + clusterName + " as it wasn't on the original list"); } } else { expectedBindings.add(clusterName); - HornetQServerLogger.LOGGER.debug("Notification for waitForbindings::Adding previously known item clusterName=" + clusterName); + ActiveMQServerLogger.LOGGER.debug("Notification for waitForbindings::Adding previously known item clusterName=" + clusterName); } - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { for (SimpleString stillWaiting : expectedBindings) { - HornetQServerLogger.LOGGER.debug("Notification for waitForbindings::Still waiting for clusterName=" + stillWaiting); + ActiveMQServerLogger.LOGGER.debug("Notification for waitForbindings::Still waiting for clusterName=" + stillWaiting); } } @@ -435,7 +435,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract } catch (Exception e) { - HornetQServerLogger.LOGGER.unableToDeleteGroupBindings(e, val.getGroupId()); + ActiveMQServerLogger.LOGGER.unableToDeleteGroupBindings(e, val.getGroupId()); } } } @@ -449,7 +449,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract } catch (Exception e) { - HornetQServerLogger.LOGGER.unableToDeleteGroupBindings(e, SimpleString.toSimpleString("TX:" + txID)); + ActiveMQServerLogger.LOGGER.unableToDeleteGroupBindings(e, SimpleString.toSimpleString("TX:" + txID)); } } } @@ -512,7 +512,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract } catch (Exception e) { - HornetQServerLogger.LOGGER.unableToDeleteGroupBindings(e, groupBinding.getGroupId()); + ActiveMQServerLogger.LOGGER.unableToDeleteGroupBindings(e, groupBinding.getGroupId()); } } } @@ -525,7 +525,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract } catch (Exception e) { - HornetQServerLogger.LOGGER.unableToDeleteGroupBindings(e, SimpleString.toSimpleString("TX:" + txID)); + ActiveMQServerLogger.LOGGER.unableToDeleteGroupBindings(e, SimpleString.toSimpleString("TX:" + txID)); } } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/RemoteGroupingHandler.java b/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/RemoteGroupingHandler.java index bcd76a4944..02ca7a255e 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/RemoteGroupingHandler.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/group/impl/RemoteGroupingHandler.java @@ -26,8 +26,8 @@ import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.management.CoreNotificationType; import org.apache.activemq.api.core.management.ManagementHelper; import org.apache.activemq.core.postoffice.BindingType; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.management.ManagementService; import org.apache.activemq.core.server.management.Notification; import org.apache.activemq.utils.ConcurrentHashSet; @@ -141,7 +141,7 @@ public final class RemoteGroupingHandler extends GroupHandlingAbstract if (!started) { - throw HornetQMessageBundle.BUNDLE.groupWhileStopping(); + throw ActiveMQMessageBundle.BUNDLE.groupWhileStopping(); } Notification notification = null; @@ -183,7 +183,7 @@ public final class RemoteGroupingHandler extends GroupHandlingAbstract } if (response == null) { - HornetQServerLogger.LOGGER.groupHandlerSendTimeout(); + ActiveMQServerLogger.LOGGER.groupHandlerSendTimeout(); } return response; } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/AIOFileLockNodeManager.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/AIOFileLockNodeManager.java index 1dfebae275..0c614ceffd 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/AIOFileLockNodeManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/AIOFileLockNodeManager.java @@ -19,7 +19,7 @@ import java.nio.channels.FileLock; import org.apache.activemq.core.asyncio.impl.AsynchronousFileImpl; /** - * This is using the HornetQ Libaio Native to perform calls to flock on a Linux system. At the + * This is using the ActiveMQ Libaio Native to perform calls to flock on a Linux system. At the * current version of RHEL there's a bug on GFS2 and because of that fctl is not functional what * will cause issues on Failover over Shared Storage. *

    diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/Activation.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/Activation.java index 4d1e874a6a..bc9347dc70 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/Activation.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/Activation.java @@ -21,7 +21,7 @@ import org.apache.activemq.core.protocol.core.Channel; import org.apache.activemq.core.protocol.core.ChannelHandler; import org.apache.activemq.core.remoting.server.RemotingService; import org.apache.activemq.core.replication.ReplicationManager; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.QueueFactory; import org.apache.activemq.core.server.cluster.ha.HAManager; @@ -96,7 +96,7 @@ public abstract class Activation implements Runnable /* * create the Journal loader needed for this Activation. * */ - public JournalLoader createJournalLoader(PostOffice postOffice, PagingManager pagingManager, StorageManager storageManager, QueueFactory queueFactory, NodeManager nodeManager, ManagementService managementService, GroupingHandler groupingHandler, Configuration configuration, HornetQServer parentServer) throws ActiveMQException + public JournalLoader createJournalLoader(PostOffice postOffice, PagingManager pagingManager, StorageManager storageManager, QueueFactory queueFactory, NodeManager nodeManager, ManagementService managementService, GroupingHandler groupingHandler, Configuration configuration, ActiveMQServer parentServer) throws ActiveMQException { return new PostOfficeJournalLoader(postOffice, pagingManager, 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/ActiveMQServerImpl.java similarity index 90% rename from activemq-server/src/main/java/org/apache/activemq/core/server/impl/HornetQServerImpl.java rename to activemq-server/src/main/java/org/apache/activemq/core/server/impl/ActiveMQServerImpl.java index ada5c0eeba..2b42e72257 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/ActiveMQServerImpl.java @@ -62,7 +62,7 @@ import org.apache.activemq.core.journal.JournalLoadInformation; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.journal.impl.AIOSequentialFileFactory; import org.apache.activemq.core.journal.impl.SyncSpeedTest; -import org.apache.activemq.core.management.impl.HornetQServerControlImpl; +import org.apache.activemq.core.management.impl.ActiveMQServerControlImpl; import org.apache.activemq.core.paging.PagingManager; import org.apache.activemq.core.paging.cursor.PageSubscription; import org.apache.activemq.core.paging.impl.PagingManagerImpl; @@ -91,12 +91,12 @@ import org.apache.activemq.core.security.Role; import org.apache.activemq.core.security.SecurityStore; import org.apache.activemq.core.security.impl.SecurityStoreImpl; import org.apache.activemq.core.server.ActivateCallback; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.Bindable; import org.apache.activemq.core.server.Divert; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.JournalType; import org.apache.activemq.core.server.LargeServerMessage; import org.apache.activemq.core.server.MemoryManager; @@ -124,24 +124,24 @@ import org.apache.activemq.core.version.Version; import org.apache.activemq.spi.core.protocol.ProtocolManagerFactory; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.protocol.SessionCallback; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; import org.apache.activemq.utils.ClassloadingUtil; import org.apache.activemq.utils.ConcurrentHashSet; import org.apache.activemq.utils.ExecutorFactory; -import org.apache.activemq.utils.HornetQThreadFactory; +import org.apache.activemq.utils.ActiveMQThreadFactory; import org.apache.activemq.utils.OrderedExecutorFactory; import org.apache.activemq.utils.ReusableLatch; import org.apache.activemq.utils.SecurityFormatter; import org.apache.activemq.utils.VersionLoader; /** - * The HornetQ server implementation + * The ActiveMQ server implementation * * @author Tim Fox * @author Martyn Taylor */ -public class HornetQServerImpl implements HornetQServer +public class ActiveMQServerImpl implements ActiveMQServer { /** * JMS Topics (which are outside of the scope of the core API) will require a dumb subscription @@ -185,7 +185,7 @@ public class HornetQServerImpl implements HornetQServer private final Version version; - private final HornetQSecurityManager securityManager; + private final ActiveMQSecurityManager securityManager; private final Configuration configuration; @@ -211,7 +211,7 @@ public class HornetQServerImpl implements HornetQServer private volatile ResourceManager resourceManager; - private volatile HornetQServerControlImpl messagingServerControl; + private volatile ActiveMQServerControlImpl messagingServerControl; private volatile ClusterManager clusterManager; @@ -261,7 +261,7 @@ public class HornetQServerImpl implements HornetQServer private final ShutdownOnCriticalErrorListener shutdownOnCriticalIO = new ShutdownOnCriticalErrorListener(); - private final HornetQServer parentServer; + private final ActiveMQServer parentServer; //todo think about moving this to the activation private final List scaledDownNodeIDs = new ArrayList<>(); @@ -275,51 +275,51 @@ public class HornetQServerImpl implements HornetQServer // Constructors // --------------------------------------------------------------------------------- - public HornetQServerImpl() + public ActiveMQServerImpl() { this(null, null, null); } - public HornetQServerImpl(final Configuration configuration) + public ActiveMQServerImpl(final Configuration configuration) { this(configuration, null, null); } - public HornetQServerImpl(final Configuration configuration, HornetQServer parentServer) + public ActiveMQServerImpl(final Configuration configuration, ActiveMQServer parentServer) { this(configuration, null, null, parentServer); } - public HornetQServerImpl(final Configuration configuration, final MBeanServer mbeanServer) + public ActiveMQServerImpl(final Configuration configuration, final MBeanServer mbeanServer) { this(configuration, mbeanServer, null); } - public HornetQServerImpl(final Configuration configuration, final HornetQSecurityManager securityManager) + public ActiveMQServerImpl(final Configuration configuration, final ActiveMQSecurityManager securityManager) { this(configuration, null, securityManager); } - public HornetQServerImpl(Configuration configuration, - MBeanServer mbeanServer, - final HornetQSecurityManager securityManager) + public ActiveMQServerImpl(Configuration configuration, + MBeanServer mbeanServer, + final ActiveMQSecurityManager securityManager) { this(configuration, mbeanServer, securityManager, null); } - public HornetQServerImpl(Configuration configuration, - MBeanServer mbeanServer, - final HornetQSecurityManager securityManager, - final HornetQServer parentServer) + public ActiveMQServerImpl(Configuration configuration, + MBeanServer mbeanServer, + final ActiveMQSecurityManager securityManager, + final ActiveMQServer parentServer) { this(configuration, mbeanServer, securityManager, parentServer, null); } - public HornetQServerImpl(Configuration configuration, - MBeanServer mbeanServer, - final HornetQSecurityManager securityManager, - final HornetQServer parentServer, - final ServiceRegistry serviceRegistry) + public ActiveMQServerImpl(Configuration configuration, + MBeanServer mbeanServer, + final ActiveMQSecurityManager securityManager, + final ActiveMQServer parentServer, + final ServiceRegistry serviceRegistry) { if (configuration == null) { @@ -382,7 +382,7 @@ public class HornetQServerImpl implements HornetQServer { if (state != SERVER_STATE.STOPPED) { - HornetQServerLogger.LOGGER.debug("Server already started!"); + ActiveMQServerLogger.LOGGER.debug("Server already started!"); return; } @@ -395,7 +395,7 @@ public class HornetQServerImpl implements HornetQServer activationLatch.setCount(1); - HornetQServerLogger.LOGGER.debug("Starting server " + this); + ActiveMQServerLogger.LOGGER.debug("Starting server " + this); OperationContextImpl.clearContext(); @@ -407,7 +407,7 @@ public class HornetQServerImpl implements HornetQServer nodeManager.start(); - HornetQServerLogger.LOGGER.serverStarting((haPolicy.isBackup() ? "backup" : "live"), configuration); + ActiveMQServerLogger.LOGGER.serverStarting((haPolicy.isBackup() ? "backup" : "live"), configuration); if (configuration.isRunSyncSpeedTest()) { @@ -436,13 +436,13 @@ public class HornetQServerImpl implements HornetQServer activation = haPolicy.createActivation(this, wasLive, activationParams, shutdownOnCriticalIO); } - backupActivationThread = new Thread(activation, HornetQMessageBundle.BUNDLE.activationForServer(this)); + backupActivationThread = new Thread(activation, ActiveMQMessageBundle.BUNDLE.activationForServer(this)); backupActivationThread.start(); } else { state = SERVER_STATE.STARTED; - HornetQServerLogger.LOGGER.serverStarted(getVersion().getFullVersion(), nodeManager.getNodeId(), + ActiveMQServerLogger.LOGGER.serverStarted(getVersion().getFullVersion(), nodeManager.getNodeId(), identity != null ? identity : ""); } // start connector service @@ -461,7 +461,7 @@ public class HornetQServerImpl implements HornetQServer { if (state != SERVER_STATE.STOPPED) { - HornetQServerLogger.LOGGER.serverFinalisedWIthoutBeingSTopped(); + ActiveMQServerLogger.LOGGER.serverFinalisedWIthoutBeingSTopped(); stop(); } @@ -554,7 +554,7 @@ public class HornetQServerImpl implements HornetQServer } catch (Exception e) { - HornetQServerLogger.LOGGER.errorStoppingServer(e); + ActiveMQServerLogger.LOGGER.errorStoppingServer(e); } } }); @@ -582,13 +582,13 @@ public class HornetQServerImpl implements HornetQServer Map stackTrace = Thread.getAllStackTraces(); - out.println(HornetQMessageBundle.BUNDLE.generatingThreadDump(reason)); + out.println(ActiveMQMessageBundle.BUNDLE.generatingThreadDump(reason)); out.println("*******************************************************************************"); for (Map.Entry el : stackTrace.entrySet()) { out.println("==============================================================================="); - out.println(HornetQMessageBundle.BUNDLE.threadDump(el.getKey(), el.getKey().getName(), el.getKey().getId(), el.getKey().getThreadGroup())); + out.println(ActiveMQMessageBundle.BUNDLE.threadDump(el.getKey(), el.getKey().getName(), el.getKey().getId(), el.getKey().getThreadGroup())); out.println(); for (StackTraceElement traceEl : el.getValue()) { @@ -597,10 +597,10 @@ public class HornetQServerImpl implements HornetQServer } out.println("==============================================================================="); - out.println(HornetQMessageBundle.BUNDLE.endThreadDump()); + out.println(ActiveMQMessageBundle.BUNDLE.endThreadDump()); out.println("*******************************************************************************"); - HornetQServerLogger.LOGGER.warn(str.toString()); + ActiveMQServerLogger.LOGGER.warn(str.toString()); } public final void stop(boolean failoverOnServerShutdown) throws Exception @@ -704,10 +704,10 @@ public class HornetQServerImpl implements HornetQServer { if (!threadPool.awaitTermination(10, TimeUnit.SECONDS)) { - HornetQServerLogger.LOGGER.timedOutStoppingThreadpool(threadPool); + ActiveMQServerLogger.LOGGER.timedOutStoppingThreadpool(threadPool); for (Runnable r : threadPool.shutdownNow()) { - HornetQServerLogger.LOGGER.debug("Cancelled the execution of " + r); + ActiveMQServerLogger.LOGGER.debug("Cancelled the execution of " + r); } } } @@ -751,7 +751,7 @@ public class HornetQServerImpl implements HornetQServer backupActivationThread.join(30000); if (backupActivationThread.isAlive()) { - HornetQServerLogger.LOGGER.backupActivationDidntFinish(this); + ActiveMQServerLogger.LOGGER.backupActivationDidntFinish(this); backupActivationThread.interrupt(); } } @@ -768,12 +768,12 @@ public class HornetQServerImpl implements HornetQServer if (identity != null) { - HornetQServerLogger.LOGGER.serverStopped("identity=" + identity + ",version=" + getVersion().getFullVersion(), + ActiveMQServerLogger.LOGGER.serverStopped("identity=" + identity + ",version=" + getVersion().getFullVersion(), tempNodeID); } else { - HornetQServerLogger.LOGGER.serverStopped(getVersion().getFullVersion(), tempNodeID); + ActiveMQServerLogger.LOGGER.serverStopped(getVersion().getFullVersion(), tempNodeID); } } @@ -837,7 +837,7 @@ public class HornetQServerImpl implements HornetQServer { // If anything went wrong with closing sessions.. we should ignore it // such as transactions.. etc. - HornetQServerLogger.LOGGER.errorClosingSessionsWhileStoppingServer(e); + ActiveMQServerLogger.LOGGER.errorClosingSessionsWhileStoppingServer(e); } } if (!criticalIOError) @@ -850,20 +850,20 @@ public class HornetQServerImpl implements HornetQServer } catch (Exception e) { - HornetQServerLogger.LOGGER.errorClosingSessionsWhileStoppingServer(e); + ActiveMQServerLogger.LOGGER.errorClosingSessionsWhileStoppingServer(e); } } } } - static void stopComponent(HornetQComponent component) throws Exception + static void stopComponent(ActiveMQComponent component) throws Exception { if (component != null) component.stop(); } - // HornetQServer implementation + // ActiveMQServer implementation // ----------------------------------------------------------- public String describe() @@ -871,7 +871,7 @@ public class HornetQServerImpl implements HornetQServer StringWriter str = new StringWriter(); PrintWriter out = new PrintWriter(str); - out.println(HornetQMessageBundle.BUNDLE.serverDescribe(identity, getClusterManager().describe())); + out.println(ActiveMQMessageBundle.BUNDLE.serverDescribe(identity, getClusterManager().describe())); return str.toString(); } @@ -883,7 +883,7 @@ public class HornetQServerImpl implements HornetQServer try { operationsExecuted.append("**************************************************************************************************\n"); - operationsExecuted.append(HornetQMessageBundle.BUNDLE.destroyConnectionWithSessionMetadataHeader(metaKey, parameterValue) + "\n"); + operationsExecuted.append(ActiveMQMessageBundle.BUNDLE.destroyConnectionWithSessionMetadataHeader(metaKey, parameterValue) + "\n"); Set allSessions = getSessions(); @@ -896,11 +896,11 @@ public class HornetQServerImpl implements HornetQServer if (value != null && value.equals(parameterValue)) { sessionFound = session; - operationsExecuted.append(HornetQMessageBundle.BUNDLE.destroyConnectionWithSessionMetadataClosingConnection(sessionFound.toString()) + "\n"); + operationsExecuted.append(ActiveMQMessageBundle.BUNDLE.destroyConnectionWithSessionMetadataClosingConnection(sessionFound.toString()) + "\n"); RemotingConnection conn = session.getRemotingConnection(); if (conn != null) { - conn.fail(HornetQMessageBundle.BUNDLE.destroyConnectionWithSessionMetadataSendException(metaKey, parameterValue)); + conn.fail(ActiveMQMessageBundle.BUNDLE.destroyConnectionWithSessionMetadataSendException(metaKey, parameterValue)); } session.close(true); sessions.remove(session.getName()); @@ -908,13 +908,13 @@ public class HornetQServerImpl implements HornetQServer } catch (Throwable e) { - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); } } if (sessionFound == null) { - operationsExecuted.append(HornetQMessageBundle.BUNDLE.destroyConnectionWithSessionMetadataNoSessionFound(metaKey, parameterValue) + "\n"); + operationsExecuted.append(ActiveMQMessageBundle.BUNDLE.destroyConnectionWithSessionMetadataNoSessionFound(metaKey, parameterValue) + "\n"); } operationsExecuted.append("**************************************************************************************************"); @@ -924,7 +924,7 @@ public class HornetQServerImpl implements HornetQServer finally { // This operation is critical for the knowledge of the admin, so we need to add info logs for later knowledge - HornetQServerLogger.LOGGER.info(operationsExecuted.toString()); + ActiveMQServerLogger.LOGGER.info(operationsExecuted.toString()); } } @@ -964,7 +964,7 @@ public class HornetQServerImpl implements HornetQServer return storageManager; } - public HornetQSecurityManager getSecurityManager() + public ActiveMQSecurityManager getSecurityManager() { return securityManager; } @@ -1158,7 +1158,7 @@ public class HornetQServerImpl implements HornetQServer } - public HornetQServerControlImpl getHornetQServerControl() + public ActiveMQServerControlImpl getActiveMQServerControl() { return messagingServerControl; } @@ -1214,18 +1214,18 @@ public class HornetQServerImpl implements HornetQServer if (!queue.getAddress().equals(address)) { - throw HornetQMessageBundle.BUNDLE.queueSubscriptionBelongsToDifferentAddress(name); + throw ActiveMQMessageBundle.BUNDLE.queueSubscriptionBelongsToDifferentAddress(name); } if (filterString != null && (queue.getFilter() == null || !queue.getFilter().getFilterString().equals(filterString)) || filterString == null && queue.getFilter() != null) { - throw HornetQMessageBundle.BUNDLE.queueSubscriptionBelongsToDifferentFilter(name); + throw ActiveMQMessageBundle.BUNDLE.queueSubscriptionBelongsToDifferentFilter(name); } - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Transient Queue " + name + " created on address " + name + + ActiveMQServerLogger.LOGGER.debug("Transient Queue " + name + " created on address " + name + " with filter=" + filterString); } @@ -1257,7 +1257,7 @@ public class HornetQServerImpl implements HornetQServer final boolean durable, final boolean temporary) throws Exception { - HornetQServerLogger.LOGGER.deployQueue(queueName); + ActiveMQServerLogger.LOGGER.deployQueue(queueName); return createQueue(address, queueName, filterString, durable, temporary, true, false); } @@ -1288,7 +1288,7 @@ public class HornetQServerImpl implements HornetQServer if (binding == null) { - throw HornetQMessageBundle.BUNDLE.noSuchQueue(queueName); + throw ActiveMQMessageBundle.BUNDLE.noSuchQueue(queueName); } Queue queue = (Queue) binding.getBindable(); @@ -1296,7 +1296,7 @@ public class HornetQServerImpl implements HornetQServer // This check is only valid if checkConsumerCount == true if (checkConsumerCount && queue.getConsumerCount() != 0) { - throw HornetQMessageBundle.BUNDLE.cannotDeleteQueue(queue.getName(), queueName, binding.getClass().getName()); + throw ActiveMQMessageBundle.BUNDLE.cannotDeleteQueue(queue.getName(), queueName, binding.getClass().getName()); } if (session != null) @@ -1366,21 +1366,21 @@ public class HornetQServerImpl implements HornetQServer { if (config.getName() == null) { - HornetQServerLogger.LOGGER.divertWithNoName(); + ActiveMQServerLogger.LOGGER.divertWithNoName(); return; } if (config.getAddress() == null) { - HornetQServerLogger.LOGGER.divertWithNoAddress(); + ActiveMQServerLogger.LOGGER.divertWithNoAddress(); return; } if (config.getForwardingAddress() == null) { - HornetQServerLogger.LOGGER.divertWithNoForwardingAddress(); + ActiveMQServerLogger.LOGGER.divertWithNoForwardingAddress(); return; } @@ -1389,7 +1389,7 @@ public class HornetQServerImpl implements HornetQServer if (postOffice.getBinding(sName) != null) { - HornetQServerLogger.LOGGER.divertBindingNotExists(sName); + ActiveMQServerLogger.LOGGER.divertBindingNotExists(sName); return; } @@ -1421,11 +1421,11 @@ public class HornetQServerImpl implements HornetQServer Binding binding = postOffice.getBinding(name); if (binding == null) { - throw HornetQMessageBundle.BUNDLE.noBindingForDivert(name); + throw ActiveMQMessageBundle.BUNDLE.noBindingForDivert(name); } if (!(binding instanceof DivertBinding)) { - throw HornetQMessageBundle.BUNDLE.bindingNotDivert(name); + throw ActiveMQMessageBundle.BUNDLE.bindingNotDivert(name); } postOffice.removeBinding(name, null); @@ -1459,9 +1459,9 @@ public class HornetQServerImpl implements HornetQServer { if (identity != null) { - return "HornetQServerImpl::" + identity; + return "ActiveMQServerImpl::" + identity; } - return "HornetQServerImpl::" + (nodeManager != null ? "serverUUID=" + nodeManager.getUUID() : ""); + return "ActiveMQServerImpl::" + (nodeManager != null ? "serverUUID=" + nodeManager.getUUID() : ""); } /** @@ -1527,7 +1527,7 @@ public class HornetQServerImpl implements HornetQServer { // https://bugzilla.redhat.com/show_bug.cgi?id=1009530: // we won't interrupt the shutdown sequence because of a failed callback here - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); } } } @@ -1541,7 +1541,7 @@ public class HornetQServerImpl implements HornetQServer } /** - * Sets up HornetQ Executor Services. + * Sets up ActiveMQ Executor Services. */ private void initializeExecutorServices() { @@ -1550,7 +1550,7 @@ public class HornetQServerImpl implements HornetQServer */ if (serviceRegistry.getExecutorService() == null) { - ThreadFactory tFactory = new HornetQThreadFactory("HornetQ-server-" + this.toString(), false, getThisClassLoader()); + ThreadFactory tFactory = new ActiveMQThreadFactory("ActiveMQ-server-" + this.toString(), false, getThisClassLoader()); if (configuration.getThreadPoolMaxSize() == -1) { threadPool = Executors.newCachedThreadPool(tFactory); @@ -1572,7 +1572,7 @@ public class HornetQServerImpl implements HornetQServer */ if (serviceRegistry.getScheduledExecutorService() == null) { - ThreadFactory tFactory = new HornetQThreadFactory("HornetQ-scheduled-threads", false, getThisClassLoader()); + ThreadFactory tFactory = new ActiveMQThreadFactory("ActiveMQ-scheduled-threads", false, getThisClassLoader()); scheduledPool = new ScheduledThreadPoolExecutor(configuration.getScheduledThreadPoolMaxSize(), tFactory); } else @@ -1604,7 +1604,7 @@ public class HornetQServerImpl implements HornetQServer if (configuration.getJournalType() == JournalType.ASYNCIO && !AIOSequentialFileFactory.isSupported()) { - HornetQServerLogger.LOGGER.switchingNIO(); + ActiveMQServerLogger.LOGGER.switchingNIO(); configuration.setJournalType(JournalType.NIO); } @@ -1633,7 +1633,7 @@ public class HornetQServerImpl implements HornetQServer if (ActiveMQDefaultConfiguration.getDefaultClusterUser().equals(configuration.getClusterUser()) && ActiveMQDefaultConfiguration.getDefaultClusterPassword().equals(configuration.getClusterPassword())) { - HornetQServerLogger.LOGGER.clusterSecurityRisk(); + ActiveMQServerLogger.LOGGER.clusterSecurityRisk(); } securityStore = new SecurityStoreImpl(securityRepository, @@ -1773,7 +1773,7 @@ public class HornetQServerImpl implements HornetQServer { public void run() { - HornetQServerLogger.LOGGER.dumpServerInfo(dumper.dump()); + ActiveMQServerLogger.LOGGER.dumpServerInfo(dumper.dump()); } }, 0, dumpInfoInterval, TimeUnit.MILLISECONDS); } @@ -1827,7 +1827,7 @@ public class HornetQServerImpl implements HornetQServer if (nodeManager.getNodeId() == null) { - throw HornetQMessageBundle.BUNDLE.nodeIdNull(); + throw ActiveMQMessageBundle.BUNDLE.nodeIdNull(); } activationLatch.countDown(); @@ -1918,7 +1918,7 @@ public class HornetQServerImpl implements HornetQServer for (Pair msgToDelete : pendingLargeMessages) { - HornetQServerLogger.LOGGER.deletingPendingMessage(msgToDelete); + ActiveMQServerLogger.LOGGER.deletingPendingMessage(msgToDelete); LargeServerMessage msg = storageManager.createLargeMessage(); msg.setMessageID(msgToDelete.getB()); msg.setPendingRecordID(msgToDelete.getA()); @@ -1934,7 +1934,7 @@ public class HornetQServerImpl implements HornetQServer } catch (Throwable e) { - HornetQServerLogger.LOGGER.errorRecoveringPageCounter(e); + ActiveMQServerLogger.LOGGER.errorRecoveringPageCounter(e); } } @@ -1989,7 +1989,7 @@ public class HornetQServerImpl implements HornetQServer } else { - throw HornetQMessageBundle.BUNDLE.queueAlreadyExists(queueName); + throw ActiveMQMessageBundle.BUNDLE.queueAlreadyExists(queueName); } } @@ -2058,7 +2058,7 @@ public class HornetQServerImpl implements HornetQServer } catch (Throwable ignored) { - HornetQServerLogger.LOGGER.debug(ignored.getMessage(), ignored); + ActiveMQServerLogger.LOGGER.debug(ignored.getMessage(), ignored); } throw e; } @@ -2156,7 +2156,7 @@ public class HornetQServerImpl implements HornetQServer } else { - throw HornetQMessageBundle.BUNDLE.cannotCreateDir(journalDir.getAbsolutePath()); + throw ActiveMQMessageBundle.BUNDLE.cannotCreateDir(journalDir.getAbsolutePath()); } } } @@ -2177,7 +2177,7 @@ public class HornetQServerImpl implements HornetQServer { failedAlready = true; - HornetQServerLogger.LOGGER.ioCriticalIOError(message, file.toString(), cause); + ActiveMQServerLogger.LOGGER.ioCriticalIOError(message, file.toString(), cause); stopTheServer(true); } @@ -2212,9 +2212,9 @@ public class HornetQServerImpl implements HornetQServer } @Override - public HornetQServer createBackupServer(Configuration configuration) + public ActiveMQServer createBackupServer(Configuration configuration) { - return new HornetQServerImpl(configuration, null, securityManager, this); + return new ActiveMQServerImpl(configuration, null, securityManager, this); } @Override @@ -2287,7 +2287,7 @@ public class HornetQServerImpl implements HornetQServer { if (!fDir.isDirectory()) { - throw HornetQMessageBundle.BUNDLE.journalDirIsFile(fDir); + throw ActiveMQMessageBundle.BUNDLE.journalDirIsFile(fDir); } if (fDir.list().length > 0) @@ -2313,10 +2313,10 @@ public class HornetQServerImpl implements HornetQServer { if (!dir.renameTo(newPath)) { - throw HornetQMessageBundle.BUNDLE.couldNotMoveJournal(dir); + throw ActiveMQMessageBundle.BUNDLE.couldNotMoveJournal(dir); } - HornetQServerLogger.LOGGER.backupMovingDataAway(dir0, newPath.getPath()); + ActiveMQServerLogger.LOGGER.backupMovingDataAway(dir0, newPath.getPath()); } /* * sometimes OS's can hold on to file handles for a while so we need to check this actually qorks and then wait @@ -2337,7 +2337,7 @@ public class HornetQServerImpl implements HornetQServer count++; if (count == 5) { - throw HornetQMessageBundle.BUNDLE.cannotCreateDir(dir.getPath()); + throw ActiveMQMessageBundle.BUNDLE.cannotCreateDir(dir.getPath()); } } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/AnyLiveNodeLocatorForReplication.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/AnyLiveNodeLocatorForReplication.java index 1d0bb8252e..f28355d471 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/AnyLiveNodeLocatorForReplication.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/AnyLiveNodeLocatorForReplication.java @@ -38,13 +38,13 @@ public class AnyLiveNodeLocatorForReplication extends LiveNodeLocator { private final Lock lock = new ReentrantLock(); private final Condition condition = lock.newCondition(); - private final HornetQServerImpl server; + private final ActiveMQServerImpl server; Map> untriedConnectors = new HashMap>(); Map> triedConnectors = new HashMap>(); private String nodeID; - public AnyLiveNodeLocatorForReplication(SharedNothingBackupQuorum backupQuorum, HornetQServerImpl server) + public AnyLiveNodeLocatorForReplication(SharedNothingBackupQuorum backupQuorum, ActiveMQServerImpl server) { super(backupQuorum); this.server = server; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/AnyLiveNodeLocatorForScaleDown.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/AnyLiveNodeLocatorForScaleDown.java index d2d463b293..7252bb6491 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/AnyLiveNodeLocatorForScaleDown.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/AnyLiveNodeLocatorForScaleDown.java @@ -25,7 +25,7 @@ import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.TopologyMember; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.LiveNodeLocator; /** @@ -38,13 +38,13 @@ public class AnyLiveNodeLocatorForScaleDown extends LiveNodeLocator { private final Lock lock = new ReentrantLock(); private final Condition condition = lock.newCondition(); - private final HornetQServerImpl server; + private final ActiveMQServerImpl server; Map> connectors = new TreeMap<>(); private String nodeID; private String myNodeID; - public AnyLiveNodeLocatorForScaleDown(HornetQServerImpl server) + public AnyLiveNodeLocatorForScaleDown(ActiveMQServerImpl server) { super(); this.server = server; @@ -101,9 +101,9 @@ public class AnyLiveNodeLocatorForScaleDown extends LiveNodeLocator if (topologyMember.getNodeId().equals(myNodeID)) { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace(this + "::informing node about itself, nodeUUID=" + + ActiveMQServerLogger.LOGGER.trace(this + "::informing node about itself, nodeUUID=" + server.getNodeID() + ", connectorPair=" + topologyMember + ", this = " + this); } return; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/BackupRecoveryJournalLoader.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/BackupRecoveryJournalLoader.java index 304ca3fb18..798247404f 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/BackupRecoveryJournalLoader.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/BackupRecoveryJournalLoader.java @@ -23,12 +23,12 @@ import org.apache.activemq.core.paging.PagingManager; import org.apache.activemq.core.persistence.GroupingInfo; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.PostOffice; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.QueueFactory; import org.apache.activemq.core.server.cluster.ClusterController; -import org.apache.activemq.core.server.cluster.HornetQServerSideProtocolManagerFactory; +import org.apache.activemq.core.server.cluster.ActiveMQServerSideProtocolManagerFactory; import org.apache.activemq.core.server.group.GroupingHandler; import org.apache.activemq.core.server.management.ManagementService; import org.apache.activemq.core.transaction.ResourceManager; @@ -42,7 +42,7 @@ import java.util.Map; * */ public class BackupRecoveryJournalLoader extends PostOfficeJournalLoader { - private HornetQServer parentServer; + private ActiveMQServer parentServer; private ServerLocator locator; private final ClusterController clusterController; @@ -54,7 +54,7 @@ public class BackupRecoveryJournalLoader extends PostOfficeJournalLoader ManagementService managementService, GroupingHandler groupingHandler, Configuration configuration, - HornetQServer parentServer, + ActiveMQServer parentServer, ServerLocatorInternal locator, ClusterController clusterController) { @@ -73,7 +73,7 @@ public class BackupRecoveryJournalLoader extends PostOfficeJournalLoader //todo maybe in the future we can restart the handler on the live server as a local handler and redistribute the state if (groupingInfos != null && groupingInfos.size() > 0) { - HornetQServerLogger.LOGGER.groupBindingsOnRecovery(); + ActiveMQServerLogger.LOGGER.groupBindingsOnRecovery(); } } @@ -87,7 +87,7 @@ public class BackupRecoveryJournalLoader extends PostOfficeJournalLoader public void postLoad(Journal messageJournal, ResourceManager resourceManager, Map>> duplicateIDMap) throws Exception { ScaleDownHandler scaleDownHandler = new ScaleDownHandler(pagingManager, postOffice, nodeManager, clusterController); - locator.setProtocolManagerFactory(HornetQServerSideProtocolManagerFactory.getInstance()); + locator.setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance()); try (ClientSessionFactory sessionFactory = locator.createSessionFactory()) { diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ColocatedActivation.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ColocatedActivation.java index cfc9169444..a1b7c2bd27 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ColocatedActivation.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ColocatedActivation.java @@ -49,11 +49,11 @@ public class ColocatedActivation extends LiveActivation LiveActivation liveActivation; - private final HornetQServerImpl server; + private final ActiveMQServerImpl server; - public ColocatedActivation(HornetQServerImpl hornetQServer, ColocatedPolicy colocatedPolicy, LiveActivation liveActivation) + public ColocatedActivation(ActiveMQServerImpl activeMQServer, ColocatedPolicy colocatedPolicy, LiveActivation liveActivation) { - server = hornetQServer; + server = activeMQServer; this.colocatedPolicy = colocatedPolicy; this.liveActivation = liveActivation; colocatedHAManager = new ColocatedHAManager(colocatedPolicy, server); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ConnectorsService.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ConnectorsService.java index 2119442cc3..3ab1fdca89 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ConnectorsService.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ConnectorsService.java @@ -23,10 +23,10 @@ import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.ConnectorServiceConfiguration; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.PostOffice; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.ConnectorService; import org.apache.activemq.core.server.ConnectorServiceFactory; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.utils.ClassloadingUtil; import org.apache.activemq.utils.ConfigurationHelper; @@ -39,7 +39,7 @@ import org.apache.activemq.utils.ConfigurationHelper; * * @author Andy Taylor Created Jun 29, 2010 */ -public final class ConnectorsService implements HornetQComponent +public final class ConnectorsService implements ActiveMQComponent { private final StorageManager storageManager; @@ -93,7 +93,7 @@ public final class ConnectorsService implements HornetQComponent } catch (Throwable e) { - HornetQServerLogger.LOGGER.errorStartingConnectorService(e, connector.getName()); + ActiveMQServerLogger.LOGGER.errorStartingConnectorService(e, connector.getName()); } } isStarted = true; @@ -106,7 +106,7 @@ public final class ConnectorsService implements HornetQComponent Set invalid = ConfigurationHelper.checkKeys(factory.getAllowableProperties(), info.getParams().keySet()); if (!invalid.isEmpty()) { - HornetQServerLogger.LOGGER.connectorKeysInvalid(ConfigurationHelper.stringSetToCommaListString(invalid)); + ActiveMQServerLogger.LOGGER.connectorKeysInvalid(ConfigurationHelper.stringSetToCommaListString(invalid)); return; } } @@ -114,7 +114,7 @@ public final class ConnectorsService implements HornetQComponent Set invalid = ConfigurationHelper.checkKeysExist(factory.getRequiredProperties(), info.getParams().keySet()); if (!invalid.isEmpty()) { - HornetQServerLogger.LOGGER.connectorKeysMissing(ConfigurationHelper.stringSetToCommaListString(invalid)); + ActiveMQServerLogger.LOGGER.connectorKeysMissing(ConfigurationHelper.stringSetToCommaListString(invalid)); return; } ConnectorService connectorService = factory.createConnectorService(info.getConnectorName(), info.getParams(), storageManager, postOffice, scheduledPool); @@ -135,7 +135,7 @@ public final class ConnectorsService implements HornetQComponent } catch (Throwable e) { - HornetQServerLogger.LOGGER.errorStoppingConnectorService(e, connector.getName()); + ActiveMQServerLogger.LOGGER.errorStoppingConnectorService(e, connector.getName()); } } connectors.clear(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/DivertImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/DivertImpl.java index 92ab71f25e..f6c4fc3aa4 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/DivertImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/DivertImpl.java @@ -16,8 +16,8 @@ import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.filter.Filter; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.PostOffice; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.Divert; -import org.apache.activemq.core.server.HornetQServerLogger; import org.apache.activemq.core.server.RoutingContext; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.server.cluster.Transformer; @@ -80,9 +80,9 @@ public class DivertImpl implements Divert // We must make a copy of the message, otherwise things like returning credits to the page won't work // properly on ack, since the original address will be overwritten - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("Diverting message " + message + " into " + this); + ActiveMQServerLogger.LOGGER.trace("Diverting message " + message + " into " + this); } long id = storageManager.generateID(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/FileLockNodeManager.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/FileLockNodeManager.java index 0a18b1aa6f..8876ac9e82 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/FileLockNodeManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/FileLockNodeManager.java @@ -18,7 +18,7 @@ import java.nio.channels.FileLock; import org.apache.activemq.api.core.ActiveMQIllegalStateException; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.utils.UUID; @@ -130,7 +130,7 @@ public class FileLockNodeManager extends NodeManager byte state = getState(); while (state == FileLockNodeManager.NOT_STARTED || state == FIRST_TIME_START) { - HornetQServerLogger.LOGGER.debug("awaiting live node startup state='" + state + "'"); + ActiveMQServerLogger.LOGGER.debug("awaiting live node startup state='" + state + "'"); Thread.sleep(2000); state = getState(); } @@ -145,18 +145,18 @@ public class FileLockNodeManager extends NodeManager if (state == FileLockNodeManager.PAUSED) { liveLock.release(); - HornetQServerLogger.LOGGER.debug("awaiting live node restarting"); + ActiveMQServerLogger.LOGGER.debug("awaiting live node restarting"); Thread.sleep(2000); } else if (state == FileLockNodeManager.FAILINGBACK) { liveLock.release(); - HornetQServerLogger.LOGGER.debug("awaiting live node failing back"); + ActiveMQServerLogger.LOGGER.debug("awaiting live node failing back"); Thread.sleep(2000); } else if (state == FileLockNodeManager.LIVE) { - HornetQServerLogger.LOGGER.debug("acquired live node lock state = " + (char) state); + ActiveMQServerLogger.LOGGER.debug("acquired live node lock state = " + (char) state); break; } } @@ -167,10 +167,10 @@ public class FileLockNodeManager extends NodeManager public void startBackup() throws Exception { assert !replicatedBackup; // should not be called if this is a replicating backup - HornetQServerLogger.LOGGER.waitingToBecomeBackup(); + ActiveMQServerLogger.LOGGER.waitingToBecomeBackup(); backupLock = lock(FileLockNodeManager.BACKUP_LOCK_POS); - HornetQServerLogger.LOGGER.gotBackupLock(); + ActiveMQServerLogger.LOGGER.gotBackupLock(); if (getUUID() == null) readNodeId(); } @@ -182,11 +182,11 @@ public class FileLockNodeManager extends NodeManager String timeoutMessage = lockAcquisitionTimeout == -1 ? "indefinitely" : lockAcquisitionTimeout + " milliseconds"; - HornetQServerLogger.LOGGER.waitingToObtainLiveLock(timeoutMessage); + ActiveMQServerLogger.LOGGER.waitingToObtainLiveLock(timeoutMessage); liveLock = lock(FileLockNodeManager.LIVE_LOCK_POS); - HornetQServerLogger.LOGGER.obtainedLiveLock(); + ActiveMQServerLogger.LOGGER.obtainedLiveLock(); setLive(); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/LastValueQueue.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/LastValueQueue.java index 86b7737772..0f6fbffb5b 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/LastValueQueue.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/LastValueQueue.java @@ -23,7 +23,7 @@ import org.apache.activemq.core.filter.Filter; import org.apache.activemq.core.paging.cursor.PageSubscription; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.PostOffice; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.ServerMessage; @@ -95,7 +95,7 @@ public class LastValueQueue extends QueueImpl } catch (Exception e) { - HornetQServerLogger.LOGGER.errorAckingOldReference(e); + ActiveMQServerLogger.LOGGER.errorAckingOldReference(e); } hr.setReference(ref); @@ -137,7 +137,7 @@ public class LastValueQueue extends QueueImpl } catch (Exception e) { - HornetQServerLogger.LOGGER.errorAckingOldReference(e); + ActiveMQServerLogger.LOGGER.errorAckingOldReference(e); } } else diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/LiveOnlyActivation.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/LiveOnlyActivation.java index a352f7c845..b2fd40622b 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/LiveOnlyActivation.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/LiveOnlyActivation.java @@ -16,15 +16,15 @@ import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.client.impl.ServerLocatorInternal; import org.apache.activemq.core.postoffice.DuplicateIDCache; import org.apache.activemq.core.postoffice.impl.PostOfficeImpl; import org.apache.activemq.core.remoting.server.RemotingService; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.LiveNodeLocator; -import org.apache.activemq.core.server.cluster.HornetQServerSideProtocolManagerFactory; +import org.apache.activemq.core.server.cluster.ActiveMQServerSideProtocolManagerFactory; import org.apache.activemq.core.server.cluster.ha.LiveOnlyPolicy; import org.apache.activemq.core.server.cluster.ha.ScaleDownPolicy; @@ -38,15 +38,15 @@ public class LiveOnlyActivation extends Activation //this is how we act when we initially start as live private LiveOnlyPolicy liveOnlyPolicy; - private final HornetQServerImpl hornetQServer; + private final ActiveMQServerImpl activeMQServer; private ServerLocatorInternal scaleDownServerLocator; private ClientSessionFactoryInternal scaleDownClientSessionFactory; - public LiveOnlyActivation(HornetQServerImpl server, LiveOnlyPolicy liveOnlyPolicy) + public LiveOnlyActivation(ActiveMQServerImpl server, LiveOnlyPolicy liveOnlyPolicy) { - this.hornetQServer = server; + this.activeMQServer = server; this.liveOnlyPolicy = liveOnlyPolicy; } @@ -54,22 +54,22 @@ public class LiveOnlyActivation extends Activation { try { - hornetQServer.initialisePart1(false); + activeMQServer.initialisePart1(false); - hornetQServer.initialisePart2(false); + activeMQServer.initialisePart2(false); - if (hornetQServer.getIdentity() != null) + if (activeMQServer.getIdentity() != null) { - HornetQServerLogger.LOGGER.serverIsLive(hornetQServer.getIdentity()); + ActiveMQServerLogger.LOGGER.serverIsLive(activeMQServer.getIdentity()); } else { - HornetQServerLogger.LOGGER.serverIsLive(); + ActiveMQServerLogger.LOGGER.serverIsLive(); } } catch (Exception e) { - HornetQServerLogger.LOGGER.initializationError(e); + ActiveMQServerLogger.LOGGER.initializationError(e); } } @@ -113,7 +113,7 @@ public class LiveOnlyActivation extends Activation } catch (Exception e) { - HornetQServerLogger.LOGGER.failedToScaleDown(e); + ActiveMQServerLogger.LOGGER.failedToScaleDown(e); } finally { @@ -127,18 +127,18 @@ public class LiveOnlyActivation extends Activation { try { - scaleDownServerLocator = ScaleDownPolicy.getScaleDownConnector(scaleDownPolicy, hornetQServer); + scaleDownServerLocator = ScaleDownPolicy.getScaleDownConnector(scaleDownPolicy, activeMQServer); //use a Node Locator to connect to the cluster - scaleDownServerLocator.setProtocolManagerFactory(HornetQServerSideProtocolManagerFactory.getInstance()); + scaleDownServerLocator.setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance()); LiveNodeLocator nodeLocator = scaleDownPolicy.getGroupName() == null ? - new AnyLiveNodeLocatorForScaleDown(hornetQServer) : - new NamedLiveNodeLocatorForScaleDown(scaleDownPolicy.getGroupName(), hornetQServer); + new AnyLiveNodeLocatorForScaleDown(activeMQServer) : + new NamedLiveNodeLocatorForScaleDown(scaleDownPolicy.getGroupName(), activeMQServer); scaleDownServerLocator.addClusterTopologyListener(nodeLocator); nodeLocator.connectToCluster(scaleDownServerLocator); // a timeout is necessary here in case we use a NamedLiveNodeLocatorForScaleDown and there's no matching node in the cluster // should the timeout be configurable? - nodeLocator.locateNode(HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT); + nodeLocator.locateNode(ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT); ClientSessionFactoryInternal clientSessionFactory = null; while (clientSessionFactory == null) { @@ -152,7 +152,7 @@ public class LiveOnlyActivation extends Activation } catch (Exception e) { - HornetQServerLogger.LOGGER.trace("Failed to connect to " + possibleLive.getA()); + ActiveMQServerLogger.LOGGER.trace("Failed to connect to " + possibleLive.getA()); nodeLocator.notifyRegistrationFailed(false); if (clientSessionFactory != null) { @@ -173,25 +173,25 @@ public class LiveOnlyActivation extends Activation } catch (Exception e) { - HornetQServerLogger.LOGGER.failedToScaleDown(e); + ActiveMQServerLogger.LOGGER.failedToScaleDown(e); } } public long scaleDown() throws Exception { - ScaleDownHandler scaleDownHandler = new ScaleDownHandler(hornetQServer.getPagingManager(), - hornetQServer.getPostOffice(), - hornetQServer.getNodeManager(), - hornetQServer.getClusterManager().getClusterController()); - ConcurrentMap duplicateIDCaches = ((PostOfficeImpl) hornetQServer.getPostOffice()).getDuplicateIDCaches(); + ScaleDownHandler scaleDownHandler = new ScaleDownHandler(activeMQServer.getPagingManager(), + activeMQServer.getPostOffice(), + activeMQServer.getNodeManager(), + activeMQServer.getClusterManager().getClusterController()); + ConcurrentMap duplicateIDCaches = ((PostOfficeImpl) activeMQServer.getPostOffice()).getDuplicateIDCaches(); Map>> duplicateIDMap = new HashMap<>(); for (SimpleString address : duplicateIDCaches.keySet()) { - DuplicateIDCache duplicateIDCache = hornetQServer.getPostOffice().getDuplicateIDCache(address); + DuplicateIDCache duplicateIDCache = activeMQServer.getPostOffice().getDuplicateIDCache(address); duplicateIDMap.put(address, duplicateIDCache.getMap()); } - return scaleDownHandler.scaleDown(scaleDownClientSessionFactory, hornetQServer.getResourceManager(), duplicateIDMap, - hornetQServer.getManagementService().getManagementAddress(), null); + return scaleDownHandler.scaleDown(scaleDownClientSessionFactory, activeMQServer.getResourceManager(), duplicateIDMap, + activeMQServer.getManagementService().getManagementAddress(), null); } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/NamedLiveNodeLocatorForScaleDown.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/NamedLiveNodeLocatorForScaleDown.java index bd963a62ef..0b4914ebd1 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/NamedLiveNodeLocatorForScaleDown.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/NamedLiveNodeLocatorForScaleDown.java @@ -25,7 +25,7 @@ import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.TopologyMember; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.LiveNodeLocator; /** @@ -39,13 +39,13 @@ public class NamedLiveNodeLocatorForScaleDown extends LiveNodeLocator private final Lock lock = new ReentrantLock(); private final Condition condition = lock.newCondition(); private final String scaleDownGroupName; - private final HornetQServerImpl server; + private final ActiveMQServerImpl server; Map> connectors = new HashMap<>(); private String nodeID; private String myNodeID; - public NamedLiveNodeLocatorForScaleDown(String scaleDownGroupName, HornetQServerImpl server) + public NamedLiveNodeLocatorForScaleDown(String scaleDownGroupName, ActiveMQServerImpl server) { super(); this.server = server; @@ -104,9 +104,9 @@ public class NamedLiveNodeLocatorForScaleDown extends LiveNodeLocator if (topologyMember.getNodeId().equals(myNodeID)) { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace(this + "::informing node about itself, nodeUUID=" + + ActiveMQServerLogger.LOGGER.trace(this + "::informing node about itself, nodeUUID=" + server.getNodeID() + ", connectorPair=" + topologyMember + ", this = " + this); } return; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/PostOfficeJournalLoader.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/PostOfficeJournalLoader.java index f71094ac32..abd7e903c9 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/PostOfficeJournalLoader.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/PostOfficeJournalLoader.java @@ -42,7 +42,7 @@ import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.DuplicateIDCache; import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.postoffice.impl.LocalQueueBinding; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.Queue; @@ -115,7 +115,7 @@ public class PostOfficeJournalLoader implements JournalLoader boolean isTopicIdentification = filter != null && filter.getFilterString() != null && - filter.getFilterString().toString().equals(HornetQServerImpl.GENERIC_IGNORED_FILTER); + filter.getFilterString().toString().equals(ActiveMQServerImpl.GENERIC_IGNORED_FILTER); if (postOffice.getBinding(queueBindingInfo.getQueueName()) != null) { @@ -131,7 +131,7 @@ public class PostOfficeJournalLoader implements JournalLoader { SimpleString newName = queueBindingInfo.getQueueName().concat("-" + (duplicateID++)); - HornetQServerLogger.LOGGER.queueDuplicatedRenaming(queueBindingInfo.getQueueName().toString(), newName.toString()); + ActiveMQServerLogger.LOGGER.queueDuplicatedRenaming(queueBindingInfo.getQueueName().toString(), newName.toString()); queueBindingInfo.replaceQueueName(newName); } } @@ -179,7 +179,7 @@ public class PostOfficeJournalLoader implements JournalLoader { if (queueRecords.values().size() != 0) { - HornetQServerLogger.LOGGER.journalCannotFindQueueForMessage(queueID); + ActiveMQServerLogger.LOGGER.journalCannotFindQueueForMessage(queueID); } continue; @@ -227,14 +227,14 @@ public class PostOfficeJournalLoader implements JournalLoader { if (msg.getRefCount() == 0) { - HornetQServerLogger.LOGGER.journalUnreferencedMessage(msg.getMessageID()); + ActiveMQServerLogger.LOGGER.journalUnreferencedMessage(msg.getMessageID()); try { storageManager.deleteMessage(msg.getMessageID()); } catch (Exception ignored) { - HornetQServerLogger.LOGGER.journalErrorDeletingMessage(ignored, msg.getMessageID()); + ActiveMQServerLogger.LOGGER.journalErrorDeletingMessage(ignored, msg.getMessageID()); } } } @@ -291,7 +291,7 @@ public class PostOfficeJournalLoader implements JournalLoader if (queue == null) { - HornetQServerLogger.LOGGER.journalMessageInPreparedTX(queueID); + ActiveMQServerLogger.LOGGER.journalMessageInPreparedTX(queueID); return; } postOffice.reroute(message, queue, tx); @@ -311,7 +311,7 @@ public class PostOfficeJournalLoader implements JournalLoader if (removed == null) { - HornetQServerLogger.LOGGER.journalErrorRemovingRef(messageID); + ActiveMQServerLogger.LOGGER.journalErrorRemovingRef(messageID); } else { @@ -393,7 +393,7 @@ public class PostOfficeJournalLoader implements JournalLoader { for (PageCountPending record : entry.getValue()) { - HornetQServerLogger.LOGGER.debug("Deleting pg tempCount " + record.getID()); + ActiveMQServerLogger.LOGGER.debug("Deleting pg tempCount " + record.getID()); storageManager.deletePendingPageCounter(txRecoverCounter.getID(), record.getID()); } @@ -403,11 +403,11 @@ public class PostOfficeJournalLoader implements JournalLoader if (value == null) { - HornetQServerLogger.LOGGER.debug("Page " + entry.getKey() + " wasn't open, so we will just ignore"); + ActiveMQServerLogger.LOGGER.debug("Page " + entry.getKey() + " wasn't open, so we will just ignore"); } else { - HornetQServerLogger.LOGGER.debug("Replacing counter " + value.get()); + ActiveMQServerLogger.LOGGER.debug("Replacing counter " + value.get()); counter.increment(txRecoverCounter, value.get()); } } @@ -415,12 +415,12 @@ public class PostOfficeJournalLoader implements JournalLoader else { // on this case the page file didn't exist, we just remove all the records since the page is already gone - HornetQServerLogger.LOGGER.debug("Page " + pageId + " didn't exist on address " + address + ", so we are just removing records"); + ActiveMQServerLogger.LOGGER.debug("Page " + pageId + " didn't exist on address " + address + ", so we are just removing records"); for (List records : perQueue.values()) { for (PageCountPending record : records) { - HornetQServerLogger.LOGGER.debug("Removing pending page counter " + record.getID()); + ActiveMQServerLogger.LOGGER.debug("Removing pending page counter " + record.getID()); storageManager.deletePendingPageCounter(txRecoverCounter.getID(), record.getID()); txRecoverCounter.setContainsPersistent(); } @@ -462,7 +462,7 @@ public class PostOfficeJournalLoader implements JournalLoader if (queue == null) { - HornetQServerLogger.LOGGER.debug("removing pending page counter id = " + pgCount.getID() + " as queueID=" + pgCount.getID() + " no longer exists"); + ActiveMQServerLogger.LOGGER.debug("removing pending page counter id = " + pgCount.getID() + " as queueID=" + pgCount.getID() + " no longer exists"); // this means the queue doesn't exist any longer, we will remove it from the storage storageManager.deletePendingPageCounter(txRecoverCounter.getID(), pgCount.getID()); txRecoverCounter.setContainsPersistent(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/QueueImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/QueueImpl.java index 1a95ea49f0..212e4337f8 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/QueueImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/QueueImpl.java @@ -53,11 +53,11 @@ import org.apache.activemq.core.postoffice.DuplicateIDCache; import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.postoffice.impl.PostOfficeImpl; import org.apache.activemq.core.remoting.server.RemotingService; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.Consumer; import org.apache.activemq.core.server.HandleStatus; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.RoutingContext; @@ -97,7 +97,7 @@ import org.apache.activemq.utils.TypedProperties; */ public class QueueImpl implements Queue { - private static final boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); public static final int REDISTRIBUTOR_BATCH_SIZE = 100; @@ -421,7 +421,7 @@ public class QueueImpl implements Queue } // Queue implementation ---------------------------------------------------------------------------------------- - public synchronized void setConsumersRefCount(final HornetQServer server) + public synchronized void setConsumersRefCount(final ActiveMQServer server) { if (refCountForConsumers == null) { @@ -489,11 +489,11 @@ public class QueueImpl implements Queue { if (groups.remove(groupIDToRemove) != null) { - HornetQServerLogger.LOGGER.debug("Removing group after unproposal " + groupID + " from queue " + QueueImpl.this); + ActiveMQServerLogger.LOGGER.debug("Removing group after unproposal " + groupID + " from queue " + QueueImpl.this); } else { - HornetQServerLogger.LOGGER.debug("Couldn't remove Removing group " + groupIDToRemove + " after unproposal on queue " + QueueImpl.this); + ActiveMQServerLogger.LOGGER.debug("Couldn't remove Removing group " + groupIDToRemove + " after unproposal on queue " + QueueImpl.this); } } } @@ -616,13 +616,13 @@ public class QueueImpl implements Queue } else { - HornetQServerLogger.LOGGER.timeoutFlushInTransit(getName().toString(), getAddress().toString()); + ActiveMQServerLogger.LOGGER.timeoutFlushInTransit(getName().toString(), getAddress().toString()); return false; } } catch (Exception e) { - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); return false; } } @@ -633,14 +633,14 @@ public class QueueImpl implements Queue { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Force delivery scheduling depage"); + ActiveMQServerLogger.LOGGER.trace("Force delivery scheduling depage"); } scheduleDepage(false); } if (isTrace) { - HornetQServerLogger.LOGGER.trace("Force delivery deliverying async"); + ActiveMQServerLogger.LOGGER.trace("Force delivery deliverying async"); } deliverAsync(); @@ -682,7 +682,7 @@ public class QueueImpl implements Queue catch (Exception e) { // nothing that could be done anyway.. just logging - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); } } }); @@ -720,7 +720,7 @@ public class QueueImpl implements Queue if (!ok) { - HornetQServerLogger.LOGGER.errorFlushingExecutorsOnQueue(); + ActiveMQServerLogger.LOGGER.errorFlushingExecutorsOnQueue(); } return ok; @@ -736,16 +736,16 @@ public class QueueImpl implements Queue if (!result) { - HornetQServerLogger.LOGGER.queueBusy(this.name.toString(), timeout); + ActiveMQServerLogger.LOGGER.queueBusy(this.name.toString(), timeout); } return result; } public void addConsumer(final Consumer consumer) throws Exception { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(this + " adding consumer " + consumer); + ActiveMQServerLogger.LOGGER.debug(this + " adding consumer " + consumer); } synchronized (this) @@ -1184,7 +1184,7 @@ public class QueueImpl implements Queue { if (isTrace) { - HornetQServerLogger.LOGGER.trace("moving expired reference " + ref + " to address = " + expiryAddress + " from queue=" + this.getName()); + ActiveMQServerLogger.LOGGER.trace("moving expired reference " + ref + " to address = " + expiryAddress + " from queue=" + this.getName()); } move(expiryAddress, ref, true, false); } @@ -1192,7 +1192,7 @@ public class QueueImpl implements Queue { if (isTrace) { - HornetQServerLogger.LOGGER.trace("expiry is null, just acking expired message for reference " + ref + " from queue=" + this.getName()); + ActiveMQServerLogger.LOGGER.trace("expiry is null, just acking expired message for reference " + ref + " from queue=" + this.getName()); } acknowledge(ref); } @@ -1487,8 +1487,8 @@ public class QueueImpl implements Queue if (expiryAddress != null && expiryAddress.equals(this.address)) { // check expire with itself would be silly (waste of time) - if (HornetQServerLogger.LOGGER.isDebugEnabled()) - HornetQServerLogger.LOGGER.debug("Cannot expire from " + address + " into " + expiryAddress); + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) + ActiveMQServerLogger.LOGGER.debug("Cannot expire from " + address + " into " + expiryAddress); return false; } @@ -1521,8 +1521,8 @@ public class QueueImpl implements Queue if (expiryAddress != null && expiryAddress.equals(this.address)) { // check expire with itself would be silly (waste of time) - if (HornetQServerLogger.LOGGER.isDebugEnabled()) - HornetQServerLogger.LOGGER.debug("Cannot expire from " + address + " into " + expiryAddress); + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) + ActiveMQServerLogger.LOGGER.debug("Cannot expire from " + address + " into " + expiryAddress); return 0; } @@ -1562,8 +1562,8 @@ public class QueueImpl implements Queue if (expiryAddress != null && expiryAddress.equals(this.address)) { // check expire with itself would be silly (waste of time) - if (HornetQServerLogger.LOGGER.isDebugEnabled()) - HornetQServerLogger.LOGGER.debug("Cannot expire from " + address + " into " + expiryAddress); + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) + ActiveMQServerLogger.LOGGER.debug("Cannot expire from " + address + " into " + expiryAddress); return; } @@ -1610,7 +1610,7 @@ public class QueueImpl implements Queue } catch (Exception e) { - HornetQServerLogger.LOGGER.errorExpiringReferencesOnQueue(e, ref); + ActiveMQServerLogger.LOGGER.errorExpiringReferencesOnQueue(e, ref); } } @@ -1758,7 +1758,7 @@ public class QueueImpl implements Queue { if (targetDuplicateCache.contains(duplicateBytes)) { - HornetQServerLogger.LOGGER.messageWithDuplicateID(ref.getMessage().getDuplicateProperty(), toAddress, address, address); + ActiveMQServerLogger.LOGGER.messageWithDuplicateID(ref.getMessage().getDuplicateProperty(), toAddress, address, address); acknowledge(tx, ref); ignored = true; } @@ -1860,7 +1860,7 @@ public class QueueImpl implements Queue } catch (Exception e) { - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); } paused = true; } @@ -1973,9 +1973,9 @@ public class QueueImpl implements Queue */ private void deliver() { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(this + " doing deliver. messageReferences=" + messageReferences.size()); + ActiveMQServerLogger.LOGGER.debug(this + " doing deliver. messageReferences=" + messageReferences.size()); } doInternalPoll(); @@ -2007,7 +2007,7 @@ public class QueueImpl implements Queue { if (isTrace) { - HornetQServerLogger.LOGGER.trace("delivery has been running for too long. Scheduling another delivery task now"); + ActiveMQServerLogger.LOGGER.trace("delivery has been running for too long. Scheduling another delivery task now"); } deliverAsync(); @@ -2077,7 +2077,7 @@ public class QueueImpl implements Queue { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Reference " + ref + " being expired"); + ActiveMQServerLogger.LOGGER.trace("Reference " + ref + " being expired"); } holder.iter.remove(); @@ -2091,7 +2091,7 @@ public class QueueImpl implements Queue if (isTrace) { - HornetQServerLogger.LOGGER.trace("Queue " + this.getName() + " is delivering reference " + ref); + ActiveMQServerLogger.LOGGER.trace("Queue " + this.getName() + " is delivering reference " + ref); } // If a group id is set, then this overrides the consumer chosen round-robin @@ -2150,13 +2150,13 @@ public class QueueImpl implements Queue { // this shouldn't really happen, // however I'm keeping this as an assertion case future developers ever change the logic here on this class - HornetQServerLogger.LOGGER.warn("Internal error! Delivery logic has identified a non delivery and still handled a consumer!"); + ActiveMQServerLogger.LOGGER.warn("Internal error! Delivery logic has identified a non delivery and still handled a consumer!"); } else { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(this + "::All the consumers were busy, giving up now"); + ActiveMQServerLogger.LOGGER.debug(this + "::All the consumers were busy, giving up now"); } break; } @@ -2232,7 +2232,7 @@ public class QueueImpl implements Queue { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Scheduling depage for queue " + this.getName()); + ActiveMQServerLogger.LOGGER.trace("Scheduling depage for queue " + this.getName()); } depagePending = true; pageSubscription.getExecutor().execute(new DepageRunner(scheduleExpiry)); @@ -2258,7 +2258,7 @@ public class QueueImpl implements Queue if (isTrace) { - HornetQServerLogger.LOGGER.trace("QueueMemorySize before depage on queue=" + this.getName() + " is " + queueMemorySize.get()); + ActiveMQServerLogger.LOGGER.trace("QueueMemorySize before depage on queue=" + this.getName() + " is " + queueMemorySize.get()); } this.directDeliver = false; @@ -2270,22 +2270,22 @@ public class QueueImpl implements Queue PagedReference reference = pageIterator.next(); if (isTrace) { - HornetQServerLogger.LOGGER.trace("Depaging reference " + reference + " on queue " + this.getName()); + ActiveMQServerLogger.LOGGER.trace("Depaging reference " + reference + " on queue " + this.getName()); } addTail(reference, false); pageIterator.remove(); } - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { if (depaged == 0 && queueMemorySize.get() >= maxSize) { - HornetQServerLogger.LOGGER.debug("Couldn't depage any message as the maxSize on the queue was achieved. " + "There are too many pending messages to be acked in reference to the page configuration"); + ActiveMQServerLogger.LOGGER.debug("Couldn't depage any message as the maxSize on the queue was achieved. " + "There are too many pending messages to be acked in reference to the page configuration"); } - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Queue Memory Size after depage on queue=" + this.getName() + + ActiveMQServerLogger.LOGGER.debug("Queue Memory Size after depage on queue=" + this.getName() + " is " + queueMemorySize.get() + " with maxSize = " + @@ -2336,7 +2336,7 @@ public class QueueImpl implements Queue { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Queue " + this.getName() + " is an internal queue, no checkRedelivery"); + ActiveMQServerLogger.LOGGER.trace("Queue " + this.getName() + " is an internal queue, no checkRedelivery"); } // no DLQ check on internal queues return true; @@ -2358,7 +2358,7 @@ public class QueueImpl implements Queue { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Sending reference " + reference + " to DLA = " + addressSettings.getDeadLetterAddress() + " since ref.getDeliveryCount=" + reference.getDeliveryCount() + "and maxDeliveries=" + maxDeliveries + " from queue=" + this.getName()); + ActiveMQServerLogger.LOGGER.trace("Sending reference " + reference + " to DLA = " + addressSettings.getDeadLetterAddress() + " since ref.getDeliveryCount=" + reference.getDeliveryCount() + "and maxDeliveries=" + maxDeliveries + " from queue=" + this.getName()); } sendToDeadLetterAddress(reference, addressSettings.getDeadLetterAddress()); @@ -2373,7 +2373,7 @@ public class QueueImpl implements Queue if (isTrace) { - HornetQServerLogger.LOGGER.trace("Setting redeliveryDelay=" + redeliveryDelay + " on reference=" + reference); + ActiveMQServerLogger.LOGGER.trace("Setting redeliveryDelay=" + redeliveryDelay + " on reference=" + reference); } reference.setScheduledDeliveryTime(timeBase + redeliveryDelay); @@ -2429,7 +2429,7 @@ public class QueueImpl implements Queue if (propName.startsWith(MessageImpl.HDR_ROUTE_TO_IDS)) { oldRouteToIDs = (byte[]) copyMessage.removeProperty(propName); - HornetQServerLogger.LOGGER.debug("Removed property from message: " + propName + " = " + oldRouteToIDs + " (" + ByteBuffer.wrap(oldRouteToIDs).getLong() + ")"); + ActiveMQServerLogger.LOGGER.debug("Removed property from message: " + propName + " = " + oldRouteToIDs + " (" + ByteBuffer.wrap(oldRouteToIDs).getLong() + ")"); // there should only be one of these properties so potentially save some loop iterations break; @@ -2454,11 +2454,11 @@ public class QueueImpl implements Queue if (targetBinding == null) { - HornetQServerLogger.LOGGER.unableToFindTargetQueue(targetNodeID); + ActiveMQServerLogger.LOGGER.unableToFindTargetQueue(targetNodeID); } else { - HornetQServerLogger.LOGGER.debug("Routing on binding: " + targetBinding); + ActiveMQServerLogger.LOGGER.debug("Routing on binding: " + targetBinding); targetBinding.route(copyMessage, routingContext); } } @@ -2475,7 +2475,7 @@ public class QueueImpl implements Queue public void onError(final int errorCode, final String errorMessage) { - HornetQServerLogger.LOGGER.ioErrorRedistributing(errorCode, errorMessage); + ActiveMQServerLogger.LOGGER.ioErrorRedistributing(errorCode, errorMessage); } public void done() @@ -2509,7 +2509,7 @@ public class QueueImpl implements Queue // parse the queue name of the remote queue binding to determine the node ID String temp = remoteQueueBinding.getQueue().getName().toString(); targetNodeID = temp.substring(temp.lastIndexOf(".") + 1); - HornetQServerLogger.LOGGER.debug("Message formerly destined for " + oldQueueName + " with ID: " + oldQueueID + " on address " + copyMessage.getAddress() + " on node " + targetNodeID); + ActiveMQServerLogger.LOGGER.debug("Message formerly destined for " + oldQueueName + " with ID: " + oldQueueID + " on address " + copyMessage.getAddress() + " on node " + targetNodeID); // now that we have the name of the queue we need to look through all the bindings again to find the new remote queue binding for (Map.Entry entry2 : postOffice.getAllBindings().entrySet()) @@ -2525,15 +2525,15 @@ public class QueueImpl implements Queue if (oldQueueName.equals(remoteQueueBinding.getRoutingName()) && targetNodeID.equals(queueSuffix.toString())) { targetBinding = remoteQueueBinding; - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Message now destined for " + remoteQueueBinding.getRoutingName() + " with ID: " + remoteQueueBinding.getRemoteQueueID() + " on address " + copyMessage.getAddress() + " on node " + targetNodeID); + ActiveMQServerLogger.LOGGER.debug("Message now destined for " + remoteQueueBinding.getRoutingName() + " with ID: " + remoteQueueBinding.getRemoteQueueID() + " on address " + copyMessage.getAddress() + " on node " + targetNodeID); } break; } else { - HornetQServerLogger.LOGGER.debug("Failed to match: " + remoteQueueBinding); + ActiveMQServerLogger.LOGGER.debug("Failed to match: " + remoteQueueBinding); } } } @@ -2578,7 +2578,7 @@ public class QueueImpl implements Queue if (bindingList.getBindings().isEmpty()) { - HornetQServerLogger.LOGGER.errorExpiringReferencesNoBindings(expiryAddress); + ActiveMQServerLogger.LOGGER.errorExpiringReferencesNoBindings(expiryAddress); } else { @@ -2587,7 +2587,7 @@ public class QueueImpl implements Queue } else { - HornetQServerLogger.LOGGER.errorExpiringReferencesNoQueue(name); + ActiveMQServerLogger.LOGGER.errorExpiringReferencesNoQueue(name); acknowledge(tx, ref); } @@ -2607,18 +2607,18 @@ public class QueueImpl implements Queue if (bindingList.getBindings().isEmpty()) { - HornetQServerLogger.LOGGER.messageExceededMaxDelivery(ref, deadLetterAddress); + ActiveMQServerLogger.LOGGER.messageExceededMaxDelivery(ref, deadLetterAddress); acknowledge(ref); } else { - HornetQServerLogger.LOGGER.messageExceededMaxDeliverySendtoDLA(ref, deadLetterAddress, name); + ActiveMQServerLogger.LOGGER.messageExceededMaxDeliverySendtoDLA(ref, deadLetterAddress, name); move(deadLetterAddress, ref, false, false); } } else { - HornetQServerLogger.LOGGER.messageExceededMaxDeliveryNoDLA(name); + ActiveMQServerLogger.LOGGER.messageExceededMaxDeliveryNoDLA(name); acknowledge(ref); } @@ -2727,7 +2727,7 @@ public class QueueImpl implements Queue } catch (Throwable t) { - HornetQServerLogger.LOGGER.removingBadConsumer(t, consumer, reference); + ActiveMQServerLogger.LOGGER.removingBadConsumer(t, consumer, reference); synchronized (this) { @@ -2738,7 +2738,7 @@ public class QueueImpl implements Queue } catch (Exception e) { - HornetQServerLogger.LOGGER.errorRemovingConsumer(e); + ActiveMQServerLogger.LOGGER.errorRemovingConsumer(e); } // The message failed to be delivered, hence we try again @@ -2757,7 +2757,7 @@ public class QueueImpl implements Queue { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Reference " + reference + " is expired"); + ActiveMQServerLogger.LOGGER.trace("Reference " + reference + " is expired"); } reference.handled(); @@ -2767,7 +2767,7 @@ public class QueueImpl implements Queue } catch (Exception e) { - HornetQServerLogger.LOGGER.errorExpiringRef(e); + ActiveMQServerLogger.LOGGER.errorExpiringRef(e); } return true; @@ -2787,7 +2787,7 @@ public class QueueImpl implements Queue } catch (Throwable t) { - HornetQServerLogger.LOGGER.removingBadConsumer(t, consumer, reference); + ActiveMQServerLogger.LOGGER.removingBadConsumer(t, consumer, reference); // If the consumer throws an exception we remove the consumer try @@ -2796,7 +2796,7 @@ public class QueueImpl implements Queue } catch (Exception e) { - HornetQServerLogger.LOGGER.errorRemovingConsumer(e); + ActiveMQServerLogger.LOGGER.errorRemovingConsumer(e); } return HandleStatus.BUSY; } @@ -2842,7 +2842,7 @@ public class QueueImpl implements Queue } catch (Exception e) { - HornetQServerLogger.LOGGER.errorDecrementingRefCount(e); + ActiveMQServerLogger.LOGGER.errorDecrementingRefCount(e); } if (durableRef) @@ -2871,7 +2871,7 @@ public class QueueImpl implements Queue } catch (Exception e) { - HornetQServerLogger.LOGGER.errorRemovingMessage(e, message.getMessageID()); + ActiveMQServerLogger.LOGGER.errorRemovingMessage(e, message.getMessageID()); } } } @@ -2979,7 +2979,7 @@ public class QueueImpl implements Queue } catch (Exception e) { - HornetQServerLogger.LOGGER.errorDelivering(e); + ActiveMQServerLogger.LOGGER.errorDelivering(e); } finally { @@ -3005,7 +3005,7 @@ public class QueueImpl implements Queue } catch (Exception e) { - HornetQServerLogger.LOGGER.errorDelivering(e); + ActiveMQServerLogger.LOGGER.errorDelivering(e); } } } @@ -3175,9 +3175,9 @@ public class QueueImpl implements Queue slowConsumerReaperFuture.cancel(false); slowConsumerReaperFuture = null; slowConsumerReaperRunnable = null; - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Cancelled slow-consumer-reaper thread for queue \"" + getName() + "\""); + ActiveMQServerLogger.LOGGER.debug("Cancelled slow-consumer-reaper thread for queue \"" + getName() + "\""); } } } @@ -3208,9 +3208,9 @@ public class QueueImpl implements Queue settings.getSlowConsumerCheckPeriod(), TimeUnit.SECONDS); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Scheduled slow-consumer-reaper thread for queue \"" + getName() + + ActiveMQServerLogger.LOGGER.debug("Scheduled slow-consumer-reaper thread for queue \"" + getName() + "\"; slow-consumer-check-period=" + settings.getSlowConsumerCheckPeriod() + ", slow-consumer-threshold=" + settings.getSlowConsumerThreshold() + ", slow-consumer-policy=" + settings.getSlowConsumerPolicy()); @@ -3245,9 +3245,9 @@ public class QueueImpl implements Queue public void run() { float queueRate = getRate(); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(getAddress() + ":" + getName() + " has " + getConsumerCount() + " consumer(s) and is receiving messages at a rate of " + queueRate + " msgs/second."); + ActiveMQServerLogger.LOGGER.debug(getAddress() + ":" + getName() + " has " + getConsumerCount() + " consumer(s) and is receiving messages at a rate of " + queueRate + " msgs/second."); } for (Consumer consumer : getConsumers()) { @@ -3257,9 +3257,9 @@ public class QueueImpl implements Queue float consumerRate = serverConsumer.getRate(); if (queueRate < threshold) { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Insufficient messages received on queue \"" + getName() + "\" to satisfy slow-consumer-threshold. Skipping inspection of consumer."); + ActiveMQServerLogger.LOGGER.debug("Insufficient messages received on queue \"" + getName() + "\" to satisfy slow-consumer-threshold. Skipping inspection of consumer."); } } else if (consumerRate < threshold) @@ -3277,11 +3277,11 @@ public class QueueImpl implements Queue if (connection != null) { - HornetQServerLogger.LOGGER.slowConsumerDetected(serverConsumer.getSessionID(), serverConsumer.getID(), getName().toString(), connection.getRemoteAddress(), threshold, consumerRate); + ActiveMQServerLogger.LOGGER.slowConsumerDetected(serverConsumer.getSessionID(), serverConsumer.getID(), getName().toString(), connection.getRemoteAddress(), threshold, consumerRate); if (policy.equals(SlowConsumerPolicy.KILL)) { remotingService.removeConnection(connection.getID()); - connection.fail(HornetQMessageBundle.BUNDLE.connectionsClosedByManagement(connection.getRemoteAddress())); + connection.fail(ActiveMQMessageBundle.BUNDLE.connectionsClosedByManagement(connection.getRemoteAddress())); } else if (policy.equals(SlowConsumerPolicy.NOTIFY)) { @@ -3314,7 +3314,7 @@ public class QueueImpl implements Queue } catch (Exception e) { - HornetQServerLogger.LOGGER.failedToSendSlowConsumerNotification(notification, e); + ActiveMQServerLogger.LOGGER.failedToSendSlowConsumerNotification(notification, e); } } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/RefsOperation.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/RefsOperation.java index f3a805fdd3..87fd5e1c8d 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/RefsOperation.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/RefsOperation.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.server.impl; import org.apache.activemq.core.persistence.StorageManager; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.ServerMessage; @@ -81,9 +81,9 @@ public class RefsOperation extends TransactionOperationAbstract { ref.setConsumerId(null); - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("rolling back " + ref); + ActiveMQServerLogger.LOGGER.trace("rolling back " + ref); } try { @@ -108,7 +108,7 @@ public class RefsOperation extends TransactionOperationAbstract } catch (Exception e) { - HornetQServerLogger.LOGGER.errorCheckingDLQ(e); + ActiveMQServerLogger.LOGGER.errorCheckingDLQ(e); } } @@ -181,7 +181,7 @@ public class RefsOperation extends TransactionOperationAbstract } catch (Exception e) { - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); } } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ReplicationError.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ReplicationError.java index eedcdf0eb9..5058bbbdd5 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ReplicationError.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ReplicationError.java @@ -21,8 +21,8 @@ import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.core.protocol.core.impl.wireformat.BackupReplicationStartFailedMessage; -import org.apache.activemq.core.server.HornetQServerLogger; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.LiveNodeLocator; import org.apache.activemq.spi.core.protocol.RemotingConnection; @@ -30,15 +30,15 @@ import org.apache.activemq.spi.core.protocol.RemotingConnection; * Stops the backup in case of an error at the start of Replication. *

    * Using an interceptor for the task to avoid a server reference inside of the 'basic' channel-0 - * handler at {@link org.apache.activemq.core.protocol.core.impl.HornetQClientProtocolManager.Channel0Handler}. As {@link org.apache.activemq.core.protocol.core.impl.HornetQClientProtocolManager} - * is also shipped in the HQ-client JAR (which does not include {@link HornetQServer}). + * handler at {@link org.apache.activemq.core.protocol.core.impl.ActiveMQClientProtocolManager.Channel0Handler}. As {@link org.apache.activemq.core.protocol.core.impl.ActiveMQClientProtocolManager} + * is also shipped in the activemq-core-client JAR (which does not include {@link org.apache.activemq.core.server.ActiveMQServer}). */ final class ReplicationError implements Interceptor { - private final HornetQServer server; + private final ActiveMQServer server; private LiveNodeLocator nodeLocator; - public ReplicationError(HornetQServer server, LiveNodeLocator nodeLocator) + public ReplicationError(ActiveMQServer server, LiveNodeLocator nodeLocator) { this.server = server; this.nodeLocator = nodeLocator; @@ -70,7 +70,7 @@ final class ReplicationError implements Interceptor private void failed() throws ActiveMQInternalErrorException { - HornetQServerLogger.LOGGER.errorRegisteringBackup(); + ActiveMQServerLogger.LOGGER.errorRegisteringBackup(); nodeLocator.notifyRegistrationFailed(false); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ScaleDownHandler.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ScaleDownHandler.java index 19d341bd08..9afd679099 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ScaleDownHandler.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ScaleDownHandler.java @@ -42,7 +42,7 @@ import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.postoffice.impl.LocalQueueBinding; import org.apache.activemq.core.postoffice.impl.PostOfficeImpl; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.Queue; @@ -80,7 +80,7 @@ public class ScaleDownHandler ClusterControl clusterControl = clusterController.connectToNodeInCluster((ClientSessionFactoryInternal) sessionFactory); clusterControl.authorize(); long num = scaleDownMessages(sessionFactory, targetNodeId); - HornetQServerLogger.LOGGER.info("Scaled down " + num + " messages total."); + ActiveMQServerLogger.LOGGER.info("Scaled down " + num + " messages total."); scaleDownTransactions(sessionFactory, resourceManager); scaleDownDuplicateIDs(duplicateIDMap, sessionFactory, managementAddress); clusterControl.announceScaleDown(new SimpleString(this.targetNodeId), nodeManager.getNodeId()); @@ -222,7 +222,7 @@ public class ScaleDownHandler message.putBytesProperty(MessageImpl.HDR_SCALEDOWN_TO_IDS, oldRouteToIDs); } - HornetQServerLogger.LOGGER.debug("Scaling down message " + message + " from " + address + " to " + message.getAddress() + " on node " + targetNodeId); + ActiveMQServerLogger.LOGGER.debug("Scaling down message " + message + " from " + address + " to " + message.getAddress() + " on node " + targetNodeId); producer.send(message.getAddress(), message); messageCount++; bigLoopQueue.deleteReference(message.getMessageID()); @@ -259,7 +259,7 @@ public class ScaleDownHandler } logMessage.delete(logMessage.length() - 2, logMessage.length()); // trim off the trailing comma and space - HornetQServerLogger.LOGGER.debug(logMessage.append(" on address ").append(address)); + ActiveMQServerLogger.LOGGER.debug(logMessage.append(" on address ").append(address)); message.putBytesProperty(MessageImpl.HDR_ROUTE_TO_IDS, buffer.array()); //we need this incase we are sending back to the source server of the message, this basically @@ -316,7 +316,7 @@ public class ScaleDownHandler Map queueIDs = new HashMap<>(); for (Xid xid : preparedTransactions) { - HornetQServerLogger.LOGGER.debug("Scaling down transaction: " + xid); + ActiveMQServerLogger.LOGGER.debug("Scaling down transaction: " + xid); Transaction transaction = resourceManager.getTransaction(xid); session.start(xid, XAResource.TMNOFLAGS); List allOperations = transaction.getAllOperations(); @@ -515,22 +515,22 @@ public class ScaleDownHandler if (queueID == -1) { session.createQueue(addressName, queue.getName(), queue.getFilter() == null ? null : queue.getFilter().getFilterString(), queue.isDurable()); - HornetQServerLogger.LOGGER.debug("Failed to get queue ID, creating queue [addressName=" + addressName + ", queueName=" + queue.getName() + ", filter=" + (queue.getFilter() == null ? "" : queue.getFilter().getFilterString()) + ", durable=" + queue.isDurable() + "]"); + ActiveMQServerLogger.LOGGER.debug("Failed to get queue ID, creating queue [addressName=" + addressName + ", queueName=" + queue.getName() + ", filter=" + (queue.getFilter() == null ? "" : queue.getFilter().getFilterString()) + ", durable=" + queue.isDurable() + "]"); queueID = getQueueID(session, queue.getName()); } - HornetQServerLogger.LOGGER.debug("ID for " + queue + " is: " + queueID); + ActiveMQServerLogger.LOGGER.debug("ID for " + queue + " is: " + queueID); return queueID; } private Integer getQueueID(ClientSession session, SimpleString queueName) throws Exception { Integer queueID = -1; - ClientRequestor requestor = new ClientRequestor(session, "jms.queue.hornetq.management"); + ClientRequestor requestor = new ClientRequestor(session, "jms.queue.activemq.management"); ClientMessage managementMessage = session.createMessage(false); ManagementHelper.putAttribute(managementMessage, "core.queue." + queueName, "ID"); session.start(); - HornetQServerLogger.LOGGER.debug("Requesting ID for: " + queueName); + ActiveMQServerLogger.LOGGER.debug("Requesting ID for: " + queueName); ClientMessage reply = requestor.request(managementMessage); Object result = ManagementHelper.getResult(reply); if (result != null && result instanceof Integer) diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ScheduledDeliveryHandlerImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ScheduledDeliveryHandlerImpl.java index 7145bc85c1..ec701b174f 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ScheduledDeliveryHandlerImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ScheduledDeliveryHandlerImpl.java @@ -25,7 +25,7 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import org.apache.activemq.core.filter.Filter; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.ScheduledDeliveryHandler; @@ -41,7 +41,7 @@ import org.apache.activemq.core.server.ScheduledDeliveryHandler; */ public class ScheduledDeliveryHandlerImpl implements ScheduledDeliveryHandler { - private static final boolean trace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean trace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); private final ScheduledExecutorService scheduledExecutor; @@ -65,7 +65,7 @@ public class ScheduledDeliveryHandlerImpl implements ScheduledDeliveryHandler { if (ScheduledDeliveryHandlerImpl.trace) { - HornetQServerLogger.LOGGER.trace("Scheduling delivery for " + ref + " to occur at " + deliveryTime); + ActiveMQServerLogger.LOGGER.trace("Scheduling delivery for " + ref + " to occur at " + deliveryTime); } addInPlace(deliveryTime, ref, tail); @@ -158,7 +158,7 @@ public class ScheduledDeliveryHandlerImpl implements ScheduledDeliveryHandler { if (ScheduledDeliveryHandlerImpl.trace) { - HornetQServerLogger.LOGGER.trace("calling another scheduler now as deliverTime " + deliveryTime + " < now=" + now); + ActiveMQServerLogger.LOGGER.trace("calling another scheduler now as deliverTime " + deliveryTime + " < now=" + now); } // if delay == 0 we will avoid races between adding the scheduler and finishing it ScheduledDeliveryRunnable runnable = new ScheduledDeliveryRunnable(deliveryTime); @@ -170,7 +170,7 @@ public class ScheduledDeliveryHandlerImpl implements ScheduledDeliveryHandler if (ScheduledDeliveryHandlerImpl.trace) { - HornetQServerLogger.LOGGER.trace("Setting up scheduler for " + deliveryTime + " with a delay of " + delay + " as now=" + now); + ActiveMQServerLogger.LOGGER.trace("Setting up scheduler for " + deliveryTime + " with a delay of " + delay + " as now=" + now); } runnables.put(deliveryTime, runnable); @@ -180,7 +180,7 @@ public class ScheduledDeliveryHandlerImpl implements ScheduledDeliveryHandler { if (ScheduledDeliveryHandlerImpl.trace) { - HornetQServerLogger.LOGGER.trace("Couldn't make another scheduler as " + deliveryTime + " is already set, now is " + now); + ActiveMQServerLogger.LOGGER.trace("Couldn't make another scheduler as " + deliveryTime + " is already set, now is " + now); } } } @@ -212,7 +212,7 @@ public class ScheduledDeliveryHandlerImpl implements ScheduledDeliveryHandler // this is basically a hack to work around an OS or JDK bug! if (trace) { - HornetQServerLogger.LOGGER.trace("Scheduler is working around OS imprecisions on " + + ActiveMQServerLogger.LOGGER.trace("Scheduler is working around OS imprecisions on " + "timing and re-scheduling an executor. now=" + now + " and deliveryTime=" + deliveryTime); } @@ -221,7 +221,7 @@ public class ScheduledDeliveryHandlerImpl implements ScheduledDeliveryHandler if (ScheduledDeliveryHandlerImpl.trace) { - HornetQServerLogger.LOGGER.trace("Is it " + System.currentTimeMillis() + " now and we are running deliveryTime = " + deliveryTime); + ActiveMQServerLogger.LOGGER.trace("Is it " + System.currentTimeMillis() + " now and we are running deliveryTime = " + deliveryTime); } synchronized (scheduledReferences) @@ -251,14 +251,14 @@ public class ScheduledDeliveryHandlerImpl implements ScheduledDeliveryHandler if (ScheduledDeliveryHandlerImpl.trace) { - HornetQServerLogger.LOGGER.trace("sending message " + reference + " to delivery, deliveryTime = " + deliveryTime); + ActiveMQServerLogger.LOGGER.trace("sending message " + reference + " to delivery, deliveryTime = " + deliveryTime); } references.addFirst(reference); } if (ScheduledDeliveryHandlerImpl.trace) { - HornetQServerLogger.LOGGER.trace("Finished loop on deliveryTime = " + deliveryTime); + ActiveMQServerLogger.LOGGER.trace("Finished loop on deliveryTime = " + deliveryTime); } } @@ -269,7 +269,7 @@ public class ScheduledDeliveryHandlerImpl implements ScheduledDeliveryHandler LinkedList list = entry.getValue(); if (trace) { - HornetQServerLogger.LOGGER.trace("Delivering " + list.size() + " elements on list to queue " + queue); + ActiveMQServerLogger.LOGGER.trace("Delivering " + list.size() + " elements on list to queue " + queue); } queue.addHead(list); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServerConsumerImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServerConsumerImpl.java index 16ba90841d..f1f25c76d1 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServerConsumerImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServerConsumerImpl.java @@ -36,9 +36,9 @@ import org.apache.activemq.core.message.BodyEncoder; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.QueueBinding; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.HandleStatus; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; import org.apache.activemq.core.server.LargeServerMessage; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; @@ -67,7 +67,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { // Constants ------------------------------------------------------------------------------------ - private static boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); // Static --------------------------------------------------------------------------------------- @@ -288,9 +288,9 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { if (callback != null && !callback.hasCredits(this) || availableCredits != null && availableCredits.get() <= 0) { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(this + " is busy for the lack of credits. Current credits = " + + ActiveMQServerLogger.LOGGER.debug(this + " is busy for the lack of credits. Current credits = " + availableCredits + " Can't receive reference " + ref); @@ -319,9 +319,9 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener // This has to be checked inside the lock as the set to null is done inside the lock if (largeMessageDeliverer != null) { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(this + " is busy delivering large message " + + ActiveMQServerLogger.LOGGER.debug(this + " is busy delivering large message " + largeMessageDeliverer + ", can't deliver reference " + ref); @@ -332,16 +332,16 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener if (filter != null && !filter.match(message)) { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("Reference " + ref + " is a noMatch on consumer " + this); + ActiveMQServerLogger.LOGGER.trace("Reference " + ref + " is a noMatch on consumer " + this); } return HandleStatus.NO_MATCH; } - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("Handling reference " + ref); + ActiveMQServerLogger.LOGGER.trace("Handling reference " + ref); } if (!browseOnly) { @@ -551,7 +551,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener } catch (Exception e) { - HornetQServerLogger.LOGGER.errorSendingForcedDelivery(e); + ActiveMQServerLogger.LOGGER.errorSendingForcedDelivery(e); } } }); @@ -573,7 +573,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener } catch (Throwable e) { - HornetQServerLogger.LOGGER.errorResttingLargeMessage(e, largeMessageDeliverer); + ActiveMQServerLogger.LOGGER.errorResttingLargeMessage(e, largeMessageDeliverer); } finally { @@ -588,7 +588,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Cancelling reference for messageID = " + ref.getMessage().getMessageID() + ", ref = " + ref); + ActiveMQServerLogger.LOGGER.trace("Cancelling reference for messageID = " + ref.getMessage().getMessageID() + ", ref = " + ref); } if (performACK) { @@ -672,7 +672,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener if (!ok) { - HornetQServerLogger.LOGGER.errorTransferringConsumer(); + ActiveMQServerLogger.LOGGER.errorTransferringConsumer(); } } @@ -686,9 +686,9 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { if (credits == -1) { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(this + ":: FlowControl::Received disable flow control message"); + ActiveMQServerLogger.LOGGER.debug(this + ":: FlowControl::Received disable flow control message"); } // No flow control availableCredits = null; @@ -699,16 +699,16 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener else if (credits == 0) { // reset, used on slow consumers - HornetQServerLogger.LOGGER.debug(this + ":: FlowControl::Received reset flow control message"); + ActiveMQServerLogger.LOGGER.debug(this + ":: FlowControl::Received reset flow control message"); availableCredits.set(0); } else { int previous = availableCredits.getAndAdd(credits); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug(this + "::FlowControl::Received " + + ActiveMQServerLogger.LOGGER.debug(this + "::FlowControl::Received " + credits + " credits, previous value = " + previous + @@ -718,9 +718,9 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener if (previous <= 0 && previous + credits > 0) { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace(this + "::calling promptDelivery from receiving credits"); + ActiveMQServerLogger.LOGGER.trace(this + "::calling promptDelivery from receiving credits"); } promptDelivery(); } @@ -761,14 +761,14 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { ref = deliveringRefs.poll(); - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("ACKing ref " + ref + " on tx= " + tx + ", consumer=" + this); + ActiveMQServerLogger.LOGGER.trace("ACKing ref " + ref + " on tx= " + tx + ", consumer=" + this); } if (ref == null) { - throw HornetQMessageBundle.BUNDLE.consumerNoReference(id, messageID, messageQueue.getName()); + throw ActiveMQMessageBundle.BUNDLE.consumerNoReference(id, messageID, messageQueue.getName()); } ref.getQueue().acknowledge(tx, ref); @@ -795,17 +795,17 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener } catch (Throwable e) { - HornetQServerLogger.LOGGER.errorAckingMessage((Exception) e); - ActiveMQException hqex = new ActiveMQIllegalStateException(e.getMessage()); + ActiveMQServerLogger.LOGGER.errorAckingMessage((Exception) e); + ActiveMQException activeMQIllegalStateException = new ActiveMQIllegalStateException(e.getMessage()); if (startedTransaction) { tx.rollback(); } else { - tx.markAsRollbackOnly(hqex); + tx.markAsRollbackOnly(activeMQIllegalStateException); } - throw hqex; + throw activeMQIllegalStateException; } } @@ -984,9 +984,9 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { availableCredits.addAndGet(-packetSize); - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace(this + "::FlowControl::delivery standard taking " + + ActiveMQServerLogger.LOGGER.trace(this + "::FlowControl::delivery standard taking " + packetSize + " from credits, available now is " + availableCredits); @@ -1012,7 +1012,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener } catch (Exception e) { - HornetQServerLogger.LOGGER.errorRunningLargeMessageDeliverer(e); + ActiveMQServerLogger.LOGGER.errorRunningLargeMessageDeliverer(e); } } } @@ -1060,9 +1060,9 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener if (availableCredits != null && availableCredits.get() <= 0) { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace(this + "::FlowControl::delivery largeMessage interrupting as there are no more credits, available=" + + ActiveMQServerLogger.LOGGER.trace(this + "::FlowControl::delivery largeMessage interrupting as there are no more credits, available=" + availableCredits); } @@ -1088,9 +1088,9 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { availableCredits.addAndGet(-packetSize); - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace(this + "::FlowControl::" + + ActiveMQServerLogger.LOGGER.trace(this + "::FlowControl::" + " deliver initialpackage with " + packetSize + " delivered, available now = " + @@ -1111,7 +1111,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { if (ServerConsumerImpl.isTrace) { - HornetQServerLogger.LOGGER.trace(this + "::FlowControl::deliverLargeMessage Leaving loop of send LargeMessage because of credits, available=" + + ActiveMQServerLogger.LOGGER.trace(this + "::FlowControl::deliverLargeMessage Leaving loop of send LargeMessage because of credits, available=" + availableCredits); } @@ -1139,9 +1139,9 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { availableCredits.addAndGet(-packetSize); - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace(this + "::FlowControl::largeMessage deliver continuation, packetSize=" + + ActiveMQServerLogger.LOGGER.trace(this + "::FlowControl::largeMessage deliver continuation, packetSize=" + packetSize + " available now=" + availableCredits); @@ -1160,7 +1160,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener if (ServerConsumerImpl.isTrace) { - HornetQServerLogger.LOGGER.trace("Finished deliverLargeMessage"); + ActiveMQServerLogger.LOGGER.trace("Finished deliverLargeMessage"); } finish(); @@ -1245,7 +1245,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener } catch (Exception e) { - HornetQServerLogger.LOGGER.errorBrowserHandlingMessage(e, current); + ActiveMQServerLogger.LOGGER.errorBrowserHandlingMessage(e, current); return; } } @@ -1284,7 +1284,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener } catch (Exception e) { - HornetQServerLogger.LOGGER.errorBrowserHandlingMessage(e, ref); + ActiveMQServerLogger.LOGGER.errorBrowserHandlingMessage(e, ref); break; } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServerInfo.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServerInfo.java index 73d293d3d6..30b22a63b2 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServerInfo.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServerInfo.java @@ -19,7 +19,7 @@ import java.util.Date; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.paging.PagingManager; import org.apache.activemq.core.paging.PagingStore; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.utils.SizeFormatterUtil; /** @@ -31,11 +31,11 @@ import org.apache.activemq.utils.SizeFormatterUtil; */ public class ServerInfo { - private final HornetQServer server; + private final ActiveMQServer server; private final PagingManager pagingManager; - public ServerInfo(final HornetQServer server, final PagingManager pagingManager) + public ServerInfo(final ActiveMQServer server, final PagingManager pagingManager) { this.server = server; this.pagingManager = pagingManager; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServerSessionImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServerSessionImpl.java index 29d1b2d7bd..9e279a938e 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServerSessionImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServerSessionImpl.java @@ -46,7 +46,7 @@ import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.management.CoreNotificationType; import org.apache.activemq.api.core.management.ManagementHelper; import org.apache.activemq.core.client.impl.ClientMessageImpl; -import org.apache.activemq.core.exception.HornetQXAException; +import org.apache.activemq.core.exception.ActiveMQXAException; import org.apache.activemq.core.filter.Filter; import org.apache.activemq.core.filter.impl.FilterImpl; import org.apache.activemq.core.journal.IOAsyncTask; @@ -63,10 +63,10 @@ import org.apache.activemq.core.remoting.CloseListener; import org.apache.activemq.core.remoting.FailureListener; import org.apache.activemq.core.security.CheckType; import org.apache.activemq.core.security.SecurityStore; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.BindingQueryResult; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.LargeServerMessage; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; @@ -103,7 +103,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { // Constants ----------------------------------------------------------------------------- - private static final boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); // Static ------------------------------------------------------------------------------- @@ -147,7 +147,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener protected final String name; - protected final HornetQServer server; + protected final ActiveMQServer server; private final SimpleString managementAddress; @@ -222,7 +222,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener final ResourceManager resourceManager, final SecurityStore securityStore, final ManagementService managementService, - final HornetQServer server, + final ActiveMQServer server, final SimpleString managementAddress, final SimpleString defaultAddress, final SessionCallback callback, @@ -251,7 +251,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener final ResourceManager resourceManager, final SecurityStore securityStore, final ManagementService managementService, - final HornetQServer server, + final ActiveMQServer server, final SimpleString managementAddress, final SimpleString defaultAddress, final SessionCallback callback, @@ -377,7 +377,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener } catch (Exception e) { - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); } } } @@ -394,14 +394,14 @@ public class ServerSessionImpl implements ServerSession, FailureListener } catch (Throwable e) { - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); try { consumer.removeItself(); } catch (Throwable e2) { - HornetQServerLogger.LOGGER.warn(e2.getMessage(), e2); + ActiveMQServerLogger.LOGGER.warn(e2.getMessage(), e2); } } } @@ -416,7 +416,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener } catch (Throwable error) { - HornetQServerLogger.LOGGER.errorDeletingLargeMessageFile(error); + ActiveMQServerLogger.LOGGER.errorDeletingLargeMessageFile(error); } } @@ -452,7 +452,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener if (binding == null || binding.getType() != BindingType.LOCAL_QUEUE) { - throw HornetQMessageBundle.BUNDLE.noSuchQueue(queueName); + throw ActiveMQMessageBundle.BUNDLE.noSuchQueue(queueName); } securityStore.check(binding.getAddress(), CheckType.CONSUME, this); @@ -504,9 +504,9 @@ public class ServerSessionImpl implements ServerSession, FailureListener Notification notification = new Notification(null, CoreNotificationType.CONSUMER_CREATED, props); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Session with user=" + username + + ActiveMQServerLogger.LOGGER.debug("Session with user=" + username + ", connection=" + this.remotingConnection + " created a consumer on queue " + queueName + ", filter = " + filterString); @@ -575,9 +575,9 @@ public class ServerSessionImpl implements ServerSession, FailureListener tempQueueCleannerUppers.put(name, cleaner); } - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Queue " + name + " created on address " + name + + ActiveMQServerLogger.LOGGER.debug("Queue " + name + " created on address " + name + " with filter=" + filterString + " temporary = " + temporary + " durable=" + durable + " on session user=" + this.username + ", connection=" + this.remotingConnection); } @@ -604,9 +604,9 @@ public class ServerSessionImpl implements ServerSession, FailureListener { private final SimpleString bindingName; - private final HornetQServer server; + private final ActiveMQServer server; - public TempQueueCleanerUpper(final HornetQServer server, final SimpleString bindingName) + public TempQueueCleanerUpper(final ActiveMQServer server, final SimpleString bindingName) { this.server = server; @@ -617,9 +617,9 @@ public class ServerSessionImpl implements ServerSession, FailureListener { try { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("deleting temporary queue " + bindingName); + ActiveMQServerLogger.LOGGER.debug("deleting temporary queue " + bindingName); } try { @@ -628,12 +628,12 @@ public class ServerSessionImpl implements ServerSession, FailureListener catch (ActiveMQException e) { // that's fine.. it can happen due to queue already been deleted - HornetQServerLogger.LOGGER.debug(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.debug(e.getMessage(), e); } } catch (Exception e) { - HornetQServerLogger.LOGGER.errorRemovingTempQueue(e, bindingName); + ActiveMQServerLogger.LOGGER.errorRemovingTempQueue(e, bindingName); } } @@ -686,7 +686,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { if (name == null) { - throw HornetQMessageBundle.BUNDLE.queueNameIsNull(); + throw ActiveMQMessageBundle.BUNDLE.queueNameIsNull(); } QueueQueryResult response; @@ -726,7 +726,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { if (address == null) { - throw HornetQMessageBundle.BUNDLE.addressIsNull(); + throw ActiveMQMessageBundle.BUNDLE.addressIsNull(); } List names = new ArrayList(); @@ -767,7 +767,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener if (consumer == null) { - throw HornetQMessageBundle.BUNDLE.consumerDoesntExist(consumerID); + throw ActiveMQMessageBundle.BUNDLE.consumerDoesntExist(consumerID); } if (tx != null && tx.getState() == State.ROLLEDBACK) @@ -831,7 +831,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Calling commit"); + ActiveMQServerLogger.LOGGER.trace("Calling commit"); } try { @@ -908,7 +908,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { final String msg = "Cannot commit, session is currently doing work in transaction " + tx.getXid(); - throw new HornetQXAException(XAException.XAER_PROTO, msg); + throw new ActiveMQXAException(XAException.XAER_PROTO, msg); } else { @@ -917,7 +917,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener if (isTrace) { - HornetQServerLogger.LOGGER.trace("XAcommit into " + theTx + ", xid=" + xid); + ActiveMQServerLogger.LOGGER.trace("XAcommit into " + theTx + ", xid=" + xid); } if (theTx == null) @@ -925,23 +925,23 @@ public class ServerSessionImpl implements ServerSession, FailureListener // checked heuristic committed transactions if (resourceManager.getHeuristicCommittedTransactions().contains(xid)) { - throw new HornetQXAException(XAException.XA_HEURCOM, + throw new ActiveMQXAException(XAException.XA_HEURCOM, "transaction has been heuristically committed: " + xid); } // checked heuristic rolled back transactions else if (resourceManager.getHeuristicRolledbackTransactions().contains(xid)) { - throw new HornetQXAException(XAException.XA_HEURRB, + throw new ActiveMQXAException(XAException.XA_HEURRB, "transaction has been heuristically rolled back: " + xid); } else { if (isTrace) { - HornetQServerLogger.LOGGER.trace("XAcommit into " + theTx + ", xid=" + xid + " cannot find it"); + ActiveMQServerLogger.LOGGER.trace("XAcommit into " + theTx + ", xid=" + xid + " cannot find it"); } - throw new HornetQXAException(XAException.XAER_NOTA, "Cannot find xid in resource manager: " + xid); + throw new ActiveMQXAException(XAException.XAER_NOTA, "Cannot find xid in resource manager: " + xid); } } else @@ -951,7 +951,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener // Put it back resourceManager.putTransaction(xid, theTx); - throw new HornetQXAException(XAException.XAER_PROTO, "Cannot commit transaction, it is suspended " + xid); + throw new ActiveMQXAException(XAException.XAER_PROTO, "Cannot commit transaction, it is suspended " + xid); } else { @@ -969,7 +969,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { final String msg = "Cannot end, transaction is suspended"; - throw new HornetQXAException(XAException.XAER_PROTO, msg); + throw new ActiveMQXAException(XAException.XAER_PROTO, msg); } else if (tx.getState() == Transaction.State.ROLLEDBACK) { @@ -977,7 +977,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener tx = null; - throw new HornetQXAException(XAException.XAER_PROTO, msg); + throw new ActiveMQXAException(XAException.XAER_PROTO, msg); } else { @@ -996,7 +996,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { final String msg = "Cannot find suspended transaction to end " + xid; - throw new HornetQXAException(XAException.XAER_NOTA, msg); + throw new ActiveMQXAException(XAException.XAER_NOTA, msg); } else { @@ -1004,7 +1004,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { final String msg = "Transaction is not suspended " + xid; - throw new HornetQXAException(XAException.XAER_PROTO, msg); + throw new ActiveMQXAException(XAException.XAER_PROTO, msg); } else { @@ -1028,12 +1028,12 @@ public class ServerSessionImpl implements ServerSession, FailureListener { e.printStackTrace(); - throw new HornetQXAException(XAException.XAER_RMERR); + throw new ActiveMQXAException(XAException.XAER_RMERR); } } else { - throw new HornetQXAException(XAException.XAER_NOTA); + throw new ActiveMQXAException(XAException.XAER_NOTA); } } @@ -1045,13 +1045,13 @@ public class ServerSessionImpl implements ServerSession, FailureListener { final String msg = "Cannot find xid in resource manager: " + xid; - throw new HornetQXAException(XAException.XAER_NOTA, msg); + throw new ActiveMQXAException(XAException.XAER_NOTA, msg); } else { if (theTx.getState() == Transaction.State.SUSPENDED) { - throw new HornetQXAException(XAException.XAER_PROTO, "Cannot join tx, it is suspended " + xid); + throw new ActiveMQXAException(XAException.XAER_PROTO, "Cannot join tx, it is suspended " + xid); } else { @@ -1066,7 +1066,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { final String msg = "Cannot resume, session is currently doing work in a transaction " + tx.getXid(); - throw new HornetQXAException(XAException.XAER_PROTO, msg); + throw new ActiveMQXAException(XAException.XAER_PROTO, msg); } else { @@ -1076,13 +1076,13 @@ public class ServerSessionImpl implements ServerSession, FailureListener { final String msg = "Cannot find xid in resource manager: " + xid; - throw new HornetQXAException(XAException.XAER_NOTA, msg); + throw new ActiveMQXAException(XAException.XAER_NOTA, msg); } else { if (theTx.getState() != Transaction.State.SUSPENDED) { - throw new HornetQXAException(XAException.XAER_PROTO, + throw new ActiveMQXAException(XAException.XAER_PROTO, "Cannot resume transaction, it is not suspended " + xid); } else @@ -1101,14 +1101,14 @@ public class ServerSessionImpl implements ServerSession, FailureListener { final String msg = "Cannot roll back, session is currently doing work in a transaction " + tx.getXid(); - throw new HornetQXAException(XAException.XAER_PROTO, msg); + throw new ActiveMQXAException(XAException.XAER_PROTO, msg); } else { Transaction theTx = resourceManager.removeTransaction(xid); if (isTrace) { - HornetQServerLogger.LOGGER.trace("xarollback into " + theTx); + ActiveMQServerLogger.LOGGER.trace("xarollback into " + theTx); } if (theTx == null) @@ -1116,20 +1116,20 @@ public class ServerSessionImpl implements ServerSession, FailureListener // checked heuristic committed transactions if (resourceManager.getHeuristicCommittedTransactions().contains(xid)) { - throw new HornetQXAException(XAException.XA_HEURCOM, + throw new ActiveMQXAException(XAException.XA_HEURCOM, "transaction has ben heuristically committed: " + xid); } // checked heuristic rolled back transactions else if (resourceManager.getHeuristicRolledbackTransactions().contains(xid)) { - throw new HornetQXAException(XAException.XA_HEURRB, + throw new ActiveMQXAException(XAException.XA_HEURRB, "transaction has ben heuristically rolled back: " + xid); } else { if (isTrace) { - HornetQServerLogger.LOGGER.trace("xarollback into " + theTx + ", xid=" + xid + " forcing a rollback regular"); + ActiveMQServerLogger.LOGGER.trace("xarollback into " + theTx + ", xid=" + xid + " forcing a rollback regular"); } try @@ -1141,10 +1141,10 @@ public class ServerSessionImpl implements ServerSession, FailureListener } catch (Exception e) { - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); } - throw new HornetQXAException(XAException.XAER_NOTA, "Cannot find xid in resource manager: " + xid); + throw new ActiveMQXAException(XAException.XAER_NOTA, "Cannot find xid in resource manager: " + xid); } } else @@ -1153,14 +1153,14 @@ public class ServerSessionImpl implements ServerSession, FailureListener { if (isTrace) { - HornetQServerLogger.LOGGER.trace("xarollback into " + theTx + " sending tx back as it was suspended"); + ActiveMQServerLogger.LOGGER.trace("xarollback into " + theTx + " sending tx back as it was suspended"); } // Put it back resourceManager.putTransaction(xid, tx); - throw new HornetQXAException(XAException.XAER_PROTO, + throw new ActiveMQXAException(XAException.XAER_PROTO, "Cannot rollback transaction, it is suspended " + xid); } else @@ -1175,7 +1175,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { if (tx != null) { - HornetQServerLogger.LOGGER.xidReplacedOnXStart(tx.getXid().toString(), xid.toString()); + ActiveMQServerLogger.LOGGER.xidReplacedOnXStart(tx.getXid().toString(), xid.toString()); try { @@ -1191,7 +1191,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener } catch (Exception e) { - HornetQServerLogger.LOGGER.debug("An exception happened while we tried to debug the previous tx, we can ignore this exception", e); + ActiveMQServerLogger.LOGGER.debug("An exception happened while we tried to debug the previous tx, we can ignore this exception", e); } } @@ -1199,7 +1199,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener if (isTrace) { - HornetQServerLogger.LOGGER.trace("xastart into tx= " + tx); + ActiveMQServerLogger.LOGGER.trace("xastart into tx= " + tx); } boolean added = resourceManager.putTransaction(xid, tx); @@ -1208,7 +1208,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { final String msg = "Cannot start, there is already a xid " + tx.getXid(); - throw new HornetQXAException(XAException.XAER_DUPID, msg); + throw new ActiveMQXAException(XAException.XAER_DUPID, msg); } } @@ -1218,7 +1218,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { final String msg = "Cannot start, session is already doing work in a transaction " + tx.getXid(); - throw new HornetQXAException(XAException.XAER_PROTO, msg); + throw new ActiveMQXAException(XAException.XAER_PROTO, msg); } else { @@ -1228,7 +1228,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener if (isTrace) { - HornetQServerLogger.LOGGER.trace("xastart into tx= " + tx); + ActiveMQServerLogger.LOGGER.trace("xastart into tx= " + tx); } boolean added = resourceManager.putTransaction(xid, tx); @@ -1237,7 +1237,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { final String msg = "Cannot start, there is already a xid " + tx.getXid(); - throw new HornetQXAException(XAException.XAER_DUPID, msg); + throw new ActiveMQXAException(XAException.XAER_DUPID, msg); } } } @@ -1247,14 +1247,14 @@ public class ServerSessionImpl implements ServerSession, FailureListener if (isTrace) { - HornetQServerLogger.LOGGER.trace("xasuspend on " + this.tx); + ActiveMQServerLogger.LOGGER.trace("xasuspend on " + this.tx); } if (tx == null) { final String msg = "Cannot suspend, session is not doing work in a transaction "; - throw new HornetQXAException(XAException.XAER_PROTO, msg); + throw new ActiveMQXAException(XAException.XAER_PROTO, msg); } else { @@ -1262,7 +1262,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { final String msg = "Cannot suspend, transaction is already suspended " + tx.getXid(); - throw new HornetQXAException(XAException.XAER_PROTO, msg); + throw new ActiveMQXAException(XAException.XAER_PROTO, msg); } else { @@ -1279,7 +1279,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { final String msg = "Cannot commit, session is currently doing work in a transaction " + tx.getXid(); - throw new HornetQXAException(XAException.XAER_PROTO, msg); + throw new ActiveMQXAException(XAException.XAER_PROTO, msg); } else { @@ -1287,25 +1287,25 @@ public class ServerSessionImpl implements ServerSession, FailureListener if (isTrace) { - HornetQServerLogger.LOGGER.trace("xaprepare into " + ", xid=" + xid + ", tx= " + tx); + ActiveMQServerLogger.LOGGER.trace("xaprepare into " + ", xid=" + xid + ", tx= " + tx); } if (theTx == null) { final String msg = "Cannot find xid in resource manager: " + xid; - throw new HornetQXAException(XAException.XAER_NOTA, msg); + throw new ActiveMQXAException(XAException.XAER_NOTA, msg); } else { if (theTx.getState() == Transaction.State.SUSPENDED) { - throw new HornetQXAException(XAException.XAER_PROTO, + throw new ActiveMQXAException(XAException.XAER_PROTO, "Cannot prepare transaction, it is suspended " + xid); } else if (theTx.getState() == Transaction.State.PREPARED) { - HornetQServerLogger.LOGGER.info("ignoring prepare on xid as already called :" + xid); + ActiveMQServerLogger.LOGGER.info("ignoring prepare on xid as already called :" + xid); } else { @@ -1356,12 +1356,12 @@ public class ServerSessionImpl implements ServerSession, FailureListener { if (!context.waitCompletion(10000)) { - HornetQServerLogger.LOGGER.errorCompletingContext(new Exception("warning")); + ActiveMQServerLogger.LOGGER.errorCompletingContext(new Exception("warning")); } } catch (Exception e) { - HornetQServerLogger.LOGGER.warn(e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); } } @@ -1382,7 +1382,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener } catch (Exception e) { - HornetQServerLogger.LOGGER.errorClosingSession(e); + ActiveMQServerLogger.LOGGER.errorClosingSession(e); } } }); @@ -1398,7 +1398,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener } else { - HornetQServerLogger.LOGGER.cannotFindConsumer(consumerID); + ActiveMQServerLogger.LOGGER.cannotFindConsumer(consumerID); } } @@ -1408,7 +1408,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener if (consumer == null) { - HornetQServerLogger.LOGGER.debug("There is no consumer with id " + consumerID); + ActiveMQServerLogger.LOGGER.debug("There is no consumer with id " + consumerID); return; } @@ -1433,14 +1433,14 @@ public class ServerSessionImpl implements ServerSession, FailureListener LargeServerMessage largeMsg = storageManager.createLargeMessage(id, message); - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("sendLarge::" + largeMsg); + ActiveMQServerLogger.LOGGER.trace("sendLarge::" + largeMsg); } if (currentLargeMessage != null) { - HornetQServerLogger.LOGGER.replacingIncompleteLargeMessage(currentLargeMessage.getMessageID()); + ActiveMQServerLogger.LOGGER.replacingIncompleteLargeMessage(currentLargeMessage.getMessageID()); } currentLargeMessage = largeMsg; @@ -1482,13 +1482,13 @@ public class ServerSessionImpl implements ServerSession, FailureListener if (isTrace) { - HornetQServerLogger.LOGGER.trace("send(message=" + message + ", direct=" + direct + ") being called"); + ActiveMQServerLogger.LOGGER.trace("send(message=" + message + ", direct=" + direct + ") being called"); } if (message.getAddress() == null) { // This could happen with some tests that are ignoring messages - throw HornetQMessageBundle.BUNDLE.noAddress(); + throw ActiveMQMessageBundle.BUNDLE.noAddress(); } if (message.getAddress().equals(managementAddress)) @@ -1510,7 +1510,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { if (currentLargeMessage == null) { - throw HornetQMessageBundle.BUNDLE.largeMessageNotInitialised(); + throw ActiveMQMessageBundle.BUNDLE.largeMessageNotInitialised(); } // Immediately release the credits for the continuations- these don't contribute to the in-memory size @@ -1686,15 +1686,15 @@ public class ServerSessionImpl implements ServerSession, FailureListener { try { - HornetQServerLogger.LOGGER.clientConnectionFailed(name); + ActiveMQServerLogger.LOGGER.clientConnectionFailed(name); close(true); - HornetQServerLogger.LOGGER.clientConnectionFailedClearingSession(name); + ActiveMQServerLogger.LOGGER.clientConnectionFailedClearingSession(name); } catch (Throwable t) { - HornetQServerLogger.LOGGER.errorClosingConnection(this); + ActiveMQServerLogger.LOGGER.errorClosingConnection(this); } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServiceRegistry.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServiceRegistry.java index d85f78e76c..ba15f918d2 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServiceRegistry.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/ServiceRegistry.java @@ -35,7 +35,7 @@ public class ServiceRegistry private ScheduledExecutorService scheduledExecutorService; - /* We are using a List rather than HashMap here as HornetQ allows multiple instances of the same class to be added + /* We are using a List rather than HashMap here as ActiveMQ allows multiple instances of the same class to be added * to the interceptor list */ private Map incomingInterceptors; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedNothingBackupActivation.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedNothingBackupActivation.java index 682d183316..766c624f9b 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedNothingBackupActivation.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedNothingBackupActivation.java @@ -25,9 +25,9 @@ import org.apache.activemq.core.protocol.core.Channel; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationLiveIsStoppingMessage; import org.apache.activemq.core.replication.ReplicationEndpoint; import org.apache.activemq.core.server.ActivationParams; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.LiveNodeLocator; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.QueueFactory; @@ -55,11 +55,11 @@ public final class SharedNothingBackupActivation extends Activation //this is the endpoint where we replicate too private ReplicationEndpoint replicationEndpoint; - private final HornetQServerImpl hornetQServer; + private final ActiveMQServerImpl activeMQServer; private SharedNothingBackupQuorum backupQuorum; private final boolean attemptFailBack; private final Map activationParams; - private final HornetQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO; + private final ActiveMQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO; private String nodeID; ClusterControl clusterControl; private boolean closed; @@ -67,13 +67,13 @@ public final class SharedNothingBackupActivation extends Activation private final ReusableLatch backupSyncLatch = new ReusableLatch(0); - public SharedNothingBackupActivation(HornetQServerImpl hornetQServer, + public SharedNothingBackupActivation(ActiveMQServerImpl activeMQServer, boolean attemptFailBack, Map activationParams, - HornetQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO, + ActiveMQServerImpl.ShutdownOnCriticalErrorListener shutdownOnCriticalIO, ReplicaPolicy replicaPolicy) { - this.hornetQServer = hornetQServer; + this.activeMQServer = activeMQServer; this.attemptFailBack = attemptFailBack; this.activationParams = activationParams; this.shutdownOnCriticalIO = shutdownOnCriticalIO; @@ -84,23 +84,23 @@ public final class SharedNothingBackupActivation extends Activation public void init() throws Exception { assert replicationEndpoint == null; - hornetQServer.resetNodeManager(); + activeMQServer.resetNodeManager(); backupUpToDate = false; - replicationEndpoint = new ReplicationEndpoint(hornetQServer, shutdownOnCriticalIO, attemptFailBack, this); + replicationEndpoint = new ReplicationEndpoint(activeMQServer, shutdownOnCriticalIO, attemptFailBack, this); } public void run() { try { - synchronized (hornetQServer) + synchronized (activeMQServer) { - hornetQServer.setState(HornetQServerImpl.SERVER_STATE.STARTED); + activeMQServer.setState(ActiveMQServerImpl.SERVER_STATE.STARTED); } // move all data away: - hornetQServer.getNodeManager().stop(); - hornetQServer.moveServerData(); - hornetQServer.getNodeManager().start(); + activeMQServer.getNodeManager().stop(); + activeMQServer.moveServerData(); + activeMQServer.getNodeManager().start(); synchronized (this) { if (closed) @@ -109,15 +109,15 @@ public final class SharedNothingBackupActivation extends Activation boolean scalingDown = replicaPolicy.getScaleDownPolicy() != null && replicaPolicy.getScaleDownPolicy().isEnabled(); - if (!hornetQServer.initialisePart1(scalingDown)) + if (!activeMQServer.initialisePart1(scalingDown)) return; synchronized (this) { if (closed) return; - backupQuorum = new SharedNothingBackupQuorum(hornetQServer.getStorageManager(), hornetQServer.getNodeManager(), hornetQServer.getScheduledPool()); - hornetQServer.getClusterManager().getQuorumManager().registerQuorum(backupQuorum); + backupQuorum = new SharedNothingBackupQuorum(activeMQServer.getStorageManager(), activeMQServer.getNodeManager(), activeMQServer.getScheduledPool()); + activeMQServer.getClusterManager().getQuorumManager().registerQuorum(backupQuorum); } //use a Node Locator to connect to the cluster @@ -130,26 +130,26 @@ public final class SharedNothingBackupActivation extends Activation else { nodeLocator = replicaPolicy.getGroupName() == null ? - new AnyLiveNodeLocatorForReplication(backupQuorum, hornetQServer) : + new AnyLiveNodeLocatorForReplication(backupQuorum, activeMQServer) : new NamedLiveNodeLocatorForReplication(replicaPolicy.getGroupName(), backupQuorum); } - ClusterController clusterController = hornetQServer.getClusterManager().getClusterController(); + ClusterController clusterController = activeMQServer.getClusterManager().getClusterController(); clusterController.addClusterTopologyListenerForReplication(nodeLocator); //todo do we actually need to wait? clusterController.awaitConnectionToReplicationCluster(); - clusterController.addIncomingInterceptorForReplication(new ReplicationError(hornetQServer, nodeLocator)); + clusterController.addIncomingInterceptorForReplication(new ReplicationError(activeMQServer, nodeLocator)); // nodeManager.startBackup(); - hornetQServer.getBackupManager().start(); + activeMQServer.getBackupManager().start(); replicationEndpoint.setBackupQuorum(backupQuorum); - replicationEndpoint.setExecutor(hornetQServer.getExecutorFactory().getExecutor()); + replicationEndpoint.setExecutor(activeMQServer.getExecutorFactory().getExecutor()); EndpointConnector endpointConnector = new EndpointConnector(); - HornetQServerLogger.LOGGER.backupServerStarted(hornetQServer.getVersion().getFullVersion(), hornetQServer.getNodeManager().getNodeId()); - hornetQServer.setState(HornetQServerImpl.SERVER_STATE.STARTED); + ActiveMQServerLogger.LOGGER.backupServerStarted(activeMQServer.getVersion().getFullVersion(), activeMQServer.getNodeManager().getNodeId()); + activeMQServer.setState(ActiveMQServerImpl.SERVER_STATE.STARTED); SharedNothingBackupQuorum.BACKUP_ACTIVATION signal; do @@ -168,7 +168,7 @@ public final class SharedNothingBackupActivation extends Activation //this shouldn't happen if (nodeID == null) throw new RuntimeException("Could not establish the connection"); - hornetQServer.getNodeManager().setNodeID(nodeID); + activeMQServer.getNodeManager().setNodeID(nodeID); } try @@ -198,7 +198,7 @@ public final class SharedNothingBackupActivation extends Activation continue; } - hornetQServer.getThreadPool().execute(endpointConnector); + activeMQServer.getThreadPool().execute(endpointConnector); /** * Wait for a signal from the the quorum manager, at this point if replication has been successful we can * fail over or if there is an error trying to replicate (such as already replicating) we try the @@ -209,9 +209,9 @@ public final class SharedNothingBackupActivation extends Activation * replicationEndpoint will be holding lots of open files. Make sure they get * closed/sync'ed. */ - HornetQServerImpl.stopComponent(replicationEndpoint); + ActiveMQServerImpl.stopComponent(replicationEndpoint); // time to give up - if (!hornetQServer.isStarted() || signal == STOP) + if (!activeMQServer.isStarted() || signal == STOP) return; // time to fail over else if (signal == FAIL_OVER) @@ -226,11 +226,11 @@ public final class SharedNothingBackupActivation extends Activation { try { - hornetQServer.stop(); + activeMQServer.stop(); } catch (Exception e) { - HornetQServerLogger.LOGGER.errorRestartingBackupServer(e, hornetQServer); + ActiveMQServerLogger.LOGGER.errorRestartingBackupServer(e, activeMQServer); } } }); @@ -249,39 +249,39 @@ public final class SharedNothingBackupActivation extends Activation } while (signal == SharedNothingBackupQuorum.BACKUP_ACTIVATION.ALREADY_REPLICATING); - hornetQServer.getClusterManager().getQuorumManager().unRegisterQuorum(backupQuorum); + activeMQServer.getClusterManager().getQuorumManager().unRegisterQuorum(backupQuorum); if (!isRemoteBackupUpToDate()) { - throw HornetQMessageBundle.BUNDLE.backupServerNotInSync(); + throw ActiveMQMessageBundle.BUNDLE.backupServerNotInSync(); } replicaPolicy.getReplicatedPolicy().setReplicaPolicy(replicaPolicy); - hornetQServer.setHAPolicy(replicaPolicy.getReplicatedPolicy()); - synchronized (hornetQServer) + activeMQServer.setHAPolicy(replicaPolicy.getReplicatedPolicy()); + synchronized (activeMQServer) { - if (!hornetQServer.isStarted()) + if (!activeMQServer.isStarted()) return; - HornetQServerLogger.LOGGER.becomingLive(hornetQServer); - hornetQServer.getNodeManager().stopBackup(); - hornetQServer.getStorageManager().start(); - hornetQServer.getBackupManager().activated(); + ActiveMQServerLogger.LOGGER.becomingLive(activeMQServer); + activeMQServer.getNodeManager().stopBackup(); + activeMQServer.getStorageManager().start(); + activeMQServer.getBackupManager().activated(); if (scalingDown) { - hornetQServer.initialisePart2(true); + activeMQServer.initialisePart2(true); } else { - hornetQServer.setActivation(new SharedNothingLiveActivation(hornetQServer, replicaPolicy.getReplicatedPolicy())); - hornetQServer.initialisePart2(false); + activeMQServer.setActivation(new SharedNothingLiveActivation(activeMQServer, replicaPolicy.getReplicatedPolicy())); + activeMQServer.initialisePart2(false); - if (hornetQServer.getIdentity() != null) + if (activeMQServer.getIdentity() != null) { - HornetQServerLogger.LOGGER.serverIsLive(hornetQServer.getIdentity()); + ActiveMQServerLogger.LOGGER.serverIsLive(activeMQServer.getIdentity()); } else { - HornetQServerLogger.LOGGER.serverIsLive(); + ActiveMQServerLogger.LOGGER.serverIsLive(); } } @@ -289,10 +289,10 @@ public final class SharedNothingBackupActivation extends Activation } catch (Exception e) { - if ((e instanceof InterruptedException || e instanceof IllegalStateException) && !hornetQServer.isStarted()) + if ((e instanceof InterruptedException || e instanceof IllegalStateException) && !activeMQServer.isStarted()) // do not log these errors if the server is being stopped. return; - HornetQServerLogger.LOGGER.initializationError(e); + ActiveMQServerLogger.LOGGER.initializationError(e); e.printStackTrace(); } } @@ -307,12 +307,12 @@ public final class SharedNothingBackupActivation extends Activation closed = true; } //we have to check as the server policy may have changed - if (hornetQServer.getHAPolicy().isBackup()) + if (activeMQServer.getHAPolicy().isBackup()) { // To avoid a NPE cause by the stop - NodeManager nodeManagerInUse = hornetQServer.getNodeManager(); + NodeManager nodeManagerInUse = activeMQServer.getNodeManager(); - hornetQServer.interrupBackupThread(nodeManagerInUse); + activeMQServer.interrupBackupThread(nodeManagerInUse); if (nodeManagerInUse != null) { @@ -331,7 +331,7 @@ public final class SharedNothingBackupActivation extends Activation } @Override - public JournalLoader createJournalLoader(PostOffice postOffice, PagingManager pagingManager, StorageManager storageManager, QueueFactory queueFactory, NodeManager nodeManager, ManagementService managementService, GroupingHandler groupingHandler, Configuration configuration, HornetQServer parentServer) throws ActiveMQException + public JournalLoader createJournalLoader(PostOffice postOffice, PagingManager pagingManager, StorageManager storageManager, QueueFactory queueFactory, NodeManager nodeManager, ManagementService managementService, GroupingHandler groupingHandler, Configuration configuration, ActiveMQServer parentServer) throws ActiveMQException { if (replicaPolicy.getScaleDownPolicy() != null) { @@ -344,8 +344,8 @@ public final class SharedNothingBackupActivation extends Activation groupingHandler, configuration, parentServer, - ScaleDownPolicy.getScaleDownConnector(replicaPolicy.getScaleDownPolicy(), hornetQServer), - hornetQServer.getClusterManager().getClusterController()); + ScaleDownPolicy.getScaleDownConnector(replicaPolicy.getScaleDownPolicy(), activeMQServer), + activeMQServer.getClusterManager().getClusterController()); } else { @@ -364,7 +364,7 @@ public final class SharedNothingBackupActivation extends Activation @Override public void haStarted() { - hornetQServer.getClusterManager().getClusterController().setReplicatedClusterName(replicaPolicy.getClusterName()); + activeMQServer.getClusterManager().getClusterController().setReplicatedClusterName(replicaPolicy.getClusterName()); } @@ -419,7 +419,7 @@ public final class SharedNothingBackupActivation extends Activation public void setRemoteBackupUpToDate() { - hornetQServer.getBackupManager().announceBackup(); + activeMQServer.getBackupManager().announceBackup(); backupUpToDate = true; backupSyncLatch.countDown(); } @@ -429,9 +429,9 @@ public final class SharedNothingBackupActivation extends Activation */ public void remoteFailOver(ReplicationLiveIsStoppingMessage.LiveStopping finalMessage) throws ActiveMQException { - HornetQServerLogger.LOGGER.trace("Remote fail-over, got message=" + finalMessage + ", backupUpToDate=" + + ActiveMQServerLogger.LOGGER.trace("Remote fail-over, got message=" + finalMessage + ", backupUpToDate=" + backupUpToDate); - if (!hornetQServer.getHAPolicy().isBackup() || hornetQServer.getHAPolicy().isSharedStore()) + if (!activeMQServer.getHAPolicy().isBackup() || activeMQServer.getHAPolicy().isSharedStore()) { throw new ActiveMQInternalErrorException(); } @@ -467,18 +467,18 @@ public final class SharedNothingBackupActivation extends Activation catch (Exception e) { //we shouldn't stop the server just mark the connector as tried and unavailable - HornetQServerLogger.LOGGER.replicationStartProblem(e); + ActiveMQServerLogger.LOGGER.replicationStartProblem(e); backupQuorum.causeExit(FAILURE_REPLICATING); } } private synchronized ReplicationEndpoint connectToReplicationEndpoint(final ClusterControl control) throws Exception { - if (!hornetQServer.isStarted()) + if (!activeMQServer.isStarted()) return null; - if (!hornetQServer.getHAPolicy().isBackup()) + if (!activeMQServer.getHAPolicy().isBackup()) { - throw HornetQMessageBundle.BUNDLE.serverNotBackupServer(); + throw ActiveMQMessageBundle.BUNDLE.serverNotBackupServer(); } Channel replicationChannel = control.createReplicationChannel(); @@ -487,7 +487,7 @@ public final class SharedNothingBackupActivation extends Activation if (replicationEndpoint.getChannel() != null) { - throw HornetQMessageBundle.BUNDLE.alreadyHaveReplicationServer(); + throw ActiveMQMessageBundle.BUNDLE.alreadyHaveReplicationServer(); } replicationEndpoint.setChannel(replicationChannel); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedNothingLiveActivation.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedNothingLiveActivation.java index 7bad256673..7788a1b613 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedNothingLiveActivation.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedNothingLiveActivation.java @@ -20,7 +20,7 @@ import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClusterTopologyListener; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.TopologyMember; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.client.impl.ServerLocatorInternal; @@ -38,8 +38,8 @@ import org.apache.activemq.core.remoting.CloseListener; import org.apache.activemq.core.remoting.FailureListener; import org.apache.activemq.core.remoting.server.RemotingService; import org.apache.activemq.core.replication.ReplicationManager; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.cluster.ClusterConnection; import org.apache.activemq.core.server.cluster.ha.ReplicatedPolicy; @@ -55,16 +55,16 @@ public class SharedNothingLiveActivation extends LiveActivation //this is how we act when we initially start as a live private ReplicatedPolicy replicatedPolicy; - private HornetQServerImpl hornetQServer; + private ActiveMQServerImpl activeMQServer; private ReplicationManager replicationManager; private final Object replicationLock = new Object(); - public SharedNothingLiveActivation(HornetQServerImpl hornetQServer, + public SharedNothingLiveActivation(ActiveMQServerImpl activeMQServer, ReplicatedPolicy replicatedPolicy) { - this.hornetQServer = hornetQServer; + this.activeMQServer = activeMQServer; this.replicatedPolicy = replicatedPolicy; } @@ -91,26 +91,26 @@ public class SharedNothingLiveActivation extends LiveActivation { //set for when we failback replicatedPolicy.getReplicaPolicy().setReplicatedPolicy(replicatedPolicy); - hornetQServer.setHAPolicy(replicatedPolicy.getReplicaPolicy()); + activeMQServer.setHAPolicy(replicatedPolicy.getReplicaPolicy()); return; } - hornetQServer.initialisePart1(false); + activeMQServer.initialisePart1(false); - hornetQServer.initialisePart2(false); + activeMQServer.initialisePart2(false); - if (hornetQServer.getIdentity() != null) + if (activeMQServer.getIdentity() != null) { - HornetQServerLogger.LOGGER.serverIsLive(hornetQServer.getIdentity()); + ActiveMQServerLogger.LOGGER.serverIsLive(activeMQServer.getIdentity()); } else { - HornetQServerLogger.LOGGER.serverIsLive(); + ActiveMQServerLogger.LOGGER.serverIsLive(); } } catch (Exception e) { - HornetQServerLogger.LOGGER.initializationError(e); + ActiveMQServerLogger.LOGGER.initializationError(e); } } @@ -152,7 +152,7 @@ public class SharedNothingLiveActivation extends LiveActivation throw new ActiveMQAlreadyReplicatingException(); } - if (!hornetQServer.isStarted()) + if (!activeMQServer.isStarted()) { throw new ActiveMQIllegalStateException(); } @@ -167,7 +167,7 @@ public class SharedNothingLiveActivation extends LiveActivation ReplicationFailureListener listener = new ReplicationFailureListener(); rc.addCloseListener(listener); rc.addFailureListener(listener); - replicationManager = new ReplicationManager(rc, hornetQServer.getExecutorFactory()); + replicationManager = new ReplicationManager(rc, activeMQServer.getExecutorFactory()); replicationManager.start(); Thread t = new Thread(new Runnable() { @@ -175,17 +175,17 @@ public class SharedNothingLiveActivation extends LiveActivation { try { - hornetQServer.getStorageManager().startReplication(replicationManager, hornetQServer.getPagingManager(), hornetQServer.getNodeID().toString(), + activeMQServer.getStorageManager().startReplication(replicationManager, activeMQServer.getPagingManager(), activeMQServer.getNodeID().toString(), isFailBackRequest && replicatedPolicy.isAllowAutoFailBack()); - clusterConnection.nodeAnnounced(System.currentTimeMillis(), hornetQServer.getNodeID().toString(), replicatedPolicy.getGroupName(), replicatedPolicy.getScaleDownGroupName(), pair, true); + clusterConnection.nodeAnnounced(System.currentTimeMillis(), activeMQServer.getNodeID().toString(), replicatedPolicy.getGroupName(), replicatedPolicy.getScaleDownGroupName(), pair, true); //todo, check why this was set here //backupUpToDate = false; if (isFailBackRequest && replicatedPolicy.isAllowAutoFailBack()) { - BackupTopologyListener listener1 = new BackupTopologyListener(hornetQServer.getNodeID().toString()); + BackupTopologyListener listener1 = new BackupTopologyListener(activeMQServer.getNodeID().toString()); clusterConnection.addClusterTopologyListener(listener1); if (listener1.waitForBackup()) { @@ -198,28 +198,28 @@ public class SharedNothingLiveActivation extends LiveActivation // } //if we have to many backups kept or arent configured to restart just stop, otherwise restart as a backup - if (!replicatedPolicy.getReplicaPolicy().isRestartBackup() && hornetQServer.countNumberOfCopiedJournals() >= replicatedPolicy.getReplicaPolicy().getMaxSavedReplicatedJournalsSize() && replicatedPolicy.getReplicaPolicy().getMaxSavedReplicatedJournalsSize() >= 0) + if (!replicatedPolicy.getReplicaPolicy().isRestartBackup() && activeMQServer.countNumberOfCopiedJournals() >= replicatedPolicy.getReplicaPolicy().getMaxSavedReplicatedJournalsSize() && replicatedPolicy.getReplicaPolicy().getMaxSavedReplicatedJournalsSize() >= 0) { - hornetQServer.stop(true); - HornetQServerLogger.LOGGER.stopReplicatedBackupAfterFailback(); + activeMQServer.stop(true); + ActiveMQServerLogger.LOGGER.stopReplicatedBackupAfterFailback(); } else { - hornetQServer.stop(true); - HornetQServerLogger.LOGGER.restartingReplicatedBackupAfterFailback(); - hornetQServer.setHAPolicy(replicatedPolicy.getReplicaPolicy()); - hornetQServer.start(); + activeMQServer.stop(true); + ActiveMQServerLogger.LOGGER.restartingReplicatedBackupAfterFailback(); + activeMQServer.setHAPolicy(replicatedPolicy.getReplicaPolicy()); + activeMQServer.start(); } } else { - HornetQServerLogger.LOGGER.failbackMissedBackupAnnouncement(); + ActiveMQServerLogger.LOGGER.failbackMissedBackupAnnouncement(); } } } catch (Exception e) { - if (hornetQServer.getState() == HornetQServerImpl.SERVER_STATE.STARTED) + if (activeMQServer.getState() == ActiveMQServerImpl.SERVER_STATE.STARTED) { /* * The reasoning here is that the exception was either caused by (1) the @@ -227,15 +227,15 @@ public class SharedNothingLiveActivation extends LiveActivation * can swallow the exception and ignore the replication request. If (2) the live * will crash shortly. */ - HornetQServerLogger.LOGGER.errorStartingReplication(e); + ActiveMQServerLogger.LOGGER.errorStartingReplication(e); } try { - HornetQServerImpl.stopComponent(replicationManager); + ActiveMQServerImpl.stopComponent(replicationManager); } - catch (Exception hqe) + catch (Exception amqe) { - HornetQServerLogger.LOGGER.errorStoppingReplication(hqe); + ActiveMQServerLogger.LOGGER.errorStoppingReplication(amqe); } finally { @@ -270,7 +270,7 @@ public class SharedNothingLiveActivation extends LiveActivation @Override public void connectionClosed() { - hornetQServer.getThreadPool().execute(new Runnable() + activeMQServer.getThreadPool().execute(new Runnable() { public void run() { @@ -278,7 +278,7 @@ public class SharedNothingLiveActivation extends LiveActivation { if (replicationManager != null) { - hornetQServer.getStorageManager().stopReplication(); + activeMQServer.getStorageManager().stopReplication(); replicationManager = null; } } @@ -306,12 +306,12 @@ public class SharedNothingLiveActivation extends LiveActivation */ private boolean isNodeIdUsed() throws Exception { - if (hornetQServer.getConfiguration().getClusterConfigurations().isEmpty()) + if (activeMQServer.getConfiguration().getClusterConfigurations().isEmpty()) return false; SimpleString nodeId0; try { - nodeId0 = hornetQServer.getNodeManager().readNodeId(); + nodeId0 = activeMQServer.getNodeManager().readNodeId(); } catch (ActiveMQIllegalStateException e) { @@ -320,7 +320,7 @@ public class SharedNothingLiveActivation extends LiveActivation ServerLocatorInternal locator; - ClusterConnectionConfiguration config = ConfigurationUtils.getReplicationClusterConfiguration(hornetQServer.getConfiguration(), replicatedPolicy.getClusterName()); + ClusterConnectionConfiguration config = ConfigurationUtils.getReplicationClusterConfiguration(activeMQServer.getConfiguration(), replicatedPolicy.getClusterName()); locator = getLocator(config); @@ -360,7 +360,7 @@ public class SharedNothingLiveActivation extends LiveActivation replicationManager = null; // To avoid a NPE cause by the stop - NodeManager nodeManagerInUse = hornetQServer.getNodeManager(); + NodeManager nodeManagerInUse = activeMQServer.getNodeManager(); if (nodeManagerInUse != null) { @@ -386,7 +386,7 @@ public class SharedNothingLiveActivation extends LiveActivation localReplicationManager.sendLiveIsStopping(ReplicationLiveIsStoppingMessage.LiveStopping.STOP_CALLED); // Schedule for 10 seconds // this pool gets a 'hard' shutdown, no need to manage the Future of this Runnable. - hornetQServer.getScheduledPool().schedule(new Runnable() + activeMQServer.getScheduledPool().schedule(new Runnable() { @Override public void run() @@ -410,20 +410,20 @@ public class SharedNothingLiveActivation extends LiveActivation ServerLocatorInternal locator; if (config.getDiscoveryGroupName() != null) { - DiscoveryGroupConfiguration dg = hornetQServer.getConfiguration().getDiscoveryGroupConfigurations().get(config.getDiscoveryGroupName()); + DiscoveryGroupConfiguration dg = activeMQServer.getConfiguration().getDiscoveryGroupConfigurations().get(config.getDiscoveryGroupName()); if (dg == null) { - throw HornetQMessageBundle.BUNDLE.noDiscoveryGroupFound(dg); + throw ActiveMQMessageBundle.BUNDLE.noDiscoveryGroupFound(dg); } - locator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithHA(dg); + locator = (ServerLocatorInternal) ActiveMQClient.createServerLocatorWithHA(dg); } else { TransportConfiguration[] tcConfigs = config.getStaticConnectors() != null ? connectorNameListToArray(config.getStaticConnectors()) : null; - locator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithHA(tcConfigs); + locator = (ServerLocatorInternal) ActiveMQClient.createServerLocatorWithHA(tcConfigs); } return locator; } @@ -469,11 +469,11 @@ public class SharedNothingLiveActivation extends LiveActivation int count = 0; for (String connectorName : connectorNames) { - TransportConfiguration connector = hornetQServer.getConfiguration().getConnectorConfigurations().get(connectorName); + TransportConfiguration connector = activeMQServer.getConfiguration().getConnectorConfigurations().get(connectorName); if (connector == null) { - HornetQServerLogger.LOGGER.bridgeNoConnector(connectorName); + ActiveMQServerLogger.LOGGER.bridgeNoConnector(connectorName); return null; } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedStoreBackupActivation.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedStoreBackupActivation.java index 8c902cd3a7..650c59bc14 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedStoreBackupActivation.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedStoreBackupActivation.java @@ -17,8 +17,8 @@ import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.paging.PagingManager; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.PostOffice; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.QueueFactory; import org.apache.activemq.core.server.cluster.ha.ScaleDownPolicy; @@ -34,15 +34,15 @@ public final class SharedStoreBackupActivation extends Activation //this is how we act as a backup private SharedStoreSlavePolicy sharedStoreSlavePolicy; - private HornetQServerImpl hornetQServer; + private ActiveMQServerImpl activeMQServer; private final Object failbackCheckerGuard = new Object(); private boolean cancelFailBackChecker; - public SharedStoreBackupActivation(HornetQServerImpl server, SharedStoreSlavePolicy sharedStoreSlavePolicy) + public SharedStoreBackupActivation(ActiveMQServerImpl server, SharedStoreSlavePolicy sharedStoreSlavePolicy) { - this.hornetQServer = server; + this.activeMQServer = server; this.sharedStoreSlavePolicy = sharedStoreSlavePolicy; synchronized (failbackCheckerGuard) { @@ -54,38 +54,38 @@ public final class SharedStoreBackupActivation extends Activation { try { - hornetQServer.getNodeManager().startBackup(); + activeMQServer.getNodeManager().startBackup(); boolean scalingDown = sharedStoreSlavePolicy.getScaleDownPolicy() != null; - if (!hornetQServer.initialisePart1(scalingDown)) + if (!activeMQServer.initialisePart1(scalingDown)) return; - hornetQServer.getBackupManager().start(); + activeMQServer.getBackupManager().start(); - hornetQServer.setState(HornetQServerImpl.SERVER_STATE.STARTED); + activeMQServer.setState(ActiveMQServerImpl.SERVER_STATE.STARTED); - HornetQServerLogger.LOGGER.backupServerStarted(hornetQServer.getVersion().getFullVersion(), hornetQServer.getNodeManager().getNodeId()); + ActiveMQServerLogger.LOGGER.backupServerStarted(activeMQServer.getVersion().getFullVersion(), activeMQServer.getNodeManager().getNodeId()); - hornetQServer.getNodeManager().awaitLiveNode(); + activeMQServer.getNodeManager().awaitLiveNode(); sharedStoreSlavePolicy.getSharedStoreMasterPolicy().setSharedStoreSlavePolicy(sharedStoreSlavePolicy); - hornetQServer.setHAPolicy(sharedStoreSlavePolicy.getSharedStoreMasterPolicy()); + activeMQServer.setHAPolicy(sharedStoreSlavePolicy.getSharedStoreMasterPolicy()); - //hornetQServer.configuration.getHAPolicy().setPolicyType(HAPolicy.POLICY_TYPE.SHARED_STORE); + //activeMQServer.configuration.getHAPolicy().setPolicyType(HAPolicy.POLICY_TYPE.SHARED_STORE); - hornetQServer.getBackupManager().activated(); - if (hornetQServer.getState() != HornetQServerImpl.SERVER_STATE.STARTED) + activeMQServer.getBackupManager().activated(); + if (activeMQServer.getState() != ActiveMQServerImpl.SERVER_STATE.STARTED) { return; } - hornetQServer.initialisePart2(scalingDown); + activeMQServer.initialisePart2(scalingDown); if (scalingDown) { - HornetQServerLogger.LOGGER.backupServerScaledDown(); + ActiveMQServerLogger.LOGGER.backupServerScaledDown(); Thread t = new Thread(new Runnable() { @Override @@ -93,16 +93,16 @@ public final class SharedStoreBackupActivation extends Activation { try { - hornetQServer.stop(); + activeMQServer.stop(); //we are shared store but if we were started by a parent server then we shouldn't restart if (sharedStoreSlavePolicy.isRestartBackup()) { - hornetQServer.start(); + activeMQServer.start(); } } catch (Exception e) { - HornetQServerLogger.LOGGER.serverRestartWarning(); + ActiveMQServerLogger.LOGGER.serverRestartWarning(); } } }); @@ -111,9 +111,9 @@ public final class SharedStoreBackupActivation extends Activation } else { - HornetQServerLogger.LOGGER.backupServerIsLive(); + ActiveMQServerLogger.LOGGER.backupServerIsLive(); - hornetQServer.getNodeManager().releaseBackup(); + activeMQServer.getNodeManager().releaseBackup(); } if (sharedStoreSlavePolicy.isAllowAutoFailBack()) { @@ -132,12 +132,12 @@ public final class SharedStoreBackupActivation extends Activation { if (!(e.getCause() instanceof InterruptedException)) { - HornetQServerLogger.LOGGER.initializationError(e); + ActiveMQServerLogger.LOGGER.initializationError(e); } } catch (Throwable e) { - HornetQServerLogger.LOGGER.initializationError(e); + ActiveMQServerLogger.LOGGER.initializationError(e); } } @@ -151,13 +151,13 @@ public final class SharedStoreBackupActivation extends Activation } } // To avoid a NPE cause by the stop - NodeManager nodeManagerInUse = hornetQServer.getNodeManager(); + NodeManager nodeManagerInUse = activeMQServer.getNodeManager(); //we need to check as the servers policy may have changed - if (hornetQServer.getHAPolicy().isBackup()) + if (activeMQServer.getHAPolicy().isBackup()) { - hornetQServer.interrupBackupThread(nodeManagerInUse); + activeMQServer.interrupBackupThread(nodeManagerInUse); if (nodeManagerInUse != null) @@ -186,7 +186,7 @@ public final class SharedStoreBackupActivation extends Activation } @Override - public JournalLoader createJournalLoader(PostOffice postOffice, PagingManager pagingManager, StorageManager storageManager, QueueFactory queueFactory, NodeManager nodeManager, ManagementService managementService, GroupingHandler groupingHandler, Configuration configuration, HornetQServer parentServer) throws ActiveMQException + public JournalLoader createJournalLoader(PostOffice postOffice, PagingManager pagingManager, StorageManager storageManager, QueueFactory queueFactory, NodeManager nodeManager, ManagementService managementService, GroupingHandler groupingHandler, Configuration configuration, ActiveMQServer parentServer) throws ActiveMQException { if (sharedStoreSlavePolicy.getScaleDownPolicy() != null) { @@ -199,8 +199,8 @@ public final class SharedStoreBackupActivation extends Activation groupingHandler, configuration, parentServer, - ScaleDownPolicy.getScaleDownConnector(sharedStoreSlavePolicy.getScaleDownPolicy(), hornetQServer), - hornetQServer.getClusterManager().getClusterController()); + ScaleDownPolicy.getScaleDownConnector(sharedStoreSlavePolicy.getScaleDownPolicy(), activeMQServer), + activeMQServer.getClusterManager().getClusterController()); } else { @@ -221,7 +221,7 @@ public final class SharedStoreBackupActivation extends Activation */ private void startFailbackChecker() { - hornetQServer.getScheduledPool().scheduleAtFixedRate(new FailbackChecker(), 1000L, 1000L, TimeUnit.MILLISECONDS); + activeMQServer.getScheduledPool().scheduleAtFixedRate(new FailbackChecker(), 1000L, 1000L, TimeUnit.MILLISECONDS); } private class FailbackChecker implements Runnable { @@ -231,9 +231,9 @@ public final class SharedStoreBackupActivation extends Activation { try { - if (!restarting && hornetQServer.getNodeManager().isAwaitingFailback()) + if (!restarting && activeMQServer.getNodeManager().isAwaitingFailback()) { - HornetQServerLogger.LOGGER.awaitFailBack(); + ActiveMQServerLogger.LOGGER.awaitFailBack(); restarting = true; Thread t = new Thread(new Runnable() { @@ -241,9 +241,9 @@ public final class SharedStoreBackupActivation extends Activation { try { - HornetQServerLogger.LOGGER.debug(hornetQServer + "::Stopping live node in favor of failback"); + ActiveMQServerLogger.LOGGER.debug(activeMQServer + "::Stopping live node in favor of failback"); - hornetQServer.stop(true, false, true); + activeMQServer.stop(true, false, true); // We need to wait some time before we start the backup again // otherwise we may eventually start before the live had a chance to get it Thread.sleep(sharedStoreSlavePolicy.getFailbackDelay()); @@ -252,15 +252,15 @@ public final class SharedStoreBackupActivation extends Activation if (cancelFailBackChecker || !sharedStoreSlavePolicy.isRestartBackup()) return; - hornetQServer.setHAPolicy(sharedStoreSlavePolicy); - HornetQServerLogger.LOGGER.debug(hornetQServer + + activeMQServer.setHAPolicy(sharedStoreSlavePolicy); + ActiveMQServerLogger.LOGGER.debug(activeMQServer + "::Starting backup node now after failback"); - hornetQServer.start(); + activeMQServer.start(); } } catch (Exception e) { - HornetQServerLogger.LOGGER.serverRestartWarning(); + ActiveMQServerLogger.LOGGER.serverRestartWarning(); } } }); @@ -269,7 +269,7 @@ public final class SharedStoreBackupActivation extends Activation } catch (Exception e) { - HornetQServerLogger.LOGGER.serverRestartWarning(e); + ActiveMQServerLogger.LOGGER.serverRestartWarning(e); } } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedStoreLiveActivation.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedStoreLiveActivation.java index 85305cd809..19ef8dc3eb 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedStoreLiveActivation.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/SharedStoreLiveActivation.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.server.impl; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.cluster.ha.SharedStoreMasterPolicy; @@ -24,11 +24,11 @@ public final class SharedStoreLiveActivation extends LiveActivation //this is how we act when we initially start as live private SharedStoreMasterPolicy sharedStoreMasterPolicy; - private HornetQServerImpl hornetQServer; + private ActiveMQServerImpl activeMQServer; - public SharedStoreLiveActivation(HornetQServerImpl server, SharedStoreMasterPolicy sharedStoreMasterPolicy) + public SharedStoreLiveActivation(ActiveMQServerImpl server, SharedStoreMasterPolicy sharedStoreMasterPolicy) { - this.hornetQServer = server; + this.activeMQServer = server; this.sharedStoreMasterPolicy = sharedStoreMasterPolicy; } @@ -36,54 +36,54 @@ public final class SharedStoreLiveActivation extends LiveActivation { try { - HornetQServerLogger.LOGGER.awaitingLiveLock(); + ActiveMQServerLogger.LOGGER.awaitingLiveLock(); - hornetQServer.checkJournalDirectory(); + activeMQServer.checkJournalDirectory(); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("First part initialization on " + this); + ActiveMQServerLogger.LOGGER.debug("First part initialization on " + this); } - if (!hornetQServer.initialisePart1(false)) + if (!activeMQServer.initialisePart1(false)) return; - if (hornetQServer.getNodeManager().isBackupLive()) + if (activeMQServer.getNodeManager().isBackupLive()) { /* * looks like we've failed over at some point need to inform that we are the backup * so when the current live goes down they failover to us */ - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("announcing backup to the former live" + this); + ActiveMQServerLogger.LOGGER.debug("announcing backup to the former live" + this); } - hornetQServer.getBackupManager().start(); - hornetQServer.getBackupManager().announceBackup(); + activeMQServer.getBackupManager().start(); + activeMQServer.getBackupManager().announceBackup(); Thread.sleep(sharedStoreMasterPolicy.getFailbackDelay()); } - hornetQServer.getNodeManager().startLiveNode(); + activeMQServer.getNodeManager().startLiveNode(); - if (hornetQServer.getState() == HornetQServerImpl.SERVER_STATE.STOPPED || hornetQServer.getState() == HornetQServerImpl.SERVER_STATE.STOPPING) + if (activeMQServer.getState() == ActiveMQServerImpl.SERVER_STATE.STOPPED || activeMQServer.getState() == ActiveMQServerImpl.SERVER_STATE.STOPPING) { return; } - hornetQServer.initialisePart2(false); + activeMQServer.initialisePart2(false); - HornetQServerLogger.LOGGER.serverIsLive(); + ActiveMQServerLogger.LOGGER.serverIsLive(); } catch (Exception e) { - HornetQServerLogger.LOGGER.initializationError(e); + ActiveMQServerLogger.LOGGER.initializationError(e); } } public void close(boolean permanently, boolean restarting) throws Exception { // TO avoid a NPE from stop - NodeManager nodeManagerInUse = hornetQServer.getNodeManager(); + NodeManager nodeManagerInUse = activeMQServer.getNodeManager(); if (nodeManagerInUse != null) { diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/TransientQueueManagerImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/TransientQueueManagerImpl.java index 3cf3566ab0..6002ffb944 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/TransientQueueManagerImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/TransientQueueManagerImpl.java @@ -14,8 +14,8 @@ package org.apache.activemq.core.server.impl; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.TransientQueueManager; import org.apache.activemq.utils.ReferenceCounterUtil; @@ -27,7 +27,7 @@ public class TransientQueueManagerImpl implements TransientQueueManager { private final SimpleString queueName; - private final HornetQServer server; + private final ActiveMQServer server; private final Runnable runnable = new Runnable() { @@ -35,9 +35,9 @@ public class TransientQueueManagerImpl implements TransientQueueManager { try { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("deleting temporary queue " + queueName); + ActiveMQServerLogger.LOGGER.debug("deleting temporary queue " + queueName); } try @@ -46,19 +46,19 @@ public class TransientQueueManagerImpl implements TransientQueueManager } catch (ActiveMQException e) { - HornetQServerLogger.LOGGER.warn("Error on deleting queue " + queueName + ", " + e.getMessage(), e); + ActiveMQServerLogger.LOGGER.warn("Error on deleting queue " + queueName + ", " + e.getMessage(), e); } } catch (Exception e) { - HornetQServerLogger.LOGGER.errorRemovingTempQueue(e, queueName); + ActiveMQServerLogger.LOGGER.errorRemovingTempQueue(e, queueName); } } }; private final ReferenceCounterUtil referenceCounterUtil = new ReferenceCounterUtil(runnable); - public TransientQueueManagerImpl(HornetQServer server, SimpleString queueName) + public TransientQueueManagerImpl(ActiveMQServer server, SimpleString queueName) { this.server = server; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/management/ManagementService.java b/activemq-server/src/main/java/org/apache/activemq/core/server/management/ManagementService.java index 809803cc76..d9456c3af7 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/management/ManagementService.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/management/ManagementService.java @@ -25,7 +25,7 @@ import org.apache.activemq.core.config.BridgeConfiguration; import org.apache.activemq.core.config.ClusterConnectionConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.DivertConfiguration; -import org.apache.activemq.core.management.impl.HornetQServerControlImpl; +import org.apache.activemq.core.management.impl.ActiveMQServerControlImpl; import org.apache.activemq.core.messagecounter.MessageCounterManager; import org.apache.activemq.core.paging.PagingManager; import org.apache.activemq.core.persistence.StorageManager; @@ -33,8 +33,8 @@ import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.remoting.server.RemotingService; import org.apache.activemq.core.security.Role; import org.apache.activemq.core.server.Divert; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.QueueFactory; import org.apache.activemq.core.server.ServerMessage; @@ -51,7 +51,7 @@ import org.apache.activemq.spi.core.remoting.Acceptor; * * */ -public interface ManagementService extends NotificationService, HornetQComponent +public interface ManagementService extends NotificationService, ActiveMQComponent { // Configuration @@ -67,14 +67,14 @@ public interface ManagementService extends NotificationService, HornetQComponent void setStorageManager(StorageManager storageManager); - HornetQServerControlImpl registerServer(final PostOffice postOffice, + ActiveMQServerControlImpl registerServer(final PostOffice postOffice, final StorageManager storageManager, final Configuration configuration, final HierarchicalRepository addressSettingsRepository, final HierarchicalRepository> securityRepository, final ResourceManager resourceManager, final RemotingService remotingService, - final HornetQServer messagingServer, + final ActiveMQServer messagingServer, final QueueFactory queueFactory, final ScheduledExecutorService scheduledThreadPool, final PagingManager pagingManager, diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/management/impl/ManagementServiceImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/server/management/impl/ManagementServiceImpl.java index 609455c28f..a302bf9efb 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/management/impl/ManagementServiceImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/management/impl/ManagementServiceImpl.java @@ -50,7 +50,7 @@ import org.apache.activemq.core.management.impl.BridgeControlImpl; import org.apache.activemq.core.management.impl.BroadcastGroupControlImpl; import org.apache.activemq.core.management.impl.ClusterConnectionControlImpl; import org.apache.activemq.core.management.impl.DivertControlImpl; -import org.apache.activemq.core.management.impl.HornetQServerControlImpl; +import org.apache.activemq.core.management.impl.ActiveMQServerControlImpl; import org.apache.activemq.core.management.impl.QueueControlImpl; import org.apache.activemq.core.messagecounter.MessageCounter; import org.apache.activemq.core.messagecounter.MessageCounterManager; @@ -60,10 +60,10 @@ import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.remoting.server.RemotingService; import org.apache.activemq.core.security.Role; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.Divert; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.QueueFactory; import org.apache.activemq.core.server.ServerMessage; @@ -89,7 +89,7 @@ public class ManagementServiceImpl implements ManagementService { // Constants ----------------------------------------------------- - private static final boolean isTrace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); private final MBeanServer mbeanServer; @@ -105,13 +105,13 @@ public class ManagementServiceImpl implements ManagementService private StorageManager storageManager; - private HornetQServer messagingServer; + private ActiveMQServer messagingServer; private HierarchicalRepository> securityRepository; private HierarchicalRepository addressSettingsRepository; - private HornetQServerControlImpl messagingServerControl; + private ActiveMQServerControlImpl messagingServerControl; private MessageCounterManager messageCounterManager; @@ -166,14 +166,14 @@ public class ManagementServiceImpl implements ManagementService this.storageManager = storageManager; } - public HornetQServerControlImpl registerServer(final PostOffice postOffice, + public ActiveMQServerControlImpl registerServer(final PostOffice postOffice, final StorageManager storageManager1, final Configuration configuration, final HierarchicalRepository addressSettingsRepository, final HierarchicalRepository> securityRepository, final ResourceManager resourceManager, final RemotingService remotingService, - final HornetQServer messagingServer, + final ActiveMQServer messagingServer, final QueueFactory queueFactory, final ScheduledExecutorService scheduledThreadPool, final PagingManager pagingManager, @@ -190,7 +190,7 @@ public class ManagementServiceImpl implements ManagementService messageCounterManager.setMaxDayCount(configuration.getMessageCounterMaxDayHistory()); messageCounterManager.reschedule(configuration.getMessageCounterSamplePeriod()); - messagingServerControl = new HornetQServerControlImpl(postOffice, + messagingServerControl = new ActiveMQServerControlImpl(postOffice, configuration, resourceManager, remotingService, @@ -198,7 +198,7 @@ public class ManagementServiceImpl implements ManagementService messageCounterManager, storageManager1, broadcaster); - ObjectName objectName = objectNameBuilder.getHornetQServerObjectName(); + ObjectName objectName = objectNameBuilder.getActiveMQServerObjectName(); registerInJMX(objectName, messagingServerControl); registerInRegistry(ResourceNames.CORE_SERVER, messagingServerControl); @@ -207,7 +207,7 @@ public class ManagementServiceImpl implements ManagementService public synchronized void unregisterServer() throws Exception { - ObjectName objectName = objectNameBuilder.getHornetQServerObjectName(); + ObjectName objectName = objectNameBuilder.getActiveMQServerObjectName(); unregisterFromJMX(objectName); unregisterFromRegistry(ResourceNames.CORE_SERVER); } @@ -225,9 +225,9 @@ public class ManagementServiceImpl implements ManagementService registerInRegistry(ResourceNames.CORE_ADDRESS + address, addressControl); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("registered address " + objectName); + ActiveMQServerLogger.LOGGER.debug("registered address " + objectName); } } @@ -263,9 +263,9 @@ public class ManagementServiceImpl implements ManagementService registerInJMX(objectName, queueControl); registerInRegistry(ResourceNames.CORE_QUEUE + queue.getName(), queueControl); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("registered queue " + objectName); + ActiveMQServerLogger.LOGGER.debug("registered queue " + objectName); } } @@ -284,9 +284,9 @@ public class ManagementServiceImpl implements ManagementService registerInJMX(objectName, new StandardMBean(divertControl, DivertControl.class)); registerInRegistry(ResourceNames.CORE_DIVERT + config.getName(), divertControl); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("registered divert " + objectName); + ActiveMQServerLogger.LOGGER.debug("registered divert " + objectName); } } @@ -395,9 +395,9 @@ public class ManagementServiceImpl implements ManagementService ServerMessage reply = new ServerMessageImpl(storageManager.generateID(), 512); String resourceName = message.getStringProperty(ManagementHelper.HDR_RESOURCE_NAME); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("handling management message for " + resourceName); + ActiveMQServerLogger.LOGGER.debug("handling management message for " + resourceName); } String operation = message.getStringProperty(ManagementHelper.HDR_OPERATION_NAME); @@ -421,7 +421,7 @@ public class ManagementServiceImpl implements ManagementService } catch (Exception e) { - HornetQServerLogger.LOGGER.managementOperationError(e, operation, resourceName); + ActiveMQServerLogger.LOGGER.managementOperationError(e, operation, resourceName); reply.putBooleanProperty(ManagementHelper.HDR_OPERATION_SUCCEEDED, false); String exceptionMessage = e.getMessage(); if (e instanceof InvocationTargetException) @@ -450,7 +450,7 @@ public class ManagementServiceImpl implements ManagementService } catch (Exception e) { - HornetQServerLogger.LOGGER.managementAttributeError(e, attribute, resourceName); + ActiveMQServerLogger.LOGGER.managementAttributeError(e, attribute, resourceName); reply.putBooleanProperty(ManagementHelper.HDR_OPERATION_SUCCEEDED, false); String exceptionMessage = e.getMessage(); if (e instanceof InvocationTargetException) @@ -560,7 +560,7 @@ public class ManagementServiceImpl implements ManagementService return managementNotificationAddress; } - // HornetQComponent implementation ----------------------------- + // ActiveMQComponent implementation ----------------------------- public void start() throws Exception { @@ -596,7 +596,7 @@ public class ManagementServiceImpl implements ManagementService } if (!unexpectedResourceNames.isEmpty()) { - HornetQServerLogger.LOGGER.managementStopError(unexpectedResourceNames.size(), unexpectedResourceNames); + ActiveMQServerLogger.LOGGER.managementStopError(unexpectedResourceNames.size(), unexpectedResourceNames); } for (ObjectName on : registeredNames) @@ -659,7 +659,7 @@ public class ManagementServiceImpl implements ManagementService { if (isTrace) { - HornetQServerLogger.LOGGER.trace("Sending Notification = " + notification + + ActiveMQServerLogger.LOGGER.trace("Sending Notification = " + notification + ", notificationEnabled=" + notificationsEnabled + " messagingServerControl=" + messagingServerControl); } @@ -684,7 +684,7 @@ public class ManagementServiceImpl implements ManagementService catch (Exception e) { // Exception thrown from one listener should not stop execution of others - HornetQServerLogger.LOGGER.errorCallingNotifListener(e); + ActiveMQServerLogger.LOGGER.errorCallingNotifListener(e); } } @@ -693,9 +693,9 @@ public class ManagementServiceImpl implements ManagementService // https://jira.jboss.org/jira/browse/HORNETQ-317 if (messagingServer == null || !messagingServer.isActive()) { - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("ignoring message " + notification + " as the server is not initialized"); + ActiveMQServerLogger.LOGGER.debug("ignoring message " + notification + " as the server is not initialized"); } return; } @@ -748,7 +748,7 @@ public class ManagementServiceImpl implements ManagementService if (resource == null) { - throw HornetQMessageBundle.BUNDLE.cannotFindResource(resourceName); + throw ActiveMQMessageBundle.BUNDLE.cannotFindResource(resourceName); } Method method = null; @@ -766,7 +766,7 @@ public class ManagementServiceImpl implements ManagementService } catch (NoSuchMethodException nsme2) { - throw HornetQMessageBundle.BUNDLE.noGetterMethod(attribute); + throw ActiveMQMessageBundle.BUNDLE.noGetterMethod(attribute); } } return method.invoke(resource, new Object[0]); @@ -783,7 +783,7 @@ public class ManagementServiceImpl implements ManagementService if (resource == null) { - throw HornetQMessageBundle.BUNDLE.cannotFindResource(resourceName); + throw ActiveMQMessageBundle.BUNDLE.cannotFindResource(resourceName); } Method method = null; @@ -835,7 +835,7 @@ public class ManagementServiceImpl implements ManagementService if (method == null) { - throw HornetQMessageBundle.BUNDLE.noOperation(operation, params.length); + throw ActiveMQMessageBundle.BUNDLE.noOperation(operation, params.length); } Object result = method.invoke(resource, params); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/settings/impl/HierarchicalObjectRepository.java b/activemq-server/src/main/java/org/apache/activemq/core/settings/impl/HierarchicalObjectRepository.java index cf49d05536..787eb5cd5d 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/settings/impl/HierarchicalObjectRepository.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/settings/impl/HierarchicalObjectRepository.java @@ -26,7 +26,7 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.locks.ReentrantReadWriteLock; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.settings.HierarchicalRepository; import org.apache.activemq.core.settings.HierarchicalRepositoryChangeListener; import org.apache.activemq.core.settings.Mergeable; @@ -273,7 +273,7 @@ public class HierarchicalObjectRepository implements HierarchicalRepository implements HierarchicalRepository { if (match == null) { - throw HornetQMessageBundle.BUNDLE.nullMatch(); + throw ActiveMQMessageBundle.BUNDLE.nullMatch(); } if (match.contains("#") && match.indexOf("#") < match.length() - 1) { - throw HornetQMessageBundle.BUNDLE.invalidMatch(); + throw ActiveMQMessageBundle.BUNDLE.invalidMatch(); } } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/transaction/ResourceManager.java b/activemq-server/src/main/java/org/apache/activemq/core/transaction/ResourceManager.java index 911d925254..64990a1575 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/transaction/ResourceManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/transaction/ResourceManager.java @@ -17,7 +17,7 @@ import java.util.Map; import javax.transaction.xa.Xid; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; /** * @@ -26,7 +26,7 @@ import org.apache.activemq.core.server.HornetQComponent; * @author Tim Fox * */ -public interface ResourceManager extends HornetQComponent +public interface ResourceManager extends ActiveMQComponent { boolean putTransaction(Xid xid, Transaction tx); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/transaction/Transaction.java b/activemq-server/src/main/java/org/apache/activemq/core/transaction/Transaction.java index 09d3d96f1a..a1e86d1bf3 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/transaction/Transaction.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/transaction/Transaction.java @@ -21,7 +21,7 @@ import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.impl.RefsOperation; /** - * A HornetQ internal transaction + * A ActiveMQ internal transaction * * @author Tim Fox * @author incomingInterceptors, List outgoingInterceptors); + ProtocolManager createProtocolManager(ActiveMQServer server, List incomingInterceptors, List outgoingInterceptors); String[] getProtocols(); } diff --git a/activemq-server/src/main/java/org/apache/activemq/spi/core/remoting/Acceptor.java b/activemq-server/src/main/java/org/apache/activemq/spi/core/remoting/Acceptor.java index d401d3f6ba..47b53ac88a 100644 --- a/activemq-server/src/main/java/org/apache/activemq/spi/core/remoting/Acceptor.java +++ b/activemq-server/src/main/java/org/apache/activemq/spi/core/remoting/Acceptor.java @@ -14,8 +14,8 @@ package org.apache.activemq.spi.core.remoting; import java.util.Map; -import org.apache.activemq.core.security.HornetQPrincipal; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.security.ActiveMQPrincipal; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.core.server.cluster.ClusterConnection; import org.apache.activemq.core.server.management.NotificationService; @@ -25,7 +25,7 @@ import org.apache.activemq.core.server.management.NotificationService; * @author Andy Taylor * @author Tim Fox */ -public interface Acceptor extends HornetQComponent +public interface Acceptor extends ActiveMQComponent { /** * Pause the acceptor and stop it from receiving client requests. @@ -49,11 +49,11 @@ public interface Acceptor extends HornetQComponent /** * Set the default security Principal to be used when no user/pass are defined, only for InVM */ - void setDefaultHornetQPrincipal(HornetQPrincipal defaultHornetQPrincipal); + void setDefaultActiveMQPrincipal(ActiveMQPrincipal defaultActiveMQPrincipal); /** * Whether this acceptor allows insecure connections. - * @throws java.lang.IllegalStatException if false @setDefaultHornetQPrincipal + * @throws java.lang.IllegalStatException if false @setDefaultActiveMQPrincipal */ boolean isUnsecurable(); } diff --git a/activemq-server/src/main/java/org/apache/activemq/spi/core/security/HornetQSecurityManager.java b/activemq-server/src/main/java/org/apache/activemq/spi/core/security/ActiveMQSecurityManager.java similarity index 94% rename from activemq-server/src/main/java/org/apache/activemq/spi/core/security/HornetQSecurityManager.java rename to activemq-server/src/main/java/org/apache/activemq/spi/core/security/ActiveMQSecurityManager.java index f607abf808..079eaa5acd 100644 --- a/activemq-server/src/main/java/org/apache/activemq/spi/core/security/HornetQSecurityManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/spi/core/security/ActiveMQSecurityManager.java @@ -16,14 +16,14 @@ import java.util.Set; import org.apache.activemq.core.security.CheckType; import org.apache.activemq.core.security.Role; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; /** * Use to validate whether a user has is valid to connect to the server and perform certain * functions * @author Andy Taylor */ -public interface HornetQSecurityManager extends HornetQComponent +public interface ActiveMQSecurityManager extends ActiveMQComponent { /** * is this a valid user. diff --git a/activemq-server/src/main/java/org/apache/activemq/spi/core/security/HornetQSecurityManagerImpl.java b/activemq-server/src/main/java/org/apache/activemq/spi/core/security/ActiveMQSecurityManagerImpl.java similarity index 91% rename from activemq-server/src/main/java/org/apache/activemq/spi/core/security/HornetQSecurityManagerImpl.java rename to activemq-server/src/main/java/org/apache/activemq/spi/core/security/ActiveMQSecurityManagerImpl.java index 10b7f6c19a..31bc5fc039 100644 --- a/activemq-server/src/main/java/org/apache/activemq/spi/core/security/HornetQSecurityManagerImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/spi/core/security/ActiveMQSecurityManagerImpl.java @@ -20,15 +20,15 @@ import java.util.Set; import org.apache.activemq.core.security.CheckType; import org.apache.activemq.core.security.Role; -import org.apache.activemq.core.server.HornetQMessageBundle; +import org.apache.activemq.core.server.ActiveMQMessageBundle; /** - * A basic implementation of the HornetQSecurityManager. This can be used within an appserver and be deployed by + * A basic implementation of the ActiveMQSecurityManager. This can be used within an appserver and be deployed by * BasicUserCredentialsDeployer or used standalone or embedded. * * @author Andy Taylor */ -public class HornetQSecurityManagerImpl implements HornetQSecurityManager +public class ActiveMQSecurityManagerImpl implements ActiveMQSecurityManager { // Static -------------------------------------------------------- @@ -47,7 +47,7 @@ public class HornetQSecurityManagerImpl implements HornetQSecurityManager */ private final Map> roles = new HashMap>(); - // HornetQComponent implementation ------------------------------------------ + // ActiveMQComponent implementation ------------------------------------------ public void start() { @@ -119,11 +119,11 @@ public class HornetQSecurityManagerImpl implements HornetQSecurityManager { if (user == null) { - throw HornetQMessageBundle.BUNDLE.nullUser(); + throw ActiveMQMessageBundle.BUNDLE.nullUser(); } if (password == null) { - throw HornetQMessageBundle.BUNDLE.nullPassword(); + throw ActiveMQMessageBundle.BUNDLE.nullPassword(); } users.put(user, new User(user, password)); } diff --git a/activemq-server/src/main/java/org/apache/activemq/spi/core/security/JAASSecurityManager.java b/activemq-server/src/main/java/org/apache/activemq/spi/core/security/JAASSecurityManager.java index 2c17b38244..f8dd44b2a2 100644 --- a/activemq-server/src/main/java/org/apache/activemq/spi/core/security/JAASSecurityManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/spi/core/security/JAASSecurityManager.java @@ -26,8 +26,8 @@ import javax.security.auth.login.LoginException; import org.apache.activemq.core.security.CheckType; import org.apache.activemq.core.security.Role; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQServerLogger; /** * This implementation delegates to the JAAS security interfaces. @@ -39,13 +39,13 @@ import org.apache.activemq.core.server.HornetQServerLogger; * @author Tim Fox * @author Jeff Mesnil */ -public class JAASSecurityManager implements HornetQSecurityManager, HornetQComponent +public class JAASSecurityManager implements ActiveMQSecurityManager, ActiveMQComponent { // Static -------------------------------------------------------- // Attributes ---------------------------------------------------- - private final boolean trace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private final boolean trace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); private String configurationName; @@ -55,7 +55,7 @@ public class JAASSecurityManager implements HornetQSecurityManager, HornetQCompo private Configuration config; - // HornetQSecurityManager implementation ----------------------------- + // ActiveMQSecurityManager implementation ----------------------------- public boolean validateUser(final String user, final String password) { @@ -112,7 +112,7 @@ public class JAASSecurityManager implements HornetQSecurityManager, HornetQCompo if (trace) { - HornetQServerLogger.LOGGER.trace("user " + user + (authenticated ? " is " : " is NOT ") + "authorized"); + ActiveMQServerLogger.LOGGER.trace("user " + user + (authenticated ? " is " : " is NOT ") + "authorized"); } } return authenticated; @@ -143,7 +143,7 @@ public class JAASSecurityManager implements HornetQSecurityManager, HornetQCompo // NO-OP } - // HornetQComponent implementation ----------------------------- + // ActiveMQComponent implementation ----------------------------- /** * lifecycle method, needs to be called diff --git a/activemq-server/src/main/java/org/apache/activemq/spi/core/security/package-info.java b/activemq-server/src/main/java/org/apache/activemq/spi/core/security/package-info.java index afbebaf834..27e45b1c89 100644 --- a/activemq-server/src/main/java/org/apache/activemq/spi/core/security/package-info.java +++ b/activemq-server/src/main/java/org/apache/activemq/spi/core/security/package-info.java @@ -15,7 +15,7 @@ *
    * This package defines the Service Provide Interface * that secuity providers can implement to plug their - * implementation into HornetQ. + * implementation into ActiveMQ. */ package org.apache.activemq.spi.core.security; 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 449cc72024..7187bd2171 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 @@ -127,45 +127,45 @@ public class FileConfigurationParserTest extends UnitTestCase } private static String firstPart = - "\n" + - "HornetQ.main.config" + "\n" + + "xsi:schemaLocation=\"urn:activemq /schema/activemq-configuration.xsd\">\n" + + "ActiveMQ.main.config" + "\n" + "abackupgroupname" + "\n" + "ascaledowngroupname" + "\n" + "org.apache.activemq.integration.logging.Log4jLogDelegateFactory" + "\n" + - "${jboss.server.data.dir}/hornetq/bindings" + "\n" + - "${jboss.server.data.dir}/hornetq/journal" + "\n" + + "${jboss.server.data.dir}/activemq/bindings" + "\n" + + "${jboss.server.data.dir}/activemq/journal" + "\n" + "10" + "\n" + - "${jboss.server.data.dir}/hornetq/largemessages" + "\n" + - "${jboss.server.data.dir}/hornetq/paging" + "\n" + + "${jboss.server.data.dir}/activemq/largemessages" + "\n" + + "${jboss.server.data.dir}/activemq/paging" + "\n" + "" + "\n" + "" + "\n" + "org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory" + "\n" + "" + "\n" + - "" + "\n" + + "" + "\n" + "" + "\n" + "" + "\n" + "org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory" + "\n" + "" + "\n" + - "" + "\n" + + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory" + "\n" + - "" + "\n" + + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory" + "\n" + "" + "\n" + - "" + "\n" + + "" + "\n" + "" + "\n" + "" + "\n" + "org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory" + "\n" + "" + "\n" + - "" + "\n" + + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + diff --git a/activemq-server/src/test/java/org/apache/activemq/core/config/impl/HAPolicyConfigurationTest.java b/activemq-server/src/test/java/org/apache/activemq/core/config/impl/HAPolicyConfigurationTest.java index 137b1f2ce7..b9ba0a4b67 100644 --- a/activemq-server/src/test/java/org/apache/activemq/core/config/impl/HAPolicyConfigurationTest.java +++ b/activemq-server/src/test/java/org/apache/activemq/core/config/impl/HAPolicyConfigurationTest.java @@ -26,7 +26,7 @@ import org.apache.activemq.core.server.impl.SharedNothingBackupActivation; import org.apache.activemq.core.server.impl.SharedNothingLiveActivation; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.server.impl.Activation; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.SharedStoreBackupActivation; import org.apache.activemq.core.server.impl.SharedStoreLiveActivation; import org.apache.activemq.tests.util.UnitTestCase; @@ -40,7 +40,7 @@ public class HAPolicyConfigurationTest extends UnitTestCase public void liveOnlyTest() throws Exception { Configuration configuration = createConfiguration("live-only-hapolicy-config.xml"); - HornetQServerImpl server = new HornetQServerImpl(configuration); + ActiveMQServerImpl server = new ActiveMQServerImpl(configuration); try { server.start(); @@ -67,7 +67,7 @@ public class HAPolicyConfigurationTest extends UnitTestCase public void liveOnlyTest2() throws Exception { Configuration configuration = createConfiguration("live-only-hapolicy-config2.xml"); - HornetQServerImpl server = new HornetQServerImpl(configuration); + ActiveMQServerImpl server = new ActiveMQServerImpl(configuration); try { server.start(); @@ -114,7 +114,7 @@ public class HAPolicyConfigurationTest extends UnitTestCase public void ReplicatedTest() throws Exception { Configuration configuration = createConfiguration("replicated-hapolicy-config.xml"); - HornetQServerImpl server = new HornetQServerImpl(configuration); + ActiveMQServerImpl server = new ActiveMQServerImpl(configuration); try { server.start(); @@ -137,7 +137,7 @@ public class HAPolicyConfigurationTest extends UnitTestCase public void ReplicaTest() throws Exception { Configuration configuration = createConfiguration("replica-hapolicy-config.xml"); - HornetQServerImpl server = new HornetQServerImpl(configuration); + ActiveMQServerImpl server = new ActiveMQServerImpl(configuration); try { server.start(); @@ -168,7 +168,7 @@ public class HAPolicyConfigurationTest extends UnitTestCase public void ReplicaTest2() throws Exception { Configuration configuration = createConfiguration("replica-hapolicy-config2.xml"); - HornetQServerImpl server = new HornetQServerImpl(configuration); + ActiveMQServerImpl server = new ActiveMQServerImpl(configuration); try { server.start(); @@ -201,7 +201,7 @@ public class HAPolicyConfigurationTest extends UnitTestCase public void ReplicaTest3() throws Exception { Configuration configuration = createConfiguration("replica-hapolicy-config3.xml"); - HornetQServerImpl server = new HornetQServerImpl(configuration); + ActiveMQServerImpl server = new ActiveMQServerImpl(configuration); try { server.start(); @@ -227,7 +227,7 @@ public class HAPolicyConfigurationTest extends UnitTestCase public void SharedStoreMasterTest() throws Exception { Configuration configuration = createConfiguration("shared-store-master-hapolicy-config.xml"); - HornetQServerImpl server = new HornetQServerImpl(configuration); + ActiveMQServerImpl server = new ActiveMQServerImpl(configuration); try { server.start(); @@ -249,7 +249,7 @@ public class HAPolicyConfigurationTest extends UnitTestCase public void SharedStoreSlaveTest() throws Exception { Configuration configuration = createConfiguration("shared-store-slave-hapolicy-config.xml"); - HornetQServerImpl server = new HornetQServerImpl(configuration); + ActiveMQServerImpl server = new ActiveMQServerImpl(configuration); try { server.start(); @@ -279,7 +279,7 @@ public class HAPolicyConfigurationTest extends UnitTestCase public void SharedStoreSlaveTest2() throws Exception { Configuration configuration = createConfiguration("shared-store-slave-hapolicy-config2.xml"); - HornetQServerImpl server = new HornetQServerImpl(configuration); + ActiveMQServerImpl server = new ActiveMQServerImpl(configuration); try { server.start(); @@ -311,7 +311,7 @@ public class HAPolicyConfigurationTest extends UnitTestCase public void SharedStoreSlaveTest3() throws Exception { Configuration configuration = createConfiguration("shared-store-slave-hapolicy-config3.xml"); - HornetQServerImpl server = new HornetQServerImpl(configuration); + ActiveMQServerImpl server = new ActiveMQServerImpl(configuration); try { server.start(); @@ -336,7 +336,7 @@ public class HAPolicyConfigurationTest extends UnitTestCase public void colocatedTest() throws Exception { Configuration configuration = createConfiguration("colocated-hapolicy-config.xml"); - HornetQServerImpl server = new HornetQServerImpl(configuration); + ActiveMQServerImpl server = new ActiveMQServerImpl(configuration); try { server.start(); @@ -369,7 +369,7 @@ public class HAPolicyConfigurationTest extends UnitTestCase public void colocatedTest2() throws Exception { Configuration configuration = createConfiguration("colocated-hapolicy-config2.xml"); - HornetQServerImpl server = new HornetQServerImpl(configuration); + ActiveMQServerImpl server = new ActiveMQServerImpl(configuration); try { server.start(); @@ -398,7 +398,7 @@ public class HAPolicyConfigurationTest extends UnitTestCase private void liveOnlyTest(String file) throws Exception { Configuration configuration = createConfiguration(file); - HornetQServerImpl server = new HornetQServerImpl(configuration); + ActiveMQServerImpl server = new ActiveMQServerImpl(configuration); try { server.start(); @@ -423,7 +423,7 @@ public class HAPolicyConfigurationTest extends UnitTestCase fc.start(); - // we need this otherwise the data folder will be located under hornetq-server and not on the temporary directory + // we need this otherwise the data folder will be located under activemq-server and not on the temporary directory fc.setPagingDirectory(getTestDir() + "/" + fc.getPagingDirectory()); fc.setLargeMessagesDirectory(getTestDir() + "/" + fc.getLargeMessagesDirectory()); fc.setJournalDirectory(getTestDir() + "/" + fc.getJournalDirectory()); diff --git a/activemq-server/src/test/java/org/apache/activemq/core/config/impl/WrongRoleFileConfigurationParserTest.java b/activemq-server/src/test/java/org/apache/activemq/core/config/impl/WrongRoleFileConfigurationParserTest.java index 610a6960ea..219d8169f7 100644 --- a/activemq-server/src/test/java/org/apache/activemq/core/config/impl/WrongRoleFileConfigurationParserTest.java +++ b/activemq-server/src/test/java/org/apache/activemq/core/config/impl/WrongRoleFileConfigurationParserTest.java @@ -60,44 +60,44 @@ public class WrongRoleFileConfigurationParserTest extends UnitTestCase } private static final String configuration = - "\n" + - "HornetQ.main.config" + "\n" + + "xsi:schemaLocation=\"urn:activemq /schema/activemq-configuration.xsd\">\n" + + "ActiveMQ.main.config" + "\n" + "anodegroupname" + "\n" + "org.apache.activemq.integration.logging.Log4jLogDelegateFactory" + "\n" + - "${jboss.server.data.dir}/hornetq/bindings" + "\n" + - "${jboss.server.data.dir}/hornetq/journal" + "\n" + + "${jboss.server.data.dir}/activemq/bindings" + "\n" + + "${jboss.server.data.dir}/activemq/journal" + "\n" + "10" + "\n" + - "${jboss.server.data.dir}/hornetq/largemessages" + "\n" + - "${jboss.server.data.dir}/hornetq/paging" + "\n" + + "${jboss.server.data.dir}/activemq/largemessages" + "\n" + + "${jboss.server.data.dir}/activemq/paging" + "\n" + "" + "\n" + "" + "\n" + "org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory" + "\n" + "" + "\n" + - "" + "\n" + + "" + "\n" + "" + "\n" + "" + "\n" + "org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory" + "\n" + "" + "\n" + - "" + "\n" + + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory" + "\n" + - "" + "\n" + + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory" + "\n" + "" + "\n" + - "" + "\n" + + "" + "\n" + "" + "\n" + "" + "\n" + "org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory" + "\n" + "" + "\n" + - "" + "\n" + + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + diff --git a/activemq-server/src/test/java/org/apache/activemq/core/filter/impl/FilterTest.java b/activemq-server/src/test/java/org/apache/activemq/core/filter/impl/FilterTest.java index 693c0161e1..de14de5e1b 100644 --- a/activemq-server/src/test/java/org/apache/activemq/core/filter/impl/FilterTest.java +++ b/activemq-server/src/test/java/org/apache/activemq/core/filter/impl/FilterTest.java @@ -25,7 +25,7 @@ import org.junit.Before; import org.junit.Test; /** - * Tests the compliance with the HornetQ Filter syntax. + * Tests the compliance with the ActiveMQ Filter syntax. * * @author Jason Dillon * @author Tim Fox diff --git a/activemq-server/src/test/java/org/apache/activemq/core/message/impl/MessagePropertyTest.java b/activemq-server/src/test/java/org/apache/activemq/core/message/impl/MessagePropertyTest.java index 6db96f36b0..6330b19c13 100644 --- a/activemq-server/src/test/java/org/apache/activemq/core/message/impl/MessagePropertyTest.java +++ b/activemq-server/src/test/java/org/apache/activemq/core/message/impl/MessagePropertyTest.java @@ -19,7 +19,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Before; import org.junit.Test; @@ -29,7 +29,7 @@ import org.junit.Test; */ public class MessagePropertyTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private ServerLocator locator; private ClientSessionFactory sf; private final int numMessages = 20; diff --git a/activemq-server/src/test/java/org/apache/activemq/core/server/group/impl/ClusteredResetMockTest.java b/activemq-server/src/test/java/org/apache/activemq/core/server/group/impl/ClusteredResetMockTest.java index f4b592d308..bcf2a8bc0b 100644 --- a/activemq-server/src/test/java/org/apache/activemq/core/server/group/impl/ClusteredResetMockTest.java +++ b/activemq-server/src/test/java/org/apache/activemq/core/server/group/impl/ClusteredResetMockTest.java @@ -29,7 +29,7 @@ import org.apache.activemq.core.config.BridgeConfiguration; import org.apache.activemq.core.config.ClusterConnectionConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.DivertConfiguration; -import org.apache.activemq.core.management.impl.HornetQServerControlImpl; +import org.apache.activemq.core.management.impl.ActiveMQServerControlImpl; import org.apache.activemq.core.messagecounter.MessageCounterManager; import org.apache.activemq.core.paging.PagingManager; import org.apache.activemq.core.persistence.StorageManager; @@ -37,7 +37,7 @@ import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.remoting.server.RemotingService; import org.apache.activemq.core.security.Role; import org.apache.activemq.core.server.Divert; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.QueueFactory; import org.apache.activemq.core.server.ServerMessage; @@ -238,7 +238,7 @@ public class ClusteredResetMockTest extends UnitTestCase } @Override - public HornetQServerControlImpl registerServer(PostOffice postOffice, StorageManager storageManager, Configuration configuration, HierarchicalRepository addressSettingsRepository, HierarchicalRepository> securityRepository, ResourceManager resourceManager, RemotingService remotingService, HornetQServer messagingServer, QueueFactory queueFactory, ScheduledExecutorService scheduledThreadPool, PagingManager pagingManager, boolean backup) throws Exception + public ActiveMQServerControlImpl registerServer(PostOffice postOffice, StorageManager storageManager, Configuration configuration, HierarchicalRepository addressSettingsRepository, HierarchicalRepository> securityRepository, ResourceManager resourceManager, RemotingService remotingService, ActiveMQServer messagingServer, QueueFactory queueFactory, ScheduledExecutorService scheduledThreadPool, PagingManager pagingManager, boolean backup) throws Exception { return null; } diff --git a/activemq-server/src/test/java/org/apache/activemq/core/server/impl/EmbeddedServerTest.java b/activemq-server/src/test/java/org/apache/activemq/core/server/impl/EmbeddedServerTest.java index a0b3541cba..b069dd3b15 100644 --- a/activemq-server/src/test/java/org/apache/activemq/core/server/impl/EmbeddedServerTest.java +++ b/activemq-server/src/test/java/org/apache/activemq/core/server/impl/EmbeddedServerTest.java @@ -16,8 +16,8 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -32,7 +32,7 @@ public class EmbeddedServerTest private static final String SERVER_LOCK_NAME = "server.lock"; private static final String SERVER_JOURNAL_DIR = "target/data/journal"; - private HornetQServer server; + private ActiveMQServer server; private Configuration configuration; @Before @@ -44,7 +44,7 @@ public class EmbeddedServerTest .setSecurityEnabled(false) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - server = HornetQServers.newHornetQServer(configuration); + server = ActiveMQServers.newActiveMQServer(configuration); try { server.start(); diff --git a/activemq-server/src/test/java/org/apache/activemq/core/server/impl/ScheduledDeliveryHandlerTest.java b/activemq-server/src/test/java/org/apache/activemq/core/server/impl/ScheduledDeliveryHandlerTest.java index 7be2bf17d0..630860c7e3 100644 --- a/activemq-server/src/test/java/org/apache/activemq/core/server/impl/ScheduledDeliveryHandlerTest.java +++ b/activemq-server/src/test/java/org/apache/activemq/core/server/impl/ScheduledDeliveryHandlerTest.java @@ -38,7 +38,7 @@ import org.apache.activemq.core.message.BodyEncoder; import org.apache.activemq.core.paging.PagingStore; import org.apache.activemq.core.paging.cursor.PageSubscription; import org.apache.activemq.core.server.Consumer; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.RoutingContext; @@ -1068,7 +1068,7 @@ public class ScheduledDeliveryHandlerTest extends Assert } @Override - public void setConsumersRefCount(HornetQServer server) + public void setConsumersRefCount(ActiveMQServer server) { } diff --git a/activemq-server/src/test/java/org/apache/activemq/core/version/impl/VersionImplTest.java b/activemq-server/src/test/java/org/apache/activemq/core/version/impl/VersionImplTest.java index 62b04e4d01..ebc5552437 100644 --- a/activemq-server/src/test/java/org/apache/activemq/core/version/impl/VersionImplTest.java +++ b/activemq-server/src/test/java/org/apache/activemq/core/version/impl/VersionImplTest.java @@ -43,7 +43,7 @@ public class VersionImplTest extends Assert public void testVersionImpl() throws Exception { - String versionName = "HORNETQ"; + String versionName = "ACTIVEMQ"; int majorVersion = 2; int minorVersion = 0; int microVersion = 1; @@ -69,9 +69,9 @@ public class VersionImplTest extends Assert @Test public void testEquals() throws Exception { - VersionImpl version = new VersionImpl("HORNETQ", 2, 0, 1, 10, "suffix", new int[]{7,8,9,10}); - VersionImpl sameVersion = new VersionImpl("HORNETQ", 2, 0, 1, 10, "suffix", new int[]{7,8,9,10}); - VersionImpl differentVersion = new VersionImpl("HORNETQ", 2, 0, 1, 11, "suffix", new int[]{7,8,9,10,11}); + VersionImpl version = new VersionImpl("ACTIVEMQ", 2, 0, 1, 10, "suffix", new int[]{7,8,9,10}); + VersionImpl sameVersion = new VersionImpl("ACTIVEMQ", 2, 0, 1, 10, "suffix", new int[]{7,8,9,10}); + VersionImpl differentVersion = new VersionImpl("ACTIVEMQ", 2, 0, 1, 11, "suffix", new int[]{7,8,9,10,11}); Assert.assertFalse(version.equals(new Object())); diff --git a/activemq-server/src/test/java/org/apache/activemq/tests/util/ColocatedHornetQServer.java b/activemq-server/src/test/java/org/apache/activemq/tests/util/ColocatedActiveMQServer.java similarity index 71% rename from activemq-server/src/test/java/org/apache/activemq/tests/util/ColocatedHornetQServer.java rename to activemq-server/src/test/java/org/apache/activemq/tests/util/ColocatedActiveMQServer.java index cc03a72cbf..b24684b5e4 100644 --- a/activemq-server/src/test/java/org/apache/activemq/tests/util/ColocatedHornetQServer.java +++ b/activemq-server/src/test/java/org/apache/activemq/tests/util/ColocatedActiveMQServer.java @@ -17,38 +17,38 @@ import javax.management.MBeanServer; import org.apache.activemq.core.asyncio.impl.AsynchronousFileImpl; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.impl.FileConfiguration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.JournalType; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.impl.AIOFileLockNodeManager; import org.apache.activemq.core.server.impl.FileLockNodeManager; -import org.apache.activemq.core.server.impl.HornetQServerImpl; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; -public class ColocatedHornetQServer extends HornetQServerImpl +public class ColocatedActiveMQServer extends ActiveMQServerImpl { private final NodeManager nodeManagerLive; private final NodeManager nodeManagerBackup; boolean backup = false; - public ColocatedHornetQServer backupServer; + public ColocatedActiveMQServer backupServer; - public ColocatedHornetQServer(FileConfiguration fc, HornetQSecurityManager sm, NodeManager nodeManagerLive, NodeManager nodeManagerBackup) + public ColocatedActiveMQServer(FileConfiguration fc, ActiveMQSecurityManager sm, NodeManager nodeManagerLive, NodeManager nodeManagerBackup) { super(fc, sm); this.nodeManagerLive = nodeManagerLive; this.nodeManagerBackup = nodeManagerBackup; } - public ColocatedHornetQServer(Configuration backupServerConfiguration, HornetQServer parentServer, NodeManager nodeManagerBackup, NodeManager nodeManagerLive) + public ColocatedActiveMQServer(Configuration backupServerConfiguration, ActiveMQServer parentServer, NodeManager nodeManagerBackup, NodeManager nodeManagerLive) { super(backupServerConfiguration, null, null, parentServer); this.nodeManagerLive = nodeManagerLive; this.nodeManagerBackup = nodeManagerBackup; } - public ColocatedHornetQServer(Configuration configuration, MBeanServer platformMBeanServer, HornetQSecurityManager securityManager, - NodeManager nodeManagerLive, NodeManager nodeManagerBackup) + public ColocatedActiveMQServer(Configuration configuration, MBeanServer platformMBeanServer, ActiveMQSecurityManager securityManager, + NodeManager nodeManagerLive, NodeManager nodeManagerBackup) { super(configuration, platformMBeanServer, securityManager); this.nodeManagerLive = nodeManagerLive; @@ -86,9 +86,9 @@ public class ColocatedHornetQServer extends HornetQServerImpl } @Override - public HornetQServer createBackupServer(Configuration configuration) + public ActiveMQServer createBackupServer(Configuration configuration) { - ColocatedHornetQServer backup = new ColocatedHornetQServer(configuration, this, nodeManagerBackup, nodeManagerLive); + ColocatedActiveMQServer backup = new ColocatedActiveMQServer(configuration, this, nodeManagerBackup, nodeManagerLive); backup.backup = true; this.backupServer = backup; return backup; diff --git a/activemq-server/src/test/java/org/apache/activemq/tests/util/InVMNodeManagerServer.java b/activemq-server/src/test/java/org/apache/activemq/tests/util/InVMNodeManagerServer.java index 3b6f86d037..3c764d7e41 100644 --- a/activemq-server/src/test/java/org/apache/activemq/tests/util/InVMNodeManagerServer.java +++ b/activemq-server/src/test/java/org/apache/activemq/tests/util/InVMNodeManagerServer.java @@ -19,10 +19,10 @@ import javax.management.MBeanServer; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.server.NodeManager; -import org.apache.activemq.core.server.impl.HornetQServerImpl; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; -public final class InVMNodeManagerServer extends HornetQServerImpl +public final class InVMNodeManagerServer extends ActiveMQServerImpl { final NodeManager nodeManager; @@ -47,7 +47,7 @@ public final class InVMNodeManagerServer extends HornetQServerImpl } public InVMNodeManagerServer(final Configuration configuration, - final HornetQSecurityManager securityManager, + final ActiveMQSecurityManager securityManager, final NodeManager nodeManager) { super(configuration, securityManager); @@ -56,7 +56,7 @@ public final class InVMNodeManagerServer extends HornetQServerImpl public InVMNodeManagerServer(final Configuration configuration, final MBeanServer mbeanServer, - final HornetQSecurityManager securityManager, + final ActiveMQSecurityManager securityManager, final NodeManager nodeManager) { super(configuration, mbeanServer, securityManager); diff --git a/activemq-server/src/test/java/org/apache/activemq/tests/util/ServiceTestBase.java b/activemq-server/src/test/java/org/apache/activemq/tests/util/ServiceTestBase.java index 6d277f1766..6db14dc709 100644 --- a/activemq-server/src/test/java/org/apache/activemq/tests/util/ServiceTestBase.java +++ b/activemq-server/src/test/java/org/apache/activemq/tests/util/ServiceTestBase.java @@ -32,7 +32,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.client.impl.Topology; @@ -53,21 +53,21 @@ import org.apache.activemq.core.postoffice.QueueBinding; import org.apache.activemq.core.postoffice.impl.LocalQueueBinding; import org.apache.activemq.core.remoting.impl.invm.InVMRegistry; import org.apache.activemq.core.remoting.impl.invm.TransportConstants; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.cluster.ClusterConnection; import org.apache.activemq.core.server.cluster.RemoteQueueBinding; import org.apache.activemq.core.server.impl.Activation; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.SharedNothingBackupActivation; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; -import org.apache.activemq.spi.core.security.HornetQSecurityManagerImpl; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl; import org.apache.activemq.utils.UUIDGenerator; import org.junit.After; import org.junit.Assert; @@ -127,19 +127,19 @@ public abstract class ServiceTestBase extends UnitTestCase assertFalse(store.isPaging()); } - protected Topology waitForTopology(final HornetQServer server, final int nodes) throws Exception + protected Topology waitForTopology(final ActiveMQServer server, final int nodes) throws Exception { return waitForTopology(server, nodes, -1, WAIT_TIMEOUT); } - protected Topology waitForTopology(final HornetQServer server, final int nodes, final int backups) throws Exception + protected Topology waitForTopology(final ActiveMQServer server, final int nodes, final int backups) throws Exception { return waitForTopology(server, nodes, backups, WAIT_TIMEOUT); } - protected Topology waitForTopology(final HornetQServer server, final int liveNodes, final int backupNodes, final long timeout) throws Exception + protected Topology waitForTopology(final ActiveMQServer server, final int liveNodes, final int backupNodes, final long timeout) throws Exception { - HornetQServerLogger.LOGGER.debug("waiting for " + liveNodes + " on the topology for server = " + server); + ActiveMQServerLogger.LOGGER.debug("waiting for " + liveNodes + " on the topology for server = " + server); long start = System.currentTimeMillis(); @@ -189,15 +189,15 @@ public abstract class ServiceTestBase extends UnitTestCase topology.describe() + ")"; - HornetQServerLogger.LOGGER.error(msg); + ActiveMQServerLogger.LOGGER.error(msg); throw new Exception(msg); } - protected void waitForTopology(final HornetQServer server, String clusterConnectionName, final int nodes, final long timeout) throws Exception + protected void waitForTopology(final ActiveMQServer server, String clusterConnectionName, final int nodes, final long timeout) throws Exception { - HornetQServerLogger.LOGGER.debug("waiting for " + nodes + " on the topology for server = " + server); + ActiveMQServerLogger.LOGGER.debug("waiting for " + nodes + " on the topology for server = " + server); long start = System.currentTimeMillis(); @@ -224,12 +224,12 @@ public abstract class ServiceTestBase extends UnitTestCase topology + ")"; - HornetQServerLogger.LOGGER.error(msg); + ActiveMQServerLogger.LOGGER.error(msg); throw new Exception(msg); } - protected static final void waitForComponent(final HornetQComponent component, final long seconds) throws InterruptedException + protected static final void waitForComponent(final ActiveMQComponent component, final long seconds) throws InterruptedException { long time = System.currentTimeMillis(); long toWait = seconds * 1000; @@ -320,9 +320,9 @@ public abstract class ServiceTestBase extends UnitTestCase return new TransportConfiguration(className, params); } - private final HornetQServerLogger log = HornetQServerLogger.LOGGER; + private final ActiveMQServerLogger log = ActiveMQServerLogger.LOGGER; - protected void waitForServer(HornetQServer server) throws InterruptedException + protected void waitForServer(ActiveMQServer server) throws InterruptedException { if (server == null) return; @@ -346,7 +346,7 @@ public abstract class ServiceTestBase extends UnitTestCase } } - protected void waitForServerToStop(HornetQServer server) throws InterruptedException + protected void waitForServerToStop(ActiveMQServer server) throws InterruptedException { if (server == null) return; @@ -367,7 +367,7 @@ public abstract class ServiceTestBase extends UnitTestCase /** * @param backup */ - public static final void waitForRemoteBackupSynchronization(final HornetQServer backup) + public static final void waitForRemoteBackupSynchronization(final ActiveMQServer backup) { waitForRemoteBackup(null, 10, true, backup); } @@ -379,10 +379,10 @@ public abstract class ServiceTestBase extends UnitTestCase * @param backup */ public static final void waitForRemoteBackup(ClientSessionFactory sessionFactoryP, int seconds, - boolean waitForSync, final HornetQServer backup) + boolean waitForSync, final ActiveMQServer backup) { ClientSessionFactoryInternal sessionFactory = (ClientSessionFactoryInternal)sessionFactoryP; - final HornetQServerImpl actualServer = (HornetQServerImpl) backup; + final ActiveMQServerImpl actualServer = (ActiveMQServerImpl) backup; final long toWait = seconds * 1000; final long time = System.currentTimeMillis(); int loop = 0; @@ -462,7 +462,7 @@ public abstract class ServiceTestBase extends UnitTestCase } } - protected final HornetQServer + protected final ActiveMQServer createServer(final boolean realFiles, final Configuration configuration, final int pageSize, @@ -470,15 +470,15 @@ public abstract class ServiceTestBase extends UnitTestCase final Map settings, final MBeanServer mbeanServer) { - HornetQServer server; + ActiveMQServer server; if (realFiles) { - server = HornetQServers.newHornetQServer(configuration, mbeanServer, true); + server = ActiveMQServers.newActiveMQServer(configuration, mbeanServer, true); } else { - server = HornetQServers.newHornetQServer(configuration, mbeanServer, false); + server = ActiveMQServers.newActiveMQServer(configuration, mbeanServer, false); } try { @@ -501,7 +501,7 @@ public abstract class ServiceTestBase extends UnitTestCase } } - protected final HornetQServer createServer(final boolean realFiles, + protected final ActiveMQServer createServer(final boolean realFiles, final Configuration configuration, final int pageSize, final int maxAddressSize, @@ -510,14 +510,14 @@ public abstract class ServiceTestBase extends UnitTestCase return createServer(realFiles, configuration, pageSize, maxAddressSize, AddressFullMessagePolicy.PAGE, settings); } - protected final HornetQServer createServer(final boolean realFiles, + protected final ActiveMQServer createServer(final boolean realFiles, final Configuration configuration, final int pageSize, final int maxAddressSize, final AddressFullMessagePolicy fullPolicy, final Map settings) { - HornetQServer server = addServer(HornetQServers.newHornetQServer(configuration, realFiles)); + ActiveMQServer server = addServer(ActiveMQServers.newActiveMQServer(configuration, realFiles)); if (settings != null) { for (Map.Entry setting : settings.entrySet()) @@ -537,28 +537,28 @@ public abstract class ServiceTestBase extends UnitTestCase } - protected final HornetQServer createServer(final boolean realFiles, + protected final ActiveMQServer createServer(final boolean realFiles, Configuration conf, MBeanServer mbeanServer) { return createServer(realFiles, conf, mbeanServer, new HashMap()); } - protected final HornetQServer + protected final ActiveMQServer createServer(final boolean realFiles, final Configuration configuration, final MBeanServer mbeanServer, final Map settings) { - HornetQServer server; + ActiveMQServer server; if (realFiles) { - server = HornetQServers.newHornetQServer(configuration, mbeanServer); + server = ActiveMQServers.newActiveMQServer(configuration, mbeanServer); } else { - server = HornetQServers.newHornetQServer(configuration, mbeanServer, false); + server = ActiveMQServers.newActiveMQServer(configuration, mbeanServer, false); } try { @@ -579,28 +579,28 @@ public abstract class ServiceTestBase extends UnitTestCase } } - protected final HornetQServer createServer(final boolean realFiles) throws Exception + protected final ActiveMQServer createServer(final boolean realFiles) throws Exception { return createServer(realFiles, false); } - protected final HornetQServer createServer(final boolean realFiles, final boolean netty) throws Exception + protected final ActiveMQServer createServer(final boolean realFiles, final boolean netty) throws Exception { return createServer(realFiles, createDefaultConfig(netty), -1, -1, new HashMap()); } - protected HornetQServer createServer(final boolean realFiles, final Configuration configuration) + protected ActiveMQServer createServer(final boolean realFiles, final Configuration configuration) { return createServer(realFiles, configuration, -1, -1, new HashMap()); } - protected final HornetQServer createServer(final Configuration configuration) + protected final ActiveMQServer createServer(final Configuration configuration) { return createServer(configuration.isPersistenceEnabled(), configuration, -1, -1, new HashMap()); } - protected HornetQServer createInVMFailoverServer(final boolean realFiles, + protected ActiveMQServer createInVMFailoverServer(final boolean realFiles, final Configuration configuration, final NodeManager nodeManager, final int id) @@ -614,7 +614,7 @@ public abstract class ServiceTestBase extends UnitTestCase id); } - protected HornetQServer createInVMFailoverServer(final boolean realFiles, + protected ActiveMQServer createInVMFailoverServer(final boolean realFiles, final Configuration configuration, final int pageSize, final int maxAddressSize, @@ -622,8 +622,8 @@ public abstract class ServiceTestBase extends UnitTestCase NodeManager nodeManager, final int id) { - HornetQServer server; - HornetQSecurityManager securityManager = new HornetQSecurityManagerImpl(); + ActiveMQServer server; + ActiveMQSecurityManager securityManager = new ActiveMQSecurityManagerImpl(); configuration.setPersistenceEnabled(realFiles); server = new InVMNodeManagerServer(configuration, ManagementFactory.getPlatformMBeanServer(), @@ -653,7 +653,7 @@ public abstract class ServiceTestBase extends UnitTestCase } } - protected HornetQServer createColocatedInVMFailoverServer(final boolean realFiles, + protected ActiveMQServer createColocatedInVMFailoverServer(final boolean realFiles, final Configuration configuration, NodeManager liveNodeManager, NodeManager backupNodeManager, @@ -669,7 +669,7 @@ public abstract class ServiceTestBase extends UnitTestCase id); } - protected HornetQServer createColocatedInVMFailoverServer(final boolean realFiles, + protected ActiveMQServer createColocatedInVMFailoverServer(final boolean realFiles, final Configuration configuration, final int pageSize, final int maxAddressSize, @@ -678,10 +678,10 @@ public abstract class ServiceTestBase extends UnitTestCase NodeManager backupNodeManager, final int id) { - HornetQServer server; - HornetQSecurityManager securityManager = new HornetQSecurityManagerImpl(); + ActiveMQServer server; + ActiveMQSecurityManager securityManager = new ActiveMQSecurityManagerImpl(); configuration.setPersistenceEnabled(realFiles); - server = new ColocatedHornetQServer(configuration, + server = new ColocatedActiveMQServer(configuration, ManagementFactory.getPlatformMBeanServer(), securityManager, liveNodeManager, @@ -710,24 +710,24 @@ public abstract class ServiceTestBase extends UnitTestCase } } - protected HornetQServer createServer(final boolean realFiles, + protected ActiveMQServer createServer(final boolean realFiles, final Configuration configuration, - final HornetQSecurityManager securityManager) + final ActiveMQSecurityManager securityManager) { - HornetQServer server; + ActiveMQServer server; if (realFiles) { - server = HornetQServers.newHornetQServer(configuration, - ManagementFactory.getPlatformMBeanServer(), - securityManager); + server = ActiveMQServers.newActiveMQServer(configuration, + ManagementFactory.getPlatformMBeanServer(), + securityManager); } else { - server = HornetQServers.newHornetQServer(configuration, - ManagementFactory.getPlatformMBeanServer(), - securityManager, - false); + server = ActiveMQServers.newActiveMQServer(configuration, + ManagementFactory.getPlatformMBeanServer(), + securityManager, + false); } try { @@ -750,7 +750,7 @@ public abstract class ServiceTestBase extends UnitTestCase } } - protected HornetQServer createClusteredServerWithParams(final boolean isNetty, + protected ActiveMQServer createClusteredServerWithParams(final boolean isNetty, final int index, final boolean realFiles, final Map params) throws Exception @@ -760,7 +760,7 @@ public abstract class ServiceTestBase extends UnitTestCase new HashMap()); } - protected HornetQServer createClusteredServerWithParams(final boolean isNetty, + protected ActiveMQServer createClusteredServerWithParams(final boolean isNetty, final int index, final boolean realFiles, final int pageSize, @@ -806,7 +806,7 @@ public abstract class ServiceTestBase extends UnitTestCase { TransportConfiguration tnspConfig = createInVMTransportConnectorConfig(serverID, UUIDGenerator.getInstance().generateStringUUID()); - ServerLocator locator = HornetQClient.createServerLocatorWithHA(tnspConfig); + ServerLocator locator = ActiveMQClient.createServerLocatorWithHA(tnspConfig); return addServerLocator(locator); } @@ -929,8 +929,8 @@ public abstract class ServiceTestBase extends UnitTestCase 0, 0, messagesFF, - "hornetq-data", - "hq", + "activemq-data", + "amq", 1); final List committedRecords = new LinkedList(); final List preparedTransactions = new LinkedList(); @@ -975,8 +975,8 @@ public abstract class ServiceTestBase extends UnitTestCase 0, 0, messagesFF, - "hornetq-data", - "hq", + "activemq-data", + "amq", 1); List filesToRead = messagesJournal.orderFiles(); @@ -1004,8 +1004,8 @@ public abstract class ServiceTestBase extends UnitTestCase 0, 0, messagesFF, - "hornetq-data", - "hq", + "activemq-data", + "amq", 1); messagesJournal.start(); @@ -1117,7 +1117,7 @@ public abstract class ServiceTestBase extends UnitTestCase * @throws Exception * @throws InterruptedException */ - protected boolean waitForBindings(final HornetQServer server, + protected boolean waitForBindings(final ActiveMQServer server, final String address, final boolean local, final int expectedBindingCount, @@ -1212,7 +1212,7 @@ public abstract class ServiceTestBase extends UnitTestCase validateNoFilesOnLargeDir(0); } - public void printBindings(HornetQServer server, String address) throws Exception + public void printBindings(ActiveMQServer server, String address) throws Exception { PostOffice po = server.getPostOffice(); Bindings bindings = po.getBindingsForAddress(new SimpleString(address)); diff --git a/activemq-server/src/test/java/org/apache/activemq/tests/util/SingleServerTestBase.java b/activemq-server/src/test/java/org/apache/activemq/tests/util/SingleServerTestBase.java index 8f81180a4d..1dd61dcf92 100644 --- a/activemq-server/src/test/java/org/apache/activemq/tests/util/SingleServerTestBase.java +++ b/activemq-server/src/test/java/org/apache/activemq/tests/util/SingleServerTestBase.java @@ -15,10 +15,10 @@ package org.apache.activemq.tests.util; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.junit.Before; /** @@ -30,7 +30,7 @@ import org.junit.Before; public abstract class SingleServerTestBase extends ServiceTestBase { - protected HornetQServer server; + protected ActiveMQServer server; protected ClientSession session; @@ -57,7 +57,7 @@ public abstract class SingleServerTestBase extends ServiceTestBase protected ServerLocator createLocator() { - ServerLocator retlocator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator retlocator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); addServerLocator(retlocator); return retlocator; } diff --git a/activemq-server/src/test/java/org/apache/activemq/tests/util/UnitTestCase.java b/activemq-server/src/test/java/org/apache/activemq/tests/util/UnitTestCase.java index f8deae8f3a..8d52a696f9 100644 --- a/activemq-server/src/test/java/org/apache/activemq/tests/util/UnitTestCase.java +++ b/activemq-server/src/test/java/org/apache/activemq/tests/util/UnitTestCase.java @@ -60,7 +60,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.asyncio.impl.AsynchronousFileImpl; import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl; @@ -88,10 +88,10 @@ import org.apache.activemq.core.remoting.impl.invm.InVMRegistry; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyConnector; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.JournalType; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; @@ -130,7 +130,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase public TemporaryFolder temporaryFolder = new TemporaryFolder(); private String testDir; - private static final HornetQServerLogger log = HornetQServerLogger.LOGGER; + private static final ActiveMQServerLogger log = ActiveMQServerLogger.LOGGER; public static final String INVM_ACCEPTOR_FACTORY = InVMAcceptorFactory.class.getCanonicalName(); @@ -156,13 +156,13 @@ public abstract class UnitTestCase extends CoreUnitTestCase // There is a verification about thread leakages. We only fail a single thread when this happens private static Set alreadyFailedThread = new HashSet(); - private final Collection servers = new ArrayList(); + private final Collection servers = new ArrayList(); private final Collection locators = new ArrayList(); private final Collection sessionFactories = new ArrayList(); private final Collection clientSessions = new HashSet(); private final Collection clientConsumers = new HashSet(); private final Collection clientProducers = new HashSet(); - private final Collection otherComponents = new HashSet(); + private final Collection otherComponents = new HashSet(); private final Set executorSet = new HashSet(); private boolean checkThread = true; @@ -506,7 +506,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase */ public void logAndSystemOut(String message, Exception e) { - HornetQServerLogger log0 = HornetQServerLogger.LOGGER; + ActiveMQServerLogger log0 = ActiveMQServerLogger.LOGGER; log0.info(message, e); System.out.println(message); e.printStackTrace(System.out); @@ -517,7 +517,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase */ public void logAndSystemOut(String message) { - HornetQServerLogger log0 = HornetQServerLogger.LOGGER; + ActiveMQServerLogger log0 = ActiveMQServerLogger.LOGGER; log0.info(message); System.out.println(this.getClass().getName() + "::" + message); } @@ -653,7 +653,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase * @param connectorConfigs * @return */ - protected ArrayList registerConnectors(final HornetQServer server, + protected ArrayList registerConnectors(final ActiveMQServer server, final List connectorConfigs) { // The connectors need to be pre-configured at main config object but this method is taking @@ -883,7 +883,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase return testDir1 + "/temp"; } - protected static void expectHornetQException(final String message, final ActiveMQExceptionType errorCode, final HornetQAction action) + protected static void expectActiveMQException(final String message, final ActiveMQExceptionType errorCode, final ActiveMQAction action) { try { @@ -897,14 +897,14 @@ public abstract class UnitTestCase extends CoreUnitTestCase } } - protected static void expectHornetQException(final ActiveMQExceptionType errorCode, final HornetQAction action) + protected static void expectActiveMQException(final ActiveMQExceptionType errorCode, final ActiveMQAction action) { - UnitTestCase.expectHornetQException("must throw a ActiveMQException with the expected errorCode: " + errorCode, - errorCode, - action); + UnitTestCase.expectActiveMQException("must throw a ActiveMQException with the expected errorCode: " + errorCode, + errorCode, + action); } - protected static void expectXAException(final int errorCode, final HornetQAction action) + protected static void expectXAException(final int errorCode, final ActiveMQAction action) { try { @@ -1065,7 +1065,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase { synchronized (servers) { - for (HornetQServer server : servers) + for (ActiveMQServer server : servers) { if (server == null) continue; @@ -1251,7 +1251,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase { synchronized (otherComponents) { - for (HornetQComponent c : otherComponents) + for (ActiveMQComponent c : otherComponents) { stopComponent(c); } @@ -1448,7 +1448,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase } else { - throw HornetQMessageBundle.BUNDLE.autoConvertError(arg.getClass()); + throw ActiveMQMessageBundle.BUNDLE.autoConvertError(arg.getClass()); } } @@ -1483,7 +1483,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase } else { - throw HornetQMessageBundle.BUNDLE.autoConvertError(arg.getClass()); + throw ActiveMQMessageBundle.BUNDLE.autoConvertError(arg.getClass()); } } @@ -1646,7 +1646,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase return new XidImpl("xa1".getBytes(), 1, UUIDGenerator.getInstance().generateStringUUID().getBytes()); } - protected int getMessageCount(final HornetQServer service, final String address) throws Exception + protected int getMessageCount(final ActiveMQServer service, final String address) throws Exception { return getMessageCount(service.getPostOffice(), address); } @@ -1707,7 +1707,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase * @return a Map containing the reference counts per queue * @throws Exception */ - protected Map loadQueues(HornetQServer serverToInvestigate) throws Exception + protected Map loadQueues(ActiveMQServer serverToInvestigate) throws Exception { SequentialFileFactory messagesFF = new NIOSequentialFileFactory(serverToInvestigate.getConfiguration() .getJournalDirectory()); @@ -1717,8 +1717,8 @@ public abstract class UnitTestCase extends CoreUnitTestCase 0, 0, messagesFF, - "hornetq-data", - "hq", + "activemq-data", + "amq", 1); List records = new LinkedList(); @@ -1780,11 +1780,11 @@ public abstract class UnitTestCase extends CoreUnitTestCase protected ServerLocator internalCreateNonHALocator(boolean isNetty) { return isNetty - ? HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY)) - : HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ? ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY)) + : ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(INVM_CONNECTOR_FACTORY)); } - protected static final void stopComponent(HornetQComponent component) + protected static final void stopComponent(ActiveMQComponent component) { if (component == null) return; @@ -1798,7 +1798,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase } } - protected static final void stopComponentOutputExceptions(HornetQComponent component) + protected static final void stopComponentOutputExceptions(ActiveMQComponent component) { if (component == null) return; @@ -1820,7 +1820,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase return sf; } - protected final HornetQServer addServer(final HornetQServer server) + protected final ActiveMQServer addServer(final ActiveMQServer server) { if (server != null) { @@ -1880,7 +1880,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase return producer; } - protected final void addHornetQComponent(final HornetQComponent component) + protected final void addActiveMQComponent(final ActiveMQComponent component) { if (component != null) { @@ -1984,7 +1984,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase } } - public static void crashAndWaitForFailure(HornetQServer server, ClientSession... sessions) throws Exception + public static void crashAndWaitForFailure(ActiveMQServer server, ClientSession... sessions) throws Exception { CountDownLatch latch = new CountDownLatch(sessions.length); for (ClientSession session : sessions) @@ -2008,7 +2008,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase } } - public static void crashAndWaitForFailure(HornetQServer server, ServerLocator locator) throws Exception + public static void crashAndWaitForFailure(ActiveMQServer server, ServerLocator locator) throws Exception { ClientSessionFactory sf = locator.createSessionFactory(); ClientSession session = sf.createSession(); @@ -2099,7 +2099,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase // Inner classes ------------------------------------------------- - protected interface HornetQAction + protected interface ActiveMQAction { void run() throws Exception; } diff --git a/activemq-tools/src/main/java/org/apache/activemq/tools/HornetQToolsLogger.java b/activemq-tools/src/main/java/org/apache/activemq/tools/ActiveMQToolsLogger.java similarity index 82% rename from activemq-tools/src/main/java/org/apache/activemq/tools/HornetQToolsLogger.java rename to activemq-tools/src/main/java/org/apache/activemq/tools/ActiveMQToolsLogger.java index d87410c0dc..4efae457a4 100644 --- a/activemq-tools/src/main/java/org/apache/activemq/tools/HornetQToolsLogger.java +++ b/activemq-tools/src/main/java/org/apache/activemq/tools/ActiveMQToolsLogger.java @@ -32,11 +32,11 @@ import org.jboss.logging.annotations.MessageLogger; * * so an INFO message would be 241000 to 241999 */ -@MessageLogger(projectCode = "HQ") -public interface HornetQToolsLogger extends BasicLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQToolsLogger extends BasicLogger { /** * The default logger. */ - HornetQToolsLogger LOGGER = Logger.getMessageLogger(HornetQToolsLogger.class, HornetQToolsLogger.class.getPackage().getName()); + ActiveMQToolsLogger LOGGER = Logger.getMessageLogger(ActiveMQToolsLogger.class, ActiveMQToolsLogger.class.getPackage().getName()); } diff --git a/activemq-tools/src/main/java/org/apache/activemq/tools/DataTool.java b/activemq-tools/src/main/java/org/apache/activemq/tools/DataTool.java index 8b294bacc8..f7c5cc6cef 100644 --- a/activemq-tools/src/main/java/org/apache/activemq/tools/DataTool.java +++ b/activemq-tools/src/main/java/org/apache/activemq/tools/DataTool.java @@ -89,17 +89,17 @@ public class DataTool if (type.equals(JOURNAL_TYPE)) { - journalName = "hornetq-data"; - exension = "hq"; + journalName = "activemq-data"; + exension = "amq"; } else if (type.equals(BINDING_TYPE)) { - journalName = "hornetq-bindings"; + journalName = "activemq-bindings"; exension = "bindings"; } else if (type.equals(JMS_TYPE)) { - journalName = "hornetq-jms"; + journalName = "activemq-jms"; exension = "jms"; } else diff --git a/activemq-tools/src/main/java/org/apache/activemq/tools/PrintData.java b/activemq-tools/src/main/java/org/apache/activemq/tools/PrintData.java index 26085ae172..a0708250b5 100644 --- a/activemq-tools/src/main/java/org/apache/activemq/tools/PrintData.java +++ b/activemq-tools/src/main/java/org/apache/activemq/tools/PrintData.java @@ -19,13 +19,13 @@ import org.apache.activemq.core.persistence.impl.journal.DescribeJournal; import org.apache.activemq.core.server.impl.FileLockNodeManager; /** - * Writes a human-readable interpretation of the contents of a HornetQ {@link org.apache.activemq.core.journal.Journal}. + * Writes a human-readable interpretation of the contents of a ActiveMQ {@link org.apache.activemq.core.journal.Journal}. *

    * To run this class with Maven, use: * *

    - * cd hornetq-server
    - * mvn -q exec:java -Dexec.args="/foo/hornetq/bindings /foo/hornetq/journal" -Dexec.mainClass="org.apache.activemq.tools.PrintData"
    + * cd activemq-server
    + * mvn -q exec:java -Dexec.args="/foo/activemq/bindings /foo/activemq/journal" -Dexec.mainClass="org.apache.activemq.tools.PrintData"
      * 
    * @author clebertsuconic */ diff --git a/activemq-tools/src/main/java/org/apache/activemq/tools/PrintPages.java b/activemq-tools/src/main/java/org/apache/activemq/tools/PrintPages.java index c7f1ce2dc2..43fa8a8b16 100644 --- a/activemq-tools/src/main/java/org/apache/activemq/tools/PrintPages.java +++ b/activemq-tools/src/main/java/org/apache/activemq/tools/PrintPages.java @@ -239,8 +239,8 @@ public class PrintPages // NO_UCD (unused code) 0, 0, messagesFF, - "hornetq-data", - "hq", + "activemq-data", + "amq", 1); messagesJournal.start(); diff --git a/activemq-tools/src/main/java/org/apache/activemq/tools/TransferQueue.java b/activemq-tools/src/main/java/org/apache/activemq/tools/TransferQueue.java index 8bac92a8f4..134d6ca007 100644 --- a/activemq-tools/src/main/java/org/apache/activemq/tools/TransferQueue.java +++ b/activemq-tools/src/main/java/org/apache/activemq/tools/TransferQueue.java @@ -24,7 +24,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; @@ -106,7 +106,7 @@ public class TransferQueue // NO_UCD (unused code) { TransportConfiguration configurationSource = new TransportConfiguration(NettyConnectorFactory.class.getName(), sourceParameters); - ServerLocator locatorSource = HornetQClient.createServerLocator(false, configurationSource); + ServerLocator locatorSource = ActiveMQClient.createServerLocator(false, configurationSource); ClientSessionFactory factorySource = locatorSource.createSessionFactory(); @@ -126,7 +126,7 @@ public class TransferQueue // NO_UCD (unused code) TransportConfiguration configurationTarget = new TransportConfiguration(NettyConnectorFactory.class.getName(), targetParameters); - ServerLocator locatorTarget = HornetQClient.createServerLocatorWithoutHA(configurationTarget); + ServerLocator locatorTarget = ActiveMQClient.createServerLocatorWithoutHA(configurationTarget); diff --git a/activemq-tools/src/main/java/org/apache/activemq/tools/XmlDataConstants.java b/activemq-tools/src/main/java/org/apache/activemq/tools/XmlDataConstants.java index 88fa440886..3e69ef8c5b 100644 --- a/activemq-tools/src/main/java/org/apache/activemq/tools/XmlDataConstants.java +++ b/activemq-tools/src/main/java/org/apache/activemq/tools/XmlDataConstants.java @@ -26,7 +26,7 @@ public final class XmlDataConstants // Utility } static final String XML_VERSION = "1.0"; - static final String DOCUMENT_PARENT = "hornetq-journal"; + static final String DOCUMENT_PARENT = "activemq-journal"; static final String BINDINGS_PARENT = "bindings"; static final String BINDINGS_CHILD = "binding"; static final String BINDING_ADDRESS = "address"; diff --git a/activemq-tools/src/main/java/org/apache/activemq/tools/XmlDataExporter.java b/activemq-tools/src/main/java/org/apache/activemq/tools/XmlDataExporter.java index 03a6bd6a63..3aa3cb1f72 100644 --- a/activemq-tools/src/main/java/org/apache/activemq/tools/XmlDataExporter.java +++ b/activemq-tools/src/main/java/org/apache/activemq/tools/XmlDataExporter.java @@ -69,7 +69,7 @@ import org.apache.activemq.core.persistence.impl.journal.JournalStorageManager.A import org.apache.activemq.core.persistence.impl.journal.JournalStorageManager.CursorAckRecordEncoding; import org.apache.activemq.core.persistence.impl.journal.JournalStorageManager.PageUpdateTXEncoding; import org.apache.activemq.core.persistence.impl.journal.JournalStorageManager.PersistentQueueBindingEncoding; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.JournalType; import org.apache.activemq.core.server.LargeServerMessage; import org.apache.activemq.core.server.ServerMessage; @@ -85,7 +85,7 @@ import org.apache.activemq.utils.Base64; import org.apache.activemq.utils.ExecutorFactory; /** - * Read the journal, page, and large-message data from a stopped instance of HornetQ and save it in an XML format to + * Read the journal, page, and large-message data from a stopped instance of ActiveMQ and save it in an XML format to * a file. It uses the StAX javax.xml.stream.XMLStreamWriter for speed and simplicity. Output can be * read by org.apache.activemq.core.persistence.impl.journal.XmlDataImporter. * @@ -179,8 +179,8 @@ public final class XmlDataExporter getJmsBindings(); processMessageJournal(); printDataAsXML(); - HornetQServerLogger.LOGGER.debug("\n\nProcessing took: " + (System.currentTimeMillis() - start) + "ms"); - HornetQServerLogger.LOGGER.debug("Output " + messagesPrinted + " messages and " + bindingsPrinted + " bindings."); + ActiveMQServerLogger.LOGGER.debug("\n\nProcessing took: " + (System.currentTimeMillis() - start) + "ms"); + ActiveMQServerLogger.LOGGER.debug("Output " + messagesPrinted + " messages and " + bindingsPrinted + " bindings."); } /** @@ -200,7 +200,7 @@ public final class XmlDataExporter Journal messageJournal = storageManager.getMessageJournal(); - HornetQServerLogger.LOGGER.debug("Reading journal from " + config.getJournalDirectory()); + ActiveMQServerLogger.LOGGER.debug("Reading journal from " + config.getJournalDirectory()); messageJournal.start(); @@ -238,7 +238,7 @@ public final class XmlDataExporter } } - HornetQServerLogger.LOGGER.debug(message.toString()); + ActiveMQServerLogger.LOGGER.debug(message.toString()); } }; @@ -351,7 +351,7 @@ public final class XmlDataExporter config.getJournalCompactMinFiles(), config.getJournalCompactPercentage(), bindingsJMS, - "hornetq-jms", + "activemq-jms", "jms", 1); @@ -361,7 +361,7 @@ public final class XmlDataExporter ArrayList list = new ArrayList<>(); - HornetQServerLogger.LOGGER.debug("Reading jms bindings journal from " + config.getBindingsDirectory()); + ActiveMQServerLogger.LOGGER.debug("Reading jms bindings journal from " + config.getBindingsDirectory()); jmsJournal.load(data, list, null); @@ -378,7 +378,7 @@ public final class XmlDataExporter PersistedConnectionFactory cf = new PersistedConnectionFactory(); cf.decode(buffer); cf.setId(id); - HornetQServerLogger.LOGGER.info("Found JMS connection factory: " + cf.getName()); + ActiveMQServerLogger.LOGGER.info("Found JMS connection factory: " + cf.getName()); jmsConnectionFactories.put(cf.getName(), cf); } else if (rec == JMSJournalStorageManagerImpl.DESTINATION_RECORD) @@ -386,7 +386,7 @@ public final class XmlDataExporter PersistedDestination destination = new PersistedDestination(); destination.decode(buffer); destination.setId(id); - HornetQServerLogger.LOGGER.info("Found JMS destination: " + destination.getName()); + ActiveMQServerLogger.LOGGER.info("Found JMS destination: " + destination.getName()); jmsDestinations.put(new Pair<>(destination.getType(), destination.getName()), destination); } else if (rec == JMSJournalStorageManagerImpl.JNDI_RECORD) @@ -400,7 +400,7 @@ public final class XmlDataExporter { builder.append(binding).append(" "); } - HornetQServerLogger.LOGGER.info("Found JMS JNDI binding data for " + jndi.getType() + " " + jndi.getName() + ": " + builder.toString()); + ActiveMQServerLogger.LOGGER.info("Found JMS JNDI binding data for " + jndi.getType() + " " + jndi.getName() + ": " + builder.toString()); jmsJNDI.put(key, jndi); } else @@ -424,7 +424,7 @@ public final class XmlDataExporter bindingsJournal.start(); - HornetQServerLogger.LOGGER.debug("Reading bindings journal from " + config.getBindingsDirectory()); + ActiveMQServerLogger.LOGGER.debug("Reading bindings journal from " + config.getBindingsDirectory()); ((JournalImpl) bindingsJournal).load(records, null, null, false); @@ -781,12 +781,12 @@ public final class XmlDataExporter if (pageStore != null) { String folder = pageStore.getFolder(); - HornetQServerLogger.LOGGER.debug("Reading page store " + store + " folder = " + folder); + ActiveMQServerLogger.LOGGER.debug("Reading page store " + store + " folder = " + folder); int pageId = (int) pageStore.getFirstPage(); for (int i = 0; i < pageStore.getNumberOfPages(); i++) { - HornetQServerLogger.LOGGER.debug("Reading page " + pageId); + ActiveMQServerLogger.LOGGER.debug("Reading page " + pageId); Page page = pageStore.createPage(pageId); page.open(); List messages = page.read(storageManager); @@ -835,7 +835,7 @@ public final class XmlDataExporter } else { - HornetQServerLogger.LOGGER.debug("Page store was null"); + ActiveMQServerLogger.LOGGER.debug("Page store was null"); } } } diff --git a/activemq-tools/src/main/java/org/apache/activemq/tools/XmlDataImporter.java b/activemq-tools/src/main/java/org/apache/activemq/tools/XmlDataImporter.java index 5e959dbf4c..7033262634 100644 --- a/activemq-tools/src/main/java/org/apache/activemq/tools/XmlDataImporter.java +++ b/activemq-tools/src/main/java/org/apache/activemq/tools/XmlDataImporter.java @@ -39,19 +39,19 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientRequestor; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.ManagementHelper; import org.apache.activemq.api.core.management.ResourceNames; import org.apache.activemq.core.message.impl.MessageImpl; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.utils.Base64; /** * Read XML output from org.apache.activemq.core.persistence.impl.journal.XmlDataExporter, create a core session, and - * send the messages to a running instance of HornetQ. It uses the StAX javax.xml.stream.XMLStreamReader + * send the messages to a running instance of ActiveMQ. It uses the StAX javax.xml.stream.XMLStreamReader * for speed and simplicity. * * @author Justin Bertram @@ -171,7 +171,7 @@ public final class XmlDataImporter connectionParams.put(TransportConstants.HOST_PROP_NAME, host); connectionParams.put(TransportConstants.PORT_PROP_NAME, port); ServerLocator serverLocator = - HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( + ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration( NettyConnectorFactory.class.getName(), connectionParams)); ClientSessionFactory sf = serverLocator.createSessionFactory(); @@ -194,7 +194,7 @@ public final class XmlDataImporter { while (reader.hasNext()) { - HornetQServerLogger.LOGGER.debug("EVENT:[" + reader.getLocation().getLineNumber() + "][" + reader.getLocation().getColumnNumber() + "] "); + ActiveMQServerLogger.LOGGER.debug("EVENT:[" + reader.getLocation().getLineNumber() + "][" + reader.getLocation().getColumnNumber() + "] "); if (reader.getEventType() == XMLStreamConstants.START_ELEMENT) { if (XmlDataConstants.BINDINGS_CHILD.equals(reader.getLocalName())) @@ -356,15 +356,15 @@ public final class XmlDataImporter // Get the ID of the queues involved so the message can be routed properly. This is done because we cannot // send directly to a queue, we have to send to an address instead but not all the queues related to the // address may need the message - ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management"); + ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.activemq.management"); ClientMessage managementMessage = managementSession.createMessage(false); ManagementHelper.putAttribute(managementMessage, "core.queue." + queue, "ID"); managementSession.start(); - HornetQServerLogger.LOGGER.debug("Requesting ID for: " + queue); + ActiveMQServerLogger.LOGGER.debug("Requesting ID for: " + queue); ClientMessage reply = requestor.request(managementMessage); queueID = (Integer) ManagementHelper.getResult(reply); requestor.close(); - HornetQServerLogger.LOGGER.debug("ID for " + queue + " is: " + queueID); + ActiveMQServerLogger.LOGGER.debug("ID for " + queue + " is: " + queueID); queueIDs.put(queue, queueID); // store it so we don't have to look it up every time } @@ -373,7 +373,7 @@ public final class XmlDataImporter } logMessage.delete(logMessage.length() - 2, logMessage.length()); // take off the trailing comma - HornetQServerLogger.LOGGER.debug(logMessage); + ActiveMQServerLogger.LOGGER.debug(logMessage); message.putBytesProperty(MessageImpl.HDR_ROUTE_TO_IDS, buffer.array()); ClientProducer producer = session.createProducer(destination); @@ -385,7 +385,7 @@ public final class XmlDataImporter File tempFile = new File(tempFileName); if (!tempFile.delete()) { - HornetQServerLogger.LOGGER.warn("Could not delete: " + tempFileName); + ActiveMQServerLogger.LOGGER.warn("Could not delete: " + tempFileName); } tempFileName = ""; } @@ -485,7 +485,7 @@ public final class XmlDataImporter if (isLarge) { tempFileName = UUID.randomUUID().toString() + ".tmp"; - HornetQServerLogger.LOGGER.debug("Creating temp file " + tempFileName + " for large message."); + ActiveMQServerLogger.LOGGER.debug("Creating temp file " + tempFileName + " for large message."); try (OutputStream out = new FileOutputStream(tempFileName)) { while (reader.hasNext()) @@ -547,11 +547,11 @@ public final class XmlDataImporter if (!queueQuery.isExists()) { session.createQueue(address, queueName, filter, true); - HornetQServerLogger.LOGGER.debug("Binding queue(name=" + queueName + ", address=" + address + ", filter=" + filter + ")"); + ActiveMQServerLogger.LOGGER.debug("Binding queue(name=" + queueName + ", address=" + address + ", filter=" + filter + ")"); } else { - HornetQServerLogger.LOGGER.debug("Binding " + queueName + " already exists so won't re-bind."); + ActiveMQServerLogger.LOGGER.debug("Binding " + queueName + " already exists so won't re-bind."); } addressMap.put(queueName, address); @@ -667,182 +667,182 @@ public final class XmlDataImporter if (XmlDataConstants.JMS_CONNECTION_FACTORY_CALL_FAILOVER_TIMEOUT.equals(reader.getLocalName())) { callFailoverTimeout = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory callFailoverTimeout: " + callFailoverTimeout); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory callFailoverTimeout: " + callFailoverTimeout); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_CALL_TIMEOUT.equals(reader.getLocalName())) { callTimeout = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory callTimeout: " + callTimeout); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory callTimeout: " + callTimeout); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_CLIENT_FAILURE_CHECK_PERIOD.equals(reader.getLocalName())) { clientFailureCheckPeriod = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory clientFailureCheckPeriod: " + clientFailureCheckPeriod); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory clientFailureCheckPeriod: " + clientFailureCheckPeriod); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_CLIENT_ID.equals(reader.getLocalName())) { clientId = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory clientId: " + clientId); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory clientId: " + clientId); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_CONFIRMATION_WINDOW_SIZE.equals(reader.getLocalName())) { confirmationWindowSize = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory confirmationWindowSize: " + confirmationWindowSize); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory confirmationWindowSize: " + confirmationWindowSize); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_CONNECTION_TTL.equals(reader.getLocalName())) { connectionTtl = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory connectionTtl: " + connectionTtl); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory connectionTtl: " + connectionTtl); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_CONNECTOR.equals(reader.getLocalName())) { connectors = getConnectors(); - HornetQServerLogger.LOGGER.debug("JMS connection factory getLocalName: " + connectors); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory getLocalName: " + connectors); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_CONSUMER_MAX_RATE.equals(reader.getLocalName())) { consumerMaxRate = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory consumerMaxRate: " + consumerMaxRate); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory consumerMaxRate: " + consumerMaxRate); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_CONSUMER_WINDOW_SIZE.equals(reader.getLocalName())) { consumerWindowSize = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory consumerWindowSize: " + consumerWindowSize); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory consumerWindowSize: " + consumerWindowSize); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_DISCOVERY_GROUP_NAME.equals(reader.getLocalName())) { discoveryGroupName = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory discoveryGroupName: " + discoveryGroupName); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory discoveryGroupName: " + discoveryGroupName); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_DUPS_OK_BATCH_SIZE.equals(reader.getLocalName())) { dupsOkBatchSize = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory dupsOkBatchSize: " + dupsOkBatchSize); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory dupsOkBatchSize: " + dupsOkBatchSize); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_GROUP_ID.equals(reader.getLocalName())) { groupId = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory groupId: " + groupId); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory groupId: " + groupId); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_LOAD_BALANCING_POLICY_CLASS_NAME.equals(reader.getLocalName())) { loadBalancingPolicyClassName = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory loadBalancingPolicyClassName: " + loadBalancingPolicyClassName); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory loadBalancingPolicyClassName: " + loadBalancingPolicyClassName); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_MAX_RETRY_INTERVAL.equals(reader.getLocalName())) { maxRetryInterval = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory maxRetryInterval: " + maxRetryInterval); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory maxRetryInterval: " + maxRetryInterval); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_MIN_LARGE_MESSAGE_SIZE.equals(reader.getLocalName())) { minLargeMessageSize = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory minLargeMessageSize: " + minLargeMessageSize); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory minLargeMessageSize: " + minLargeMessageSize); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_NAME.equals(reader.getLocalName())) { name = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory name: " + name); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory name: " + name); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_PRODUCER_MAX_RATE.equals(reader.getLocalName())) { producerMaxRate = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory producerMaxRate: " + producerMaxRate); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory producerMaxRate: " + producerMaxRate); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_PRODUCER_WINDOW_SIZE.equals(reader.getLocalName())) { producerWindowSize = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory producerWindowSize: " + producerWindowSize); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory producerWindowSize: " + producerWindowSize); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_RECONNECT_ATTEMPTS.equals(reader.getLocalName())) { reconnectAttempts = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory reconnectAttempts: " + reconnectAttempts); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory reconnectAttempts: " + reconnectAttempts); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_RETRY_INTERVAL.equals(reader.getLocalName())) { retryInterval = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory retryInterval: " + retryInterval); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory retryInterval: " + retryInterval); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_RETRY_INTERVAL_MULTIPLIER.equals(reader.getLocalName())) { retryIntervalMultiplier = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory retryIntervalMultiplier: " + retryIntervalMultiplier); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory retryIntervalMultiplier: " + retryIntervalMultiplier); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_SCHEDULED_THREAD_POOL_MAX_SIZE.equals(reader.getLocalName())) { scheduledThreadMaxPoolSize = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory scheduledThreadMaxPoolSize: " + scheduledThreadMaxPoolSize); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory scheduledThreadMaxPoolSize: " + scheduledThreadMaxPoolSize); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_THREAD_POOL_MAX_SIZE.equals(reader.getLocalName())) { threadMaxPoolSize = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory threadMaxPoolSize: " + threadMaxPoolSize); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory threadMaxPoolSize: " + threadMaxPoolSize); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_TRANSACTION_BATCH_SIZE.equals(reader.getLocalName())) { transactionBatchSize = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory transactionBatchSize: " + transactionBatchSize); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory transactionBatchSize: " + transactionBatchSize); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_TYPE.equals(reader.getLocalName())) { type = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory type: " + type); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory type: " + type); } else if (XmlDataConstants.JMS_JNDI_ENTRIES.equals(reader.getLocalName())) { entries = getEntries(); - HornetQServerLogger.LOGGER.debug("JMS connection factory entries: " + entries); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory entries: " + entries); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_AUTO_GROUP.equals(reader.getLocalName())) { autoGroup = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory autoGroup: " + autoGroup); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory autoGroup: " + autoGroup); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_BLOCK_ON_ACKNOWLEDGE.equals(reader.getLocalName())) { blockOnAcknowledge = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory blockOnAcknowledge: " + blockOnAcknowledge); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory blockOnAcknowledge: " + blockOnAcknowledge); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_BLOCK_ON_DURABLE_SEND.equals(reader.getLocalName())) { blockOnDurableSend = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory blockOnDurableSend: " + blockOnDurableSend); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory blockOnDurableSend: " + blockOnDurableSend); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_BLOCK_ON_NON_DURABLE_SEND.equals(reader.getLocalName())) { blockOnNonDurableSend = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory blockOnNonDurableSend: " + blockOnNonDurableSend); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory blockOnNonDurableSend: " + blockOnNonDurableSend); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_CACHE_LARGE_MESSAGES_CLIENT.equals(reader.getLocalName())) { cacheLargeMessagesClient = reader.getElementText(); - HornetQServerLogger.LOGGER.info("JMS connection factory " + name + " cacheLargeMessagesClient: " + cacheLargeMessagesClient); + ActiveMQServerLogger.LOGGER.info("JMS connection factory " + name + " cacheLargeMessagesClient: " + cacheLargeMessagesClient); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_COMPRESS_LARGE_MESSAGES.equals(reader.getLocalName())) { compressLargeMessages = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory compressLargeMessages: " + compressLargeMessages); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory compressLargeMessages: " + compressLargeMessages); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_FAILOVER_ON_INITIAL_CONNECTION.equals(reader.getLocalName())) { failoverOnInitialConnection = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory failoverOnInitialConnection: " + failoverOnInitialConnection); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory failoverOnInitialConnection: " + failoverOnInitialConnection); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_HA.equals(reader.getLocalName())) { ha = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory ha: " + ha); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory ha: " + ha); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_PREACKNOWLEDGE.equals(reader.getLocalName())) { preacknowledge = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory preacknowledge: " + preacknowledge); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory preacknowledge: " + preacknowledge); } else if (XmlDataConstants.JMS_CONNECTION_FACTORY_USE_GLOBAL_POOLS.equals(reader.getLocalName())) { useGlobalPools = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS connection factory useGlobalPools: " + useGlobalPools); + ActiveMQServerLogger.LOGGER.debug("JMS connection factory useGlobalPools: " + useGlobalPools); } break; case XMLStreamConstants.END_ELEMENT: @@ -859,7 +859,7 @@ public final class XmlDataImporter reader.next(); } - ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management"); + ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.activemq.management"); ClientMessage managementMessage = managementSession.createMessage(false); ManagementHelper.putOperationInvocation(managementMessage, ResourceNames.JMS_SERVER, @@ -904,11 +904,11 @@ public final class XmlDataImporter ClientMessage reply = requestor.request(managementMessage); if (ManagementHelper.hasOperationSucceeded(reply)) { - HornetQServerLogger.LOGGER.debug("Created connection factory " + name); + ActiveMQServerLogger.LOGGER.debug("Created connection factory " + name); } else { - HornetQServerLogger.LOGGER.error("Problem creating " + name); + ActiveMQServerLogger.LOGGER.error("Problem creating " + name); } requestor.close(); @@ -931,17 +931,17 @@ public final class XmlDataImporter if (XmlDataConstants.JMS_DESTINATION_NAME.equals(reader.getLocalName())) { name = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS destination name: " + name); + ActiveMQServerLogger.LOGGER.debug("JMS destination name: " + name); } else if (XmlDataConstants.JMS_DESTINATION_SELECTOR.equals(reader.getLocalName())) { selector = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS destination selector: " + selector); + ActiveMQServerLogger.LOGGER.debug("JMS destination selector: " + selector); } else if (XmlDataConstants.JMS_DESTINATION_TYPE.equals(reader.getLocalName())) { type = reader.getElementText(); - HornetQServerLogger.LOGGER.debug("JMS destination type: " + type); + ActiveMQServerLogger.LOGGER.debug("JMS destination type: " + type); } else if (XmlDataConstants.JMS_JNDI_ENTRIES.equals(reader.getLocalName())) { @@ -962,7 +962,7 @@ public final class XmlDataImporter reader.next(); } - ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management"); + ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.activemq.management"); ClientMessage managementMessage = managementSession.createMessage(false); if ("Queue".equals(type)) { @@ -976,11 +976,11 @@ public final class XmlDataImporter ClientMessage reply = requestor.request(managementMessage); if (ManagementHelper.hasOperationSucceeded(reply)) { - HornetQServerLogger.LOGGER.debug("Created " + type.toLowerCase() + " " + name); + ActiveMQServerLogger.LOGGER.debug("Created " + type.toLowerCase() + " " + name); } else { - HornetQServerLogger.LOGGER.error("Problem creating " + name); + ActiveMQServerLogger.LOGGER.error("Problem creating " + name); } requestor.close(); @@ -1005,7 +1005,7 @@ public final class XmlDataImporter { entry.append(XmlDataConstants.JNDI_COMPATIBILITY_PREFIX).append(elementText).append(", "); } - HornetQServerLogger.LOGGER.debug("JMS admin object JNDI entry: " + entry.toString()); + ActiveMQServerLogger.LOGGER.debug("JMS admin object JNDI entry: " + entry.toString()); } break; case XMLStreamConstants.END_ELEMENT: diff --git a/docs/user-manual/en/using-jms.xml b/docs/user-manual/en/using-jms.xml index 2c2dce7736..8530cf2d0b 100644 --- a/docs/user-manual/en/using-jms.xml +++ b/docs/user-manual/en/using-jms.xml @@ -151,11 +151,7 @@ <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -<<<<<<< HEAD - xsi:schemaLocation="urn:hornetq ../schemas/activemq-jms.xsd "> -======= xsi:schemaLocation="urn:activemq ../schemas/activemq-jms.xsd "> ->>>>>>> 198a239... ACTIVEMQ6-9 Clean up docs <connection-factory name="ConnectionFactory" signature="queue"> <xa>true</xa> diff --git a/examples/core/embedded-remote/src/main/java/org/apache/activemq/core/example/EmbeddedRemoteExample.java b/examples/core/embedded-remote/src/main/java/org/apache/activemq/core/example/EmbeddedRemoteExample.java index 3bf70bbe18..6164672dcb 100644 --- a/examples/core/embedded-remote/src/main/java/org/apache/activemq/core/example/EmbeddedRemoteExample.java +++ b/examples/core/embedded-remote/src/main/java/org/apache/activemq/core/example/EmbeddedRemoteExample.java @@ -22,13 +22,13 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; /** * - * This example shows how to run a HornetQ core client and server embedded in your + * This example shows how to run a ActiveMQ core client and server embedded in your * own application * * @author Tim Fox @@ -53,7 +53,7 @@ public class EmbeddedRemoteExample map.put("port", 5445); // ------------------------------------------------------- - ServerLocator serverLocator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName(), map)); + ServerLocator serverLocator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName(), map)); ClientSessionFactory sf = serverLocator.createSessionFactory(); // Step 4. Create a core queue diff --git a/examples/core/embedded-remote/src/main/java/org/apache/activemq/core/example/EmbeddedServer.java b/examples/core/embedded-remote/src/main/java/org/apache/activemq/core/example/EmbeddedServer.java index 10c21795ec..2699056488 100644 --- a/examples/core/embedded-remote/src/main/java/org/apache/activemq/core/example/EmbeddedServer.java +++ b/examples/core/embedded-remote/src/main/java/org/apache/activemq/core/example/EmbeddedServer.java @@ -20,8 +20,8 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; /** * An EmbeddedServer @@ -57,7 +57,7 @@ public class EmbeddedServer configuration.setAcceptorConfigurations(setTransp); // Step 2. Create and start the server - HornetQServer server = HornetQServers.newHornetQServer(configuration); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(configuration); server.start(); } catch (Exception e) diff --git a/examples/core/embedded/src/main/java/org/apache/activemq/core/example/EmbeddedExample.java b/examples/core/embedded/src/main/java/org/apache/activemq/core/example/EmbeddedExample.java index 259154a2b2..1651638344 100644 --- a/examples/core/embedded/src/main/java/org/apache/activemq/core/example/EmbeddedExample.java +++ b/examples/core/embedded/src/main/java/org/apache/activemq/core/example/EmbeddedExample.java @@ -20,18 +20,18 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; /** * - * This example shows how to run a HornetQ core client and server embedded in your + * This example shows how to run a ActiveMQ core client and server embedded in your * own application * * @author Tim Fox @@ -53,11 +53,11 @@ public class EmbeddedExample configuration.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName())); // Step 2. Create and start the server - HornetQServer server = HornetQServers.newHornetQServer(configuration); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(configuration); server.start(); // Step 3. As we are not using a JNDI environment we instantiate the objects directly - ServerLocator serverLocator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(InVMConnectorFactory.class.getName())); + ServerLocator serverLocator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(InVMConnectorFactory.class.getName())); ClientSessionFactory sf = serverLocator.createSessionFactory(); // Step 4. Create a core queue diff --git a/examples/core/perf/src/main/java/org/apache/activemq/core/example/PerfBase.java b/examples/core/perf/src/main/java/org/apache/activemq/core/example/PerfBase.java index 9d0eefe081..8335bcb219 100644 --- a/examples/core/perf/src/main/java/org/apache/activemq/core/example/PerfBase.java +++ b/examples/core/perf/src/main/java/org/apache/activemq/core/example/PerfBase.java @@ -29,7 +29,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.SendAcknowledgementHandler; import org.apache.activemq.api.core.client.ServerLocator; @@ -203,7 +203,7 @@ public abstract class PerfBase params.put(TransportConstants.HOST_PROP_NAME, perfParams.getHost()); params.put(TransportConstants.PORT_PROP_NAME, perfParams.getPort()); - ServerLocator serverLocator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName(), params)); + ServerLocator serverLocator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName(), params)); serverLocator.setPreAcknowledge(perfParams.isPreAck()); serverLocator.setConfirmationWindowSize(perfParams.getConfirmationWindow()); serverLocator.setProducerWindowSize(perfParams.getProducerWindow()); diff --git a/examples/core/twitter-connector/src/main/java/org/apache/activemq/core/example/TwitterConnectorExample.java b/examples/core/twitter-connector/src/main/java/org/apache/activemq/core/example/TwitterConnectorExample.java index 3e576d3f53..9113766cb6 100644 --- a/examples/core/twitter-connector/src/main/java/org/apache/activemq/core/example/TwitterConnectorExample.java +++ b/examples/core/twitter-connector/src/main/java/org/apache/activemq/core/example/TwitterConnectorExample.java @@ -18,7 +18,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; @@ -41,13 +41,13 @@ public class TwitterConnectorExample { String testMessage = System.currentTimeMillis() + ": " + System.getProperty("twitter.example.alternativeMessage"); if(testMessage == null || testMessage.trim().equals("")) { - testMessage = System.currentTimeMillis() + ": ### Hello, HornetQ fans!! We are now experiencing so fast, so reliable and so exciting messaging never seen before ;-) ###"; + testMessage = System.currentTimeMillis() + ": ### Hello, ActiveMQ fans!! We are now experiencing so fast, so reliable and so exciting messaging never seen before ;-) ###"; } // Step 1. Create a ClientSessionFactory - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); csf = locator.createSessionFactory(); diff --git a/examples/javaee/ejb-jms-transaction/src/main/java/org/apache/activemq/javaee/example/server/SendMessageBean.java b/examples/javaee/ejb-jms-transaction/src/main/java/org/apache/activemq/javaee/example/server/SendMessageBean.java index e5c69957a5..e43f56d455 100644 --- a/examples/javaee/ejb-jms-transaction/src/main/java/org/apache/activemq/javaee/example/server/SendMessageBean.java +++ b/examples/javaee/ejb-jms-transaction/src/main/java/org/apache/activemq/javaee/example/server/SendMessageBean.java @@ -36,7 +36,7 @@ import javax.sql.DataSource; public class SendMessageBean implements SendMessageService { - private static final String TABLE = "hornetq_example"; + private static final String TABLE = "activemq_example"; public void createTable() throws Exception { diff --git a/examples/javaee/jca-config/src/main/java/org/apache/activemq/javaee/example/server2/MDBQueueB.java b/examples/javaee/jca-config/src/main/java/org/apache/activemq/javaee/example/server2/MDBQueueB.java index 54f201e6e5..6d50572d39 100644 --- a/examples/javaee/jca-config/src/main/java/org/apache/activemq/javaee/example/server2/MDBQueueB.java +++ b/examples/javaee/jca-config/src/main/java/org/apache/activemq/javaee/example/server2/MDBQueueB.java @@ -33,7 +33,7 @@ import javax.jms.TextMessage; @ActivationConfigProperty(propertyName = "destination", propertyValue = "B"), @ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "false") }) -@ResourceAdapter("hornetq-ra-remote.rar") +@ResourceAdapter("activemq-ra-remote.rar") public class MDBQueueB implements MessageListener { public void onMessage(Message message) diff --git a/examples/javaee/jca-config/src/main/java/org/apache/activemq/javaee/example/server2/StatelessSender.java b/examples/javaee/jca-config/src/main/java/org/apache/activemq/javaee/example/server2/StatelessSender.java index 6741a71089..c08f6574ec 100644 --- a/examples/javaee/jca-config/src/main/java/org/apache/activemq/javaee/example/server2/StatelessSender.java +++ b/examples/javaee/jca-config/src/main/java/org/apache/activemq/javaee/example/server2/StatelessSender.java @@ -12,8 +12,8 @@ */ package org.apache.activemq.javaee.example.server2; -import org.apache.activemq.api.jms.HornetQJMSClient; -import org.apache.activemq.ra.HornetQRAConnectionFactoryImpl; +import org.apache.activemq.api.jms.ActiveMQJMSClient; +import org.apache.activemq.ra.ActiveMQRAConnectionFactoryImpl; import javax.annotation.Resource; import javax.ejb.Remote; @@ -35,8 +35,8 @@ public class StatelessSender implements StatelessSenderService public void sendHello(String message) throws Exception { // Step 4. Define the destinations that will receive the message (instead of using JNDI to the remote server) - Queue destQueueA = HornetQJMSClient.createQueue("A"); - Queue destQueueB = HornetQJMSClient.createQueue("B"); + Queue destQueueA = ActiveMQJMSClient.createQueue("A"); + Queue destQueueB = ActiveMQJMSClient.createQueue("B"); // Step 5. Create a connection to a remote server using a connection-factory (look at the deployed file jms-remote-ds.xml) Connection conn = connectionFactory.createConnection("guest", "password"); diff --git a/examples/javaee/jca-remote/src/main/java/org/apache/activemq/javaee/example/server/MDBQueue.java b/examples/javaee/jca-remote/src/main/java/org/apache/activemq/javaee/example/server/MDBQueue.java index d208fc637d..0a304e3d77 100644 --- a/examples/javaee/jca-remote/src/main/java/org/apache/activemq/javaee/example/server/MDBQueue.java +++ b/examples/javaee/jca-remote/src/main/java/org/apache/activemq/javaee/example/server/MDBQueue.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.javaee.example.server; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.jboss.ejb3.annotation.ResourceAdapter; import javax.annotation.Resource; @@ -33,7 +33,7 @@ import javax.jms.*; @ActivationConfigProperty(propertyName = "destination", propertyValue = "mdbQueue"), @ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "false") }) -@ResourceAdapter("hornetq-ra-remote.rar") +@ResourceAdapter("activemq-ra-remote.rar") public class MDBQueue implements MessageListener { @Resource(mappedName="java:/RemoteJmsXA") @@ -49,7 +49,7 @@ public class MDBQueue implements MessageListener String text = tm.getText(); // Step 9. look up the reply queue - Queue destQueue = HornetQJMSClient.createQueue("mdbReplyQueue"); + Queue destQueue = ActiveMQJMSClient.createQueue("mdbReplyQueue"); // Step 10. Create a connection Connection connection = connectionFactory.createConnection(); diff --git a/examples/javaee/mdb-remote-failover-static/src/main/java/org/apache/activemq/javaee/example/server/MDBRemoteFailoverStaticExample.java b/examples/javaee/mdb-remote-failover-static/src/main/java/org/apache/activemq/javaee/example/server/MDBRemoteFailoverStaticExample.java index 4d2d66e41e..244b86df2b 100644 --- a/examples/javaee/mdb-remote-failover-static/src/main/java/org/apache/activemq/javaee/example/server/MDBRemoteFailoverStaticExample.java +++ b/examples/javaee/mdb-remote-failover-static/src/main/java/org/apache/activemq/javaee/example/server/MDBRemoteFailoverStaticExample.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.javaee.example.server; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.jboss.ejb3.annotation.ResourceAdapter; import javax.annotation.Resource; @@ -31,7 +31,7 @@ import javax.jms.*; @ActivationConfigProperty(propertyName = "hA", propertyValue = "true"), @ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "false") }) -@ResourceAdapter("hornetq-remote-ra.rar") +@ResourceAdapter("activemq-remote-ra.rar") public class MDBRemoteFailoverStaticExample implements MessageListener { @Resource(mappedName = "java:/RemoteJmsXA") @@ -43,7 +43,7 @@ public class MDBRemoteFailoverStaticExample implements MessageListener Connection conn = null; try { - replyQueue = HornetQJMSClient.createQueue("outQueue"); + replyQueue = ActiveMQJMSClient.createQueue("outQueue"); //Step 9. We know the client is sending a text message so we cast TextMessage textMessage = (TextMessage)message; diff --git a/examples/javaee/mdb-remote-failover/src/main/java/org/apache/activemq/javaee/example/server/MDBRemoteFailoverExample.java b/examples/javaee/mdb-remote-failover/src/main/java/org/apache/activemq/javaee/example/server/MDBRemoteFailoverExample.java index 432b0ae593..95e200975c 100644 --- a/examples/javaee/mdb-remote-failover/src/main/java/org/apache/activemq/javaee/example/server/MDBRemoteFailoverExample.java +++ b/examples/javaee/mdb-remote-failover/src/main/java/org/apache/activemq/javaee/example/server/MDBRemoteFailoverExample.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.javaee.example.server; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.jboss.ejb3.annotation.ResourceAdapter; import javax.annotation.Resource; @@ -36,7 +36,7 @@ import javax.jms.*; @ActivationConfigProperty(propertyName = "hA", propertyValue = "true"), @ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "false") }) -@ResourceAdapter("hornetq-remote-ra.rar") +@ResourceAdapter("activemq-remote-ra.rar") public class MDBRemoteFailoverExample implements MessageListener { @@ -49,7 +49,7 @@ public class MDBRemoteFailoverExample implements MessageListener Connection conn = null; try { - replyQueue = HornetQJMSClient.createQueue("outQueue"); + replyQueue = ActiveMQJMSClient.createQueue("outQueue"); //Step 9. We know the client is sending a text message so we cast TextMessage textMessage = (TextMessage)message; diff --git a/examples/jms/activemq-jms-examples-common/src/main/java/org/apache/activemq/common/example/HornetQExample.java b/examples/jms/activemq-jms-examples-common/src/main/java/org/apache/activemq/common/example/ActiveMQExample.java similarity index 91% rename from examples/jms/activemq-jms-examples-common/src/main/java/org/apache/activemq/common/example/HornetQExample.java rename to examples/jms/activemq-jms-examples-common/src/main/java/org/apache/activemq/common/example/ActiveMQExample.java index a7f170317a..ba59d9fd01 100644 --- a/examples/jms/activemq-jms-examples-common/src/main/java/org/apache/activemq/common/example/HornetQExample.java +++ b/examples/jms/activemq-jms-examples-common/src/main/java/org/apache/activemq/common/example/ActiveMQExample.java @@ -22,24 +22,24 @@ import javax.naming.InitialContext; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.client.impl.DelegatingSession; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; -import org.apache.activemq.jms.client.HornetQConnection; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnection; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; /** - * Base class for HornetQ examples. + * Base class for ActiveMQ examples. *

    * This takes care of starting and stopping the server as well as deploying any * queue needed. * * @author Andy Taylor */ -public abstract class HornetQExample +public abstract class ActiveMQExample { - protected static final Logger log = Logger.getLogger(HornetQExample.class + protected static final Logger log = Logger.getLogger(ActiveMQExample.class .getName()); protected boolean failure = false; @@ -158,7 +158,7 @@ public abstract class HornetQExample params.put("host", "localhost"); params.put("port", 5445 + id); TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName(), params); - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transportConfiguration); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transportConfiguration); cf.createConnection().close(); System.out.println("server restarted"); } @@ -174,7 +174,7 @@ public abstract class HornetQExample protected InitialContext getContext(final int serverId) throws Exception { - HornetQExample.log.info("using " + args[serverId] + " for jndi"); + ActiveMQExample.log.info("using " + args[serverId] + " for jndi"); Properties props = new Properties(); props.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory"); props.put("java.naming.provider.url", args[serverId]); @@ -184,7 +184,7 @@ public abstract class HornetQExample protected int getServer(Connection connection) { - ClientSession session = ((HornetQConnection) connection).getInitialSession(); + ClientSession session = ((ActiveMQConnection) connection).getInitialSession(); TransportConfiguration transportConfiguration = session.getSessionFactory().getConnectorConfiguration(); String port = (String) transportConfiguration.getParams().get("port"); return Integer.valueOf(port) - 5445; @@ -194,7 +194,7 @@ public abstract class HornetQExample { for (Connection connection : connections) { - ClientSession session = ((HornetQConnection) connection).getInitialSession(); + ClientSession session = ((ActiveMQConnection) connection).getInitialSession(); TransportConfiguration transportConfiguration = session.getSessionFactory().getConnectorConfiguration(); String port = (String) transportConfiguration.getParams().get("port"); if(Integer.valueOf(port) == server + 5445) diff --git a/examples/jms/aerogear/src/main/java/org/apache/activemq/jms/example/AerogearExample.java b/examples/jms/aerogear/src/main/java/org/apache/activemq/jms/example/AerogearExample.java index c000ddfffc..b0832b8c34 100644 --- a/examples/jms/aerogear/src/main/java/org/apache/activemq/jms/example/AerogearExample.java +++ b/examples/jms/aerogear/src/main/java/org/apache/activemq/jms/example/AerogearExample.java @@ -22,14 +22,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS Queue example that creates a producer and consumer on a queue and sends then receives a message. * * @author Andy Taylor */ -public class AerogearExample extends HornetQExample +public class AerogearExample extends ActiveMQExample { public static void main(final String[] args) { @@ -64,7 +64,7 @@ public class AerogearExample extends HornetQExample // Step 7. Create a Text Message Message message = session.createMessage(); - message.setStringProperty("AEROGEAR_ALERT", "Hello this is a notification from HornetQ"); + message.setStringProperty("AEROGEAR_ALERT", "Hello this is a notification from ActiveMQ"); producer.send(message); diff --git a/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/AppletExample.java b/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/AppletExample.java index 9f901414e3..725711fa50 100644 --- a/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/AppletExample.java +++ b/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/AppletExample.java @@ -43,7 +43,7 @@ import javax.swing.SwingConstants; import javax.swing.SwingUtilities; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; @@ -106,8 +106,8 @@ public class AppletExample extends JApplet implements ActionListener Map params = new HashMap(); TransportConfiguration connector = new TransportConfiguration(NettyConnectorFactory.class.getName(), params); - ConnectionFactory cf = (ConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, connector); - destination = HornetQJMSClient.createTopic("exampleTopic"); + ConnectionFactory cf = (ConnectionFactory)ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, connector); + destination = ActiveMQJMSClient.createTopic("exampleTopic"); try { diff --git a/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServer.java b/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServer.java index 5b5646e5af..40de392b48 100644 --- a/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServer.java +++ b/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServer.java @@ -15,7 +15,7 @@ package org.apache.activemq.jms.example; import java.net.InetSocketAddress; import java.util.concurrent.Executors; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; import org.jboss.netty.bootstrap.ServerBootstrap; import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory; @@ -28,7 +28,7 @@ import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory; * * */ -public class HttpStaticFileServer extends HornetQExample +public class HttpStaticFileServer extends ActiveMQExample { public static void main(final String[] args) diff --git a/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/jms/example/ApplicationLayerFailoverExample.java b/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/jms/example/ApplicationLayerFailoverExample.java index f40cfd4c68..95c2ed8a70 100644 --- a/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/jms/example/ApplicationLayerFailoverExample.java +++ b/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/jms/example/ApplicationLayerFailoverExample.java @@ -26,7 +26,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple example that demonstrates application-layer failover of the JMS connection from one node to another @@ -34,7 +34,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Tim Fox */ -public class BridgeExample extends HornetQExample +public class BridgeExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/browser/src/main/java/org/apache/activemq/jms/example/QueueBrowserExample.java b/examples/jms/browser/src/main/java/org/apache/activemq/jms/example/QueueBrowserExample.java index 30f248b3da..80d78ca848 100644 --- a/examples/jms/browser/src/main/java/org/apache/activemq/jms/example/QueueBrowserExample.java +++ b/examples/jms/browser/src/main/java/org/apache/activemq/jms/example/QueueBrowserExample.java @@ -24,7 +24,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple example which shows how to use a QueueBrowser to look at messages of a queue without removing them from the queue @@ -33,7 +33,7 @@ import org.apache.activemq.common.example.HornetQExample; * * */ -public class QueueBrowserExample extends HornetQExample +public class QueueBrowserExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/client-kickoff/src/main/java/org/apache/activemq/jms/example/ClientKickoffExample.java b/examples/jms/client-kickoff/src/main/java/org/apache/activemq/jms/example/ClientKickoffExample.java index 36a5426923..3a87bca46b 100644 --- a/examples/jms/client-kickoff/src/main/java/org/apache/activemq/jms/example/ClientKickoffExample.java +++ b/examples/jms/client-kickoff/src/main/java/org/apache/activemq/jms/example/ClientKickoffExample.java @@ -27,16 +27,16 @@ import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; import javax.naming.InitialContext; -import org.apache.activemq.api.core.management.HornetQServerControl; +import org.apache.activemq.api.core.management.ActiveMQServerControl; import org.apache.activemq.api.core.management.ObjectNameBuilder; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** - * An example that shows how to kick off a client connected to HornetQ by using JMX. + * An example that shows how to kick off a client connected to ActiveMQ by using JMX. * * @author Jeff Mesnil */ -public class ClientKickoffExample extends HornetQExample +public class ClientKickoffExample extends ActiveMQExample { private static final String JMX_URL = "service:jmx:rmi:///jndi/rmi://localhost:3000/jmxrmi"; @@ -75,13 +75,13 @@ public class ClientKickoffExample extends HornetQExample // Step 5. We start the connection connection.start(); - // Step 6. Create a HornetQServerControlMBean proxy to manage the server - ObjectName on = ObjectNameBuilder.DEFAULT.getHornetQServerObjectName(); + // Step 6. Create a ActiveMQServerControlMBean proxy to manage the server + ObjectName on = ObjectNameBuilder.DEFAULT.getActiveMQServerObjectName(); JMXConnector connector = JMXConnectorFactory.connect(new JMXServiceURL(JMX_URL), new HashMap()); MBeanServerConnection mbsc = connector.getMBeanServerConnection(); - HornetQServerControl serverControl = MBeanServerInvocationHandler.newProxyInstance(mbsc, + ActiveMQServerControl serverControl = MBeanServerInvocationHandler.newProxyInstance(mbsc, on, - HornetQServerControl.class, + ActiveMQServerControl.class, false); // Step 7. List the remote address connected to the server diff --git a/examples/jms/client-side-failoverlistener/src/main/java/org/apache/activemq/jms/example/ClientSideFailoverListerExample.java b/examples/jms/client-side-failoverlistener/src/main/java/org/apache/activemq/jms/example/ClientSideFailoverListerExample.java index 55af2e3e0a..94c9df2e2c 100644 --- a/examples/jms/client-side-failoverlistener/src/main/java/org/apache/activemq/jms/example/ClientSideFailoverListerExample.java +++ b/examples/jms/client-side-failoverlistener/src/main/java/org/apache/activemq/jms/example/ClientSideFailoverListerExample.java @@ -23,8 +23,8 @@ import javax.naming.InitialContext; import org.apache.activemq.api.core.client.FailoverEventListener; import org.apache.activemq.api.core.client.FailoverEventType; -import org.apache.activemq.common.example.HornetQExample; -import org.apache.activemq.jms.client.HornetQConnection; +import org.apache.activemq.common.example.ActiveMQExample; +import org.apache.activemq.jms.client.ActiveMQConnection; /** * This example demonstrates how you can listen on failover event on the client side @@ -34,7 +34,7 @@ import org.apache.activemq.jms.client.HornetQConnection; * * @author Tim Fox */ -public class ClientSideLoadBalancingExample extends HornetQExample +public class ClientSideLoadBalancingExample extends ActiveMQExample { public static void main(final String[] args) { @@ -75,9 +75,9 @@ public class ClientSideLoadBalancingExample extends HornetQExample Session sessionB = connectionB.createSession(false, Session.AUTO_ACKNOWLEDGE); Session sessionC = connectionC.createSession(false, Session.AUTO_ACKNOWLEDGE); - System.out.println("Session A - " + ((org.apache.activemq.core.client.impl.DelegatingSession) ((org.apache.activemq.jms.client.HornetQSession) sessionA).getCoreSession()).getConnection().getRemoteAddress() ); - System.out.println("Session B - " + ((org.apache.activemq.core.client.impl.DelegatingSession) ((org.apache.activemq.jms.client.HornetQSession) sessionB).getCoreSession()).getConnection().getRemoteAddress() ); - System.out.println("Session C - " + ((org.apache.activemq.core.client.impl.DelegatingSession) ((org.apache.activemq.jms.client.HornetQSession) sessionC).getCoreSession()).getConnection().getRemoteAddress() ); + System.out.println("Session A - " + ((org.apache.activemq.core.client.impl.DelegatingSession) ((org.apache.activemq.jms.client.ActiveMQSession) sessionA).getCoreSession()).getConnection().getRemoteAddress() ); + System.out.println("Session B - " + ((org.apache.activemq.core.client.impl.DelegatingSession) ((org.apache.activemq.jms.client.ActiveMQSession) sessionB).getCoreSession()).getConnection().getRemoteAddress() ); + System.out.println("Session C - " + ((org.apache.activemq.core.client.impl.DelegatingSession) ((org.apache.activemq.jms.client.ActiveMQSession) sessionC).getCoreSession()).getConnection().getRemoteAddress() ); // Step 6. We create JMS MessageProducer objects on the sessions MessageProducer producerA = sessionA.createProducer(queue); diff --git a/examples/jms/clustered-durable-subscription/src/main/java/org/apache/activemq/jms/example/ClusteredDurableSubscriptionExample.java b/examples/jms/clustered-durable-subscription/src/main/java/org/apache/activemq/jms/example/ClusteredDurableSubscriptionExample.java index c5240592d0..aae02ebc48 100644 --- a/examples/jms/clustered-durable-subscription/src/main/java/org/apache/activemq/jms/example/ClusteredDurableSubscriptionExample.java +++ b/examples/jms/clustered-durable-subscription/src/main/java/org/apache/activemq/jms/example/ClusteredDurableSubscriptionExample.java @@ -21,7 +21,7 @@ import javax.jms.TextMessage; import javax.jms.Topic; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple example that shows a JMS Durable Subscription across two nodes of a cluster. @@ -31,7 +31,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Tim Fox */ -public class ClusteredGroupingExample extends HornetQExample +public class ClusteredGroupingExample extends ActiveMQExample { public static void main(String[] args) { diff --git a/examples/jms/clustered-jgroups/src/main/java/org/apache/activemq/jms/example/ClusteredJgroupsExample.java b/examples/jms/clustered-jgroups/src/main/java/org/apache/activemq/jms/example/ClusteredJgroupsExample.java index cfa2fdc50d..d50d990db6 100644 --- a/examples/jms/clustered-jgroups/src/main/java/org/apache/activemq/jms/example/ClusteredJgroupsExample.java +++ b/examples/jms/clustered-jgroups/src/main/java/org/apache/activemq/jms/example/ClusteredJgroupsExample.java @@ -21,7 +21,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple example that demonstrates clustering using jgroups. @@ -29,7 +29,7 @@ import org.apache.activemq.common.example.HornetQExample; * @author Howard Gao */ -public class ClusteredJgroupsExample extends HornetQExample +public class ClusteredJgroupsExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/clustered-queue/src/main/java/org/apache/activemq/jms/example/ClusteredQueueExample.java b/examples/jms/clustered-queue/src/main/java/org/apache/activemq/jms/example/ClusteredQueueExample.java index c70b31f26d..2ea90d3348 100644 --- a/examples/jms/clustered-queue/src/main/java/org/apache/activemq/jms/example/ClusteredQueueExample.java +++ b/examples/jms/clustered-queue/src/main/java/org/apache/activemq/jms/example/ClusteredQueueExample.java @@ -21,7 +21,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple example that demonstrates server side load-balancing of messages between the queue instances on different @@ -29,7 +29,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Jeff Mesnil */ -public class StaticClusteredQueueExample extends HornetQExample +public class StaticClusteredQueueExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/clustered-static-oneway/src/main/java/org/apache/activemq/jms/example/ClusterStaticOnewayExample.java b/examples/jms/clustered-static-oneway/src/main/java/org/apache/activemq/jms/example/ClusterStaticOnewayExample.java index 326a8e5837..4936e5f9e9 100644 --- a/examples/jms/clustered-static-oneway/src/main/java/org/apache/activemq/jms/example/ClusterStaticOnewayExample.java +++ b/examples/jms/clustered-static-oneway/src/main/java/org/apache/activemq/jms/example/ClusterStaticOnewayExample.java @@ -21,7 +21,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple example that demonstrates server side load-balancing of messages between the queue instances on different @@ -29,7 +29,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Jeff Mesnil */ -public class ClusterStaticOnewayExample extends HornetQExample +public class ClusterStaticOnewayExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/clustered-topic/src/main/java/org/apache/activemq/jms/example/ClusteredTopicExample.java b/examples/jms/clustered-topic/src/main/java/org/apache/activemq/jms/example/ClusteredTopicExample.java index 02ee1a6e7e..31675f1a58 100644 --- a/examples/jms/clustered-topic/src/main/java/org/apache/activemq/jms/example/ClusteredTopicExample.java +++ b/examples/jms/clustered-topic/src/main/java/org/apache/activemq/jms/example/ClusteredTopicExample.java @@ -21,7 +21,7 @@ import javax.jms.TextMessage; import javax.jms.Topic; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple example that shows a JMS Topic clustered across two nodes of a cluster. @@ -29,7 +29,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Tim Fox */ -public class ColocatedFailoverScaleDownExample extends HornetQExample +public class ColocatedFailoverScaleDownExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/colocated-failover/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverExample.java b/examples/jms/colocated-failover/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverExample.java index 4d01648c70..f23aeb263a 100644 --- a/examples/jms/colocated-failover/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverExample.java +++ b/examples/jms/colocated-failover/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverExample.java @@ -21,13 +21,13 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple example that demonstrates a colocated server * */ -public class ColocatedFailoverExample extends HornetQExample +public class ColocatedFailoverExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/consumer-rate-limit/src/main/java/org/apache/activemq/jms/example/ConsumerRateLimitExample.java b/examples/jms/consumer-rate-limit/src/main/java/org/apache/activemq/jms/example/ConsumerRateLimitExample.java index 927d438310..671646082e 100644 --- a/examples/jms/consumer-rate-limit/src/main/java/org/apache/activemq/jms/example/ConsumerRateLimitExample.java +++ b/examples/jms/consumer-rate-limit/src/main/java/org/apache/activemq/jms/example/ConsumerRateLimitExample.java @@ -21,7 +21,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * This example demonstrates how a message consumer can be limited to consumer messages at a maximum rate @@ -29,7 +29,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Tim Fox */ -public class ConsumerRateLimitExample extends HornetQExample +public class ConsumerRateLimitExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/dead-letter/src/main/java/org/apache/activemq/jms/example/DeadLetterExample.java b/examples/jms/dead-letter/src/main/java/org/apache/activemq/jms/example/DeadLetterExample.java index b214ffc178..64bccdfc45 100644 --- a/examples/jms/dead-letter/src/main/java/org/apache/activemq/jms/example/DeadLetterExample.java +++ b/examples/jms/dead-letter/src/main/java/org/apache/activemq/jms/example/DeadLetterExample.java @@ -21,7 +21,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * An example showing how messages are moved to dead letter destination when they are unsuccessfully delivered multiple times @@ -29,7 +29,7 @@ import org.apache.activemq.common.example.HornetQExample; * @author Jeff Mesnil * */ -public class DeadLetterExample extends HornetQExample +public class DeadLetterExample extends ActiveMQExample { public static void main(final String[] args) { @@ -120,7 +120,7 @@ public class DeadLetterExample extends HornetQExample // The message received from the dead letter queue has the same content than the undelivered message but its // JMS headers // differ (from JMS point of view, it's not the same message). - // HornetQ defines additional properties for messages received from the dead letter queue + // ActiveMQ defines additional properties for messages received from the dead letter queue System.out.println(); // Step 21. the messageReceived's destination is now the dead letter queue. diff --git a/examples/jms/delayed-redelivery/src/main/java/org/apache/activemq/jms/example/DelayedRedeliveryExample.java b/examples/jms/delayed-redelivery/src/main/java/org/apache/activemq/jms/example/DelayedRedeliveryExample.java index 53001eee4f..109a142a92 100644 --- a/examples/jms/delayed-redelivery/src/main/java/org/apache/activemq/jms/example/DelayedRedeliveryExample.java +++ b/examples/jms/delayed-redelivery/src/main/java/org/apache/activemq/jms/example/DelayedRedeliveryExample.java @@ -21,10 +21,10 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** - * This example demonstrates how HornetQ can be configured with a redelivery delay in the event a message + * This example demonstrates how ActiveMQ can be configured with a redelivery delay in the event a message * is redelivered. * * Please see the readme.html for more information @@ -32,7 +32,7 @@ import org.apache.activemq.common.example.HornetQExample; * @author Tim Fox * */ -public class DelayedRedeliveryExample extends HornetQExample +public class DelayedRedeliveryExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java b/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java index 74bf343d2b..b30069d811 100644 --- a/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java +++ b/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java @@ -23,17 +23,17 @@ import javax.jms.TextMessage; import javax.jms.Topic; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** - * This examples demonstrates the use of HornetQ "Diverts" to transparently divert or copy messages + * This examples demonstrates the use of ActiveMQ "Diverts" to transparently divert or copy messages * from one address to another. * * Please see the readme.html for more information. * * @author Tim Fox */ -public class DivertExample extends HornetQExample +public class DivertExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/durable-subscription/src/main/java/org/apache/activemq/jms/example/DurableSubscriptionExample.java b/examples/jms/durable-subscription/src/main/java/org/apache/activemq/jms/example/DurableSubscriptionExample.java index a0bc42faef..ed8e476b87 100644 --- a/examples/jms/durable-subscription/src/main/java/org/apache/activemq/jms/example/DurableSubscriptionExample.java +++ b/examples/jms/durable-subscription/src/main/java/org/apache/activemq/jms/example/DurableSubscriptionExample.java @@ -21,14 +21,14 @@ import javax.jms.Topic; import javax.jms.TopicSubscriber; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS example that shows how to use a durable subscription. * * @author Howard Gao */ -public class DurableSubscriptionExample extends HornetQExample +public class DurableSubscriptionExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java b/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java index 7c7ec0b0a7..22aa4b2b6c 100644 --- a/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java +++ b/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java @@ -22,16 +22,16 @@ import javax.jms.Queue; import javax.jms.Session; import javax.jms.TextMessage; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; import org.apache.activemq.jms.server.embedded.EmbeddedJMS; /** - * This example demonstrates how to run a HornetQ embedded with JMS + * This example demonstrates how to run a ActiveMQ embedded with JMS * * @author Clebert Suconic * @author Jeff Mesnil */ -public class EmbeddedExample extends HornetQExample +public class EmbeddedExample extends ActiveMQExample { public static void main(final String[] args) throws Exception diff --git a/examples/jms/embedded/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java b/examples/jms/embedded/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java index c1578a80fe..b2194d2839 100644 --- a/examples/jms/embedded/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java +++ b/examples/jms/embedded/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java @@ -24,7 +24,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; @@ -38,13 +38,13 @@ import org.apache.activemq.jms.server.config.impl.JMSQueueConfigurationImpl; import org.apache.activemq.jms.server.embedded.EmbeddedJMS; /** - * This example demonstrates how to run a HornetQ embedded with JMS + * This example demonstrates how to run a ActiveMQ embedded with JMS * * @author Clebert Suconic * @author Jeff Mesnil * @author Bill Burke */ -public final class EmbeddedExample extends HornetQExample +public final class EmbeddedExample extends ActiveMQExample { public static void main(final String[] args) throws Exception @@ -58,7 +58,7 @@ public final class EmbeddedExample extends HornetQExample try { - // Step 1. Create HornetQ core configuration, and set the properties accordingly + // Step 1. Create ActiveMQ core configuration, and set the properties accordingly Configuration configuration = new ConfigurationImpl(); configuration.setPersistenceEnabled(false); configuration.setJournalDirectory("target/data/journal"); @@ -84,7 +84,7 @@ public final class EmbeddedExample extends HornetQExample JMSQueueConfiguration queueConfig = new JMSQueueConfigurationImpl("queue1", null, false, "/queue/queue1"); jmsConfig.getQueueConfigurations().add(queueConfig); - // Step 5. Start the JMS Server using the HornetQ core server and the JMS configuration + // Step 5. Start the JMS Server using the ActiveMQ core server and the JMS configuration EmbeddedJMS jmsServer = new EmbeddedJMS(); jmsServer.setConfiguration(configuration); jmsServer.setJmsConfiguration(jmsConfig); diff --git a/examples/jms/expiry/src/main/java/org/apache/activemq/jms/example/ExpiryExample.java b/examples/jms/expiry/src/main/java/org/apache/activemq/jms/example/ExpiryExample.java index 3a5d3b43bc..1d8c5bb8c4 100644 --- a/examples/jms/expiry/src/main/java/org/apache/activemq/jms/example/ExpiryExample.java +++ b/examples/jms/expiry/src/main/java/org/apache/activemq/jms/example/ExpiryExample.java @@ -21,7 +21,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * An example showing how messages are moved to an expiry queue when they expire. @@ -29,7 +29,7 @@ import org.apache.activemq.common.example.HornetQExample; * @author Jeff Mesnil * */ -public class ExpiryExample extends HornetQExample +public class ExpiryExample extends ActiveMQExample { public static void main(final String[] args) { @@ -101,7 +101,7 @@ public class ExpiryExample extends HornetQExample // The message received from the expiry queue has the same content than the expired message but its JMS headers // differ // (from JMS point of view, it's not the same message). - // HornetQ defines additional properties to correlate the message received from the expiry queue with the + // ActiveMQ defines additional properties to correlate the message received from the expiry queue with the // message expired from the queue System.out.println(); diff --git a/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java b/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java index e3aaf3e3de..63f2320e88 100644 --- a/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java +++ b/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java @@ -24,9 +24,9 @@ import javax.naming.InitialContext; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClusterTopologyListener; import org.apache.activemq.api.core.client.TopologyMember; -import org.apache.activemq.common.example.HornetQExample; -import org.apache.activemq.jms.client.HornetQConnection; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.common.example.ActiveMQExample; +import org.apache.activemq.jms.client.ActiveMQConnection; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import java.util.ArrayList; import java.util.List; @@ -38,7 +38,7 @@ import java.util.concurrent.TimeUnit; * nodes of the cluster. * */ -public class HAPolicyAutoBackupExample extends HornetQExample +public class HAPolicyAutoBackupExample extends ActiveMQExample { public static void main(final String[] args) { @@ -149,7 +149,7 @@ public class HAPolicyAutoBackupExample extends HornetQExample private void waitForBackups(ConnectionFactory cf0, int backups) throws InterruptedException { final CountDownLatch latch = new CountDownLatch(backups); - ((HornetQConnectionFactory) cf0).getServerLocator().addClusterTopologyListener(new ClusterTopologyListener() + ((ActiveMQConnectionFactory) cf0).getServerLocator().addClusterTopologyListener(new ClusterTopologyListener() { List backups = new ArrayList(); @Override diff --git a/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java b/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java index 6fa43b34e5..518e7e15d5 100644 --- a/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java +++ b/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java @@ -21,14 +21,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS Queue example that uses HTTP protocol. * * @author Howard Gao */ -public class HttpTransportExample extends HornetQExample +public class HttpTransportExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/instantiate-connection-factory/src/main/java/org/apache/activemq/jms/example/InstantiateConnectionFactoryExample.java b/examples/jms/instantiate-connection-factory/src/main/java/org/apache/activemq/jms/example/InstantiateConnectionFactoryExample.java index e03b3e017b..d2f1593f67 100644 --- a/examples/jms/instantiate-connection-factory/src/main/java/org/apache/activemq/jms/example/InstantiateConnectionFactoryExample.java +++ b/examples/jms/instantiate-connection-factory/src/main/java/org/apache/activemq/jms/example/InstantiateConnectionFactoryExample.java @@ -24,9 +24,9 @@ import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; @@ -40,7 +40,7 @@ import org.apache.activemq.core.remoting.impl.netty.TransportConstants; * @author Tim Fox * */ -public class InstantiateConnectionFactoryExample extends HornetQExample +public class InstantiateConnectionFactoryExample extends ActiveMQExample { public static void main(final String[] args) { @@ -54,7 +54,7 @@ public class InstantiateConnectionFactoryExample extends HornetQExample try { // Step 1. Directly instantiate the JMS Queue object. - Queue queue = HornetQJMSClient.createQueue("exampleQueue"); + Queue queue = ActiveMQJMSClient.createQueue("exampleQueue"); // Step 2. Instantiate the TransportConfiguration object which contains the knowledge of what transport to use, // The server port etc. @@ -66,7 +66,7 @@ public class InstantiateConnectionFactoryExample extends HornetQExample connectionParams); // Step 3 Directly instantiate the JMS ConnectionFactory object using that TransportConfiguration - ConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transportConfiguration); + ConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transportConfiguration); // Step 4.Create a JMS Connection connection = cf.createConnection(); diff --git a/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java b/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java index 4cb91fed43..c9c4a2b74b 100644 --- a/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java +++ b/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java @@ -21,14 +21,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** - * A simple JMS example that shows how to implement and use interceptors with HornetQ. + * A simple JMS example that shows how to implement and use interceptors with ActiveMQ. * * @author Howard Gao */ -public class InterceptorExample extends HornetQExample +public class InterceptorExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java b/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java index 7f33a066f3..81aae5b4d9 100644 --- a/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java +++ b/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java @@ -21,15 +21,15 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS Queue example that creates a producer and consumer on a queue and sends then receives a message. - * The HornetQ server is configured to use JAAS. + * The ActiveMQ server is configured to use JAAS. * * @author Jeff Mesnil */ -public class JAASExample extends HornetQExample +public class JAASExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java b/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java index e582b36c14..3a0a88f3f3 100644 --- a/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java +++ b/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java @@ -15,14 +15,14 @@ package org.apache.activemq.jms.example; import javax.jms.*; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS example that shows how AutoCloseable is used by JMS 2 resources. * * @author Andy Taylor */ -public class JMSAutoCloseableExample extends HornetQExample +public class JMSAutoCloseableExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java b/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java index 4b8b26fa07..a83a070149 100644 --- a/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java +++ b/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java @@ -33,7 +33,7 @@ import javax.naming.InitialContext; /** * An example which sends a message to a source topic and consume from a target queue. - * The source and target destinations are located on 2 different HornetQ server. + * The source and target destinations are located on 2 different ActiveMQ server. * The source and target queues are bridged by a JMS Bridge configured and running on the "target" server. * * @author Jeff Mesnil diff --git a/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/jms/example/JMSCompletionListenerExample.java b/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/jms/example/JMSCompletionListenerExample.java index b99b2a6a47..8f516a51ec 100644 --- a/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/jms/example/JMSCompletionListenerExample.java +++ b/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/jms/example/JMSCompletionListenerExample.java @@ -20,7 +20,7 @@ import javax.jms.Message; import javax.jms.Queue; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -30,7 +30,7 @@ import java.util.concurrent.TimeUnit; * * @author Andy Taylor */ -public class JMSCompletionListenerExample extends HornetQExample +public class JMSCompletionListenerExample extends ActiveMQExample { public static void main(final String[] args) { @@ -67,7 +67,7 @@ public class JMSCompletionListenerExample extends HornetQExample @Override public void onCompletion(Message message) { - System.out.println("message acknowledged by HornetQ"); + System.out.println("message acknowledged by ActiveMQ"); latch.countDown(); } diff --git a/examples/jms/jms-context/src/main/java/org/apache/activemq/jms/example/JMSContextExample.java b/examples/jms/jms-context/src/main/java/org/apache/activemq/jms/example/JMSContextExample.java index 1c65371353..8eab65d99d 100644 --- a/examples/jms/jms-context/src/main/java/org/apache/activemq/jms/example/JMSContextExample.java +++ b/examples/jms/jms-context/src/main/java/org/apache/activemq/jms/example/JMSContextExample.java @@ -18,14 +18,14 @@ import javax.jms.JMSContext; import javax.jms.Queue; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS Queue example that creates a producer and consumer on a queue and sends then receives a message. * * @author Andy Taylor */ -public class JMSContextExample extends HornetQExample +public class JMSContextExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/jms-shared-consumer/src/main/java/org/apache/activemq/jms/example/JMSSharedConsumerExample.java b/examples/jms/jms-shared-consumer/src/main/java/org/apache/activemq/jms/example/JMSSharedConsumerExample.java index 3f43a605d8..cef9ca8dea 100644 --- a/examples/jms/jms-shared-consumer/src/main/java/org/apache/activemq/jms/example/JMSSharedConsumerExample.java +++ b/examples/jms/jms-shared-consumer/src/main/java/org/apache/activemq/jms/example/JMSSharedConsumerExample.java @@ -22,7 +22,7 @@ import javax.jms.Queue; import javax.jms.Topic; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -32,7 +32,7 @@ import java.util.concurrent.TimeUnit; * * @author Andy Taylor */ -public class JMSSharedConsumerExample extends HornetQExample +public class JMSSharedConsumerExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/jmx/src/main/java/org/apache/activemq/jms/example/JMXExample.java b/examples/jms/jmx/src/main/java/org/apache/activemq/jms/example/JMXExample.java index 061401f62a..be0449ffd9 100644 --- a/examples/jms/jmx/src/main/java/org/apache/activemq/jms/example/JMXExample.java +++ b/examples/jms/jmx/src/main/java/org/apache/activemq/jms/example/JMXExample.java @@ -32,14 +32,14 @@ import javax.naming.InitialContext; import org.apache.activemq.api.core.management.ObjectNameBuilder; import org.apache.activemq.api.jms.management.JMSQueueControl; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** - * An example that shows how to manage HornetQ using JMX. + * An example that shows how to manage ActiveMQ using JMX. * * @author Jeff Mesnil */ -public class JMXExample extends HornetQExample +public class JMXExample extends ActiveMQExample { private static final String JMX_URL = "service:jmx:rmi:///jndi/rmi://localhost:3000/jmxrmi"; diff --git a/examples/jms/large-message/src/main/java/org/apache/activemq/jms/example/LargeMessageExample.java b/examples/jms/large-message/src/main/java/org/apache/activemq/jms/example/LargeMessageExample.java index 417945ab5d..7fd6be0ecd 100644 --- a/examples/jms/large-message/src/main/java/org/apache/activemq/jms/example/LargeMessageExample.java +++ b/examples/jms/large-message/src/main/java/org/apache/activemq/jms/example/LargeMessageExample.java @@ -29,16 +29,16 @@ import javax.jms.Queue; import javax.jms.Session; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** - * This example demonstrates the ability of HornetQ to send and consume a very large message, much + * This example demonstrates the ability of ActiveMQ to send and consume a very large message, much * bigger than can fit in RAM. * * @author Tim Fox * @author Clebert Suconic */ -public class LargeMessageExample extends HornetQExample +public class LargeMessageExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/last-value-queue/src/main/java/org/apache/activemq/jms/example/LastValueQueueExample.java b/examples/jms/last-value-queue/src/main/java/org/apache/activemq/jms/example/LastValueQueueExample.java index 63a1ef9702..91627e9448 100644 --- a/examples/jms/last-value-queue/src/main/java/org/apache/activemq/jms/example/LastValueQueueExample.java +++ b/examples/jms/last-value-queue/src/main/java/org/apache/activemq/jms/example/LastValueQueueExample.java @@ -24,7 +24,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * This example shows how to configure and use a Last-Value queues. @@ -33,7 +33,7 @@ import org.apache.activemq.common.example.HornetQExample; * @author Jeff Mesnil * */ -public class LastValueQueueExample extends HornetQExample +public class LastValueQueueExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/management-notifications/src/main/java/org/apache/activemq/jms/example/ManagementNotificationExample.java b/examples/jms/management-notifications/src/main/java/org/apache/activemq/jms/example/ManagementNotificationExample.java index 54a111c96e..2a2a62c316 100644 --- a/examples/jms/management-notifications/src/main/java/org/apache/activemq/jms/example/ManagementNotificationExample.java +++ b/examples/jms/management-notifications/src/main/java/org/apache/activemq/jms/example/ManagementNotificationExample.java @@ -26,14 +26,14 @@ import javax.jms.Session; import javax.jms.Topic; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * An example that shows how to receive management notifications using JMS messages. * * @author Jeff Mesnil */ -public class ManagementNotificationExample extends HornetQExample +public class ManagementNotificationExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/management/src/main/java/org/apache/activemq/jms/example/ManagementExample.java b/examples/jms/management/src/main/java/org/apache/activemq/jms/example/ManagementExample.java index d067ece74f..e82c66772b 100644 --- a/examples/jms/management/src/main/java/org/apache/activemq/jms/example/ManagementExample.java +++ b/examples/jms/management/src/main/java/org/apache/activemq/jms/example/ManagementExample.java @@ -24,16 +24,16 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.management.JMSManagementHelper; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** - * An example that shows how to manage HornetQ using JMS messages. + * An example that shows how to manage ActiveMQ using JMS messages. * * @author Jeff Mesnil */ -public class ManagementExample extends HornetQExample +public class ManagementExample extends ActiveMQExample { public static void main(final String[] args) { @@ -74,7 +74,7 @@ public class ManagementExample extends HornetQExample // Step 9. create the JMS management queue. // It is a "special" queue and it is not looked up from JNDI but constructed directly - Queue managementQueue = HornetQJMSClient.createQueue("hornetq.management"); + Queue managementQueue = ActiveMQJMSClient.createQueue("activemq.management"); // Step 10. Create a QueueRequestor for the management queue (see queue-requestor example) QueueRequestor requestor = new QueueRequestor(session, managementQueue); diff --git a/examples/jms/message-counters/src/main/java/org/apache/activemq/jms/example/MessageCounterExample.java b/examples/jms/message-counters/src/main/java/org/apache/activemq/jms/example/MessageCounterExample.java index 6591b2fec5..e4af2d191c 100644 --- a/examples/jms/message-counters/src/main/java/org/apache/activemq/jms/example/MessageCounterExample.java +++ b/examples/jms/message-counters/src/main/java/org/apache/activemq/jms/example/MessageCounterExample.java @@ -33,7 +33,7 @@ import javax.naming.InitialContext; import org.apache.activemq.api.core.management.MessageCounterInfo; import org.apache.activemq.api.core.management.ObjectNameBuilder; import org.apache.activemq.api.jms.management.JMSQueueControl; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * An example showing how to use message counters to have information on a queue. @@ -41,7 +41,7 @@ import org.apache.activemq.common.example.HornetQExample; * @author Jeff Mesnil * */ -public class MessageCounterExample extends HornetQExample +public class MessageCounterExample extends ActiveMQExample { private static final String JMX_URL = "service:jmx:rmi:///jndi/rmi://localhost:3001/jmxrmi"; diff --git a/examples/jms/message-group/src/main/java/org/apache/activemq/jms/example/MessageGroupExample.java b/examples/jms/message-group/src/main/java/org/apache/activemq/jms/example/MessageGroupExample.java index 0689eab13e..1decc8b3fb 100644 --- a/examples/jms/message-group/src/main/java/org/apache/activemq/jms/example/MessageGroupExample.java +++ b/examples/jms/message-group/src/main/java/org/apache/activemq/jms/example/MessageGroupExample.java @@ -27,14 +27,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS Queue example that sends and receives message groups. * * @author Howard Gao */ -public class MessageGroupExample extends HornetQExample +public class MessageGroupExample extends ActiveMQExample { private final Map messageReceiverMap = new ConcurrentHashMap(); diff --git a/examples/jms/message-group2/src/main/java/org/apache/activemq/jms/example/MessageGroup2Example.java b/examples/jms/message-group2/src/main/java/org/apache/activemq/jms/example/MessageGroup2Example.java index 5c0768b69f..006217916c 100644 --- a/examples/jms/message-group2/src/main/java/org/apache/activemq/jms/example/MessageGroup2Example.java +++ b/examples/jms/message-group2/src/main/java/org/apache/activemq/jms/example/MessageGroup2Example.java @@ -27,14 +27,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS Queue example that sends and receives message groups. * * @author Howard Gao */ -public class MessageGroup2Example extends HornetQExample +public class MessageGroup2Example extends ActiveMQExample { private final Map messageReceiverMap = new ConcurrentHashMap(); private boolean result = true; diff --git a/examples/jms/message-priority/src/main/java/org/apache/activemq/jms/example/MessagePriorityExample.java b/examples/jms/message-priority/src/main/java/org/apache/activemq/jms/example/MessagePriorityExample.java index 3226b4b3db..e853289078 100644 --- a/examples/jms/message-priority/src/main/java/org/apache/activemq/jms/example/MessagePriorityExample.java +++ b/examples/jms/message-priority/src/main/java/org/apache/activemq/jms/example/MessagePriorityExample.java @@ -27,14 +27,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS example that shows the delivery order of messages with priorities. * * @author Howard Gao */ -public class MessagePriorityExample extends HornetQExample +public class MessagePriorityExample extends ActiveMQExample { private volatile boolean result = true; diff --git a/examples/jms/multiple-failover-failback/src/main/java/org/apache/activemq/jms/example/MultipleFailoverFailbackExample.java b/examples/jms/multiple-failover-failback/src/main/java/org/apache/activemq/jms/example/MultipleFailoverFailbackExample.java index 10ecc62b27..44443db39f 100644 --- a/examples/jms/multiple-failover-failback/src/main/java/org/apache/activemq/jms/example/MultipleFailoverFailbackExample.java +++ b/examples/jms/multiple-failover-failback/src/main/java/org/apache/activemq/jms/example/MultipleFailoverFailbackExample.java @@ -22,14 +22,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * @author Andy Taylor * Date: Nov 4, 2010 * Time: 10:51:45 AM */ -public class MultipleFailoverFailbackExample extends HornetQExample +public class MultipleFailoverFailbackExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/multiple-failover/src/main/java/org/apache/activemq/jms/example/MultipleFailoverExample.java b/examples/jms/multiple-failover/src/main/java/org/apache/activemq/jms/example/MultipleFailoverExample.java index 8f7d099b2f..98a8650c81 100644 --- a/examples/jms/multiple-failover/src/main/java/org/apache/activemq/jms/example/MultipleFailoverExample.java +++ b/examples/jms/multiple-failover/src/main/java/org/apache/activemq/jms/example/MultipleFailoverExample.java @@ -22,14 +22,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * @author Andy Taylor * Date: Nov 4, 2010 * Time: 10:51:45 AM */ -public class MultipleFailoverExample extends HornetQExample +public class MultipleFailoverExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/jms/example/NoConsumerBufferingExample.java b/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/jms/example/NoConsumerBufferingExample.java index 3d5688a396..deea808495 100644 --- a/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/jms/example/NoConsumerBufferingExample.java +++ b/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/jms/example/NoConsumerBufferingExample.java @@ -21,15 +21,15 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** - * This example demonstrates how HornetQ consumers can be configured to not buffer any messages from + * This example demonstrates how ActiveMQ consumers can be configured to not buffer any messages from * the server. * * @author Tim Fox */ -public class NoConsumerBufferingExample extends HornetQExample +public class NoConsumerBufferingExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/jms/example/NonTransactionFailoverExample.java b/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/jms/example/NonTransactionFailoverExample.java index 2278872495..260de9ddbc 100644 --- a/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/jms/example/NonTransactionFailoverExample.java +++ b/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/jms/example/NonTransactionFailoverExample.java @@ -22,7 +22,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple example that demonstrates failover of the JMS connection from one node to another @@ -30,7 +30,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Jeff Mesnil */ -public class NonTransactionFailoverExample extends HornetQExample +public class NonTransactionFailoverExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/openwire/src/main/java/org/apache/activemq/jms/example/OpenWireExample.java b/examples/jms/openwire/src/main/java/org/apache/activemq/jms/example/OpenWireExample.java index b9e16dc7b5..8e87bdc720 100644 --- a/examples/jms/openwire/src/main/java/org/apache/activemq/jms/example/OpenWireExample.java +++ b/examples/jms/openwire/src/main/java/org/apache/activemq/jms/example/OpenWireExample.java @@ -22,7 +22,7 @@ import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS Queue example that creates a producer and consumer on a queue @@ -30,7 +30,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Andy Taylor */ -public class OpenWireExample extends HornetQExample +public class OpenWireExample extends ActiveMQExample { public static final String OWHOST = "localhost"; public static final int OWPORT = 61616; diff --git a/examples/jms/paging/src/main/java/org/apache/activemq/jms/example/PagingExample.java b/examples/jms/paging/src/main/java/org/apache/activemq/jms/example/PagingExample.java index 0c37045768..c5b5e24cf8 100644 --- a/examples/jms/paging/src/main/java/org/apache/activemq/jms/example/PagingExample.java +++ b/examples/jms/paging/src/main/java/org/apache/activemq/jms/example/PagingExample.java @@ -22,14 +22,14 @@ import javax.jms.Queue; import javax.jms.Session; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS Queue example that creates a producer and consumer on a queue and sends then receives a message. * * @author Clebert Suconic */ -public class PagingExample extends HornetQExample +public class PagingExample extends ActiveMQExample { public static void main(final String[] args) { @@ -74,7 +74,7 @@ public class PagingExample extends HornetQExample message.writeBytes(new byte[10 * 1024]); // Step 10. Send only 20 messages to the Queue. This will be already enough for pagingQueue. Look at - // ./paging/config/hornetq-queues.xml for the config. + // ./paging/config/activemq-queues.xml for the config. for (int i = 0; i < 20; i++) { pageMessageProducer.send(message); @@ -102,7 +102,7 @@ public class PagingExample extends HornetQExample // Step 16. Start the JMS Connection. This step will activate the subscribers to receive messages. connection.start(); - // Step 17. Receive the messages. It's important to ACK for messages as HornetQ will not read messages from + // Step 17. Receive the messages. It's important to ACK for messages as ActiveMQ will not read messages from // paging // until messages are ACKed diff --git a/examples/jms/pre-acknowledge/src/main/java/org/apache/activemq/jms/example/PreacknowledgeExample.java b/examples/jms/pre-acknowledge/src/main/java/org/apache/activemq/jms/example/PreacknowledgeExample.java index 5ffb6528da..04adf183f6 100644 --- a/examples/jms/pre-acknowledge/src/main/java/org/apache/activemq/jms/example/PreacknowledgeExample.java +++ b/examples/jms/pre-acknowledge/src/main/java/org/apache/activemq/jms/example/PreacknowledgeExample.java @@ -25,14 +25,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.api.jms.HornetQJMSClient; -import org.apache.activemq.api.jms.HornetQJMSConstants; +import org.apache.activemq.api.jms.ActiveMQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSConstants; import org.apache.activemq.api.jms.management.JMSManagementHelper; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * - * This example demonstrates the use of HornetQ "pre-acknowledge" functionality where + * This example demonstrates the use of ActiveMQ "pre-acknowledge" functionality where * messages are acknowledged before they are delivered to the consumer. * * Please see the readme.html for more details. @@ -40,7 +40,7 @@ import org.apache.activemq.common.example.HornetQExample; * @author Tim Fox * */ -public class PreacknowledgeExample extends HornetQExample +public class PreacknowledgeExample extends ActiveMQExample { public static void main(final String[] args) { @@ -66,7 +66,7 @@ public class PreacknowledgeExample extends HornetQExample // Step 3. Create a the JMS objects connection = cf.createConnection(); - Session session = connection.createSession(false, HornetQJMSConstants.PRE_ACKNOWLEDGE); + Session session = connection.createSession(false, ActiveMQJMSConstants.PRE_ACKNOWLEDGE); MessageProducer producer = session.createProducer(queue); @@ -128,7 +128,7 @@ public class PreacknowledgeExample extends HornetQExample { QueueSession session = ((QueueConnection)connection).createQueueSession(false, Session.AUTO_ACKNOWLEDGE); - Queue managementQueue = HornetQJMSClient.createQueue("hornetq.management"); + Queue managementQueue = ActiveMQJMSClient.createQueue("activemq.management"); QueueRequestor requestor = new QueueRequestor(session, managementQueue); diff --git a/examples/jms/producer-rate-limit/src/main/java/org/apache/activemq/jms/example/ProducerRateLimitExample.java b/examples/jms/producer-rate-limit/src/main/java/org/apache/activemq/jms/example/ProducerRateLimitExample.java index 28ddfce239..e42458676a 100644 --- a/examples/jms/producer-rate-limit/src/main/java/org/apache/activemq/jms/example/ProducerRateLimitExample.java +++ b/examples/jms/producer-rate-limit/src/main/java/org/apache/activemq/jms/example/ProducerRateLimitExample.java @@ -21,7 +21,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * This example demonstrates how a message producer can be limited to produce messages at a maximum rate @@ -29,7 +29,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Tim Fox */ -public class ProducerRateLimitExample extends HornetQExample +public class ProducerRateLimitExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/proton-j/src/main/java/org/apache/activemq/jms/example/ProtonJExample.java b/examples/jms/proton-j/src/main/java/org/apache/activemq/jms/example/ProtonJExample.java index c240ca811f..919049f352 100644 --- a/examples/jms/proton-j/src/main/java/org/apache/activemq/jms/example/ProtonJExample.java +++ b/examples/jms/proton-j/src/main/java/org/apache/activemq/jms/example/ProtonJExample.java @@ -19,9 +19,9 @@ import org.apache.qpid.amqp_1_0.client.Receiver; import org.apache.qpid.amqp_1_0.client.Sender; import org.apache.qpid.amqp_1_0.client.Session; import org.apache.qpid.amqp_1_0.type.UnsignedInteger; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; -public class ProtonJExample extends HornetQExample +public class ProtonJExample extends ActiveMQExample { public static void main(String[] args) { diff --git a/examples/jms/queue-message-redistribution/src/main/java/org/apache/activemq/jms/example/QueueMessageRedistributionExample.java b/examples/jms/queue-message-redistribution/src/main/java/org/apache/activemq/jms/example/QueueMessageRedistributionExample.java index aeb1431dc8..5781647530 100644 --- a/examples/jms/queue-message-redistribution/src/main/java/org/apache/activemq/jms/example/QueueMessageRedistributionExample.java +++ b/examples/jms/queue-message-redistribution/src/main/java/org/apache/activemq/jms/example/QueueMessageRedistributionExample.java @@ -21,7 +21,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * This example demonstrates a queue with the same name deployed on two nodes of a cluster. @@ -31,7 +31,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Jeff Mesnil */ -public class QueueRequestorExample extends HornetQExample +public class QueueRequestorExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/queue-selector/src/main/java/org/apache/activemq/jms/example/QueueSelectorExample.java b/examples/jms/queue-selector/src/main/java/org/apache/activemq/jms/example/QueueSelectorExample.java index 3dcb924879..351d684d56 100644 --- a/examples/jms/queue-selector/src/main/java/org/apache/activemq/jms/example/QueueSelectorExample.java +++ b/examples/jms/queue-selector/src/main/java/org/apache/activemq/jms/example/QueueSelectorExample.java @@ -24,14 +24,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS example that uses selectors with queue consumers. * * @author Howard Gao */ -public class QueueSelectorExample extends HornetQExample +public class QueueSelectorExample extends ActiveMQExample { private volatile boolean result = true; diff --git a/examples/jms/queue/src/main/java/org/apache/activemq/jms/example/QueueExample.java b/examples/jms/queue/src/main/java/org/apache/activemq/jms/example/QueueExample.java index 77dfcf553d..77b95b447a 100644 --- a/examples/jms/queue/src/main/java/org/apache/activemq/jms/example/QueueExample.java +++ b/examples/jms/queue/src/main/java/org/apache/activemq/jms/example/QueueExample.java @@ -21,14 +21,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS Queue example that creates a producer and consumer on a queue and sends then receives a message. * * @author Andy Taylor */ -public class QueueExample extends HornetQExample +public class QueueExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/reattach-node/src/main/java/org/apache/activemq/jms/example/ReattachExample.java b/examples/jms/reattach-node/src/main/java/org/apache/activemq/jms/example/ReattachExample.java index 07fec4b14b..d35e727450 100644 --- a/examples/jms/reattach-node/src/main/java/org/apache/activemq/jms/example/ReattachExample.java +++ b/examples/jms/reattach-node/src/main/java/org/apache/activemq/jms/example/ReattachExample.java @@ -22,9 +22,9 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.management.JMSManagementHelper; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * This examples demonstrates a connection created to a server. Failure of the network connection is then simulated @@ -33,7 +33,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Andy Taylor */ -public class ReplicatedFailbackStaticExample extends HornetQExample +public class ReplicatedFailbackStaticExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/replicated-failback/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackExample.java b/examples/jms/replicated-failback/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackExample.java index c736c16fd2..c4f51cc120 100644 --- a/examples/jms/replicated-failback/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackExample.java +++ b/examples/jms/replicated-failback/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackExample.java @@ -22,7 +22,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * Example of live and replicating backup pair. @@ -32,7 +32,7 @@ import org.apache.activemq.common.example.HornetQExample; * Later the live server is restarted and takes back its position by asking the backup to stop ("fail-back"). * @author Andy Taylor */ -public class ReplicatedFailbackExample extends HornetQExample +public class ReplicatedFailbackExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/replicated-multiple-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedMultipleFailoverExample.java b/examples/jms/replicated-multiple-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedMultipleFailoverExample.java index ad6bd7a2b2..8be99e7c25 100644 --- a/examples/jms/replicated-multiple-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedMultipleFailoverExample.java +++ b/examples/jms/replicated-multiple-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedMultipleFailoverExample.java @@ -22,14 +22,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * @author Andy Taylor * Date: Nov 4, 2010 * Time: 10:51:45 AM */ -public class ReplicatedMultipleFailoverExample extends HornetQExample +public class ReplicatedMultipleFailoverExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/replicated-transaction-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedTransactionFailoverExample.java b/examples/jms/replicated-transaction-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedTransactionFailoverExample.java index 146345f072..18b8a36906 100644 --- a/examples/jms/replicated-transaction-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedTransactionFailoverExample.java +++ b/examples/jms/replicated-transaction-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedTransactionFailoverExample.java @@ -23,7 +23,7 @@ import javax.jms.TransactionRolledBackException; import javax.naming.InitialContext; import org.apache.activemq.api.core.Message; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple example that demonstrates failover of the JMS connection from one node to another @@ -31,7 +31,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Jeff Mesnil */ -public class ReplicatedTransactionFailoverExample extends HornetQExample +public class ReplicatedTransactionFailoverExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/request-reply/src/main/java/org/apache/activemq/jms/example/RequestReplyExample.java b/examples/jms/request-reply/src/main/java/org/apache/activemq/jms/example/RequestReplyExample.java index 609f49a083..e263a15569 100644 --- a/examples/jms/request-reply/src/main/java/org/apache/activemq/jms/example/RequestReplyExample.java +++ b/examples/jms/request-reply/src/main/java/org/apache/activemq/jms/example/RequestReplyExample.java @@ -29,7 +29,7 @@ import javax.jms.TemporaryQueue; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS example that shows how to use Request/Replay style messaging. @@ -41,7 +41,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Howard Gao */ -public class RequestReplyExample extends HornetQExample +public class RequestReplyExample extends ActiveMQExample { private final Map requestMap = new HashMap(); diff --git a/examples/jms/rest/dup-send/src/main/java/PostOrder.java b/examples/jms/rest/dup-send/src/main/java/PostOrder.java index dceddbe034..0da1544809 100644 --- a/examples/jms/rest/dup-send/src/main/java/PostOrder.java +++ b/examples/jms/rest/dup-send/src/main/java/PostOrder.java @@ -10,7 +10,7 @@ * implied. See the License for the specific language governing * permissions and limitations under the License. */ -import org.apache.activemq.jms.client.HornetQDestination; +import org.apache.activemq.jms.client.ActiveMQDestination; import org.jboss.resteasy.client.ClientRequest; import org.jboss.resteasy.client.ClientResponse; import org.jboss.resteasy.spi.Link; diff --git a/examples/jms/rest/jms-to-rest/src/main/java/JmsHelper.java b/examples/jms/rest/jms-to-rest/src/main/java/JmsHelper.java index 9a0e269253..8e289447b3 100644 --- a/examples/jms/rest/jms-to-rest/src/main/java/JmsHelper.java +++ b/examples/jms/rest/jms-to-rest/src/main/java/JmsHelper.java @@ -12,12 +12,12 @@ */ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl; import org.apache.activemq.core.config.impl.FileConfiguration; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQJMSConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory; import javax.jms.ConnectionFactory; import javax.jms.Destination; @@ -34,7 +34,7 @@ public class JmsHelper config.setConfigurationUrl(configFile); config.start(); TransportConfiguration transport = config.getConnectorConfigurations().get("netty-connector"); - return new HornetQJMSConnectionFactory(HornetQClient.createServerLocatorWithoutHA(transport)); + return new ActiveMQJMSConnectionFactory(ActiveMQClient.createServerLocatorWithoutHA(transport)); } diff --git a/examples/jms/rest/jms-to-rest/src/main/java/JmsReceive.java b/examples/jms/rest/jms-to-rest/src/main/java/JmsReceive.java index b8b3d6a767..91b358f9b3 100644 --- a/examples/jms/rest/jms-to-rest/src/main/java/JmsReceive.java +++ b/examples/jms/rest/jms-to-rest/src/main/java/JmsReceive.java @@ -10,7 +10,7 @@ * implied. See the License for the specific language governing * permissions and limitations under the License. */ -import org.apache.activemq.jms.client.HornetQDestination; +import org.apache.activemq.jms.client.ActiveMQDestination; import org.apache.activemq.rest.Jms; import javax.jms.Connection; @@ -30,8 +30,8 @@ public class JmsReceive public static void main(String[] args) throws Exception { System.out.println("Receive Setup..."); - ConnectionFactory factory = JmsHelper.createConnectionFactory("hornetq-client.xml"); - Destination destination = (HornetQDestination) HornetQDestination.fromAddress("jms.queue.orders"); + ConnectionFactory factory = JmsHelper.createConnectionFactory("activemq-client.xml"); + Destination destination = (ActiveMQDestination) ActiveMQDestination.fromAddress("jms.queue.orders"); Connection conn = factory.createConnection(); try diff --git a/examples/jms/rest/jms-to-rest/src/main/java/JmsSend.java b/examples/jms/rest/jms-to-rest/src/main/java/JmsSend.java index 3c15637456..5385877057 100644 --- a/examples/jms/rest/jms-to-rest/src/main/java/JmsSend.java +++ b/examples/jms/rest/jms-to-rest/src/main/java/JmsSend.java @@ -10,7 +10,7 @@ * implied. See the License for the specific language governing * permissions and limitations under the License. */ -import org.apache.activemq.jms.client.HornetQDestination; +import org.apache.activemq.jms.client.ActiveMQDestination; import javax.jms.Connection; import javax.jms.ConnectionFactory; @@ -27,8 +27,8 @@ public class JmsSend { public static void main(String[] args) throws Exception { - ConnectionFactory factory = JmsHelper.createConnectionFactory("hornetq-client.xml"); - Destination destination = (HornetQDestination) HornetQDestination.fromAddress("jms.queue.orders"); + ConnectionFactory factory = JmsHelper.createConnectionFactory("activemq-client.xml"); + Destination destination = (ActiveMQDestination) ActiveMQDestination.fromAddress("jms.queue.orders"); Connection conn = factory.createConnection(); try diff --git a/examples/jms/rest/push/src/main/java/JmsHelper.java b/examples/jms/rest/push/src/main/java/JmsHelper.java index bf2f577363..32b83a9b48 100644 --- a/examples/jms/rest/push/src/main/java/JmsHelper.java +++ b/examples/jms/rest/push/src/main/java/JmsHelper.java @@ -12,11 +12,11 @@ */ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.core.config.impl.FileConfiguration; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQJMSConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory; import javax.jms.ConnectionFactory; import javax.jms.Destination; @@ -33,7 +33,7 @@ public class JmsHelper config.setConfigurationUrl(configFile); config.start(); TransportConfiguration transport = config.getConnectorConfigurations().get("netty-connector"); - return new HornetQJMSConnectionFactory(HornetQClient.createServerLocatorWithoutHA(transport)); + return new ActiveMQJMSConnectionFactory(ActiveMQClient.createServerLocatorWithoutHA(transport)); } } diff --git a/examples/jms/rest/push/src/main/java/PostOrder.java b/examples/jms/rest/push/src/main/java/PostOrder.java index 15b33c0946..7d98c2d233 100644 --- a/examples/jms/rest/push/src/main/java/PostOrder.java +++ b/examples/jms/rest/push/src/main/java/PostOrder.java @@ -10,7 +10,7 @@ * implied. See the License for the specific language governing * permissions and limitations under the License. */ -import org.apache.activemq.jms.client.HornetQDestination; +import org.apache.activemq.jms.client.ActiveMQDestination; import javax.jms.Connection; import javax.jms.ConnectionFactory; @@ -27,8 +27,8 @@ public class PostOrder { public static void main(String[] args) throws Exception { - ConnectionFactory factory = JmsHelper.createConnectionFactory("hornetq-client.xml"); - Destination destination = (HornetQDestination) HornetQDestination.fromAddress("jms.queue.orders"); + ConnectionFactory factory = JmsHelper.createConnectionFactory("activemq-client.xml"); + Destination destination = (ActiveMQDestination) ActiveMQDestination.fromAddress("jms.queue.orders"); Connection conn = factory.createConnection(); try diff --git a/examples/jms/rest/push/src/main/java/ReceiveShipping.java b/examples/jms/rest/push/src/main/java/ReceiveShipping.java index 1761f71ffe..227c125628 100644 --- a/examples/jms/rest/push/src/main/java/ReceiveShipping.java +++ b/examples/jms/rest/push/src/main/java/ReceiveShipping.java @@ -10,7 +10,7 @@ * implied. See the License for the specific language governing * permissions and limitations under the License. */ -import org.apache.activemq.jms.client.HornetQDestination; +import org.apache.activemq.jms.client.ActiveMQDestination; import org.apache.activemq.rest.Jms; import javax.jms.Connection; @@ -29,8 +29,8 @@ public class ReceiveShipping { public static void main(String[] args) throws Exception { - ConnectionFactory factory = JmsHelper.createConnectionFactory("hornetq-client.xml"); - Destination destination = (HornetQDestination) HornetQDestination.fromAddress("jms.queue.shipping"); + ConnectionFactory factory = JmsHelper.createConnectionFactory("activemq-client.xml"); + Destination destination = (ActiveMQDestination) ActiveMQDestination.fromAddress("jms.queue.shipping"); Connection conn = factory.createConnection(); try diff --git a/examples/jms/scale-down/src/main/java/org/apache/activemq/jms/example/ScaleDownExample.java b/examples/jms/scale-down/src/main/java/org/apache/activemq/jms/example/ScaleDownExample.java index 7962efd4a5..9104e2ca40 100644 --- a/examples/jms/scale-down/src/main/java/org/apache/activemq/jms/example/ScaleDownExample.java +++ b/examples/jms/scale-down/src/main/java/org/apache/activemq/jms/example/ScaleDownExample.java @@ -21,13 +21,13 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple example that demonstrates a colocated server * */ -public class ScaleDownExample extends HornetQExample +public class ScaleDownExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/scheduled-message/src/main/java/org/apache/activemq/jms/example/ScheduledMessageExample.java b/examples/jms/scheduled-message/src/main/java/org/apache/activemq/jms/example/ScheduledMessageExample.java index a9dcd68f42..90a6203621 100644 --- a/examples/jms/scheduled-message/src/main/java/org/apache/activemq/jms/example/ScheduledMessageExample.java +++ b/examples/jms/scheduled-message/src/main/java/org/apache/activemq/jms/example/ScheduledMessageExample.java @@ -25,14 +25,14 @@ import javax.jms.TextMessage; import javax.naming.InitialContext; import org.apache.activemq.api.core.Message; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS scheduled delivery example that delivers a message in 5 seconds. * * @author Howard Gao */ -public class ScheduledMessageExample extends HornetQExample +public class ScheduledMessageExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/security/src/main/java/org/apache/activemq/jms/example/SecurityExample.java b/examples/jms/security/src/main/java/org/apache/activemq/jms/example/SecurityExample.java index 12f35e1ff0..054319936b 100644 --- a/examples/jms/security/src/main/java/org/apache/activemq/jms/example/SecurityExample.java +++ b/examples/jms/security/src/main/java/org/apache/activemq/jms/example/SecurityExample.java @@ -23,14 +23,14 @@ import javax.jms.TextMessage; import javax.jms.Topic; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS example that shows how to access messaging with security configured. * * @author Howard Gao */ -public class SecurityExample extends HornetQExample +public class SecurityExample extends ActiveMQExample { private boolean result = true; @@ -76,7 +76,7 @@ public class SecurityExample extends HornetQExample billConnection = null; try { - billConnection = createConnection("bill", "hornetq1", cf); + billConnection = createConnection("bill", "activemq1", cf); result = false; } catch (JMSException e) @@ -85,19 +85,19 @@ public class SecurityExample extends HornetQExample } // Step 6. bill makes a good connection. - billConnection = createConnection("bill", "hornetq", cf); + billConnection = createConnection("bill", "activemq", cf); billConnection.start(); // Step 7. andrew makes a good connection. - andrewConnection = createConnection("andrew", "hornetq1", cf); + andrewConnection = createConnection("andrew", "activemq1", cf); andrewConnection.start(); // Step 8. frank makes a good connection. - frankConnection = createConnection("frank", "hornetq2", cf); + frankConnection = createConnection("frank", "activemq2", cf); frankConnection.start(); // Step 9. sam makes a good connection. - samConnection = createConnection("sam", "hornetq3", cf); + samConnection = createConnection("sam", "activemq3", cf); samConnection.start(); // Step 10. Check every user can publish/subscribe genericTopics. diff --git a/examples/jms/send-acknowledgements/src/main/java/org/apache/activemq/jms/example/SendAcknowledgementsExample.java b/examples/jms/send-acknowledgements/src/main/java/org/apache/activemq/jms/example/SendAcknowledgementsExample.java index b9c7614b9d..11667d620c 100644 --- a/examples/jms/send-acknowledgements/src/main/java/org/apache/activemq/jms/example/SendAcknowledgementsExample.java +++ b/examples/jms/send-acknowledgements/src/main/java/org/apache/activemq/jms/example/SendAcknowledgementsExample.java @@ -23,12 +23,12 @@ import javax.naming.InitialContext; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.SendAcknowledgementHandler; -import org.apache.activemq.common.example.HornetQExample; -import org.apache.activemq.jms.client.HornetQSession; +import org.apache.activemq.common.example.ActiveMQExample; +import org.apache.activemq.jms.client.ActiveMQSession; /** * - * Asynchronous Send Acknowledgements are an advanced feature of HornetQ which allow you to + * Asynchronous Send Acknowledgements are an advanced feature of ActiveMQ which allow you to * receive acknowledgements that messages were successfully received at the server in a separate stream * to the stream of messages being sent to the server. * For more information please see the readme.html file @@ -36,7 +36,7 @@ import org.apache.activemq.jms.client.HornetQSession; * @author Tim Fox * */ -public class SendAcknowledgementsExample extends HornetQExample +public class SendAcknowledgementsExample extends ActiveMQExample { public static void main(final String[] args) { @@ -78,7 +78,7 @@ public class SendAcknowledgementsExample extends HornetQExample // Step 7. Set the handler on the underlying core session - ClientSession coreSession = ((HornetQSession)session).getCoreSession(); + ClientSession coreSession = ((ActiveMQSession)session).getCoreSession(); coreSession.setSendAcknowledgementHandler(new MySendAcknowledgementsHandler()); diff --git a/examples/jms/ssl-enabled/src/main/java/org/apache/activemq/jms/example/SSLExample.java b/examples/jms/ssl-enabled/src/main/java/org/apache/activemq/jms/example/SSLExample.java index cedfc1c2ce..ad13589c0b 100644 --- a/examples/jms/ssl-enabled/src/main/java/org/apache/activemq/jms/example/SSLExample.java +++ b/examples/jms/ssl-enabled/src/main/java/org/apache/activemq/jms/example/SSLExample.java @@ -21,14 +21,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS Queue example that uses SSL secure transport. * * @author Howard Gao */ -public class SSLExample extends HornetQExample +public class SSLExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/static-selector-jms/src/main/java/org/apache/activemq/jms/example/StaticSelectorJMSExample.java b/examples/jms/static-selector-jms/src/main/java/org/apache/activemq/jms/example/StaticSelectorJMSExample.java index a2ee87ddb8..f638969dd7 100644 --- a/examples/jms/static-selector-jms/src/main/java/org/apache/activemq/jms/example/StaticSelectorJMSExample.java +++ b/examples/jms/static-selector-jms/src/main/java/org/apache/activemq/jms/example/StaticSelectorJMSExample.java @@ -24,14 +24,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS example that shows how static message selectors work when using JMS config. * * @author Howard Gao */ -public class StaticSelectorJMSExample extends HornetQExample +public class StaticSelectorJMSExample extends ActiveMQExample { private volatile boolean result = true; diff --git a/examples/jms/static-selector/src/main/java/org/apache/activemq/jms/example/StaticSelectorExample.java b/examples/jms/static-selector/src/main/java/org/apache/activemq/jms/example/StaticSelectorExample.java index 3212ac5484..2e9c174384 100644 --- a/examples/jms/static-selector/src/main/java/org/apache/activemq/jms/example/StaticSelectorExample.java +++ b/examples/jms/static-selector/src/main/java/org/apache/activemq/jms/example/StaticSelectorExample.java @@ -24,14 +24,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS example that shows how static message selectors work. * * @author Howard Gao */ -public class StaticSelectorExample extends HornetQExample +public class StaticSelectorExample extends ActiveMQExample { private volatile boolean result = true; diff --git a/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/jms/example/StompWebSocketExample.java b/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/jms/example/StompWebSocketExample.java index 7a30b71fcb..a5e4f64cbe 100644 --- a/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/jms/example/StompWebSocketExample.java +++ b/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/jms/example/StompWebSocketExample.java @@ -23,7 +23,7 @@ import javax.jms.TextMessage; import javax.jms.Topic; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * An example where a client will send a JMS message to a Topic. @@ -31,7 +31,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Jeff Mesnil */ -public class StompWebSocketExample extends HornetQExample +public class StompWebSocketExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/stomp/src/main/java/org/apache/activemq/jms/example/StompExample.java b/examples/jms/stomp/src/main/java/org/apache/activemq/jms/example/StompExample.java index 47f126f530..8e6b17a9cc 100644 --- a/examples/jms/stomp/src/main/java/org/apache/activemq/jms/example/StompExample.java +++ b/examples/jms/stomp/src/main/java/org/apache/activemq/jms/example/StompExample.java @@ -24,7 +24,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * An example where a client will send a Stomp message on a TCP socket @@ -32,7 +32,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Jeff Mesnil */ -public class StompExample extends HornetQExample +public class StompExample extends ActiveMQExample { private static final String END_OF_FRAME = "\u0000"; diff --git a/examples/jms/stomp1.1/src/main/java/org/apache/activemq/jms/example/StompExample.java b/examples/jms/stomp1.1/src/main/java/org/apache/activemq/jms/example/StompExample.java index 8fda414282..bbee54fefc 100644 --- a/examples/jms/stomp1.1/src/main/java/org/apache/activemq/jms/example/StompExample.java +++ b/examples/jms/stomp1.1/src/main/java/org/apache/activemq/jms/example/StompExample.java @@ -25,7 +25,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * An example where a Stomp 1.1 client sends a message on a TCP socket @@ -34,7 +34,7 @@ import org.apache.activemq.common.example.HornetQExample; * @author Jeff Mesnil * @author Howard Gao */ -public class StompExample extends HornetQExample +public class StompExample extends ActiveMQExample { private static final String END_OF_FRAME = "\u0000"; diff --git a/examples/jms/stomp1.2/src/main/java/org/apache/activemq/jms/example/StompExample.java b/examples/jms/stomp1.2/src/main/java/org/apache/activemq/jms/example/StompExample.java index 8459468d20..43d6d4437e 100644 --- a/examples/jms/stomp1.2/src/main/java/org/apache/activemq/jms/example/StompExample.java +++ b/examples/jms/stomp1.2/src/main/java/org/apache/activemq/jms/example/StompExample.java @@ -24,7 +24,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * An example where a Stomp 1.2 client sends a message on a TCP socket @@ -33,7 +33,7 @@ import org.apache.activemq.common.example.HornetQExample; * @author Jeff Mesnil * @author Howard Gao */ -public class StompExample extends HornetQExample +public class StompExample extends ActiveMQExample { private static final String END_OF_FRAME = "\u0000"; diff --git a/examples/jms/stop-server-failover/src/main/java/org/apache/activemq/jms/example/StopServerFailoverExample.java b/examples/jms/stop-server-failover/src/main/java/org/apache/activemq/jms/example/StopServerFailoverExample.java index 2ac0f28a1d..9e25621c80 100644 --- a/examples/jms/stop-server-failover/src/main/java/org/apache/activemq/jms/example/StopServerFailoverExample.java +++ b/examples/jms/stop-server-failover/src/main/java/org/apache/activemq/jms/example/StopServerFailoverExample.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.jms.example; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; import javax.jms.Connection; import javax.jms.ConnectionFactory; @@ -30,7 +30,7 @@ import javax.naming.InitialContext; * * @author Jeff Mesnil */ -public class StopServerFailoverExample extends HornetQExample +public class StopServerFailoverExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/jms/example/SymmetricClusterExample.java b/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/jms/example/SymmetricClusterExample.java index 859efd7a9c..f5056990cc 100644 --- a/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/jms/example/SymmetricClusterExample.java +++ b/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/jms/example/SymmetricClusterExample.java @@ -23,10 +23,10 @@ import javax.jms.Topic; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.core.client.ActiveMQClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * This example demonstrates a cluster of three nodes set up in a symmetric topology - i.e. each @@ -36,7 +36,7 @@ import org.apache.activemq.common.example.HornetQExample; * with from using clustering in an app server, where every node has pretty much identical * configuration to every other node. *

    - * By clustering nodes symmetrically, HornetQ can give the impression of clustered queues, topics + * By clustering nodes symmetrically, ActiveMQ can give the impression of clustered queues, topics * and durable subscriptions. *

    * In this example we send some messages to a distributed queue and topic and kill all the live @@ -46,7 +46,7 @@ import org.apache.activemq.common.example.HornetQExample; * Please see the readme.html file for more information. * @author Howard Gao */ -public class TemporaryQueueExample extends HornetQExample +public class TemporaryQueueExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/topic-hierarchies/src/main/java/org/apache/activemq/jms/example/TopicHierarchyExample.java b/examples/jms/topic-hierarchies/src/main/java/org/apache/activemq/jms/example/TopicHierarchyExample.java index ee6e3f0363..d2a5dd5772 100644 --- a/examples/jms/topic-hierarchies/src/main/java/org/apache/activemq/jms/example/TopicHierarchyExample.java +++ b/examples/jms/topic-hierarchies/src/main/java/org/apache/activemq/jms/example/TopicHierarchyExample.java @@ -22,8 +22,8 @@ import javax.jms.TextMessage; import javax.jms.Topic; import javax.naming.InitialContext; -import org.apache.activemq.api.jms.HornetQJMSClient; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.api.jms.ActiveMQJMSClient; +import org.apache.activemq.common.example.ActiveMQExample; /** * This example demonstrates how a JMS TopicSubscriber can be created to subscribe to a wild-card Topic. @@ -32,7 +32,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Tim Fox */ -public class TopicHierarchyExample extends HornetQExample +public class TopicHierarchyExample extends ActiveMQExample { public static void main(final String[] args) { @@ -59,7 +59,7 @@ public class TopicHierarchyExample extends HornetQExample Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); // Step 6. Instantiate a topic representing the wildcard we're going to subscribe to - Topic topicSubscribe = HornetQJMSClient.createTopic("news.europe.#"); + Topic topicSubscribe = ActiveMQJMSClient.createTopic("news.europe.#"); // Step 7. Create a consumer (topic subscriber) that will consume using that wildcard // The consumer will receive any messages sent to any topic that starts with news.europe @@ -70,11 +70,11 @@ public class TopicHierarchyExample extends HornetQExample // Step 9. Instantiate some more topic objects corresponding to the individual topics // we're going to send messages to - Topic topicNewsUsaWrestling = HornetQJMSClient.createTopic("news.usa.wrestling"); + Topic topicNewsUsaWrestling = ActiveMQJMSClient.createTopic("news.usa.wrestling"); - Topic topicNewsEuropeSport = HornetQJMSClient.createTopic("news.europe.sport"); + Topic topicNewsEuropeSport = ActiveMQJMSClient.createTopic("news.europe.sport"); - Topic topicNewsEuropeEntertainment = HornetQJMSClient.createTopic("news.europe.entertainment"); + Topic topicNewsEuropeEntertainment = ActiveMQJMSClient.createTopic("news.europe.entertainment"); // Step 10. Send a message destined for the usa wrestling topic TextMessage messageWrestlingNews = session.createTextMessage("Hulk Hogan starts ballet classes"); diff --git a/examples/jms/topic-selector-example1/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample1.java b/examples/jms/topic-selector-example1/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample1.java index 2fd373999c..d67afd6542 100644 --- a/examples/jms/topic-selector-example1/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample1.java +++ b/examples/jms/topic-selector-example1/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample1.java @@ -21,14 +21,14 @@ import javax.jms.TextMessage; import javax.jms.Topic; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS Topic example that creates a producer and consumer on a queue and sends and receives a message. * * @author Clebert Suconic */ -public class TopicSelectorExample1 extends HornetQExample +public class TopicSelectorExample1 extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/topic-selector-example2/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample2.java b/examples/jms/topic-selector-example2/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample2.java index aca16d383b..52da422326 100644 --- a/examples/jms/topic-selector-example2/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample2.java +++ b/examples/jms/topic-selector-example2/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample2.java @@ -24,14 +24,14 @@ import javax.jms.TextMessage; import javax.jms.Topic; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS example that consumes messages using selectors. * * @author Howard Gao */ -public class TopicSelectorExample2 extends HornetQExample +public class TopicSelectorExample2 extends ActiveMQExample { private volatile boolean result = true; diff --git a/examples/jms/topic/src/main/java/org/apache/activemq/jms/example/TopicExample.java b/examples/jms/topic/src/main/java/org/apache/activemq/jms/example/TopicExample.java index 777e96d33f..11677aa4d0 100644 --- a/examples/jms/topic/src/main/java/org/apache/activemq/jms/example/TopicExample.java +++ b/examples/jms/topic/src/main/java/org/apache/activemq/jms/example/TopicExample.java @@ -21,14 +21,14 @@ import javax.jms.TextMessage; import javax.jms.Topic; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS Topic example that creates a producer and consumer on a queue and sends and receives a message. * * @author Andy Taylor */ -public class TopicExample extends HornetQExample +public class TopicExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/transaction-failover/src/main/java/org/apache/activemq/jms/example/TransactionFailoverExample.java b/examples/jms/transaction-failover/src/main/java/org/apache/activemq/jms/example/TransactionFailoverExample.java index 15839cd112..1e7480f535 100644 --- a/examples/jms/transaction-failover/src/main/java/org/apache/activemq/jms/example/TransactionFailoverExample.java +++ b/examples/jms/transaction-failover/src/main/java/org/apache/activemq/jms/example/TransactionFailoverExample.java @@ -23,7 +23,7 @@ import javax.jms.TransactionRolledBackException; import javax.naming.InitialContext; import org.apache.activemq.api.core.Message; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple example that demonstrates failover of the JMS connection from one node to another @@ -31,7 +31,7 @@ import org.apache.activemq.common.example.HornetQExample; * * @author Jeff Mesnil */ -public class TransactionFailoverExample extends HornetQExample +public class TransactionFailoverExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/transactional/src/main/java/org/apache/activemq/jms/example/TransactionalExample.java b/examples/jms/transactional/src/main/java/org/apache/activemq/jms/example/TransactionalExample.java index 9dbac87b75..33128bdd10 100644 --- a/examples/jms/transactional/src/main/java/org/apache/activemq/jms/example/TransactionalExample.java +++ b/examples/jms/transactional/src/main/java/org/apache/activemq/jms/example/TransactionalExample.java @@ -21,14 +21,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** * A simple JMS example that sends and consume message transactionally. * * @author Howard Gao */ -public class TransactionalExample extends HornetQExample +public class TransactionalExample extends ActiveMQExample { public static void main(final String[] args) { diff --git a/examples/jms/xa-heuristic/src/main/java/org/apache/activemq/jms/example/XAHeuristicExample.java b/examples/jms/xa-heuristic/src/main/java/org/apache/activemq/jms/example/XAHeuristicExample.java index a1d2da45bc..2d2c7ee328 100644 --- a/examples/jms/xa-heuristic/src/main/java/org/apache/activemq/jms/example/XAHeuristicExample.java +++ b/examples/jms/xa-heuristic/src/main/java/org/apache/activemq/jms/example/XAHeuristicExample.java @@ -38,7 +38,7 @@ import javax.transaction.xa.Xid; import org.apache.activemq.api.core.management.ObjectNameBuilder; import org.apache.activemq.common.example.DummyXid; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; import org.apache.activemq.utils.UUIDGenerator; /** @@ -46,7 +46,7 @@ import org.apache.activemq.utils.UUIDGenerator; * * @author Howard Gao */ -public class XAHeuristicExample extends HornetQExample +public class XAHeuristicExample extends ActiveMQExample { private volatile boolean result = true; @@ -156,7 +156,7 @@ public class XAHeuristicExample extends HornetQExample MBeanServerConnection mbsc = connector.getMBeanServerConnection(); // Step 27. List the prepared transactions - ObjectName serverObject = ObjectNameBuilder.DEFAULT.getHornetQServerObjectName(); + ObjectName serverObject = ObjectNameBuilder.DEFAULT.getActiveMQServerObjectName(); String[] infos = (String[])mbsc.invoke(serverObject, "listPreparedTransactions", null, null); System.out.println("Prepared transactions: "); diff --git a/examples/jms/xa-receive/src/main/java/org/apache/activemq/jms/example/XAReceiveExample.java b/examples/jms/xa-receive/src/main/java/org/apache/activemq/jms/example/XAReceiveExample.java index fa4277d72e..9c1b2b1704 100644 --- a/examples/jms/xa-receive/src/main/java/org/apache/activemq/jms/example/XAReceiveExample.java +++ b/examples/jms/xa-receive/src/main/java/org/apache/activemq/jms/example/XAReceiveExample.java @@ -27,7 +27,7 @@ import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; import org.apache.activemq.common.example.DummyXid; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; import org.apache.activemq.utils.UUIDGenerator; /** @@ -35,7 +35,7 @@ import org.apache.activemq.utils.UUIDGenerator; * * @author Howard Gao */ -public class XAReceiveExample extends HornetQExample +public class XAReceiveExample extends ActiveMQExample { private volatile boolean result = true; diff --git a/examples/jms/xa-send/src/main/java/org/apache/activemq/jms/example/XASendExample.java b/examples/jms/xa-send/src/main/java/org/apache/activemq/jms/example/XASendExample.java index 27e5fe6581..0d545ea9fe 100644 --- a/examples/jms/xa-send/src/main/java/org/apache/activemq/jms/example/XASendExample.java +++ b/examples/jms/xa-send/src/main/java/org/apache/activemq/jms/example/XASendExample.java @@ -31,7 +31,7 @@ import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; import org.apache.activemq.common.example.DummyXid; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; import org.apache.activemq.utils.UUIDGenerator; /** @@ -39,7 +39,7 @@ import org.apache.activemq.utils.UUIDGenerator; * * @author Howard Gao */ -public class XASendExample extends HornetQExample +public class XASendExample extends ActiveMQExample { private volatile boolean result = true; diff --git a/examples/jms/xa-with-jta/src/main/java/org/apache/activemq/jms/example/XAwithJTAExample.java b/examples/jms/xa-with-jta/src/main/java/org/apache/activemq/jms/example/XAwithJTAExample.java index 6f2b68b872..b7b36ad89f 100644 --- a/examples/jms/xa-with-jta/src/main/java/org/apache/activemq/jms/example/XAwithJTAExample.java +++ b/examples/jms/xa-with-jta/src/main/java/org/apache/activemq/jms/example/XAwithJTAExample.java @@ -28,14 +28,14 @@ import javax.transaction.xa.Xid; import com.arjuna.ats.jta.TransactionManager; -import org.apache.activemq.common.example.HornetQExample; +import org.apache.activemq.common.example.ActiveMQExample; /** - * A simple JMS example showing the HornetQ XA support with JTA. + * A simple JMS example showing the ActiveMQ XA support with JTA. * * @author Howard Gao */ -public class XAwithJTAExample extends HornetQExample +public class XAwithJTAExample extends ActiveMQExample { private volatile boolean result = true; diff --git a/integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/HornetQAeroGearBundle.java b/integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/ActiveMQAeroGearBundle.java similarity index 91% rename from integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/HornetQAeroGearBundle.java rename to integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/ActiveMQAeroGearBundle.java index e9e9136bef..02716416c4 100644 --- a/integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/HornetQAeroGearBundle.java +++ b/integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/ActiveMQAeroGearBundle.java @@ -27,10 +27,10 @@ import org.jboss.logging.Messages; *

    * so 239000 to 239999 */ -@MessageBundle(projectCode = "HQ") -public interface HornetQAeroGearBundle +@MessageBundle(projectCode = "AMQ") +public interface ActiveMQAeroGearBundle { - HornetQAeroGearBundle BUNDLE = Messages.getBundle(HornetQAeroGearBundle.class); + ActiveMQAeroGearBundle BUNDLE = Messages.getBundle(ActiveMQAeroGearBundle.class); @Message(id = 239000, value = "endpoint can not be null", format = Message.Format.MESSAGE_FORMAT) ActiveMQIllegalStateException endpointNull(); diff --git a/integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/HornetQAeroGearLogger.java b/integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/ActiveMQAeroGearLogger.java similarity index 91% rename from integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/HornetQAeroGearLogger.java rename to integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/ActiveMQAeroGearLogger.java index dcb3eac21e..4e944cc3fd 100644 --- a/integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/HornetQAeroGearLogger.java +++ b/integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/ActiveMQAeroGearLogger.java @@ -32,13 +32,13 @@ import org.jboss.logging.annotations.MessageLogger; * * so an INFO message would be 181000 to 181999 */ -@MessageLogger(projectCode = "HQ") -public interface HornetQAeroGearLogger extends BasicLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQAeroGearLogger extends BasicLogger { /** * The aerogear logger. */ - HornetQAeroGearLogger LOGGER = Logger.getMessageLogger(HornetQAeroGearLogger.class, HornetQAeroGearLogger.class.getPackage().getName()); + ActiveMQAeroGearLogger LOGGER = Logger.getMessageLogger(ActiveMQAeroGearLogger.class, ActiveMQAeroGearLogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.INFO) @Message(id = 231001, value = "aerogear connector connected to {0}", format = Message.Format.MESSAGE_FORMAT) diff --git a/integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/AeroGearConnectorService.java b/integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/AeroGearConnectorService.java index 1e2ad0ee2f..718c7729c1 100644 --- a/integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/AeroGearConnectorService.java +++ b/integration/activemq-aerogear-integration/src/main/java/org/apache/activemq/integration/aerogear/AeroGearConnectorService.java @@ -27,10 +27,10 @@ import org.apache.activemq.core.filter.Filter; import org.apache.activemq.core.filter.impl.FilterImpl; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.PostOffice; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.ConnectorService; import org.apache.activemq.core.server.Consumer; import org.apache.activemq.core.server.HandleStatus; -import org.apache.activemq.core.server.HornetQServerLogger; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.ServerMessage; @@ -142,21 +142,21 @@ public class AeroGearConnectorService implements ConnectorService, Consumer, Mes if (endpoint == null || endpoint.isEmpty()) { - throw HornetQAeroGearBundle.BUNDLE.endpointNull(); + throw ActiveMQAeroGearBundle.BUNDLE.endpointNull(); } if (applicationId == null || applicationId.isEmpty()) { - throw HornetQAeroGearBundle.BUNDLE.applicationIdNull(); + throw ActiveMQAeroGearBundle.BUNDLE.applicationIdNull(); } if (applicationMasterSecret == null || applicationMasterSecret.isEmpty()) { - throw HornetQAeroGearBundle.BUNDLE.masterSecretNull(); + throw ActiveMQAeroGearBundle.BUNDLE.masterSecretNull(); } Binding b = postOffice.getBinding(new SimpleString(queueName)); if (b == null) { - throw HornetQAeroGearBundle.BUNDLE.noQueue(connectorName, queueName); + throw ActiveMQAeroGearBundle.BUNDLE.noQueue(connectorName, queueName); } queue = (Queue) b.getBindable(); @@ -193,9 +193,9 @@ public class AeroGearConnectorService implements ConnectorService, Consumer, Mes if (filter != null && !filter.match(message)) { - if (HornetQServerLogger.LOGGER.isTraceEnabled()) + if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { - HornetQServerLogger.LOGGER.trace("Reference " + reference + " is a noMatch on consumer " + this); + ActiveMQServerLogger.LOGGER.trace("Reference " + reference + " is a noMatch on consumer " + this); } return HandleStatus.NO_MATCH; } @@ -317,15 +317,15 @@ public class AeroGearConnectorService implements ConnectorService, Consumer, Mes handled = false; if (statusCode == 401) { - HornetQAeroGearLogger.LOGGER.reply401(); + ActiveMQAeroGearLogger.LOGGER.reply401(); } else if (statusCode == 404) { - HornetQAeroGearLogger.LOGGER.reply404(); + ActiveMQAeroGearLogger.LOGGER.reply404(); } else { - HornetQAeroGearLogger.LOGGER.replyUnknown(statusCode); + ActiveMQAeroGearLogger.LOGGER.replyUnknown(statusCode); } queue.removeConsumer(this); @@ -340,7 +340,7 @@ public class AeroGearConnectorService implements ConnectorService, Consumer, Mes @Override public void onError(Throwable throwable) { - HornetQAeroGearLogger.LOGGER.sendFailed(retryInterval); + ActiveMQAeroGearLogger.LOGGER.sendFailed(retryInterval); handled = false; reconnecting = true; scheduledThreadPool.schedule(new ReconnectRunnable(0), retryInterval, TimeUnit.SECONDS); @@ -364,7 +364,7 @@ public class AeroGearConnectorService implements ConnectorService, Consumer, Mes HttpURLConnection conn = (HttpURLConnection) new URL(endpoint).openConnection(); conn.connect(); reconnecting = false; - HornetQAeroGearLogger.LOGGER.connected(endpoint); + ActiveMQAeroGearLogger.LOGGER.connected(endpoint); queue.deliverAsync(); } catch (Exception e) @@ -376,7 +376,7 @@ public class AeroGearConnectorService implements ConnectorService, Consumer, Mes } else { - HornetQAeroGearLogger.LOGGER.unableToReconnect(retryAttempt); + ActiveMQAeroGearLogger.LOGGER.unableToReconnect(retryAttempt); started = false; } } diff --git a/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/HornetQJBossBundle.java b/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/ActiveMQJBossBundle.java similarity index 93% rename from integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/HornetQJBossBundle.java rename to integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/ActiveMQJBossBundle.java index a284759c22..77107bdca4 100644 --- a/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/HornetQJBossBundle.java +++ b/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/ActiveMQJBossBundle.java @@ -25,7 +25,7 @@ import org.jboss.logging.annotations.MessageBundle; * * so 139000 to 139999 */ -@MessageBundle(projectCode = "HQ") -public class HornetQJBossBundle +@MessageBundle(projectCode = "AMQ") +public class ActiveMQJBossBundle { } diff --git a/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/HornetQJBossLogger.java b/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/ActiveMQJBossLogger.java similarity index 88% rename from integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/HornetQJBossLogger.java rename to integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/ActiveMQJBossLogger.java index 60fdcaaac2..ad91271eac 100644 --- a/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/HornetQJBossLogger.java +++ b/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/ActiveMQJBossLogger.java @@ -38,13 +38,13 @@ import org.jboss.logging.annotations.MessageLogger; * * so an INFO message would be 131000 to 131999 */ -@MessageLogger(projectCode = "HQ") -public interface HornetQJBossLogger extends BasicLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQJBossLogger extends BasicLogger { /** * The jboss integration logger. */ - HornetQJBossLogger LOGGER = Logger.getMessageLogger(HornetQJBossLogger.class, HornetQJBossLogger.class.getPackage().getName()); + ActiveMQJBossLogger LOGGER = Logger.getMessageLogger(ActiveMQJBossLogger.class, ActiveMQJBossLogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.INFO) @Message(id = 131001, value = "Security Context Setting Subject = {0}", diff --git a/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/security/JBossASSecurityManager.java b/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/security/JBossASSecurityManager.java index d56cf372ab..a99463b0a1 100644 --- a/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/security/JBossASSecurityManager.java +++ b/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/security/JBossASSecurityManager.java @@ -23,9 +23,9 @@ import javax.security.auth.Subject; import org.apache.activemq.core.security.CheckType; import org.apache.activemq.core.security.Role; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.integration.jboss.HornetQJBossLogger; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.integration.jboss.ActiveMQJBossLogger; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; import org.jboss.security.AuthenticationManager; import org.jboss.security.RealmMapping; import org.jboss.security.SecurityContext; @@ -34,18 +34,18 @@ import org.jboss.security.SimplePrincipal; /** * This implementation delegates to the JBoss AS security interfaces (which in turn use JAAS) - * It can be used when running HornetQ in JBoss AS + * It can be used when running ActiveMQ in JBoss AS * * @author Andy Taylor * @author Tim Fox */ -public class JBossASSecurityManager implements HornetQSecurityManager, HornetQComponent +public class JBossASSecurityManager implements ActiveMQSecurityManager, ActiveMQComponent { // Static -------------------------------------------------------- // Attributes ---------------------------------------------------- - private final boolean trace = HornetQJBossLogger.LOGGER.isTraceEnabled(); + private final boolean trace = ActiveMQJBossLogger.LOGGER.isTraceEnabled(); /** * the realmmapping @@ -60,7 +60,7 @@ public class JBossASSecurityManager implements HornetQSecurityManager, HornetQCo /** * The JNDI name of the AuthenticationManager(and RealmMapping since they are the same object). */ - private String securityDomainName = "java:/jaas/hornetq"; + private String securityDomainName = "java:/jaas/activemq"; private boolean started; @@ -136,7 +136,7 @@ public class JBossASSecurityManager implements HornetQSecurityManager, HornetQCo if (trace) { - HornetQJBossLogger.LOGGER.trace("user " + user + + ActiveMQJBossLogger.LOGGER.trace("user " + user + (authenticated ? " is " : " is NOT ") + "authorized"); } @@ -170,7 +170,7 @@ public class JBossASSecurityManager implements HornetQSecurityManager, HornetQCo if (trace) { - HornetQJBossLogger.LOGGER.trace("user " + principal.getName() + + ActiveMQJBossLogger.LOGGER.trace("user " + principal.getName() + (authenticated ? " is " : " is NOT ") + "authorized"); } diff --git a/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/security/SecurityActions.java b/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/security/SecurityActions.java index 4a7af2296f..10c8421cd0 100644 --- a/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/security/SecurityActions.java +++ b/integration/activemq-jboss-as-integration/src/main/java/org/apache/activemq/integration/jboss/security/SecurityActions.java @@ -18,7 +18,7 @@ import java.security.PrivilegedAction; import javax.security.auth.Subject; -import org.apache.activemq.integration.jboss.HornetQJBossLogger; +import org.apache.activemq.integration.jboss.ActiveMQJBossLogger; import org.jboss.security.SecurityContext; import org.jboss.security.SecurityContextAssociation; import org.jboss.security.SecurityContextFactory; @@ -47,7 +47,7 @@ class SecurityActions try { - HornetQJBossLogger.LOGGER.settingSecuritySubject(subject); + ActiveMQJBossLogger.LOGGER.settingSecuritySubject(subject); // SecurityAssociation.pushSubjectContext(subject, principal, credential); SecurityContext sc = SecurityContextAssociation.getSecurityContext(); if (sc == null) @@ -73,7 +73,7 @@ class SecurityActions } catch (Throwable t) { - HornetQJBossLogger.LOGGER.errorSettingSecurityContext(t); + ActiveMQJBossLogger.LOGGER.errorSettingSecurityContext(t); } return null; diff --git a/integration/activemq-spring-integration/src/main/java/org/apache/activemq/spring/HornetQSpringBundle.java b/integration/activemq-spring-integration/src/main/java/org/apache/activemq/spring/ActiveMQSpringBundle.java similarity index 93% rename from integration/activemq-spring-integration/src/main/java/org/apache/activemq/spring/HornetQSpringBundle.java rename to integration/activemq-spring-integration/src/main/java/org/apache/activemq/spring/ActiveMQSpringBundle.java index 76bf248268..5916eb55c2 100644 --- a/integration/activemq-spring-integration/src/main/java/org/apache/activemq/spring/HornetQSpringBundle.java +++ b/integration/activemq-spring-integration/src/main/java/org/apache/activemq/spring/ActiveMQSpringBundle.java @@ -25,7 +25,7 @@ import org.jboss.logging.annotations.MessageBundle; * * so 179000 to 179999 */ -@MessageBundle(projectCode = "HQ") -public class HornetQSpringBundle +@MessageBundle(projectCode = "AMQ") +public class ActiveMQSpringBundle { } diff --git a/integration/activemq-spring-integration/src/main/java/org/apache/activemq/spring/HornetQSpringLogger.java b/integration/activemq-spring-integration/src/main/java/org/apache/activemq/spring/ActiveMQSpringLogger.java similarity index 93% rename from integration/activemq-spring-integration/src/main/java/org/apache/activemq/spring/HornetQSpringLogger.java rename to integration/activemq-spring-integration/src/main/java/org/apache/activemq/spring/ActiveMQSpringLogger.java index d342c1d88a..6039572108 100644 --- a/integration/activemq-spring-integration/src/main/java/org/apache/activemq/spring/HornetQSpringLogger.java +++ b/integration/activemq-spring-integration/src/main/java/org/apache/activemq/spring/ActiveMQSpringLogger.java @@ -31,7 +31,7 @@ import org.jboss.logging.annotations.MessageLogger; * * so an INFO message would be 171000 to 171999 */ -@MessageLogger(projectCode = "HQ") -public class HornetQSpringLogger +@MessageLogger(projectCode = "AMQ") +public class ActiveMQSpringLogger { } diff --git a/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/integration/twitter/impl/IncomingTweetsHandler.java b/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/integration/twitter/impl/IncomingTweetsHandler.java index 5f66a74ead..cd0f06c095 100644 --- a/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/integration/twitter/impl/IncomingTweetsHandler.java +++ b/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/integration/twitter/impl/IncomingTweetsHandler.java @@ -25,7 +25,7 @@ import org.apache.activemq.core.server.ConnectorService; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.server.impl.ServerMessageImpl; import org.apache.activemq.integration.twitter.TwitterConstants; -import org.apache.activemq.twitter.HornetQTwitterLogger; +import org.apache.activemq.twitter.ActiveMQTwitterLogger; import org.apache.activemq.utils.ConfigurationHelper; import twitter4j.GeoLocation; import twitter4j.Paging; @@ -38,7 +38,7 @@ import twitter4j.http.AccessToken; /** * IncomingTweetsHandler consumes from twitter and forwards to the - * configured HornetQ address. + * configured ActiveMQ address. */ public class IncomingTweetsHandler implements ConnectorService { @@ -118,7 +118,7 @@ public class IncomingTweetsHandler implements ConnectorService // If I used annotations here, it won't compile under JDK 1.7 ResponseList res = this.twitter.getHomeTimeline(paging); this.paging.setSinceId(((Status) res.get(0)).getId()); - HornetQTwitterLogger.LOGGER.debug(connectorName + " initialise(): got latest ID: " + this.paging.getSinceId()); + ActiveMQTwitterLogger.LOGGER.debug(connectorName + " initialise(): got latest ID: " + this.paging.getSinceId()); // TODO make page size configurable this.paging.setCount(TwitterConstants.DEFAULT_PAGE_SIZE); @@ -170,11 +170,11 @@ public class IncomingTweetsHandler implements ConnectorService putTweetIntoMessage(status, msg); this.postOffice.route(msg, false); - HornetQTwitterLogger.LOGGER.debug(connectorName + ": routed: " + status.toString()); + ActiveMQTwitterLogger.LOGGER.debug(connectorName + ": routed: " + status.toString()); } this.paging.setSinceId(((Status) res.get(0)).getId()); - HornetQTwitterLogger.LOGGER.debug(connectorName + ": update latest ID: " + this.paging.getSinceId()); + ActiveMQTwitterLogger.LOGGER.debug(connectorName + ": update latest ID: " + this.paging.getSinceId()); } private void putTweetIntoMessage(final Status status, final ServerMessage msg) @@ -223,7 +223,7 @@ public class IncomingTweetsHandler implements ConnectorService } catch (Throwable t) { - HornetQTwitterLogger.LOGGER.errorPollingTwitter(t); + ActiveMQTwitterLogger.LOGGER.errorPollingTwitter(t); } } } diff --git a/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/integration/twitter/impl/OutgoingTweetsHandler.java b/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/integration/twitter/impl/OutgoingTweetsHandler.java index 1d8dc72465..e5af858bdf 100644 --- a/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/integration/twitter/impl/OutgoingTweetsHandler.java +++ b/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/integration/twitter/impl/OutgoingTweetsHandler.java @@ -23,12 +23,12 @@ import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.server.ConnectorService; import org.apache.activemq.core.server.Consumer; import org.apache.activemq.core.server.HandleStatus; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.integration.twitter.TwitterConstants; -import org.apache.activemq.twitter.HornetQTwitterLogger; +import org.apache.activemq.twitter.ActiveMQTwitterLogger; import org.apache.activemq.utils.ConfigurationHelper; import twitter4j.GeoLocation; import twitter4j.StatusUpdate; @@ -38,7 +38,7 @@ import twitter4j.TwitterFactory; import twitter4j.http.AccessToken; /** - * OutgoingTweetsHandler consumes from configured HornetQ address + * OutgoingTweetsHandler consumes from configured ActiveMQ address * and forwards to the twitter. */ public class OutgoingTweetsHandler implements Consumer, ConnectorService @@ -128,7 +128,7 @@ public class OutgoingTweetsHandler implements Consumer, ConnectorService this.queue.deliverAsync(); this.isStarted = true; - HornetQTwitterLogger.LOGGER.debug(connectorName + ": started"); + ActiveMQTwitterLogger.LOGGER.debug(connectorName + ": started"); } public boolean isStarted() @@ -143,12 +143,12 @@ public class OutgoingTweetsHandler implements Consumer, ConnectorService return; } - HornetQTwitterLogger.LOGGER.debug(connectorName + ": receive shutdown request"); + ActiveMQTwitterLogger.LOGGER.debug(connectorName + ": receive shutdown request"); this.queue.removeConsumer(this); this.isStarted = false; - HornetQTwitterLogger.LOGGER.debug(connectorName + ": shutdown"); + ActiveMQTwitterLogger.LOGGER.debug(connectorName + ": shutdown"); } public String getName() @@ -219,7 +219,7 @@ public class OutgoingTweetsHandler implements Consumer, ConnectorService if (e.getStatusCode() == 403) { // duplicated message - HornetQTwitterLogger.LOGGER.error403(connectorName); + ActiveMQTwitterLogger.LOGGER.error403(connectorName); queue.acknowledge(ref); return HandleStatus.HANDLED; @@ -231,7 +231,7 @@ public class OutgoingTweetsHandler implements Consumer, ConnectorService } queue.acknowledge(ref); - HornetQTwitterLogger.LOGGER.debug(connectorName + ": forwarded to twitter: " + message.getMessageID()); + ActiveMQTwitterLogger.LOGGER.debug(connectorName + ": forwarded to twitter: " + message.getMessageID()); return HandleStatus.HANDLED; } } @@ -256,7 +256,7 @@ public class OutgoingTweetsHandler implements Consumer, ConnectorService } catch (Exception e) { - HornetQServerLogger.LOGGER.errorStoppingConnectorService(e, getName()); + ActiveMQServerLogger.LOGGER.errorStoppingConnectorService(e, getName()); } } } diff --git a/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/twitter/HornetQTwitterBundle.java b/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/twitter/ActiveMQTwitterBundle.java similarity index 92% rename from integration/activemq-twitter-integration/src/main/java/org/apache/activemq/twitter/HornetQTwitterBundle.java rename to integration/activemq-twitter-integration/src/main/java/org/apache/activemq/twitter/ActiveMQTwitterBundle.java index 6b2425d0e6..d13081dfc4 100644 --- a/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/twitter/HornetQTwitterBundle.java +++ b/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/twitter/ActiveMQTwitterBundle.java @@ -25,7 +25,7 @@ import org.jboss.logging.annotations.MessageBundle; * * so 189000 to 189999 */ -@MessageBundle(projectCode = "HQ") -public class HornetQTwitterBundle +@MessageBundle(projectCode = "AMQ") +public class ActiveMQTwitterBundle { } diff --git a/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/twitter/HornetQTwitterLogger.java b/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/twitter/ActiveMQTwitterLogger.java similarity index 87% rename from integration/activemq-twitter-integration/src/main/java/org/apache/activemq/twitter/HornetQTwitterLogger.java rename to integration/activemq-twitter-integration/src/main/java/org/apache/activemq/twitter/ActiveMQTwitterLogger.java index 321f9b923b..8ee1a0b724 100644 --- a/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/twitter/HornetQTwitterLogger.java +++ b/integration/activemq-twitter-integration/src/main/java/org/apache/activemq/twitter/ActiveMQTwitterLogger.java @@ -36,13 +36,13 @@ import org.jboss.logging.annotations.MessageLogger; * * so an INFO message would be 181000 to 181999 */ -@MessageLogger(projectCode = "HQ") -public interface HornetQTwitterLogger extends BasicLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQTwitterLogger extends BasicLogger { /** * The twitter logger. */ - HornetQTwitterLogger LOGGER = Logger.getMessageLogger(HornetQTwitterLogger.class, HornetQTwitterLogger.class.getPackage().getName()); + ActiveMQTwitterLogger LOGGER = Logger.getMessageLogger(ActiveMQTwitterLogger.class, ActiveMQTwitterLogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.WARN) @Message(id = 182001, value = "{0}: HTTP status code = 403: Ignore duplicated message", format = Message.Format.MESSAGE_FORMAT) diff --git a/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/integration/vertx/HornetQVertxLogger.java b/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/integration/vertx/ActiveMQVertxLogger.java similarity index 87% rename from integration/activemq-vertx-integration/src/main/java/org/apache/activemq/integration/vertx/HornetQVertxLogger.java rename to integration/activemq-vertx-integration/src/main/java/org/apache/activemq/integration/vertx/ActiveMQVertxLogger.java index da40e8baaf..417cecde7f 100644 --- a/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/integration/vertx/HornetQVertxLogger.java +++ b/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/integration/vertx/ActiveMQVertxLogger.java @@ -35,13 +35,13 @@ import org.jboss.logging.annotations.MessageLogger; * * so an INFO message would be 191000 to 191999 */ -@MessageLogger(projectCode = "HQ") -public interface HornetQVertxLogger extends BasicLogger +@MessageLogger(projectCode = "AMQ") +public interface ActiveMQVertxLogger extends BasicLogger { /** * The vertx logger. */ - HornetQVertxLogger LOGGER = Logger.getMessageLogger(HornetQVertxLogger.class, HornetQVertxLogger.class.getPackage().getName()); + ActiveMQVertxLogger LOGGER = Logger.getMessageLogger(ActiveMQVertxLogger.class, ActiveMQVertxLogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.WARN) @Message(id = 192001, value = "Non vertx message: {0}", format = Message.Format.MESSAGE_FORMAT) diff --git a/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/integration/vertx/IncomingVertxEventHandler.java b/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/integration/vertx/IncomingVertxEventHandler.java index 0742f673b9..ba0a5937a4 100644 --- a/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/integration/vertx/IncomingVertxEventHandler.java +++ b/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/integration/vertx/IncomingVertxEventHandler.java @@ -78,7 +78,7 @@ public class IncomingVertxEventHandler implements ConnectorService this.quorumSize = ConfigurationHelper.getIntProperty(VertxConstants.VERTX_QUORUM_SIZE, -1, configuration); this.haGroup = ConfigurationHelper.getStringProperty(VertxConstants.VERTX_HA_GROUP, - "hornetq", configuration); + "activemq", configuration); this.vertxAddress = ConfigurationHelper.getStringProperty(VertxConstants.VERTX_ADDRESS, "org.apache.activemq", configuration); @@ -116,7 +116,7 @@ public class IncomingVertxEventHandler implements ConnectorService eventBus.registerHandler(vertxAddress, handler); isStarted = true; - HornetQVertxLogger.LOGGER.debug(connectorName + ": started"); + ActiveMQVertxLogger.LOGGER.debug(connectorName + ": started"); } @Override @@ -130,7 +130,7 @@ public class IncomingVertxEventHandler implements ConnectorService platformManager.stop(); System.clearProperty("vertx.clusterManagerFactory"); isStarted = false; - HornetQVertxLogger.LOGGER.debug(connectorName + ": stopped"); + ActiveMQVertxLogger.LOGGER.debug(connectorName + ": stopped"); } @Override @@ -175,7 +175,7 @@ public class IncomingVertxEventHandler implements ConnectorService } catch (Exception e) { - HornetQVertxLogger.LOGGER.error("failed to route msg " + msg, e); + ActiveMQVertxLogger.LOGGER.error("failed to route msg " + msg, e); } } diff --git a/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/integration/vertx/OutgoingVertxEventHandler.java b/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/integration/vertx/OutgoingVertxEventHandler.java index 6860304653..b9328d512b 100644 --- a/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/integration/vertx/OutgoingVertxEventHandler.java +++ b/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/integration/vertx/OutgoingVertxEventHandler.java @@ -84,7 +84,7 @@ public class OutgoingVertxEventHandler implements Consumer, ConnectorService this.quorumSize = ConfigurationHelper.getIntProperty(VertxConstants.VERTX_QUORUM_SIZE, -1, configuration); this.haGroup = ConfigurationHelper.getStringProperty(VertxConstants.VERTX_HA_GROUP, - "hornetq", configuration); + "activemq", configuration); this.vertxAddress = ConfigurationHelper.getStringProperty(VertxConstants.VERTX_ADDRESS, "org.apache.activemq", configuration); this.publish = ConfigurationHelper.getBooleanProperty(VertxConstants.VERTX_PUBLISH, false, @@ -133,7 +133,7 @@ public class OutgoingVertxEventHandler implements Consumer, ConnectorService this.queue.deliverAsync(); this.isStarted = true; - HornetQVertxLogger.LOGGER.debug(connectorName + ": started"); + ActiveMQVertxLogger.LOGGER.debug(connectorName + ": started"); } @Override @@ -144,14 +144,14 @@ public class OutgoingVertxEventHandler implements Consumer, ConnectorService return; } - HornetQVertxLogger.LOGGER.debug(connectorName + ": receive shutdown request"); + ActiveMQVertxLogger.LOGGER.debug(connectorName + ": receive shutdown request"); this.queue.removeConsumer(this); this.platformManager.stop(); System.clearProperty("vertx.clusterManagerFactory"); this.isStarted = false; - HornetQVertxLogger.LOGGER.debug(connectorName + ": stopped"); + ActiveMQVertxLogger.LOGGER.debug(connectorName + ": stopped"); } @Override @@ -187,7 +187,7 @@ public class OutgoingVertxEventHandler implements Consumer, ConnectorService if (type == null) { // log a warning and default to raw bytes - HornetQVertxLogger.LOGGER.nonVertxMessage(message); + ActiveMQVertxLogger.LOGGER.nonVertxMessage(message); type = VertxConstants.TYPE_RAWBYTES; } @@ -211,7 +211,7 @@ public class OutgoingVertxEventHandler implements Consumer, ConnectorService queue.acknowledge(ref); - HornetQVertxLogger.LOGGER.debug(connectorName + ": forwarded to vertx: " + ActiveMQVertxLogger.LOGGER.debug(connectorName + ": forwarded to vertx: " + message.getMessageID()); return HandleStatus.HANDLED; } @@ -284,7 +284,7 @@ public class OutgoingVertxEventHandler implements Consumer, ConnectorService vertxMsgBody = rawBytes; break; default: - HornetQVertxLogger.LOGGER.invalidVertxType(type); + ActiveMQVertxLogger.LOGGER.invalidVertxType(type); break; } return vertxMsgBody; diff --git a/pom.xml b/pom.xml index cfc1153636..bef5a51014 100644 --- a/pom.xml +++ b/pom.xml @@ -35,17 +35,17 @@ 4.0.20.Final - Wild Hornet - 2 - 5 - 0 - 125,124,123,122 - SNAPSHOT - SNAPSHOT - - ${hornetq.version.majorVersion}.${hornetq.version.minorVersion}.${hornetq.version.microVersion}.${hornetq.version.versionSuffix} - (${hornetq.version.versionName}, ${hornetq.version.incrementingVersion}) - + Active Hornet + 2 + 5 + 0 + 125,124,123,122 + SNAPSHOT + SNAPSHOT + + ${activemq.version.majorVersion}.${activemq.version.minorVersion}.${activemq.version.microVersion}.${activemq.version.versionSuffix} + (${activemq.version.versionName}, ${activemq.version.incrementingVersion}) + 3.0.9.Final 2.3.1 true diff --git a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/HornetQMessageHandlerTest.java b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/ActiveMQMessageHandlerTest.java similarity index 93% rename from tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/HornetQMessageHandlerTest.java rename to tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/ActiveMQMessageHandlerTest.java index 12c52431b9..ae8053ddf0 100644 --- a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/HornetQMessageHandlerTest.java +++ b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/ActiveMQMessageHandlerTest.java @@ -23,9 +23,9 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.server.Queue; -import org.apache.activemq.ra.HornetQResourceAdapter; -import org.apache.activemq.ra.inflow.HornetQActivationSpec; -import org.apache.activemq.tests.integration.ra.HornetQRATestBase; +import org.apache.activemq.ra.ActiveMQResourceAdapter; +import org.apache.activemq.ra.inflow.ActiveMQActivationSpec; +import org.apache.activemq.tests.integration.ra.ActiveMQRATestBase; import org.jboss.byteman.contrib.bmunit.BMRule; import org.jboss.byteman.contrib.bmunit.BMRules; import org.jboss.byteman.contrib.bmunit.BMUnitRunner; @@ -51,7 +51,7 @@ import java.util.concurrent.TimeUnit; * Created May 20, 2010 */ @RunWith(BMUnitRunner.class) -public class HornetQMessageHandlerTest extends HornetQRATestBase +public class ActiveMQMessageHandlerTest extends ActiveMQRATestBase { protected boolean usePersistence() @@ -74,16 +74,16 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @BMRule ( name = "interrupt", - targetClass = "org.apache.activemq.core.protocol.core.impl.HornetQSessionContext", + targetClass = "org.apache.activemq.core.protocol.core.impl.ActiveMQSessionContext", targetMethod = "xaEnd", targetLocation = "ENTRY", - action = "org.apache.activemq.byteman.tests.HornetQMessageHandlerTest.interrupt();" + action = "org.apache.activemq.byteman.tests.ActiveMQMessageHandlerTest.interrupt();" ) } ) public void testSimpleMessageReceivedOnQueue() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); resourceAdapter = qResourceAdapter; qResourceAdapter.setTransactionManagerLocatorClass(DummyTMLocator.class.getName()); @@ -94,7 +94,7 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase qResourceAdapter.setConnectorClassName(NETTY_CONNECTOR_FACTORY); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setMaxSession(1); spec.setCallTimeout(1000L); spec.setResourceAdapter(qResourceAdapter); @@ -154,16 +154,16 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @BMRule ( name = "interrupt", - targetClass = "org.apache.activemq.core.protocol.core.impl.HornetQSessionContext", + targetClass = "org.apache.activemq.core.protocol.core.impl.ActiveMQSessionContext", targetMethod = "xaEnd", targetLocation = "ENTRY", - action = "org.apache.activemq.byteman.tests.HornetQMessageHandlerTest.interrupt();" + action = "org.apache.activemq.byteman.tests.ActiveMQMessageHandlerTest.interrupt();" ) } ) public void testSimpleMessageReceivedOnQueueTwoPhase() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); resourceAdapter = qResourceAdapter; qResourceAdapter.setTransactionManagerLocatorClass(DummyTMLocator.class.getName()); @@ -174,7 +174,7 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase qResourceAdapter.setConnectorClassName(NETTY_CONNECTOR_FACTORY); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setMaxSession(1); spec.setCallTimeout(1000L); spec.setResourceAdapter(qResourceAdapter); @@ -227,7 +227,7 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase session.close(); } - static volatile HornetQResourceAdapter resourceAdapter; + static volatile ActiveMQResourceAdapter resourceAdapter; static boolean resourceAdapterStopped = false; public static void interrupt() throws InterruptedException { @@ -288,7 +288,7 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase super.onMessage(message); // try // { -// lastMessage = (HornetQMessage) message; +// lastMessage = (ActiveMQMessage) message; // currentTX.enlistResource(session); // ClientProducer prod = session.createProducer() // } diff --git a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/BMFailoverTest.java b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/BMFailoverTest.java index f2c0672817..51fbcc6120 100644 --- a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/BMFailoverTest.java +++ b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/BMFailoverTest.java @@ -28,7 +28,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.client.HornetQClientMessageBundle; +import org.apache.activemq.core.client.ActiveMQClientMessageBundle; import org.apache.activemq.core.client.impl.ClientMessageImpl; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.client.impl.ClientSessionInternal; @@ -98,7 +98,7 @@ public class BMFailoverTest extends FailoverTestBase e.printStackTrace(); } stopped = true; - throw HornetQClientMessageBundle.BUNDLE.unblockingACall(null); + throw ActiveMQClientMessageBundle.BUNDLE.unblockingACall(null); } } @Test @@ -108,8 +108,8 @@ public class BMFailoverTest extends FailoverTestBase { @BMRule ( - name = "trace HornetQSessionContext xaEnd", - targetClass = "org.apache.activemq.core.protocol.core.impl.HornetQSessionContext", + name = "trace ActiveMQSessionContext xaEnd", + targetClass = "org.apache.activemq.core.protocol.core.impl.ActiveMQSessionContext", targetMethod = "xaEnd", targetLocation = "AT EXIT", action = "org.apache.activemq.byteman.tests.BMFailoverTest.stopAndThrow()" diff --git a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/BridgeServerLocatorConfigurationTest.java b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/BridgeServerLocatorConfigurationTest.java index a2ea0e82e7..166f91180a 100644 --- a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/BridgeServerLocatorConfigurationTest.java +++ b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/BridgeServerLocatorConfigurationTest.java @@ -22,7 +22,7 @@ import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.BridgeConfiguration; import org.apache.activemq.core.config.CoreQueueConfiguration; import org.apache.activemq.core.remoting.impl.invm.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.cluster.impl.BridgeImpl; import org.apache.activemq.tests.util.ServiceTestBase; import org.jboss.byteman.contrib.bmunit.BMRule; @@ -54,7 +54,7 @@ public class BridgeServerLocatorConfigurationTest extends ServiceTestBase @Test @BMRule(name = "check connection ttl", targetClass = "org.apache.activemq.byteman.tests.BridgeServerLocatorConfigurationTest", - targetMethod = "getBridgeTTL(HornetQServer, String)", targetLocation = "EXIT", + targetMethod = "getBridgeTTL(ActiveMQServer, String)", targetLocation = "EXIT", action = "$! = $0.getConfiguredBridge($1).serverLocator.getConnectionTTL();") /** * Checks the connection ttl by using byteman to override the methods on this class to return the value of private variables in the Bridge. @@ -67,7 +67,7 @@ public class BridgeServerLocatorConfigurationTest extends ServiceTestBase public void testConnectionTTLOnBridge() throws Exception { Map server0Params = new HashMap(); - HornetQServer serverWithBridge = createClusteredServerWithParams(isNetty(), 0, true, server0Params); + ActiveMQServer serverWithBridge = createClusteredServerWithParams(isNetty(), 0, true, server0Params); Map server1Params = new HashMap(); if (isNetty()) @@ -78,7 +78,7 @@ public class BridgeServerLocatorConfigurationTest extends ServiceTestBase { server1Params.put(TransportConstants.SERVER_ID_PROP_NAME, 1); } - HornetQServer server1 = createClusteredServerWithParams(isNetty(), 1, true, server1Params); + ActiveMQServer server1 = createClusteredServerWithParams(isNetty(), 1, true, server1Params); ServerLocator locator = null; try { @@ -155,7 +155,7 @@ public class BridgeServerLocatorConfigurationTest extends ServiceTestBase * @param bridgeName * @return */ - private long getBridgeTTL(HornetQServer bridgeServer, String bridgeName) + private long getBridgeTTL(ActiveMQServer bridgeServer, String bridgeName) { return -1L; } @@ -165,12 +165,12 @@ public class BridgeServerLocatorConfigurationTest extends ServiceTestBase * @param bridgeServer * @return */ - private BridgeImpl getConfiguredBridge(HornetQServer bridgeServer) + private BridgeImpl getConfiguredBridge(ActiveMQServer bridgeServer) { return getConfiguredBridge(bridgeServer, BRIDGE_NAME); } - private BridgeImpl getConfiguredBridge(HornetQServer bridgeServer, String bridgeName) + private BridgeImpl getConfiguredBridge(ActiveMQServer bridgeServer, String bridgeName) { return (BridgeImpl)bridgeServer.getClusterManager().getBridges().get(bridgeName); } diff --git a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/ClusteredGroupingTest.java b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/ClusteredGroupingTest.java index 508fcfd2dd..5c62cf5717 100644 --- a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/ClusteredGroupingTest.java +++ b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/ClusteredGroupingTest.java @@ -20,7 +20,7 @@ import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.management.ManagementHelper; import org.apache.activemq.api.core.management.CoreNotificationType; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.group.impl.GroupingHandlerConfiguration; import org.apache.activemq.core.server.group.impl.Response; import org.apache.activemq.core.server.management.Notification; @@ -384,10 +384,10 @@ public class ClusteredGroupingTest extends ClusterTestBase assertHandlersAreSame(getServer(0), getServer(1), getServer(2), getServer(3)); } - private void assertHandlersAreSame(HornetQServer server, HornetQServer... qServers) + private void assertHandlersAreSame(ActiveMQServer server, ActiveMQServer... qServers) { SimpleString id = server.getGroupingHandler().getProposal(new SimpleString("id1.queue0"), false).getClusterName(); - for (HornetQServer qServer : qServers) + for (ActiveMQServer qServer : qServers) { Response proposal = qServer.getGroupingHandler().getProposal(new SimpleString("id1.queue0"), false); if (proposal != null) diff --git a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/GroupingTest.java b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/GroupingTest.java index 07c7594c5f..2a23574173 100644 --- a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/GroupingTest.java +++ b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/GroupingTest.java @@ -22,7 +22,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.api.core.ActiveMQNotConnectedException; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.util.JMSTestBase; import org.jboss.byteman.contrib.bmunit.BMRule; @@ -88,7 +88,7 @@ public class GroupingTest extends JMSTestBase Connection connection2 = null; try { - HornetQConnectionFactory fact = (HornetQConnectionFactory) getCF(); + ActiveMQConnectionFactory fact = (ActiveMQConnectionFactory) getCF(); fact.setReconnectAttempts(0); //fact.setConsumerWindowSize(1000); //fact.setTransactionBatchSize(0); diff --git a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/JMSBridgeReconnectionTest.java b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/JMSBridgeReconnectionTest.java index 768eb51e89..1c49502257 100644 --- a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/JMSBridgeReconnectionTest.java +++ b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/JMSBridgeReconnectionTest.java @@ -59,7 +59,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase ) public void performCrashDestinationStopBridge() throws Exception { - hornetQServer = jmsServer1; + activeMQServer = jmsServer1; ConnectionFactoryFactory factInUse0 = cff0; ConnectionFactoryFactory factInUse1 = cff1; final JMSBridgeImpl bridge = @@ -81,7 +81,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase null, false); - addHornetQComponent(bridge); + addActiveMQComponent(bridge); bridge.setTransactionManager(newTransactionManager()); bridge.start(); final CountDownLatch latch = new CountDownLatch(20); @@ -125,7 +125,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase { try { - hornetQServer.stop(); + activeMQServer.stop(); } catch (Exception e) { @@ -145,7 +145,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase } } - static JMSServerManager hornetQServer; + static JMSServerManager activeMQServer; static boolean stopped = false; static int count = 20; static CountDownLatch stopLatch = new CountDownLatch(1); diff --git a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/LatencyTest.java b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/LatencyTest.java index 56d4eafa9d..10da5b53bf 100644 --- a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/LatencyTest.java +++ b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/LatencyTest.java @@ -15,7 +15,7 @@ package org.apache.activemq.byteman.tests; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.jboss.byteman.contrib.bmunit.BMRule; import org.jboss.byteman.contrib.bmunit.BMRules; @@ -54,7 +54,7 @@ public class LatencyTest extends ServiceTestBase ) public void testLatency() throws Exception { - HornetQServer server = createServer(createDefaultConfig(true)); + ActiveMQServer server = createServer(createDefaultConfig(true)); server.start(); ServerLocator locator = createNettyNonHALocator(); ClientSessionFactory factory = createSessionFactory(locator); diff --git a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/OrphanedConsumerTest.java b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/OrphanedConsumerTest.java index 7cfbdf9929..4b0c805705 100644 --- a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/OrphanedConsumerTest.java +++ b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/OrphanedConsumerTest.java @@ -21,7 +21,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.tests.util.ServiceTestBase; import org.jboss.byteman.contrib.bmunit.BMRule; @@ -58,11 +58,11 @@ public class OrphanedConsumerTest extends ServiceTestBase throw new InterruptedException("nice.. I interrupted this!"); } - private HornetQServer server; + private ActiveMQServer server; private ServerLocator locator; - static HornetQServer staticServer; + static ActiveMQServer staticServer; /** * {@link #leavingCloseOnTestCountersWhileClosing()} will set this in case of any issues. @@ -245,7 +245,7 @@ public class OrphanedConsumerTest extends ServiceTestBase } else { - server.getHornetQServerControl().closeConnectionsForAddress("127.0.0.1"); + server.getActiveMQServerControl().closeConnectionsForAddress("127.0.0.1"); } if (verification != null) diff --git a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/PagingLeakTest.java b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/PagingLeakTest.java index a99b63c76c..3d258449a4 100644 --- a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/PagingLeakTest.java +++ b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/PagingLeakTest.java @@ -27,8 +27,8 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.paging.cursor.impl.PagePositionImpl; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.ServiceTestBase; @@ -121,7 +121,7 @@ public class PagingLeakTest extends ServiceTestBase .setSecurityEnabled(false) .addConnectorConfiguration("invm", new TransportConfiguration(INVM_CONNECTOR_FACTORY)); - final HornetQServer server = HornetQServers.newHornetQServer(conf, true); + final ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, true); addServer(server); diff --git a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/ScaleDownFailoverTest.java b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/ScaleDownFailoverTest.java index dcc323b019..f2522887ce 100644 --- a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/ScaleDownFailoverTest.java +++ b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/ScaleDownFailoverTest.java @@ -17,7 +17,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.core.config.ScaleDownConfiguration; import org.apache.activemq.core.config.ha.LiveOnlyPolicyConfiguration; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.integration.cluster.distribution.ClusterTestBase; import org.jboss.byteman.contrib.bmunit.BMRule; import org.jboss.byteman.contrib.bmunit.BMUnitRunner; @@ -31,7 +31,7 @@ import org.junit.runner.RunWith; public class ScaleDownFailoverTest extends ClusterTestBase { protected static int stopCount = 0; - private static HornetQServer[] staticServers; + private static ActiveMQServer[] staticServers; @Override @Before @@ -171,15 +171,15 @@ public class ScaleDownFailoverTest extends ClusterTestBase { try { - for (HornetQServer hornetQServer : staticServers) + for (ActiveMQServer activeMQServer : staticServers) { - if (hornetQServer != null) + if (activeMQServer != null) { - for (TransportConfiguration transportConfiguration : hornetQServer.getConfiguration().getAcceptorConfigurations()) + for (TransportConfiguration transportConfiguration : activeMQServer.getConfiguration().getAcceptorConfigurations()) { if (transportConfiguration.getParams().get(TransportConstants.PORT_PROP_NAME).equals(tc.getParams().get(TransportConstants.PORT_PROP_NAME))) { - hornetQServer.stop(); + activeMQServer.stop(); stopCount++; System.out.println("Stopping server listening at: " + tc.getParams().get(TransportConstants.PORT_PROP_NAME)); } diff --git a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/StartStopDeadlockTest.java b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/StartStopDeadlockTest.java index f7aa15b840..e2cbe42343 100644 --- a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/StartStopDeadlockTest.java +++ b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/StartStopDeadlockTest.java @@ -19,8 +19,8 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.tests.unit.util.InVMNamingContext; import org.apache.activemq.tests.util.ServiceTestBase; @@ -51,7 +51,7 @@ public class StartStopDeadlockTest extends ServiceTestBase @BMRule ( name = "Server.start wait-init", - targetClass = "org.apache.activemq.core.server.impl.HornetQServerImpl", + targetClass = "org.apache.activemq.core.server.impl.ActiveMQServerImpl", targetMethod = "initialisePart2", targetLocation = "ENTRY", condition = "incrementCounter(\"server-Init\") == 2", @@ -81,7 +81,7 @@ public class StartStopDeadlockTest extends ServiceTestBase .setSecurityEnabled(false) .setHAPolicyConfiguration(new SharedStoreMasterPolicyConfiguration()) .addConnectorConfiguration("invm", new TransportConfiguration(INVM_CONNECTOR_FACTORY)); - final HornetQServer serverLive = HornetQServers.newHornetQServer(confLive); + final ActiveMQServer serverLive = ActiveMQServers.newActiveMQServer(confLive); serverLive.start(); addServer(serverLive); @@ -92,7 +92,7 @@ public class StartStopDeadlockTest extends ServiceTestBase .setHAPolicyConfiguration(new SharedStoreSlavePolicyConfiguration()) .addConnectorConfiguration("invm", new TransportConfiguration(INVM_CONNECTOR_FACTORY)); - final HornetQServer server = HornetQServers.newHornetQServer(conf, true); + final ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, true); addServer(server); final JMSServerManagerImpl jmsServer = new JMSServerManagerImpl(server); diff --git a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/StompInternalStateTest.java b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/StompInternalStateTest.java index d2972a2169..ab7323b1fe 100644 --- a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/StompInternalStateTest.java +++ b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/StompInternalStateTest.java @@ -26,7 +26,7 @@ import org.apache.activemq.core.protocol.stomp.StompProtocolManagerFactory; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.management.Notification; import org.apache.activemq.tests.util.ServiceTestBase; import org.jboss.byteman.contrib.bmunit.BMRule; @@ -44,7 +44,7 @@ public class StompInternalStateTest extends ServiceTestBase private static volatile String resultTestStompProtocolManagerLeak = null; - protected HornetQServer server = null; + protected ActiveMQServer server = null; @Test @BMRules diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/DuplicateDetectionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/DuplicateDetectionTest.java index f174a1d8da..3ae5db36ea 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/DuplicateDetectionTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/DuplicateDetectionTest.java @@ -26,12 +26,12 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.message.impl.MessageImpl; import org.apache.activemq.core.postoffice.impl.PostOfficeImpl; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.transaction.impl.XidImpl; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -51,7 +51,7 @@ public class DuplicateDetectionTest extends ServiceTestBase { private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; - private HornetQServer messagingService; + private ActiveMQServer messagingService; private final SimpleString propKey = new SimpleString("propkey"); @@ -60,7 +60,7 @@ public class DuplicateDetectionTest extends ServiceTestBase @Test public void testSimpleDuplicateDetecion() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -168,7 +168,7 @@ public class DuplicateDetectionTest extends ServiceTestBase { final int TEST_SIZE = 100; - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); locator.setBlockOnNonDurableSend(true); @@ -245,7 +245,7 @@ public class DuplicateDetectionTest extends ServiceTestBase @Test public void testSimpleDuplicateDetectionWithString() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -316,7 +316,7 @@ public class DuplicateDetectionTest extends ServiceTestBase @Test public void testCacheSize() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -476,7 +476,7 @@ public class DuplicateDetectionTest extends ServiceTestBase @Test public void testTransactedDuplicateDetection1() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -529,7 +529,7 @@ public class DuplicateDetectionTest extends ServiceTestBase @Test public void testTransactedDuplicateDetection2() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -576,7 +576,7 @@ public class DuplicateDetectionTest extends ServiceTestBase @Test public void testTransactedDuplicateDetection3() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -642,7 +642,7 @@ public class DuplicateDetectionTest extends ServiceTestBase @Test public void testRollbackThenSend() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -691,7 +691,7 @@ public class DuplicateDetectionTest extends ServiceTestBase @Test public void testEntireTransactionRejected() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -787,7 +787,7 @@ public class DuplicateDetectionTest extends ServiceTestBase @Test public void testXADuplicateDetection1() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -867,7 +867,7 @@ public class DuplicateDetectionTest extends ServiceTestBase @Test public void testXADuplicateDetection2() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -949,7 +949,7 @@ public class DuplicateDetectionTest extends ServiceTestBase @Test public void testXADuplicateDetection3() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -1030,7 +1030,7 @@ public class DuplicateDetectionTest extends ServiceTestBase @Test public void testXADuplicateDetectionPrepareAndRollback() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -1103,7 +1103,7 @@ public class DuplicateDetectionTest extends ServiceTestBase @Test public void testXADuplicateDetectionPrepareAndRollbackStopServer() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -1190,7 +1190,7 @@ public class DuplicateDetectionTest extends ServiceTestBase @Test public void testXADuplicateDetection4() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -1294,11 +1294,11 @@ public class DuplicateDetectionTest extends ServiceTestBase Configuration conf = createDefaultConfig() .setIDCacheSize(cacheSize); - HornetQServer messagingService2 = createServer(conf); + ActiveMQServer messagingService2 = createServer(conf); messagingService2.start(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -1381,11 +1381,11 @@ public class DuplicateDetectionTest extends ServiceTestBase Configuration conf = createDefaultConfig() .setIDCacheSize(theCacheSize); - HornetQServer messagingService2 = createServer(conf); + ActiveMQServer messagingService2 = createServer(conf); messagingService2.start(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -1463,11 +1463,11 @@ public class DuplicateDetectionTest extends ServiceTestBase Configuration conf = createDefaultConfig() .setIDCacheSize(initialCacheSize); - HornetQServer messagingService2 = createServer(conf); + ActiveMQServer messagingService2 = createServer(conf); messagingService2.start(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -1556,11 +1556,11 @@ public class DuplicateDetectionTest extends ServiceTestBase Configuration conf = createDefaultConfig() .setIDCacheSize(initialCacheSize); - HornetQServer messagingService2 = createServer(conf); + ActiveMQServer messagingService2 = createServer(conf); messagingService2.start(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -1657,11 +1657,11 @@ public class DuplicateDetectionTest extends ServiceTestBase .setIDCacheSize(cacheSize) .setPersistIDCache(false); - HornetQServer messagingService2 = createServer(conf); + ActiveMQServer messagingService2 = createServer(conf); messagingService2.start(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -1743,11 +1743,11 @@ public class DuplicateDetectionTest extends ServiceTestBase .setIDCacheSize(cacheSize) .setPersistIDCache(false); - HornetQServer messagingService2 = createServer(conf); + ActiveMQServer messagingService2 = createServer(conf); messagingService2.start(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -1832,11 +1832,11 @@ public class DuplicateDetectionTest extends ServiceTestBase Configuration conf = createDefaultConfig() .setIDCacheSize(cacheSize); - HornetQServer messagingService2 = createServer(conf); + ActiveMQServer messagingService2 = createServer(conf); messagingService2.start(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -1952,11 +1952,11 @@ public class DuplicateDetectionTest extends ServiceTestBase .setIDCacheSize(cacheSize) .setPersistIDCache(false); - HornetQServer messagingService2 = createServer(conf); + ActiveMQServer messagingService2 = createServer(conf); messagingService2.start(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -2055,11 +2055,11 @@ public class DuplicateDetectionTest extends ServiceTestBase Configuration conf = createDefaultConfig() .setIDCacheSize(cacheSize); - HornetQServer messagingService2 = createServer(conf); + ActiveMQServer messagingService2 = createServer(conf); messagingService2.start(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -2156,11 +2156,11 @@ public class DuplicateDetectionTest extends ServiceTestBase Configuration conf = createDefaultConfig() .setIDCacheSize(cacheSize); - HornetQServer messagingService2 = createServer(conf); + ActiveMQServer messagingService2 = createServer(conf); messagingService2.start(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/InterceptorTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/InterceptorTest.java index a57347698a..024413f136 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/InterceptorTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/InterceptorTest.java @@ -34,7 +34,7 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.MessagePacket; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionCreateConsumerMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionReceiveMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionSendMessage; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.util.ServiceTestBase; @@ -49,7 +49,7 @@ import org.junit.Test; */ public class InterceptorTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private final SimpleString QUEUE = new SimpleString("InterceptorTestQueue"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/String64KLimitTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/String64KLimitTest.java index 018a900793..8ae3d18c26 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/String64KLimitTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/String64KLimitTest.java @@ -26,8 +26,8 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.UnitTestCase; @@ -51,7 +51,7 @@ public class String64KLimitTest extends UnitTestCase // Attributes ---------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; private ClientSession session; private ServerLocator locator; @@ -209,7 +209,7 @@ public class String64KLimitTest extends UnitTestCase Configuration config = createBasicConfig() .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY)); - server = addServer(HornetQServers.newHornetQServer(config, false)); + server = addServer(ActiveMQServers.newActiveMQServer(config, false)); server.start(); locator = createInVMNonHALocator(); sf = createSessionFactory(locator); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/aerogear/AeroGearBasicServerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/aerogear/AeroGearBasicServerTest.java index 65eb413111..6ac0a65380 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/aerogear/AeroGearBasicServerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/aerogear/AeroGearBasicServerTest.java @@ -28,13 +28,13 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.SendAcknowledgementHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.ConnectorServiceConfiguration; import org.apache.activemq.core.config.CoreQueueConfiguration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.integration.aerogear.AeroGearConnectorServiceFactory; import org.apache.activemq.integration.aerogear.AeroGearConstants; import org.apache.activemq.tests.util.ServiceTestBase; @@ -53,7 +53,7 @@ import org.mortbay.jetty.nio.SelectChannelConnector; public class AeroGearBasicServerTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private ServerLocator locator; private Server jetty; @@ -125,12 +125,12 @@ public class AeroGearBasicServerTest extends ServiceTestBase AeroGearHandler aeroGearHandler = new AeroGearHandler(latch); jetty.addHandler(aeroGearHandler); TransportConfiguration tpconf = new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY); - locator = HornetQClient.createServerLocatorWithoutHA(tpconf); + locator = ActiveMQClient.createServerLocatorWithoutHA(tpconf); ClientSessionFactory sf = createSessionFactory(locator); ClientSession session = sf.createSession(false, true, true); ClientProducer producer = session.createProducer("testQueue"); ClientMessage m = session.createMessage(true); - m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "hello from HornetQ!"); + m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "hello from ActiveMQ!"); m.putStringProperty("AEROGEAR_PROP1", "prop1"); m.putBooleanProperty("AEROGEAR_PROP2", true); @@ -148,7 +148,7 @@ public class AeroGearBasicServerTest extends ServiceTestBase assertEquals(prop1, "true"); String alert = body.getString("alert"); assertNotNull(alert); - assertEquals(alert, "hello from HornetQ!"); + assertEquals(alert, "hello from ActiveMQ!"); String sound = body.getString("sound"); assertNotNull(sound); assertEquals(sound, "sound1"); @@ -176,7 +176,7 @@ public class AeroGearBasicServerTest extends ServiceTestBase //now override the properties m = session.createMessage(true); - m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "another hello from HornetQ!"); + m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "another hello from ActiveMQ!"); m.putStringProperty(AeroGearConstants.AEROGEAR_BADGE.toString(), "111"); m.putStringProperty(AeroGearConstants.AEROGEAR_SOUND.toString(), "s1"); m.putIntProperty(AeroGearConstants.AEROGEAR_TTL.toString(), 10000); @@ -191,7 +191,7 @@ public class AeroGearBasicServerTest extends ServiceTestBase assertNotNull(body); alert = body.getString("alert"); assertNotNull(alert); - assertEquals(alert, "another hello from HornetQ!"); + assertEquals(alert, "another hello from ActiveMQ!"); sound = body.getString("sound"); assertNotNull(sound); assertEquals(sound, "s1"); @@ -274,13 +274,13 @@ public class AeroGearBasicServerTest extends ServiceTestBase }); TransportConfiguration tpconf = new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY); - locator = HornetQClient.createServerLocatorWithoutHA(tpconf); + locator = ActiveMQClient.createServerLocatorWithoutHA(tpconf); ClientSessionFactory sf = createSessionFactory(locator); ClientSession session = sf.createSession(false, true, true); ClientProducer producer = session.createProducer("testQueue"); final CountDownLatch latch = new CountDownLatch(2); ClientMessage m = session.createMessage(true); - m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "hello from HornetQ!"); + m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "hello from ActiveMQ!"); producer.send(m, new SendAcknowledgementHandler() { @@ -291,7 +291,7 @@ public class AeroGearBasicServerTest extends ServiceTestBase } }); m = session.createMessage(true); - m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "another hello from HornetQ!"); + m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "another hello from ActiveMQ!"); producer.send(m, new SendAcknowledgementHandler() { @@ -328,16 +328,16 @@ public class AeroGearBasicServerTest extends ServiceTestBase }); TransportConfiguration tpconf = new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY); - locator = HornetQClient.createServerLocatorWithoutHA(tpconf); + locator = ActiveMQClient.createServerLocatorWithoutHA(tpconf); ClientSessionFactory sf = createSessionFactory(locator); ClientSession session = sf.createSession(false, true, true); ClientProducer producer = session.createProducer("testQueue"); ClientMessage m = session.createMessage(true); - m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "hello from HornetQ!"); + m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "hello from ActiveMQ!"); producer.send(m); m = session.createMessage(true); - m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "another hello from HornetQ!"); + m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "another hello from ActiveMQ!"); producer.send(m); assertTrue(latch.await(5, TimeUnit.SECONDS)); @@ -366,16 +366,16 @@ public class AeroGearBasicServerTest extends ServiceTestBase }); TransportConfiguration tpconf = new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY); - locator = HornetQClient.createServerLocatorWithoutHA(tpconf); + locator = ActiveMQClient.createServerLocatorWithoutHA(tpconf); ClientSessionFactory sf = createSessionFactory(locator); ClientSession session = sf.createSession(false, true, true); ClientProducer producer = session.createProducer("testQueue"); ClientMessage m = session.createMessage(true); - m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "hello from HornetQ!"); + m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "hello from ActiveMQ!"); producer.send(m); m = session.createMessage(true); - m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "another hello from HornetQ!"); + m.putStringProperty(AeroGearConstants.AEROGEAR_ALERT.toString(), "another hello from ActiveMQ!"); producer.send(m); session.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AckBatchSizeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AckBatchSizeTest.java index 82327f912e..1e65b794d1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AckBatchSizeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AckBatchSizeTest.java @@ -19,7 +19,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; @@ -61,7 +61,7 @@ public class AckBatchSizeTest extends ServiceTestBase @Test public void testAckBatchSize() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); ServerLocator locator = createInVMNonHALocator(); int numMessages = 100; @@ -102,7 +102,7 @@ public class AckBatchSizeTest extends ServiceTestBase @Test public void testAckBatchSizeZero() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); ServerLocator locator = createInVMNonHALocator(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AcknowledgeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AcknowledgeTest.java index c12ee960f0..1dc8a49015 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AcknowledgeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AcknowledgeTest.java @@ -30,8 +30,8 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionInternal; -import org.apache.activemq.core.protocol.core.impl.HornetQConsumerContext; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.protocol.core.impl.ActiveMQConsumerContext; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.spi.core.remoting.ConsumerContext; import org.apache.activemq.tests.integration.IntegrationTestLogger; @@ -58,7 +58,7 @@ public class AcknowledgeTest extends ServiceTestBase @Test public void testReceiveAckLastMessageOnly() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); ServerLocator locator = createInVMNonHALocator(); locator.setAckBatchSize(0); @@ -92,7 +92,7 @@ public class AcknowledgeTest extends ServiceTestBase @Test public void testAsyncConsumerNoAck() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); ServerLocator locator = createInVMNonHALocator(); @@ -133,7 +133,7 @@ public class AcknowledgeTest extends ServiceTestBase @Test public void testAsyncConsumerAck() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); ServerLocator locator = createInVMNonHALocator(); locator.setBlockOnAcknowledge(true); @@ -189,7 +189,7 @@ public class AcknowledgeTest extends ServiceTestBase @Test public void testInvalidACK() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); ServerLocator locator = createInVMNonHALocator(); @@ -274,7 +274,7 @@ public class AcknowledgeTest extends ServiceTestBase @Test public void testAsyncConsumerAckLastMessageOnly() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); ServerLocator locator = createInVMNonHALocator(); locator.setBlockOnAcknowledge(true); @@ -337,7 +337,7 @@ public class AcknowledgeTest extends ServiceTestBase @Override public ConsumerContext getConsumerContext() { - return new HornetQConsumerContext(this.id); + return new ActiveMQConsumerContext(this.id); } @Override diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HornetQCrashTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ActiveMQCrashTest.java similarity index 86% rename from tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HornetQCrashTest.java rename to tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ActiveMQCrashTest.java index 3738ede7fd..5820d43b47 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HornetQCrashTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ActiveMQCrashTest.java @@ -25,15 +25,15 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.SendAcknowledgementHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; @@ -44,11 +44,11 @@ import org.apache.activemq.tests.util.UnitTestCase; * From https://jira.jboss.org/jira/browse/HORNETQ-144 * */ -public class HornetQCrashTest extends UnitTestCase +public class ActiveMQCrashTest extends UnitTestCase { private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; - public HornetQServer server; + public ActiveMQServer server; private volatile boolean ackReceived; private ServerLocator locator; @@ -61,7 +61,7 @@ public class HornetQCrashTest extends UnitTestCase .setSecurityEnabled(false) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - server = addServer(HornetQServers.newHornetQServer(configuration)); + server = addServer(ActiveMQServers.newActiveMQServer(configuration)); server.start(); @@ -102,22 +102,22 @@ public class HornetQCrashTest extends UnitTestCase public static class AckInterceptor implements Interceptor { - private final HornetQServer server; + private final ActiveMQServer server; - AckInterceptor(final HornetQServer server) + AckInterceptor(final ActiveMQServer server) { this.server = server; } public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { - HornetQCrashTest.log.info("AckInterceptor.intercept " + packet); + ActiveMQCrashTest.log.info("AckInterceptor.intercept " + packet); if (packet.getType() == PacketImpl.SESS_SEND) { try { - HornetQCrashTest.log.info("Stopping server"); + ActiveMQCrashTest.log.info("Stopping server"); new Thread() { @@ -152,7 +152,7 @@ public class HornetQCrashTest extends UnitTestCase public void setUp() throws Exception { super.setUp(); - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY)); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY)); addServerLocator(locator); } } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AddressSettingsTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AddressSettingsTest.java index 80b0438666..09d7a1a6d5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AddressSettingsTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AddressSettingsTest.java @@ -19,7 +19,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.HierarchicalRepository; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.ServiceTestBase; @@ -62,7 +62,7 @@ public class AddressSettingsTest extends ServiceTestBase @Test public void testSimpleHierarchyWithDLA() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); AddressSettings addressSettings = new AddressSettings(); @@ -119,7 +119,7 @@ public class AddressSettingsTest extends ServiceTestBase @Test public void test2LevelHierarchyWithDLA() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); AddressSettings addressSettings = new AddressSettings(); @@ -176,7 +176,7 @@ public class AddressSettingsTest extends ServiceTestBase @Test public void test2LevelWordHierarchyWithDLA() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); AddressSettings addressSettings = new AddressSettings(); addressSettings.setDeadLetterAddress(dlaA); @@ -231,7 +231,7 @@ public class AddressSettingsTest extends ServiceTestBase @Test public void test3LevelHierarchyWithDLA() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); AddressSettings addressSettings = new AddressSettings(); @@ -307,7 +307,7 @@ public class AddressSettingsTest extends ServiceTestBase @Test public void testOverrideHierarchyWithDLA() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); AddressSettings addressSettings = new AddressSettings(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AutogroupIdTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AutogroupIdTest.java index fff8bd6b5b..4f6604fa0d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AutogroupIdTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/AutogroupIdTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; @@ -55,7 +55,7 @@ public class AutogroupIdTest extends ServiceTestBase @Test public void testGroupIdAutomaticallySet() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); @@ -105,7 +105,7 @@ public class AutogroupIdTest extends ServiceTestBase @Test public void testGroupIdAutomaticallySetMultipleProducers() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); @@ -160,7 +160,7 @@ public class AutogroupIdTest extends ServiceTestBase @Test public void testGroupIdAutomaticallyNotSet() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/BlockingSendTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/BlockingSendTest.java index 853a518b02..36ab6e6ef3 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/BlockingSendTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/BlockingSendTest.java @@ -18,7 +18,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; import org.junit.Test; @@ -44,7 +44,7 @@ public class BlockingSendTest extends ServiceTestBase @Test public void testSinglePersistentBlockingNonSync() throws Exception { - HornetQServer server = createServer(true); + ActiveMQServer server = createServer(true); ClientSession session = null; ClientSessionFactory factory = null; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/CommitRollbackTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/CommitRollbackTest.java index f75edae68b..b6e3dd413b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/CommitRollbackTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/CommitRollbackTest.java @@ -24,7 +24,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; @@ -48,7 +48,7 @@ public class CommitRollbackTest extends ServiceTestBase @Test public void testReceiveWithCommit() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); ServerLocator locator = createInVMNonHALocator(); @@ -81,7 +81,7 @@ public class CommitRollbackTest extends ServiceTestBase @Test public void testReceiveWithRollback() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); ServerLocator locator = createInVMNonHALocator(); @@ -120,7 +120,7 @@ public class CommitRollbackTest extends ServiceTestBase @Test public void testReceiveWithRollbackMultipleConsumersDifferentQueues() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); ServerLocator locator = createInVMNonHALocator(); @@ -166,7 +166,7 @@ public class CommitRollbackTest extends ServiceTestBase @Test public void testAsyncConsumerCommit() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); ServerLocator locator = createInVMNonHALocator(); locator.setBlockOnAcknowledge(true); @@ -221,7 +221,7 @@ public class CommitRollbackTest extends ServiceTestBase @Test public void testAsyncConsumerRollback() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); ServerLocator locator = createInVMNonHALocator(); locator.setBlockOnAcknowledge(true); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConcurrentCreateDeleteProduceTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConcurrentCreateDeleteProduceTest.java index a1c6a0f099..35fcec31e0 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConcurrentCreateDeleteProduceTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConcurrentCreateDeleteProduceTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.ServiceTestBase; @@ -45,7 +45,7 @@ public class ConcurrentCreateDeleteProduceTest extends ServiceTestBase AtomicInteger sequence = new AtomicInteger(0); - private HornetQServer server; + private ActiveMQServer server; private ServerLocator locator; private static final int PAGE_MAX = 100 * 1024; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerCloseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerCloseTest.java index 49117cfaaa..33448b9bbc 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerCloseTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerCloseTest.java @@ -24,14 +24,14 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientConsumerImpl; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.ServiceTestBase; @@ -47,7 +47,7 @@ public class ConsumerCloseTest extends ServiceTestBase { private ClientSessionFactory sf; - private HornetQServer server; + private ActiveMQServer server; private ClientSession session; @@ -71,7 +71,7 @@ public class ConsumerCloseTest extends ServiceTestBase Assert.assertTrue(consumer.isClosed()); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { public void run() throws ActiveMQException { @@ -79,7 +79,7 @@ public class ConsumerCloseTest extends ServiceTestBase } }); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { public void run() throws ActiveMQException { @@ -87,7 +87,7 @@ public class ConsumerCloseTest extends ServiceTestBase } }); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { public void run() throws ActiveMQException { @@ -307,14 +307,14 @@ public class ConsumerCloseTest extends ServiceTestBase .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getCanonicalName())) .setSecurityEnabled(false); - server = addServer(HornetQServers.newHornetQServer(config, false)); + server = addServer(ActiveMQServers.newActiveMQServer(config, false)); server.start(); address = RandomUtil.randomSimpleString(); queue = RandomUtil.randomSimpleString(); locator = - addServerLocator(HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( + addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration( ServiceTestBase.INVM_CONNECTOR_FACTORY))); sf = createSessionFactory(locator); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerFilterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerFilterTest.java index 68468843b4..2c472a3449 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerFilterTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerFilterTest.java @@ -18,7 +18,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.impl.QueueImpl; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; @@ -34,7 +34,7 @@ public class ConsumerFilterTest extends ServiceTestBase { private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; - private HornetQServer server; + private ActiveMQServer server; private ClientSession session; private ClientProducer producer; private ClientConsumer consumer; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerRoundRobinTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerRoundRobinTest.java index 2604fc9e2c..a3187fb719 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerRoundRobinTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerRoundRobinTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; @@ -41,7 +41,7 @@ public class ConsumerRoundRobinTest extends ServiceTestBase @Test public void testConsumersRoundRobinCorrectly() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); ServerLocator locator = createInVMNonHALocator(); ClientSessionFactory cf = createSessionFactory(locator); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerStuckTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerStuckTest.java index be70a3fefb..cf723e7cf7 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerStuckTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerStuckTest.java @@ -19,12 +19,12 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl; import org.apache.activemq.core.protocol.core.impl.RemotingConnectionImpl; import org.apache.activemq.core.remoting.impl.netty.NettyConnection; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Before; import org.junit.Test; @@ -34,7 +34,7 @@ import org.junit.Test; */ public class ConsumerStuckTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private final SimpleString QUEUE = new SimpleString("ConsumerTestQueue"); @@ -58,7 +58,7 @@ public class ConsumerStuckTest extends ServiceTestBase public void testClientStuckTest() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY)); locator.setConnectionTTL(1000); locator.setClientFailureCheckPeriod(100); locator.setConsumerWindowSize(10 * 1024 * 1024); @@ -169,7 +169,7 @@ public class ConsumerStuckTest extends ServiceTestBase public void testClientStuckTestWithDirectDelivery() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY)); locator.setConnectionTTL(1000); locator.setClientFailureCheckPeriod(100); locator.setConsumerWindowSize(10 * 1024 * 1024); @@ -227,7 +227,7 @@ public class ConsumerStuckTest extends ServiceTestBase public void run() { try ( - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY)); ClientSessionFactory factory = locator.createSessionFactory(); ClientSession session = factory.createSession(false, true, true, true); ClientProducer producer = session.createProducer(QUEUE); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerTest.java index 948bb2388c..069322769d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerTest.java @@ -32,7 +32,7 @@ import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.PacketImpl; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.util.ServiceTestBase; @@ -66,7 +66,7 @@ public class ConsumerTest extends ServiceTestBase } private final boolean netty; - private HornetQServer server; + private ActiveMQServer server; private final SimpleString QUEUE = new SimpleString("ConsumerTestQueue"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerWindowSizeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerWindowSizeTest.java index ad215c9479..1f4019819b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerWindowSizeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ConsumerWindowSizeTest.java @@ -33,7 +33,7 @@ import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.Bindings; import org.apache.activemq.core.postoffice.QueueBinding; import org.apache.activemq.core.server.Consumer; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.impl.ServerConsumerImpl; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.integration.IntegrationTestLogger; @@ -92,7 +92,7 @@ public class ConsumerWindowSizeTest extends ServiceTestBase @Test public void testReceiveImmediateWithZeroWindow() throws Exception { - HornetQServer server = createServer(false, isNetty()); + ActiveMQServer server = createServer(false, isNetty()); server.start(); @@ -148,7 +148,7 @@ public class ConsumerWindowSizeTest extends ServiceTestBase @Test public void testReceiveImmediateWithZeroWindow2() throws Exception { - HornetQServer server = createServer(true); + ActiveMQServer server = createServer(true); ServerLocator locator = createInVMNonHALocator(); try { @@ -201,7 +201,7 @@ public class ConsumerWindowSizeTest extends ServiceTestBase @Test public void testReceiveImmediateWithZeroWindow3() throws Exception { - HornetQServer server = createServer(false, isNetty()); + ActiveMQServer server = createServer(false, isNetty()); server.start(); @@ -256,7 +256,7 @@ public class ConsumerWindowSizeTest extends ServiceTestBase @Test public void testReceiveImmediateWithZeroWindow4() throws Exception { - HornetQServer server = createServer(false, isNetty()); + ActiveMQServer server = createServer(false, isNetty()); server.start(); @@ -313,7 +313,7 @@ public class ConsumerWindowSizeTest extends ServiceTestBase { final int NUMBER_OF_MESSAGES = 200; - HornetQServer server = createServer(false, isNetty()); + ActiveMQServer server = createServer(false, isNetty()); server.start(); @@ -404,7 +404,7 @@ public class ConsumerWindowSizeTest extends ServiceTestBase { final int NUMBER_OF_MESSAGES = 200; - HornetQServer server = createServer(false, isNetty()); + ActiveMQServer server = createServer(false, isNetty()); server.start(); @@ -467,7 +467,7 @@ public class ConsumerWindowSizeTest extends ServiceTestBase @Test public void testSendWindowSize() throws Exception { - HornetQServer messagingService = createServer(false, isNetty()); + ActiveMQServer messagingService = createServer(false, isNetty()); locator.setBlockOnNonDurableSend(false); messagingService.start(); @@ -513,7 +513,7 @@ public class ConsumerWindowSizeTest extends ServiceTestBase @Test public void testSlowConsumerBufferingOne() throws Exception { - HornetQServer server = createServer(false, isNetty()); + ActiveMQServer server = createServer(false, isNetty()); ClientSession sessionB = null; ClientSession session = null; @@ -603,7 +603,7 @@ public class ConsumerWindowSizeTest extends ServiceTestBase private void internalTestSlowConsumerNoBuffer(final boolean largeMessages) throws Exception { - HornetQServer server = createServer(false, isNetty()); + ActiveMQServer server = createServer(false, isNetty()); ClientSession sessionB = null; ClientSession session = null; @@ -731,7 +731,7 @@ public class ConsumerWindowSizeTest extends ServiceTestBase private void internalTestSlowConsumerNoBuffer2(final boolean largeMessages) throws Exception { - HornetQServer server = createServer(false, isNetty()); + ActiveMQServer server = createServer(false, isNetty()); ClientSession session1 = null; ClientSession session2 = null; @@ -913,7 +913,7 @@ public class ConsumerWindowSizeTest extends ServiceTestBase @Test public void testSaveBuffersOnLargeMessage() throws Exception { - HornetQServer server = createServer(false, isNetty()); + ActiveMQServer server = createServer(false, isNetty()); ClientSession session1 = null; @@ -1025,7 +1025,7 @@ public class ConsumerWindowSizeTest extends ServiceTestBase private void internalTestFlowControlOnRollback(final boolean isLargeMessage) throws Exception { - HornetQServer server = createServer(false, isNetty()); + ActiveMQServer server = createServer(false, isNetty()); AddressSettings settings = new AddressSettings(); settings.setMaxDeliveryAttempts(-1); @@ -1123,7 +1123,7 @@ public class ConsumerWindowSizeTest extends ServiceTestBase public void internalTestSlowConsumerOnMessageHandlerNoBuffers(final boolean largeMessages) throws Exception { - HornetQServer server = createServer(false, isNetty()); + ActiveMQServer server = createServer(false, isNetty()); ClientSession sessionB = null; ClientSession session = null; @@ -1285,7 +1285,7 @@ public class ConsumerWindowSizeTest extends ServiceTestBase private void internalTestSlowConsumerOnMessageHandlerBufferOne(final boolean largeMessage) throws Exception { - HornetQServer server = createServer(false, isNetty()); + ActiveMQServer server = createServer(false, isNetty()); ClientSession sessionB = null; ClientSession session = null; @@ -1454,7 +1454,7 @@ public class ConsumerWindowSizeTest extends ServiceTestBase private void testNoWindowRoundRobin(final boolean largeMessages) throws Exception { - HornetQServer server = createServer(false, isNetty()); + ActiveMQServer server = createServer(false, isNetty()); ClientSession sessionA = null; ClientSession sessionB = null; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/CoreClientTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/CoreClientTest.java index 865bd94aba..01c57daba3 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/CoreClientTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/CoreClientTest.java @@ -24,12 +24,12 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; @@ -67,12 +67,12 @@ public class CoreClientTest extends ServiceTestBase .setSecurityEnabled(false) .addAcceptorConfiguration(new TransportConfiguration(acceptorFactoryClassName)); - HornetQServer server = addServer(HornetQServers.newHornetQServer(conf, false)); + ActiveMQServer server = addServer(ActiveMQServers.newActiveMQServer(conf, false)); server.start(); ServerLocator locator = - addServerLocator(HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( - connectorFactoryClassName))); + addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration( + connectorFactoryClassName))); ClientSessionFactory sf = createSessionFactory(locator); @@ -86,7 +86,7 @@ public class CoreClientTest extends ServiceTestBase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/CreateQueueIdempotentTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/CreateQueueIdempotentTest.java index 901df4f747..abda7ae93c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/CreateQueueIdempotentTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/CreateQueueIdempotentTest.java @@ -22,8 +22,8 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; import org.junit.Before; @@ -32,7 +32,7 @@ import org.junit.Test; public class CreateQueueIdempotentTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; @Override @Before @@ -44,7 +44,7 @@ public class CreateQueueIdempotentTest extends ServiceTestBase .setSecurityEnabled(false) .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY)); - server = addServer(HornetQServers.newHornetQServer(conf, true)); + server = addServer(ActiveMQServers.newActiveMQServer(conf, true)); server.start(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/DeadLetterAddressTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/DeadLetterAddressTest.java index a51f2f1bb4..2f7ee818d0 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/DeadLetterAddressTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/DeadLetterAddressTest.java @@ -31,12 +31,12 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.integration.IntegrationTestLogger; @@ -51,7 +51,7 @@ public class DeadLetterAddressTest extends ServiceTestBase { private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; - private HornetQServer server; + private ActiveMQServer server; private ClientSession clientSession; private ServerLocator locator; @@ -516,13 +516,13 @@ public class DeadLetterAddressTest extends ServiceTestBase Configuration configuration = createDefaultConfig() .setSecurityEnabled(false) .addAcceptorConfiguration(transportConfig); - server = addServer(HornetQServers.newHornetQServer(configuration, false)); + server = addServer(ActiveMQServers.newActiveMQServer(configuration, false)); // start the server server.start(); // then we create a client as normal locator = - addServerLocator(HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( - UnitTestCase.INVM_CONNECTOR_FACTORY))); + addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration( + UnitTestCase.INVM_CONNECTOR_FACTORY))); ClientSessionFactory sessionFactory = createSessionFactory(locator); clientSession = addClientSession(sessionFactory.createSession(false, true, false)); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/DeliveryOrderTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/DeliveryOrderTest.java index 52a7203844..d079f0cde5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/DeliveryOrderTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/DeliveryOrderTest.java @@ -25,7 +25,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; import org.junit.Before; @@ -46,7 +46,7 @@ public class DeliveryOrderTest extends ServiceTestBase private ServerLocator locator; - private HornetQServer server; + private ActiveMQServer server; private ClientSessionFactory cf; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/DurableQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/DurableQueueTest.java index 23654a5cf3..fcc501ee0d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/DurableQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/DurableQueueTest.java @@ -24,7 +24,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.ServiceTestBase; @@ -40,7 +40,7 @@ public class DurableQueueTest extends ServiceTestBase // Attributes ---------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; private ClientSession session; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ExpireTestOnRestartTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ExpireTestOnRestartTest.java index d256871d8b..b7d38c86bb 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ExpireTestOnRestartTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ExpireTestOnRestartTest.java @@ -19,7 +19,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; @@ -35,7 +35,7 @@ import org.junit.Test; public class ExpireTestOnRestartTest extends ServiceTestBase { - HornetQServer server; + ActiveMQServer server; @Override diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ExpiryAddressTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ExpiryAddressTest.java index 86dba38652..bbb6a7b67a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ExpiryAddressTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ExpiryAddressTest.java @@ -26,11 +26,11 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.RandomUtil; @@ -44,7 +44,7 @@ public class ExpiryAddressTest extends ServiceTestBase { private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; - private HornetQServer server; + private ActiveMQServer server; private ClientSession clientSession; private ServerLocator locator; @@ -234,8 +234,8 @@ public class ExpiryAddressTest extends ServiceTestBase clientSession.createQueue(ea, eq, null, false); clientSession.createQueue(qName, qName, null, false); ServerLocator locator1 = - addServerLocator(HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( - UnitTestCase.INVM_CONNECTOR_FACTORY))); + addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration( + UnitTestCase.INVM_CONNECTOR_FACTORY))); ClientSessionFactory sessionFactory = createSessionFactory(locator1); @@ -392,7 +392,7 @@ public class ExpiryAddressTest extends ServiceTestBase Configuration configuration = createDefaultConfig() .setSecurityEnabled(false) .addAcceptorConfiguration(transportConfig); - server = addServer(HornetQServers.newHornetQServer(configuration, false)); + server = addServer(ActiveMQServers.newActiveMQServer(configuration, false)); // start the server server.start(); // then we create a client as normal diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ExpiryLargeMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ExpiryLargeMessageTest.java index 3bd3b2e626..ea88211614 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ExpiryLargeMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ExpiryLargeMessageTest.java @@ -22,7 +22,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; @@ -63,7 +63,7 @@ public class ExpiryLargeMessageTest extends ServiceTestBase @Test public void testExpiryMessagesThenDLQ() throws Exception { - HornetQServer server = createServer(true); + ActiveMQServer server = createServer(true); server.getConfiguration().setMessageExpiryScanPeriod(600000); @@ -275,7 +275,7 @@ public class ExpiryLargeMessageTest extends ServiceTestBase @Test public void testCompatilityWithLinks() throws Exception { - HornetQServer server = createServer(true); + ActiveMQServer server = createServer(true); server.getConfiguration().setMessageExpiryScanPeriod(600000); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/FailureDeadlockTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/FailureDeadlockTest.java index c804a5670f..6f27844c00 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/FailureDeadlockTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/FailureDeadlockTest.java @@ -23,13 +23,13 @@ import javax.jms.JMSException; import javax.jms.Session; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.client.impl.ClientSessionInternal; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQSession; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQSession; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.integration.IntegrationTestLogger; @@ -48,13 +48,13 @@ public class FailureDeadlockTest extends ServiceTestBase { private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; - private HornetQServer server; + private ActiveMQServer server; private JMSServerManagerImpl jmsServer; - private HornetQConnectionFactory cf1; + private ActiveMQConnectionFactory cf1; - private HornetQConnectionFactory cf2; + private ActiveMQConnectionFactory cf2; @Override @Before @@ -71,11 +71,11 @@ public class FailureDeadlockTest extends ServiceTestBase jmsServer.start(); cf1 = - HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(INVM_CONNECTOR_FACTORY)); cf2 = - HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(INVM_CONNECTOR_FACTORY)); } @Override @@ -106,12 +106,12 @@ public class FailureDeadlockTest extends ServiceTestBase final Connection conn1 = cf1.createConnection(); Session sess1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); - RemotingConnection rc1 = ((ClientSessionInternal)((HornetQSession)sess1).getCoreSession()).getConnection(); + RemotingConnection rc1 = ((ClientSessionInternal)((ActiveMQSession)sess1).getCoreSession()).getConnection(); final Connection conn2 = cf2.createConnection(); Session sess2 = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); - RemotingConnection rc2 = ((ClientSessionInternal)((HornetQSession)sess2).getCoreSession()).getConnection(); + RemotingConnection rc2 = ((ClientSessionInternal)((ActiveMQSession)sess2).getCoreSession()).getConnection(); ExceptionListener listener1 = new ExceptionListener() { @@ -177,7 +177,7 @@ public class FailureDeadlockTest extends ServiceTestBase final Connection conn1 = cf1.createConnection(); Session sess1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); - RemotingConnection rc1 = ((ClientSessionInternal)((HornetQSession)sess1).getCoreSession()).getConnection(); + RemotingConnection rc1 = ((ClientSessionInternal)((ActiveMQSession)sess1).getCoreSession()).getConnection(); rc1.fail(new ActiveMQNotConnectedException( "blah")); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HangConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HangConsumerTest.java index 1efff8146f..3d80d54922 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HangConsumerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HangConsumerTest.java @@ -52,11 +52,11 @@ import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.postoffice.impl.LocalQueueBinding; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionReceiveMessage; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.server.ServerSessionFactory; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.QueueFactoryImpl; import org.apache.activemq.core.server.impl.QueueImpl; import org.apache.activemq.core.server.impl.ServerSessionImpl; @@ -65,8 +65,8 @@ import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.protocol.SessionCallback; import org.apache.activemq.spi.core.remoting.ReadyListener; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; -import org.apache.activemq.spi.core.security.HornetQSecurityManagerImpl; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.utils.ExecutorFactory; import org.apache.activemq.utils.ReusableLatch; @@ -79,7 +79,7 @@ import org.apache.activemq.utils.ReusableLatch; public class HangConsumerTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private final SimpleString QUEUE = new SimpleString("ConsumerTestQueue"); @@ -96,11 +96,11 @@ public class HangConsumerTest extends ServiceTestBase Configuration config = createDefaultConfig(false) .setMessageExpiryScanPeriod(10); - HornetQSecurityManager securityManager = new HornetQSecurityManagerImpl(); + ActiveMQSecurityManager securityManager = new ActiveMQSecurityManagerImpl(); config.setPersistenceEnabled(true); - server = new MyHornetQServer(config, ManagementFactory.getPlatformMBeanServer(), securityManager); + server = new MyActiveMQServer(config, ManagementFactory.getPlatformMBeanServer(), securityManager); server.start(); @@ -319,7 +319,7 @@ public class HangConsumerTest extends ServiceTestBase queueFactory.setPostOffice(server.getPostOffice()); - ((HornetQServerImpl)server).replaceQueueFactory(queueFactory); + ((ActiveMQServerImpl)server).replaceQueueFactory(queueFactory); queue = server.createQueue(QUEUE, QUEUE, null, true, false); @@ -476,7 +476,7 @@ public class HangConsumerTest extends ServiceTestBase { if (server.locateQueue(SimpleString.toSimpleString("jms.topic.tt")) == null) { - server.createQueue(SimpleString.toSimpleString("jms.topic.tt"), SimpleString.toSimpleString("jms.topic.tt"), SimpleString.toSimpleString(HornetQServerImpl.GENERIC_IGNORED_FILTER), true, false); + server.createQueue(SimpleString.toSimpleString("jms.topic.tt"), SimpleString.toSimpleString("jms.topic.tt"), SimpleString.toSimpleString(ActiveMQServerImpl.GENERIC_IGNORED_FILTER), true, false); } server.stop(); @@ -488,7 +488,7 @@ public class HangConsumerTest extends ServiceTestBase 0, 0, messagesFF, - "hornetq-bindings", + "activemq-bindings", "bindings", 1); @@ -631,14 +631,14 @@ public class HangConsumerTest extends ServiceTestBase } - class MyHornetQServer extends HornetQServerImpl + class MyActiveMQServer extends ActiveMQServerImpl { - public MyHornetQServer(Configuration configuration, - MBeanServer mbeanServer, - HornetQSecurityManager securityManager) + public MyActiveMQServer(Configuration configuration, + MBeanServer mbeanServer, + ActiveMQSecurityManager securityManager) { super(configuration, mbeanServer, securityManager); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HeuristicXATest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HeuristicXATest.java index f9e4a165cf..6cd14ce6be 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HeuristicXATest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HeuristicXATest.java @@ -32,9 +32,9 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.api.core.management.HornetQServerControl; +import org.apache.activemq.api.core.management.ActiveMQServerControl; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.core.transaction.impl.XidImpl; @@ -70,10 +70,10 @@ public class HeuristicXATest extends ServiceTestBase Configuration configuration = createDefaultConfig() .setJMXManagementEnabled(true); - HornetQServer server = createServer(false, configuration, mbeanServer, new HashMap()); + ActiveMQServer server = createServer(false, configuration, mbeanServer, new HashMap()); server.start(); - HornetQServerControl jmxServer = ManagementControlHelper.createHornetQServerControl(mbeanServer); + ActiveMQServerControl jmxServer = ManagementControlHelper.createActiveMQServerControl(mbeanServer); Assert.assertFalse(jmxServer.commitPreparedTransaction("Nananananana")); } @@ -95,7 +95,7 @@ public class HeuristicXATest extends ServiceTestBase Configuration configuration = createDefaultConfig() .setJMXManagementEnabled(true); - HornetQServer server = createServer(false, configuration, mbeanServer, new HashMap()); + ActiveMQServer server = createServer(false, configuration, mbeanServer, new HashMap()); server.start(); Xid xid = newXID(); @@ -121,7 +121,7 @@ public class HeuristicXATest extends ServiceTestBase session.close(); - HornetQServerControl jmxServer = ManagementControlHelper.createHornetQServerControl(mbeanServer); + ActiveMQServerControl jmxServer = ManagementControlHelper.createActiveMQServerControl(mbeanServer); String[] preparedTransactions = jmxServer.listPreparedTransactions(); @@ -190,7 +190,7 @@ public class HeuristicXATest extends ServiceTestBase Configuration configuration = createDefaultConfig() .setJMXManagementEnabled(true); - HornetQServer server = createServer(true, configuration, mbeanServer, new HashMap()); + ActiveMQServer server = createServer(true, configuration, mbeanServer, new HashMap()); server.start(); Xid xid = newXID(); @@ -216,7 +216,7 @@ public class HeuristicXATest extends ServiceTestBase session.close(); - HornetQServerControl jmxServer = ManagementControlHelper.createHornetQServerControl(mbeanServer); + ActiveMQServerControl jmxServer = ManagementControlHelper.createActiveMQServerControl(mbeanServer); String[] preparedTransactions = jmxServer.listPreparedTransactions(); @@ -258,7 +258,7 @@ public class HeuristicXATest extends ServiceTestBase server.start(); - jmxServer = ManagementControlHelper.createHornetQServerControl(mbeanServer); + jmxServer = ManagementControlHelper.createActiveMQServerControl(mbeanServer); if (isCommit) { String[] listHeuristicCommittedTransactions = jmxServer.listHeuristicCommittedTransactions(); @@ -290,7 +290,7 @@ public class HeuristicXATest extends ServiceTestBase Configuration configuration = createDefaultConfig() .setJMXManagementEnabled(true); - HornetQServer server = createServer(true, configuration, mbeanServer, new HashMap()); + ActiveMQServer server = createServer(true, configuration, mbeanServer, new HashMap()); server.start(); Xid xid = newXID(); @@ -316,7 +316,7 @@ public class HeuristicXATest extends ServiceTestBase session.close(); - HornetQServerControl jmxServer = ManagementControlHelper.createHornetQServerControl(mbeanServer); + ActiveMQServerControl jmxServer = ManagementControlHelper.createActiveMQServerControl(mbeanServer); String[] preparedTransactions = jmxServer.listPreparedTransactions(); @@ -359,7 +359,7 @@ public class HeuristicXATest extends ServiceTestBase server.start(); // we need to recreate the locator and session factory sf = createSessionFactory(locator); - jmxServer = ManagementControlHelper.createHornetQServerControl(mbeanServer); + jmxServer = ManagementControlHelper.createActiveMQServerControl(mbeanServer); if (heuristicCommit) { String[] listHeuristicCommittedTransactions = jmxServer.listHeuristicCommittedTransactions(); @@ -399,7 +399,7 @@ public class HeuristicXATest extends ServiceTestBase Configuration configuration = createDefaultConfig() .setJMXManagementEnabled(true); - HornetQServer server = createServer(true, configuration, mbeanServer, new HashMap()); + ActiveMQServer server = createServer(true, configuration, mbeanServer, new HashMap()); server.start(); Xid xid = newXID(); @@ -423,7 +423,7 @@ public class HeuristicXATest extends ServiceTestBase session.prepare(xid); - HornetQServerControl jmxServer = ManagementControlHelper.createHornetQServerControl(mbeanServer); + ActiveMQServerControl jmxServer = ManagementControlHelper.createActiveMQServerControl(mbeanServer); String[] preparedTransactions = jmxServer.listPreparedTransactions(); @@ -463,7 +463,7 @@ public class HeuristicXATest extends ServiceTestBase session = sf.createSession(true, false, false); Xid[] recoveredXids = session.recover(XAResource.TMSTARTRSCAN); Assert.assertEquals(0, recoveredXids.length); - jmxServer = ManagementControlHelper.createHornetQServerControl(mbeanServer); + jmxServer = ManagementControlHelper.createActiveMQServerControl(mbeanServer); if (heuristicCommit) { Assert.assertEquals(0, jmxServer.listHeuristicCommittedTransactions().length); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/InVMNonPersistentMessageBufferTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/InVMNonPersistentMessageBufferTest.java index 1c9c8269ce..ab2154053e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/InVMNonPersistentMessageBufferTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/InVMNonPersistentMessageBufferTest.java @@ -25,7 +25,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.protocol.core.impl.PacketImpl; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.utils.DataConstants; @@ -36,7 +36,7 @@ public class InVMNonPersistentMessageBufferTest extends ServiceTestBase public static final String queueName = "testqueue"; - private HornetQServer server; + private ActiveMQServer server; private ClientSession session; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/IncompatibleVersionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/IncompatibleVersionTest.java index c8ea15746b..8ef2ba9aed 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/IncompatibleVersionTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/IncompatibleVersionTest.java @@ -21,7 +21,7 @@ import org.apache.activemq.api.core.ActiveMQIncompatibleClientServerException; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.impl.ConfigurationImpl; @@ -32,8 +32,8 @@ import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.core.protocol.core.impl.wireformat.CreateSessionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.CreateSessionResponseMessage; import org.apache.activemq.core.remoting.server.impl.RemotingServiceImpl; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.version.impl.VersionImpl; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; @@ -57,7 +57,7 @@ public class IncompatibleVersionTest extends ServiceTestBase // Attributes ---------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; private CoreRemotingConnection connection; private ServerLocator locator; @@ -156,12 +156,12 @@ public class IncompatibleVersionTest extends ServiceTestBase version, null, null, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, false, true, true, false, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, null); if (compatible) @@ -201,14 +201,14 @@ public class IncompatibleVersionTest extends ServiceTestBase private boolean doTestClientVersionCompatibilityWithRealConnection(String verList, int ver) throws Exception { - String propFileName = "compatibility-test-hornetq-version.properties"; + String propFileName = "compatibility-test-activemq-version.properties"; String serverStartedString = "IncompatibleVersionTest---server---started"; Properties prop = new Properties(); - InputStream in = VersionImpl.class.getClassLoader().getResourceAsStream("hornetq-version.properties"); + InputStream in = VersionImpl.class.getClassLoader().getResourceAsStream("activemq-version.properties"); prop.load(in); - prop.setProperty("hornetq.version.compatibleVersionList", verList); - prop.setProperty("hornetq.version.incrementingVersion", Integer.toString(ver)); + prop.setProperty("activemq.version.compatibleVersionList", verList); + prop.setProperty("activemq.version.incrementingVersion", Integer.toString(ver)); prop.store(new FileOutputStream("target/test-classes/" + propFileName), null); Process serverProcess = null; @@ -255,7 +255,7 @@ public class IncompatibleVersionTest extends ServiceTestBase Configuration conf = new ConfigurationImpl() .setSecurityEnabled(false) .addAcceptorConfiguration(new TransportConfiguration("org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory")); - HornetQServer server = HornetQServers.newHornetQServer(conf, false); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, false); server.start(); log.info("### server: " + startedString); @@ -270,7 +270,7 @@ public class IncompatibleVersionTest extends ServiceTestBase ClientSessionFactory sf = null; try { - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY)); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY)); sf = locator.createSessionFactory(); ClientSession session = sf.createSession(false, true, true); log.info("### client: connected. server incrementingVersion = " + session.getVersion()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/InterruptedLargeMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/InterruptedLargeMessageTest.java index 4ae348a671..7d6389b4b0 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/InterruptedLargeMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/InterruptedLargeMessageTest.java @@ -31,7 +31,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.filter.Filter; import org.apache.activemq.core.paging.cursor.PageSubscription; @@ -39,12 +39,12 @@ import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionContinuationMessage; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.QueueFactory; import org.apache.activemq.core.server.ServerSession; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.QueueImpl; import org.apache.activemq.core.server.impl.ServerSessionImpl; import org.apache.activemq.core.settings.HierarchicalRepository; @@ -69,7 +69,7 @@ public class InterruptedLargeMessageTest extends LargeMessageTestBase static final int RECEIVE_WAIT_TIME = 60000; - private final int LARGE_MESSAGE_SIZE = HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE * 3; + private final int LARGE_MESSAGE_SIZE = ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE * 3; private final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; @@ -96,7 +96,7 @@ public class InterruptedLargeMessageTest extends LargeMessageTestBase ClientSession session = null; LargeMessageTestInterceptorIgnoreLastPacket.clearInterrupt(); - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.getConfiguration() .getIncomingInterceptorClassNames() @@ -142,7 +142,7 @@ public class InterruptedLargeMessageTest extends LargeMessageTestBase @Test public void testCloseConsumerDuringTransmission() throws Exception { - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); LargeMessageTestInterceptorIgnoreLastPacket.disableInterrupt(); @@ -224,7 +224,7 @@ public class InterruptedLargeMessageTest extends LargeMessageTestBase ClientSession session = null; LargeMessageTestInterceptorIgnoreLastPacket.disableInterrupt(); - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -286,7 +286,7 @@ public class InterruptedLargeMessageTest extends LargeMessageTestBase ClientSession session = null; LargeMessageTestInterceptorIgnoreLastPacket.disableInterrupt(); - HornetQServer server = + ActiveMQServer server = createServer(true, createDefaultConfig(isNetty()), 10000, 20000, new HashMap()); // server.getConfiguration() @@ -375,7 +375,7 @@ public class InterruptedLargeMessageTest extends LargeMessageTestBase LargeMessageTestInterceptorIgnoreLastPacket.disableInterrupt(); - HornetQServer server = + ActiveMQServer server = createServer(true, createDefaultConfig(isNetty()), 10000, 20000, new HashMap()); server.getConfiguration() @@ -599,12 +599,12 @@ public class InterruptedLargeMessageTest extends LargeMessageTestBase LargeMessageTestInterceptorIgnoreLastPacket.disableInterrupt(); - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); QueueFactory original = server.getQueueFactory(); - ((HornetQServerImpl) server).replaceQueueFactory(new NoPostACKQueueFactory(server.getStorageManager(), + ((ActiveMQServerImpl) server).replaceQueueFactory(new NoPostACKQueueFactory(server.getStorageManager(), server.getPostOffice(), server.getScheduledPool(), server.getAddressSettingsRepository(), @@ -652,7 +652,7 @@ public class InterruptedLargeMessageTest extends LargeMessageTestBase session.commit(); } - ((HornetQServerImpl) server).replaceQueueFactory(original); + ((ActiveMQServerImpl) server).replaceQueueFactory(original); server.stop(false); server.start(); @@ -668,7 +668,7 @@ public class InterruptedLargeMessageTest extends LargeMessageTestBase LargeMessageTestInterceptorIgnoreLastPacket.clearInterrupt(); - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); QueueFactory original = server.getQueueFactory(); @@ -721,7 +721,7 @@ public class InterruptedLargeMessageTest extends LargeMessageTestBase session.commit(); } - ((HornetQServerImpl) server).replaceQueueFactory(original); + ((ActiveMQServerImpl) server).replaceQueueFactory(original); server.stop(false); server.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/JmsNettyNioStressTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/JmsNettyNioStressTest.java index 812b860cbf..11c9302bee 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/JmsNettyNioStressTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/JmsNettyNioStressTest.java @@ -26,14 +26,14 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; import org.junit.Test; @@ -51,7 +51,7 @@ import org.junit.Test; * Each operation is done in a JMS transaction, sending/consuming one message * per transaction. *

    - * The server is set up with netty, with only one NIO worker and 1 hornetq + * The server is set up with netty, with only one NIO worker and 1 activemq * server worker. This increases the chance for the deadlock to occur. *

    * If the deadlock occurs, all threads will block/die. A simple transaction @@ -91,7 +91,7 @@ public class JmsNettyNioStressTest extends ServiceTestBase params.put(TransportConstants.NIO_REMOTING_THREADS_PROPNAME, 1); params.put(TransportConstants.BATCH_DELAY, 50); Configuration config = createDefaultConfig(params, ServiceTestBase.NETTY_ACCEPTOR_FACTORY); - HornetQServer server = createServer(true, config); + ActiveMQServer server = createServer(true, config); server.getConfiguration().setThreadPoolMaxSize(2); server.start(); @@ -137,7 +137,7 @@ public class JmsNettyNioStressTest extends ServiceTestBase locator.close(); // create and start JMS connections - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transpConf); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transpConf); connectionProducer = cf.createConnection(); connectionProducer.start(); @@ -160,7 +160,7 @@ public class JmsNettyNioStressTest extends ServiceTestBase try { session = connectionProducer.createSession(true, Session.SESSION_TRANSACTED); - MessageProducer messageProducer = session.createProducer(HornetQDestination.createQueue("queue")); + MessageProducer messageProducer = session.createProducer(ActiveMQDestination.createQueue("queue")); messageProducer.setDeliveryMode(DeliveryMode.PERSISTENT); for (int i = 0; i < numberOfMessages; i++) @@ -210,8 +210,8 @@ public class JmsNettyNioStressTest extends ServiceTestBase try { session = connectionConsumerProducer.createSession(true, Session.SESSION_TRANSACTED); - MessageConsumer consumer = session.createConsumer(HornetQDestination.createQueue("queue")); - MessageProducer messageProducer = session.createProducer(HornetQDestination.createQueue("queue2")); + MessageConsumer consumer = session.createConsumer(ActiveMQDestination.createQueue("queue")); + MessageProducer messageProducer = session.createProducer(ActiveMQDestination.createQueue("queue2")); messageProducer.setDeliveryMode(DeliveryMode.PERSISTENT); for (int i = 0; i < numberOfMessages; i++) { @@ -264,7 +264,7 @@ public class JmsNettyNioStressTest extends ServiceTestBase try { session = connectionConsumer.createSession(true, Session.SESSION_TRANSACTED); - MessageConsumer consumer = session.createConsumer(HornetQDestination.createQueue("queue2")); + MessageConsumer consumer = session.createConsumer(ActiveMQDestination.createQueue("queue2")); for (int i = 0; i < numberOfMessages; i++) { BytesMessage message = (BytesMessage) consumer.receive(5000); 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 4080873c26..de1b348f33 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 @@ -28,7 +28,7 @@ import org.apache.activemq.core.journal.PreparedTransactionInfo; import org.apache.activemq.core.journal.RecordInfo; import org.apache.activemq.core.journal.impl.JournalImpl; import org.apache.activemq.core.journal.impl.NIOSequentialFileFactory; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.SpawnedVMSupport; import org.junit.Assert; @@ -49,7 +49,7 @@ public class JournalCrashTest extends ServiceTestBase private static final int FOURTH_RUN = 400; - private HornetQServer server; + private ActiveMQServer server; private ClientSessionFactory factory; @@ -227,8 +227,8 @@ public class JournalCrashTest extends ServiceTestBase 0, 0, factory, - "hornetq-data", - "hq", + "activemq-data", + "amq", 100); ArrayList records = new ArrayList(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/LargeMessageAvoidLargeMessagesTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/LargeMessageAvoidLargeMessagesTest.java index 9d8ccda18c..c05e50a0a5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/LargeMessageAvoidLargeMessagesTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/LargeMessageAvoidLargeMessagesTest.java @@ -19,9 +19,9 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.Assert; @@ -59,7 +59,7 @@ public class LargeMessageAvoidLargeMessagesTest extends LargeMessageTest @Test public void testSimpleSendOnAvoid() throws Exception { - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); ClientSessionFactory sf = createSessionFactory(locator); @@ -106,7 +106,7 @@ public class LargeMessageAvoidLargeMessagesTest extends LargeMessageTest @Test public void testSendRegularAfterCompression() throws Exception { - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); ClientSessionFactory sf = createSessionFactory(locator); @@ -160,7 +160,7 @@ public class LargeMessageAvoidLargeMessagesTest extends LargeMessageTest @Test public void testSendLargeAfterUnableToSendRegular() throws Exception { - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); //reduce the minLargeMessageSize to make the test faster @@ -217,7 +217,7 @@ public class LargeMessageAvoidLargeMessagesTest extends LargeMessageTest @Test public void testMixedCompressionSendReceive() throws Exception { - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); ClientSessionFactory sf = createSessionFactory(locator); @@ -296,11 +296,11 @@ public class LargeMessageAvoidLargeMessagesTest extends LargeMessageTest @Test public void testDLALargeMessage() throws Exception { - final int messageSize = (int) (3.5 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + final int messageSize = (int) (3.5 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); ClientSession session = null; - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/LargeMessageCompressTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/LargeMessageCompressTest.java index 2ef94dda33..435abb3c4a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/LargeMessageCompressTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/LargeMessageCompressTest.java @@ -26,9 +26,9 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.RandomUtil; import org.junit.Assert; import org.junit.Test; @@ -65,9 +65,9 @@ public class LargeMessageCompressTest extends LargeMessageTest @Test public void testLargeMessageCompression() throws Exception { - final int messageSize = (int) (3.5 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + final int messageSize = (int) (3.5 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -110,9 +110,9 @@ public class LargeMessageCompressTest extends LargeMessageTest @Test public void testLargeMessageCompression2() throws Exception { - final int messageSize = (int) (3.5 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + final int messageSize = (int) (3.5 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -170,9 +170,9 @@ public class LargeMessageCompressTest extends LargeMessageTest @Test public void testLargeMessageCompression3() throws Exception { - final int messageSize = (int) (3.5 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + final int messageSize = (int) (3.5 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -235,7 +235,7 @@ public class LargeMessageCompressTest extends LargeMessageTest System.out.println("Message size = " + messageSize); - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -328,7 +328,7 @@ public class LargeMessageCompressTest extends LargeMessageTest final int messageSize = 1024 * 1024; - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/LargeMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/LargeMessageTest.java index 5ef31a0f5e..3d94d37b4c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/LargeMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/LargeMessageTest.java @@ -30,7 +30,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientConsumerInternal; @@ -38,7 +38,7 @@ import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.message.impl.MessageImpl; import org.apache.activemq.core.persistence.impl.journal.JournalStorageManager; import org.apache.activemq.core.persistence.impl.journal.LargeServerMessageImpl; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; @@ -108,7 +108,7 @@ public class LargeMessageTest extends LargeMessageTestBase final ClientSession session; - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); AddressSettings settings = new AddressSettings(); if (redeliveryDelay) @@ -201,11 +201,11 @@ public class LargeMessageTest extends LargeMessageTestBase @Test public void testCloseConsumer() throws Exception { - final int messageSize = (int) (3.5 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + final int messageSize = (int) (3.5 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); ClientSession session = null; - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -250,9 +250,9 @@ public class LargeMessageTest extends LargeMessageTestBase @Test public void testDeleteOnNoBinding() throws Exception { - final int messageSize = (int) (3.5 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + final int messageSize = (int) (3.5 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -276,7 +276,7 @@ public class LargeMessageTest extends LargeMessageTestBase { fillAddress(); - final int messageSize = (int) (3.5 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + final int messageSize = (int) (3.5 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); ClientSessionFactory sf = addSessionFactory(createSessionFactory(locator)); @@ -304,7 +304,7 @@ public class LargeMessageTest extends LargeMessageTestBase Configuration config = createDefaultConfig() .setJournalSyncNonTransactional(false); - HornetQServer server = createServer(true, + ActiveMQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, @@ -384,7 +384,7 @@ public class LargeMessageTest extends LargeMessageTestBase .setJournalBufferSize_AIO(10 * 1024) .setJournalBufferSize_NIO(10 * 1024); - HornetQServer server = createServer(true, config); + ActiveMQServer server = createServer(true, config); server.start(); @@ -441,11 +441,11 @@ public class LargeMessageTest extends LargeMessageTestBase @Test public void testDLALargeMessage() throws Exception { - final int messageSize = (int) (3.5 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + final int messageSize = (int) (3.5 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); ClientSession session = null; - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -548,11 +548,11 @@ public class LargeMessageTest extends LargeMessageTestBase @Test public void testDeliveryCount() throws Exception { - final int messageSize = (int) (3.5 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + final int messageSize = (int) (3.5 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); ClientSession session = null; - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -612,11 +612,11 @@ public class LargeMessageTest extends LargeMessageTestBase @Test public void testDLAOnExpiryNonDurableMessage() throws Exception { - final int messageSize = (int) (3.5 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + final int messageSize = (int) (3.5 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); ClientSession session = null; - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -729,11 +729,11 @@ public class LargeMessageTest extends LargeMessageTestBase @Test public void testDLAOnExpiry() throws Exception { - final int messageSize = (int) (3.5 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + final int messageSize = (int) (3.5 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); ClientSession session = null; - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -844,13 +844,13 @@ public class LargeMessageTest extends LargeMessageTestBase @Test public void testExpiryLargeMessage() throws Exception { - final int messageSize = 3 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; + final int messageSize = 3 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; ClientSession session = null; try { - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -955,13 +955,13 @@ public class LargeMessageTest extends LargeMessageTestBase private void internalTestSentWithDuplicateID(final boolean isSimulateBridge) throws Exception { - final int messageSize = 3 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; + final int messageSize = 3 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; ClientSession session = null; try { - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -1044,7 +1044,7 @@ public class LargeMessageTest extends LargeMessageTestBase try { - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -1126,7 +1126,7 @@ public class LargeMessageTest extends LargeMessageTestBase try { - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -2100,7 +2100,7 @@ public class LargeMessageTest extends LargeMessageTestBase // there are two bindings.. one is ACKed, the other is not, the server is restarted // The other binding is acked... The file must be deleted - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -2170,7 +2170,7 @@ public class LargeMessageTest extends LargeMessageTestBase { // there are two bindings.. one is ACKed, the other is not, the server is restarted // The other binding is acked... The file must be deleted - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -2244,7 +2244,7 @@ public class LargeMessageTest extends LargeMessageTestBase { ClientSession session = null; - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -2309,7 +2309,7 @@ public class LargeMessageTest extends LargeMessageTestBase { // there are two bindings.. one is ACKed, the other is not, the server is restarted // The other binding is acked... The file must be deleted - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); server.start(); @@ -2425,7 +2425,7 @@ public class LargeMessageTest extends LargeMessageTestBase public void testBufferMultipleLargeMessages() throws Exception { ClientSession session = null; - HornetQServer server = null; + ActiveMQServer server = null; final int SIZE = 10 * 1024; final int NUMBER_OF_MESSAGES = 30; @@ -2529,7 +2529,7 @@ public class LargeMessageTest extends LargeMessageTestBase public void testReceiveMultipleMessages() throws Exception { ClientSession session = null; - HornetQServer server = null; + ActiveMQServer server = null; final int SIZE = 10 * 1024; final int NUMBER_OF_MESSAGES = 1000; @@ -2644,7 +2644,7 @@ public class LargeMessageTest extends LargeMessageTestBase AddressSettings value = new AddressSettings(); map.put(ADDRESS.toString(), value); - HornetQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, map); + ActiveMQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, map); server.start(); final int numberOfBytes = 1024; @@ -2783,7 +2783,7 @@ public class LargeMessageTest extends LargeMessageTestBase AddressSettings value = new AddressSettings(); map.put(ADDRESS.toString(), value); - HornetQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, map); + ActiveMQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, map); server.start(); final int numberOfBytes = 1024; @@ -2894,7 +2894,7 @@ public class LargeMessageTest extends LargeMessageTestBase public void testSendStreamingSingleMessage() throws Exception { ClientSession session = null; - HornetQServer server = null; + ActiveMQServer server = null; final int SIZE = 10 * 1024 * 1024; try @@ -2970,7 +2970,7 @@ public class LargeMessageTest extends LargeMessageTestBase public void testIgnoreStreaming() throws Exception { ClientSession session = null; - HornetQServer server = null; + ActiveMQServer server = null; final int SIZE = 10 * 1024; final int NUMBER_OF_MESSAGES = 1; @@ -3035,7 +3035,7 @@ public class LargeMessageTest extends LargeMessageTestBase @Test public void testSendServerMessage() throws Exception { - HornetQServer server = createServer(true); + ActiveMQServer server = createServer(true); server.start(); @@ -3112,7 +3112,7 @@ public class LargeMessageTest extends LargeMessageTestBase AddressSettings value = new AddressSettings(); map.put(ADDRESS.toString(), value); - HornetQServer server = createServer(realFiles, config, PAGE_SIZE, PAGE_MAX, map); + ActiveMQServer server = createServer(realFiles, config, PAGE_SIZE, PAGE_MAX, map); server.start(); final int numberOfBytes = 1024; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageConcurrencyTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageConcurrencyTest.java index fbd9f6b54f..baa29b490e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageConcurrencyTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageConcurrencyTest.java @@ -25,7 +25,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.ServiceTestBase; @@ -42,7 +42,7 @@ public class MessageConcurrencyTest extends ServiceTestBase { private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; - private HornetQServer server; + private ActiveMQServer server; private final SimpleString ADDRESS = new SimpleString("MessageConcurrencyTestAddress"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageConsumerRollbackTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageConsumerRollbackTest.java index 79084825b0..bf57e645d6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageConsumerRollbackTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageConsumerRollbackTest.java @@ -24,9 +24,9 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.After; import org.junit.Before; @@ -40,7 +40,7 @@ import org.junit.Test; public class MessageConsumerRollbackTest extends ServiceTestBase { - HornetQServer server; + ActiveMQServer server; ServerLocator locator; @@ -176,7 +176,7 @@ public class MessageConsumerRollbackTest extends ServiceTestBase for (int i = 0; i < numberOfMessages; i++) { - HornetQTextMessage txt = new HornetQTextMessage(session); + ActiveMQTextMessage txt = new ActiveMQTextMessage(session); txt.setIntProperty("msg", i); txt.setText("Message Number (" + i + ")"); txt.doBeforeSend(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageCounterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageCounterTest.java index 6eaf0de804..5604116ff3 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageCounterTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageCounterTest.java @@ -24,7 +24,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; /** @@ -33,7 +33,7 @@ import org.apache.activemq.tests.util.ServiceTestBase; */ public class MessageCounterTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private final SimpleString QUEUE = new SimpleString("ConsumerTestQueue"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageDurabilityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageDurabilityTest.java index 844543a4bc..62f257a3ce 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageDurabilityTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageDurabilityTest.java @@ -21,7 +21,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -41,7 +41,7 @@ public class MessageDurabilityTest extends ServiceTestBase // Attributes ---------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; private ClientSession session; @@ -151,7 +151,7 @@ public class MessageDurabilityTest extends ServiceTestBase session.start(); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST, new ActiveMQAction() { public void run() throws ActiveMQException { @@ -179,7 +179,7 @@ public class MessageDurabilityTest extends ServiceTestBase restart(); session.start(); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST, new ActiveMQAction() { public void run() throws ActiveMQException { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageExpirationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageExpirationTest.java index fe1cbc7921..193e541de4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageExpirationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageExpirationTest.java @@ -25,7 +25,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.RandomUtil; @@ -43,7 +43,7 @@ public class MessageExpirationTest extends ServiceTestBase private static final int EXPIRATION = 1000; - private HornetQServer server; + private ActiveMQServer server; private ClientSession session; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageGroupingConnectionFactoryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageGroupingConnectionFactoryTest.java index 99c4daec65..d6121cc1e5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageGroupingConnectionFactoryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageGroupingConnectionFactoryTest.java @@ -29,12 +29,12 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -44,7 +44,7 @@ import org.apache.activemq.tests.util.UnitTestCase; */ public class MessageGroupingConnectionFactoryTest extends UnitTestCase { - private HornetQServer server; + private ActiveMQServer server; private ClientSession clientSession; @@ -126,15 +126,15 @@ public class MessageGroupingConnectionFactoryTest extends UnitTestCase Configuration configuration = createDefaultConfig() .setSecurityEnabled(false) .addAcceptorConfiguration(transportConfig); - server = addServer(HornetQServers.newHornetQServer(configuration, false)); + server = addServer(ActiveMQServers.newActiveMQServer(configuration, false)); // start the server server.start(); // then we create a client as normal ServerLocator locator = - addServerLocator(HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( - ServiceTestBase.INVM_CONNECTOR_FACTORY))); + addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration( + ServiceTestBase.INVM_CONNECTOR_FACTORY))); locator.setGroupID("grp1"); ClientSessionFactory sessionFactory = createSessionFactory(locator); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageGroupingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageGroupingTest.java index 07f22a2d0e..0cc5f285e0 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageGroupingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageGroupingTest.java @@ -34,12 +34,12 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.transaction.impl.XidImpl; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.UnitTestCase; @@ -51,7 +51,7 @@ public class MessageGroupingTest extends UnitTestCase { private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; - private HornetQServer server; + private ActiveMQServer server; private ClientSession clientSession; @@ -281,7 +281,7 @@ public class MessageGroupingTest extends UnitTestCase private void doTestMultipleGroupingTXCommit() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sessionFactory = createSessionFactory(locator); ClientSession clientSession = sessionFactory.createSession(false, false, false); ClientProducer clientProducer = this.clientSession.createProducer(qName); @@ -342,7 +342,7 @@ public class MessageGroupingTest extends UnitTestCase private void doTestMultipleGroupingTXRollback() throws Exception { log.info("*** starting test"); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); locator.setBlockOnAcknowledge(true); ClientSessionFactory sessionFactory = createSessionFactory(locator); ClientSession clientSession = sessionFactory.createSession(false, false, false); @@ -418,7 +418,7 @@ public class MessageGroupingTest extends UnitTestCase private void dotestMultipleGroupingXACommit() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sessionFactory = createSessionFactory(locator); ClientSession clientSession = sessionFactory.createSession(true, false, false); ClientProducer clientProducer = this.clientSession.createProducer(qName); @@ -478,7 +478,7 @@ public class MessageGroupingTest extends UnitTestCase private void doTestMultipleGroupingXARollback() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); locator.setBlockOnAcknowledge(true); ClientSessionFactory sessionFactory = createSessionFactory(locator); ClientSession clientSession = sessionFactory.createSession(true, false, false); @@ -615,14 +615,14 @@ public class MessageGroupingTest extends UnitTestCase Configuration configuration = createDefaultConfig() .setSecurityEnabled(false) .addAcceptorConfiguration(transportConfig); - server = addServer(HornetQServers.newHornetQServer(configuration, false)); + server = addServer(ActiveMQServers.newActiveMQServer(configuration, false)); // start the server server.start(); // then we create a client as normal locator = - addServerLocator(HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( - UnitTestCase.INVM_CONNECTOR_FACTORY))); + addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration( + UnitTestCase.INVM_CONNECTOR_FACTORY))); clientSessionFactory = createSessionFactory(locator); clientSession = addClientSession(clientSessionFactory.createSession(false, true, true)); clientSession.createQueue(qName, qName, null, false); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageHandlerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageHandlerTest.java index 45313e64e6..09db1f94bb 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageHandlerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageHandlerTest.java @@ -28,7 +28,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; @@ -39,7 +39,7 @@ public class MessageHandlerTest extends ServiceTestBase { private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; - private HornetQServer server; + private ActiveMQServer server; private final SimpleString QUEUE = new SimpleString("ConsumerTestQueue"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessagePriorityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessagePriorityTest.java index 1f808ccb78..b6576cc698 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessagePriorityTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessagePriorityTest.java @@ -19,12 +19,12 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.ServiceTestBase; @@ -48,7 +48,7 @@ public class MessagePriorityTest extends UnitTestCase // Attributes ---------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; private ClientSession session; @@ -340,10 +340,10 @@ public class MessagePriorityTest extends UnitTestCase Configuration config = createDefaultConfig() .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getCanonicalName())) .setSecurityEnabled(false); - server = addServer(HornetQServers.newHornetQServer(config, false)); + server = addServer(ActiveMQServers.newActiveMQServer(config, false)); server.start(); locator = - addServerLocator(HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( + addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration( ServiceTestBase.INVM_CONNECTOR_FACTORY))); locator.setBlockOnNonDurableSend(true); locator.setBlockOnDurableSend(true); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageRateTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageRateTest.java index b03d827e2e..c9360e42ab 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageRateTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MessageRateTest.java @@ -24,7 +24,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; import org.junit.Before; @@ -55,7 +55,7 @@ public class MessageRateTest extends ServiceTestBase @Test public void testProduceRate() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); @@ -81,7 +81,7 @@ public class MessageRateTest extends ServiceTestBase @Test public void testConsumeRate() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); @@ -121,7 +121,7 @@ public class MessageRateTest extends ServiceTestBase @Test public void testConsumeRate2() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); @@ -159,7 +159,7 @@ public class MessageRateTest extends ServiceTestBase @Test public void testConsumeRateListener() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MultipleThreadFilterOneTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MultipleThreadFilterOneTest.java index 9864ae80e5..9c988a9ad2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MultipleThreadFilterOneTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/MultipleThreadFilterOneTest.java @@ -25,7 +25,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.ServiceTestBase; @@ -236,7 +236,7 @@ public class MultipleThreadFilterOneTest extends ServiceTestBase { boolean useDeadConsumer = true; this.isNetty = isNetty; - HornetQServer server; + ActiveMQServer server; if (isPaging) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/NIOvsOIOTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/NIOvsOIOTest.java index 2a1985d16c..a8382a6335 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/NIOvsOIOTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/NIOvsOIOTest.java @@ -26,13 +26,13 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.settings.HierarchicalRepository; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; @@ -81,7 +81,7 @@ public class NIOvsOIOTest extends UnitTestCase List factories = new ArrayList(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); for (int i = 0; i < numReceivers; i++) { @@ -162,7 +162,7 @@ public class NIOvsOIOTest extends UnitTestCase conf.getAcceptorConfigurations().add(new TransportConfiguration(acceptorFactoryClassName, params)); - HornetQServer server = HornetQServers.newHornetQServer(conf, false); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, false); AddressSettings addressSettings = new AddressSettings(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/NettyConnectorTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/NettyConnectorTest.java index 8daf866088..f918b119de 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/NettyConnectorTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/NettyConnectorTest.java @@ -14,13 +14,13 @@ package org.apache.activemq.tests.integration.client; import io.netty.bootstrap.Bootstrap; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.netty.NettyConnector; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.After; import org.junit.Before; @@ -31,7 +31,7 @@ import org.junit.Test; */ public class NettyConnectorTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; @Override @Before @@ -52,7 +52,7 @@ public class NettyConnectorTest extends ServiceTestBase TransportConfiguration transport = new TransportConfiguration(NETTY_CONNECTOR_FACTORY); transport.getParams().put(TransportConstants.NETTY_CONNECT_TIMEOUT, timeout); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(transport); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(transport); ClientSessionFactoryImpl factory = (ClientSessionFactoryImpl) locator.createSessionFactory(); NettyConnector connector = (NettyConnector) factory.getConnector(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/NewDeadLetterAddressTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/NewDeadLetterAddressTest.java index 927a61a9e0..738c141683 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/NewDeadLetterAddressTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/NewDeadLetterAddressTest.java @@ -26,11 +26,11 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.UnitTestCase; @@ -44,7 +44,7 @@ import org.apache.activemq.tests.util.UnitTestCase; */ public class NewDeadLetterAddressTest extends UnitTestCase { - private HornetQServer server; + private ActiveMQServer server; private ClientSession clientSession; private ServerLocator locator; @@ -80,13 +80,13 @@ public class NewDeadLetterAddressTest extends UnitTestCase Configuration configuration = createDefaultConfig() .setSecurityEnabled(false) .addAcceptorConfiguration(transportConfig); - server = addServer(HornetQServers.newHornetQServer(configuration, false)); + server = addServer(ActiveMQServers.newActiveMQServer(configuration, false)); // start the server server.start(); // then we create a client as normal locator = - addServerLocator(HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( - UnitTestCase.INVM_CONNECTOR_FACTORY))); + addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration( + UnitTestCase.INVM_CONNECTOR_FACTORY))); ClientSessionFactory sessionFactory = createSessionFactory(locator); clientSession = sessionFactory.createSession(false, true, false); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/OrderTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/OrderTest.java index be84d82cfa..ebdaa2afdb 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/OrderTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/OrderTest.java @@ -21,7 +21,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; @@ -41,7 +41,7 @@ public class OrderTest extends ServiceTestBase private boolean persistent; - private HornetQServer server; + private ActiveMQServer server; private ServerLocator locator; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingOrderTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingOrderTest.java index 2d0c0d6cdc..492eb00c01 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingOrderTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingOrderTest.java @@ -32,19 +32,19 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.paging.PagingStore; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.Bindings; import org.apache.activemq.core.postoffice.impl.LocalQueueBinding; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.impl.QueueImpl; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; -import org.apache.activemq.jms.client.HornetQJMSConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.tests.unit.util.InVMNamingContext; import org.apache.activemq.tests.util.ServiceTestBase; @@ -95,7 +95,7 @@ public class PagingOrderTest extends ServiceTestBase Configuration config = createDefaultConfig() .setJournalSyncNonTransactional(false); - HornetQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, new HashMap()); + ActiveMQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, new HashMap()); server.start(); @@ -204,7 +204,7 @@ public class PagingOrderTest extends ServiceTestBase Configuration config = createDefaultConfig() .setJournalSyncNonTransactional(false); - HornetQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, new HashMap()); + ActiveMQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, new HashMap()); server.start(); @@ -357,7 +357,7 @@ public class PagingOrderTest extends ServiceTestBase Configuration config = createDefaultConfig() .setJournalSyncNonTransactional(false); - HornetQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, new HashMap()); + ActiveMQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, new HashMap()); server.start(); @@ -471,7 +471,7 @@ public class PagingOrderTest extends ServiceTestBase Configuration config = createDefaultConfig() .setJournalSyncNonTransactional(false); - HornetQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, new HashMap()); + ActiveMQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, new HashMap()); server.start(); @@ -571,7 +571,7 @@ public class PagingOrderTest extends ServiceTestBase Configuration config = createDefaultConfig() .setJournalSyncNonTransactional(false); - HornetQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, new HashMap()); + ActiveMQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, new HashMap()); server.start(); @@ -718,7 +718,7 @@ public class PagingOrderTest extends ServiceTestBase Configuration config = createDefaultConfig() .setJournalSyncNonTransactional(false); - HornetQServer server = createServer(true, config, PAGE_SIZE, -1, new HashMap()); + ActiveMQServer server = createServer(true, config, PAGE_SIZE, -1, new HashMap()); JMSServerManagerImpl jmsServer = new JMSServerManagerImpl(server); InVMNamingContext context = new InVMNamingContext(); @@ -727,7 +727,7 @@ public class PagingOrderTest extends ServiceTestBase jmsServer.createTopic(true, "tt", "/topic/TT"); - server.getHornetQServerControl().addAddressSettings("jms.topic.TT", + server.getActiveMQServerControl().addAddressSettings("jms.topic.TT", "DLQ", "DLQ", -1, @@ -746,8 +746,8 @@ public class PagingOrderTest extends ServiceTestBase 10, "KILL"); - HornetQJMSConnectionFactory cf = (HornetQJMSConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ActiveMQJMSConnectionFactory cf = (ActiveMQJMSConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(INVM_CONNECTOR_FACTORY)); Connection conn = cf.createConnection(); conn.setClientID("tst"); @@ -795,14 +795,14 @@ public class PagingOrderTest extends ServiceTestBase Configuration config = createDefaultConfig() .setJournalSyncNonTransactional(false); - HornetQServer server = createServer(true, config, -1, -1, AddressFullMessagePolicy.BLOCK, new HashMap()); + ActiveMQServer server = createServer(true, config, -1, -1, AddressFullMessagePolicy.BLOCK, new HashMap()); JMSServerManagerImpl jmsServer = new JMSServerManagerImpl(server); InVMNamingContext context = new InVMNamingContext(); jmsServer.setContext(context); jmsServer.start(); - server.getHornetQServerControl().addAddressSettings("jms.queue.Q1", + server.getActiveMQServerControl().addAddressSettings("jms.queue.Q1", "DLQ", "DLQ", -1, @@ -823,8 +823,8 @@ public class PagingOrderTest extends ServiceTestBase jmsServer.createQueue(true, "Q1", null, true, "/queue/Q1"); - HornetQJMSConnectionFactory cf = (HornetQJMSConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ActiveMQJMSConnectionFactory cf = (ActiveMQJMSConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(INVM_CONNECTOR_FACTORY)); conn = cf.createConnection(); conn.setClientID("tst"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingSyncTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingSyncTest.java index 75d6c877a5..fecf2a9561 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingSyncTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingSyncTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Test; @@ -56,7 +56,7 @@ public class PagingSyncTest extends ServiceTestBase Configuration config = createDefaultConfig() .setJournalSyncNonTransactional(false); - HornetQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, new HashMap()); + ActiveMQServer server = createServer(true, config, PAGE_SIZE, PAGE_MAX, new HashMap()); server.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingTest.java index 90d55ecc41..a13892d918 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingTest.java @@ -63,9 +63,9 @@ import org.apache.activemq.core.persistence.impl.journal.DescribeJournal.Referen import org.apache.activemq.core.persistence.impl.journal.JournalRecordIds; import org.apache.activemq.core.persistence.impl.journal.JournalStorageManager.AckDescribe; import org.apache.activemq.core.persistence.impl.journal.OperationContextImpl; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.integration.IntegrationTestLogger; @@ -86,7 +86,7 @@ import org.junit.Test; public class PagingTest extends ServiceTestBase { private ServerLocator locator; - private HornetQServer server; + private ActiveMQServer server; private ClientSessionFactory sf; static final int MESSAGE_SIZE = 1024; // 1k @@ -736,7 +736,7 @@ public class PagingTest extends ServiceTestBase .setJournalSyncNonTransactional(false) .setJournalCompactMinFiles(0); // disable compact - HornetQServer server = + ActiveMQServer server = createServer(true, config, PagingTest.PAGE_SIZE, PagingTest.PAGE_MAX, @@ -1641,8 +1641,8 @@ public class PagingTest extends ServiceTestBase 0, 0, new NIOSequentialFileFactory(getJournalDir()), - "hornetq-data", - "hq", + "activemq-data", + "amq", 1); jrn.start(); jrn.load(records, list, null); @@ -1926,7 +1926,7 @@ public class PagingTest extends ServiceTestBase session.createQueue(PagingTest.ADDRESS, PagingTest.ADDRESS, null, true); session.createQueue(PagingTest.ADDRESS, PagingTest.ADDRESS.concat("-invalid"), - new SimpleString(HornetQServerImpl.GENERIC_IGNORED_FILTER), + new SimpleString(ActiveMQServerImpl.GENERIC_IGNORED_FILTER), true); ClientProducer producer = session.createProducer(PagingTest.ADDRESS); @@ -2641,7 +2641,7 @@ public class PagingTest extends ServiceTestBase ClientProducer producer = session.createProducer(PagingTest.ADDRESS); byte[] body = new byte[MESSAGE_SIZE]; - // HornetQBuffer bodyLocal = HornetQChannelBuffers.buffer(DataConstants.SIZE_INT * numberOfIntegers); + // ActiveMQBuffer bodyLocal = ActiveMQChannelBuffers.buffer(DataConstants.SIZE_INT * numberOfIntegers); ClientMessage message = null; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ProducerCloseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ProducerCloseTest.java index d4074f0362..c200e73aaa 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ProducerCloseTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ProducerCloseTest.java @@ -26,7 +26,7 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -38,7 +38,7 @@ import org.apache.activemq.tests.util.UnitTestCase; public class ProducerCloseTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private ClientSessionFactory sf; private ClientSession session; private ServerLocator locator; @@ -54,7 +54,7 @@ public class ProducerCloseTest extends ServiceTestBase Assert.assertTrue(producer.isClosed()); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { public void run() throws ActiveMQException { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ProducerFlowControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ProducerFlowControlTest.java index ff6d15b7fc..25230d3750 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ProducerFlowControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ProducerFlowControlTest.java @@ -32,7 +32,7 @@ import org.apache.activemq.core.client.impl.ClientProducerCreditManagerImpl; import org.apache.activemq.core.client.impl.ClientProducerCredits; import org.apache.activemq.core.client.impl.ClientProducerInternal; import org.apache.activemq.core.client.impl.ClientSessionInternal; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.HierarchicalRepository; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; @@ -59,7 +59,7 @@ public class ProducerFlowControlTest extends ServiceTestBase private ClientSession session; - private HornetQServer server; + private ActiveMQServer server; protected boolean isNetty() { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ProducerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ProducerTest.java index 2976127647..cfd1b60655 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ProducerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ProducerTest.java @@ -26,7 +26,7 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.PacketImpl; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.spi.core.protocol.RemotingConnection; @@ -40,7 +40,7 @@ import org.junit.Test; */ public class ProducerTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private final SimpleString QUEUE = new SimpleString("ConsumerTestQueue"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/QueueBrowserTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/QueueBrowserTest.java index 660d220c4c..71b7cc08b2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/QueueBrowserTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/QueueBrowserTest.java @@ -24,7 +24,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.tests.util.ServiceTestBase; @@ -34,7 +34,7 @@ import org.apache.activemq.tests.util.ServiceTestBase; */ public class QueueBrowserTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private final SimpleString QUEUE = new SimpleString("ConsumerTestQueue"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ReceiveImmediateTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ReceiveImmediateTest.java index 0a9622bfe9..c32005e06d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ReceiveImmediateTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ReceiveImmediateTest.java @@ -28,7 +28,7 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.tests.util.ServiceTestBase; @@ -38,7 +38,7 @@ import org.apache.activemq.tests.util.ServiceTestBase; */ public class ReceiveImmediateTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private final SimpleString QUEUE = new SimpleString("ReceiveImmediateTest.queue"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ReceiveTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ReceiveTest.java index 60716eb50e..a9782d8414 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ReceiveTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ReceiveTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; import org.junit.Before; @@ -40,7 +40,7 @@ public class ReceiveTest extends ServiceTestBase private ServerLocator locator; - private HornetQServer server; + private ActiveMQServer server; @Override @Before diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/RedeliveryConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/RedeliveryConsumerTest.java index 537b70418a..737cb0686e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/RedeliveryConsumerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/RedeliveryConsumerTest.java @@ -30,7 +30,7 @@ import org.apache.activemq.core.journal.RecordInfo; import org.apache.activemq.core.journal.impl.JournalImpl; import org.apache.activemq.core.journal.impl.NIOSequentialFileFactory; import org.apache.activemq.core.persistence.impl.journal.JournalRecordIds; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; @@ -52,7 +52,7 @@ public class RedeliveryConsumerTest extends ServiceTestBase // Attributes ---------------------------------------------------- - HornetQServer server; + ActiveMQServer server; final SimpleString ADDRESS = new SimpleString("address"); @@ -301,8 +301,8 @@ public class RedeliveryConsumerTest extends ServiceTestBase 0, 0, new NIOSequentialFileFactory(server.getConfiguration().getJournalDirectory()), - "hornetq-data", - "hq", + "activemq-data", + "amq", 1); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/RequestorTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/RequestorTest.java index 75dcda4926..829de38016 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/RequestorTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/RequestorTest.java @@ -25,7 +25,7 @@ import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientMessageImpl; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.RandomUtil; @@ -45,7 +45,7 @@ import org.junit.Test; public class RequestorTest extends ServiceTestBase { - private HornetQServer service; + private ActiveMQServer service; private ClientSessionFactory sf; private ServerLocator locator; @@ -207,7 +207,7 @@ public class RequestorTest extends ServiceTestBase session.close(); - HornetQAction hornetQAction = new HornetQAction() + ActiveMQAction activeMQAction = new ActiveMQAction() { public void run() throws Exception { @@ -215,9 +215,9 @@ public class RequestorTest extends ServiceTestBase } }; - UnitTestCase.expectHornetQException("ClientRequestor's session must not be closed", - ActiveMQExceptionType.OBJECT_CLOSED, - hornetQAction); + UnitTestCase.expectActiveMQException("ClientRequestor's session must not be closed", + ActiveMQExceptionType.OBJECT_CLOSED, + activeMQAction); } @Test @@ -251,7 +251,7 @@ public class RequestorTest extends ServiceTestBase requestor.close(); - HornetQAction hornetQAction = new HornetQAction() + ActiveMQAction activeMQAction = new ActiveMQAction() { public void run() throws Exception { @@ -259,8 +259,8 @@ public class RequestorTest extends ServiceTestBase } }; - UnitTestCase.expectHornetQException("can not send a request on a closed ClientRequestor", - ActiveMQExceptionType.OBJECT_CLOSED, hornetQAction); + UnitTestCase.expectActiveMQException("can not send a request on a closed ClientRequestor", + ActiveMQExceptionType.OBJECT_CLOSED, activeMQAction); } @Override diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/RoutingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/RoutingTest.java index 0bb67958e7..fef2531b93 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/RoutingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/RoutingTest.java @@ -19,7 +19,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; import org.junit.Before; @@ -36,7 +36,7 @@ public class RoutingTest extends ServiceTestBase public final SimpleString queueC = new SimpleString("queueC"); private ServerLocator locator; - private HornetQServer server; + private ActiveMQServer server; private ClientSessionFactory cf; @Override diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SelfExpandingBufferTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SelfExpandingBufferTest.java index 0ee579d0a9..e9d7aa4969 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SelfExpandingBufferTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SelfExpandingBufferTest.java @@ -20,7 +20,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.ServiceTestBase; @@ -38,7 +38,7 @@ public class SelfExpandingBufferTest extends ServiceTestBase private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; - HornetQServer service; + ActiveMQServer service; SimpleString ADDRESS = new SimpleString("Address"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ServerLocatorConnectTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ServerLocatorConnectTest.java index b6e0951daa..5cb2d6283d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ServerLocatorConnectTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ServerLocatorConnectTest.java @@ -18,12 +18,12 @@ import java.util.concurrent.TimeUnit; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.client.impl.ServerLocatorInternal; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Before; import org.junit.Test; @@ -36,7 +36,7 @@ import org.junit.Test; */ public class ServerLocatorConnectTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; @Override @Before @@ -51,7 +51,7 @@ public class ServerLocatorConnectTest extends ServiceTestBase @Test public void testSingleConnectorSingleServer() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(createTransportConfiguration(isNetty(), false, generateParams(0, isNetty()))); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(createTransportConfiguration(isNetty(), false, generateParams(0, isNetty()))); ClientSessionFactory csf = createSessionFactory(locator); csf.close(); locator.close(); @@ -60,7 +60,7 @@ public class ServerLocatorConnectTest extends ServiceTestBase @Test public void testSingleConnectorSingleServerConnect() throws Exception { - ServerLocatorInternal locator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithoutHA(createTransportConfiguration(isNetty(), false, generateParams(0, isNetty()))); + ServerLocatorInternal locator = (ServerLocatorInternal) ActiveMQClient.createServerLocatorWithoutHA(createTransportConfiguration(isNetty(), false, generateParams(0, isNetty()))); ClientSessionFactoryInternal csf = locator.connect(); assertNotNull(csf); assertEquals(csf.numConnections(), 1); @@ -70,7 +70,7 @@ public class ServerLocatorConnectTest extends ServiceTestBase @Test public void testMultipleConnectorSingleServerConnect() throws Exception { - ServerLocatorInternal locator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithoutHA( + ServerLocatorInternal locator = (ServerLocatorInternal) ActiveMQClient.createServerLocatorWithoutHA( createTransportConfiguration(isNetty(), false, generateParams(0, isNetty())), createTransportConfiguration(isNetty(), false, generateParams(1, isNetty())), createTransportConfiguration(isNetty(), false, generateParams(2, isNetty())), @@ -86,7 +86,7 @@ public class ServerLocatorConnectTest extends ServiceTestBase @Test public void testMultipleConnectorSingleServerConnectReconnect() throws Exception { - ServerLocatorInternal locator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithoutHA( + ServerLocatorInternal locator = (ServerLocatorInternal) ActiveMQClient.createServerLocatorWithoutHA( createTransportConfiguration(isNetty(), false, generateParams(0, isNetty())), createTransportConfiguration(isNetty(), false, generateParams(1, isNetty())), createTransportConfiguration(isNetty(), false, generateParams(2, isNetty())), @@ -103,7 +103,7 @@ public class ServerLocatorConnectTest extends ServiceTestBase @Test public void testMultipleConnectorSingleServerNoConnect() throws Exception { - ServerLocatorInternal locator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithoutHA( + ServerLocatorInternal locator = (ServerLocatorInternal) ActiveMQClient.createServerLocatorWithoutHA( createTransportConfiguration(isNetty(), false, generateParams(1, isNetty())), createTransportConfiguration(isNetty(), false, generateParams(2, isNetty())), createTransportConfiguration(isNetty(), false, generateParams(3, isNetty())), @@ -131,7 +131,7 @@ public class ServerLocatorConnectTest extends ServiceTestBase @Test public void testMultipleConnectorSingleServerNoConnectAttemptReconnect() throws Exception { - ServerLocatorInternal locator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithoutHA( + ServerLocatorInternal locator = (ServerLocatorInternal) ActiveMQClient.createServerLocatorWithoutHA( createTransportConfiguration(isNetty(), false, generateParams(1, isNetty())), createTransportConfiguration(isNetty(), false, generateParams(2, isNetty())), createTransportConfiguration(isNetty(), false, generateParams(3, isNetty())), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ServerLocatorSerializationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ServerLocatorSerializationTest.java index 8c5fe4afe7..8734b30f39 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ServerLocatorSerializationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/ServerLocatorSerializationTest.java @@ -19,14 +19,14 @@ import org.junit.Test; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.client.impl.ServerLocatorImpl; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; @@ -39,7 +39,7 @@ import java.io.ObjectOutputStream; public class ServerLocatorSerializationTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; @Override @@ -64,7 +64,7 @@ public class ServerLocatorSerializationTest extends ServiceTestBase public void testLocatorSerialization() throws Exception { log.info("Starting Netty locator"); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(createTransportConfiguration(isNetty(), false, generateParams(0, isNetty()))); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(createTransportConfiguration(isNetty(), false, generateParams(0, isNetty()))); ClientSessionFactory csf = createSessionFactory(locator); ClientSession session = csf.createSession(false, false); @@ -95,7 +95,7 @@ public class ServerLocatorSerializationTest extends ServiceTestBase public void testConnectionFactorySerialization() throws Exception { log.info("Starting connection factory"); - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory")); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory")); Connection connection = cf.createConnection(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); @@ -110,7 +110,7 @@ public class ServerLocatorSerializationTest extends ServiceTestBase log.info("De-serializing connection factory"); ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); ObjectInputStream in = new ObjectInputStream(bis); - cf = (HornetQConnectionFactory) in.readObject(); + cf = (ActiveMQConnectionFactory) in.readObject(); connection = cf.createConnection(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCloseOnGCTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCloseOnGCTest.java index 5942c75fca..748018c94a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCloseOnGCTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCloseOnGCTest.java @@ -18,7 +18,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.Assert; @@ -33,7 +33,7 @@ import org.junit.Test; */ public class SessionCloseOnGCTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private ServerLocator locator; @Override diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCloseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCloseTest.java index ea8d4cd256..70c41cc7e9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCloseTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCloseTest.java @@ -29,12 +29,12 @@ import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.UnitTestCase; @@ -52,7 +52,7 @@ public class SessionCloseTest extends UnitTestCase // Attributes ---------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; private ClientSessionFactory sf; @@ -72,7 +72,7 @@ public class SessionCloseTest extends UnitTestCase Assert.assertTrue(session.isClosed()); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { public void run() throws ActiveMQException { @@ -80,7 +80,7 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { public void run() throws ActiveMQException { @@ -88,7 +88,7 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { public void run() throws ActiveMQException { @@ -98,7 +98,7 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { public void run() throws ActiveMQException { @@ -106,7 +106,7 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { public void run() throws ActiveMQException { @@ -114,7 +114,7 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { public void run() throws ActiveMQException { @@ -122,7 +122,7 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { public void run() throws ActiveMQException { @@ -130,7 +130,7 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { public void run() throws ActiveMQException { @@ -138,7 +138,7 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { public void run() throws ActiveMQException { @@ -146,7 +146,7 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { public void run() throws ActiveMQException { @@ -167,7 +167,7 @@ public class SessionCloseTest extends UnitTestCase Assert.assertTrue(session.isXA()); Assert.assertTrue(session.isClosed()); - UnitTestCase.expectXAException(XAException.XA_RETRY, new HornetQAction() + UnitTestCase.expectXAException(XAException.XA_RETRY, new ActiveMQAction() { public void run() throws XAException { @@ -175,7 +175,7 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectXAException(XAException.XAER_RMERR, new HornetQAction() + UnitTestCase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction() { public void run() throws XAException { @@ -183,7 +183,7 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectXAException(XAException.XAER_RMERR, new HornetQAction() + UnitTestCase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction() { public void run() throws XAException { @@ -191,7 +191,7 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectXAException(XAException.XAER_RMERR, new HornetQAction() + UnitTestCase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction() { public void run() throws XAException { @@ -199,7 +199,7 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectXAException(XAException.XAER_RMERR, new HornetQAction() + UnitTestCase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction() { public void run() throws XAException { @@ -207,7 +207,7 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectXAException(XAException.XAER_RMERR, new HornetQAction() + UnitTestCase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction() { public void run() throws XAException { @@ -215,7 +215,7 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectXAException(XAException.XAER_RMERR, new HornetQAction() + UnitTestCase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction() { public void run() throws XAException { @@ -259,11 +259,11 @@ public class SessionCloseTest extends UnitTestCase Configuration config = createDefaultConfig() .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getCanonicalName())) .setSecurityEnabled(false); - server = HornetQServers.newHornetQServer(config, false); + server = ActiveMQServers.newActiveMQServer(config, false); server.start(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); sf = createSessionFactory(locator); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionClosedOnRemotingConnectionFailureTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionClosedOnRemotingConnectionFailureTest.java index 49d4c58ebf..c4ea86c985 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionClosedOnRemotingConnectionFailureTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionClosedOnRemotingConnectionFailureTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionInternal; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; @@ -37,7 +37,7 @@ import org.junit.Test; */ public class SessionClosedOnRemotingConnectionFailureTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private ClientSessionFactory sf; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCreateAndDeleteQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCreateAndDeleteQueueTest.java index 4387f548c5..821330d57e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCreateAndDeleteQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCreateAndDeleteQueueTest.java @@ -18,7 +18,7 @@ import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.postoffice.Binding; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.impl.LastValueQueue; import org.apache.activemq.core.settings.impl.AddressSettings; @@ -32,7 +32,7 @@ import org.junit.Test; */ public class SessionCreateAndDeleteQueueTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private final SimpleString address = new SimpleString("address"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCreateConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCreateConsumerTest.java index 76773f6ce1..1628cda53f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCreateConsumerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCreateConsumerTest.java @@ -19,7 +19,7 @@ import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionInternal; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; import org.junit.Before; @@ -33,7 +33,7 @@ public class SessionCreateConsumerTest extends ServiceTestBase private final String queueName = "ClientSessionCreateConsumerTestQ"; private ServerLocator locator; - private HornetQServer service; + private ActiveMQServer service; private ClientSessionInternal clientSession; private ClientSessionFactory cf; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCreateProducerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCreateProducerTest.java index 1d0d7ecbee..0614b4cce1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCreateProducerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionCreateProducerTest.java @@ -18,7 +18,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionInternal; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; import org.junit.Before; @@ -39,7 +39,7 @@ public class SessionCreateProducerTest extends ServiceTestBase { super.setUp(); locator = createInVMNonHALocator(); - HornetQServer service = createServer(false); + ActiveMQServer service = createServer(false); service.start(); locator.setProducerMaxRate(99); locator.setBlockOnNonDurableSend(true); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionFactoryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionFactoryTest.java index 7c86215c5a..a2c971c9f0 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionFactoryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionFactoryTest.java @@ -26,13 +26,13 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; @@ -52,7 +52,7 @@ public class SessionFactoryTest extends ServiceTestBase .setGroupAddress(getUDPDiscoveryAddress()) .setGroupPort(getUDPDiscoveryPort())); - private HornetQServer liveService; + private ActiveMQServer liveService; private TransportConfiguration liveTC; @@ -68,7 +68,7 @@ public class SessionFactoryTest extends ServiceTestBase @Test public void testSerializable() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(InVMConnectorFactory.class.getName())); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(InVMConnectorFactory.class.getName())); ByteArrayOutputStream baos = new ByteArrayOutputStream(); @@ -96,7 +96,7 @@ public class SessionFactoryTest extends ServiceTestBase @Test public void testCloseUnusedClientSessionFactoryWithoutGlobalPools() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(liveTC); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(liveTC); ClientSessionFactory csf = createSessionFactory(locator); csf.close(); @@ -105,32 +105,32 @@ public class SessionFactoryTest extends ServiceTestBase @Test public void testDiscoveryConstructor() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(groupConfiguration); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(groupConfiguration); assertFactoryParams(locator, null, groupConfiguration, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, - HornetQClient.DEFAULT_CALL_TIMEOUT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, - HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, - HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, - HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_RETRY_INTERVAL, - HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, - HornetQClient.DEFAULT_RECONNECT_ATTEMPTS); + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CALL_TIMEOUT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, + ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS); ClientSessionFactory cf = createSessionFactory(locator); ClientSession session = cf.createSession(false, true, true); @@ -147,32 +147,32 @@ public class SessionFactoryTest extends ServiceTestBase public void testStaticConnectorListConstructor() throws Exception { TransportConfiguration[] tc = new TransportConfiguration[]{liveTC}; - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(tc); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(tc); assertFactoryParams(locator, tc, null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, - HornetQClient.DEFAULT_CALL_TIMEOUT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, - HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, - HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, - HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_RETRY_INTERVAL, - HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, - HornetQClient.DEFAULT_RECONNECT_ATTEMPTS); + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CALL_TIMEOUT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, + ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS); ClientSessionFactory cf = createSessionFactory(locator); ClientSession session = cf.createSession(false, true, true); @@ -188,7 +188,7 @@ public class SessionFactoryTest extends ServiceTestBase { TransportConfiguration[] tc = new TransportConfiguration[]{liveTC}; - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(tc); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(tc); long clientFailureCheckPeriod = RandomUtil.randomPositiveLong(); long connectionTTL = RandomUtil.randomPositiveLong(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionSendAcknowledgementHandlerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionSendAcknowledgementHandlerTest.java index c31edf7bd4..304dc1a63d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionSendAcknowledgementHandlerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionSendAcknowledgementHandlerTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.SendAcknowledgementHandler; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; import org.junit.Before; @@ -36,7 +36,7 @@ import org.junit.Test; */ public class SessionSendAcknowledgementHandlerTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private final SimpleString address = new SimpleString("address"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionStopStartTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionStopStartTest.java index 150113d5b0..6a8b6dadff 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionStopStartTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionStopStartTest.java @@ -28,7 +28,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; @@ -39,7 +39,7 @@ public class SessionStopStartTest extends ServiceTestBase { private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; - private HornetQServer server; + private ActiveMQServer server; private final SimpleString QUEUE = new SimpleString("ConsumerTestQueue"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionTest.java index 0a68b28c70..f60cd3a322 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SessionTest.java @@ -28,7 +28,7 @@ import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.client.SessionFailureListener; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.client.impl.ClientSessionInternal; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.util.CountDownSessionFailureListener; @@ -48,7 +48,7 @@ public class SessionTest extends ServiceTestBase private final String queueName = "ClientSessionTestQ"; private ServerLocator locator; - private HornetQServer server; + private ActiveMQServer server; private ClientSessionFactory cf; @Override diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SimpleSendMultipleQueuesTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SimpleSendMultipleQueuesTest.java index 8b38a9894b..684019a5a2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SimpleSendMultipleQueuesTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/SimpleSendMultipleQueuesTest.java @@ -24,7 +24,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.ServiceTestBase; @@ -39,7 +39,7 @@ public class SimpleSendMultipleQueuesTest extends ServiceTestBase public static final String queueName = "testqueue"; - private HornetQServer server; + private ActiveMQServer server; private ClientSession session; 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 bf85791d8b..a297460e60 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 @@ -32,7 +32,7 @@ import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.CoreNotificationType; import org.apache.activemq.api.core.management.ManagementHelper; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.core.settings.impl.SlowConsumerPolicy; import org.apache.activemq.tests.util.RandomUtil; @@ -66,7 +66,7 @@ public class SlowConsumerTest extends ServiceTestBase this.isNetty = isNetty; } - private HornetQServer server; + private ActiveMQServer server; private final SimpleString QUEUE = new SimpleString("ConsumerTestQueue"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TemporaryQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TemporaryQueueTest.java index dd344eeba2..7737bfedaf 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TemporaryQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TemporaryQueueTest.java @@ -569,7 +569,7 @@ public class TemporaryQueueTest extends SingleServerTestBase session = sf.createSession(false, true, true); session.start(); - HornetQAction hornetQAction = new HornetQAction() + ActiveMQAction activeMQAction = new ActiveMQAction() { public void run() throws ActiveMQException { @@ -577,8 +577,8 @@ public class TemporaryQueueTest extends SingleServerTestBase } }; - UnitTestCase.expectHornetQException("temp queue must not exist after the server detected the client crash", - ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST, hornetQAction); + UnitTestCase.expectActiveMQException("temp queue must not exist after the server detected the client crash", + ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST, activeMQAction); session.close(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TransactionDurabilityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TransactionDurabilityTest.java index 95e9bb4cb5..82e9935228 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TransactionDurabilityTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TransactionDurabilityTest.java @@ -23,10 +23,10 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; /** @@ -68,13 +68,13 @@ public class TransactionDurabilityTest extends ServiceTestBase final SimpleString queue2 = new SimpleString("queue2"); - HornetQServer server = createServer(true, conf); + ActiveMQServer server = createServer(true, conf); server.start(); ServerLocator locator = - addServerLocator(HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( - ServiceTestBase.INVM_CONNECTOR_FACTORY))); + addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration( + ServiceTestBase.INVM_CONNECTOR_FACTORY))); ClientSessionFactory sf = createSessionFactory(locator); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TransactionalSendTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TransactionalSendTest.java index 7f7f85f084..02fb828c67 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TransactionalSendTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TransactionalSendTest.java @@ -17,7 +17,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; @@ -50,7 +50,7 @@ public class TransactionalSendTest extends ServiceTestBase @Test public void testSendWithCommit() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); ClientSessionFactory cf = createSessionFactory(locator); ClientSession session = cf.createSession(false, false, false); @@ -79,7 +79,7 @@ public class TransactionalSendTest extends ServiceTestBase @Test public void testSendWithRollback() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); server.start(); ClientSessionFactory cf = createSessionFactory(locator); ClientSession session = cf.createSession(false, false, false); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/WildCardRoutingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/WildCardRoutingTest.java index 85fcbec365..7f55a443b9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/WildCardRoutingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/WildCardRoutingTest.java @@ -26,11 +26,11 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.tests.util.UnitTestCase; /** @@ -38,7 +38,7 @@ import org.apache.activemq.tests.util.UnitTestCase; */ public class WildCardRoutingTest extends UnitTestCase { - private HornetQServer server; + private ActiveMQServer server; private ServerLocator locator; private ClientSession clientSession; private ClientSessionFactory sessionFactory; @@ -791,12 +791,12 @@ public class WildCardRoutingTest extends UnitTestCase .setTransactionTimeoutScanPeriod(500) .addAcceptorConfiguration(transportConfig); - server = HornetQServers.newHornetQServer(configuration, false); + server = ActiveMQServers.newActiveMQServer(configuration, false); // start the server server.start(); server.getManagementService().enableNotifications(false); // then we create a client as normal - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); sessionFactory = createSessionFactory(locator); clientSession = sessionFactory.createSession(false, true, true); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/ClientCrashTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/ClientCrashTest.java index 0b01d9df02..5da0dd4e99 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/ClientCrashTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/ClientCrashTest.java @@ -26,12 +26,12 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.settings.impl.AddressSettings; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.SpawnedVMSupport; /** - * A test that makes sure that a HornetQ server cleans up the associated + * A test that makes sure that a ActiveMQ server cleans up the associated * resources when one of its client crashes. * * @author Tim Fox @@ -90,7 +90,7 @@ public class ClientCrashTest extends ClientTestBase assertActiveConnections(1 + 1); // One local and one from the other vm assertActiveSession(1 + 1); - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/ClientExitTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/ClientExitTest.java index c12cdb63e8..7edeb4e4e9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/ClientExitTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/ClientExitTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; import org.apache.activemq.tests.integration.IntegrationTestLogger; @@ -31,7 +31,7 @@ import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.SpawnedVMSupport; /** - * A test that makes sure that a HornetQ client gracefully exists after the last session is + * A test that makes sure that a ActiveMQ client gracefully exists after the last session is * closed. Test for http://jira.jboss.org/jira/browse/JBMESSAGING-417. * * This is not technically a crash test, but it uses the same type of topology as the crash tests @@ -108,7 +108,7 @@ public class ClientExitTest extends ClientTestBase { super.setUp(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); addServerLocator(locator); ClientSessionFactory sf = createSessionFactory(locator); session = sf.createSession(false, true, true); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/ClientTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/ClientTestBase.java index 416d9619fa..f68dc85636 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/ClientTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/ClientTestBase.java @@ -16,7 +16,7 @@ import org.junit.Before; import org.junit.Assert; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; /** @@ -29,7 +29,7 @@ import org.apache.activemq.tests.util.ServiceTestBase; public abstract class ClientTestBase extends ServiceTestBase { - protected HornetQServer server; + protected ActiveMQServer server; @Override @Before @@ -51,11 +51,11 @@ public abstract class ClientTestBase extends ServiceTestBase protected void assertActiveConnections(final int expectedActiveConnections, long timeout) throws Exception { timeout += System.currentTimeMillis(); - while (timeout > System.currentTimeMillis() && server.getHornetQServerControl().getConnectionCount() != expectedActiveConnections) + while (timeout > System.currentTimeMillis() && server.getActiveMQServerControl().getConnectionCount() != expectedActiveConnections) { Thread.sleep(100); } - Assert.assertEquals(expectedActiveConnections, server.getHornetQServerControl().getConnectionCount()); + Assert.assertEquals(expectedActiveConnections, server.getActiveMQServerControl().getConnectionCount()); } protected void assertActiveSession(final int expectedActiveSession) throws Exception diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/CrashClient.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/CrashClient.java index e58bd53175..52b43e0438 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/CrashClient.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/CrashClient.java @@ -19,10 +19,10 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; /** @@ -46,7 +46,7 @@ public class CrashClient { CrashClient.log.debug("args = " + Arrays.asList(args)); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); locator.setClientFailureCheckPeriod(ClientCrashTest.PING_PERIOD); locator.setConnectionTTL(ClientCrashTest.CONNECTION_TTL); ClientSessionFactory sf = locator.createSessionFactory(); @@ -55,7 +55,7 @@ public class CrashClient ClientSession session = sf.createSession(false, true, true); ClientProducer producer = session.createProducer(ClientCrashTest.QUEUE); - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/CrashClient2.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/CrashClient2.java index e3e8bd7345..e6d3d1b4da 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/CrashClient2.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/CrashClient2.java @@ -20,7 +20,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; import org.apache.activemq.tests.integration.IntegrationTestLogger; @@ -46,7 +46,7 @@ public class CrashClient2 { log.debug("args = " + Arrays.asList(args)); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); locator.setClientFailureCheckPeriod(ClientCrashTest.PING_PERIOD); locator.setConnectionTTL(ClientCrashTest.CONNECTION_TTL); ClientSessionFactory sf = locator.createSessionFactory(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/GracefulClient.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/GracefulClient.java index 5b50b7b2d8..039902fb51 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/GracefulClient.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/GracefulClient.java @@ -18,10 +18,10 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; /** @@ -49,13 +49,13 @@ public class GracefulClient try { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); ClientSessionFactory sf = locator.createSessionFactory(); ClientSession session = sf.createSession(false, true, true); ClientProducer producer = session.createProducer(queueName); ClientConsumer consumer = session.createConsumer(queueName); - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/ClusterControllerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/ClusterControllerTest.java index 1b0434fedd..32abcafd44 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/ClusterControllerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/ClusterControllerTest.java @@ -14,12 +14,12 @@ package org.apache.activemq.tests.integration.cluster; import org.apache.activemq.api.core.ActiveMQClusterSecurityException; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.client.impl.ServerLocatorImpl; import org.apache.activemq.core.server.cluster.ClusterControl; import org.apache.activemq.core.server.cluster.ClusterController; -import org.apache.activemq.core.server.cluster.HornetQServerSideProtocolManagerFactory; +import org.apache.activemq.core.server.cluster.ActiveMQServerSideProtocolManagerFactory; import org.apache.activemq.tests.integration.cluster.distribution.ClusterTestBase; import org.junit.After; import org.junit.Before; @@ -66,9 +66,9 @@ public class ClusterControllerTest extends ClusterTestBase @Test public void controlWithDifferentConnector() throws Exception { - try (ServerLocatorImpl locator = (ServerLocatorImpl) HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(INVM_CONNECTOR_FACTORY))) + try (ServerLocatorImpl locator = (ServerLocatorImpl) ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(INVM_CONNECTOR_FACTORY))) { - locator.setProtocolManagerFactory(HornetQServerSideProtocolManagerFactory.getInstance()); + locator.setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance()); ClusterController controller = new ClusterController(getServer(0), getServer(0).getScheduledPool()); ClusterControl clusterControl = controller.connectToNodeInCluster((ClientSessionFactoryInternal) locator.createSessionFactory()); clusterControl.authorize(); @@ -78,19 +78,19 @@ public class ClusterControllerTest extends ClusterTestBase @Test public void controlWithDifferentPassword() throws Exception { - try (ServerLocatorImpl locator = (ServerLocatorImpl) HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(INVM_CONNECTOR_FACTORY))) + try (ServerLocatorImpl locator = (ServerLocatorImpl) ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(INVM_CONNECTOR_FACTORY))) { - locator.setProtocolManagerFactory(HornetQServerSideProtocolManagerFactory.getInstance()); + locator.setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance()); ClusterController controller = new ClusterController(getServer(1), getServer(1).getScheduledPool()); ClusterControl clusterControl = controller.connectToNodeInCluster((ClientSessionFactoryInternal) locator.createSessionFactory()); try { clusterControl.authorize(); - fail("should throw HornetQClusterSecurityException"); + fail("should throw ActiveMQClusterSecurityException"); } catch (Exception e) { - assertTrue("should throw HornetQClusterSecurityException", e instanceof ActiveMQClusterSecurityException); + assertTrue("should throw ActiveMQClusterSecurityException", e instanceof ActiveMQClusterSecurityException); } } } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeFailoverTest.java index fa94757859..c63f450ee5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeFailoverTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.BridgeConfiguration; import org.apache.activemq.core.config.CoreQueueConfiguration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.cluster.impl.BridgeImpl; import org.apache.activemq.tests.integration.cluster.util.MultiServerTestBase; import org.junit.Test; @@ -55,7 +55,7 @@ public class BridgeFailoverTest extends MultiServerTestBase bridgeConfiguration.setReconnectAttempts(-1); servers[2].getConfiguration().getBridgeConfigurations().add(bridgeConfiguration); - for (HornetQServer server : servers) + for (ActiveMQServer server : servers) { server.getConfiguration().getQueueConfigurations().add(new CoreQueueConfiguration() .setAddress(ORIGINAL_QUEUE) @@ -134,7 +134,7 @@ public class BridgeFailoverTest extends MultiServerTestBase bridgeConfiguration.setHA(true); servers[2].getConfiguration().getBridgeConfigurations().add(bridgeConfiguration); - for (HornetQServer server : servers) + for (ActiveMQServer server : servers) { server.getConfiguration().getQueueConfigurations().add(new CoreQueueConfiguration() .setAddress(ORIGINAL_QUEUE) @@ -251,7 +251,7 @@ public class BridgeFailoverTest extends MultiServerTestBase bridgeConfiguration.setReconnectAttempts(-1); servers[2].getConfiguration().getBridgeConfigurations().add(bridgeConfiguration); - for (HornetQServer server : servers) + for (ActiveMQServer server : servers) { server.getConfiguration().getQueueConfigurations().add(new CoreQueueConfiguration() .setAddress(ORIGINAL_QUEUE) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeReconnectTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeReconnectTest.java index 70ea277058..6a17bedddf 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeReconnectTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeReconnectTest.java @@ -27,14 +27,14 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.QueueControl; import org.apache.activemq.api.core.management.ResourceNames; import org.apache.activemq.core.config.BridgeConfiguration; import org.apache.activemq.core.config.CoreQueueConfiguration; import org.apache.activemq.core.remoting.impl.invm.InVMConnector; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.cluster.Bridge; @@ -63,9 +63,9 @@ public class BridgeReconnectTest extends BridgeTestBase Map server1Params; Map server2Params; - HornetQServer server0; - HornetQServer server1; - HornetQServer server2; + ActiveMQServer server0; + ActiveMQServer server1; + ActiveMQServer server2; ServerLocator locator; ClientSession session0; @@ -96,7 +96,7 @@ public class BridgeReconnectTest extends BridgeTestBase server2Params = new HashMap(); connectors = new HashMap(); - server1 = createHornetQServer(1, isNetty(), server1Params); + server1 = createActiveMQServer(1, isNetty(), server1Params); server1tc = new TransportConfiguration(getConnector(), server1Params, "server1tc"); connectors.put(server1tc.getName(), server1tc); staticConnectors = new ArrayList(); @@ -137,8 +137,8 @@ public class BridgeReconnectTest extends BridgeTestBase public void testFailoverDeploysBridge() throws Exception { NodeManager nodeManager = new InVMNodeManager(false); - server0 = createHornetQServer(0, server0Params, isNetty(), nodeManager); - server2 = createBackupHornetQServer(2, server2Params, isNetty(), 0, nodeManager); + server0 = createActiveMQServer(0, server0Params, isNetty(), nodeManager); + server2 = createBackupActiveMQServer(2, server2Params, isNetty(), 0, nodeManager); TransportConfiguration server0tc = new TransportConfiguration(getConnector(), server0Params, "server0tc"); TransportConfiguration server2tc = new TransportConfiguration(getConnector(), server2Params, "server2tc"); @@ -179,7 +179,7 @@ public class BridgeReconnectTest extends BridgeTestBase waitForServerStart(server2); - locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(server0tc, server2tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(server0tc, server2tc)); ClientSessionFactory csf0 = addSessionFactory(locator.createSessionFactory(server2tc)); @@ -193,8 +193,8 @@ public class BridgeReconnectTest extends BridgeTestBase public void testFailoverAndReconnectImmediately() throws Exception { NodeManager nodeManager = new InVMNodeManager(false); - server0 = createHornetQServer(0, server0Params, isNetty(), nodeManager); - server2 = createBackupHornetQServer(2, server2Params, isNetty(), 0, nodeManager); + server0 = createActiveMQServer(0, server0Params, isNetty(), nodeManager); + server2 = createBackupActiveMQServer(2, server2Params, isNetty(), 0, nodeManager); TransportConfiguration server0tc = new TransportConfiguration(getConnector(), server0Params, "server0tc"); TransportConfiguration server2tc = new TransportConfiguration(getConnector(), server2Params, "server2tc"); @@ -235,7 +235,7 @@ public class BridgeReconnectTest extends BridgeTestBase waitForServerStart(server2); - locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(server0tc, server2tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(server0tc, server2tc)); ClientSessionFactory csf0 = addSessionFactory(locator.createSessionFactory(server2tc)); @@ -296,8 +296,8 @@ public class BridgeReconnectTest extends BridgeTestBase { NodeManager nodeManager = new InVMNodeManager(false); - server0 = createHornetQServer(0, server0Params, isNetty(), nodeManager); - server2 = createBackupHornetQServer(2, server2Params, isNetty(), 0, nodeManager); + server0 = createActiveMQServer(0, server0Params, isNetty(), nodeManager); + server2 = createBackupActiveMQServer(2, server2Params, isNetty(), 0, nodeManager); TransportConfiguration server2tc = new TransportConfiguration(getConnector(), server2Params, "server2tc"); @@ -331,7 +331,7 @@ public class BridgeReconnectTest extends BridgeTestBase // Now we will simulate a failure of the bridge connection between server0 and server1 server0.stop(true); - locator = addServerLocator(HornetQClient.createServerLocatorWithHA(server2tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithHA(server2tc)); locator.setReconnectAttempts(100); ClientSessionFactory csf0 = addSessionFactory(locator.createSessionFactory(server2tc)); session0 = csf0.createSession(false, true, true); @@ -372,7 +372,7 @@ public class BridgeReconnectTest extends BridgeTestBase @Test public void testReconnectSameNode() throws Exception { - server0 = createHornetQServer(0, isNetty(), server0Params); + server0 = createActiveMQServer(0, isNetty(), server0Params); TransportConfiguration server0tc = new TransportConfiguration(getConnector(), server0Params, "server0tc"); @@ -401,7 +401,7 @@ public class BridgeReconnectTest extends BridgeTestBase startServers(); - locator = addServerLocator(HornetQClient.createServerLocatorWithHA(server0tc, server1tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithHA(server0tc, server1tc)); ClientSessionFactory csf0 = locator.createSessionFactory(server0tc); session0 = csf0.createSession(false, true, true); @@ -468,7 +468,7 @@ public class BridgeReconnectTest extends BridgeTestBase private void testShutdownServerCleanlyAndReconnectSameNode(final boolean sleep) throws Exception { - server0 = createHornetQServer(0, isNetty(), server0Params); + server0 = createActiveMQServer(0, isNetty(), server0Params); TransportConfiguration server0tc = new TransportConfiguration(getConnector(), server0Params, "server0tc"); server0.getConfiguration().setConnectorConfigurations(connectors); @@ -511,7 +511,7 @@ public class BridgeReconnectTest extends BridgeTestBase waitForServerStart(server0); waitForServerStart(server1); - locator = addServerLocator(HornetQClient.createServerLocatorWithHA(server0tc, server1tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithHA(server0tc, server1tc)); ClientSessionFactory csf0 = locator.createSessionFactory(server0tc); session0 = csf0.createSession(false, true, true); @@ -597,7 +597,7 @@ public class BridgeReconnectTest extends BridgeTestBase @Test public void testFailoverThenFailAgainAndReconnect() throws Exception { - server0 = createHornetQServer(0, isNetty(), server0Params); + server0 = createActiveMQServer(0, isNetty(), server0Params); TransportConfiguration server0tc = new TransportConfiguration(getConnector(), server0Params, "server0tc"); @@ -625,7 +625,7 @@ public class BridgeReconnectTest extends BridgeTestBase startServers(); - locator = addServerLocator(HornetQClient.createServerLocatorWithHA(server0tc, server1tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithHA(server0tc, server1tc)); ClientSessionFactory csf0 = locator.createSessionFactory(server0tc); session0 = csf0.createSession(false, true, true); @@ -714,7 +714,7 @@ public class BridgeReconnectTest extends BridgeTestBase @Test public void testDeliveringCountOnBridgeConnectionFailure() throws Exception { - server0 = createHornetQServer(0, isNetty(), server0Params); + server0 = createActiveMQServer(0, isNetty(), server0Params); TransportConfiguration server0tc = new TransportConfiguration(getConnector(), server0Params, "server0tc"); @@ -742,7 +742,7 @@ public class BridgeReconnectTest extends BridgeTestBase startServers(); - locator = addServerLocator(HornetQClient.createServerLocatorWithHA(server0tc, server1tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithHA(server0tc, server1tc)); ClientSessionFactory csf0 = locator.createSessionFactory(server0tc); session0 = csf0.createSession(false, true, true); @@ -757,7 +757,7 @@ public class BridgeReconnectTest extends BridgeTestBase RemotingConnection forwardingConnection = getForwardingConnection(bridge); InVMConnector.failOnCreateConnection = true; InVMConnector.numberOfFailures = reconnectAttempts - 1; - //forwardingConnection.fail(new HornetQNotConnectedException()); + //forwardingConnection.fail(new ActiveMQNotConnectedException()); final int numMessages = NUM_MESSAGES; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeStartTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeStartTest.java index b7e82c2696..f74a0a3e6e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeStartTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeStartTest.java @@ -26,12 +26,12 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.BridgeConfiguration; import org.apache.activemq.core.config.CoreQueueConfiguration; import org.apache.activemq.core.remoting.impl.invm.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.cluster.Bridge; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; @@ -87,7 +87,7 @@ public class BridgeStartTest extends ServiceTestBase public void testStartStop() throws Exception { Map server0Params = new HashMap(); - HornetQServer server0 = createClusteredServerWithParams(isNetty(), 0, true, server0Params); + ActiveMQServer server0 = createClusteredServerWithParams(isNetty(), 0, true, server0Params); Map server1Params = new HashMap(); if (isNetty()) @@ -98,7 +98,7 @@ public class BridgeStartTest extends ServiceTestBase { server1Params.put(TransportConstants.SERVER_ID_PROP_NAME, 1); } - HornetQServer server1 = createClusteredServerWithParams(isNetty(), 1, true, server1Params); + ActiveMQServer server1 = createClusteredServerWithParams(isNetty(), 1, true, server1Params); ServerLocator locator = null; try { @@ -153,7 +153,7 @@ public class BridgeStartTest extends ServiceTestBase server0.start(); waitForServer(server0); - locator = HornetQClient.createServerLocatorWithoutHA(server0tc, server1tc); + locator = ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc); ClientSessionFactory sf0 = locator.createSessionFactory(server0tc); ClientSessionFactory sf1 = locator.createSessionFactory(server1tc); @@ -256,7 +256,7 @@ public class BridgeStartTest extends ServiceTestBase // to be persisted Map server0Params = new HashMap(); - HornetQServer server0 = createClusteredServerWithParams(isNetty(), 0, true, server0Params); + ActiveMQServer server0 = createClusteredServerWithParams(isNetty(), 0, true, server0Params); Map server1Params = new HashMap(); if (isNetty()) @@ -267,7 +267,7 @@ public class BridgeStartTest extends ServiceTestBase { server1Params.put(TransportConstants.SERVER_ID_PROP_NAME, 1); } - HornetQServer server1 = createClusteredServerWithParams(isNetty(), 1, true, server1Params); + ActiveMQServer server1 = createClusteredServerWithParams(isNetty(), 1, true, server1Params); final String testAddress = "testAddress"; final String queueName0 = "queue0"; @@ -321,7 +321,7 @@ public class BridgeStartTest extends ServiceTestBase server0.start(); waitForServer(server0); - locator = HornetQClient.createServerLocatorWithoutHA(server0tc, server1tc); + locator = ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc); ClientSessionFactory sf0 = locator.createSessionFactory(server0tc); @@ -467,7 +467,7 @@ public class BridgeStartTest extends ServiceTestBase public void testTargetServerNotAvailableNoReconnectTries() throws Exception { Map server0Params = new HashMap(); - HornetQServer server0 = createClusteredServerWithParams(isNetty(), 0, false, server0Params); + ActiveMQServer server0 = createClusteredServerWithParams(isNetty(), 0, false, server0Params); Map server1Params = new HashMap(); if (isNetty()) @@ -478,7 +478,7 @@ public class BridgeStartTest extends ServiceTestBase { server1Params.put(TransportConstants.SERVER_ID_PROP_NAME, 1); } - HornetQServer server1 = createClusteredServerWithParams(isNetty(), 1, false, server1Params); + ActiveMQServer server1 = createClusteredServerWithParams(isNetty(), 1, false, server1Params); final String testAddress = "testAddress"; final String queueName0 = "queue0"; @@ -533,7 +533,7 @@ public class BridgeStartTest extends ServiceTestBase server0.start(); waitForServer(server0); - locator = HornetQClient.createServerLocatorWithoutHA(server0tc, server1tc); + locator = ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc); ClientSessionFactory sf0 = locator.createSessionFactory(server0tc); @@ -621,7 +621,7 @@ public class BridgeStartTest extends ServiceTestBase public void testManualStopStart() throws Exception { Map server0Params = new HashMap(); - HornetQServer server0 = createClusteredServerWithParams(isNetty(), 0, false, server0Params); + ActiveMQServer server0 = createClusteredServerWithParams(isNetty(), 0, false, server0Params); Map server1Params = new HashMap(); if (isNetty()) @@ -632,7 +632,7 @@ public class BridgeStartTest extends ServiceTestBase { server1Params.put(TransportConstants.SERVER_ID_PROP_NAME, 1); } - HornetQServer server1 = createClusteredServerWithParams(isNetty(), 1, false, server1Params); + ActiveMQServer server1 = createClusteredServerWithParams(isNetty(), 1, false, server1Params); final String testAddress = "testAddress"; final String queueName0 = "queue0"; @@ -687,7 +687,7 @@ public class BridgeStartTest extends ServiceTestBase server0.start(); waitForServer(server0); - locator = HornetQClient.createServerLocatorWithoutHA(server0tc, server1tc); + locator = ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc); ClientSessionFactory sf0 = locator.createSessionFactory(server0tc); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeTest.java index 88e82dc4fa..efc429269a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeTest.java @@ -33,7 +33,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.BridgeConfiguration; import org.apache.activemq.core.config.CoreQueueConfiguration; @@ -44,7 +44,7 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.SessionSendContinu import org.apache.activemq.core.protocol.core.impl.wireformat.SessionSendLargeMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionSendMessage; import org.apache.activemq.core.remoting.impl.invm.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.cluster.impl.BridgeImpl; @@ -73,8 +73,8 @@ import org.junit.runners.Parameterized; public class BridgeTest extends ServiceTestBase { - private HornetQServer server0; - private HornetQServer server1; + private ActiveMQServer server0; + private ActiveMQServer server1; private ServerLocator locator; private final boolean netty; @@ -204,7 +204,7 @@ public class BridgeTest extends ServiceTestBase server1.start(); server0.start(); - locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(server0tc, server1tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc)); ClientSessionFactory sf0 = addSessionFactory(locator.createSessionFactory(server0tc)); ClientSessionFactory sf1 = addSessionFactory(locator.createSessionFactory(server1tc)); @@ -382,7 +382,7 @@ public class BridgeTest extends ServiceTestBase server1.getRemotingService().addIncomingInterceptor(myInterceptor); server0.start(); - locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(server0tc, server1tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc)); ClientSessionFactory sf0 = addSessionFactory(locator.createSessionFactory(server0tc)); ClientSessionFactory sf1 = addSessionFactory(locator.createSessionFactory(server1tc)); @@ -561,7 +561,7 @@ public class BridgeTest extends ServiceTestBase server1.start(); server0.start(); - locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(server0tc, server1tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc)); ClientSessionFactory sf0 = locator.createSessionFactory(server0tc); ClientSessionFactory sf1 = locator.createSessionFactory(server1tc); @@ -708,7 +708,7 @@ public class BridgeTest extends ServiceTestBase server0.start(); - locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(server0tc, server1tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc)); ClientSessionFactory sf0 = locator.createSessionFactory(server0tc); ClientSession session0 = sf0.createSession(false, true, true); @@ -831,7 +831,7 @@ public class BridgeTest extends ServiceTestBase server0.start(); - locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(server0tc, server1tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc)); ClientSessionFactory sf0 = locator.createSessionFactory(server0tc); ClientSession session0 = sf0.createSession(false, true, true); @@ -1013,7 +1013,7 @@ public class BridgeTest extends ServiceTestBase server1.start(); server0.start(); - locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(server0tc, server1tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc)); ClientSessionFactory sf0 = locator.createSessionFactory(server0tc); ClientSessionFactory sf1 = locator.createSessionFactory(server1tc); @@ -1080,12 +1080,12 @@ public class BridgeTest extends ServiceTestBase public void testSawtoothLoad() throws Exception { Map server0Params = new HashMap(); - HornetQServer server0 = createClusteredServerWithParams(isNetty(), 0, true, server0Params); + ActiveMQServer server0 = createClusteredServerWithParams(isNetty(), 0, true, server0Params); server0.getConfiguration().setThreadPoolMaxSize(10); Map server1Params = new HashMap(); addTargetParameters(server1Params); - HornetQServer server1 = createClusteredServerWithParams(isNetty(), 1, true, server1Params); + ActiveMQServer server1 = createClusteredServerWithParams(isNetty(), 1, true, server1Params); server1.getConfiguration().setThreadPoolMaxSize(10); final String testAddress = "testAddress"; @@ -1152,7 +1152,7 @@ public class BridgeTest extends ServiceTestBase { try { - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(server1tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(server1tc)); ClientSessionFactory sf = createSessionFactory(locator); @@ -1203,7 +1203,7 @@ public class BridgeTest extends ServiceTestBase @Override public void run() { - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(server0tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(server0tc)); locator.setBlockOnDurableSend(false); locator.setBlockOnNonDurableSend(false); @@ -1316,8 +1316,8 @@ public class BridgeTest extends ServiceTestBase @Test public void testBridgeWithPaging() throws Exception { - HornetQServer server0 = null; - HornetQServer server1 = null; + ActiveMQServer server0 = null; + ActiveMQServer server1 = null; final int PAGE_MAX = 100 * 1024; @@ -1391,7 +1391,7 @@ public class BridgeTest extends ServiceTestBase server1.start(); server0.start(); - locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(server0tc, server1tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc)); ClientSessionFactory sf0 = locator.createSessionFactory(server0tc); ClientSessionFactory sf1 = locator.createSessionFactory(server1tc); @@ -1535,7 +1535,7 @@ public class BridgeTest extends ServiceTestBase // Stops a server after 100 messages received public static class StopInterceptor implements Interceptor { - static HornetQServer serverToStop; + static ActiveMQServer serverToStop; static Thread thread; @@ -1601,8 +1601,8 @@ public class BridgeTest extends ServiceTestBase @Test public void testBridgeWithLargeMessage() throws Exception { - HornetQServer server0 = null; - HornetQServer server1 = null; + ActiveMQServer server0 = null; + ActiveMQServer server1 = null; final int PAGE_MAX = 1024 * 1024; @@ -1665,7 +1665,7 @@ public class BridgeTest extends ServiceTestBase server1.start(); server0.start(); - locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(server0tc, server1tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc)); ClientSessionFactory sf0 = locator.createSessionFactory(server0tc); ClientSessionFactory sf1 = locator.createSessionFactory(server1tc); @@ -1815,7 +1815,7 @@ public class BridgeTest extends ServiceTestBase server1.start(); server0.start(); - locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(server0tc, server1tc)); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc)); ClientSessionFactory sf0 = locator.createSessionFactory(server0tc); ClientSessionFactory sf1 = locator.createSessionFactory(server1tc); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeTestBase.java index 516c1ed073..513b4041f7 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeTestBase.java @@ -20,8 +20,8 @@ import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration; import org.apache.activemq.core.remoting.impl.invm.InVMConnector; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.tests.util.InVMNodeManagerServer; import org.apache.activemq.tests.util.UnitTestCase; @@ -46,20 +46,20 @@ public abstract class BridgeTestBase extends UnitTestCase super.tearDown(); } - protected HornetQServer createHornetQServer(final int id, final boolean netty, final Map params) throws Exception + protected ActiveMQServer createActiveMQServer(final int id, final boolean netty, final Map params) throws Exception { - return createHornetQServer(id, params, netty, null); + return createActiveMQServer(id, params, netty, null); } - protected HornetQServer createHornetQServer(final int id, final boolean netty, final Map params, NodeManager nodeManager) throws Exception + protected ActiveMQServer createActiveMQServer(final int id, final boolean netty, final Map params, NodeManager nodeManager) throws Exception { - return createHornetQServer(id, params, netty, nodeManager); + return createActiveMQServer(id, params, netty, nodeManager); } - protected HornetQServer createHornetQServer(final int id, - final Map params, - final boolean netty, - final NodeManager nodeManager) throws Exception + protected ActiveMQServer createActiveMQServer(final int id, + final Map params, + final boolean netty, + final NodeManager nodeManager) throws Exception { TransportConfiguration tc = new TransportConfiguration(); @@ -87,10 +87,10 @@ public abstract class BridgeTestBase extends UnitTestCase .addAcceptorConfiguration(tc) .setHAPolicyConfiguration(new SharedStoreMasterPolicyConfiguration()); - HornetQServer service; + ActiveMQServer service; if (nodeManager == null) { - service = HornetQServers.newHornetQServer(serviceConf, true); + service = ActiveMQServers.newActiveMQServer(serviceConf, true); } else { @@ -100,11 +100,11 @@ public abstract class BridgeTestBase extends UnitTestCase return addServer(service); } - protected HornetQServer createBackupHornetQServer(final int id, - final Map params, - final boolean netty, - final int liveId, - final NodeManager nodeManager) throws Exception + protected ActiveMQServer createBackupActiveMQServer(final int id, + final Map params, + final boolean netty, + final int liveId, + final NodeManager nodeManager) throws Exception { TransportConfiguration tc = new TransportConfiguration(); @@ -133,10 +133,10 @@ public abstract class BridgeTestBase extends UnitTestCase .addAcceptorConfiguration(tc) .setHAPolicyConfiguration(new SharedStoreSlavePolicyConfiguration()); - HornetQServer service; + ActiveMQServer service; if (nodeManager == null) { - service = HornetQServers.newHornetQServer(serviceConf, true); + service = ActiveMQServers.newActiveMQServer(serviceConf, true); } else { @@ -146,7 +146,7 @@ public abstract class BridgeTestBase extends UnitTestCase } - protected void waitForServerStart(HornetQServer server) throws Exception + protected void waitForServerStart(ActiveMQServer server) throws Exception { if (!server.waitForActivation(5000L, TimeUnit.MILLISECONDS)) throw new IllegalStateException("Timed out waiting for server starting = " + server); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java index 9963d4ed5e..3b56d7adfa 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java @@ -29,14 +29,14 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.BridgeConfiguration; import org.apache.activemq.core.config.CoreQueueConfiguration; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.cluster.Bridge; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; @@ -83,7 +83,7 @@ public class BridgeWithDiscoveryGroupStartTest extends ServiceTestBase public void testStartStop() throws Exception { Map server0Params = new HashMap(); - HornetQServer server0 = createClusteredServerWithParams(isNetty(), 0, true, server0Params); + ActiveMQServer server0 = createClusteredServerWithParams(isNetty(), 0, true, server0Params); Map server1Params = new HashMap(); if (isNetty()) @@ -94,7 +94,7 @@ public class BridgeWithDiscoveryGroupStartTest extends ServiceTestBase { server1Params.put(org.apache.activemq.core.remoting.impl.invm.TransportConstants.SERVER_ID_PROP_NAME, 1); } - HornetQServer server1 = createClusteredServerWithParams(isNetty(), 1, true, server1Params); + ActiveMQServer server1 = createClusteredServerWithParams(isNetty(), 1, true, server1Params); ServerLocator locator = null; try { @@ -170,7 +170,7 @@ public class BridgeWithDiscoveryGroupStartTest extends ServiceTestBase server1.start(); server0.start(); - locator = HornetQClient.createServerLocatorWithoutHA(server0tc, server1tc); + locator = ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc); ClientSessionFactory sf0 = locator.createSessionFactory(server0tc); ClientSessionFactory sf1 = locator.createSessionFactory(server1tc); 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 0ea4c1372b..cc7936abd5 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 @@ -40,7 +40,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ServerLocatorInternal; import org.apache.activemq.core.client.impl.Topology; @@ -59,12 +59,12 @@ import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.postoffice.QueueBinding; import org.apache.activemq.core.postoffice.impl.LocalQueueBinding; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.cluster.ClusterConnection; import org.apache.activemq.core.server.cluster.ClusterManager; -import org.apache.activemq.core.server.cluster.HornetQServerSideProtocolManagerFactory; +import org.apache.activemq.core.server.cluster.ActiveMQServerSideProtocolManagerFactory; import org.apache.activemq.core.server.cluster.RemoteQueueBinding; import org.apache.activemq.core.server.cluster.impl.ClusterConnectionImpl; import org.apache.activemq.core.server.cluster.qourum.SharedNothingBackupQuorum; @@ -120,7 +120,7 @@ public abstract class ClusterTestBase extends ServiceTestBase protected ConsumerHolder[] consumers; - protected HornetQServer[] servers; + protected ActiveMQServer[] servers; protected NodeManager[] nodeManagers; @@ -142,7 +142,7 @@ public abstract class ClusterTestBase extends ServiceTestBase consumers = new ConsumerHolder[ClusterTestBase.MAX_CONSUMERS]; - servers = new HornetQServer[ClusterTestBase.MAX_SERVERS]; + servers = new ActiveMQServer[ClusterTestBase.MAX_SERVERS]; timeStarts = new long[ClusterTestBase.MAX_SERVERS]; @@ -175,7 +175,7 @@ public abstract class ClusterTestBase extends ServiceTestBase logTopologyDiagram(); for (int i = 0; i < MAX_SERVERS; i++) { - addHornetQComponent(nodeManagers[i]); + addActiveMQComponent(nodeManagers[i]); } servers = null; @@ -275,7 +275,7 @@ public abstract class ClusterTestBase extends ServiceTestBase protected void waitForFailoverTopology(final int bNode, final int... nodes) throws Exception { - HornetQServer server = servers[bNode]; + ActiveMQServer server = servers[bNode]; log.debug("waiting for " + nodes + " on the topology for server = " + server); @@ -342,14 +342,14 @@ public abstract class ClusterTestBase extends ServiceTestBase private void logTopologyDiagram() { StringBuffer topologyDiagram = new StringBuffer(); - for (HornetQServer hornetQServer : servers) + for (ActiveMQServer activeMQServer : servers) { - if (hornetQServer != null) + if (activeMQServer != null) { - topologyDiagram.append("\n").append(hornetQServer.getIdentity()).append("\n"); - if (hornetQServer.isStarted()) + topologyDiagram.append("\n").append(activeMQServer.getIdentity()).append("\n"); + if (activeMQServer.isStarted()) { - Set ccs = hornetQServer.getClusterManager().getClusterConnections(); + Set ccs = activeMQServer.getClusterManager().getClusterConnections(); if (ccs.size() >= 1) { @@ -360,7 +360,7 @@ public abstract class ClusterTestBase extends ServiceTestBase String nodeId = member.getNodeId(); String liveServer = null; String backupServer = null; - for (HornetQServer server : servers) + for (ActiveMQServer server : servers) { if (server != null && server.getNodeID() != null && server.isActive() && server.getNodeID().toString().equals(nodeId)) { @@ -411,7 +411,7 @@ public abstract class ClusterTestBase extends ServiceTestBase protected void waitForMessages(final int node, final String address, final int count) throws Exception { - HornetQServer server = servers[node]; + ActiveMQServer server = servers[node]; if (server == null) { @@ -477,7 +477,7 @@ public abstract class ClusterTestBase extends ServiceTestBase " local " + local); - HornetQServer server = servers[node]; + ActiveMQServer server = servers[node]; if (server == null) { @@ -514,23 +514,23 @@ public abstract class ClusterTestBase extends ServiceTestBase try { - for (HornetQServer hornetQServer : servers) + for (ActiveMQServer activeMQServer : servers) { - if (hornetQServer != null) + if (activeMQServer != null) { - out.println(clusterDescription(hornetQServer)); - out.println(debugBindings(hornetQServer, hornetQServer.getConfiguration() + out.println(clusterDescription(activeMQServer)); + out.println(debugBindings(activeMQServer, activeMQServer.getConfiguration() .getManagementNotificationAddress() .toString())); } } - for (HornetQServer hornetQServer : servers) + for (ActiveMQServer activeMQServer : servers) { - out.println("Management bindings on " + hornetQServer); - if (hornetQServer != null) + out.println("Management bindings on " + activeMQServer); + if (activeMQServer != null) { - out.println(debugBindings(hornetQServer, hornetQServer.getConfiguration() + out.println(debugBindings(activeMQServer, activeMQServer.getConfiguration() .getManagementNotificationAddress() .toString())); } @@ -545,7 +545,7 @@ public abstract class ClusterTestBase extends ServiceTestBase throw new IllegalStateException("Didn't get the expected number of bindings, look at the logging for more information"); } - protected String debugBindings(final HornetQServer server, final String address) throws Exception + protected String debugBindings(final ActiveMQServer server, final String address) throws Exception { StringWriter str = new StringWriter(); @@ -1107,11 +1107,11 @@ public abstract class ClusterTestBase extends ServiceTestBase } } - protected String clusterDescription(HornetQServer server) + protected String clusterDescription(ActiveMQServer server) { String br = "-------------------------\n"; String out = br; - out += "HornetQ server " + server + "\n"; + out += "ActiveMQ server " + server + "\n"; ClusterManager clusterManager = server.getClusterManager(); if (clusterManager == null) { @@ -1550,14 +1550,14 @@ public abstract class ClusterTestBase extends ServiceTestBase if (ha) { - locators[node] = HornetQClient.createServerLocatorWithHA(serverTotc); + locators[node] = ActiveMQClient.createServerLocatorWithHA(serverTotc); } else { - locators[node] = HornetQClient.createServerLocatorWithoutHA(serverTotc); + locators[node] = ActiveMQClient.createServerLocatorWithoutHA(serverTotc); } - locators[node].setProtocolManagerFactory(HornetQServerSideProtocolManagerFactory.getInstance()); + locators[node].setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance()); locators[node].setBlockOnNonDurableSend(true); locators[node].setBlockOnDurableSend(true); @@ -1589,7 +1589,7 @@ public abstract class ClusterTestBase extends ServiceTestBase serverTotc = new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY, params); } - locators[node] = HornetQClient.createServerLocatorWithoutHA(serverTotc); + locators[node] = ActiveMQClient.createServerLocatorWithoutHA(serverTotc); locators[node].setBlockOnNonDurableSend(true); locators[node].setBlockOnDurableSend(true); locators[node].setReconnectAttempts(reconnectAttempts); @@ -1610,7 +1610,7 @@ public abstract class ClusterTestBase extends ServiceTestBase TransportConfiguration serverToTC = createTransportConfiguration(netty, false, params); - locators[node] = addServerLocator(HornetQClient.createServerLocatorWithHA(serverToTC)); + locators[node] = addServerLocator(ActiveMQClient.createServerLocatorWithHA(serverToTC)); locators[node].setRetryInterval(100); locators[node].setRetryIntervalMultiplier(1d); locators[node].setReconnectAttempts(-1); @@ -1628,7 +1628,7 @@ public abstract class ClusterTestBase extends ServiceTestBase this.setupSessionFactory(node, backupNode, netty, true); } - protected HornetQServer getServer(final int node) + protected ActiveMQServer getServer(final int node) { if (servers[node] == null) { @@ -1679,7 +1679,7 @@ public abstract class ClusterTestBase extends ServiceTestBase .addAcceptorConfiguration(createTransportConfiguration(netty, true, generateParams(node, netty))) .setHAPolicyConfiguration(haPolicyConfiguration); - HornetQServer server; + ActiveMQServer server; if (fileStorage) { @@ -1745,7 +1745,7 @@ public abstract class ClusterTestBase extends ServiceTestBase .addConnectorConfiguration(backupConfig.getName(), backupConfig) .setHAPolicyConfiguration(sharedStorage ? new SharedStoreSlavePolicyConfiguration() : new ReplicaPolicyConfiguration()); - HornetQServer server; + ActiveMQServer server; if (sharedStorage) { @@ -1754,7 +1754,7 @@ public abstract class ClusterTestBase extends ServiceTestBase else { boolean enablePersistency = fileStorage ? true : configuration.isPersistenceEnabled(); - server = addServer(HornetQServers.newHornetQServer(configuration, enablePersistency)); + server = addServer(ActiveMQServers.newActiveMQServer(configuration, enablePersistency)); } server.setIdentity(this.getClass().getSimpleName() + "/Backup(" + node + " of live " + liveNode + ")"); servers[node] = server; @@ -1802,7 +1802,7 @@ public abstract class ClusterTestBase extends ServiceTestBase .addDiscoveryGroupConfiguration(dcConfig.getName(), dcConfig) .setHAPolicyConfiguration(sharedStorage ? new SharedStoreMasterPolicyConfiguration() : new ReplicatedPolicyConfiguration()); - HornetQServer server; + ActiveMQServer server; if (fileStorage) { if (sharedStorage) @@ -1811,7 +1811,7 @@ public abstract class ClusterTestBase extends ServiceTestBase } else { - server = addServer(HornetQServers.newHornetQServer(configuration)); + server = addServer(ActiveMQServers.newActiveMQServer(configuration)); server.setIdentity("Server " + node); } } @@ -1823,7 +1823,7 @@ public abstract class ClusterTestBase extends ServiceTestBase } else { - server = addServer(HornetQServers.newHornetQServer(configuration, false)); + server = addServer(ActiveMQServers.newActiveMQServer(configuration, false)); server.setIdentity("Server " + node); } } @@ -1872,7 +1872,7 @@ public abstract class ClusterTestBase extends ServiceTestBase .addDiscoveryGroupConfiguration(dcConfig.getName(), dcConfig) .setHAPolicyConfiguration(sharedStorage ? new SharedStoreSlavePolicyConfiguration() : new ReplicatedPolicyConfiguration()); - HornetQServer server; + ActiveMQServer server; if (sharedStorage) { server = createInVMFailoverServer(fileStorage, configuration, nodeManagers[liveNode], liveNode); @@ -1880,7 +1880,7 @@ public abstract class ClusterTestBase extends ServiceTestBase else { boolean enablePersistency = fileStorage ? configuration.isPersistenceEnabled() : false; - server = addServer(HornetQServers.newHornetQServer(configuration, enablePersistency)); + server = addServer(ActiveMQServers.newActiveMQServer(configuration, enablePersistency)); } servers[node] = server; } @@ -1915,7 +1915,7 @@ public abstract class ClusterTestBase extends ServiceTestBase final boolean netty, final boolean allowDirectConnectionsOnly) { - HornetQServer serverFrom = servers[nodeFrom]; + ActiveMQServer serverFrom = servers[nodeFrom]; if (serverFrom == null) { @@ -1961,7 +1961,7 @@ public abstract class ClusterTestBase extends ServiceTestBase final boolean netty, final boolean allowDirectConnectionsOnly) { - HornetQServer serverFrom = servers[nodeFrom]; + ActiveMQServer serverFrom = servers[nodeFrom]; if (serverFrom == null) { @@ -2005,7 +2005,7 @@ public abstract class ClusterTestBase extends ServiceTestBase final int nodeFrom, final int... nodesTo) { - HornetQServer serverFrom = servers[nodeFrom]; + ActiveMQServer serverFrom = servers[nodeFrom]; if (serverFrom == null) { @@ -2042,7 +2042,7 @@ public abstract class ClusterTestBase extends ServiceTestBase final int nodeFrom, final int... nodesTo) { - HornetQServer serverFrom = servers[nodeFrom]; + ActiveMQServer serverFrom = servers[nodeFrom]; if (serverFrom == null) { @@ -2100,7 +2100,7 @@ public abstract class ClusterTestBase extends ServiceTestBase final int nodeFrom, final int[] nodesTo) { - HornetQServer serverFrom = servers[nodeFrom]; + ActiveMQServer serverFrom = servers[nodeFrom]; if (serverFrom == null) { @@ -2140,7 +2140,7 @@ public abstract class ClusterTestBase extends ServiceTestBase final int maxHops, final boolean netty) { - HornetQServer server = servers[node]; + ActiveMQServer server = servers[node]; if (server == null) { @@ -2167,7 +2167,7 @@ public abstract class ClusterTestBase extends ServiceTestBase /** * XXX waitForPrevious actually masks what can be considered a bug: that even controlling for - * {@link HornetQServer#waitForInitialization} we still need to wait between starting a shared + * {@link org.apache.activemq.core.server.ActiveMQServer#waitForInitialization} we still need to wait between starting a shared * store backup and its live. */ protected void startServers(final int... nodes) throws Exception diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/OnewayTwoNodeClusterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/OnewayTwoNodeClusterTest.java index f7e7488579..e464fde012 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/OnewayTwoNodeClusterTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/OnewayTwoNodeClusterTest.java @@ -11,7 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.cluster.distribution; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.junit.Before; import org.junit.Test; @@ -49,7 +49,7 @@ public class OnewayTwoNodeClusterTest extends ClusterTestBase private void setupCluster(boolean forward) { - for (HornetQServer server : servers) + for (ActiveMQServer server : servers) { if (server != null) { 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 eef65d0e68..435e74c23d 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 @@ -24,7 +24,7 @@ import java.util.Set; 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; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.Topology; import org.apache.activemq.core.client.impl.TopologyMemberImpl; @@ -36,8 +36,8 @@ import org.apache.activemq.core.config.ha.ReplicaPolicyConfiguration; import org.apache.activemq.core.config.ha.ReplicatedPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Test; import org.junit.runner.RunWith; @@ -65,14 +65,14 @@ public class AutomaticColocatedQuorumVoteTest extends ServiceTestBase @Test public void testSimpleDistributionBackupStrategyFull() throws Exception { - HornetQServer server0 = createServer(0, 1, false); - HornetQServer server1 = createServer(1, 0, false); + ActiveMQServer server0 = createServer(0, 1, false); + ActiveMQServer server1 = createServer(1, 0, false); TransportConfiguration liveConnector0 = getConnectorTransportConfiguration("liveConnector" + 0, 0); TransportConfiguration liveConnector1 = getConnectorTransportConfiguration("liveConnector" + 1, 1); try ( - ServerLocator serverLocator = HornetQClient.createServerLocatorWithoutHA(liveConnector0) + ServerLocator serverLocator = ActiveMQClient.createServerLocatorWithoutHA(liveConnector0) ) { server0.start(); @@ -84,12 +84,12 @@ public class AutomaticColocatedQuorumVoteTest extends ServiceTestBase Topology topology = serverLocator.getTopology(); Collection members = topology.getMembers(); assertEquals(members.size(), 2); - Map backupServers0 = server0.getClusterManager().getHAManager().getBackupServers(); + Map backupServers0 = server0.getClusterManager().getHAManager().getBackupServers(); assertEquals(backupServers0.size(), 1); - Map backupServers1 = server1.getClusterManager().getHAManager().getBackupServers(); + Map backupServers1 = server1.getClusterManager().getHAManager().getBackupServers(); assertEquals(backupServers1.size(), 1); - HornetQServer backupServer0 = backupServers0.values().iterator().next(); - HornetQServer backupServer1 = backupServers1.values().iterator().next(); + ActiveMQServer backupServer0 = backupServers0.values().iterator().next(); + ActiveMQServer backupServer1 = backupServers1.values().iterator().next(); waitForRemoteBackupSynchronization(backupServer0); waitForRemoteBackupSynchronization(backupServer1); assertEquals(server0.getNodeID(), backupServer1.getNodeID()); @@ -148,14 +148,14 @@ public class AutomaticColocatedQuorumVoteTest extends ServiceTestBase @Test public void testSimpleDistributionBackupStrategyScaleDown() throws Exception { - HornetQServer server0 = createServer(0, 1, true); - HornetQServer server1 = createServer(1, 0, true); + ActiveMQServer server0 = createServer(0, 1, true); + ActiveMQServer server1 = createServer(1, 0, true); TransportConfiguration liveConnector0 = getConnectorTransportConfiguration("liveConnector" + 0, 0); TransportConfiguration liveConnector1 = getConnectorTransportConfiguration("liveConnector" + 1, 1); try ( - ServerLocator serverLocator = HornetQClient.createServerLocatorWithoutHA(liveConnector0) + ServerLocator serverLocator = ActiveMQClient.createServerLocatorWithoutHA(liveConnector0) ) { server0.start(); @@ -167,12 +167,12 @@ public class AutomaticColocatedQuorumVoteTest extends ServiceTestBase Topology topology = serverLocator.getTopology(); Collection members = topology.getMembers(); assertEquals(members.size(), 2); - Map backupServers0 = server0.getClusterManager().getHAManager().getBackupServers(); + Map backupServers0 = server0.getClusterManager().getHAManager().getBackupServers(); assertEquals(backupServers0.size(), 1); - Map backupServers1 = server1.getClusterManager().getHAManager().getBackupServers(); + Map backupServers1 = server1.getClusterManager().getHAManager().getBackupServers(); assertEquals(backupServers1.size(), 1); - HornetQServer backupServer0 = backupServers0.values().iterator().next(); - HornetQServer backupServer1 = backupServers1.values().iterator().next(); + ActiveMQServer backupServer0 = backupServers0.values().iterator().next(); + ActiveMQServer backupServer1 = backupServers1.values().iterator().next(); waitForRemoteBackupSynchronization(backupServer0); waitForRemoteBackupSynchronization(backupServer1); assertEquals(server0.getNodeID(), backupServer1.getNodeID()); @@ -229,10 +229,10 @@ public class AutomaticColocatedQuorumVoteTest extends ServiceTestBase @Test public void testSimpleDistributionOfBackupsMaxBackupsExceeded() throws Exception { - HornetQServer server0 = createServer(0, 1, false); - HornetQServer server1 = createServer(1, 0, false); - HornetQServer server2 = createServer(2, 0, false); - HornetQServer server3 = createServer(3, 0, false); + ActiveMQServer server0 = createServer(0, 1, false); + ActiveMQServer server1 = createServer(1, 0, false); + ActiveMQServer server2 = createServer(2, 0, false); + ActiveMQServer server3 = createServer(3, 0, false); TransportConfiguration liveConnector0 = getConnectorTransportConfiguration("liveConnector" + 0, 0); TransportConfiguration liveConnector1 = getConnectorTransportConfiguration("liveConnector" + 1, 1); TransportConfiguration liveConnector2 = getConnectorTransportConfiguration("liveConnector" + 2, 2); @@ -241,7 +241,7 @@ public class AutomaticColocatedQuorumVoteTest extends ServiceTestBase try ( - ServerLocator serverLocator = HornetQClient.createServerLocatorWithoutHA(liveConnector0) + ServerLocator serverLocator = ActiveMQClient.createServerLocatorWithoutHA(liveConnector0) ) { server0.start(); @@ -253,12 +253,12 @@ public class AutomaticColocatedQuorumVoteTest extends ServiceTestBase Topology topology = serverLocator.getTopology(); Collection members = topology.getMembers(); assertEquals(members.size(), 2); - Map backupServers0 = server0.getClusterManager().getHAManager().getBackupServers(); + Map backupServers0 = server0.getClusterManager().getHAManager().getBackupServers(); assertEquals(backupServers0.size(), 1); - Map backupServers1 = server1.getClusterManager().getHAManager().getBackupServers(); + Map backupServers1 = server1.getClusterManager().getHAManager().getBackupServers(); assertEquals(backupServers1.size(), 1); - HornetQServer backupServer0 = backupServers0.values().iterator().next(); - HornetQServer backupServer1 = backupServers1.values().iterator().next(); + ActiveMQServer backupServer0 = backupServers0.values().iterator().next(); + ActiveMQServer backupServer1 = backupServers1.values().iterator().next(); waitForRemoteBackupSynchronization(backupServer0); waitForRemoteBackupSynchronization(backupServer1); assertEquals(server0.getNodeID(), backupServer1.getNodeID()); @@ -271,12 +271,12 @@ public class AutomaticColocatedQuorumVoteTest extends ServiceTestBase waitForRemoteBackup(sessionFactory2, 10); waitForRemoteBackup(sessionFactory3, 10); assertEquals(members.size(), 2); - Map backupServers2 = server2.getClusterManager().getHAManager().getBackupServers(); + Map backupServers2 = server2.getClusterManager().getHAManager().getBackupServers(); assertEquals(backupServers2.size(), 1); - Map backupServers3 = server3.getClusterManager().getHAManager().getBackupServers(); + Map backupServers3 = server3.getClusterManager().getHAManager().getBackupServers(); assertEquals(backupServers3.size(), 1); - HornetQServer backupServer2 = backupServers2.values().iterator().next(); - HornetQServer backupServer3 = backupServers3.values().iterator().next(); + ActiveMQServer backupServer2 = backupServers2.values().iterator().next(); + ActiveMQServer backupServer3 = backupServers3.values().iterator().next(); waitForRemoteBackupSynchronization(backupServer2); waitForRemoteBackupSynchronization(backupServer3); assertEquals(server0.getNodeID(), backupServer1.getNodeID()); @@ -293,13 +293,13 @@ public class AutomaticColocatedQuorumVoteTest extends ServiceTestBase } } - private HornetQServer createServer(int node, int remoteNode, boolean scaleDown) throws Exception + private ActiveMQServer createServer(int node, int remoteNode, boolean scaleDown) throws Exception { TransportConfiguration liveConnector = getConnectorTransportConfiguration("liveConnector" + node, node); TransportConfiguration remoteConnector = getConnectorTransportConfiguration("remoteConnector" + node, remoteNode); TransportConfiguration liveAcceptor = getAcceptorTransportConfiguration(node); Configuration liveConfiguration = getConfiguration("server" + node, scaleDown, liveConnector, liveAcceptor, remoteConnector); - HornetQServer server = new HornetQServerImpl(liveConfiguration); + ActiveMQServer server = new ActiveMQServerImpl(liveConfiguration); server.setIdentity("server" + node); return server; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupSyncPagingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupSyncPagingTest.java index 7ec394a879..5b3353a0d5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupSyncPagingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupSyncPagingTest.java @@ -19,7 +19,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; @@ -36,7 +36,7 @@ public class BackupSyncPagingTest extends BackupSyncJournalTest } @Override - protected HornetQServer createInVMFailoverServer(final boolean realFiles, final Configuration configuration, + protected ActiveMQServer createInVMFailoverServer(final boolean realFiles, final Configuration configuration, final NodeManager nodeManager, int id) { Map conf = new HashMap(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java index eb23073d20..9c24e1c69c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java @@ -15,10 +15,10 @@ package org.apache.activemq.tests.integration.cluster.failover; import java.util.HashSet; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.integration.cluster.distribution.ClusterTestBase; -import org.apache.activemq.tests.integration.cluster.util.SameProcessHornetQServer; +import org.apache.activemq.tests.integration.cluster.util.SameProcessActiveMQServer; import org.apache.activemq.tests.integration.cluster.util.TestableServer; import org.junit.Before; import org.junit.Test; @@ -290,9 +290,9 @@ public abstract class ClusterWithBackupFailoverTestBase extends ClusterTestBase { ClusterWithBackupFailoverTestBase.log.info("*** failing node " + node); - HornetQServer server = getServer(node); + ActiveMQServer server = getServer(node); - TestableServer tstServer = new SameProcessHornetQServer(server); + TestableServer tstServer = new SameProcessActiveMQServer(server); ClientSession[] sessionsArray = exploreSessions(originalLiveNode); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailBackAutoTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailBackAutoTest.java index b6394c5835..3368438e5b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailBackAutoTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailBackAutoTest.java @@ -29,7 +29,7 @@ import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration; import org.apache.activemq.core.server.cluster.ha.SharedStoreSlavePolicy; import org.apache.activemq.core.server.impl.InVMNodeManager; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.CountDownSessionFailureListener; import org.apache.activemq.tests.util.TransportConfigurationUtils; @@ -314,7 +314,7 @@ public class FailBackAutoTest extends FailoverTestBase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailBackManualTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailBackManualTest.java index 4ca4806092..714f6588e4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailBackManualTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailBackManualTest.java @@ -26,7 +26,7 @@ import org.apache.activemq.core.client.impl.ServerLocatorInternal; import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration; import org.apache.activemq.core.server.impl.InVMNodeManager; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.cluster.util.TestableServer; import org.apache.activemq.tests.util.CountDownSessionFailureListener; import org.apache.activemq.tests.util.TransportConfigurationUtils; @@ -166,7 +166,7 @@ public class FailBackManualTest extends FailoverTestBase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverListenerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverListenerTest.java index c74905af99..c167080b33 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverListenerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverListenerTest.java @@ -29,7 +29,7 @@ import org.apache.activemq.core.client.impl.ServerLocatorInternal; import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration; import org.apache.activemq.core.server.impl.InVMNodeManager; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.TransportConfigurationUtils; import org.junit.Assert; @@ -246,7 +246,7 @@ public class FailoverListenerTest extends FailoverTestBase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverTest.java index ecf982bf03..ee1d496af6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverTest.java @@ -49,7 +49,7 @@ import org.apache.activemq.core.server.cluster.ha.SharedStoreMasterPolicy; import org.apache.activemq.core.server.cluster.ha.SharedStoreSlavePolicy; import org.apache.activemq.core.server.impl.InVMNodeManager; import org.apache.activemq.core.transaction.impl.XidImpl; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.integration.cluster.util.TestableServer; import org.apache.activemq.tests.util.CountDownSessionFailureListener; @@ -2384,7 +2384,7 @@ public class FailoverTest extends FailoverTestBase for (int i = 0; i < NUM_MESSAGES; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverTestBase.java index ee0e37b53f..06ab13a26c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverTestBase.java @@ -25,7 +25,7 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClusterTopologyListener; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.client.TopologyMember; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; @@ -39,9 +39,9 @@ import org.apache.activemq.core.remoting.impl.invm.InVMConnector; import org.apache.activemq.core.remoting.impl.invm.InVMRegistry; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.cluster.ha.ReplicatedPolicy; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.InVMNodeManager; -import org.apache.activemq.tests.integration.cluster.util.SameProcessHornetQServer; +import org.apache.activemq.tests.integration.cluster.util.SameProcessActiveMQServer; import org.apache.activemq.tests.integration.cluster.util.TestableServer; import org.apache.activemq.tests.util.ReplicatedBackupUtils; import org.apache.activemq.tests.util.ServiceTestBase; @@ -126,12 +126,12 @@ public abstract class FailoverTestBase extends ServiceTestBase { boolean isBackup = config.getHAPolicyConfiguration() instanceof ReplicaPolicyConfiguration || config.getHAPolicyConfiguration() instanceof SharedStoreSlavePolicyConfiguration; - return new SameProcessHornetQServer(createInVMFailoverServer(true, config, nodeManager, isBackup ? 2 : 1)); + return new SameProcessActiveMQServer(createInVMFailoverServer(true, config, nodeManager, isBackup ? 2 : 1)); } protected TestableServer createColocatedTestableServer(Configuration config, NodeManager liveNodeManager,NodeManager backupNodeManager, int id) { - return new SameProcessHornetQServer(createColocatedInVMFailoverServer(true, config, liveNodeManager, backupNodeManager, id)); + return new SameProcessActiveMQServer(createColocatedInVMFailoverServer(true, config, liveNodeManager, backupNodeManager, id)); } /** @@ -312,7 +312,7 @@ public abstract class FailoverTestBase extends ServiceTestBase */ protected void waitForBackup(ClientSessionFactoryInternal sessionFactory, int seconds) throws Exception { - final HornetQServerImpl actualServer = (HornetQServerImpl) backupServer.getServer(); + final ActiveMQServerImpl actualServer = (ActiveMQServerImpl) backupServer.getServer(); if (actualServer.getHAPolicy().isSharedStore()) { waitForServer(actualServer); @@ -329,7 +329,7 @@ public abstract class FailoverTestBase extends ServiceTestBase protected ServerLocatorInternal getServerLocator() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithHA(getConnectorTransportConfiguration(true), getConnectorTransportConfiguration(false)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithHA(getConnectorTransportConfiguration(true), getConnectorTransportConfiguration(false)); locator.setRetryInterval(50); addServerLocator(locator); return (ServerLocatorInternal) locator; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/LiveToLiveFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/LiveToLiveFailoverTest.java index 609ee369d2..47315e7e5a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/LiveToLiveFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/LiveToLiveFailoverTest.java @@ -22,7 +22,7 @@ import org.apache.activemq.core.config.ScaleDownConfiguration; import org.apache.activemq.core.config.ha.ColocatedPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.impl.InVMNodeManager; import org.apache.activemq.tests.util.TransportConfigurationUtils; import org.junit.Assert; @@ -100,8 +100,8 @@ public class LiveToLiveFailoverTest extends FailoverTest @Override protected void waitForBackup() { - Map backupServers0 = liveServer.getServer().getClusterManager().getHAManager().getBackupServers(); - Map backupServers1 = backupServer.getServer().getClusterManager().getHAManager().getBackupServers(); + Map backupServers0 = liveServer.getServer().getClusterManager().getHAManager().getBackupServers(); + Map backupServers1 = backupServer.getServer().getClusterManager().getHAManager().getBackupServers(); final long toWait = 10000; final long time = System.currentTimeMillis(); while (true) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java index a096ebf31b..ae37a5b378 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java @@ -25,8 +25,8 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.client.impl.ServerLocatorImpl; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.integration.cluster.failover.FailoverTestBase.LatchClusterTopologyListener; import org.apache.activemq.tests.integration.cluster.util.TestableServer; @@ -109,7 +109,7 @@ public abstract class MultipleBackupsFailoverTestBase extends ServiceTestBase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -151,7 +151,7 @@ public abstract class MultipleBackupsFailoverTestBase extends ServiceTestBase protected ClientSessionFactoryInternal createSessionFactoryAndWaitForTopology(ServerLocator locator, int topologyMembers, - HornetQServer server) throws Exception + ActiveMQServer server) throws Exception { ClientSessionFactoryInternal sf; CountDownLatch countDownLatch = new CountDownLatch(topologyMembers); 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 20e114de09..24207421fe 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 @@ -30,7 +30,7 @@ import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.impl.InVMNodeManager; -import org.apache.activemq.tests.integration.cluster.util.SameProcessHornetQServer; +import org.apache.activemq.tests.integration.cluster.util.SameProcessActiveMQServer; import org.apache.activemq.tests.integration.cluster.util.TestableServer; import org.junit.After; import org.junit.Test; @@ -183,7 +183,7 @@ public class MultipleLivesMultipleBackupsFailoverTest extends MultipleBackupsFai } config1.addClusterConfiguration(basicClusterConnectionConfig(backupConnector.getName(), clusterNodes)); - servers.put(nodeid, new SameProcessHornetQServer(createInVMFailoverServer(true, config1, nodeManager, liveNode))); + servers.put(nodeid, new SameProcessActiveMQServer(createInVMFailoverServer(true, config1, nodeManager, liveNode))); } protected void createLiveConfig(NodeManager nodeManager, int liveNode, int... otherLiveNodes) throws Exception @@ -210,7 +210,7 @@ public class MultipleLivesMultipleBackupsFailoverTest extends MultipleBackupsFai } config0.addClusterConfiguration(basicClusterConnectionConfig(liveConnector.getName(), pairs)); - servers.put(liveNode, new SameProcessHornetQServer(createInVMFailoverServer(true, config0, nodeManager, liveNode))); + servers.put(liveNode, new SameProcessActiveMQServer(createInVMFailoverServer(true, config0, nodeManager, liveNode))); } @Override diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java index 12933b2c1c..19fbd2148e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java @@ -20,7 +20,7 @@ import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ServerLocatorInternal; import org.apache.activemq.core.config.Configuration; @@ -29,11 +29,11 @@ import org.apache.activemq.core.config.ha.ReplicaPolicyConfiguration; import org.apache.activemq.core.config.ha.ReplicatedPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.Queue; -import org.apache.activemq.tests.integration.cluster.util.SameProcessHornetQServer; +import org.apache.activemq.tests.integration.cluster.util.SameProcessActiveMQServer; import org.apache.activemq.tests.integration.cluster.util.TestableServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.TransportConfigurationUtils; @@ -132,10 +132,10 @@ public abstract class MultipleServerFailoverTestBase extends ServiceTestBase configuration.addClusterConfiguration(basicClusterConnectionConfig(livetc.getName(), connectors)); liveConfigs.add(configuration); - HornetQServer server = createServer(true, configuration); - TestableServer hornetQServer = new SameProcessHornetQServer(server); - hornetQServer.setIdentity("Live-" + i); - liveServers.add(hornetQServer); + ActiveMQServer server = createServer(true, configuration); + TestableServer activeMQServer = new SameProcessActiveMQServer(server); + activeMQServer.setIdentity("Live-" + i); + liveServers.add(activeMQServer); } for (int i = 0; i < getBackupServerCount(); i++) { @@ -193,8 +193,8 @@ public abstract class MultipleServerFailoverTestBase extends ServiceTestBase } configuration.addClusterConfiguration(basicClusterConnectionConfig(backuptc.getName(), connectors)); backupConfigs.add(configuration); - HornetQServer server = createServer(true, configuration); - TestableServer testableServer = new SameProcessHornetQServer(server); + ActiveMQServer server = createServer(true, configuration); + TestableServer testableServer = new SameProcessActiveMQServer(server); testableServer.setIdentity("Backup-" + i); backupServers.add(testableServer); } @@ -267,7 +267,7 @@ public abstract class MultipleServerFailoverTestBase extends ServiceTestBase protected ServerLocatorInternal getServerLocator(int node) throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithHA(getConnectorTransportConfiguration(true, node)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithHA(getConnectorTransportConfiguration(true, node)); locator.setRetryInterval(50); locator.setReconnectAttempts(-1); locator.setInitialConnectAttempts(-1); @@ -277,7 +277,7 @@ public abstract class MultipleServerFailoverTestBase extends ServiceTestBase protected ServerLocatorInternal getBackupServerLocator(int node) throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithHA(getConnectorTransportConfiguration(false, node)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithHA(getConnectorTransportConfiguration(false, node)); locator.setRetryInterval(50); locator.setReconnectAttempts(-1); locator.setInitialConnectAttempts(-1); @@ -311,9 +311,9 @@ public abstract class MultipleServerFailoverTestBase extends ServiceTestBase return addClientSession(sf.createSession(xa, autoCommitSends, autoCommitAcks)); } - protected void waitForDistribution(SimpleString address, HornetQServer server, int messageCount) throws Exception + protected void waitForDistribution(SimpleString address, ActiveMQServer server, int messageCount) throws Exception { - HornetQServerLogger.LOGGER.debug("waiting for distribution of messages on server " + server); + ActiveMQServerLogger.LOGGER.debug("waiting for distribution of messages on server " + server); long start = System.currentTimeMillis(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/NettyFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/NettyFailoverTest.java index d77c6ee530..09db141147 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/NettyFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/NettyFailoverTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; @@ -56,7 +56,7 @@ public class NettyFailoverTest extends FailoverTest params.put(TransportConstants.HOST_PROP_NAME, "127.0.0.1"); TransportConfiguration tc = createTransportConfiguration(true, false, params); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithHA(tc)); locator.setBlockOnNonDurableSend(true); locator.setBlockOnDurableSend(true); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/NettyReplicatedFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/NettyReplicatedFailoverTest.java index f96c7f03bd..ad4fa88472 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/NettyReplicatedFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/NettyReplicatedFailoverTest.java @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.cluster.failover; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.tests.integration.cluster.util.SameProcessHornetQServer; +import org.apache.activemq.tests.integration.cluster.util.SameProcessActiveMQServer; import org.apache.activemq.tests.integration.cluster.util.TestableServer; /** @@ -29,7 +29,7 @@ public class NettyReplicatedFailoverTest extends NettyFailoverTest @Override protected TestableServer createTestableServer(Configuration config) { - return new SameProcessHornetQServer(createServer(true, config)); + return new SameProcessActiveMQServer(createServer(true, config)); } @Override diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/PagingFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/PagingFailoverTest.java index e4f9f11fa3..4136a38115 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/PagingFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/PagingFailoverTest.java @@ -23,10 +23,10 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.settings.impl.AddressSettings; -import org.apache.activemq.tests.integration.cluster.util.SameProcessHornetQServer; +import org.apache.activemq.tests.integration.cluster.util.SameProcessActiveMQServer; import org.apache.activemq.tests.integration.cluster.util.TestableServer; import org.apache.activemq.tests.util.TransportConfigurationUtils; import org.junit.After; @@ -248,7 +248,7 @@ public class PagingFailoverTest extends FailoverTestBase } @Override - protected HornetQServer createServer(final boolean realFiles, final Configuration configuration) + protected ActiveMQServer createServer(final boolean realFiles, final Configuration configuration) { return addServer(createInVMFailoverServer(true, configuration, PAGE_SIZE, PAGE_MAX, new HashMap(), nodeManager, 2)); @@ -257,6 +257,6 @@ public class PagingFailoverTest extends FailoverTestBase @Override protected TestableServer createTestableServer(Configuration config) { - return new SameProcessHornetQServer(createServer(true, config)); + return new SameProcessActiveMQServer(createServer(true, config)); } } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ReplicatedPagedFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ReplicatedPagedFailoverTest.java index fa66488e32..1411d4235e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ReplicatedPagedFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ReplicatedPagedFailoverTest.java @@ -17,14 +17,14 @@ import org.junit.Test; import java.util.HashMap; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.settings.impl.AddressSettings; public class ReplicatedPagedFailoverTest extends ReplicatedFailoverTest { @Override - protected HornetQServer createInVMFailoverServer(final boolean realFiles, final Configuration configuration, + protected ActiveMQServer createInVMFailoverServer(final boolean realFiles, final Configuration configuration, final NodeManager nodeManager, int id) { return createInVMFailoverServer(realFiles, configuration, PAGE_SIZE, PAGE_MAX, diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/SecurityFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/SecurityFailoverTest.java index 80e13c9d1b..cca61947f4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/SecurityFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/SecurityFailoverTest.java @@ -22,7 +22,7 @@ import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration; import org.apache.activemq.core.security.Role; import org.apache.activemq.core.server.impl.InVMNodeManager; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; import org.apache.activemq.tests.integration.cluster.util.TestableServer; /** @@ -108,7 +108,7 @@ public class SecurityFailoverTest extends FailoverTest .addClusterConfiguration(basicClusterConnectionConfig(backupConnector.getName(), liveConnector.getName())); backupServer = createTestableServer(backupConfig); - HornetQSecurityManager securityManager = installSecurity(backupServer); + ActiveMQSecurityManager securityManager = installSecurity(backupServer); securityManager.setDefaultUser(null); liveConfig = super.createDefaultConfig() @@ -133,9 +133,9 @@ public class SecurityFailoverTest extends FailoverTest /** * @return */ - protected HornetQSecurityManager installSecurity(TestableServer server) + protected ActiveMQSecurityManager installSecurity(TestableServer server) { - HornetQSecurityManager securityManager = server.getServer().getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getServer().getSecurityManager(); securityManager.addUser("a", "b"); Role role = new Role("arole", true, true, true, true, true, true, true); Set roles = new HashSet(); 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 c67bc4fe2b..494c8d182a 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 @@ -30,7 +30,7 @@ import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.impl.InVMNodeManager; import org.apache.activemq.tests.integration.IntegrationTestLogger; -import org.apache.activemq.tests.integration.cluster.util.SameProcessHornetQServer; +import org.apache.activemq.tests.integration.cluster.util.SameProcessActiveMQServer; import org.apache.activemq.tests.integration.cluster.util.TestableServer; import org.junit.After; import org.junit.Test; @@ -153,7 +153,7 @@ public class SingleLiveMultipleBackupsFailoverTest extends MultipleBackupsFailov } config1.addClusterConfiguration(basicClusterConnectionConfig(backupConnector.getName(), staticConnectors)); - servers.put(nodeid, new SameProcessHornetQServer(createInVMFailoverServer(true, config1, nodeManager, nodeid))); + servers.put(nodeid, new SameProcessActiveMQServer(createInVMFailoverServer(true, config1, nodeManager, nodeid))); } protected void createLiveConfig(int liveNode) throws Exception @@ -172,7 +172,7 @@ public class SingleLiveMultipleBackupsFailoverTest extends MultipleBackupsFailov .setPagingDirectory(ActiveMQDefaultConfiguration.getDefaultPagingDir() + "_" + liveNode) .setLargeMessagesDirectory(ActiveMQDefaultConfiguration.getDefaultLargeMessagesDir() + "_" + liveNode); - servers.put(liveNode, new SameProcessHornetQServer(createInVMFailoverServer(true, config0, nodeManager, liveNode))); + servers.put(liveNode, new SameProcessActiveMQServer(createInVMFailoverServer(true, config0, nodeManager, liveNode))); } @Override diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/remote/FailoverWithSharedStoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/remote/FailoverWithSharedStoreTest.java index 2cf415794b..21951c3aa3 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/remote/FailoverWithSharedStoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/remote/FailoverWithSharedStoreTest.java @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.cluster.failover.remote; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; import org.apache.activemq.tests.integration.cluster.distribution.ClusterTestBase; @@ -32,7 +32,7 @@ public class FailoverWithSharedStoreTest extends ClusterTestBase @Test public void testNoConnection() throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); + ServerLocator locator = ActiveMQClient.createServerLocatorWithHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); try { createSessionFactory(locator); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/ha/HAAutomaticBackupSharedStore.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/ha/HAAutomaticBackupSharedStore.java index a8f731fd4d..3529d8ce9c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/ha/HAAutomaticBackupSharedStore.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/ha/HAAutomaticBackupSharedStore.java @@ -16,7 +16,7 @@ import org.apache.activemq.core.config.HAPolicyConfiguration; import org.apache.activemq.core.config.ha.ColocatedPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.integration.cluster.distribution.ClusterTestBase; import org.junit.Before; import org.junit.Test; @@ -64,7 +64,7 @@ public class HAAutomaticBackupSharedStore extends ClusterTestBase private void setUpHAPolicy(int node) { - HornetQServer server = getServer(node); + ActiveMQServer server = getServer(node); ColocatedPolicyConfiguration haPolicyConfiguration = new ColocatedPolicyConfiguration(); HAPolicyConfiguration liveConfiguration = new SharedStoreMasterPolicyConfiguration(); haPolicyConfiguration.setLiveConfig(liveConfiguration); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java index 40d3b8e653..6c5129a30a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java @@ -35,9 +35,9 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.remoting.impl.invm.InVMRegistry; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.jms.client.HornetQBytesMessage; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.jms.client.ActiveMQBytesMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.RandomUtil; @@ -64,7 +64,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt // Attributes ---------------------------------------------------- protected static final SimpleString ADDRESS = new SimpleString("FailoverTestAddress"); - protected HornetQServer liveServer; + protected ActiveMQServer liveServer; // Static -------------------------------------------------------- @@ -1088,7 +1088,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt ClientProducer producer = sess.createProducer(MultiThreadRandomReattachTestBase.ADDRESS); - ClientMessage message = sess.createMessage(HornetQTextMessage.TYPE, false, 0, System.currentTimeMillis(), (byte)1); + ClientMessage message = sess.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), (byte)1); producer.send(message); ClientMessage message2 = consumer.receive(MultiThreadRandomReattachTestBase.RECEIVE_TIMEOUT); @@ -1124,7 +1124,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt ClientProducer producer = sess.createProducer(MultiThreadRandomReattachTestBase.ADDRESS); - ClientMessage message = sess.createMessage(HornetQTextMessage.TYPE, false, 0, System.currentTimeMillis(), (byte)1); + ClientMessage message = sess.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), (byte)1); producer.send(message); ClientMessage message2 = consumer.receive(MultiThreadRandomReattachTestBase.RECEIVE_TIMEOUT); @@ -1203,7 +1203,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt ClientProducer producer = sess.createProducer(MultiThreadRandomReattachTestBase.ADDRESS); - ClientMessage message = sess.createMessage(HornetQTextMessage.TYPE, false, 0, System.currentTimeMillis(), (byte)1); + ClientMessage message = sess.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), (byte)1); producer.send(message); sess.start(); @@ -1334,7 +1334,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt { for (int i = 0; i < numMessages; i++) { - ClientMessage message = sessSend.createMessage(HornetQBytesMessage.TYPE, + ClientMessage message = sessSend.createMessage(ActiveMQBytesMessage.TYPE, false, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/OrderReattachTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/OrderReattachTest.java index feb733b8c8..15d1e50d4a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/OrderReattachTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/OrderReattachTest.java @@ -33,8 +33,8 @@ import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionInternal; import org.apache.activemq.core.protocol.core.impl.RemotingConnectionImpl; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; @@ -54,7 +54,7 @@ public class OrderReattachTest extends ServiceTestBase // Attributes ---------------------------------------------------- private final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; - private HornetQServer server; + private ActiveMQServer server; // Static -------------------------------------------------------- @@ -210,7 +210,7 @@ public class OrderReattachTest extends ServiceTestBase for (int i = 0; i < numMessages; i++) { - ClientMessage message = sessSend.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sessSend.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/RandomReattachTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/RandomReattachTest.java index c3b0789aa2..5c50b3a9b4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/RandomReattachTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/RandomReattachTest.java @@ -29,16 +29,16 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl; import org.apache.activemq.core.client.impl.ClientSessionInternal; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMRegistry; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -64,7 +64,7 @@ public class RandomReattachTest extends UnitTestCase private static final SimpleString ADDRESS = new SimpleString("FailoverTestAddress"); - private HornetQServer liveService; + private ActiveMQServer liveService; private Timer timer; @@ -251,7 +251,7 @@ public class RandomReattachTest extends UnitTestCase { RandomReattachTest.log.info("####" + getName() + " iteration #" + its); start(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY)); locator.setReconnectAttempts(-1); locator.setConfirmationWindowSize(1024 * 1024); @@ -321,7 +321,7 @@ public class RandomReattachTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - ClientMessage message = sessSend.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sessSend.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -438,7 +438,7 @@ public class RandomReattachTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - ClientMessage message = sessSend.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sessSend.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -555,7 +555,7 @@ public class RandomReattachTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - ClientMessage message = sessSend.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sessSend.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -568,7 +568,7 @@ public class RandomReattachTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - ClientMessage message = sessSend.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sessSend.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -719,7 +719,7 @@ public class RandomReattachTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - ClientMessage message = sessSend.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sessSend.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -732,7 +732,7 @@ public class RandomReattachTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - ClientMessage message = sessSend.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sessSend.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -882,7 +882,7 @@ public class RandomReattachTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - ClientMessage message = sessSend.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sessSend.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -969,7 +969,7 @@ public class RandomReattachTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - ClientMessage message = sessSend.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sessSend.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -1070,7 +1070,7 @@ public class RandomReattachTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - ClientMessage message = sessSend.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sessSend.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -1083,7 +1083,7 @@ public class RandomReattachTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - ClientMessage message = sessSend.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sessSend.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -1203,7 +1203,7 @@ public class RandomReattachTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - ClientMessage message = sessSend.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sessSend.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -1216,7 +1216,7 @@ public class RandomReattachTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - ClientMessage message = sessSend.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sessSend.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -1324,7 +1324,7 @@ public class RandomReattachTest extends UnitTestCase ClientProducer producer = sess.createProducer(RandomReattachTest.ADDRESS); - ClientMessage message = sess.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sess.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -1358,7 +1358,7 @@ public class RandomReattachTest extends UnitTestCase ClientProducer producer = sess.createProducer(RandomReattachTest.ADDRESS); - ClientMessage message = sess.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sess.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -1431,7 +1431,7 @@ public class RandomReattachTest extends UnitTestCase ClientProducer producer = sess.createProducer(RandomReattachTest.ADDRESS); - ClientMessage message = sess.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = sess.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -1498,7 +1498,7 @@ public class RandomReattachTest extends UnitTestCase Configuration liveConf = createDefaultConfig() .setSecurityEnabled(false) .addAcceptorConfiguration(new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory")); - liveService = HornetQServers.newHornetQServer(liveConf, false); + liveService = ActiveMQServers.newActiveMQServer(liveConf, false); liveService.start(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/ReattachTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/ReattachTest.java index a137d7e602..891c8faee8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/ReattachTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/ReattachTest.java @@ -35,8 +35,8 @@ import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionProducerCreditsMessage; import org.apache.activemq.core.remoting.impl.invm.InVMConnector; import org.apache.activemq.core.remoting.impl.invm.InVMRegistry; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; @@ -57,7 +57,7 @@ public class ReattachTest extends ServiceTestBase private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; private static final SimpleString ADDRESS = new SimpleString("FailoverTestAddress"); - private HornetQServer service; + private ActiveMQServer service; private ServerLocator locator; /* @@ -92,7 +92,7 @@ public class ReattachTest extends ServiceTestBase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -194,7 +194,7 @@ public class ReattachTest extends ServiceTestBase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -238,7 +238,7 @@ public class ReattachTest extends ServiceTestBase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -356,7 +356,7 @@ public class ReattachTest extends ServiceTestBase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -451,7 +451,7 @@ public class ReattachTest extends ServiceTestBase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -829,7 +829,7 @@ public class ReattachTest extends ServiceTestBase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -897,7 +897,7 @@ public class ReattachTest extends ServiceTestBase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -990,7 +990,7 @@ public class ReattachTest extends ServiceTestBase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -1069,7 +1069,7 @@ public class ReattachTest extends ServiceTestBase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/HAClientTopologyTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/HAClientTopologyTest.java index 59324169bd..379afbf864 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/HAClientTopologyTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/HAClientTopologyTest.java @@ -13,7 +13,7 @@ package org.apache.activemq.tests.integration.cluster.topology; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; /** @@ -56,7 +56,7 @@ public class HAClientTopologyTest extends TopologyClusterTestBase protected ServerLocator createHAServerLocator() { TransportConfiguration tc = createTransportConfiguration(isNetty(), false, generateParams(0, isNetty())); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithHA(tc)); locator.setBlockOnNonDurableSend(true); locator.setBlockOnDurableSend(true); return locator; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/HAClientTopologyWithDiscoveryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/HAClientTopologyWithDiscoveryTest.java index 1ae6d4136d..4a920b9409 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/HAClientTopologyWithDiscoveryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/HAClientTopologyWithDiscoveryTest.java @@ -14,7 +14,7 @@ package org.apache.activemq.tests.integration.cluster.topology; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; /** @@ -60,10 +60,10 @@ public class HAClientTopologyWithDiscoveryTest extends TopologyClusterTestBase @Override protected ServerLocator createHAServerLocator() { - ServerLocator locator = HornetQClient.createServerLocatorWithHA(new DiscoveryGroupConfiguration() - .setBroadcastEndpointFactoryConfiguration(new UDPBroadcastGroupConfiguration() - .setGroupAddress(groupAddress) - .setGroupPort(groupPort))); + ServerLocator locator = ActiveMQClient.createServerLocatorWithHA(new DiscoveryGroupConfiguration() + .setBroadcastEndpointFactoryConfiguration(new UDPBroadcastGroupConfiguration() + .setGroupAddress(groupAddress) + .setGroupPort(groupPort))); locator.setBlockOnNonDurableSend(true); locator.setBlockOnDurableSend(true); addServerLocator(locator); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/IsolatedTopologyTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/IsolatedTopologyTest.java index 0aacb5c68f..fa08b8cad9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/IsolatedTopologyTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/IsolatedTopologyTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.core.client.impl.TopologyMemberImpl; import org.apache.activemq.core.config.ClusterConnectionConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.Assert; @@ -41,9 +41,9 @@ public class IsolatedTopologyTest extends ServiceTestBase public void testIsolatedClusters() throws Exception { - HornetQServer server1 = createServer1(); + ActiveMQServer server1 = createServer1(); - HornetQServer server2 = createServer2(); + ActiveMQServer server2 = createServer2(); server1.start(); server2.start(); @@ -89,7 +89,7 @@ public class IsolatedTopologyTest extends ServiceTestBase Thread.sleep(500); } - private void checkTopology(final HornetQServer serverParameter, + private void checkTopology(final ActiveMQServer serverParameter, final String clusterName, final String nodeId1, final String nodeId2, @@ -104,7 +104,7 @@ public class IsolatedTopologyTest extends ServiceTestBase Assert.assertEquals(member2.getLive().getParams().toString(), cfg2.getParams().toString()); } - private HornetQServer createServer1() throws Exception + private ActiveMQServer createServer1() throws Exception { Map params = new HashMap(); params.put(TransportConstants.CLUSTER_CONNECTION, "cc1"); @@ -160,7 +160,7 @@ public class IsolatedTopologyTest extends ServiceTestBase return createServer(false, config1); } - private HornetQServer createServer2() throws Exception + private ActiveMQServer createServer2() throws Exception { Map params = new HashMap(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/NonHATopologyTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/NonHATopologyTest.java index d1a9ce338f..dea75e6173 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/NonHATopologyTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/NonHATopologyTest.java @@ -25,7 +25,7 @@ import org.apache.activemq.core.config.ClusterConnectionConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; /** @@ -56,7 +56,7 @@ public class NonHATopologyTest extends ServiceTestBase public void internalTest(boolean isNetty) throws Exception { - HornetQServer server = null; + ActiveMQServer server = null; ServerLocatorInternal locator = null; try diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/TopologyClusterTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/TopologyClusterTestBase.java index 2d7f70682c..3d0719eeb5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/TopologyClusterTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/topology/TopologyClusterTestBase.java @@ -30,7 +30,7 @@ import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.client.TopologyMember; import org.apache.activemq.core.client.impl.ServerLocatorImpl; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.cluster.ClusterConnection; import org.apache.activemq.core.server.cluster.ClusterManager; import org.apache.activemq.tests.integration.IntegrationTestLogger; @@ -189,7 +189,7 @@ public abstract class TopologyClusterTestBase extends ClusterTestBase protected void waitForClusterConnections(final int node, final int expected) throws Exception { - HornetQServer server = servers[node]; + ActiveMQServer server = servers[node]; if (server == null) { @@ -388,7 +388,7 @@ public abstract class TopologyClusterTestBase extends ClusterTestBase public void testWrongPasswordTriggersClusterConnectionStop() throws Exception { Configuration config = servers[4].getConfiguration(); - for (HornetQServer s : servers) + for (ActiveMQServer s : servers) { if (s != null) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/BackupSyncDelay.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/BackupSyncDelay.java index 25ee09e085..8a85e36985 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/BackupSyncDelay.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/BackupSyncDelay.java @@ -28,7 +28,7 @@ import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationResponseMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationStartSyncMessage; import org.apache.activemq.core.replication.ReplicationEndpoint; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.impl.SharedNothingBackupActivation; import org.apache.activemq.spi.core.protocol.RemotingConnection; @@ -59,8 +59,8 @@ public class BackupSyncDelay implements Interceptor { private final ReplicationChannelHandler handler; - private final HornetQServer backup; - private final HornetQServer live; + private final ActiveMQServer backup; + private final ActiveMQServer live; public void deliverUpToDateMsg() { @@ -74,7 +74,7 @@ public class BackupSyncDelay implements Interceptor * @param live * @param packetCode which packet is going to be intercepted. */ - public BackupSyncDelay(HornetQServer backup, HornetQServer live, byte packetCode) + public BackupSyncDelay(ActiveMQServer backup, ActiveMQServer live, byte packetCode) { this.backup = backup; this.live = live; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/MultiServerTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/MultiServerTestBase.java index 37e140284e..d7ae5b5b57 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/MultiServerTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/MultiServerTestBase.java @@ -22,12 +22,12 @@ import java.util.List; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.ClusterConnectionConfiguration; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.impl.InVMNodeManager; import org.apache.activemq.tests.util.ServiceTestBase; @@ -40,9 +40,9 @@ public class MultiServerTestBase extends ServiceTestBase { - protected HornetQServer[] servers; + protected ActiveMQServer[] servers; - protected HornetQServer[] backupServers; + protected ActiveMQServer[] backupServers; protected NodeManager[] nodeManagers; @@ -77,12 +77,12 @@ public class MultiServerTestBase extends ServiceTestBase TransportConfiguration targetConfig = createTransportConfiguration(useNetty(), false, generateParams(serverID, useNetty())); if (ha) { - ServerLocator locator = HornetQClient.createServerLocatorWithHA(targetConfig); + ServerLocator locator = ActiveMQClient.createServerLocatorWithHA(targetConfig); return addServerLocator(locator); } else { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(targetConfig); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(targetConfig); return addServerLocator(locator); } } @@ -93,11 +93,11 @@ public class MultiServerTestBase extends ServiceTestBase { super.setUp(); - servers = new HornetQServer[getNumberOfServers()]; + servers = new ActiveMQServer[getNumberOfServers()]; if (useBackups()) { - backupServers = new HornetQServer[getNumberOfServers()]; + backupServers = new ActiveMQServer[getNumberOfServers()]; } if (useBackups()) @@ -108,7 +108,7 @@ public class MultiServerTestBase extends ServiceTestBase for (int i = 0; i < getNumberOfServers(); i++) { - Pair nodeServer = setupLiveServer(i, useRealFiles(), useSharedStorage()); + Pair nodeServer = setupLiveServer(i, useRealFiles(), useSharedStorage()); this.servers[i] = nodeServer.getA(); if (useBackups()) @@ -124,31 +124,31 @@ public class MultiServerTestBase extends ServiceTestBase protected void startServers() throws Exception { - for (HornetQServer server : servers) + for (ActiveMQServer server : servers) { server.start(); } - for (HornetQServer server: servers) + for (ActiveMQServer server: servers) { waitForServer(server); } if (backupServers != null) { - for (HornetQServer server : backupServers) + for (ActiveMQServer server : backupServers) { server.start(); } - for (HornetQServer server: backupServers) + for (ActiveMQServer server: backupServers) { waitForServer(server); } } - for (HornetQServer server : servers) + for (ActiveMQServer server : servers) { waitForTopology(server, getNumberOfServers(), useBackups() ? getNumberOfServers() : 0); } @@ -173,7 +173,7 @@ public class MultiServerTestBase extends ServiceTestBase } - protected Pair setupLiveServer(final int node, + protected Pair setupLiveServer(final int node, final boolean realFiles, final boolean sharedStorage) throws Exception { @@ -225,7 +225,7 @@ public class MultiServerTestBase extends ServiceTestBase configuration.getClusterConfigurations().add(clusterConf); - HornetQServer server; + ActiveMQServer server; if (sharedStorage) { @@ -241,10 +241,10 @@ public class MultiServerTestBase extends ServiceTestBase addServer(server); - return new Pair(server, nodeManager); + return new Pair(server, nodeManager); } - protected HornetQServer setupBackupServer(final int node, + protected ActiveMQServer setupBackupServer(final int node, final int liveNode, final NodeManager nodeManager) throws Exception { @@ -282,7 +282,7 @@ public class MultiServerTestBase extends ServiceTestBase configuration.getClusterConfigurations().add(clusterConf); - HornetQServer server; + ActiveMQServer server; if (useSharedStorage()) { @@ -290,7 +290,7 @@ public class MultiServerTestBase extends ServiceTestBase } else { - server = addServer(HornetQServers.newHornetQServer(configuration, useRealFiles())); + server = addServer(ActiveMQServers.newActiveMQServer(configuration, useRealFiles())); } server.setIdentity(this.getClass().getSimpleName() + "/Backup(" + node + " of live " + liveNode + ")"); return server; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/SameProcessHornetQServer.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/SameProcessActiveMQServer.java similarity index 91% rename from tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/SameProcessHornetQServer.java rename to tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/SameProcessActiveMQServer.java index e7b81ece0d..44cb53b1b8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/SameProcessHornetQServer.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/SameProcessActiveMQServer.java @@ -14,7 +14,7 @@ package org.apache.activemq.tests.integration.cluster.util; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.cluster.ClusterManager; import org.apache.activemq.tests.util.CountDownSessionFailureListener; import org.junit.Assert; @@ -23,15 +23,15 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; /** - * A SameProcessHornetQServer + * A SameProcessActiveMQServer * * @author jmesnil */ -public class SameProcessHornetQServer implements TestableServer +public class SameProcessActiveMQServer implements TestableServer { - private final HornetQServer server; + private final ActiveMQServer server; - public SameProcessHornetQServer(HornetQServer server) + public SameProcessActiveMQServer(ActiveMQServer server) { this.server = server; } @@ -104,7 +104,7 @@ public class SameProcessHornetQServer implements TestableServer return latch; } - public HornetQServer getServer() + public ActiveMQServer getServer() { return server; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/TestableServer.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/TestableServer.java index 239e633291..6d962e3bc3 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/TestableServer.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/util/TestableServer.java @@ -16,16 +16,16 @@ import java.util.concurrent.CountDownLatch; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQServer; /** * A TestServer * @author jmesnil */ -public interface TestableServer extends HornetQComponent +public interface TestableServer extends ActiveMQComponent { - HornetQServer getServer(); + ActiveMQServer getServer(); void stop() throws Exception; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/core/deployers/impl/QueueDeployerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/core/deployers/impl/QueueDeployerTest.java index 357f56e116..b842fb40f1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/core/deployers/impl/QueueDeployerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/core/deployers/impl/QueueDeployerTest.java @@ -22,7 +22,7 @@ import org.apache.activemq.core.deployers.impl.QueueDeployer; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.Bindings; import org.apache.activemq.core.postoffice.impl.LocalQueueBinding; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -42,12 +42,12 @@ public class QueueDeployerTest extends ServiceTestBase private QueueDeployer deployer; - private HornetQServer server; + private ActiveMQServer server; @Test public void testParseQueueConfiguration() throws Exception { - String xml = "" + String xml = "" + " " + " " + "

    bar
    " diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/discovery/DiscoveryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/discovery/DiscoveryTest.java index 69697f2ddd..2407c6c480 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/discovery/DiscoveryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/discovery/DiscoveryTest.java @@ -41,7 +41,7 @@ import org.apache.activemq.api.core.management.CoreNotificationType; import org.apache.activemq.core.cluster.DiscoveryEntry; import org.apache.activemq.core.cluster.DiscoveryGroup; import org.apache.activemq.core.cluster.DiscoveryListener; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.cluster.BroadcastGroup; import org.apache.activemq.core.server.cluster.impl.BroadcastGroupImpl; @@ -98,8 +98,8 @@ public class DiscoveryTest extends UnitTestCase public void tearDown() throws Exception { /** This file path is defined at {@link #TEST_JGROUPS_CONF_FILE} */ - deleteDirectory(new File("/tmp/hqtest.ping.dir")); - for (HornetQComponent component : new HornetQComponent[]{bg, bg1, bg2, bg3, dg, dg1, dg2, dg3}) + deleteDirectory(new File("/tmp/amqtest.ping.dir")); + for (ActiveMQComponent component : new ActiveMQComponent[]{bg, bg1, bg2, bg3, dg, dg1, dg2, dg3}) { stopComponent(component); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/divert/DivertTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/divert/DivertTest.java index d709e9abae..caa2495cb6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/divert/DivertTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/divert/DivertTest.java @@ -25,8 +25,8 @@ import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.DivertConfiguration; import org.apache.activemq.core.message.impl.MessageImpl; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; @@ -63,7 +63,7 @@ public class DivertTest extends ServiceTestBase conf.setDivertConfigurations(divertConfs); - HornetQServer messagingService = addServer(HornetQServers.newHornetQServer(conf, false)); + ActiveMQServer messagingService = addServer(ActiveMQServers.newActiveMQServer(conf, false)); messagingService.start(); @@ -165,7 +165,7 @@ public class DivertTest extends ServiceTestBase conf.setDivertConfigurations(divertConfs); - HornetQServer messagingService = addServer(HornetQServers.newHornetQServer(conf, true)); + ActiveMQServer messagingService = addServer(ActiveMQServers.newActiveMQServer(conf, true)); messagingService.start(); @@ -294,7 +294,7 @@ public class DivertTest extends ServiceTestBase conf.setDivertConfigurations(divertConfs); - HornetQServer messagingService = addServer(HornetQServers.newHornetQServer(conf, false)); + ActiveMQServer messagingService = addServer(ActiveMQServers.newActiveMQServer(conf, false)); messagingService.start(); @@ -424,7 +424,7 @@ public class DivertTest extends ServiceTestBase conf.setDivertConfigurations(divertConfs); - HornetQServer messagingService = addServer(HornetQServers.newHornetQServer(conf, false)); + ActiveMQServer messagingService = addServer(ActiveMQServers.newActiveMQServer(conf, false)); messagingService.start(); @@ -497,7 +497,7 @@ public class DivertTest extends ServiceTestBase conf.setDivertConfigurations(divertConfs); - HornetQServer messagingService = addServer(HornetQServers.newHornetQServer(conf, false)); + ActiveMQServer messagingService = addServer(ActiveMQServers.newActiveMQServer(conf, false)); messagingService.start(); @@ -608,7 +608,7 @@ public class DivertTest extends ServiceTestBase conf.setDivertConfigurations(divertConfs); - HornetQServer messagingService = addServer(HornetQServers.newHornetQServer(conf, false)); + ActiveMQServer messagingService = addServer(ActiveMQServers.newActiveMQServer(conf, false)); messagingService.start(); @@ -756,7 +756,7 @@ public class DivertTest extends ServiceTestBase conf.setDivertConfigurations(divertConfs); - HornetQServer messagingService = addServer(HornetQServers.newHornetQServer(conf, false)); + ActiveMQServer messagingService = addServer(ActiveMQServers.newActiveMQServer(conf, false)); messagingService.start(); @@ -893,7 +893,7 @@ public class DivertTest extends ServiceTestBase conf.setDivertConfigurations(divertConfs); - HornetQServer messagingService = addServer(HornetQServers.newHornetQServer(conf, false)); + ActiveMQServer messagingService = addServer(ActiveMQServers.newActiveMQServer(conf, false)); messagingService.start(); @@ -1021,7 +1021,7 @@ public class DivertTest extends ServiceTestBase conf.setDivertConfigurations(divertConfs); - HornetQServer messagingService = addServer(HornetQServers.newHornetQServer(conf, false)); + ActiveMQServer messagingService = addServer(ActiveMQServers.newActiveMQServer(conf, false)); messagingService.start(); @@ -1198,7 +1198,7 @@ public class DivertTest extends ServiceTestBase conf.setDivertConfigurations(divertConfs); - HornetQServer messagingService = addServer(HornetQServers.newHornetQServer(conf, false)); + ActiveMQServer messagingService = addServer(ActiveMQServers.newActiveMQServer(conf, false)); messagingService.start(); @@ -1352,7 +1352,7 @@ public class DivertTest extends ServiceTestBase conf.setDivertConfigurations(divertConfs); - HornetQServer messagingService = addServer(HornetQServers.newHornetQServer(conf, false)); + ActiveMQServer messagingService = addServer(ActiveMQServers.newActiveMQServer(conf, false)); messagingService.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/divert/PersistentDivertTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/divert/PersistentDivertTest.java index b91e703ec3..df4c18a307 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/divert/PersistentDivertTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/divert/PersistentDivertTest.java @@ -25,12 +25,12 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.DivertConfiguration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -45,7 +45,7 @@ import org.apache.activemq.tests.util.UnitTestCase; */ public class PersistentDivertTest extends ServiceTestBase { - final int minLargeMessageSize = HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE * 2; + final int minLargeMessageSize = ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE * 2; @Test public void testPersistentDivert() throws Exception @@ -97,7 +97,7 @@ public class PersistentDivertTest extends ServiceTestBase conf.setDivertConfigurations(divertConfs); - HornetQServer messagingService = addServer(HornetQServers.newHornetQServer(conf)); + ActiveMQServer messagingService = addServer(ActiveMQServers.newActiveMQServer(conf)); messagingService.start(); @@ -294,7 +294,7 @@ public class PersistentDivertTest extends ServiceTestBase conf.setDivertConfigurations(divertConfs); - HornetQServer messagingService = addServer(HornetQServers.newHornetQServer(conf)); + ActiveMQServer messagingService = addServer(ActiveMQServers.newActiveMQServer(conf)); messagingService.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/embedded/ValidateAIOTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/embedded/ValidateAIOTest.java index 0e2da9ad5f..aec327e013 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/embedded/ValidateAIOTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/embedded/ValidateAIOTest.java @@ -14,8 +14,8 @@ package org.apache.activemq.tests.integration.embedded; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.server.JournalType; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Test; @@ -34,7 +34,7 @@ public class ValidateAIOTest extends ServiceTestBase Configuration config = createDefaultConfig(false) // This will force AsyncIO .setJournalType(JournalType.ASYNCIO); - HornetQServer server = HornetQServers.newHornetQServer(config, true); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(config, true); try { server.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/http/CoreClientOverHttpTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/http/CoreClientOverHttpTest.java index eea18e9758..b4cf364ba9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/http/CoreClientOverHttpTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/http/CoreClientOverHttpTest.java @@ -27,13 +27,13 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.util.UnitTestCase; /** @@ -43,7 +43,7 @@ public class CoreClientOverHttpTest extends UnitTestCase { private static final SimpleString QUEUE = new SimpleString("CoreClientOverHttpTestQueue"); private Configuration conf; - private HornetQServer server; + private ActiveMQServer server; private ServerLocator locator; @Override @@ -58,10 +58,10 @@ public class CoreClientOverHttpTest extends UnitTestCase .setSecurityEnabled(false) .addAcceptorConfiguration(new TransportConfiguration(NETTY_ACCEPTOR_FACTORY)); - server = addServer(HornetQServers.newHornetQServer(conf, false)); + server = addServer(ActiveMQServers.newActiveMQServer(conf, false)); server.start(); - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY, params)); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY, params)); addServerLocator(locator); } @@ -79,7 +79,7 @@ public class CoreClientOverHttpTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -138,7 +138,7 @@ public class CoreClientOverHttpTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/HornetQConnectionFactoryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/ActiveMQConnectionFactoryTest.java similarity index 67% rename from tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/HornetQConnectionFactoryTest.java rename to tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/ActiveMQConnectionFactoryTest.java index b773e8c9a1..691b02d1cf 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/HornetQConnectionFactoryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/ActiveMQConnectionFactoryTest.java @@ -31,26 +31,26 @@ import org.apache.activemq.api.core.BroadcastGroupConfiguration; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.core.client.ActiveMQClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.UnitTestCase; /** * - * A HornetQConnectionFactoryTest + * A ActiveMQConnectionFactoryTest * * @author Tim Fox * * */ -public class HornetQConnectionFactoryTest extends UnitTestCase +public class ActiveMQConnectionFactoryTest extends UnitTestCase { private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; @@ -58,42 +58,42 @@ public class HornetQConnectionFactoryTest extends UnitTestCase private final int groupPort = getUDPDiscoveryPort(); - private HornetQServer liveService; + private ActiveMQServer liveService; private TransportConfiguration liveTC; @Test public void testDefaultConstructor() throws Exception { - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF); assertFactoryParams(cf, null, null, null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, - HornetQClient.DEFAULT_CALL_TIMEOUT, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, - HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, - HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, - HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_RETRY_INTERVAL, - HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, - HornetQClient.DEFAULT_RECONNECT_ATTEMPTS); + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CALL_TIMEOUT, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, + ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS); Connection conn = null; try @@ -113,7 +113,7 @@ public class HornetQConnectionFactoryTest extends UnitTestCase conn.close(); } - HornetQConnectionFactoryTest.log.info("Got here"); + ActiveMQConnectionFactoryTest.log.info("Got here"); testSettersThrowException(cf); } @@ -121,36 +121,36 @@ public class HornetQConnectionFactoryTest extends UnitTestCase @Test public void testDefaultConstructorAndSetConnectorPairs() throws Exception { - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC); assertFactoryParams(cf, new TransportConfiguration[]{liveTC}, null, null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, - HornetQClient.DEFAULT_CALL_TIMEOUT, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, - HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, - HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, - HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_RETRY_INTERVAL, - HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, - HornetQClient.DEFAULT_RECONNECT_ATTEMPTS); + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CALL_TIMEOUT, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, + ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS); Connection conn = cf.createConnection(); @@ -168,35 +168,35 @@ public class HornetQConnectionFactoryTest extends UnitTestCase .setBroadcastEndpointFactoryConfiguration(new UDPBroadcastGroupConfiguration() .setGroupAddress(groupAddress) .setGroupPort(groupPort)); - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(groupConfiguration, JMSFactoryType.CF); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(groupConfiguration, JMSFactoryType.CF); assertFactoryParams(cf, null, groupConfiguration, null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, - HornetQClient.DEFAULT_CALL_TIMEOUT, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, - HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, - HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, - HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_RETRY_INTERVAL, - HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, - HornetQClient.DEFAULT_RECONNECT_ATTEMPTS); + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CALL_TIMEOUT, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, + ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS); Connection conn = cf.createConnection(); conn.createSession(false, Session.AUTO_ACKNOWLEDGE); @@ -209,35 +209,35 @@ public class HornetQConnectionFactoryTest extends UnitTestCase @Test public void testStaticConnectorListConstructor() throws Exception { - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC); assertFactoryParams(cf, new TransportConfiguration[]{liveTC}, null, null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, - HornetQClient.DEFAULT_CALL_TIMEOUT, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, - HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, - HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, - HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_RETRY_INTERVAL, - HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, - HornetQClient.DEFAULT_RECONNECT_ATTEMPTS); + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CALL_TIMEOUT, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, + ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS); Connection conn = cf.createConnection(); conn.createSession(false, Session.AUTO_ACKNOWLEDGE); @@ -251,35 +251,35 @@ public class HornetQConnectionFactoryTest extends UnitTestCase @Test public void testStaticConnectorLiveConstructor() throws Exception { - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC); assertFactoryParams(cf, new TransportConfiguration[]{liveTC}, null, null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, - HornetQClient.DEFAULT_CALL_TIMEOUT, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, - HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, - HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, - HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_RETRY_INTERVAL, - HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, - HornetQClient.DEFAULT_RECONNECT_ATTEMPTS); + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CALL_TIMEOUT, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, + ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS); Connection conn = cf.createConnection(); conn.createSession(false, Session.AUTO_ACKNOWLEDGE); @@ -295,7 +295,7 @@ public class HornetQConnectionFactoryTest extends UnitTestCase @Test public void testGettersAndSetters() { - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC); long clientFailureCheckPeriod = RandomUtil.randomPositiveLong(); long connectionTTL = RandomUtil.randomPositiveLong(); @@ -361,7 +361,7 @@ public class HornetQConnectionFactoryTest extends UnitTestCase cf.close(); } - private void testSettersThrowException(final HornetQConnectionFactory cf) + private void testSettersThrowException(final ActiveMQConnectionFactory cf) { String discoveryAddress = RandomUtil.randomString(); @@ -629,7 +629,7 @@ public class HornetQConnectionFactoryTest extends UnitTestCase cf.close(); } - private void assertFactoryParams(final HornetQConnectionFactory cf, + private void assertFactoryParams(final ActiveMQConnectionFactory cf, final TransportConfiguration[] staticConnectors, final DiscoveryGroupConfiguration discoveryGroupConfiguration, final String clientID, @@ -739,7 +739,7 @@ public class HornetQConnectionFactoryTest extends UnitTestCase bcConfigs1.add(bcConfig1); liveConf.setBroadcastGroupConfigurations(bcConfigs1); - liveService = addServer(HornetQServers.newHornetQServer(liveConf, false)); + liveService = addServer(ActiveMQServers.newActiveMQServer(liveConf, false)); liveService.start(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/FloodServerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/FloodServerTest.java index 52af8692ea..ef5afc5cb9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/FloodServerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/FloodServerTest.java @@ -29,14 +29,14 @@ import javax.jms.MessageProducer; import javax.jms.Session; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.core.client.ActiveMQClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.unit.util.InVMNamingContext; @@ -56,7 +56,7 @@ public class FloodServerTest extends UnitTestCase private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; - private HornetQServer server; + private ActiveMQServer server; private JMSServerManagerImpl serverManager; @@ -86,7 +86,7 @@ public class FloodServerTest extends UnitTestCase Configuration conf = createBasicConfig() .addAcceptorConfiguration(new TransportConfiguration(NettyAcceptorFactory.class.getName())); - server = HornetQServers.newHornetQServer(conf, false); + server = ActiveMQServers.newActiveMQServer(conf, false); server.start(); serverManager = new JMSServerManagerImpl(server); @@ -135,33 +135,33 @@ public class FloodServerTest extends UnitTestCase registerConnectors(server, connectorConfigs), null, 1000, - HornetQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CONNECTION_TTL, callTimeout, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, false, false, false, - HornetQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_AUTO_GROUP, false, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, retryInterval, retryIntervalMultiplier, 1000, reconnectAttempts, - HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, + ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, null, "/cf"); } @@ -233,7 +233,7 @@ public class FloodServerTest extends UnitTestCase session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - producer = session.createProducer(HornetQJMSClient.createTopic("my-topic")); + producer = session.createProducer(ActiveMQJMSClient.createTopic("my-topic")); producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); @@ -288,7 +288,7 @@ public class FloodServerTest extends UnitTestCase session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - consumer = session.createConsumer(HornetQJMSClient.createTopic("my-topic")); + consumer = session.createConsumer(ActiveMQJMSClient.createTopic("my-topic")); this.numMessages = numMessages; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/JmsProducerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/JmsProducerTest.java index e947ab38fb..45adbe2e22 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/JmsProducerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/JmsProducerTest.java @@ -28,8 +28,8 @@ import java.util.Random; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.client.impl.ClientSessionImpl; import org.apache.activemq.core.client.impl.DelegatingSession; -import org.apache.activemq.jms.client.HornetQJMSContext; -import org.apache.activemq.jms.client.HornetQSession; +import org.apache.activemq.jms.client.ActiveMQJMSContext; +import org.apache.activemq.jms.client.ActiveMQSession; import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration; import org.apache.activemq.tests.util.JMSTestBase; import org.junit.Assert; @@ -115,7 +115,7 @@ public class JmsProducerTest extends JMSTestBase context.createProducer().send(q1, "Text" + i); } - HornetQSession sessionUsed = (HornetQSession) (((HornetQJMSContext) context).getUsedSession()); + ActiveMQSession sessionUsed = (ActiveMQSession) (((ActiveMQJMSContext) context).getUsedSession()); ClientSessionImpl coreSession = (ClientSessionImpl) ((DelegatingSession) sessionUsed.getCoreSession()).getInternalSession(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/ManualReconnectionToSingleServerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/ManualReconnectionToSingleServerTest.java index 0caa1384fe..f9f785d482 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/ManualReconnectionToSingleServerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/ManualReconnectionToSingleServerTest.java @@ -39,7 +39,7 @@ import org.junit.Assert; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration; import org.apache.activemq.jms.server.config.JMSConfiguration; @@ -89,7 +89,7 @@ public class ManualReconnectionToSingleServerTest extends ServiceTestBase private Listener listener; - private HornetQServer server; + private ActiveMQServer server; @Test public void testExceptionListener() throws Exception diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/BridgeTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/BridgeTestBase.java index 3abde27cad..11c7f8fdc5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/BridgeTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/BridgeTestBase.java @@ -35,22 +35,22 @@ import com.arjuna.ats.arjuna.coordinator.TxControl; import com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.ResourceNames; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.api.jms.management.JMSQueueControl; import org.apache.activemq.api.jms.management.TopicControl; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.server.management.ManagementService; import org.apache.activemq.jms.bridge.ConnectionFactoryFactory; import org.apache.activemq.jms.bridge.DestinationFactory; import org.apache.activemq.jms.bridge.QualityOfServiceMode; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQJMSConnectionFactory; -import org.apache.activemq.jms.client.HornetQMessage; -import org.apache.activemq.jms.client.HornetQXAConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQMessage; +import org.apache.activemq.jms.client.ActiveMQXAConnectionFactory; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.tests.integration.IntegrationTestLogger; @@ -86,11 +86,11 @@ public abstract class BridgeTestBase extends UnitTestCase protected Topic sourceTopic; - protected HornetQServer server0; + protected ActiveMQServer server0; protected JMSServerManager jmsServer0; - protected HornetQServer server1; + protected ActiveMQServer server1; protected JMSServerManager jmsServer1; @@ -114,7 +114,7 @@ public abstract class BridgeTestBase extends UnitTestCase .setBindingsDirectory(getBindingsDir(0, false)) .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY)); - server0 = addServer(HornetQServers.newHornetQServer(conf0, false)); + server0 = addServer(ActiveMQServers.newActiveMQServer(conf0, false)); context0 = new InVMNamingContext(); jmsServer0 = new JMSServerManagerImpl(server0); @@ -129,7 +129,7 @@ public abstract class BridgeTestBase extends UnitTestCase .setBindingsDirectory(getBindingsDir(1, false)) .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY, params1)); - server1 = addServer(HornetQServers.newHornetQServer(conf1, false)); + server1 = addServer(ActiveMQServers.newActiveMQServer(conf1, false)); context1 = new InVMNamingContext(); @@ -175,13 +175,13 @@ public abstract class BridgeTestBase extends UnitTestCase // Check no subscriptions left lying around checkNoSubscriptions(sourceTopic, 0); - if (cff0 instanceof HornetQConnectionFactory) + if (cff0 instanceof ActiveMQConnectionFactory) { - ((HornetQConnectionFactory) cff0).close(); + ((ActiveMQConnectionFactory) cff0).close(); } - if (cff1 instanceof HornetQConnectionFactory) + if (cff1 instanceof ActiveMQConnectionFactory) { - ((HornetQConnectionFactory) cff1).close(); + ((ActiveMQConnectionFactory) cff1).close(); } stopComponent(jmsServer0); stopComponent(jmsServer1); @@ -226,9 +226,9 @@ public abstract class BridgeTestBase extends UnitTestCase { public ConnectionFactory createConnectionFactory() throws Exception { - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration( - INVM_CONNECTOR_FACTORY)); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration( + INVM_CONNECTOR_FACTORY)); // Note! We disable automatic reconnection on the session factory. The bridge needs to do the reconnection cf.setReconnectAttempts(0); @@ -247,9 +247,9 @@ public abstract class BridgeTestBase extends UnitTestCase { public ConnectionFactory createConnectionFactory() throws Exception { - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration( - INVM_CONNECTOR_FACTORY)); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration( + INVM_CONNECTOR_FACTORY)); // Note! We disable automatic reconnection on the session factory. The bridge needs to do the reconnection cf.setReconnectAttempts(0); @@ -266,9 +266,9 @@ public abstract class BridgeTestBase extends UnitTestCase { public Object createConnectionFactory() throws Exception { - HornetQXAConnectionFactory cf = (HornetQXAConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.XA_CF, - new TransportConfiguration( - INVM_CONNECTOR_FACTORY)); + ActiveMQXAConnectionFactory cf = (ActiveMQXAConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.XA_CF, + new TransportConfiguration( + INVM_CONNECTOR_FACTORY)); // Note! We disable automatic reconnection on the session factory. The bridge needs to do the reconnection cf.setReconnectAttempts(0); @@ -289,10 +289,10 @@ public abstract class BridgeTestBase extends UnitTestCase public ConnectionFactory createConnectionFactory() throws Exception { - HornetQJMSConnectionFactory cf = (HornetQJMSConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration( - INVM_CONNECTOR_FACTORY, - params1)); + ActiveMQJMSConnectionFactory cf = (ActiveMQJMSConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration( + INVM_CONNECTOR_FACTORY, + params1)); // Note! We disable automatic reconnection on the session factory. The bridge needs to do the reconnection cf.setReconnectAttempts(0); @@ -309,10 +309,10 @@ public abstract class BridgeTestBase extends UnitTestCase public XAConnectionFactory createConnectionFactory() throws Exception { - HornetQXAConnectionFactory cf = (HornetQXAConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.XA_CF, - new TransportConfiguration( - INVM_CONNECTOR_FACTORY, - params1)); + ActiveMQXAConnectionFactory cf = (ActiveMQXAConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.XA_CF, + new TransportConfiguration( + INVM_CONNECTOR_FACTORY, + params1)); // Note! We disable automatic reconnection on the session factory. The bridge needs to do the reconnection cf.setReconnectAttempts(0); @@ -392,7 +392,7 @@ public abstract class BridgeTestBase extends UnitTestCase if (largeMessage) { BytesMessage msg = sess.createBytesMessage(); - ((HornetQMessage) msg).setInputStream(UnitTestCase.createFakeLargeStream(1024L * 1024L)); + ((ActiveMQMessage) msg).setInputStream(UnitTestCase.createFakeLargeStream(1024L * 1024L)); msg.setStringProperty("msg", "message" + i); prod.send(msg); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/ClusteredBridgeTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/ClusteredBridgeTestBase.java index b1e832d0fd..7db2dc9857 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/ClusteredBridgeTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/ClusteredBridgeTestBase.java @@ -32,19 +32,19 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.FailoverEventListener; import org.apache.activemq.api.core.client.FailoverEventType; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.ha.ReplicaPolicyConfiguration; import org.apache.activemq.core.config.ha.ReplicatedPolicyConfiguration; import org.apache.activemq.core.remoting.impl.invm.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.jms.bridge.ConnectionFactoryFactory; import org.apache.activemq.jms.bridge.DestinationFactory; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.tests.unit.util.InVMContext; @@ -160,7 +160,7 @@ public abstract class ClusteredBridgeTestBase extends ServiceTestBase .setHAPolicyConfiguration(new ReplicatedPolicyConfiguration()) .addClusterConfiguration(basicClusterConnectionConfig(liveConnector.getName())); - HornetQServer server0 = addServer(HornetQServers.newHornetQServer(conf0, true)); + ActiveMQServer server0 = addServer(ActiveMQServers.newActiveMQServer(conf0, true)); liveContext = new InVMContext(); liveNode = new JMSServerManagerImpl(server0); @@ -176,7 +176,7 @@ public abstract class ClusteredBridgeTestBase extends ServiceTestBase .setHAPolicyConfiguration(new ReplicaPolicyConfiguration()) .addClusterConfiguration(basicClusterConnectionConfig(backupConnector.getName(), liveConnector.getName())); - HornetQServer backup = addServer(HornetQServers.newHornetQServer(conf, true)); + ActiveMQServer backup = addServer(ActiveMQServers.newActiveMQServer(conf, true)); Context context = new InVMContext(); @@ -187,11 +187,11 @@ public abstract class ClusteredBridgeTestBase extends ServiceTestBase public void start() throws Exception { liveNode.start(); - waitForServer(liveNode.getHornetQServer()); + waitForServer(liveNode.getActiveMQServer()); backupNode.start(); - waitForRemoteBackupSynchronization(backupNode.getHornetQServer()); + waitForRemoteBackupSynchronization(backupNode.getActiveMQServer()); - locator = HornetQClient.createServerLocatorWithHA(liveConnector); + locator = ActiveMQClient.createServerLocatorWithHA(liveConnector); locator.setReconnectAttempts(-1); sessionFactory = locator.createSessionFactory(); } @@ -215,8 +215,8 @@ public abstract class ClusteredBridgeTestBase extends ServiceTestBase { public ConnectionFactory createConnectionFactory() throws Exception { - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.XA_CF, - liveConnector); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.XA_CF, + liveConnector); cf.getServerLocator().setReconnectAttempts(-1); return cf; } @@ -298,7 +298,7 @@ public abstract class ClusteredBridgeTestBase extends ServiceTestBase } }); - liveNode.getHornetQServer().stop(); + liveNode.getActiveMQServer().stop(); boolean ok = latch.await(10000, TimeUnit.MILLISECONDS); assertTrue(ok); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/JMSBridgeReconnectionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/JMSBridgeReconnectionTest.java index 3f14e174e6..c0d50c511b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/JMSBridgeReconnectionTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/JMSBridgeReconnectionTest.java @@ -14,12 +14,12 @@ package org.apache.activemq.tests.integration.jms.bridge; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.jms.bridge.ConnectionFactoryFactory; import org.apache.activemq.jms.bridge.QualityOfServiceMode; import org.apache.activemq.jms.bridge.impl.JMSBridgeImpl; -import org.apache.activemq.jms.client.HornetQXAConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQXAConnectionFactory; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.integration.ra.DummyTransactionManager; import org.junit.Assert; @@ -134,7 +134,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase null, false); bridge.setTransactionManager(newTransactionManager()); - addHornetQComponent(bridge); + addActiveMQComponent(bridge); bridge.start(); Assert.assertFalse(bridge.isStarted()); Assert.assertTrue(bridge.isFailed()); @@ -230,7 +230,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase null, null, false); - addHornetQComponent(bridge); + addActiveMQComponent(bridge); bridge.setTransactionManager(newTransactionManager()); bridge.start(); @@ -305,7 +305,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase false); - addHornetQComponent(bridge); + addActiveMQComponent(bridge); bridge.setTransactionManager(newTransactionManager()); bridge.start(); @@ -367,10 +367,10 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase { public Object createConnectionFactory() throws Exception { - HornetQXAConnectionFactory cf = (HornetQXAConnectionFactory) HornetQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.XA_CF, - new TransportConfiguration( - INVM_CONNECTOR_FACTORY, - params1)); + ActiveMQXAConnectionFactory cf = (ActiveMQXAConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.XA_CF, + new TransportConfiguration( + INVM_CONNECTOR_FACTORY, + params1)); // Note! We disable automatic reconnection on the session factory. The bridge needs to do the reconnection cf.setReconnectAttempts(-1); @@ -405,7 +405,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase null, null, false); - addHornetQComponent(bridge); + addActiveMQComponent(bridge); bridge.setTransactionManager(tm); bridge.start(); @@ -516,7 +516,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase null, null, false); - addHornetQComponent(bridge); + addActiveMQComponent(bridge); bridge.setTransactionManager(newTransactionManager()); bridge.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/JMSBridgeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/JMSBridgeTest.java index adb7742ea6..7073f49625 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/JMSBridgeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/JMSBridgeTest.java @@ -30,11 +30,11 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import org.apache.activemq.api.jms.HornetQJMSConstants; +import org.apache.activemq.api.jms.ActiveMQJMSConstants; import org.apache.activemq.jms.bridge.ConnectionFactoryFactory; import org.apache.activemq.jms.bridge.QualityOfServiceMode; import org.apache.activemq.jms.bridge.impl.JMSBridgeImpl; -import org.apache.activemq.jms.client.HornetQMessage; +import org.apache.activemq.jms.client.ActiveMQMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.utils.DefaultSensitiveStringCodec; import org.junit.Assert; @@ -1362,7 +1362,7 @@ public class JMSBridgeTest extends BridgeTestBase //Set some JMS headers too //And also set a core props - ((HornetQMessage) tm).getCoreMessage().putBytesProperty("bytes", new byte[]{1, 2, 3}); + ((ActiveMQMessage) tm).getCoreMessage().putBytesProperty("bytes", new byte[]{1, 2, 3}); // We add some JMSX ones too @@ -1400,13 +1400,13 @@ public class JMSBridgeTest extends BridgeTestBase assertEquals(817217827L, tm.getLongProperty("blurg")); assertEquals((short) 26363, tm.getShortProperty("stst")); - assertEqualsByteArrays(new byte[]{1, 2, 3}, ((HornetQMessage) tm).getCoreMessage().getBytesProperty("bytes")); + assertEqualsByteArrays(new byte[]{1, 2, 3}, ((ActiveMQMessage) tm).getCoreMessage().getBytesProperty("bytes")); Assert.assertEquals("mygroup543", tm.getStringProperty("JMSXGroupID")); if (on) { - String header = tm.getStringProperty(HornetQJMSConstants.JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LIST); + String header = tm.getStringProperty(ActiveMQJMSConstants.JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LIST); Assert.assertNotNull(header); @@ -1452,11 +1452,11 @@ public class JMSBridgeTest extends BridgeTestBase assertEquals(817217827L, tm.getLongProperty("blurg")); assertEquals((short) 26363, tm.getShortProperty("stst")); - assertEqualsByteArrays(new byte[]{1, 2, 3}, ((HornetQMessage) tm).getCoreMessage().getBytesProperty("bytes")); + assertEqualsByteArrays(new byte[]{1, 2, 3}, ((ActiveMQMessage) tm).getCoreMessage().getBytesProperty("bytes")); Assert.assertEquals("mygroup543", tm.getStringProperty("JMSXGroupID")); - String header = tm.getStringProperty(HornetQJMSConstants.JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LIST); + String header = tm.getStringProperty(ActiveMQJMSConstants.JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LIST); Assert.assertNotNull(header); @@ -1758,7 +1758,7 @@ public class JMSBridgeTest extends BridgeTestBase Assert.assertTrue(tm.getBooleanProperty("cheese")); Assert.assertEquals(23, tm.getIntProperty("Sausages")); - String header = tm.getStringProperty(HornetQJMSConstants.JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LIST); + String header = tm.getStringProperty(ActiveMQJMSConstants.JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LIST); Assert.assertNull(header); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/AutoGroupingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/AutoGroupingTest.java index 05c1745925..cd3fcb70b7 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/AutoGroupingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/AutoGroupingTest.java @@ -16,9 +16,9 @@ import javax.jms.ConnectionFactory; import javax.jms.Message; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; -import org.apache.activemq.jms.client.HornetQJMSConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory; /** * A AutoGroupingTest @@ -33,10 +33,10 @@ public class AutoGroupingTest extends GroupingTest @Override protected ConnectionFactory getCF() throws Exception { - HornetQJMSConnectionFactory cf1 = - (HornetQJMSConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration( - INVM_CONNECTOR_FACTORY)); + ActiveMQJMSConnectionFactory cf1 = + (ActiveMQJMSConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration( + INVM_CONNECTOR_FACTORY)); cf1.setAutoGroup(true); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/CreateQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/CreateQueueTest.java index b59dbe0b63..a88718f4ca 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/CreateQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/CreateQueueTest.java @@ -18,7 +18,7 @@ import javax.jms.Queue; import javax.jms.Session; import javax.jms.Topic; -import org.apache.activemq.jms.client.HornetQDestination; +import org.apache.activemq.jms.client.ActiveMQDestination; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.JMSTestBase; import org.junit.Test; @@ -53,7 +53,7 @@ public class CreateQueueTest extends JMSTestBase String tempQueueName = tempQueue.getQueueName(); - assertFalse(tempQueueName.startsWith(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX)); + assertFalse(tempQueueName.startsWith(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX)); Queue replyQueue = session.createQueue(tempQueueName); @@ -80,7 +80,7 @@ public class CreateQueueTest extends JMSTestBase log.info("queue name is " + queueName); - assertFalse(queueName.startsWith(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX)); + assertFalse(queueName.startsWith(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX)); Queue replyQueue = session.createQueue(queueName); @@ -106,7 +106,7 @@ public class CreateQueueTest extends JMSTestBase String topicName = topic.getTopicName(); - assertFalse(topicName.startsWith(HornetQDestination.JMS_TOPIC_ADDRESS_PREFIX)); + assertFalse(topicName.startsWith(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX)); Topic replyTopic = session.createTopic(topicName); @@ -131,7 +131,7 @@ public class CreateQueueTest extends JMSTestBase String tempTopicName = tempTopic.getTopicName(); - assertFalse(tempTopicName.startsWith(HornetQDestination.JMS_TOPIC_ADDRESS_PREFIX)); + assertFalse(tempTopicName.startsWith(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX)); Topic replyTopic = session.createTopic(tempTopicName); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/GroupIDTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/GroupIDTest.java index 0a8a8cf8e3..2116ac5222 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/GroupIDTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/GroupIDTest.java @@ -18,9 +18,9 @@ import javax.jms.ConnectionFactory; import javax.jms.Message; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; -import org.apache.activemq.jms.client.HornetQJMSConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory; /** * A GroupIDTest @@ -35,7 +35,7 @@ public class GroupIDTest extends GroupingTest @Override protected ConnectionFactory getCF() throws Exception { - HornetQJMSConnectionFactory cf = (HornetQJMSConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ActiveMQJMSConnectionFactory cf = (ActiveMQJMSConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); cf.setGroupID("wibble"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/GroupingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/GroupingTest.java index 4a2a0cbcb5..3f6d939fd1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/GroupingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/GroupingTest.java @@ -23,9 +23,9 @@ import javax.jms.TextMessage; import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQMessage; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.util.JMSTestBase; import org.junit.After; @@ -63,7 +63,7 @@ public class GroupingTest extends JMSTestBase protected void setProperty(Message message) { - ((HornetQMessage)message).getCoreMessage().putStringProperty(org.apache.activemq.api.core.Message.HDR_GROUP_ID, new SimpleString("foo")); + ((ActiveMQMessage)message).getCoreMessage().putStringProperty(org.apache.activemq.api.core.Message.HDR_GROUP_ID, new SimpleString("foo")); } protected ConnectionFactory getCF() throws Exception @@ -135,7 +135,7 @@ public class GroupingTest extends JMSTestBase public void testManyGroups() throws Exception { ConnectionFactory fact = getCF(); - Assume.assumeFalse("only makes sense withOUT auto-group", ((HornetQConnectionFactory)fact).isAutoGroup()); + Assume.assumeFalse("only makes sense withOUT auto-group", ((ActiveMQConnectionFactory)fact).isAutoGroup()); Connection connection = fact.createConnection(); @@ -187,7 +187,7 @@ public class GroupingTest extends JMSTestBase @Test public void testGroupingRollbackOnClose() throws Exception { - HornetQConnectionFactory fact = (HornetQConnectionFactory) getCF(); + ActiveMQConnectionFactory fact = (ActiveMQConnectionFactory) getCF(); fact.setConsumerWindowSize(1000); fact.setTransactionBatchSize(0); Connection connection = fact.createConnection(); @@ -246,8 +246,8 @@ public class GroupingTest extends JMSTestBase //session.rollback(); //session.close(); //consume all msgs from 2nd first consumer - // ClientSession hqs = ((HornetQSession) session).getCoreSession(); - // ((DelegatingSession) hqs).getChannel().close(); + // ClientSession amqs = ((ActiveMQSession) session).getCoreSession(); + // ((DelegatingSession) amqs).getChannel().close(); rc.fail(new ActiveMQNotConnectedException()); for (int j = 0; j < 10; j++) { @@ -255,7 +255,7 @@ public class GroupingTest extends JMSTestBase assertNotNull(tm); - long text = ((HornetQTextMessage) tm).getCoreMessage().getMessageID(); + long text = ((ActiveMQTextMessage) tm).getCoreMessage().getMessageID(); System.out.println(tm.getJMSMessageID() + " text = " + text); //assertEquals("Message" + j, text); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/MessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/MessageTest.java index d0939b1962..24ee1d270d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/MessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/MessageTest.java @@ -21,7 +21,7 @@ import javax.jms.Queue; import javax.jms.Session; import javax.jms.StreamMessage; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.JMSTestBase; import org.junit.Assert; @@ -326,23 +326,23 @@ public class MessageTest extends JMSTestBase conn.start(); Session session1 = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE); - session1.createConsumer(HornetQJMSClient.createTopic("Topic1")); + session1.createConsumer(ActiveMQJMSClient.createTopic("Topic1")); Session session2 = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE); - session2.createConsumer(HornetQJMSClient.createTopic("*")); + session2.createConsumer(ActiveMQJMSClient.createTopic("*")); session1.close(); session2.close(); Session session3 = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE); - MessageConsumer cons = session3.createConsumer(HornetQJMSClient.createTopic("Topic1")); - MessageProducer prod = session3.createProducer(HornetQJMSClient.createTopic("Topic1")); - MessageConsumer consGeral = session3.createConsumer(HornetQJMSClient.createTopic("*")); + MessageConsumer cons = session3.createConsumer(ActiveMQJMSClient.createTopic("Topic1")); + MessageProducer prod = session3.createProducer(ActiveMQJMSClient.createTopic("Topic1")); + MessageConsumer consGeral = session3.createConsumer(ActiveMQJMSClient.createTopic("*")); prod.send(session3.createTextMessage("hello")); assertNotNull(cons.receive(5000)); assertNotNull(consGeral.receive(5000)); createTopic(true, "Topic2"); - MessageProducer prod2 = session3.createProducer(HornetQJMSClient.createTopic("Topic2")); + MessageProducer prod2 = session3.createProducer(ActiveMQJMSClient.createTopic("Topic2")); prod2.send(session3.createTextMessage("test")); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/PreACKJMSTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/PreACKJMSTest.java index e08f0f03da..f84762b084 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/PreACKJMSTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/PreACKJMSTest.java @@ -21,7 +21,7 @@ import java.util.ArrayList; import java.util.List; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.tests.util.JMSTestBase; import org.junit.After; @@ -179,34 +179,34 @@ public class PreACKJMSTest extends JMSTestBase JMSFactoryType.CF, connectors, null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, callTimeout, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, - HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, - HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, - HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, - HornetQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, + ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, + ActiveMQClient.DEFAULT_AUTO_GROUP, true, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, retryInterval, retryIntervalMultiplier, - HornetQClient.DEFAULT_MAX_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, reconnectAttempts, - HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, + ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, null, jndiBindings); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/ReSendMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/ReSendMessageTest.java index 18057ca0f2..3154d82d67 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/ReSendMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/ReSendMessageTest.java @@ -26,8 +26,8 @@ import java.util.ArrayList; import java.util.List; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; -import org.apache.activemq.api.jms.HornetQJMSConstants; +import org.apache.activemq.api.core.client.ActiveMQClient; +import org.apache.activemq.api.jms.ActiveMQJMSConstants; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.tests.util.JMSTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -68,8 +68,8 @@ public class ReSendMessageTest extends JMSTestBase for (int i = 0; i < 10; i++) { BytesMessage bm = sess.createBytesMessage(); - bm.setObjectProperty(HornetQJMSConstants.JMS_HORNETQ_INPUT_STREAM, - UnitTestCase.createFakeLargeStream(2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE)); + bm.setObjectProperty(ActiveMQJMSConstants.JMS_ACTIVEMQ_INPUT_STREAM, + UnitTestCase.createFakeLargeStream(2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE)); msgs.add(bm); MapMessage mm = sess.createMapMessage(); @@ -273,34 +273,34 @@ public class ReSendMessageTest extends JMSTestBase JMSFactoryType.CF, registerConnectors(server, connectorConfigs), null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, callTimeout, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, true, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, - HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, - HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, - HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, + ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, retryInterval, retryIntervalMultiplier, - HornetQClient.DEFAULT_MAX_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, reconnectAttempts, - HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, + ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, null, jndiBindings); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/RemoteConnectionStressTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/RemoteConnectionStressTest.java index 079bcb44f5..2bcf0ba54f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/RemoteConnectionStressTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/RemoteConnectionStressTest.java @@ -22,12 +22,12 @@ import javax.management.MBeanServer; import javax.management.MBeanServerFactory; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.tests.unit.util.InVMNamingContext; import org.apache.activemq.tests.util.ServiceTestBase; @@ -43,7 +43,7 @@ public class RemoteConnectionStressTest extends ServiceTestBase { - HornetQServer server; + ActiveMQServer server; MBeanServer mbeanServer; JMSServerManagerImpl jmsServer; @@ -57,7 +57,7 @@ public class RemoteConnectionStressTest extends ServiceTestBase mbeanServer = MBeanServerFactory.createMBeanServer(); - server = HornetQServers.newHornetQServer(conf, mbeanServer, false); + server = ActiveMQServers.newActiveMQServer(conf, mbeanServer, false); InVMNamingContext namingContext = new InVMNamingContext(); jmsServer = new JMSServerManagerImpl(server); @@ -84,7 +84,7 @@ public class RemoteConnectionStressTest extends ServiceTestBase TransportConfiguration config = new TransportConfiguration(NETTY_CONNECTOR_FACTORY); - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, config); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, config); cf.setInitialConnectAttempts(10); cf.setRetryInterval(100); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java index 7602f7800e..16cc5e9fe9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java @@ -29,10 +29,10 @@ import javax.jms.Session; import org.junit.Assert; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.client.impl.ClientSessionInternal; -import org.apache.activemq.jms.client.HornetQSession; +import org.apache.activemq.jms.client.ActiveMQSession; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.JMSTestBase; @@ -71,34 +71,34 @@ public class SessionClosedOnRemotingConnectionFailureTest extends JMSTestBase JMSFactoryType.CF, registerConnectors(server, connectorConfigs), null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, - HornetQClient.DEFAULT_CALL_TIMEOUT, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, - HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, - HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, - HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_RETRY_INTERVAL, - HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, - HornetQClient.DEFAULT_MAX_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CALL_TIMEOUT, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, + ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, 0, - HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, + ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, null, "/cffoo"); @@ -124,7 +124,7 @@ public class SessionClosedOnRemotingConnectionFailureTest extends JMSTestBase // Now fail the underlying connection - RemotingConnection connection = ((ClientSessionInternal)((HornetQSession)session).getCoreSession()).getConnection(); + RemotingConnection connection = ((ClientSessionInternal)((ActiveMQSession)session).getCoreSession()).getConnection(); connection.fail(new ActiveMQNotConnectedException()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/SessionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/SessionTest.java index 4c82700d56..f9c6893041 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/SessionTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/SessionTest.java @@ -18,7 +18,7 @@ import javax.jms.QueueSession; import javax.jms.Session; import javax.jms.Topic; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.tests.util.JMSTestBase; import org.junit.Test; @@ -36,12 +36,12 @@ public class SessionTest extends JMSTestBase Connection defaultConn = null; QueueConnection qConn = null; Connection connClientID = null; - HornetQConnectionFactory hqCF = (HornetQConnectionFactory) cf; + ActiveMQConnectionFactory activeMQConnectionFactory = (ActiveMQConnectionFactory) cf; try { String clientID = "somethingElse" + name.getMethodName(); defaultConn = cf.createConnection(); - qConn = hqCF.createQueueConnection(); + qConn = activeMQConnectionFactory.createQueueConnection(); connClientID = cf.createConnection(); connClientID.setClientID(clientID); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/TextMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/TextMessageTest.java index a6fd633fc2..29f4bb691b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/TextMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/TextMessageTest.java @@ -20,7 +20,7 @@ import javax.jms.TextMessage; import java.util.List; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.tests.util.JMSTestBase; import org.apache.activemq.tests.util.RandomUtil; @@ -214,34 +214,34 @@ public class TextMessageTest extends JMSTestBase JMSFactoryType.CF, registerConnectors(server, connectorConfigs), null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, callTimeout, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, true, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, - HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, - HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, - HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, + ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, retryInterval, retryIntervalMultiplier, - HornetQClient.DEFAULT_MAX_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, reconnectAttempts, - HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, + ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, null, jndiBindings); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/TopicCleanupTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/TopicCleanupTest.java index 9d03ccec53..3512e0570c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/TopicCleanupTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/client/TopicCleanupTest.java @@ -24,7 +24,7 @@ import org.apache.activemq.core.filter.impl.FilterImpl; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.impl.LocalQueueBinding; import org.apache.activemq.core.server.Queue; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.QueueImpl; import org.apache.activemq.tests.util.JMSTestBase; import org.junit.Test; @@ -78,7 +78,7 @@ public class TopicCleanupTest extends JMSTestBase { long txid = storage.generateID(); - final Queue queue = new QueueImpl(storage.generateID(), SimpleString.toSimpleString("jms.topic.topic"), SimpleString.toSimpleString("jms.topic.topic"), FilterImpl.createFilter(HornetQServerImpl.GENERIC_IGNORED_FILTER), true, false, server.getScheduledPool(), server.getPostOffice(), + final Queue queue = new QueueImpl(storage.generateID(), SimpleString.toSimpleString("jms.topic.topic"), SimpleString.toSimpleString("jms.topic.topic"), FilterImpl.createFilter(ActiveMQServerImpl.GENERIC_IGNORED_FILTER), true, false, server.getScheduledPool(), server.getPostOffice(), storage, server.getAddressSettingsRepository(), server.getExecutorFactory().getExecutor()); LocalQueueBinding binding = new LocalQueueBinding(queue.getAddress(), queue, server.getNodeID()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/BindingsClusterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/BindingsClusterTest.java index 7beb44b08f..639df9ce08 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/BindingsClusterTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/BindingsClusterTest.java @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.jms.cluster; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.remoting.FailureListener; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; @@ -65,8 +65,8 @@ public class BindingsClusterTest extends JMSClusteredTestBase { //todo fix if needed super.setUp(); - jmsServer1.getHornetQServer().setIdentity("Server 1"); - jmsServer2.getHornetQServer().setIdentity("Server 2"); + jmsServer1.getActiveMQServer().setIdentity("Server 1"); + jmsServer2.getActiveMQServer().setIdentity("Server 2"); } @Override @@ -119,12 +119,12 @@ public class BindingsClusterTest extends JMSClusteredTestBase prod1.send(session1.createTextMessage("m1")); - printBindings(jmsServer1.getHornetQServer(), "jms.topic.t1"); - printBindings(jmsServer2.getHornetQServer(), "jms.topic.t1"); + printBindings(jmsServer1.getActiveMQServer(), "jms.topic.t1"); + printBindings(jmsServer2.getActiveMQServer(), "jms.topic.t1"); crash(); - printBindings(jmsServer1.getHornetQServer(), "jms.topic.t1"); + printBindings(jmsServer1.getActiveMQServer(), "jms.topic.t1"); prod1.send(session1.createTextMessage("m2")); @@ -132,13 +132,13 @@ public class BindingsClusterTest extends JMSClusteredTestBase Thread.sleep(2000); - printBindings(jmsServer1.getHornetQServer(), "jms.topic.t1"); - printBindings(jmsServer2.getHornetQServer(), "jms.topic.t1"); + printBindings(jmsServer1.getActiveMQServer(), "jms.topic.t1"); + printBindings(jmsServer2.getActiveMQServer(), "jms.topic.t1"); prod1.send(session1.createTextMessage("m3")); - cf2 = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(InVMConnectorFactory.class.getName(), - generateInVMParams(1))); + cf2 = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(InVMConnectorFactory.class.getName(), + generateInVMParams(1))); conn2 = cf2.createConnection(); @@ -226,12 +226,12 @@ public class BindingsClusterTest extends JMSClusteredTestBase prod1.send(session1.createTextMessage("m1")); - printBindings(jmsServer1.getHornetQServer(), "jms.topic.t1"); - printBindings(jmsServer2.getHornetQServer(), "jms.topic.t1"); + printBindings(jmsServer1.getActiveMQServer(), "jms.topic.t1"); + printBindings(jmsServer2.getActiveMQServer(), "jms.topic.t1"); crash(); - printBindings(jmsServer1.getHornetQServer(), "jms.topic.t1"); + printBindings(jmsServer1.getActiveMQServer(), "jms.topic.t1"); //send a few messages while the binding is disconnected prod1.send(session1.createTextMessage("m2")); @@ -242,14 +242,14 @@ public class BindingsClusterTest extends JMSClusteredTestBase Thread.sleep(2000); - printBindings(jmsServer1.getHornetQServer(), "jms.topic.t1"); - printBindings(jmsServer2.getHornetQServer(), "jms.topic.t1"); + printBindings(jmsServer1.getActiveMQServer(), "jms.topic.t1"); + printBindings(jmsServer2.getActiveMQServer(), "jms.topic.t1"); prod1.send(session1.createTextMessage("m5")); prod1.send(session1.createTextMessage("m6")); - cf2 = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(InVMConnectorFactory.class.getName(), - generateInVMParams(1))); + cf2 = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(InVMConnectorFactory.class.getName(), + generateInVMParams(1))); conn2 = cf2.createConnection(); @@ -349,15 +349,15 @@ public class BindingsClusterTest extends JMSClusteredTestBase prod1.send(session1.createTextMessage("m2")); - printBindings(jmsServer1.getHornetQServer(), "jms.topic.t1"); - printBindings(jmsServer2.getHornetQServer(), "jms.topic.t1"); + printBindings(jmsServer1.getActiveMQServer(), "jms.topic.t1"); + printBindings(jmsServer2.getActiveMQServer(), "jms.topic.t1"); crash(); //this may or may not be closed, if the server was crashed then it would have been closed on failure. cons2.close(); - printBindings(jmsServer1.getHornetQServer(), "jms.topic.t1"); + printBindings(jmsServer1.getActiveMQServer(), "jms.topic.t1"); //send a few messages while the binding is disconnected prod1.send(session1.createTextMessage("m3")); @@ -368,8 +368,8 @@ public class BindingsClusterTest extends JMSClusteredTestBase Thread.sleep(2000); - printBindings(jmsServer1.getHornetQServer(), "jms.topic.t1"); - printBindings(jmsServer2.getHornetQServer(), "jms.topic.t1"); + printBindings(jmsServer1.getActiveMQServer(), "jms.topic.t1"); + printBindings(jmsServer2.getActiveMQServer(), "jms.topic.t1"); prod1.send(session1.createTextMessage("m6")); prod1.send(session1.createTextMessage("m7")); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/JMSFailoverListenerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/JMSFailoverListenerTest.java index 2324a6c8c7..d547b27317 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/JMSFailoverListenerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/JMSFailoverListenerTest.java @@ -31,20 +31,20 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.FailoverEventListener; import org.apache.activemq.api.core.client.FailoverEventType; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration; import org.apache.activemq.core.remoting.impl.invm.InVMRegistry; import org.apache.activemq.core.remoting.impl.invm.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.impl.InVMNodeManager; -import org.apache.activemq.jms.client.HornetQConnection; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQSession; +import org.apache.activemq.jms.client.ActiveMQConnection; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQSession; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.tests.integration.IntegrationTestLogger; @@ -84,11 +84,11 @@ public class JMSFailoverListenerTest extends ServiceTestBase protected JMSServerManager liveJMSService; - protected HornetQServer liveService; + protected ActiveMQServer liveService; protected JMSServerManager backupJMSService; - protected HornetQServer backupService; + protected ActiveMQServer backupService; protected Map backupParams = new HashMap(); @@ -110,7 +110,7 @@ public class JMSFailoverListenerTest extends ServiceTestBase @Test public void testAutomaticFailover() throws Exception { - HornetQConnectionFactory jbcf = HornetQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, livetc); + ActiveMQConnectionFactory jbcf = ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, livetc); jbcf.setReconnectAttempts(-1); jbcf.setBlockOnDurableSend(true); jbcf.setBlockOnNonDurableSend(true); @@ -125,7 +125,7 @@ public class JMSFailoverListenerTest extends ServiceTestBase jbcf.setConsumerWindowSize(numMessages * bodySize / 10); - HornetQConnection conn = JMSUtil.createConnectionAndWaitForTopology(jbcf, 2, 5); + ActiveMQConnection conn = JMSUtil.createConnectionAndWaitForTopology(jbcf, 2, 5); MyFailoverListener listener = new MyFailoverListener(); @@ -133,9 +133,9 @@ public class JMSFailoverListenerTest extends ServiceTestBase Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - ClientSession coreSession = ((HornetQSession) sess).getCoreSession(); + ClientSession coreSession = ((ActiveMQSession) sess).getCoreSession(); - SimpleString jmsQueueName = new SimpleString(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX + "myqueue"); + SimpleString jmsQueueName = new SimpleString(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX + "myqueue"); coreSession.createQueue(jmsQueueName, jmsQueueName, null, true); @@ -164,7 +164,7 @@ public class JMSFailoverListenerTest extends ServiceTestBase Thread.sleep(2000); - JMSUtil.crash(liveService, ((HornetQSession) sess).getCoreSession()); + JMSUtil.crash(liveService, ((ActiveMQSession) sess).getCoreSession()); Assert.assertEquals(FailoverEventType.FAILURE_DETECTED, listener.get(0)); for (int i = 0; i < numMessages; i++) @@ -190,23 +190,23 @@ public class JMSFailoverListenerTest extends ServiceTestBase @Test public void testManualFailover() throws Exception { - HornetQConnectionFactory jbcfLive = - HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ActiveMQConnectionFactory jbcfLive = + ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(INVM_CONNECTOR_FACTORY)); jbcfLive.setBlockOnNonDurableSend(true); jbcfLive.setBlockOnDurableSend(true); - HornetQConnectionFactory jbcfBackup = - HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(INVM_CONNECTOR_FACTORY, - backupParams)); + ActiveMQConnectionFactory jbcfBackup = + ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(INVM_CONNECTOR_FACTORY, + backupParams)); jbcfBackup.setBlockOnNonDurableSend(true); jbcfBackup.setBlockOnDurableSend(true); jbcfBackup.setInitialConnectAttempts(-1); jbcfBackup.setReconnectAttempts(-1); - HornetQConnection connLive = (HornetQConnection) jbcfLive.createConnection(); + ActiveMQConnection connLive = (ActiveMQConnection) jbcfLive.createConnection(); MyFailoverListener listener = new MyFailoverListener(); @@ -214,9 +214,9 @@ public class JMSFailoverListenerTest extends ServiceTestBase Session sessLive = connLive.createSession(false, Session.AUTO_ACKNOWLEDGE); - ClientSession coreSessionLive = ((HornetQSession) sessLive).getCoreSession(); + ClientSession coreSessionLive = ((ActiveMQSession) sessLive).getCoreSession(); - SimpleString jmsQueueName = new SimpleString(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX + "myqueue"); + SimpleString jmsQueueName = new SimpleString(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX + "myqueue"); coreSessionLive.createQueue(jmsQueueName, jmsQueueName, null, true); @@ -313,7 +313,7 @@ public class JMSFailoverListenerTest extends ServiceTestBase backupJMSService.setContext(ctx2); - backupJMSService.getHornetQServer().setIdentity("JMSBackup"); + backupJMSService.getActiveMQServer().setIdentity("JMSBackup"); log.info("Starting backup"); backupJMSService.start(); @@ -338,7 +338,7 @@ public class JMSFailoverListenerTest extends ServiceTestBase liveJMSService.setContext(ctx1); - liveJMSService.getHornetQServer().setIdentity("JMSLive"); + liveJMSService.getActiveMQServer().setIdentity("JMSLive"); log.info("Starting life"); liveJMSService.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/JMSFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/JMSFailoverTest.java index b220b2eabc..ff7ce7b2a7 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/JMSFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/JMSFailoverTest.java @@ -33,7 +33,7 @@ import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.client.impl.ClientSessionInternal; import org.apache.activemq.core.config.Configuration; @@ -45,12 +45,12 @@ import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionReceiveContinuationMessage; import org.apache.activemq.core.remoting.impl.invm.InVMRegistry; import org.apache.activemq.core.remoting.impl.invm.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.core.server.impl.InVMNodeManager; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQSession; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQSession; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.spi.core.protocol.RemotingConnection; @@ -93,11 +93,11 @@ public class JMSFailoverTest extends ServiceTestBase protected JMSServerManager liveJMSService; - protected HornetQServer liveService; + protected ActiveMQServer liveService; protected JMSServerManager backupJMSService; - protected HornetQServer backupService; + protected ActiveMQServer backupService; protected Map backupParams = new HashMap(); @@ -121,7 +121,7 @@ public class JMSFailoverTest extends ServiceTestBase liveJMSService.createQueue(true, "queue1", null, true, "/queue/queue1"); assertNotNull(ctx1.lookup("/queue/queue1")); - HornetQConnectionFactory jbcf = HornetQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, livetc); + ActiveMQConnectionFactory jbcf = ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, livetc); jbcf.setReconnectAttempts(-1); @@ -133,7 +133,7 @@ public class JMSFailoverTest extends ServiceTestBase Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - ClientSession coreSession = ((HornetQSession) sess).getCoreSession(); + ClientSession coreSession = ((ActiveMQSession) sess).getCoreSession(); JMSUtil.crash(liveService, coreSession); @@ -154,7 +154,7 @@ public class JMSFailoverTest extends ServiceTestBase liveJMSService.createTopic(true, "topic", "/topic/t1"); assertNotNull(ctx1.lookup("//topic/t1")); - HornetQConnectionFactory jbcf = HornetQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, livetc); + ActiveMQConnectionFactory jbcf = ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, livetc); jbcf.setReconnectAttempts(-1); @@ -166,7 +166,7 @@ public class JMSFailoverTest extends ServiceTestBase Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - ClientSession coreSession = ((HornetQSession) sess).getCoreSession(); + ClientSession coreSession = ((ActiveMQSession) sess).getCoreSession(); JMSUtil.crash(liveService, coreSession); @@ -184,7 +184,7 @@ public class JMSFailoverTest extends ServiceTestBase @Test public void testAutomaticFailover() throws Exception { - HornetQConnectionFactory jbcf = HornetQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, livetc); + ActiveMQConnectionFactory jbcf = ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, livetc); jbcf.setReconnectAttempts(-1); jbcf.setBlockOnDurableSend(true); jbcf.setBlockOnNonDurableSend(true); @@ -207,9 +207,9 @@ public class JMSFailoverTest extends ServiceTestBase Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - ClientSession coreSession = ((HornetQSession) sess).getCoreSession(); + ClientSession coreSession = ((ActiveMQSession) sess).getCoreSession(); - SimpleString jmsQueueName = new SimpleString(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX + "myqueue"); + SimpleString jmsQueueName = new SimpleString(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX + "myqueue"); coreSession.createQueue(jmsQueueName, jmsQueueName, null, true); @@ -238,7 +238,7 @@ public class JMSFailoverTest extends ServiceTestBase Thread.sleep(2000); - JMSUtil.crash(liveService, ((HornetQSession) sess).getCoreSession()); + JMSUtil.crash(liveService, ((ActiveMQSession) sess).getCoreSession()); for (int i = 0; i < numMessages; i++) { @@ -262,17 +262,17 @@ public class JMSFailoverTest extends ServiceTestBase @Test public void testManualFailover() throws Exception { - HornetQConnectionFactory jbcfLive = - HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ActiveMQConnectionFactory jbcfLive = + ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(INVM_CONNECTOR_FACTORY)); jbcfLive.setBlockOnNonDurableSend(true); jbcfLive.setBlockOnDurableSend(true); - HornetQConnectionFactory jbcfBackup = - HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(INVM_CONNECTOR_FACTORY, - backupParams)); + ActiveMQConnectionFactory jbcfBackup = + ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(INVM_CONNECTOR_FACTORY, + backupParams)); jbcfBackup.setBlockOnNonDurableSend(true); jbcfBackup.setBlockOnDurableSend(true); jbcfBackup.setInitialConnectAttempts(-1); @@ -286,11 +286,11 @@ public class JMSFailoverTest extends ServiceTestBase Session sessLive = connLive.createSession(false, Session.AUTO_ACKNOWLEDGE); - ClientSession coreSessionLive = ((HornetQSession) sessLive).getCoreSession(); + ClientSession coreSessionLive = ((ActiveMQSession) sessLive).getCoreSession(); RemotingConnection coreConnLive = ((ClientSessionInternal) coreSessionLive).getConnection(); - SimpleString jmsQueueName = new SimpleString(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX + "myqueue"); + SimpleString jmsQueueName = new SimpleString(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX + "myqueue"); coreSessionLive.createQueue(jmsQueueName, jmsQueueName, null, true); @@ -345,7 +345,7 @@ public class JMSFailoverTest extends ServiceTestBase { SimpleString QUEUE = new SimpleString("jms.queue.somequeue"); - HornetQConnectionFactory jbcf = HornetQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, livetc, backuptc); + ActiveMQConnectionFactory jbcf = ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, livetc, backuptc); jbcf.setReconnectAttempts(-1); jbcf.setBlockOnDurableSend(true); jbcf.setBlockOnNonDurableSend(true); @@ -384,7 +384,7 @@ public class JMSFailoverTest extends ServiceTestBase Connection conn = JMSUtil.createConnectionAndWaitForTopology(jbcf, 2, 5); Session sess = conn.createSession(true, Session.SESSION_TRANSACTED); - final ClientSession coreSession = ((HornetQSession) sess).getCoreSession(); + final ClientSession coreSession = ((ActiveMQSession) sess).getCoreSession(); // The thread that will fail the server @@ -541,7 +541,7 @@ public class JMSFailoverTest extends ServiceTestBase backupJMSService.setContext(ctx2); - backupJMSService.getHornetQServer().setIdentity("JMSBackup"); + backupJMSService.getActiveMQServer().setIdentity("JMSBackup"); log.info("Starting backup"); backupJMSService.start(); @@ -567,7 +567,7 @@ public class JMSFailoverTest extends ServiceTestBase liveJMSService.setContext(ctx1); - liveJMSService.getHornetQServer().setIdentity("JMSLive"); + liveJMSService.getActiveMQServer().setIdentity("JMSLive"); log.info("Starting life"); liveJMSService.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/JMSReconnectTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/JMSReconnectTest.java index f39a1e69e0..72000d51f7 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/JMSReconnectTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/JMSReconnectTest.java @@ -36,16 +36,16 @@ import org.junit.Assert; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.client.impl.ClientSessionInternal; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMRegistry; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQSession; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQSession; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.UnitTestCase; @@ -61,7 +61,7 @@ import org.apache.activemq.tests.util.UnitTestCase; public class JMSReconnectTest extends UnitTestCase { - private HornetQServer liveService; + private ActiveMQServer liveService; //In this test we re-attach to the same node without restarting the server @Test @@ -79,7 +79,7 @@ public class JMSReconnectTest extends UnitTestCase private void testReconnectOrReattachSameNode(boolean reattach) throws Exception { - HornetQConnectionFactory jbcf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); + ActiveMQConnectionFactory jbcf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); jbcf.setBlockOnDurableSend(true); jbcf.setBlockOnNonDurableSend(true); @@ -109,11 +109,11 @@ public class JMSReconnectTest extends UnitTestCase Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - ClientSession coreSession = ((HornetQSession)sess).getCoreSession(); + ClientSession coreSession = ((ActiveMQSession)sess).getCoreSession(); RemotingConnection coreConn = ((ClientSessionInternal)coreSession).getConnection(); - SimpleString jmsQueueName = new SimpleString(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX + "myqueue"); + SimpleString jmsQueueName = new SimpleString(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX + "myqueue"); coreSession.createQueue(jmsQueueName, jmsQueueName, null, true); @@ -183,7 +183,7 @@ public class JMSReconnectTest extends UnitTestCase //Test that non durable JMS sub gets recreated in auto reconnect private void testReconnectSameNodeServerRestartedWithNonDurableSubOrTempQueue(final boolean nonDurableSub) throws Exception { - HornetQConnectionFactory jbcf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); + ActiveMQConnectionFactory jbcf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); jbcf.setReconnectAttempts(-1); @@ -195,15 +195,15 @@ public class JMSReconnectTest extends UnitTestCase Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - ClientSession coreSession = ((HornetQSession)sess).getCoreSession(); + ClientSession coreSession = ((ActiveMQSession)sess).getCoreSession(); Destination dest; if (nonDurableSub) { - coreSession.createQueue(HornetQDestination.JMS_TOPIC_ADDRESS_PREFIX + "mytopic", "blahblah", null, false); + coreSession.createQueue(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX + "mytopic", "blahblah", null, false); - dest = HornetQJMSClient.createTopic("mytopic"); + dest = ActiveMQJMSClient.createTopic("mytopic"); } else { @@ -259,7 +259,7 @@ public class JMSReconnectTest extends UnitTestCase @Test public void testNoReconnectCloseAfterFailToReconnectWithTopicConsumer() throws Exception { - HornetQConnectionFactory jbcf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); + ActiveMQConnectionFactory jbcf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); jbcf.setReconnectAttempts(0); @@ -267,11 +267,11 @@ public class JMSReconnectTest extends UnitTestCase Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - ClientSession coreSession = ((HornetQSession)sess).getCoreSession(); + ClientSession coreSession = ((ActiveMQSession)sess).getCoreSession(); - coreSession.createQueue(HornetQDestination.JMS_TOPIC_ADDRESS_PREFIX + "mytopic", "blahblah", null, false); + coreSession.createQueue(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX + "mytopic", "blahblah", null, false); - Topic topic = HornetQJMSClient.createTopic("mytopic"); + Topic topic = ActiveMQJMSClient.createTopic("mytopic"); //Create a non durable subscriber sess.createConsumer(topic); @@ -291,7 +291,7 @@ public class JMSReconnectTest extends UnitTestCase @Test public void testNoReconnectCloseAfterFailToReconnectWithTempQueue() throws Exception { - HornetQConnectionFactory jbcf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); + ActiveMQConnectionFactory jbcf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); jbcf.setReconnectAttempts(0); @@ -332,7 +332,7 @@ public class JMSReconnectTest extends UnitTestCase .setPagingDirectory(getPageDir()) .setLargeMessagesDirectory(getLargeMessagesDir()); - liveService = HornetQServers.newHornetQServer(liveConf, true); + liveService = ActiveMQServers.newActiveMQServer(liveConf, true); liveService.start(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/LargeMessageOverBridgeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/LargeMessageOverBridgeTest.java index 64ebbc2d03..031d866afb 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/LargeMessageOverBridgeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/LargeMessageOverBridgeTest.java @@ -21,11 +21,11 @@ import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.config.ClusterConnectionConfiguration; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.tests.util.JMSClusteredTestBase; import org.junit.Test; @@ -185,7 +185,7 @@ public class LargeMessageOverBridgeTest extends JMSClusteredTestBase Queue queue = (Queue) context1.lookup("queue/Q1"); - HornetQConnectionFactory cf1 = HornetQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY, generateInVMParams(0))); + ActiveMQConnectionFactory cf1 = ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY, generateInVMParams(0))); cf1.setMinLargeMessageSize(200 * 1024); Connection conn1 = cf1.createConnection(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/MultipleThreadsOpeningTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/MultipleThreadsOpeningTest.java index aa645e47b8..790f54a266 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/MultipleThreadsOpeningTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/MultipleThreadsOpeningTest.java @@ -17,7 +17,7 @@ import javax.jms.Session; import java.util.concurrent.CountDownLatch; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; import org.apache.activemq.tests.util.JMSClusteredTestBase; @@ -34,8 +34,8 @@ public class MultipleThreadsOpeningTest extends JMSClusteredTestBase @Test public void testMultipleOpen() throws Exception { - cf1 = HornetQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, new TransportConfiguration(InVMConnectorFactory.class.getName(), - generateInVMParams(0))); + cf1 = ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, new TransportConfiguration(InVMConnectorFactory.class.getName(), + generateInVMParams(0))); final int numberOfOpens = 2000; int numberOfThreads = 20; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/ReplicatedJMSFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/ReplicatedJMSFailoverTest.java index 4157f81dbf..6fcef5e87b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/ReplicatedJMSFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/cluster/ReplicatedJMSFailoverTest.java @@ -16,7 +16,7 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.ha.ReplicaPolicyConfiguration; import org.apache.activemq.core.config.ha.ReplicatedPolicyConfiguration; import org.apache.activemq.core.remoting.impl.invm.TransportConstants; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; /** @@ -47,7 +47,7 @@ public class ReplicatedJMSFailoverTest extends JMSFailoverTest .setLargeMessagesDirectory(getLargeMessagesDir(0, true)) .setHAPolicyConfiguration(new ReplicaPolicyConfiguration()); - backupService = HornetQServers.newHornetQServer(backupConf, true); + backupService = ActiveMQServers.newActiveMQServer(backupConf, true); backupJMSService = new JMSServerManagerImpl(backupService); @@ -66,7 +66,7 @@ public class ReplicatedJMSFailoverTest extends JMSFailoverTest .setLargeMessagesDirectory(getLargeMessagesDir(0, false)) .setHAPolicyConfiguration(new ReplicatedPolicyConfiguration()); - liveService = HornetQServers.newHornetQServer(liveConf, true); + liveService = ActiveMQServers.newActiveMQServer(liveConf, true); liveJMSService = new JMSServerManagerImpl(liveService); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/CloseConnectionFactoryOnGCest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/CloseConnectionFactoryOnGCest.java index 68f9a8f005..de60e1b167 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/CloseConnectionFactoryOnGCest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/CloseConnectionFactoryOnGCest.java @@ -17,10 +17,10 @@ import java.util.concurrent.atomic.AtomicInteger; import javax.jms.Connection; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.client.impl.ServerLocatorImpl; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.tests.util.JMSTestBase; /** @@ -52,8 +52,8 @@ public class CloseConnectionFactoryOnGCest extends JMSTestBase // System.setOut(out); for (int i = 0; i < 100; i++) { - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); Connection conn = cf.createConnection(); cf = null; conn.close(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/CloseConnectionOnGCTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/CloseConnectionOnGCTest.java index 7e676adb6a..5bc81f616e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/CloseConnectionOnGCTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/CloseConnectionOnGCTest.java @@ -27,10 +27,10 @@ import javax.jms.Session; import org.junit.Assert; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.remoting.CloseListener; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.util.JMSTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -45,7 +45,7 @@ import org.apache.activemq.tests.util.UnitTestCase; */ public class CloseConnectionOnGCTest extends JMSTestBase { - private HornetQConnectionFactory cf; + private ActiveMQConnectionFactory cf; @Override @Before @@ -53,7 +53,7 @@ public class CloseConnectionOnGCTest extends JMSTestBase { super.setUp(); - cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); + cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); cf.setBlockOnDurableSend(true); cf.setPreAcknowledge(true); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/CloseDestroyedConnectionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/CloseDestroyedConnectionTest.java index 3c23a02e23..7654448c1d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/CloseDestroyedConnectionTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/CloseDestroyedConnectionTest.java @@ -28,12 +28,12 @@ import org.junit.Assert; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.client.impl.ClientSessionInternal; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQSession; -import org.apache.activemq.jms.client.HornetQTemporaryTopic; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQSession; +import org.apache.activemq.jms.client.ActiveMQTemporaryTopic; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.util.JMSTestBase; @@ -42,10 +42,10 @@ import org.apache.activemq.tests.util.JMSTestBase; */ public class CloseDestroyedConnectionTest extends JMSTestBase { - private HornetQConnectionFactory cf; - private HornetQSession session1; + private ActiveMQConnectionFactory cf; + private ActiveMQSession session1; private Connection conn2; - private HornetQSession session2; + private ActiveMQSession session2; @Override @Before @@ -54,8 +54,8 @@ public class CloseDestroyedConnectionTest extends JMSTestBase super.setUp(); cf = - HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(INVM_CONNECTOR_FACTORY)); cf.setBlockOnDurableSend(true); cf.setPreAcknowledge(true); } @@ -84,13 +84,13 @@ public class CloseDestroyedConnectionTest extends JMSTestBase Assert.assertEquals(1, server.getRemotingService().getConnections().size()); - session1 = (HornetQSession)conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - HornetQTemporaryTopic topic = (HornetQTemporaryTopic)session1.createTemporaryTopic(); + session1 = (ActiveMQSession)conn.createSession(false, Session.AUTO_ACKNOWLEDGE); + ActiveMQTemporaryTopic topic = (ActiveMQTemporaryTopic)session1.createTemporaryTopic(); String address = topic.getAddress(); session1.close(); conn.close(); conn2 = cf.createConnection(); - session2 = (HornetQSession)conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); + session2 = (ActiveMQSession)conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); ClientSession cs = session2.getCoreSession(); try @@ -126,7 +126,7 @@ public class CloseDestroyedConnectionTest extends JMSTestBase String queueName = "myqueue"; - Queue queue = HornetQJMSClient.createQueue(queueName); + Queue queue = ActiveMQJMSClient.createQueue(queueName); super.createQueue(queueName); @@ -138,7 +138,7 @@ public class CloseDestroyedConnectionTest extends JMSTestBase // Now fail the underlying connection - ClientSessionInternal sessi = (ClientSessionInternal)((HornetQSession)sess).getCoreSession(); + ClientSessionInternal sessi = (ClientSessionInternal)((ActiveMQSession)sess).getCoreSession(); RemotingConnection rc = sessi.getConnection(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ConcurrentSessionCloseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ConcurrentSessionCloseTest.java index dd2275bdee..a1a10caa67 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ConcurrentSessionCloseTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ConcurrentSessionCloseTest.java @@ -22,9 +22,9 @@ import javax.jms.Connection; import javax.jms.Session; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.tests.util.JMSTestBase; /** @@ -37,7 +37,7 @@ import org.apache.activemq.tests.util.JMSTestBase; */ public class ConcurrentSessionCloseTest extends JMSTestBase { - private HornetQConnectionFactory cf; + private ActiveMQConnectionFactory cf; @Override @Before @@ -46,8 +46,8 @@ public class ConcurrentSessionCloseTest extends JMSTestBase super.setUp(); cf = - HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(INVM_CONNECTOR_FACTORY)); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ConnectionFactorySerializationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ConnectionFactorySerializationTest.java index cb8e95991a..0592f8e9a7 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ConnectionFactorySerializationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ConnectionFactorySerializationTest.java @@ -26,7 +26,7 @@ import java.util.List; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration; import org.apache.activemq.api.jms.JMSFactoryType; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.tests.util.JMSTestBase; import org.junit.Assert; import org.junit.Before; @@ -42,7 +42,7 @@ public class ConnectionFactorySerializationTest extends JMSTestBase // Static -------------------------------------------------------- // Attributes ---------------------------------------------------- - protected static HornetQConnectionFactory cf; + protected static ActiveMQConnectionFactory cf; // Constructors -------------------------------------------------- @Override @@ -71,7 +71,7 @@ public class ConnectionFactorySerializationTest extends JMSTestBase .setDiscoveryInitialWaitTimeout(5000) .setBroadcastEndpointFactoryConfiguration(config); - jmsServer.getHornetQServer().getConfiguration().getDiscoveryGroupConfigurations().put(dcConfig.getName(), dcConfig); + jmsServer.getActiveMQServer().getConfiguration().getDiscoveryGroupConfigurations().put(dcConfig.getName(), dcConfig); jmsServer.createConnectionFactory("MyConnectionFactory", false, @@ -91,12 +91,12 @@ public class ConnectionFactorySerializationTest extends JMSTestBase @Test public void testNullLocalBindAddress() throws Exception { - cf = (HornetQConnectionFactory) namingContext.lookup("/MyConnectionFactory"); + cf = (ActiveMQConnectionFactory) namingContext.lookup("/MyConnectionFactory"); // apparently looking up the connection factory with the org.apache.activemq.jms.tests.tools.container.InVMInitialContextFactory // is not enough to actually serialize it so we serialize it manually byte[] x = serialize(cf); - HornetQConnectionFactory y = deserialize(x, HornetQConnectionFactory.class); + ActiveMQConnectionFactory y = deserialize(x, ActiveMQConnectionFactory.class); Assert.assertEquals(null, ((UDPBroadcastGroupConfiguration) y.getDiscoveryGroupConfiguration().getBroadcastEndpointFactoryConfiguration()).getLocalBindAddress()); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ConnectionFactoryWithJGroupsSerializationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ConnectionFactoryWithJGroupsSerializationTest.java index fdc195117a..de2621d8d1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ConnectionFactoryWithJGroupsSerializationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ConnectionFactoryWithJGroupsSerializationTest.java @@ -25,7 +25,7 @@ import org.apache.activemq.api.core.BroadcastEndpointFactoryConfiguration; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; import org.apache.activemq.api.core.JGroupsBroadcastGroupConfiguration; import org.apache.activemq.api.jms.JMSFactoryType; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.tests.util.JMSTestBase; import org.jgroups.JChannel; import org.jgroups.conf.PlainConfigurator; @@ -36,8 +36,8 @@ import org.junit.Test; public class ConnectionFactoryWithJGroupsSerializationTest extends JMSTestBase { - protected static HornetQConnectionFactory jmsCf1; - protected static HornetQConnectionFactory jmsCf2; + protected static ActiveMQConnectionFactory jmsCf1; + protected static ActiveMQConnectionFactory jmsCf2; private final String jgroupsConfigString = "UDP(oob_thread_pool.max_threads=300;" + "bind_addr=127.0.0.1;oob_thread_pool.keep_alive_time=1000;" @@ -104,8 +104,8 @@ public class ConnectionFactoryWithJGroupsSerializationTest extends JMSTestBase .setDiscoveryInitialWaitTimeout(5000) .setBroadcastEndpointFactoryConfiguration(jgroupsBroadcastCfg2); - jmsServer.getHornetQServer().getConfiguration().getDiscoveryGroupConfigurations().put(dcConfig1.getName(), dcConfig1); - jmsServer.getHornetQServer().getConfiguration().getDiscoveryGroupConfigurations().put(dcConfig2.getName(), dcConfig2); + jmsServer.getActiveMQServer().getConfiguration().getDiscoveryGroupConfigurations().put(dcConfig1.getName(), dcConfig1); + jmsServer.getActiveMQServer().getConfiguration().getDiscoveryGroupConfigurations().put(dcConfig2.getName(), dcConfig2); jmsServer.createConnectionFactory("ConnectionFactory1", false, @@ -140,8 +140,8 @@ public class ConnectionFactoryWithJGroupsSerializationTest extends JMSTestBase @Test public void testSerialization() throws Exception { - jmsCf1 = (HornetQConnectionFactory) namingContext.lookup("/ConnectionFactory1"); - jmsCf2 = (HornetQConnectionFactory) namingContext.lookup("/ConnectionFactory2"); + jmsCf1 = (ActiveMQConnectionFactory) namingContext.lookup("/ConnectionFactory1"); + jmsCf2 = (ActiveMQConnectionFactory) namingContext.lookup("/ConnectionFactory2"); try { @@ -154,7 +154,7 @@ public class ConnectionFactoryWithJGroupsSerializationTest extends JMSTestBase //now cf2 should be OK byte[] x = serialize(jmsCf2); - HornetQConnectionFactory jmsCf2Copy = deserialize(x, HornetQConnectionFactory.class); + ActiveMQConnectionFactory jmsCf2Copy = deserialize(x, ActiveMQConnectionFactory.class); assertNotNull(jmsCf2Copy); BroadcastEndpointFactoryConfiguration broadcastEndpoint = jmsCf2Copy.getDiscoveryGroupConfiguration().getBroadcastEndpointFactoryConfiguration(); assertTrue(broadcastEndpoint instanceof JGroupsBroadcastGroupConfiguration); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ExceptionListenerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ExceptionListenerTest.java index d70f5d2b3f..63e95398d2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ExceptionListenerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/ExceptionListenerTest.java @@ -28,15 +28,15 @@ import javax.jms.Session; import org.junit.Assert; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.client.impl.ClientSessionInternal; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQConnection; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQSession; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQConnection; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQSession; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.tests.integration.jms.server.management.NullInitialContext; import org.apache.activemq.tests.util.UnitTestCase; @@ -51,11 +51,11 @@ import org.apache.activemq.tests.util.UnitTestCase; */ public class ExceptionListenerTest extends UnitTestCase { - private HornetQServer server; + private ActiveMQServer server; private JMSServerManagerImpl jmsServer; - private HornetQConnectionFactory cf; + private ActiveMQConnectionFactory cf; private static final String Q_NAME = "ConnectionTestQueue"; @@ -67,12 +67,12 @@ public class ExceptionListenerTest extends UnitTestCase Configuration conf = createBasicConfig() .addAcceptorConfiguration(new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory")); - server = addServer(HornetQServers.newHornetQServer(conf, false)); + server = addServer(ActiveMQServers.newActiveMQServer(conf, false)); jmsServer = new JMSServerManagerImpl(server); jmsServer.setContext(new NullInitialContext()); jmsServer.start(); jmsServer.createQueue(false, ExceptionListenerTest.Q_NAME, null, true, ExceptionListenerTest.Q_NAME); - cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); + cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); cf.setBlockOnDurableSend(true); cf.setPreAcknowledge(true); } @@ -118,7 +118,7 @@ public class ExceptionListenerTest extends UnitTestCase conn.setExceptionListener(listener); - ClientSessionInternal coreSession = (ClientSessionInternal)((HornetQConnection)conn).getInitialSession(); + ClientSessionInternal coreSession = (ClientSessionInternal)((ActiveMQConnection)conn).getInitialSession(); coreSession.getConnection().fail(new ActiveMQInternalErrorException("blah")); @@ -145,13 +145,13 @@ public class ExceptionListenerTest extends UnitTestCase Session sess3 = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - ClientSessionInternal coreSession0 = (ClientSessionInternal)((HornetQConnection)conn).getInitialSession(); + ClientSessionInternal coreSession0 = (ClientSessionInternal)((ActiveMQConnection)conn).getInitialSession(); - ClientSessionInternal coreSession1 = (ClientSessionInternal)((HornetQSession)sess1).getCoreSession(); + ClientSessionInternal coreSession1 = (ClientSessionInternal)((ActiveMQSession)sess1).getCoreSession(); - ClientSessionInternal coreSession2 = (ClientSessionInternal)((HornetQSession)sess2).getCoreSession(); + ClientSessionInternal coreSession2 = (ClientSessionInternal)((ActiveMQSession)sess2).getCoreSession(); - ClientSessionInternal coreSession3 = (ClientSessionInternal)((HornetQSession)sess3).getCoreSession(); + ClientSessionInternal coreSession3 = (ClientSessionInternal)((ActiveMQSession)sess3).getCoreSession(); coreSession0.getConnection().fail(new ActiveMQInternalErrorException("blah")); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/InvalidConnectorTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/InvalidConnectorTest.java index 19ed7f0161..f71b434e09 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/InvalidConnectorTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/connection/InvalidConnectorTest.java @@ -17,10 +17,10 @@ import org.junit.After; import org.junit.Test; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.tests.util.JMSTestBase; import java.net.InetAddress; @@ -70,38 +70,38 @@ public class InvalidConnectorTest extends JMSTestBase JMSFactoryType.CF, registerConnectors(server, connectorConfigs), null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, callTimeout, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, - HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, - HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, - HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, + ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, retryInterval, retryIntervalMultiplier, - HornetQClient.DEFAULT_MAX_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, reconnectAttempts, - HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, + ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, null, "/invalid-cf"); - HornetQConnectionFactory invalidCf = (HornetQConnectionFactory) namingContext.lookup("/invalid-cf"); + ActiveMQConnectionFactory invalidCf = (ActiveMQConnectionFactory) namingContext.lookup("/invalid-cf"); TransportConfiguration[] tcs = invalidCf.getServerLocator().getStaticTransportConfigurations(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/consumer/ConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/consumer/ConsumerTest.java index 307cbf3267..24bac53c29 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/consumer/ConsumerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/consumer/ConsumerTest.java @@ -30,12 +30,12 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; -import org.apache.activemq.api.jms.HornetQJMSConstants; +import org.apache.activemq.api.jms.ActiveMQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSConstants; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.server.Queue; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.JMSTestBase; import org.apache.activemq.utils.ReusableLatch; @@ -68,14 +68,14 @@ public class ConsumerTest extends JMSTestBase super.setUp(); - topic = HornetQJMSClient.createTopic(T_NAME); - topic2 = HornetQJMSClient.createTopic(T2_NAME); + topic = ActiveMQJMSClient.createTopic(T_NAME); + topic2 = ActiveMQJMSClient.createTopic(T2_NAME); jmsServer.createQueue(false, ConsumerTest.Q_NAME, null, true, ConsumerTest.Q_NAME); jmsServer.createTopic(true, T_NAME, "/topic/" + T_NAME); jmsServer.createTopic(true, T2_NAME, "/topic/" + T2_NAME); - cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); + cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory")); } @Override @@ -132,8 +132,8 @@ public class ConsumerTest extends JMSTestBase public void testPreCommitAcks() throws Exception { conn = cf.createConnection(); - Session session = conn.createSession(false, HornetQJMSConstants.PRE_ACKNOWLEDGE); - jBossQueue = HornetQJMSClient.createQueue(ConsumerTest.Q_NAME); + Session session = conn.createSession(false, ActiveMQJMSConstants.PRE_ACKNOWLEDGE); + jBossQueue = ActiveMQJMSClient.createQueue(ConsumerTest.Q_NAME); MessageProducer producer = session.createProducer(jBossQueue); MessageConsumer consumer = session.createConsumer(jBossQueue); int noOfMessages = 100; @@ -149,7 +149,7 @@ public class ConsumerTest extends JMSTestBase Assert.assertNotNull(m); } - SimpleString queueName = new SimpleString(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX + ConsumerTest.Q_NAME); + SimpleString queueName = new SimpleString(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX + ConsumerTest.Q_NAME); Assert.assertEquals(0, getMessageCount((Queue) server.getPostOffice().getBinding(queueName).getBindable())); Assert.assertEquals(0, getMessageCount((Queue) server.getPostOffice().getBinding(queueName).getBindable())); } @@ -158,8 +158,8 @@ public class ConsumerTest extends JMSTestBase public void testIndividualACK() throws Exception { Connection conn = cf.createConnection(); - Session session = conn.createSession(false, HornetQJMSConstants.INDIVIDUAL_ACKNOWLEDGE); - jBossQueue = HornetQJMSClient.createQueue(ConsumerTest.Q_NAME); + Session session = conn.createSession(false, ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE); + jBossQueue = ActiveMQJMSClient.createQueue(ConsumerTest.Q_NAME); MessageProducer producer = session.createProducer(jBossQueue); MessageConsumer consumer = session.createConsumer(jBossQueue); int noOfMessages = 100; @@ -183,7 +183,7 @@ public class ConsumerTest extends JMSTestBase session.close(); - session = conn.createSession(false, HornetQJMSConstants.INDIVIDUAL_ACKNOWLEDGE); + session = conn.createSession(false, ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE); consumer = session.createConsumer(jBossQueue); @@ -201,7 +201,7 @@ public class ConsumerTest extends JMSTestBase assertEquals("m" + i, m.getText()); } - SimpleString queueName = new SimpleString(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX + ConsumerTest.Q_NAME); + SimpleString queueName = new SimpleString(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX + ConsumerTest.Q_NAME); Assert.assertEquals(0, ((Queue) server.getPostOffice().getBinding(queueName).getBindable()).getDeliveringCount()); Assert.assertEquals(0, getMessageCount((Queue) server.getPostOffice().getBinding(queueName).getBindable())); conn.close(); @@ -211,8 +211,8 @@ public class ConsumerTest extends JMSTestBase public void testIndividualACKMessageConsumer() throws Exception { Connection conn = cf.createConnection(); - Session session = conn.createSession(false, HornetQJMSConstants.INDIVIDUAL_ACKNOWLEDGE); - jBossQueue = HornetQJMSClient.createQueue(ConsumerTest.Q_NAME); + Session session = conn.createSession(false, ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE); + jBossQueue = ActiveMQJMSClient.createQueue(ConsumerTest.Q_NAME); MessageProducer producer = session.createProducer(jBossQueue); MessageConsumer consumer = session.createConsumer(jBossQueue); int noOfMessages = 100; @@ -268,7 +268,7 @@ public class ConsumerTest extends JMSTestBase session.close(); - session = conn.createSession(false, HornetQJMSConstants.INDIVIDUAL_ACKNOWLEDGE); + session = conn.createSession(false, ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE); consumer = session.createConsumer(jBossQueue); @@ -286,7 +286,7 @@ public class ConsumerTest extends JMSTestBase assertEquals("m" + i, m.getText()); } - SimpleString queueName = new SimpleString(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX + ConsumerTest.Q_NAME); + SimpleString queueName = new SimpleString(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX + ConsumerTest.Q_NAME); Assert.assertEquals(0, ((Queue) server.getPostOffice().getBinding(queueName).getBindable()).getDeliveringCount()); Assert.assertEquals(0, getMessageCount((Queue) server.getPostOffice().getBinding(queueName).getBindable())); conn.close(); @@ -295,11 +295,11 @@ public class ConsumerTest extends JMSTestBase @Test public void testPreCommitAcksSetOnConnectionFactory() throws Exception { - ((HornetQConnectionFactory) cf).setPreAcknowledge(true); + ((ActiveMQConnectionFactory) cf).setPreAcknowledge(true); conn = cf.createConnection(); Session session = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE); - jBossQueue = HornetQJMSClient.createQueue(ConsumerTest.Q_NAME); + jBossQueue = ActiveMQJMSClient.createQueue(ConsumerTest.Q_NAME); MessageProducer producer = session.createProducer(jBossQueue); MessageConsumer consumer = session.createConsumer(jBossQueue); int noOfMessages = 100; @@ -316,7 +316,7 @@ public class ConsumerTest extends JMSTestBase } // Messages should all have been acked since we set pre ack on the cf - SimpleString queueName = new SimpleString(HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX + ConsumerTest.Q_NAME); + SimpleString queueName = new SimpleString(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX + ConsumerTest.Q_NAME); Assert.assertEquals(0, ((Queue) server.getPostOffice().getBinding(queueName).getBindable()).getDeliveringCount()); Assert.assertEquals(0, getMessageCount((Queue) server.getPostOffice().getBinding(queueName).getBindable())); } @@ -327,8 +327,8 @@ public class ConsumerTest extends JMSTestBase ConsumerTest.log.info("starting test"); conn = cf.createConnection(); - Session session = conn.createSession(false, HornetQJMSConstants.PRE_ACKNOWLEDGE); - jBossQueue = HornetQJMSClient.createQueue(ConsumerTest.Q_NAME); + Session session = conn.createSession(false, ActiveMQJMSConstants.PRE_ACKNOWLEDGE); + jBossQueue = ActiveMQJMSClient.createQueue(ConsumerTest.Q_NAME); MessageProducer producer = session.createProducer(jBossQueue); MessageConsumer consumer = session.createConsumer(jBossQueue); int noOfMessages = 1000; @@ -355,10 +355,10 @@ public class ConsumerTest extends JMSTestBase @Test public void testPreCommitAcksWithMessageExpirySetOnConnectionFactory() throws Exception { - ((HornetQConnectionFactory) cf).setPreAcknowledge(true); + ((ActiveMQConnectionFactory) cf).setPreAcknowledge(true); conn = cf.createConnection(); Session session = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE); - jBossQueue = HornetQJMSClient.createQueue(ConsumerTest.Q_NAME); + jBossQueue = ActiveMQJMSClient.createQueue(ConsumerTest.Q_NAME); MessageProducer producer = session.createProducer(jBossQueue); MessageConsumer consumer = session.createConsumer(jBossQueue); int noOfMessages = 1000; @@ -384,11 +384,11 @@ public class ConsumerTest extends JMSTestBase @Test public void testBrowserAndConsumerSimultaneous() throws Exception { - ((HornetQConnectionFactory) cf).setConsumerWindowSize(0); + ((ActiveMQConnectionFactory) cf).setConsumerWindowSize(0); conn = cf.createConnection(); Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - jBossQueue = HornetQJMSClient.createQueue(ConsumerTest.Q_NAME); + jBossQueue = ActiveMQJMSClient.createQueue(ConsumerTest.Q_NAME); MessageProducer producer = session.createProducer(jBossQueue); QueueBrowser browser = session.createBrowser(jBossQueue); @@ -431,14 +431,14 @@ public class ConsumerTest extends JMSTestBase @Test public void testBrowserAndConsumerSimultaneousDifferentConnections() throws Exception { - ((HornetQConnectionFactory) cf).setConsumerWindowSize(0); + ((ActiveMQConnectionFactory) cf).setConsumerWindowSize(0); conn = cf.createConnection(); Connection connConsumer = cf.createConnection(); Session sessionConsumer = connConsumer.createSession(false, Session.AUTO_ACKNOWLEDGE); Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - jBossQueue = HornetQJMSClient.createQueue(ConsumerTest.Q_NAME); + jBossQueue = ActiveMQJMSClient.createQueue(ConsumerTest.Q_NAME); MessageProducer producer = session.createProducer(jBossQueue); MessageConsumer consumer = sessionConsumer.createConsumer(jBossQueue); int noOfMessages = 1000; @@ -475,11 +475,11 @@ public class ConsumerTest extends JMSTestBase @Test public void testBrowserOnly() throws Exception { - ((HornetQConnectionFactory) cf).setConsumerWindowSize(0); + ((ActiveMQConnectionFactory) cf).setConsumerWindowSize(0); conn = cf.createConnection(); Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - jBossQueue = HornetQJMSClient.createQueue(ConsumerTest.Q_NAME); + jBossQueue = ActiveMQJMSClient.createQueue(ConsumerTest.Q_NAME); MessageProducer producer = session.createProducer(jBossQueue); int noOfMessages = 10; for (int i = 0; i < noOfMessages; i++) @@ -515,7 +515,7 @@ public class ConsumerTest extends JMSTestBase { conn = cf.createConnection(); Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - jBossQueue = HornetQJMSClient.createQueue(ConsumerTest.Q_NAME); + jBossQueue = ActiveMQJMSClient.createQueue(ConsumerTest.Q_NAME); MessageConsumer consumer = session.createConsumer(jBossQueue); consumer.setMessageListener(new MessageListener() { @@ -533,7 +533,7 @@ public class ConsumerTest extends JMSTestBase { conn = cf.createConnection(); Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - jBossQueue = HornetQJMSClient.createQueue(ConsumerTest.Q_NAME); + jBossQueue = ActiveMQJMSClient.createQueue(ConsumerTest.Q_NAME); MessageConsumer consumer = session.createConsumer(jBossQueue); consumer.setMessageListener(new MessageListener() { @@ -559,7 +559,7 @@ public class ConsumerTest extends JMSTestBase conn = cf.createConnection(); conn.start(); Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - topic = HornetQJMSClient.createTopic(T_NAME); + topic = ActiveMQJMSClient.createTopic(T_NAME); MessageConsumer cons = session.createSharedConsumer(topic, "test1"); @@ -579,7 +579,7 @@ public class ConsumerTest extends JMSTestBase conn = cf.createConnection(); conn.start(); Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - topic = HornetQJMSClient.createTopic(T_NAME); + topic = ActiveMQJMSClient.createTopic(T_NAME); MessageConsumer cons = session.createSharedDurableConsumer(topic, "test1"); @@ -622,7 +622,7 @@ public class ConsumerTest extends JMSTestBase conn3.close(); } - topic = HornetQJMSClient.createTopic(T_NAME); + topic = ActiveMQJMSClient.createTopic(T_NAME); MessageConsumer cons = session.createSharedDurableConsumer(topic, "test1"); @@ -725,7 +725,7 @@ public class ConsumerTest extends JMSTestBase @Test public void testShareDurale() throws Exception { - ((HornetQConnectionFactory) cf).setConsumerWindowSize(0); + ((ActiveMQConnectionFactory) cf).setConsumerWindowSize(0); conn = cf.createConnection(); conn.start(); Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); @@ -788,7 +788,7 @@ public class ConsumerTest extends JMSTestBase @Test public void testShareDuraleWithJMSContext() throws Exception { - ((HornetQConnectionFactory) cf).setConsumerWindowSize(0); + ((ActiveMQConnectionFactory) cf).setConsumerWindowSize(0); JMSContext conn = cf.createContext(JMSContext.AUTO_ACKNOWLEDGE); JMSConsumer consumer = conn.createSharedDurableConsumer(topic, "c1"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/divert/DivertAndACKClientTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/divert/DivertAndACKClientTest.java index dff2015013..8fc7aab87f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/divert/DivertAndACKClientTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/divert/DivertAndACKClientTest.java @@ -27,7 +27,7 @@ import javax.jms.TextMessage; import org.junit.Assert; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.DivertConfiguration; @@ -133,34 +133,34 @@ public class DivertAndACKClientTest extends JMSTestBase JMSFactoryType.CF, registerConnectors(server, connectorConfigs), null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, callTimeout, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, true, // this test needs to block on ACK - HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, - HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND, + ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, retryInterval, retryIntervalMultiplier, - HornetQClient.DEFAULT_MAX_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, reconnectAttempts, - HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, + ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, null, jndiBindings); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/jms2client/BodyTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/jms2client/BodyTest.java index 2dfc37a753..7c491b6c33 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/jms2client/BodyTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/jms2client/BodyTest.java @@ -20,7 +20,7 @@ import javax.jms.MessageFormatException; import javax.jms.MessageProducer; import javax.jms.Session; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.tests.util.JMSTestBase; import org.junit.Before; import org.junit.Test; @@ -43,7 +43,7 @@ public class BodyTest extends JMSTestBase super.setUp(); jmsServer.createQueue(false, Q_NAME, null, true, Q_NAME); - queue = HornetQJMSClient.createQueue(Q_NAME); + queue = ActiveMQJMSClient.createQueue(Q_NAME); } @Test diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/jms2client/NonExistentQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/jms2client/NonExistentQueueTest.java index d738023aad..21517aab35 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/jms2client/NonExistentQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/jms2client/NonExistentQueueTest.java @@ -27,7 +27,7 @@ import javax.jms.Session; import java.util.Random; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; import org.apache.activemq.tests.util.JMSTestBase; @@ -59,10 +59,10 @@ public class NonExistentQueueTest extends JMSTestBase @Test public void sendToNonExistantDestination() throws Exception { - Destination destination = HornetQJMSClient.createQueue("DoesNotExist"); + Destination destination = ActiveMQJMSClient.createQueue("DoesNotExist"); TransportConfiguration transportConfiguration = new TransportConfiguration(InVMConnectorFactory.class.getName()); - ConnectionFactory localConnectionFactory = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - transportConfiguration); + ConnectionFactory localConnectionFactory = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + transportConfiguration); // Using JMS 1 API Connection connection = localConnectionFactory.createConnection(); Session session = connection.createSession(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerDeployerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerDeployerTest.java index 86392e1cc7..e678a52bc6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerDeployerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerDeployerTest.java @@ -24,8 +24,8 @@ import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.deployers.DeploymentManager; import org.apache.activemq.core.deployers.impl.FileDeploymentManager; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.impl.JMSServerDeployer; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; @@ -71,7 +71,7 @@ public class JMSServerDeployerTest extends ServiceTestBase { JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager); - String xml = " " + ""; + String xml = " " + ""; Element rootNode = org.apache.activemq.utils.XMLUtil.stringToElement(xml); deployer.validate(rootNode); @@ -160,7 +160,7 @@ public class JMSServerDeployerTest extends ServiceTestBase { JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager); - String conf = "hornetq-jms-for-JMSServerDeployerTest.xml"; + String conf = "activemq-jms-for-JMSServerDeployerTest.xml"; URI confURL = Thread.currentThread().getContextClassLoader().getResource(conf).toURI(); String[] connectionFactoryBindings = new String[]{"/fullConfigurationConnectionFactory", @@ -200,7 +200,7 @@ public class JMSServerDeployerTest extends ServiceTestBase for (String binding : connectionFactoryBindings) { - HornetQConnectionFactory cf = (HornetQConnectionFactory) context.lookup(binding); + ActiveMQConnectionFactory cf = (ActiveMQConnectionFactory) context.lookup(binding); Assert.assertNotNull(cf); Assert.assertEquals(1234, cf.getClientFailureCheckPeriod()); Assert.assertEquals(5678, cf.getCallTimeout()); @@ -246,7 +246,7 @@ public class JMSServerDeployerTest extends ServiceTestBase { JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager); - String conf = "hornetq-jms-for-JMSServerDeployerTest2.xml"; + String conf = "activemq-jms-for-JMSServerDeployerTest2.xml"; URI confURL = Thread.currentThread().getContextClassLoader().getResource(conf).toURI(); String[] connectionFactoryBindings = new String[]{"/fullConfigurationConnectionFactory", @@ -286,7 +286,7 @@ public class JMSServerDeployerTest extends ServiceTestBase for (String binding : connectionFactoryBindings) { - HornetQConnectionFactory cf = (HornetQConnectionFactory) context.lookup(binding); + ActiveMQConnectionFactory cf = (ActiveMQConnectionFactory) context.lookup(binding); Assert.assertNotNull(cf); Assert.assertEquals(1234, cf.getClientFailureCheckPeriod()); Assert.assertEquals(5678, cf.getCallTimeout()); @@ -350,7 +350,7 @@ public class JMSServerDeployerTest extends ServiceTestBase .addConnectorConfiguration("netty", new TransportConfiguration(NettyConnectorFactory.class.getName())) .addDiscoveryGroupConfiguration("mygroup", dcg); - HornetQServer server = createServer(false, config); + ActiveMQServer server = createServer(false, config); deploymentManager = new FileDeploymentManager(config.getFileDeployerScanPeriod()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerStartStopTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerStartStopTest.java index bfc395707d..64c00445a3 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerStartStopTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerStartStopTest.java @@ -22,16 +22,16 @@ import java.util.HashSet; import java.util.Set; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.config.impl.FileConfiguration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.impl.HornetQServerImpl; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; -import org.apache.activemq.spi.core.security.HornetQSecurityManagerImpl; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.After; @@ -51,8 +51,8 @@ public class JMSServerStartStopTest extends UnitTestCase private Connection conn; - private HornetQConnectionFactory jbcf; - private final Set connectionFactories = new HashSet(); + private ActiveMQConnectionFactory jbcf; + private final Set connectionFactories = new HashSet(); @Test public void testStopStart1() throws Exception @@ -65,7 +65,7 @@ public class JMSServerStartStopTest extends UnitTestCase start(); - HornetQConnectionFactory jbcf = createConnectionFactory(); + ActiveMQConnectionFactory jbcf = createConnectionFactory(); jbcf.setBlockOnDurableSend(true); jbcf.setBlockOnNonDurableSend(true); @@ -147,11 +147,11 @@ public class JMSServerStartStopTest extends UnitTestCase /** * @return */ - private HornetQConnectionFactory createConnectionFactory() + private ActiveMQConnectionFactory createConnectionFactory() { - HornetQConnectionFactory cf = - HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(NETTY_CONNECTOR_FACTORY)); + ActiveMQConnectionFactory cf = + ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(NETTY_CONNECTOR_FACTORY)); connectionFactories.add(cf); return cf; @@ -165,7 +165,7 @@ public class JMSServerStartStopTest extends UnitTestCase conn.close(); if (jbcf != null) jbcf.close(); - for (HornetQConnectionFactory cf : connectionFactories) + for (ActiveMQConnectionFactory cf : connectionFactories) { try { @@ -200,12 +200,12 @@ public class JMSServerStartStopTest extends UnitTestCase fc.setBindingsDirectory(getBindingsDir()); fc.setLargeMessagesDirectory(getLargeMessagesDir()); - HornetQSecurityManager sm = new HornetQSecurityManagerImpl(); + ActiveMQSecurityManager sm = new ActiveMQSecurityManagerImpl(); - HornetQServer liveServer = addServer(new HornetQServerImpl(fc, sm)); + ActiveMQServer liveServer = addServer(new ActiveMQServerImpl(fc, sm)); liveJMSServer = new JMSServerManagerImpl(liveServer, "server-start-stop-jms-config1.xml"); - addHornetQComponent(liveJMSServer); + addActiveMQComponent(liveJMSServer); liveJMSServer.setContext(null); liveJMSServer.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSConfigurationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSConfigurationTest.java index 8ff97b23bc..7ac3122508 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSConfigurationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSConfigurationTest.java @@ -28,8 +28,8 @@ import org.junit.Assert; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration; import org.apache.activemq.jms.server.config.JMSConfiguration; @@ -59,7 +59,7 @@ public class JMSConfigurationTest extends ServiceTestBase Context context = new InVMNamingContext(); Configuration coreConfiguration = createDefaultConfig(false); - HornetQServer coreServer = new HornetQServerImpl(coreConfiguration); + ActiveMQServer coreServer = new ActiveMQServerImpl(coreConfiguration); JMSConfiguration jmsConfiguration = new JMSConfigurationImpl(); jmsConfiguration.setContext(context); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSServerConfigParserTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSServerConfigParserTest.java index b790c52d70..15215df82b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSServerConfigParserTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSServerConfigParserTest.java @@ -57,7 +57,7 @@ public class JMSServerConfigParserTest extends ServiceTestBase JMSServerConfigParser parser = new JMSServerConfigParserImpl(); - String conf = "hornetq-jms-for-JMSServerDeployerTest.xml"; + String conf = "activemq-jms-for-JMSServerDeployerTest.xml"; URL confURL = Thread.currentThread().getContextClassLoader().getResource(conf); InputStream stream = confURL.openStream(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/ConnectionFactoryControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/ConnectionFactoryControlTest.java index 1e51871829..06b9c82b33 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/ConnectionFactoryControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/ConnectionFactoryControlTest.java @@ -25,9 +25,9 @@ import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.api.jms.management.ConnectionFactoryControl; import org.apache.activemq.api.jms.management.JMSServerControl; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.jms.server.management.JMSNotificationType; import org.apache.activemq.tests.integration.management.ManagementControlHelper; @@ -50,7 +50,7 @@ public class ConnectionFactoryControlTest extends ManagementTestBase // Attributes ---------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; private JMSServerManagerImpl serverManager; @@ -70,13 +70,13 @@ public class ConnectionFactoryControlTest extends ManagementTestBase ConnectionFactoryControl controlCF = createCFControl("test"); - HornetQConnectionFactory cf = (HornetQConnectionFactory)ctx.lookup("test"); + ActiveMQConnectionFactory cf = (ActiveMQConnectionFactory)ctx.lookup("test"); assertFalse(cf.isCompressLargeMessage()); controlCF.setCompressLargeMessages(true); - cf = (HornetQConnectionFactory)ctx.lookup("test"); + cf = (ActiveMQConnectionFactory)ctx.lookup("test"); assertTrue(cf.isCompressLargeMessage()); stopServer(); @@ -85,7 +85,7 @@ public class ConnectionFactoryControlTest extends ManagementTestBase startServer(); - cf = (HornetQConnectionFactory)ctx.lookup("test"); + cf = (ActiveMQConnectionFactory)ctx.lookup("test"); assertTrue(cf.isCompressLargeMessage()); } @@ -159,7 +159,7 @@ public class ConnectionFactoryControlTest extends ManagementTestBase .setSecurityEnabled(false) .setJMXManagementEnabled(true) .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY)); - server = HornetQServers.newHornetQServer(conf, mbeanServer, true); + server = ActiveMQServers.newActiveMQServer(conf, mbeanServer, true); server.start(); serverManager = new JMSServerManagerImpl(server); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlTest.java index 1adabc09ff..e46561c82d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlTest.java @@ -36,18 +36,18 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.ObjectNameBuilder; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.api.jms.management.JMSQueueControl; import org.apache.activemq.api.jms.management.JMSServerControl; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQQueue; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQQueue; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.jms.server.management.JMSNotificationType; import org.apache.activemq.tests.integration.management.ManagementControlHelper; @@ -72,11 +72,11 @@ import org.junit.Test; */ public class JMSQueueControlTest extends ManagementTestBase { - private HornetQServer server; + private ActiveMQServer server; private JMSServerManagerImpl serverManager; - protected HornetQQueue queue; + protected ActiveMQQueue queue; protected String queueName; @@ -462,7 +462,7 @@ public class JMSQueueControlTest extends ManagementTestBase { JMSQueueControl queueControl = createManagementControl(); String expiryQueueName = RandomUtil.randomString(); - HornetQQueue expiryQueue = (HornetQQueue) HornetQJMSClient.createQueue(expiryQueueName); + ActiveMQQueue expiryQueue = (ActiveMQQueue) ActiveMQJMSClient.createQueue(expiryQueueName); serverManager.createQueue(false, expiryQueueName, null, true, expiryQueueName); queueControl.setExpiryAddress(expiryQueue.getAddress()); @@ -599,7 +599,7 @@ public class JMSQueueControlTest extends ManagementTestBase { String deadLetterQueue = RandomUtil.randomString(); serverManager.createQueue(false, deadLetterQueue, null, true, deadLetterQueue); - HornetQQueue dlq = (HornetQQueue) HornetQJMSClient.createQueue(deadLetterQueue); + ActiveMQQueue dlq = (ActiveMQQueue) ActiveMQJMSClient.createQueue(deadLetterQueue); Connection conn = createConnection(); Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); @@ -662,7 +662,7 @@ public class JMSQueueControlTest extends ManagementTestBase String deadLetterQueue = RandomUtil.randomString(); serverManager.createQueue(false, deadLetterQueue, null, true, deadLetterQueue); - HornetQQueue dlq = (HornetQQueue) HornetQJMSClient.createQueue(deadLetterQueue); + ActiveMQQueue dlq = (ActiveMQQueue) ActiveMQJMSClient.createQueue(deadLetterQueue); Connection conn = createConnection(); Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); @@ -705,7 +705,7 @@ public class JMSQueueControlTest extends ManagementTestBase String otherQueueName = RandomUtil.randomString(); serverManager.createQueue(false, otherQueueName, null, true, otherQueueName); - HornetQDestination otherQueue = (HornetQDestination) HornetQJMSClient.createQueue(otherQueueName); + ActiveMQDestination otherQueue = (ActiveMQDestination) ActiveMQJMSClient.createQueue(otherQueueName); // send on queue JMSUtil.sendMessages(queue, 2); @@ -754,7 +754,7 @@ public class JMSQueueControlTest extends ManagementTestBase String otherQueueName = RandomUtil.randomString(); serverManager.createQueue(false, otherQueueName, null, true, otherQueueName); - HornetQDestination otherQueue = (HornetQDestination) HornetQJMSClient.createQueue(otherQueueName); + ActiveMQDestination otherQueue = (ActiveMQDestination) ActiveMQJMSClient.createQueue(otherQueueName); Connection connection = JMSUtil.createConnection(InVMConnectorFactory.class.getName()); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); @@ -790,7 +790,7 @@ public class JMSQueueControlTest extends ManagementTestBase String otherQueueName = RandomUtil.randomString(); serverManager.createQueue(false, otherQueueName, null, true, otherQueueName); - HornetQDestination otherQueue = (HornetQDestination) HornetQJMSClient.createQueue(otherQueueName); + ActiveMQDestination otherQueue = (ActiveMQDestination) ActiveMQJMSClient.createQueue(otherQueueName); String[] messageIDs = JMSUtil.sendMessages(queue, 1); @@ -814,7 +814,7 @@ public class JMSQueueControlTest extends ManagementTestBase String otherQueueName = RandomUtil.randomString(); serverManager.createQueue(false, otherQueueName, null, true, otherQueueName); - HornetQDestination otherQueue = (HornetQDestination) HornetQJMSClient.createQueue(otherQueueName); + ActiveMQDestination otherQueue = (ActiveMQDestination) ActiveMQJMSClient.createQueue(otherQueueName); ServerLocator locator = createInVMNonHALocator(); @@ -841,7 +841,7 @@ public class JMSQueueControlTest extends ManagementTestBase session.commit(); JMSQueueControl queueControl = createManagementControl(); - JMSQueueControl otherQueueControl = ManagementControlHelper.createJMSQueueControl((HornetQQueue) otherQueue, + JMSQueueControl otherQueueControl = ManagementControlHelper.createJMSQueueControl((ActiveMQQueue) otherQueue, mbeanServer); Assert.assertEquals(10, getMessageCount(queueControl)); @@ -893,7 +893,7 @@ public class JMSQueueControlTest extends ManagementTestBase String otherQueueName = RandomUtil.randomString(); serverManager.createQueue(false, otherQueueName, null, true, otherQueueName); - HornetQDestination otherQueue = (HornetQDestination) HornetQJMSClient.createQueue(otherQueueName); + ActiveMQDestination otherQueue = (ActiveMQDestination) ActiveMQJMSClient.createQueue(otherQueueName); ServerLocator locator = createInVMNonHALocator(); @@ -927,7 +927,7 @@ public class JMSQueueControlTest extends ManagementTestBase session.commit(); JMSQueueControl queueControl = createManagementControl(); - JMSQueueControl otherQueueControl = ManagementControlHelper.createJMSQueueControl((HornetQQueue) otherQueue, + JMSQueueControl otherQueueControl = ManagementControlHelper.createJMSQueueControl((ActiveMQQueue) otherQueue, mbeanServer); Assert.assertEquals(10, getMessageCount(queueControl)); @@ -979,7 +979,7 @@ public class JMSQueueControlTest extends ManagementTestBase String otherQueueName = RandomUtil.randomString(); serverManager.createQueue(false, otherQueueName, null, true, otherQueueName); - HornetQDestination otherQueue = (HornetQDestination) HornetQJMSClient.createQueue(otherQueueName); + ActiveMQDestination otherQueue = (ActiveMQDestination) ActiveMQJMSClient.createQueue(otherQueueName); ServerLocator locator = createInVMNonHALocator(); @@ -998,7 +998,7 @@ public class JMSQueueControlTest extends ManagementTestBase prod2.send(msg); JMSQueueControl queueControl = createManagementControl(); - JMSQueueControl otherQueueControl = ManagementControlHelper.createJMSQueueControl((HornetQQueue) otherQueue, + JMSQueueControl otherQueueControl = ManagementControlHelper.createJMSQueueControl((ActiveMQQueue) otherQueue, mbeanServer); Assert.assertEquals(1, getMessageCount(queueControl)); @@ -1075,7 +1075,7 @@ public class JMSQueueControlTest extends ManagementTestBase serverManager.createQueue(true, "pagedTest", null, true, "/queue/pagedTest"); - HornetQQueue pagedQueue = (HornetQQueue) context.lookup("/queue/pagedTest"); + ActiveMQQueue pagedQueue = (ActiveMQQueue) context.lookup("/queue/pagedTest"); ServerLocator locator = createInVMNonHALocator(); @@ -1124,7 +1124,7 @@ public class JMSQueueControlTest extends ManagementTestBase serverManager.createQueue(true, "pagedTest", null, true, "/queue/pagedTest"); - HornetQQueue pagedQueue = (HornetQQueue) context.lookup("/queue/pagedTest"); + ActiveMQQueue pagedQueue = (ActiveMQQueue) context.lookup("/queue/pagedTest"); ServerLocator locator = createInVMNonHALocator(); @@ -1222,7 +1222,7 @@ public class JMSQueueControlTest extends ManagementTestBase { String testQueueName = "testQueueAddJndi"; serverManager.createQueue(true, testQueueName, null, true, testQueueName); - HornetQQueue testQueue = (HornetQQueue) HornetQJMSClient.createQueue(testQueueName); + ActiveMQQueue testQueue = (ActiveMQQueue) ActiveMQJMSClient.createQueue(testQueueName); JMSQueueControl queueControl = createManagementControl(testQueue); String[] bindings = queueControl.getJNDIBindings(); @@ -1250,7 +1250,7 @@ public class JMSQueueControlTest extends ManagementTestBase serverManager.start(); - testQueue = (HornetQQueue) HornetQJMSClient.createQueue(testQueueName); + testQueue = (ActiveMQQueue) ActiveMQJMSClient.createQueue(testQueueName); queueControl = createManagementControl(testQueue); @@ -1329,7 +1329,7 @@ public class JMSQueueControlTest extends ManagementTestBase queueName = RandomUtil.randomString(); serverManager.createQueue(false, queueName, null, true, queueName); - queue = (HornetQQueue) HornetQJMSClient.createQueue(queueName); + queue = (ActiveMQQueue) ActiveMQJMSClient.createQueue(queueName); } @Override @@ -1355,7 +1355,7 @@ public class JMSQueueControlTest extends ManagementTestBase return createManagementControl(queue); } - protected JMSQueueControl createManagementControl(HornetQQueue queueParameter) throws Exception + protected JMSQueueControl createManagementControl(ActiveMQQueue queueParameter) throws Exception { return ManagementControlHelper.createJMSQueueControl(queueParameter, mbeanServer); } @@ -1364,8 +1364,8 @@ public class JMSQueueControlTest extends ManagementTestBase private Connection createConnection() throws JMSException { - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(InVMConnectorFactory.class.getName())); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(InVMConnectorFactory.class.getName())); cf.setBlockOnDurableSend(true); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlUsingJMSTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlUsingJMSTest.java index c206f27b41..7bc0b9b19c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlUsingJMSTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlUsingJMSTest.java @@ -22,12 +22,12 @@ import javax.jms.Session; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.ResourceNames; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.api.jms.management.JMSQueueControl; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQQueue; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQQueue; /** * @@ -59,7 +59,7 @@ public class JMSQueueControlUsingJMSTest extends JMSQueueControlTest { super.setUp(); - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(InVMConnectorFactory.class.getName())); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(InVMConnectorFactory.class.getName())); connection = cf.createQueueConnection(); session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); connection.start(); @@ -81,7 +81,7 @@ public class JMSQueueControlUsingJMSTest extends JMSQueueControlTest @Override protected JMSQueueControl createManagementControl() throws Exception { - HornetQQueue managementQueue = (HornetQQueue) HornetQJMSClient.createQueue("hornetq.management"); + ActiveMQQueue managementQueue = (ActiveMQQueue) ActiveMQJMSClient.createQueue("activemq.management"); final JMSMessagingProxy proxy = new JMSMessagingProxy(session, managementQueue, diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControl2Test.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControl2Test.java index b057e59ad5..033fcfd8d1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControl2Test.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControl2Test.java @@ -30,7 +30,7 @@ import java.util.concurrent.TimeUnit; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.QueueControl; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.management.JMSConnectionInfo; import org.apache.activemq.api.jms.management.JMSConsumerInfo; import org.apache.activemq.api.jms.management.JMSServerControl; @@ -40,13 +40,13 @@ import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQMessage; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQMessage; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; -import org.apache.activemq.ra.HornetQResourceAdapter; -import org.apache.activemq.ra.inflow.HornetQActivation; -import org.apache.activemq.ra.inflow.HornetQActivationSpec; +import org.apache.activemq.ra.ActiveMQResourceAdapter; +import org.apache.activemq.ra.inflow.ActiveMQActivation; +import org.apache.activemq.ra.inflow.ActiveMQActivationSpec; import org.apache.activemq.tests.integration.management.ManagementControlHelper; import org.apache.activemq.tests.integration.management.ManagementTestBase; import org.apache.activemq.tests.unit.ra.MessageEndpointFactory; @@ -67,7 +67,7 @@ public class JMSServerControl2Test extends ManagementTestBase private static final long PING_PERIOD = JMSServerControl2Test.CONNECTION_TTL / 2; - private HornetQServer server; + private ActiveMQServer server; private JMSServerManagerImpl serverManager; @@ -75,16 +75,16 @@ public class JMSServerControl2Test extends ManagementTestBase // Static -------------------------------------------------------- - private void startHornetQServer(final String acceptorFactory) throws Exception + private void startActiveMQServer(final String acceptorFactory) throws Exception { Configuration conf = createBasicConfig() .addAcceptorConfiguration(new TransportConfiguration(acceptorFactory)); - server = addServer(HornetQServers.newHornetQServer(conf, mbeanServer, true)); + server = addServer(ActiveMQServers.newActiveMQServer(conf, mbeanServer, true)); server.start(); context = new InVMNamingContext(); serverManager = new JMSServerManagerImpl(server); - addHornetQComponent(serverManager); + addActiveMQComponent(serverManager); serverManager.setContext(context); serverManager.start(); serverManager.activated(); @@ -205,9 +205,9 @@ public class JMSServerControl2Test extends ManagementTestBase try { - startHornetQServer(NETTY_ACCEPTOR_FACTORY); + startActiveMQServer(NETTY_ACCEPTOR_FACTORY); serverManager.createQueue(false, queueName, null, true, queueName); - Queue queue = HornetQJMSClient.createQueue(queueName); + Queue queue = ActiveMQJMSClient.createQueue(queueName); JMSServerControl control = createManagementControl(); @@ -327,9 +327,9 @@ public class JMSServerControl2Test extends ManagementTestBase try { - startHornetQServer(NettyAcceptorFactory.class.getName()); + startActiveMQServer(NettyAcceptorFactory.class.getName()); serverManager.createTopic(false, topicName, topicName); - Topic topic = HornetQJMSClient.createTopic(topicName); + Topic topic = ActiveMQJMSClient.createTopic(topicName); JMSServerControl control = createManagementControl(); @@ -401,9 +401,9 @@ public class JMSServerControl2Test extends ManagementTestBase try { - startHornetQServer(NettyAcceptorFactory.class.getName()); + startActiveMQServer(NettyAcceptorFactory.class.getName()); serverManager.createQueue(false, queueName, null, true, queueName); - Queue queue = HornetQJMSClient.createQueue(queueName); + Queue queue = ActiveMQJMSClient.createQueue(queueName); JMSServerControl control = createManagementControl(); @@ -440,7 +440,7 @@ public class JMSServerControl2Test extends ManagementTestBase assertEquals(msgSent.getJMSMessageID(), receivedMsg.getJMSMessageID()); - HornetQMessage jmsMessage = (HornetQMessage) receivedMsg; + ActiveMQMessage jmsMessage = (ActiveMQMessage) receivedMsg; String lastMsgID = jmsMessage.getCoreMessage().getUserID().toString(); String jsonStr = control.listConnectionsAsJSON(); @@ -508,18 +508,18 @@ public class JMSServerControl2Test extends ManagementTestBase @Test public void testStartActivationListConnections() throws Exception { - HornetQActivation activation = null; - HornetQResourceAdapter ra = null; + ActiveMQActivation activation = null; + ActiveMQResourceAdapter ra = null; try { - startHornetQServer(InVMAcceptorFactory.class.getName()); - HornetQJMSClient.createQueue("test"); + startActiveMQServer(InVMAcceptorFactory.class.getName()); + ActiveMQJMSClient.createQueue("test"); serverManager.createQueue(false, "test", null, true, "test"); JMSServerControl control = createManagementControl(); - ra = new HornetQResourceAdapter(); + ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory"); ra.setUserName("userGlobal"); @@ -527,11 +527,11 @@ public class JMSServerControl2Test extends ManagementTestBase ra.start(new org.apache.activemq.tests.unit.ra.BootstrapContext()); ra.setClientID("my-client-id"); ra.setUserName("user"); - Connection conn = ra.getDefaultHornetQConnectionFactory().createConnection(); + Connection conn = ra.getDefaultActiveMQConnectionFactory().createConnection(); conn.close(); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(ra); @@ -545,7 +545,7 @@ public class JMSServerControl2Test extends ManagementTestBase spec.setMinSession(1); spec.setMaxSession(1); - activation = new HornetQActivation(ra, new MessageEndpointFactory(), spec); + activation = new ActiveMQActivation(ra, new MessageEndpointFactory(), spec); activation.start(); @@ -595,29 +595,29 @@ public class JMSServerControl2Test extends ManagementTestBase @Test public void testStartActivationOverrideListConnections() throws Exception { - HornetQActivation activation = null; - HornetQResourceAdapter ra = null; + ActiveMQActivation activation = null; + ActiveMQResourceAdapter ra = null; try { - startHornetQServer(InVMAcceptorFactory.class.getName()); - HornetQJMSClient.createQueue("test"); + startActiveMQServer(InVMAcceptorFactory.class.getName()); + ActiveMQJMSClient.createQueue("test"); serverManager.createQueue(false, "test", null, true, "test"); JMSServerControl control = createManagementControl(); - ra = new HornetQResourceAdapter(); + ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory"); ra.setUserName("userGlobal"); ra.setPassword("passwordGlobal"); ra.start(new org.apache.activemq.tests.unit.ra.BootstrapContext()); - Connection conn = ra.getDefaultHornetQConnectionFactory().createConnection(); + Connection conn = ra.getDefaultActiveMQConnectionFactory().createConnection(); conn.close(); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(ra); @@ -634,7 +634,7 @@ public class JMSServerControl2Test extends ManagementTestBase spec.setMinSession(1); spec.setMaxSession(1); - activation = new HornetQActivation(ra, new MessageEndpointFactory(), spec); + activation = new ActiveMQActivation(ra, new MessageEndpointFactory(), spec); activation.start(); @@ -706,7 +706,7 @@ public class JMSServerControl2Test extends ManagementTestBase { try { - startHornetQServer(acceptorFactory); + startActiveMQServer(acceptorFactory); JMSServerControl control = createManagementControl(); @@ -752,7 +752,7 @@ public class JMSServerControl2Test extends ManagementTestBase { try { - startHornetQServer(acceptorFactory); + startActiveMQServer(acceptorFactory); JMSServerControl control = createManagementControl(); @@ -861,7 +861,7 @@ public class JMSServerControl2Test extends ManagementTestBase { try { - startHornetQServer(acceptorFactory); + startActiveMQServer(acceptorFactory); JMSServerControl control = createManagementControl(); @@ -906,7 +906,7 @@ public class JMSServerControl2Test extends ManagementTestBase { try { - startHornetQServer(acceptorFactory); + startActiveMQServer(acceptorFactory); JMSServerControl control = createManagementControl(); @@ -950,7 +950,7 @@ public class JMSServerControl2Test extends ManagementTestBase { try { - startHornetQServer(acceptorFactory); + startActiveMQServer(acceptorFactory); JMSServerControl control = createManagementControl(); @@ -1008,7 +1008,7 @@ public class JMSServerControl2Test extends ManagementTestBase try { - startHornetQServer(acceptorFactory); + startActiveMQServer(acceptorFactory); JMSServerControl control = createManagementControl(); @@ -1065,11 +1065,11 @@ public class JMSServerControl2Test extends ManagementTestBase try { - startHornetQServer(acceptorFactory); + startActiveMQServer(acceptorFactory); serverManager.createQueue(false, queueName, null, true, queueName); - Queue queue = HornetQJMSClient.createQueue(queueName); + Queue queue = ActiveMQJMSClient.createQueue(queueName); serverManager.createQueue(false, queueName2, null, true, queueName2); - Queue queue2 = HornetQJMSClient.createQueue(queueName2); + Queue queue2 = ActiveMQJMSClient.createQueue(queueName2); JMSServerControl control = createManagementControl(); QueueControl queueControl = createManagementControl("jms.queue." + queueName, "jms.queue." + queueName); @@ -1144,13 +1144,13 @@ public class JMSServerControl2Test extends ManagementTestBase try { - startHornetQServer(acceptorFactory); + startActiveMQServer(acceptorFactory); serverManager.createQueue(false, queueName1, null, true, queueName1); - Queue queue = HornetQJMSClient.createQueue(queueName1); + Queue queue = ActiveMQJMSClient.createQueue(queueName1); serverManager.createQueue(false, queueName2, null, true, queueName2); - Queue queue2 = HornetQJMSClient.createQueue(queueName2); + Queue queue2 = ActiveMQJMSClient.createQueue(queueName2); serverManager.createQueue(false, queueName3, null, true, queueName3); - Queue queue3 = HornetQJMSClient.createQueue(queueName3); + Queue queue3 = ActiveMQJMSClient.createQueue(queueName3); JMSServerControl control = createManagementControl(); QueueControl queueControl = createManagementControl("jms.queue." + queueName1, "jms.queue." + queueName1); @@ -1242,11 +1242,11 @@ public class JMSServerControl2Test extends ManagementTestBase try { - startHornetQServer(acceptorFactory); + startActiveMQServer(acceptorFactory); serverManager.createQueue(false, queueName, null, true, queueName); - Queue queue = HornetQJMSClient.createQueue(queueName); + Queue queue = ActiveMQJMSClient.createQueue(queueName); serverManager.createQueue(false, queueName2, null, true, queueName2); - Queue queue2 = HornetQJMSClient.createQueue(queueName2); + Queue queue2 = ActiveMQJMSClient.createQueue(queueName2); JMSServerControl control = createManagementControl(); QueueControl queueControl = createManagementControl("jms.queue." + queueName, "jms.queue." + queueName); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlRestartTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlRestartTest.java index e0f5e9e743..f4ca704cff 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlRestartTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlRestartTest.java @@ -21,15 +21,15 @@ import javax.jms.Session; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.ObjectNameBuilder; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.api.jms.management.JMSManagementHelper; import org.apache.activemq.api.jms.management.JMSServerControl; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.server.JournalType; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; @@ -98,9 +98,9 @@ public class JMSServerControlRestartTest extends ManagementTestBase checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName)); TransportConfiguration config = new TransportConfiguration(InVMConnectorFactory.class.getName()); - Connection connection = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, config).createConnection(); + Connection connection = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, config).createConnection(); connection.start(); - Queue managementQueue = HornetQJMSClient.createQueue("hornetq.management"); + Queue managementQueue = ActiveMQJMSClient.createQueue("activemq.management"); QueueSession session = (QueueSession) connection.createSession(false, Session.AUTO_ACKNOWLEDGE); QueueRequestor requestor = new QueueRequestor(session, managementQueue); Message message = session.createMessage(); @@ -152,7 +152,7 @@ public class JMSServerControlRestartTest extends ManagementTestBase .setPersistenceEnabled(true) .setJournalType(JournalType.NIO) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - HornetQServer server = HornetQServers.newHornetQServer(conf, mbeanServer); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, mbeanServer); context = new InVMNamingContext(); 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 c67bb075b0..fa2757df84 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 @@ -38,22 +38,22 @@ 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; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.management.AddressControl; import org.apache.activemq.api.core.management.ObjectNameBuilder; import org.apache.activemq.api.core.management.ResourceNames; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.management.JMSServerControl; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.postoffice.QueueBinding; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQConnection; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQMessageConsumer; -import org.apache.activemq.jms.client.HornetQQueueConnectionFactory; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQConnection; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQMessageConsumer; +import org.apache.activemq.jms.client.ActiveMQQueueConnectionFactory; import org.apache.activemq.jms.persistence.JMSStorageManager; import org.apache.activemq.jms.persistence.config.PersistedConnectionFactory; import org.apache.activemq.jms.persistence.config.PersistedDestination; @@ -84,7 +84,7 @@ public class JMSServerControlTest extends ManagementTestBase protected InVMNamingContext context; - private HornetQServer server; + private ActiveMQServer server; private JMSServerManagerImpl serverManager; @@ -223,7 +223,7 @@ public class JMSServerControlTest extends ManagementTestBase Object o = UnitTestCase.checkBinding(context, bindings[0]); Assert.assertTrue(o instanceof Queue); Queue queue = (Queue) o; - // assertEquals(((HornetQDestination)queue).get); + // assertEquals(((ActiveMQDestination)queue).get); Assert.assertEquals(queueName, queue.getQueueName()); Assert.assertEquals(selector, server.getPostOffice() .getBinding(new SimpleString("jms.queue." + queueName)) @@ -321,14 +321,14 @@ public class JMSServerControlTest extends ManagementTestBase UnitTestCase.checkBinding(context, queueJNDIBinding); checkResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName)); - HornetQConnectionFactory cf = - new HornetQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); - HornetQConnection connection = (HornetQConnection) cf.createConnection(); + ActiveMQConnectionFactory cf = + new ActiveMQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection(); try { Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); // create a consumer will create a Core queue bound to the topic address - HornetQMessageConsumer cons = (HornetQMessageConsumer) session.createConsumer(HornetQJMSClient.createQueue(queueName)); + ActiveMQMessageConsumer cons = (ActiveMQMessageConsumer) session.createConsumer(ActiveMQJMSClient.createQueue(queueName)); control.destroyQueue(queueName, true); @@ -378,16 +378,16 @@ public class JMSServerControlTest extends ManagementTestBase UnitTestCase.checkBinding(context, queueJNDIBinding); checkResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName)); - HornetQConnectionFactory cf = new HornetQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); - HornetQConnection connection = (HornetQConnection) cf.createConnection(); + ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection(); connection.start(); try { Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer producer = session.createProducer(HornetQJMSClient.createQueue(queueName)); + MessageProducer producer = session.createProducer(ActiveMQJMSClient.createQueue(queueName)); producer.send(session.createTextMessage()); // create a consumer will create a Core queue bound to the topic address - HornetQMessageConsumer cons = (HornetQMessageConsumer) session.createConsumer(HornetQJMSClient.createQueue(queueName)); + ActiveMQMessageConsumer cons = (ActiveMQMessageConsumer) session.createConsumer(ActiveMQJMSClient.createQueue(queueName)); try { @@ -396,7 +396,7 @@ public class JMSServerControlTest extends ManagementTestBase } catch (Exception e) { - assertTrue(e.getMessage().startsWith("HQ119025")); + assertTrue(e.getMessage().startsWith("AMQ119025")); } UnitTestCase.checkBinding(context, queueJNDIBinding); @@ -433,15 +433,15 @@ public class JMSServerControlTest extends ManagementTestBase UnitTestCase.checkBinding(context, topicJNDIBinding); checkResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName)); - HornetQConnectionFactory cf = new HornetQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); - HornetQConnection connection = (HornetQConnection) cf.createConnection(); + ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection(); connection.start(); try { Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); // create a consumer will create a Core queue bound to the topic address - HornetQMessageConsumer cons = (HornetQMessageConsumer) session.createConsumer(HornetQJMSClient.createTopic(topicName)); - MessageProducer producer = session.createProducer(HornetQJMSClient.createTopic(topicName)); + ActiveMQMessageConsumer cons = (ActiveMQMessageConsumer) session.createConsumer(ActiveMQJMSClient.createTopic(topicName)); + MessageProducer producer = session.createProducer(ActiveMQJMSClient.createTopic(topicName)); producer.send(session.createTextMessage()); try @@ -451,7 +451,7 @@ public class JMSServerControlTest extends ManagementTestBase } catch (Exception e) { - assertTrue(e.getMessage().startsWith("HQ119025")); + assertTrue(e.getMessage().startsWith("AMQ119025")); } UnitTestCase.checkBinding(context, topicJNDIBinding); @@ -485,14 +485,14 @@ public class JMSServerControlTest extends ManagementTestBase UnitTestCase.checkBinding(context, topicJNDIBinding); checkResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName)); - HornetQConnectionFactory cf = - new HornetQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); - HornetQConnection connection = (HornetQConnection) cf.createConnection(); + ActiveMQConnectionFactory cf = + new ActiveMQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection(); try { Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); // create a consumer will create a Core queue bound to the topic address - HornetQMessageConsumer cons = (HornetQMessageConsumer) session.createConsumer(HornetQJMSClient.createTopic(topicName)); + ActiveMQMessageConsumer cons = (ActiveMQMessageConsumer) session.createConsumer(ActiveMQJMSClient.createTopic(topicName)); control.destroyTopic(topicName, true); @@ -540,15 +540,15 @@ public class JMSServerControlTest extends ManagementTestBase UnitTestCase.checkBinding(context, queueJNDIBinding); checkResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName)); - HornetQConnectionFactory cf = - new HornetQConnectionFactory(false, new TransportConfiguration(NETTY_CONNECTOR_FACTORY)); + ActiveMQConnectionFactory cf = + new ActiveMQConnectionFactory(false, new TransportConfiguration(NETTY_CONNECTOR_FACTORY)); cf.setReconnectAttempts(-1); - HornetQConnection connection = (HornetQConnection) cf.createConnection(); + ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection(); try { Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); // create a consumer will create a Core queue bound to the topic address - MessageConsumer cons = session.createConsumer(HornetQJMSClient.createQueue(queueName)); + MessageConsumer cons = session.createConsumer(ActiveMQJMSClient.createQueue(queueName)); control.destroyQueue(queueName, true); @@ -649,14 +649,14 @@ public class JMSServerControlTest extends ManagementTestBase checkResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName)); Topic topic = (Topic) context.lookup(topicJNDIBinding); assertNotNull(topic); - HornetQConnectionFactory cf = new HornetQConnectionFactory(false, + ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(false, new TransportConfiguration(InVMConnectorFactory.class.getName())); Connection connection = cf.createConnection(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); // create a consumer will create a Core queue bound to the topic address session.createConsumer(topic); - String topicAddress = HornetQDestination.createTopicAddressFromName(topicName).toString(); + String topicAddress = ActiveMQDestination.createTopicAddressFromName(topicName).toString(); AddressControl addressControl = (AddressControl) server.getManagementService() .getResource(ResourceNames.CORE_ADDRESS + topicAddress); assertNotNull(addressControl); @@ -688,8 +688,8 @@ public class JMSServerControlTest extends ManagementTestBase checkResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName)); Topic topic = (Topic) context.lookup(topicJNDIBinding); assertNotNull(topic); - HornetQConnectionFactory cf = - new HornetQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ActiveMQConnectionFactory cf = + new ActiveMQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); Connection connection = cf.createConnection(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); // create a consumer will create a Core queue bound to the topic address @@ -705,7 +705,7 @@ public class JMSServerControlTest extends ManagementTestBase assertEquals(getNumberOfConsumers(), jsonArray.length()); - String topicAddress = HornetQDestination.createTopicAddressFromName(topicName).toString(); + String topicAddress = ActiveMQDestination.createTopicAddressFromName(topicName).toString(); AddressControl addressControl = (AddressControl) server.getManagementService() .getResource(ResourceNames.CORE_ADDRESS + topicAddress); assertNotNull(addressControl); @@ -789,7 +789,7 @@ public class JMSServerControlTest extends ManagementTestBase true, // blockOnNonDurableSend true, // autoGroup true, // preACK - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, // loadBalancingClassName + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, // loadBalancingClassName 1, // transactionBatchSize 1, // dupsOKBatchSize true, // useGlobalPools @@ -803,7 +803,7 @@ public class JMSServerControlTest extends ManagementTestBase "tst"); // groupID - HornetQQueueConnectionFactory cf = (HornetQQueueConnectionFactory) context.lookup("tst"); + ActiveMQQueueConnectionFactory cf = (ActiveMQQueueConnectionFactory) context.lookup("tst"); assertEquals(true, cf.isHA()); assertEquals("tst", cf.getClientID()); @@ -822,7 +822,7 @@ public class JMSServerControlTest extends ManagementTestBase assertEquals(true, cf.isBlockOnNonDurableSend()); assertEquals(true, cf.isAutoGroup()); assertEquals(true, cf.isPreAcknowledge()); - assertEquals(HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, cf.getConnectionLoadBalancingPolicyClassName()); + assertEquals(ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, cf.getConnectionLoadBalancingPolicyClassName()); assertEquals(1, cf.getTransactionBatchSize()); assertEquals(1, cf.getDupsOKBatchSize()); assertEquals(true, cf.isUseGlobalPools()); @@ -841,7 +841,7 @@ public class JMSServerControlTest extends ManagementTestBase control = createManagementControl(); - cf = (HornetQQueueConnectionFactory) context.lookup("tst"); + cf = (ActiveMQQueueConnectionFactory) context.lookup("tst"); assertEquals(true, cf.isHA()); assertEquals("tst", cf.getClientID()); @@ -859,7 +859,7 @@ public class JMSServerControlTest extends ManagementTestBase assertEquals(true, cf.isBlockOnNonDurableSend()); assertEquals(true, cf.isAutoGroup()); assertEquals(true, cf.isPreAcknowledge()); - assertEquals(HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, cf.getConnectionLoadBalancingPolicyClassName()); + assertEquals(ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, cf.getConnectionLoadBalancingPolicyClassName()); assertEquals(1, cf.getTransactionBatchSize()); assertEquals(1, cf.getDupsOKBatchSize()); assertEquals(true, cf.isUseGlobalPools()); @@ -886,7 +886,7 @@ public class JMSServerControlTest extends ManagementTestBase try { - cf = (HornetQQueueConnectionFactory) context.lookup("tst"); + cf = (ActiveMQQueueConnectionFactory) context.lookup("tst"); fail("Failure expected"); } catch (NamingException e) @@ -1000,7 +1000,7 @@ public class JMSServerControlTest extends ManagementTestBase { JMSServerControl control = createManagementControl(); - HornetQConnectionFactory cf = new HornetQConnectionFactory(false, + ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(false, new TransportConfiguration(InVMConnectorFactory.class.getName())); Connection connection = cf.createConnection(); @@ -1065,7 +1065,7 @@ public class JMSServerControlTest extends ManagementTestBase .addConnectorConfiguration("netty", new TransportConfiguration(NETTY_CONNECTOR_FACTORY)) .addConnectorConfiguration("invm", new TransportConfiguration(INVM_CONNECTOR_FACTORY)); - server = addServer(HornetQServers.newHornetQServer(conf, mbeanServer, true)); + server = addServer(ActiveMQServers.newActiveMQServer(conf, mbeanServer, true)); serverManager = new JMSServerManagerImpl(server); context = new InVMNamingContext(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java index 6a17716d12..ba1430889f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java @@ -21,15 +21,15 @@ import javax.jms.QueueSession; import javax.jms.Session; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.management.ResourceNames; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.api.jms.management.JMSServerControl; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQQueue; -import org.apache.activemq.jms.client.HornetQQueueConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQQueue; +import org.apache.activemq.jms.client.ActiveMQQueueConnectionFactory; /** * A JMSServerControlUsingCoreTest @@ -88,7 +88,7 @@ public class JMSServerControlUsingJMSTest extends JMSServerControlTest true, // blockOnNonDurableSend true, // autoGroup true, // preACK - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, // loadBalancingClassName + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, // loadBalancingClassName 1, // transactionBatchSize 1, // dupsOKBatchSize true, // useGlobalPools @@ -102,7 +102,7 @@ public class JMSServerControlUsingJMSTest extends JMSServerControlTest "tst"); // groupID - HornetQQueueConnectionFactory cf = (HornetQQueueConnectionFactory)context.lookup("tst"); + ActiveMQQueueConnectionFactory cf = (ActiveMQQueueConnectionFactory)context.lookup("tst"); assertEquals(true, cf.isHA()); assertEquals("tst", cf.getClientID()); @@ -121,7 +121,7 @@ public class JMSServerControlUsingJMSTest extends JMSServerControlTest assertEquals(true, cf.isBlockOnNonDurableSend()); assertEquals(true, cf.isAutoGroup()); assertEquals(true, cf.isPreAcknowledge()); - assertEquals(HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, cf.getConnectionLoadBalancingPolicyClassName()); + assertEquals(ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, cf.getConnectionLoadBalancingPolicyClassName()); assertEquals(1, cf.getTransactionBatchSize()); assertEquals(1, cf.getDupsOKBatchSize()); assertEquals(true, cf.isUseGlobalPools()); @@ -150,8 +150,8 @@ public class JMSServerControlUsingJMSTest extends JMSServerControlTest { super.setUp(); - HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(InVMConnectorFactory.class.getName())); + ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(InVMConnectorFactory.class.getName())); connection = cf.createQueueConnection(); session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); connection.start(); @@ -173,7 +173,7 @@ public class JMSServerControlUsingJMSTest extends JMSServerControlTest @Override protected JMSServerControl createManagementControl() throws Exception { - HornetQQueue managementQueue = (HornetQQueue)HornetQJMSClient.createQueue("hornetq.management"); + ActiveMQQueue managementQueue = (ActiveMQQueue) ActiveMQJMSClient.createQueue("activemq.management"); final JMSMessagingProxy proxy = new JMSMessagingProxy(session, managementQueue, ResourceNames.JMS_SERVER); return new JMSServerControl() diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSUtil.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSUtil.java index b5c5bb375e..fcd26a58e1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSUtil.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSUtil.java @@ -37,18 +37,18 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.client.SessionFailureListener; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.client.impl.Topology; import org.apache.activemq.core.client.impl.TopologyMemberImpl; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.cluster.ClusterConnection; import org.apache.activemq.core.server.cluster.ClusterManager; import org.apache.activemq.core.server.cluster.impl.ClusterConnectionImpl; -import org.apache.activemq.jms.client.HornetQConnection; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQJMSConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnection; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory; import org.apache.activemq.tests.integration.cluster.failover.FailoverTestBase; import org.apache.activemq.tests.util.RandomUtil; @@ -70,8 +70,8 @@ public class JMSUtil public static Connection createConnection(final String connectorFactory) throws JMSException { - HornetQJMSConnectionFactory cf = (HornetQJMSConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(connectorFactory)); + ActiveMQJMSConnectionFactory cf = (ActiveMQJMSConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(connectorFactory)); cf.setBlockOnNonDurableSend(true); cf.setBlockOnDurableSend(true); @@ -84,8 +84,8 @@ public class JMSUtil final long connectionTTL, final long clientFailureCheckPeriod) throws JMSException { - HornetQJMSConnectionFactory cf = (HornetQJMSConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(connectorFactory)); + ActiveMQJMSConnectionFactory cf = (ActiveMQJMSConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(connectorFactory)); cf.setBlockOnNonDurableSend(true); cf.setBlockOnDurableSend(true); @@ -130,8 +130,8 @@ public class JMSUtil public static String[] sendMessages(final Destination destination, final int messagesToSend) throws Exception { - HornetQJMSConnectionFactory cf = (HornetQJMSConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(InVMConnectorFactory.class.getName())); + ActiveMQJMSConnectionFactory cf = (ActiveMQJMSConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(InVMConnectorFactory.class.getName())); return JMSUtil.sendMessages(cf, destination, messagesToSend); } @@ -198,7 +198,7 @@ public class JMSUtil } } - public static void waitForServer(HornetQServer server) throws InterruptedException + public static void waitForServer(ActiveMQServer server) throws InterruptedException { long timetowait = System.currentTimeMillis() + 5000; while (!server.isStarted()) @@ -215,7 +215,7 @@ public class JMSUtil } } - public static void crash(HornetQServer server, ClientSession... sessions) throws Exception + public static void crash(ActiveMQServer server, ClientSession... sessions) throws Exception { final CountDownLatch latch = new CountDownLatch(sessions.length); @@ -265,18 +265,18 @@ public class JMSUtil // Inner classes ------------------------------------------------- - public static HornetQConnection createConnectionAndWaitForTopology(HornetQConnectionFactory factory, + public static ActiveMQConnection createConnectionAndWaitForTopology(ActiveMQConnectionFactory factory, int topologyMembers, int timeout) throws Exception { - HornetQConnection conn; + ActiveMQConnection conn; CountDownLatch countDownLatch = new CountDownLatch(topologyMembers); ServerLocator locator = factory.getServerLocator(); locator.addClusterTopologyListener(new FailoverTestBase.LatchClusterTopologyListener(countDownLatch)); - conn = (HornetQConnection) factory.createConnection(); + conn = (ActiveMQConnection) factory.createConnection(); boolean ok = countDownLatch.await(timeout, TimeUnit.SECONDS); if (!ok) @@ -286,7 +286,7 @@ public class JMSUtil return conn; } - public static void waitForFailoverTopology(final int timeToWait, final HornetQServer backupServer, final HornetQServer... liveServers) throws Exception + public static void waitForFailoverTopology(final int timeToWait, final ActiveMQServer backupServer, final ActiveMQServer... liveServers) throws Exception { long start = System.currentTimeMillis(); @@ -306,7 +306,7 @@ public class JMSUtil boolean exists = false; - for (HornetQServer liveServer : liveServers) + for (ActiveMQServer liveServer : liveServers) { ClusterConnectionImpl clusterConnection = (ClusterConnectionImpl) ccs.iterator().next(); Topology topology = clusterConnection.getTopology(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/TopicControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/TopicControlTest.java index b059503713..75904585f8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/TopicControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/TopicControlTest.java @@ -27,7 +27,7 @@ import java.util.Map; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.ObjectNameBuilder; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.management.JMSServerControl; import org.apache.activemq.api.jms.management.SubscriptionInfo; import org.apache.activemq.api.jms.management.TopicControl; @@ -35,10 +35,10 @@ import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.impl.LocalQueueBinding; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQTopic; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQTopic; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.jms.server.management.JMSNotificationType; import org.apache.activemq.tests.integration.management.ManagementControlHelper; @@ -65,7 +65,7 @@ public class TopicControlTest extends ManagementTestBase // Attributes ---------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; private JMSServerManagerImpl serverManager; @@ -73,7 +73,7 @@ public class TopicControlTest extends ManagementTestBase private String subscriptionName; - protected HornetQTopic topic; + protected ActiveMQTopic topic; private String topicBinding = "/topic/" + RandomUtil.randomString(); @@ -214,14 +214,14 @@ public class TopicControlTest extends ManagementTestBase { serverManager.createTopic(false, "my.jms.#", "jms/all"); serverManager.createTopic(false, "my.jms.A", "jms/A"); - HornetQTopic myTopic = (HornetQTopic) HornetQJMSClient.createTopic("my.jms.A"); + ActiveMQTopic myTopic = (ActiveMQTopic) ActiveMQJMSClient.createTopic("my.jms.A"); TopicControl topicControl = ManagementControlHelper.createTopicControl(myTopic, mbeanServer); String jsonString = topicControl.listDurableSubscriptionsAsJSON(); SubscriptionInfo[] infos = SubscriptionInfo.from(jsonString); Assert.assertEquals(1, infos.length); - Assert.assertEquals("HornetQ", infos[0].getClientID()); - Assert.assertEquals("HornetQ", infos[0].getName()); + Assert.assertEquals("ActiveMQ", infos[0].getClientID()); + Assert.assertEquals("ActiveMQ", infos[0].getName()); } @Test @@ -408,8 +408,8 @@ public class TopicControlTest extends ManagementTestBase JMSUtil.sendMessages(topic, 3); TopicControl topicControl = createManagementControl(); - Map[] messages = topicControl.listMessagesForSubscription(HornetQDestination.createQueueNameForDurableSubscription(true, clientID, - subscriptionName)); + Map[] messages = topicControl.listMessagesForSubscription(ActiveMQDestination.createQueueNameForDurableSubscription(true, clientID, + subscriptionName)); Assert.assertEquals(3, messages.length); connection.close(); @@ -425,8 +425,8 @@ public class TopicControlTest extends ManagementTestBase String[] ids = JMSUtil.sendMessages(topic, 3); TopicControl topicControl = createManagementControl(); - String jsonString = topicControl.listMessagesForSubscriptionAsJSON(HornetQDestination.createQueueNameForDurableSubscription(true, clientID, - subscriptionName)); + String jsonString = topicControl.listMessagesForSubscriptionAsJSON(ActiveMQDestination.createQueueNameForDurableSubscription(true, clientID, + subscriptionName)); Assert.assertNotNull(jsonString); JSONArray array = new JSONArray(jsonString); Assert.assertEquals(3, array.length()); @@ -447,8 +447,8 @@ public class TopicControlTest extends ManagementTestBase try { - topicControl.listMessagesForSubscription(HornetQDestination.createQueueNameForDurableSubscription(true, unknownClientID, - subscriptionName)); + topicControl.listMessagesForSubscription(ActiveMQDestination.createQueueNameForDurableSubscription(true, unknownClientID, + subscriptionName)); Assert.fail(); } catch (Exception e) @@ -465,8 +465,8 @@ public class TopicControlTest extends ManagementTestBase try { - topicControl.listMessagesForSubscription(HornetQDestination.createQueueNameForDurableSubscription(true, clientID, - unknownSubscription)); + topicControl.listMessagesForSubscription(ActiveMQDestination.createQueueNameForDurableSubscription(true, clientID, + unknownSubscription)); Assert.fail(); } catch (Exception e) @@ -598,7 +598,7 @@ public class TopicControlTest extends ManagementTestBase Configuration conf = createBasicConfig() .addAcceptorConfiguration(new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory")); - server = HornetQServers.newHornetQServer(conf, mbeanServer, false); + server = ActiveMQServers.newActiveMQServer(conf, mbeanServer, false); server.start(); serverManager = new JMSServerManagerImpl(server); @@ -611,7 +611,7 @@ public class TopicControlTest extends ManagementTestBase String topicName = RandomUtil.randomString(); serverManager.createTopic(false, topicName, topicBinding); - topic = (HornetQTopic) HornetQJMSClient.createTopic(topicName); + topic = (ActiveMQTopic) ActiveMQJMSClient.createTopic(topicName); } @Override diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/TopicControlUsingJMSTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/TopicControlUsingJMSTest.java index 78533b66f1..df17a13a13 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/TopicControlUsingJMSTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/TopicControlUsingJMSTest.java @@ -30,16 +30,16 @@ import org.junit.Assert; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.ResourceNames; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQQueue; -import org.apache.activemq.jms.client.HornetQTopic; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQQueue; +import org.apache.activemq.jms.client.ActiveMQTopic; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.tests.integration.management.ManagementTestBase; import org.apache.activemq.tests.unit.util.InVMNamingContext; @@ -52,7 +52,7 @@ public class TopicControlUsingJMSTest extends ManagementTestBase // Attributes ---------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; private JMSServerManagerImpl serverManager; @@ -60,7 +60,7 @@ public class TopicControlUsingJMSTest extends ManagementTestBase private String subscriptionName; - protected HornetQTopic topic; + protected ActiveMQTopic topic; protected JMSMessagingProxy proxy; @@ -311,8 +311,8 @@ public class TopicControlUsingJMSTest extends ManagementTestBase JMSUtil.sendMessages(topic, 3); Object[] data = (Object[])proxy.invokeOperation("listMessagesForSubscription", - HornetQDestination.createQueueNameForDurableSubscription(true, clientID, - subscriptionName)); + ActiveMQDestination.createQueueNameForDurableSubscription(true, clientID, + subscriptionName)); Assert.assertEquals(3, data.length); connection.close(); @@ -326,8 +326,8 @@ public class TopicControlUsingJMSTest extends ManagementTestBase try { proxy.invokeOperation("listMessagesForSubscription", - HornetQDestination.createQueueNameForDurableSubscription(true, unknownClientID, - subscriptionName)); + ActiveMQDestination.createQueueNameForDurableSubscription(true, unknownClientID, + subscriptionName)); Assert.fail(); } catch (Exception e) @@ -343,7 +343,7 @@ public class TopicControlUsingJMSTest extends ManagementTestBase try { proxy.invokeOperation("listMessagesForSubscription", - HornetQDestination.createQueueNameForDurableSubscription(true, clientID, unknownSubscription)); + ActiveMQDestination.createQueueNameForDurableSubscription(true, clientID, unknownSubscription)); Assert.fail(); } catch (Exception e) @@ -439,7 +439,7 @@ public class TopicControlUsingJMSTest extends ManagementTestBase Configuration conf = createBasicConfig() .addAcceptorConfiguration(new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory")); - server = HornetQServers.newHornetQServer(conf, mbeanServer, false); + server = ActiveMQServers.newActiveMQServer(conf, mbeanServer, false); server.start(); serverManager = new JMSServerManagerImpl(server); @@ -452,16 +452,16 @@ public class TopicControlUsingJMSTest extends ManagementTestBase String topicName = RandomUtil.randomString(); serverManager.createTopic(false, topicName, topicBinding); - topic = (HornetQTopic)HornetQJMSClient.createTopic(topicName); + topic = (ActiveMQTopic) ActiveMQJMSClient.createTopic(topicName); - HornetQConnectionFactory cf = - HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, - new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ActiveMQConnectionFactory cf = + ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, + new TransportConfiguration(INVM_CONNECTOR_FACTORY)); connection = cf.createQueueConnection(); session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); connection.start(); - HornetQQueue managementQueue = (HornetQQueue)HornetQJMSClient.createQueue("hornetq.management"); + ActiveMQQueue managementQueue = (ActiveMQQueue) ActiveMQJMSClient.createQueue("activemq.management"); proxy = new JMSMessagingProxy(session, managementQueue, ResourceNames.JMS_TOPIC + topic.getTopicName()); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/journal/JournalPerfTuneTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/journal/JournalPerfTuneTest.java index 0e241c8414..807707c83c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/journal/JournalPerfTuneTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/journal/JournalPerfTuneTest.java @@ -84,7 +84,7 @@ public class JournalPerfTuneTest extends UnitTestCase final int compactMinFiles = 20; final int compactPercentage = 30; final String filePrefix = "data"; - final String extension = "hq"; + final String extension = "amq"; final int maxIO = 500; final String journalDir = getTestDir(); @@ -104,7 +104,7 @@ public class JournalPerfTuneTest extends UnitTestCase filePrefix, extension, maxIO); - addHornetQComponent(journal); + addActiveMQComponent(journal); journal.start(); journal.load(new LoaderCB()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/journal/OldFormatTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/journal/OldFormatTest.java index a837f3a70e..ea87615e99 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/journal/OldFormatTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/journal/OldFormatTest.java @@ -47,7 +47,7 @@ public class OldFormatTest extends JournalImplTestBase { setup(2, 100 * 1024, true); - SequentialFile file = fileFactory.createSequentialFile("hq-1.hq", 1); + SequentialFile file = fileFactory.createSequentialFile("amq-1.amq", 1); ByteBuffer buffer = ByteBuffer.allocateDirect(100 * 1024); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/largemessage/LargeMessageTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/largemessage/LargeMessageTestBase.java index e20dcbfaa9..0fc94eeaf1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/largemessage/LargeMessageTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/largemessage/LargeMessageTestBase.java @@ -35,7 +35,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; @@ -120,7 +120,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase { clearDataRecreateServerDirs(); - HornetQServer server = createServer(realFiles); + ActiveMQServer server = createServer(realFiles); server.start(); ServerLocator locator = createInVMNonHALocator(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/largemessage/ServerLargeMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/largemessage/ServerLargeMessageTest.java index 8f5bd6961a..308b498b63 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/largemessage/ServerLargeMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/largemessage/ServerLargeMessageTest.java @@ -18,11 +18,11 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.persistence.impl.journal.JournalStorageManager; import org.apache.activemq.core.persistence.impl.journal.LargeServerMessageImpl; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.Assert; @@ -50,7 +50,7 @@ public class ServerLargeMessageTest extends ServiceTestBase @Test public void testSendServerMessage() throws Exception { - HornetQServer server = createServer(true); + ActiveMQServer server = createServer(true); server.start(); @@ -66,12 +66,12 @@ public class ServerLargeMessageTest extends ServiceTestBase fileMessage.setMessageID(1005); - for (int i = 0; i < 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) + for (int i = 0; i < 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) { fileMessage.addBytes(new byte[]{UnitTestCase.getSamplebyte(i)}); } // The server would be doing this - fileMessage.putLongProperty(Message.HDR_LARGE_BODY_SIZE, 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + fileMessage.putLongProperty(Message.HDR_LARGE_BODY_SIZE, 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); fileMessage.releaseResources(); @@ -94,9 +94,9 @@ public class ServerLargeMessageTest extends ServiceTestBase Assert.assertNotNull(msg); - Assert.assertEquals(msg.getBodySize(), 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + Assert.assertEquals(msg.getBodySize(), 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); - for (int i = 0; i < 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) + for (int i = 0; i < 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) { Assert.assertEquals(UnitTestCase.getSamplebyte(i), msg.getBodyBuffer().readByte()); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AcceptorControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AcceptorControlTest.java index 0bfecabf6e..d195f8e755 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AcceptorControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AcceptorControlTest.java @@ -27,7 +27,7 @@ import org.apache.activemq.api.core.management.AcceptorControl; import org.apache.activemq.api.core.management.CoreNotificationType; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.management.Notification; import org.apache.activemq.tests.integration.SimpleNotificationService; import org.apache.activemq.tests.util.RandomUtil; @@ -58,7 +58,7 @@ public class AcceptorControlTest extends ManagementTestBase Configuration conf = createBasicConfig() .addAcceptorConfiguration(acceptorConfig); - HornetQServer service = createServer(false, conf, mbeanServer); + ActiveMQServer service = createServer(false, conf, mbeanServer); service.start(); AcceptorControl acceptorControl = createManagementControl(acceptorConfig.getName()); @@ -75,7 +75,7 @@ public class AcceptorControlTest extends ManagementTestBase RandomUtil.randomString()); Configuration conf = createBasicConfig() .addAcceptorConfiguration(acceptorConfig); - HornetQServer service = createServer(false, conf, mbeanServer); + ActiveMQServer service = createServer(false, conf, mbeanServer); service.start(); AcceptorControl acceptorControl = createManagementControl(acceptorConfig.getName()); @@ -134,7 +134,7 @@ public class AcceptorControlTest extends ManagementTestBase RandomUtil.randomString()); Configuration conf = createBasicConfig() .addAcceptorConfiguration(acceptorConfig); - HornetQServer service = createServer(false, conf, mbeanServer); + ActiveMQServer service = createServer(false, conf, mbeanServer); service.start(); AcceptorControl acceptorControl = createManagementControl(acceptorConfig.getName()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AcceptorControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AcceptorControlUsingCoreTest.java index 5236efc5d3..c0489a9fff 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AcceptorControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AcceptorControlUsingCoreTest.java @@ -19,7 +19,7 @@ import java.util.Map; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.AcceptorControl; import org.apache.activemq.api.core.management.ResourceNames; @@ -50,7 +50,7 @@ public class AcceptorControlUsingCoreTest extends AcceptorControlTest @Override protected AcceptorControl createManagementControl(final String name) throws Exception { - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); addServerLocator(locator); ClientSessionFactory sf = createSessionFactory(locator); session = sf.createSession(false, true, true); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/HornetQServerControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ActiveMQServerControlTest.java similarity index 90% rename from tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/HornetQServerControlTest.java rename to tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ActiveMQServerControlTest.java index f78037404f..cc313f1ff9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/HornetQServerControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ActiveMQServerControlTest.java @@ -24,12 +24,12 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.AddressSettingsInfo; import org.apache.activemq.api.core.management.BridgeControl; import org.apache.activemq.api.core.management.DivertControl; -import org.apache.activemq.api.core.management.HornetQServerControl; +import org.apache.activemq.api.core.management.ActiveMQServerControl; import org.apache.activemq.api.core.management.ObjectNameBuilder; import org.apache.activemq.api.core.management.QueueControl; import org.apache.activemq.api.core.management.RoleInfo; @@ -38,8 +38,8 @@ import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.messagecounter.impl.MessageCounterManagerImpl; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.settings.impl.SlowConsumerPolicy; import org.apache.activemq.core.transaction.impl.XidImpl; import org.apache.activemq.tests.util.RandomUtil; @@ -59,14 +59,14 @@ import org.junit.Test; *

    * Created 26 nov. 2008 14:18:48 */ -public class HornetQServerControlTest extends ManagementTestBase +public class ActiveMQServerControlTest extends ManagementTestBase { // Constants ----------------------------------------------------- // Attributes ---------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; private Configuration conf; @@ -95,7 +95,7 @@ public class HornetQServerControlTest extends ManagementTestBase @Test public void testGetAttributes() throws Exception { - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); Assert.assertEquals(server.getVersion().getFullVersion(), serverControl.getVersion()); @@ -148,7 +148,7 @@ public class HornetQServerControlTest extends ManagementTestBase @Test public void testGetConnectors() throws Exception { - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); Object[] connectorData = serverControl.getConnectors(); Assert.assertNotNull(connectorData); @@ -162,7 +162,7 @@ public class HornetQServerControlTest extends ManagementTestBase @Test public void testGetConnectorsAsJSON() throws Exception { - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); String jsonString = serverControl.getConnectorsAsJSON(); Assert.assertNotNull(jsonString); @@ -180,7 +180,7 @@ public class HornetQServerControlTest extends ManagementTestBase SimpleString address = RandomUtil.randomSimpleString(); SimpleString name = RandomUtil.randomSimpleString(); - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); checkNoResource(ObjectNameBuilder.DEFAULT.getQueueObjectName(address, name)); @@ -207,7 +207,7 @@ public class HornetQServerControlTest extends ManagementTestBase String filter = "color = 'green'"; boolean durable = true; - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); checkNoResource(ObjectNameBuilder.DEFAULT.getQueueObjectName(address, name)); @@ -233,7 +233,7 @@ public class HornetQServerControlTest extends ManagementTestBase SimpleString name = RandomUtil.randomSimpleString(); boolean durable = true; - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); checkNoResource(ObjectNameBuilder.DEFAULT.getQueueObjectName(address, name)); @@ -260,7 +260,7 @@ public class HornetQServerControlTest extends ManagementTestBase String filter = null; boolean durable = true; - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); checkNoResource(ObjectNameBuilder.DEFAULT.getQueueObjectName(address, name)); @@ -287,7 +287,7 @@ public class HornetQServerControlTest extends ManagementTestBase String filter = ""; boolean durable = true; - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); checkNoResource(ObjectNameBuilder.DEFAULT.getQueueObjectName(address, name)); @@ -312,18 +312,18 @@ public class HornetQServerControlTest extends ManagementTestBase SimpleString address = RandomUtil.randomSimpleString(); SimpleString name = RandomUtil.randomSimpleString(); - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); // due to replication, there can be another queue created for replicating // management operations - Assert.assertFalse(HornetQServerControlTest.contains(name.toString(), serverControl.getQueueNames())); + Assert.assertFalse(ActiveMQServerControlTest.contains(name.toString(), serverControl.getQueueNames())); serverControl.createQueue(address.toString(), name.toString()); - Assert.assertTrue(HornetQServerControlTest.contains(name.toString(), serverControl.getQueueNames())); + Assert.assertTrue(ActiveMQServerControlTest.contains(name.toString(), serverControl.getQueueNames())); serverControl.destroyQueue(name.toString()); - Assert.assertFalse(HornetQServerControlTest.contains(name.toString(), serverControl.getQueueNames())); + Assert.assertFalse(ActiveMQServerControlTest.contains(name.toString(), serverControl.getQueueNames())); } @Test @@ -332,24 +332,24 @@ public class HornetQServerControlTest extends ManagementTestBase SimpleString address = RandomUtil.randomSimpleString(); SimpleString name = RandomUtil.randomSimpleString(); - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); // due to replication, there can be another queue created for replicating // management operations - Assert.assertFalse(HornetQServerControlTest.contains(address.toString(), serverControl.getAddressNames())); + Assert.assertFalse(ActiveMQServerControlTest.contains(address.toString(), serverControl.getAddressNames())); serverControl.createQueue(address.toString(), name.toString()); - Assert.assertTrue(HornetQServerControlTest.contains(address.toString(), serverControl.getAddressNames())); + Assert.assertTrue(ActiveMQServerControlTest.contains(address.toString(), serverControl.getAddressNames())); serverControl.destroyQueue(name.toString()); - Assert.assertFalse(HornetQServerControlTest.contains(address.toString(), serverControl.getAddressNames())); + Assert.assertFalse(ActiveMQServerControlTest.contains(address.toString(), serverControl.getAddressNames())); } @Test public void testMessageCounterMaxDayCount() throws Exception { - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); Assert.assertEquals(MessageCounterManagerImpl.DEFAULT_MAX_DAY_COUNT, serverControl.getMessageCounterMaxDayCount()); @@ -382,7 +382,7 @@ public class HornetQServerControlTest extends ManagementTestBase @Test public void testGetMessageCounterSamplePeriod() throws Exception { - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); Assert.assertEquals(MessageCounterManagerImpl.DEFAULT_SAMPLE_PERIOD, serverControl.getMessageCounterSamplePeriod()); @@ -431,7 +431,7 @@ public class HornetQServerControlTest extends ManagementTestBase @Test public void testSecuritySettings() throws Exception { - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); String addressMatch = "test.#"; String exactAddress = "test.whatever"; @@ -482,7 +482,7 @@ public class HornetQServerControlTest extends ManagementTestBase @Test public void testAddressSettings() throws Exception { - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); String addressMatch = "test.#"; String exactAddress = "test.whatever"; @@ -657,7 +657,7 @@ public class HornetQServerControlTest extends ManagementTestBase String routingName = RandomUtil.randomString(); String forwardingAddress = RandomUtil.randomString(); - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); checkNoResource(ObjectNameBuilder.DEFAULT.getDivertObjectName(name)); assertEquals(0, serverControl.getDivertNames().length); @@ -678,7 +678,7 @@ public class HornetQServerControlTest extends ManagementTestBase assertEquals(name, divertNames[0]); // check that a message sent to the address is diverted exclusively - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory csf = createSessionFactory(locator); ClientSession session = csf.createSession(); @@ -739,12 +739,12 @@ public class HornetQServerControlTest extends ManagementTestBase String targetAddress = RandomUtil.randomString(); String targetQueue = RandomUtil.randomString(); - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); checkNoResource(ObjectNameBuilder.DEFAULT.getBridgeObjectName(name)); assertEquals(0, serverControl.getBridgeNames().length); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory csf = createSessionFactory(locator); ClientSession session = csf.createSession(); @@ -756,13 +756,13 @@ public class HornetQServerControlTest extends ManagementTestBase targetAddress, null, // forwardingAddress null, // filterString - HornetQClient.DEFAULT_RETRY_INTERVAL, - HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, - HornetQClient.INITIAL_CONNECT_ATTEMPTS, - HornetQClient.DEFAULT_RECONNECT_ATTEMPTS, + ActiveMQClient.DEFAULT_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + ActiveMQClient.INITIAL_CONNECT_ATTEMPTS, + ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS, false, // duplicateDetection 1, // confirmationWindowSize - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, connectorConfig.getName(), // liveConnector false, false, @@ -828,7 +828,7 @@ public class HornetQServerControlTest extends ManagementTestBase SimpleString atestq = new SimpleString("BasicXaTestq"); Xid xid = newXID(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory csf = createSessionFactory(locator); ClientSession clientSession = csf.createSession(true, false, false); clientSession.createQueue(atestq, atestq, null, true); @@ -850,7 +850,7 @@ public class HornetQServerControlTest extends ManagementTestBase clientSession.end(xid, XAResource.TMSUCCESS); clientSession.prepare(xid); - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); JSONArray jsonArray = new JSONArray(serverControl.listProducersInfoAsJSON()); @@ -874,7 +874,7 @@ public class HornetQServerControlTest extends ManagementTestBase SimpleString atestq = new SimpleString("BasicXaTestq"); Xid xid = newXID(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory csf = createSessionFactory(locator); ClientSession clientSession = csf.createSession(true, false, false); clientSession.createQueue(atestq, atestq, null, true); @@ -899,7 +899,7 @@ public class HornetQServerControlTest extends ManagementTestBase clientSession.close(); locator.close(); - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); String html = serverControl.listPreparedTransactionDetailsAsHTML(); Assert.assertTrue(html.matches(".*m1.*")); @@ -917,7 +917,7 @@ public class HornetQServerControlTest extends ManagementTestBase byte[] globalTransactionId = UUIDGenerator.getInstance().generateStringUUID().getBytes(); Xid xid = new XidImpl("xa1".getBytes(), 1, globalTransactionId); Xid xid2 = new XidImpl("xa2".getBytes(), 1, globalTransactionId); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory csf = createSessionFactory(locator); ClientSession clientSession = csf.createSession(true, false, false); clientSession.createQueue(recQueue, recQueue, null, true); @@ -929,13 +929,13 @@ public class HornetQServerControlTest extends ManagementTestBase locator.close(); - ServerLocator receiveLocator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator receiveLocator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory receiveCsf = createSessionFactory(receiveLocator); ClientSession receiveClientSession = receiveCsf.createSession(true, false, false); ClientConsumer consumer = receiveClientSession.createConsumer(recQueue); - ServerLocator sendLocator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator sendLocator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sendCsf = createSessionFactory(sendLocator); ClientSession sendClientSession = sendCsf.createSession(true, false, false); ClientProducer producer = sendClientSession.createProducer(sendQueue); @@ -956,7 +956,7 @@ public class HornetQServerControlTest extends ManagementTestBase receiveClientSession.prepare(xid); sendClientSession.prepare(xid2); - HornetQServerControl serverControl = createManagementControl(); + ActiveMQServerControl serverControl = createManagementControl(); sendLocator.close(); receiveLocator.close(); @@ -965,7 +965,7 @@ public class HornetQServerControlTest extends ManagementTestBase success = serverControl.commitPreparedTransaction(XidImpl.toBase64String(xid)); - System.out.println("HornetQServerControlTest.testCommitPreparedTransactions"); + System.out.println("ActiveMQServerControlTest.testCommitPreparedTransactions"); } @Test @@ -974,7 +974,7 @@ public class HornetQServerControlTest extends ManagementTestBase scaleDown(new ScaleDownHandler() { @Override - public void scaleDown(HornetQServerControl control) throws Exception + public void scaleDown(ActiveMQServerControl control) throws Exception { control.scaleDown("server2-connector"); } @@ -987,7 +987,7 @@ public class HornetQServerControlTest extends ManagementTestBase scaleDown(new ScaleDownHandler() { @Override - public void scaleDown(HornetQServerControl control) throws Exception + public void scaleDown(ActiveMQServerControl control) throws Exception { control.scaleDown(null); } @@ -1003,7 +1003,7 @@ public class HornetQServerControlTest extends ManagementTestBase HashMap params = new HashMap(); params.put("server-id", "2"); conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName(), params)); - HornetQServer server2 = HornetQServers.newHornetQServer(conf, null, true); + ActiveMQServer server2 = ActiveMQServers.newActiveMQServer(conf, null, true); this.conf.getConnectorConfigurations().clear(); this.conf.getConnectorConfigurations().put("server2-connector", new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY, params)); try @@ -1011,7 +1011,7 @@ public class HornetQServerControlTest extends ManagementTestBase server2.start(); server.createQueue(address, address, null, true, false); server2.createQueue(address, address, null, true, false); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory csf = createSessionFactory(locator); ClientSession session = csf.createSession(); ClientProducer producer = session.createProducer(address); @@ -1022,10 +1022,10 @@ public class HornetQServerControlTest extends ManagementTestBase producer.send(message); } - HornetQServerControl managementControl = createManagementControl(); + ActiveMQServerControl managementControl = createManagementControl(); handler.scaleDown(managementControl); locator.close(); - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY, params)); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY, params)); csf = createSessionFactory(locator); session = csf.createSession(); session.start(); @@ -1044,7 +1044,7 @@ public class HornetQServerControlTest extends ManagementTestBase // Package protected --------------------------------------------- interface ScaleDownHandler { - void scaleDown(HornetQServerControl control) throws Exception; + void scaleDown(ActiveMQServerControl control) throws Exception; } // Protected ----------------------------------------------------- @@ -1066,7 +1066,7 @@ public class HornetQServerControlTest extends ManagementTestBase .clearAcceptorConfigurations() .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())) .addConnectorConfiguration(connectorConfig.getName(), connectorConfig); - server = HornetQServers.newHornetQServer(conf, mbeanServer, true); + server = ActiveMQServers.newActiveMQServer(conf, mbeanServer, true); server.start(); } @@ -1086,9 +1086,9 @@ public class HornetQServerControlTest extends ManagementTestBase super.tearDown(); } - protected HornetQServerControl createManagementControl() throws Exception + protected ActiveMQServerControl createManagementControl() throws Exception { - return ManagementControlHelper.createHornetQServerControl(mbeanServer); + return ManagementControlHelper.createActiveMQServerControl(mbeanServer); } // Private ------------------------------------------------------- diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/HornetQServerControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ActiveMQServerControlUsingCoreTest.java similarity index 94% rename from tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/HornetQServerControlUsingCoreTest.java rename to tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ActiveMQServerControlUsingCoreTest.java index 1f8744b606..15766997fa 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/HornetQServerControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ActiveMQServerControlUsingCoreTest.java @@ -15,9 +15,9 @@ package org.apache.activemq.tests.integration.management; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.api.core.management.HornetQServerControl; +import org.apache.activemq.api.core.management.ActiveMQServerControl; import org.apache.activemq.api.core.management.Parameter; import org.apache.activemq.api.core.management.ResourceNames; import org.apache.activemq.tests.util.UnitTestCase; @@ -25,11 +25,11 @@ import org.junit.After; import org.junit.Before; /** - * A HornetQServerControlUsingCoreTest + * A ActiveMQServerControlUsingCoreTest * * @author Jeff Mesnil */ -public class HornetQServerControlUsingCoreTest extends HornetQServerControlTest +public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTest { // Constants ----------------------------------------------------- @@ -52,7 +52,7 @@ public class HornetQServerControlUsingCoreTest extends HornetQServerControlTest // Public -------------------------------------------------------- - // HornetQServerControlTest overrides -------------------------- + // ActiveMQServerControlTest overrides -------------------------- private ClientSession session; private ServerLocator locator; @@ -63,7 +63,7 @@ public class HornetQServerControlUsingCoreTest extends HornetQServerControlTest { super.setUp(); - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); session = sf.createSession(false, true, true); session.start(); @@ -89,7 +89,7 @@ public class HornetQServerControlUsingCoreTest extends HornetQServerControlTest super.restartServer(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); session = sf.createSession(false, true, true); session.start(); @@ -108,9 +108,9 @@ public class HornetQServerControlUsingCoreTest extends HornetQServerControlTest } @Override - protected HornetQServerControl createManagementControl() throws Exception + protected ActiveMQServerControl createManagementControl() throws Exception { - return new HornetQServerControl() + return new ActiveMQServerControl() { @Override public void updateDuplicateIdCache(String address, Object[] ids) @@ -218,12 +218,12 @@ public class HornetQServerControlUsingCoreTest extends HornetQServerControlTest public String[] getAddressNames() { - return HornetQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("addressNames")); + return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("addressNames")); } public String[] getQueueNames() { - return HornetQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("queueNames")); + return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("queueNames")); } public int getIDCacheSize() @@ -233,17 +233,17 @@ public class HornetQServerControlUsingCoreTest extends HornetQServerControlTest public String[] getInterceptorClassNames() { - return HornetQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("incomingInterceptorClassNames")); + return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("incomingInterceptorClassNames")); } public String[] getIncomingInterceptorClassNames() { - return HornetQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("incomingInterceptorClassNames")); + return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("incomingInterceptorClassNames")); } public String[] getOutgoingInterceptorClassNames() { - return HornetQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("outgoingInterceptorClassNames")); + return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("outgoingInterceptorClassNames")); } public String getJournalDirectory() @@ -631,7 +631,7 @@ public class HornetQServerControlUsingCoreTest extends HornetQServerControlTest public String[] getBridgeNames() { - return HornetQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("bridgeNames")); + return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("bridgeNames")); } public void destroyBridge(String name) throws Exception @@ -657,7 +657,7 @@ public class HornetQServerControlUsingCoreTest extends HornetQServerControlTest public String[] getDivertNames() { - return HornetQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("divertNames")); + return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("divertNames")); } public void createBridge(String name, 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 2aa2d24c9a..4a92e6f58a 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 @@ -22,7 +22,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.AddressControl; import org.apache.activemq.api.core.management.RoleInfo; @@ -30,7 +30,7 @@ import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.security.CheckType; import org.apache.activemq.core.security.Role; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.impl.QueueImpl; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.RandomUtil; @@ -49,7 +49,7 @@ import static org.apache.activemq.tests.util.RandomUtil.randomString; public class AddressControlTest extends ManagementTestBase { - private HornetQServer server; + private ActiveMQServer server; protected ClientSession session; private ServerLocator locator; private ClientSessionFactory sf; @@ -110,7 +110,7 @@ public class AddressControlTest extends ManagementTestBase assertEquals(1, bindingNames.length); assertEquals(queue.toString(), bindingNames[0]); - server.getHornetQServerControl().createDivert(divertName, randomString(), address.toString(), RandomUtil.randomString(), false, null, null); + server.getActiveMQServerControl().createDivert(divertName, randomString(), address.toString(), RandomUtil.randomString(), false, null, null); bindingNames = addressControl.getBindingNames(); Assert.assertEquals(2, bindingNames.length); @@ -221,7 +221,7 @@ public class AddressControlTest extends ManagementTestBase server.getAddressSettingsRepository().addMatch(address.toString(), addressSettings); server.start(); ServerLocator locator2 = - HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( + ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration( UnitTestCase.INVM_CONNECTOR_FACTORY)); addServerLocator(locator2); ClientSessionFactory sf2 = createSessionFactory(locator2); @@ -289,7 +289,7 @@ public class AddressControlTest extends ManagementTestBase server.getAddressSettingsRepository().addMatch(address.toString(), addressSettings); server.start(); - ServerLocator locator2 = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( + ServerLocator locator2 = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration( UnitTestCase.INVM_CONNECTOR_FACTORY)); addServerLocator(locator2); ClientSessionFactory sf2 = createSessionFactory(locator2); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AddressControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AddressControlUsingCoreTest.java index bd31b49e7c..2a81542dc9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AddressControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/AddressControlUsingCoreTest.java @@ -34,7 +34,7 @@ import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.security.CheckType; import org.apache.activemq.core.security.Role; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.RandomUtil; /** @@ -52,7 +52,7 @@ public class AddressControlUsingCoreTest extends ManagementTestBase // Attributes ---------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; protected ClientSession session; @@ -118,7 +118,7 @@ public class AddressControlUsingCoreTest extends ManagementTestBase assertEquals(1, bindingNames.length); assertEquals(queue.toString(), bindingNames[0]); - server.getHornetQServerControl().createDivert(divertName, randomString(), address.toString(), RandomUtil.randomString(), false, null, null); + server.getActiveMQServerControl().createDivert(divertName, randomString(), address.toString(), RandomUtil.randomString(), false, null, null); bindingNames = (Object[])proxy.retrieveAttributeValue("bindingNames"); assertEquals(2, bindingNames.length); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/BridgeControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/BridgeControlTest.java index 69cbfeaea2..fd629f0c58 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/BridgeControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/BridgeControlTest.java @@ -34,8 +34,8 @@ import org.apache.activemq.core.config.CoreQueueConfiguration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; import org.apache.activemq.core.remoting.impl.invm.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.server.management.Notification; import org.apache.activemq.tests.integration.SimpleNotificationService; import org.apache.activemq.tests.util.RandomUtil; @@ -46,8 +46,8 @@ import org.apache.activemq.tests.util.RandomUtil; */ public class BridgeControlTest extends ManagementTestBase { - private HornetQServer server_0; - private HornetQServer server_1; + private ActiveMQServer server_0; + private ActiveMQServer server_1; private BridgeConfiguration bridgeConfig; @@ -171,11 +171,11 @@ public class BridgeControlTest extends ManagementTestBase .addQueueConfiguration(sourceQueueConfig) .addBridgeConfiguration(bridgeConfig); - server_1 = HornetQServers.newHornetQServer(conf_1, MBeanServerFactory.createMBeanServer(), false); + server_1 = ActiveMQServers.newActiveMQServer(conf_1, MBeanServerFactory.createMBeanServer(), false); addServer(server_1); server_1.start(); - server_0 = HornetQServers.newHornetQServer(conf_0, mbeanServer, false); + server_0 = ActiveMQServers.newActiveMQServer(conf_0, mbeanServer, false); addServer(server_0); server_0.start(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/BridgeControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/BridgeControlUsingCoreTest.java index 1d5ae7596a..4067204990 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/BridgeControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/BridgeControlUsingCoreTest.java @@ -27,7 +27,7 @@ import org.junit.Assert; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.ObjectNameBuilder; import org.apache.activemq.api.core.management.ResourceNames; @@ -37,8 +37,8 @@ import org.apache.activemq.core.config.CoreQueueConfiguration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; import org.apache.activemq.core.remoting.impl.invm.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.tests.util.RandomUtil; /** @@ -56,11 +56,11 @@ public class BridgeControlUsingCoreTest extends ManagementTestBase // Attributes ---------------------------------------------------- - private HornetQServer server_0; + private ActiveMQServer server_0; private BridgeConfiguration bridgeConfig; - private HornetQServer server_1; + private ActiveMQServer server_1; private ClientSession session; @@ -165,14 +165,14 @@ public class BridgeControlUsingCoreTest extends ManagementTestBase .addQueueConfiguration(sourceQueueConfig) .addBridgeConfiguration(bridgeConfig); - server_1 = addServer(HornetQServers.newHornetQServer(conf_1, MBeanServerFactory.createMBeanServer(), false)); + server_1 = addServer(ActiveMQServers.newActiveMQServer(conf_1, MBeanServerFactory.createMBeanServer(), false)); server_1.start(); - server_0 = addServer(HornetQServers.newHornetQServer(conf_0, mbeanServer, false)); + server_0 = addServer(ActiveMQServers.newActiveMQServer(conf_0, mbeanServer, false)); server_0.start(); ServerLocator locator = - addServerLocator(HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( - INVM_CONNECTOR_FACTORY))); + addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration( + INVM_CONNECTOR_FACTORY))); ClientSessionFactory sf = createSessionFactory(locator); session = addClientSession(sf.createSession(false, true, true)); session.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/BroadcastGroupControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/BroadcastGroupControlTest.java index 0de7ab0203..dc88d15e6a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/BroadcastGroupControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/BroadcastGroupControlTest.java @@ -24,8 +24,8 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration; import org.apache.activemq.api.core.management.BroadcastGroupControl; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.api.core.Pair; import org.apache.activemq.utils.json.JSONArray; @@ -36,7 +36,7 @@ import org.apache.activemq.utils.json.JSONArray; public class BroadcastGroupControlTest extends ManagementTestBase { - private HornetQServer service; + private ActiveMQServer service; // Static -------------------------------------------------------- @@ -73,7 +73,7 @@ public class BroadcastGroupControlTest extends ManagementTestBase .addConnectorConfiguration(connectorConfiguration.getName(), connectorConfiguration) .addBroadcastGroupConfiguration(broadcastGroupConfig) .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY)); - service = addServer(HornetQServers.newHornetQServer(conf, mbeanServer, false)); + service = addServer(ActiveMQServers.newActiveMQServer(conf, mbeanServer, false)); service.start(); BroadcastGroupControl broadcastGroupControl = createManagementControl(broadcastGroupConfig.getName()); @@ -111,7 +111,7 @@ public class BroadcastGroupControlTest extends ManagementTestBase .addConnectorConfiguration(connectorConfiguration.getName(), connectorConfiguration) .addBroadcastGroupConfiguration(broadcastGroupConfig) .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY)); - service = addServer(HornetQServers.newHornetQServer(conf, mbeanServer, false)); + service = addServer(ActiveMQServers.newActiveMQServer(conf, mbeanServer, false)); service.start(); BroadcastGroupControl broadcastGroupControl = createManagementControl(broadcastGroupConfig.getName()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ClusterConnectionControl2Test.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ClusterConnectionControl2Test.java index 13a45d18ed..454729d334 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ClusterConnectionControl2Test.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ClusterConnectionControl2Test.java @@ -35,8 +35,8 @@ import org.apache.activemq.core.config.ClusterConnectionConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.CoreQueueConfiguration; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.tests.util.RandomUtil; /** @@ -54,9 +54,9 @@ public class ClusterConnectionControl2Test extends ManagementTestBase // Attributes ---------------------------------------------------- - private HornetQServer server0; + private ActiveMQServer server0; - private HornetQServer server1; + private ActiveMQServer server1; private MBeanServer mbeanServer_1; @@ -168,9 +168,9 @@ public class ClusterConnectionControl2Test extends ManagementTestBase .addBroadcastGroupConfiguration(broadcastGroupConfig); mbeanServer_1 = MBeanServerFactory.createMBeanServer(); - server1 = addServer(HornetQServers.newHornetQServer(conf_1, mbeanServer_1, false)); + server1 = addServer(ActiveMQServers.newActiveMQServer(conf_1, mbeanServer_1, false)); - server0 = addServer(HornetQServers.newHornetQServer(conf_0, mbeanServer, false)); + server0 = addServer(ActiveMQServers.newActiveMQServer(conf_0, mbeanServer, false)); server0.start(); waitForServer(server0); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ClusterConnectionControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ClusterConnectionControlTest.java index 69162cc2b4..7222c303da 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ClusterConnectionControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ClusterConnectionControlTest.java @@ -37,8 +37,8 @@ import org.apache.activemq.core.config.CoreQueueConfiguration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; import org.apache.activemq.core.remoting.impl.invm.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.server.management.Notification; import org.apache.activemq.tests.integration.SimpleNotificationService; import org.apache.activemq.tests.util.RandomUtil; @@ -59,13 +59,13 @@ public class ClusterConnectionControlTest extends ManagementTestBase // Attributes ---------------------------------------------------- - private HornetQServer server_0; + private ActiveMQServer server_0; private ClusterConnectionConfiguration clusterConnectionConfig1; private ClusterConnectionConfiguration clusterConnectionConfig2; - private HornetQServer server_1; + private ActiveMQServer server_1; private MBeanServer mbeanServer_1; @@ -270,10 +270,10 @@ public class ClusterConnectionControlTest extends ManagementTestBase .addDiscoveryGroupConfiguration(discoveryGroupName, discoveryGroupConfig); mbeanServer_1 = MBeanServerFactory.createMBeanServer(); - server_1 = addServer(HornetQServers.newHornetQServer(conf_1, mbeanServer_1, false)); + server_1 = addServer(ActiveMQServers.newActiveMQServer(conf_1, mbeanServer_1, false)); server_1.start(); - server_0 = addServer(HornetQServers.newHornetQServer(conf_0, mbeanServer, false)); + server_0 = addServer(ActiveMQServers.newActiveMQServer(conf_0, mbeanServer, false)); server_0.start(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ClusterConnectionControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ClusterConnectionControlUsingCoreTest.java index 1661632ea1..e548d6e2c9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ClusterConnectionControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ClusterConnectionControlUsingCoreTest.java @@ -17,7 +17,7 @@ import java.util.Map; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.ClusterConnectionControl; import org.apache.activemq.api.core.management.ResourceNames; @@ -149,7 +149,7 @@ public class ClusterConnectionControlUsingCoreTest extends ClusterConnectionCont { super.setUp(); - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); } @Override diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/DivertControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/DivertControlTest.java index 0d0d5cb1b0..901b457ae4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/DivertControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/DivertControlTest.java @@ -26,8 +26,8 @@ import org.apache.activemq.core.config.CoreQueueConfiguration; import org.apache.activemq.core.config.DivertConfiguration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.tests.util.RandomUtil; /** @@ -45,7 +45,7 @@ public class DivertControlTest extends ManagementTestBase // Attributes ---------------------------------------------------- - private HornetQServer service; + private ActiveMQServer service; private DivertConfiguration divertConfig; @@ -110,7 +110,7 @@ public class DivertControlTest extends ManagementTestBase .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())) .addConnectorConfiguration(connectorConfig.getName(), connectorConfig); - service = HornetQServers.newHornetQServer(conf, mbeanServer, false); + service = ActiveMQServers.newActiveMQServer(conf, mbeanServer, false); service.start(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/DivertControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/DivertControlUsingCoreTest.java index 7596fb7f3c..01d2aab975 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/DivertControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/DivertControlUsingCoreTest.java @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.management; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.DivertControl; import org.apache.activemq.api.core.management.ResourceNames; @@ -106,7 +106,7 @@ public class DivertControlUsingCoreTest extends DivertControlTest { super.setUp(); - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); } @Override 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 6debefeb27..8ff152b4a3 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 @@ -21,8 +21,8 @@ import org.apache.activemq.api.core.management.ObjectNameBuilder; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.invm.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.junit.After; import org.junit.Test; @@ -33,11 +33,11 @@ import org.junit.Test; */ public class JMXDomainTest extends ManagementTestBase { - HornetQServer server_0 = null; - HornetQServer server_1 = null; + ActiveMQServer server_0 = null; + ActiveMQServer server_1 = null; @Test - public void test2HornetQServersManagedFrom1MBeanServer() throws Exception + public void test2ActiveMQServersManagedFrom1MBeanServer() throws Exception { Configuration config_0 = createDefaultConfig() .setJMXManagementEnabled(true); @@ -50,34 +50,34 @@ public class JMXDomainTest extends ManagementTestBase .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName(), params)) .setJMXDomain(jmxDomain_1); - server_0 = HornetQServers.newHornetQServer(config_0, mbeanServer, false); - server_1 = HornetQServers.newHornetQServer(config_1, mbeanServer, false); + server_0 = ActiveMQServers.newActiveMQServer(config_0, mbeanServer, false); + server_1 = ActiveMQServers.newActiveMQServer(config_1, mbeanServer, false); ObjectNameBuilder builder_0 = ObjectNameBuilder.DEFAULT; ObjectNameBuilder builder_1 = ObjectNameBuilder.create(jmxDomain_1); - checkNoResource(builder_0.getHornetQServerObjectName()); - checkNoResource(builder_1.getHornetQServerObjectName()); + checkNoResource(builder_0.getActiveMQServerObjectName()); + checkNoResource(builder_1.getActiveMQServerObjectName()); server_0.start(); - checkResource(builder_0.getHornetQServerObjectName()); - checkNoResource(builder_1.getHornetQServerObjectName()); + checkResource(builder_0.getActiveMQServerObjectName()); + checkNoResource(builder_1.getActiveMQServerObjectName()); server_1.start(); - checkResource(builder_0.getHornetQServerObjectName()); - checkResource(builder_1.getHornetQServerObjectName()); + checkResource(builder_0.getActiveMQServerObjectName()); + checkResource(builder_1.getActiveMQServerObjectName()); server_0.stop(); - checkNoResource(builder_0.getHornetQServerObjectName()); - checkResource(builder_1.getHornetQServerObjectName()); + checkNoResource(builder_0.getActiveMQServerObjectName()); + checkResource(builder_1.getActiveMQServerObjectName()); server_1.stop(); - checkNoResource(builder_0.getHornetQServerObjectName()); - checkNoResource(builder_1.getHornetQServerObjectName()); + checkNoResource(builder_0.getActiveMQServerObjectName()); + checkNoResource(builder_1.getActiveMQServerObjectName()); } @Override diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementControlHelper.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementControlHelper.java index 0e3a328843..54f66a1e08 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementControlHelper.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementControlHelper.java @@ -25,7 +25,7 @@ import org.apache.activemq.api.core.management.BridgeControl; import org.apache.activemq.api.core.management.BroadcastGroupControl; import org.apache.activemq.api.core.management.ClusterConnectionControl; import org.apache.activemq.api.core.management.DivertControl; -import org.apache.activemq.api.core.management.HornetQServerControl; +import org.apache.activemq.api.core.management.ActiveMQServerControl; import org.apache.activemq.api.core.management.ObjectNameBuilder; import org.apache.activemq.api.core.management.QueueControl; import org.apache.activemq.api.jms.management.ConnectionFactoryControl; @@ -84,10 +84,10 @@ public class ManagementControlHelper mbeanServer); } - public static HornetQServerControl createHornetQServerControl(final MBeanServer mbeanServer) throws Exception + public static ActiveMQServerControl createActiveMQServerControl(final MBeanServer mbeanServer) throws Exception { - return (HornetQServerControl)ManagementControlHelper.createProxy(ObjectNameBuilder.DEFAULT.getHornetQServerObjectName(), - HornetQServerControl.class, + return (ActiveMQServerControl)ManagementControlHelper.createProxy(ObjectNameBuilder.DEFAULT.getActiveMQServerObjectName(), + ActiveMQServerControl.class, mbeanServer); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementServiceImplTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementServiceImplTest.java index 39988efce5..3262532f59 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementServiceImplTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementServiceImplTest.java @@ -23,8 +23,8 @@ import org.apache.activemq.api.core.management.QueueControl; import org.apache.activemq.api.core.management.ResourceNames; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.persistence.impl.nullpm.NullStorageManager; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.server.impl.ServerMessageImpl; @@ -49,7 +49,7 @@ public class ManagementServiceImplTest extends UnitTestCase Configuration conf = createBasicConfig() .setJMXManagementEnabled(false); - HornetQServer server = HornetQServers.newHornetQServer(conf, false); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, false); server.start(); // invoke attribute and operation on the server @@ -69,7 +69,7 @@ public class ManagementServiceImplTest extends UnitTestCase Configuration conf = createBasicConfig() .setJMXManagementEnabled(false); - HornetQServer server = HornetQServers.newHornetQServer(conf, false); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, false); server.start(); // invoke attribute and operation on the server @@ -89,7 +89,7 @@ public class ManagementServiceImplTest extends UnitTestCase Configuration conf = createBasicConfig() .setJMXManagementEnabled(false); - HornetQServer server = HornetQServers.newHornetQServer(conf, false); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, false); server.start(); // invoke attribute and operation on the server @@ -109,7 +109,7 @@ public class ManagementServiceImplTest extends UnitTestCase Configuration conf = createBasicConfig() .setJMXManagementEnabled(false); - HornetQServer server = HornetQServers.newHornetQServer(conf, false); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, false); server.start(); // invoke attribute and operation on the server @@ -130,7 +130,7 @@ public class ManagementServiceImplTest extends UnitTestCase Configuration conf = createBasicConfig() .setJMXManagementEnabled(false); - HornetQServer server = HornetQServers.newHornetQServer(conf, false); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, false); server.start(); // invoke attribute and operation on the server diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementWithPagingServerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementWithPagingServerTest.java index 26a5743961..e68b775b45 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementWithPagingServerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/ManagementWithPagingServerTest.java @@ -25,8 +25,8 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.QueueControl; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.RandomUtil; @@ -45,7 +45,7 @@ import org.junit.Test; */ public class ManagementWithPagingServerTest extends ManagementTestBase { - private HornetQServer server; + private ActiveMQServer server; private ClientSession session1; private ClientSession session2; private ServerLocator locator; @@ -201,7 +201,7 @@ public class ManagementWithPagingServerTest extends ManagementTestBase Configuration conf = createBasicConfig() .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY)); - server = addServer(HornetQServers.newHornetQServer(conf, mbeanServer, true)); + server = addServer(ActiveMQServers.newActiveMQServer(conf, mbeanServer, true)); AddressSettings defaultSetting = new AddressSettings(); defaultSetting.setPageSizeBytes(5120); 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 379122f806..04dc87e23a 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 @@ -40,8 +40,8 @@ import org.apache.activemq.core.protocol.stomp.Stomp; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.tests.util.RandomUtil; /** @@ -57,7 +57,7 @@ public class ManagementWithStompTest extends ManagementTestBase // Attributes ---------------------------------------------------- - protected HornetQServer server; + protected ActiveMQServer server; protected ClientSession session; @@ -180,7 +180,7 @@ public class ManagementWithStompTest extends ManagementTestBase .addAcceptorConfiguration(stompTransport) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - server = HornetQServers.newHornetQServer(conf, mbeanServer, false, "brianm", "wombats"); + server = ActiveMQServers.newActiveMQServer(conf, mbeanServer, false, "brianm", "wombats"); server.start(); 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 f854779f6d..5b01d8bc5c 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 @@ -20,15 +20,15 @@ import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.ManagementHelper; import org.apache.activemq.core.client.impl.ClientSessionInternal; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.After; @@ -53,7 +53,7 @@ public class NotificationTest extends UnitTestCase // Attributes ---------------------------------------------------- - private HornetQServer service; + private ActiveMQServer service; private ClientSession session; @@ -255,10 +255,10 @@ public class NotificationTest extends UnitTestCase Configuration conf = createBasicConfig() // the notifications are independent of JMX .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - service = HornetQServers.newHornetQServer(conf, false); + service = ActiveMQServers.newActiveMQServer(conf, false); service.start(); - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(InVMConnectorFactory.class.getName())); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(InVMConnectorFactory.class.getName())); ClientSessionFactory sf = createSessionFactory(locator); session = sf.createSession(false, true, true); session.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/QueueControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/QueueControlTest.java index c652d97f46..f677e810c8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/QueueControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/QueueControlTest.java @@ -28,20 +28,20 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.CoreNotificationType; import org.apache.activemq.api.core.management.DayCounterInfo; -import org.apache.activemq.api.core.management.HornetQServerControl; +import org.apache.activemq.api.core.management.ActiveMQServerControl; import org.apache.activemq.api.core.management.MessageCounterInfo; import org.apache.activemq.api.core.management.ObjectNameBuilder; import org.apache.activemq.api.core.management.QueueControl; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.message.impl.MessageImpl; import org.apache.activemq.core.messagecounter.impl.MessageCounterManagerImpl; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.integration.jms.server.management.JMSUtil; @@ -60,7 +60,7 @@ import org.junit.Test; public class QueueControlTest extends ManagementTestBase { - private HornetQServer server; + private ActiveMQServer server; private ClientSession session; private ServerLocator locator; @@ -376,7 +376,7 @@ public class QueueControlTest extends ManagementTestBase @Test public void testListDeliveringMessagesWithRASession() throws Exception { - ServerLocator locator1 = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(INVM_CONNECTOR_FACTORY)); + ServerLocator locator1 = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(INVM_CONNECTOR_FACTORY)); locator1.setBlockOnNonDurableSend(true); locator1.setConsumerWindowSize(10240); locator1.setAckBatchSize(0); @@ -1563,7 +1563,7 @@ public class QueueControlTest extends ManagementTestBase session.createQueue(address, queue, null, false); QueueControl queueControl = createManagementControl(address, queue); - HornetQServerControl serverControl = ManagementControlHelper.createHornetQServerControl(mbeanServer); + ActiveMQServerControl serverControl = ManagementControlHelper.createActiveMQServerControl(mbeanServer); serverControl.enableMessageCounters(); serverControl.setMessageCounterSamplePeriod(MessageCounterManagerImpl.MIN_SAMPLE_PERIOD); @@ -1616,7 +1616,7 @@ public class QueueControlTest extends ManagementTestBase session.createQueue(address, queue, null, false); QueueControl queueControl = createManagementControl(address, queue); - HornetQServerControl serverControl = ManagementControlHelper.createHornetQServerControl(mbeanServer); + ActiveMQServerControl serverControl = ManagementControlHelper.createActiveMQServerControl(mbeanServer); serverControl.enableMessageCounters(); serverControl.setMessageCounterSamplePeriod(MessageCounterManagerImpl.MIN_SAMPLE_PERIOD); @@ -1685,7 +1685,7 @@ public class QueueControlTest extends ManagementTestBase session.createQueue(address, queue, null, false); QueueControl queueControl = createManagementControl(address, queue); - HornetQServerControl serverControl = ManagementControlHelper.createHornetQServerControl(mbeanServer); + ActiveMQServerControl serverControl = ManagementControlHelper.createActiveMQServerControl(mbeanServer); serverControl.enableMessageCounters(); serverControl.setMessageCounterSamplePeriod(counterPeriod); @@ -1706,7 +1706,7 @@ public class QueueControlTest extends ManagementTestBase session.createQueue(address, queue, null, false); QueueControl queueControl = createManagementControl(address, queue); - HornetQServerControl serverControl = ManagementControlHelper.createHornetQServerControl(mbeanServer); + ActiveMQServerControl serverControl = ManagementControlHelper.createActiveMQServerControl(mbeanServer); serverControl.enableMessageCounters(); serverControl.setMessageCounterSamplePeriod(counterPeriod); @@ -1883,7 +1883,7 @@ public class QueueControlTest extends ManagementTestBase session.createQueue(address, queue, null, false); QueueControl queueControl = createManagementControl(address, queue); - HornetQServerControl serverControl = ManagementControlHelper.createHornetQServerControl(mbeanServer); + ActiveMQServerControl serverControl = ManagementControlHelper.createActiveMQServerControl(mbeanServer); serverControl.enableMessageCounters(); serverControl.setMessageCounterSamplePeriod(counterPeriod); Assert.assertFalse(queueControl.isPaused()); @@ -1959,7 +1959,7 @@ public class QueueControlTest extends ManagementTestBase public void testCreateQueueNotification() throws Exception { JMSUtil.JMXListener listener = new JMSUtil.JMXListener(); - this.mbeanServer.addNotificationListener(ObjectNameBuilder.DEFAULT.getHornetQServerObjectName(), listener, null, null); + this.mbeanServer.addNotificationListener(ObjectNameBuilder.DEFAULT.getActiveMQServerObjectName(), listener, null, null); SimpleString testQueueName = new SimpleString("newQueue"); String testQueueName2 = "newQueue2"; @@ -1976,7 +1976,7 @@ public class QueueControlTest extends ManagementTestBase System.out.println("got notif: " + notif); assertEquals(CoreNotificationType.BINDING_REMOVED.toString(), notif.getType()); - HornetQServerControl control = ManagementControlHelper.createHornetQServerControl(mbeanServer); + ActiveMQServerControl control = ManagementControlHelper.createActiveMQServerControl(mbeanServer); control.createQueue(testQueueName2, testQueueName2); @@ -2003,7 +2003,7 @@ public class QueueControlTest extends ManagementTestBase Configuration conf = createBasicConfig() .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY)); - server = addServer(HornetQServers.newHornetQServer(conf, mbeanServer, false)); + server = addServer(ActiveMQServers.newActiveMQServer(conf, mbeanServer, false)); server.start(); locator = createInVMNonHALocator(); 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 3469d68f6c..4497bcb298 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 @@ -22,11 +22,11 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientRequestor; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.ManagementHelper; import org.apache.activemq.api.core.management.ResourceNames; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.UnitTestCase; /** @@ -42,7 +42,7 @@ public abstract class SecurityManagementTestBase extends UnitTestCase // Attributes ---------------------------------------------------- - private HornetQServer service; + private ActiveMQServer service; // Static -------------------------------------------------------- @@ -60,7 +60,7 @@ public abstract class SecurityManagementTestBase extends UnitTestCase { super.setUp(); - service = setupAndStartHornetQServer(); + service = setupAndStartActiveMQServer(); } @Override @@ -74,13 +74,13 @@ public abstract class SecurityManagementTestBase extends UnitTestCase super.tearDown(); } - protected abstract HornetQServer setupAndStartHornetQServer() throws Exception; + protected abstract ActiveMQServer setupAndStartActiveMQServer() throws Exception; protected void doSendManagementMessage(final String user, final String password, final boolean expectSuccess) throws Exception { ServerLocator locator = - addServerLocator(HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( - UnitTestCase.INVM_CONNECTOR_FACTORY))); + addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration( + UnitTestCase.INVM_CONNECTOR_FACTORY))); ClientSessionFactory sf = locator.createSessionFactory(); try { 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 a1a2f6c573..aada14eb65 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 @@ -20,10 +20,10 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.security.Role; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.settings.HierarchicalRepository; -import org.apache.activemq.spi.core.security.HornetQSecurityManagerImpl; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl; /** * A SecurityManagementTest @@ -85,15 +85,15 @@ public class SecurityManagementWithConfiguredAdminUserTest extends SecurityManag // Protected ----------------------------------------------------- @Override - protected HornetQServer setupAndStartHornetQServer() throws Exception + protected ActiveMQServer setupAndStartActiveMQServer() throws Exception { Configuration conf = createBasicConfig() .setSecurityEnabled(true) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - HornetQServer server = addServer(HornetQServers.newHornetQServer(conf, false)); + ActiveMQServer server = addServer(ActiveMQServers.newActiveMQServer(conf, false)); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManagerImpl securityManager = (HornetQSecurityManagerImpl)server.getSecurityManager(); + ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl)server.getSecurityManager(); securityManager.addUser(validAdminUser, validAdminPassword); securityManager.addUser(invalidAdminUser, invalidAdminPassword); 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 279268ae1f..d3e5b3ca14 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 @@ -18,8 +18,8 @@ import org.junit.Test; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; /** * A SecurityManagementTest @@ -54,13 +54,13 @@ public class SecurityManagementWithDefaultConfigurationTest extends SecurityMana // Protected ----------------------------------------------------- @Override - protected HornetQServer setupAndStartHornetQServer() throws Exception + protected ActiveMQServer setupAndStartActiveMQServer() throws Exception { Configuration conf = createBasicConfig() .setClusterPassword(ActiveMQDefaultConfiguration.getDefaultClusterPassword()) .setSecurityEnabled(true) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - HornetQServer server = addServer(HornetQServers.newHornetQServer(conf, false)); + ActiveMQServer server = addServer(ActiveMQServers.newActiveMQServer(conf, false)); server.start(); return server; 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 409d4a2743..54cecc99c5 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 @@ -18,8 +18,8 @@ import org.junit.Test; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; /** * A SecurityManagementTest @@ -72,13 +72,13 @@ public class SecurityManagementWithModifiedConfigurationTest extends SecurityMan // Protected ----------------------------------------------------- @Override - protected HornetQServer setupAndStartHornetQServer() throws Exception + protected ActiveMQServer setupAndStartActiveMQServer() throws Exception { ConfigurationImpl conf = createBasicConfig() .setSecurityEnabled(true) .setClusterPassword(configuredClusterPassword) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - HornetQServer server = HornetQServers.newHornetQServer(conf, false); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, false); server.start(); return server; 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 d04c1b1c36..cfed0c4e05 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 @@ -32,16 +32,16 @@ import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.ManagementHelper; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.security.CheckType; import org.apache.activemq.core.security.Role; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.UnitTestCase; @@ -58,7 +58,7 @@ public class SecurityNotificationTest extends UnitTestCase // Attributes ---------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; private ClientSession adminSession; @@ -79,7 +79,7 @@ public class SecurityNotificationTest extends UnitTestCase SecurityNotificationTest.flush(notifConsumer); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); try @@ -108,12 +108,12 @@ public class SecurityNotificationTest extends UnitTestCase Set roles = new HashSet(); roles.add(role); server.getSecurityRepository().addMatch(address.toString(), roles); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addRole("guest", "roleCanNotCreateQueue"); SecurityNotificationTest.flush(notifConsumer); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); ClientSession guestSession = sf.createSession("guest", "guest", false, true, true, false, 1); @@ -153,12 +153,12 @@ public class SecurityNotificationTest extends UnitTestCase // the notifications are independent of JMX .setJMXManagementEnabled(false) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - server = HornetQServers.newHornetQServer(conf, false); + server = ActiveMQServers.newActiveMQServer(conf, false); server.start(); notifQueue = RandomUtil.randomSimpleString(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("admin", "admin"); securityManager.addUser("guest", "guest"); securityManager.setDefaultUser("guest"); @@ -171,7 +171,7 @@ public class SecurityNotificationTest extends UnitTestCase securityManager.addRole("admin", "notif"); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); adminSession = sf.createSession("admin", "admin", false, true, true, false, 1); adminSession.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/openwire/OpenWireTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/openwire/OpenWireTestBase.java index b7bc1dd8f7..1e5c415ea7 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/openwire/OpenWireTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/openwire/OpenWireTestBase.java @@ -29,7 +29,7 @@ import org.apache.activemq.api.jms.management.JMSServerControl; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; import org.apache.activemq.core.security.Role; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration; import org.apache.activemq.jms.server.config.impl.ConnectionFactoryConfigurationImpl; @@ -45,7 +45,7 @@ public class OpenWireTestBase extends ServiceTestBase public static final String OWHOST = "localhost"; public static final int OWPORT = 61616; - protected HornetQServer server; + protected ActiveMQServer server; protected JMSServerManagerImpl jmsServer; protected boolean realStore = false; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PageCountSyncOnNonTXTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PageCountSyncOnNonTXTest.java index 2be17b56eb..f9ea89de5a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PageCountSyncOnNonTXTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PageCountSyncOnNonTXTest.java @@ -20,7 +20,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.ServiceTestBase; @@ -144,7 +144,7 @@ public class PageCountSyncOnNonTXTest extends ServiceTestBase assertEquals("Process didn't end as expected", 1, process.waitFor()); - HornetQServer server = PageCountSyncServer.createServer(getTestDir()); + ActiveMQServer server = PageCountSyncServer.createServer(getTestDir()); try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PageCountSyncServer.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PageCountSyncServer.java index d9e45b2e66..4d83db5b07 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PageCountSyncServer.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PageCountSyncServer.java @@ -13,7 +13,7 @@ package org.apache.activemq.tests.integration.paging; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.SpawnedVMSupport; /** @@ -35,7 +35,7 @@ public class PageCountSyncServer extends SpawnedServerSupport try { - HornetQServer server = createServer(folder); + ActiveMQServer server = createServer(folder); server.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingCounterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingCounterTest.java index 120b6701a6..0362ab104e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingCounterTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingCounterTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.core.paging.cursor.PageSubscriptionCounter; import org.apache.activemq.core.paging.cursor.impl.PageSubscriptionCounterImpl; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.persistence.impl.journal.OperationContextImpl; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.core.transaction.Transaction; @@ -44,7 +44,7 @@ public class PagingCounterTest extends ServiceTestBase // Attributes ---------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; private ServerLocator sl; @@ -128,7 +128,7 @@ public class PagingCounterTest extends ServiceTestBase server.stop(); - server = newHornetQServer(); + server = newActiveMQServer(); server.start(); @@ -192,7 +192,7 @@ public class PagingCounterTest extends ServiceTestBase server.stop(); - server = newHornetQServer(); + server = newActiveMQServer(); server.start(); @@ -237,7 +237,7 @@ public class PagingCounterTest extends ServiceTestBase server.stop(); - server = newHornetQServer(); + server = newActiveMQServer(); server.start(); @@ -295,7 +295,7 @@ public class PagingCounterTest extends ServiceTestBase server.stop(); - server = newHornetQServer(); + server = newActiveMQServer(); server.start(); @@ -329,17 +329,17 @@ public class PagingCounterTest extends ServiceTestBase { super.setUp(); - server = newHornetQServer(); + server = newActiveMQServer(); server.start(); sl = createInVMNonHALocator(); } - private HornetQServer newHornetQServer() throws Exception + private ActiveMQServer newActiveMQServer() throws Exception { OperationContextImpl.clearContext(); - HornetQServer server = super.createServer(true, false); + ActiveMQServer server = super.createServer(true, false); AddressSettings defaultSetting = new AddressSettings(); defaultSetting.setPageSizeBytes(10 * 1024); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingReceiveTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingReceiveTest.java index c8618dc2e2..555c4ba9ef 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingReceiveTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingReceiveTest.java @@ -19,7 +19,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; @@ -32,7 +32,7 @@ public class PagingReceiveTest extends ServiceTestBase private static final SimpleString ADDRESS = new SimpleString("jms.queue.catalog-service.price.change.bm"); - private HornetQServer server; + private ActiveMQServer server; private ServerLocator locator; @@ -91,9 +91,9 @@ public class PagingReceiveTest extends ServiceTestBase } - private HornetQServer internalCreateServer() throws Exception + private ActiveMQServer internalCreateServer() throws Exception { - final HornetQServer server = newHornetQServer(); + final ActiveMQServer server = newActiveMQServer(); server.start(); @@ -127,9 +127,9 @@ public class PagingReceiveTest extends ServiceTestBase return message; } - private HornetQServer newHornetQServer() throws Exception + private ActiveMQServer newActiveMQServer() throws Exception { - final HornetQServer server = createServer(true, isNetty()); + final ActiveMQServer server = createServer(true, isNetty()); final AddressSettings settings = new AddressSettings(); settings.setMaxSizeBytes(67108864); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingSendTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingSendTest.java index 83f7ee5d73..c4b1adab89 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingSendTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingSendTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; @@ -41,7 +41,7 @@ public class PagingSendTest extends ServiceTestBase private ServerLocator locator; - private HornetQServer server; + private ActiveMQServer server; protected boolean isNetty() { @@ -53,15 +53,15 @@ public class PagingSendTest extends ServiceTestBase public void setUp() throws Exception { super.setUp(); - server = newHornetQServer(); + server = newActiveMQServer(); server.start(); waitForServer(server); locator = createFactory(isNetty()); } - private HornetQServer newHornetQServer() throws Exception + private ActiveMQServer newActiveMQServer() throws Exception { - HornetQServer server = createServer(true, isNetty()); + ActiveMQServer server = createServer(true, isNetty()); AddressSettings defaultSetting = new AddressSettings(); defaultSetting.setPageSizeBytes(10 * 1024); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingWithFailoverAndCountersTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingWithFailoverAndCountersTest.java index d4df9ef1ca..31b2bb1d3d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingWithFailoverAndCountersTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingWithFailoverAndCountersTest.java @@ -22,7 +22,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.After; @@ -286,7 +286,7 @@ public class PagingWithFailoverAndCountersTest extends ServiceTestBase public void run() { - HornetQServer server = inProcessBackup.getServer(); + ActiveMQServer server = inProcessBackup.getServer(); try { waitForServer(server); @@ -420,7 +420,7 @@ public class PagingWithFailoverAndCountersTest extends ServiceTestBase ClientSessionFactory factory; ClientSession session; - HornetQServer server = PagingWithFailoverServer.createServer(getTestDir(), PORT1, PORT2, false); + ActiveMQServer server = PagingWithFailoverServer.createServer(getTestDir(), PORT1, PORT2, false); server.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingWithFailoverServer.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingWithFailoverServer.java index 8fa9e1dd48..8574b1c9d6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingWithFailoverServer.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/PagingWithFailoverServer.java @@ -13,7 +13,7 @@ package org.apache.activemq.tests.integration.paging; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.SpawnedVMSupport; /** @@ -33,10 +33,10 @@ public class PagingWithFailoverServer extends SpawnedServerSupport } - private HornetQServer server; + private ActiveMQServer server; - public HornetQServer getServer() + public ActiveMQServer getServer() { return server; } @@ -58,7 +58,7 @@ public class PagingWithFailoverServer extends SpawnedServerSupport } } - public static HornetQServer createServer(String folder, int thisPort, int otherPort, boolean isBackup) + public static ActiveMQServer createServer(String folder, int thisPort, int otherPort, boolean isBackup) { return createSharedFolderServer(folder, thisPort, otherPort, isBackup); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/SpawnedServerSupport.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/SpawnedServerSupport.java index 3829019e1d..465b92d61b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/SpawnedServerSupport.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/paging/SpawnedServerSupport.java @@ -19,7 +19,7 @@ import java.util.List; import java.util.Map; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.ClusterConnectionConfiguration; import org.apache.activemq.core.config.Configuration; @@ -28,8 +28,8 @@ import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.ServiceTestBase; @@ -43,10 +43,10 @@ import org.apache.activemq.tests.util.ServiceTestBase; public class SpawnedServerSupport { - static HornetQServer createServer(String folder) + static ActiveMQServer createServer(String folder) { Configuration conf = createConfig(folder); - return HornetQServers.newHornetQServer(conf, true); + return ActiveMQServers.newActiveMQServer(conf, true); } static Configuration createConfig(String folder) @@ -117,7 +117,7 @@ public class SpawnedServerSupport public static ServerLocator createLocator(int port) { TransportConfiguration config = createTransportConfigiguration(false, port); - return HornetQClient.createServerLocator(true, config); + return ActiveMQClient.createServerLocator(true, config); } @@ -139,9 +139,9 @@ public class SpawnedServerSupport } - static HornetQServer createSharedFolderServer(String folder, int thisPort, int otherPort, boolean isBackup) + static ActiveMQServer createSharedFolderServer(String folder, int thisPort, int otherPort, boolean isBackup) { Configuration conf = createSharedFolderConfig(folder, thisPort, otherPort, isBackup); - return HornetQServers.newHornetQServer(conf, true); + return ActiveMQServers.newActiveMQServer(conf, true); } } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/DeleteQueueRestartTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/DeleteQueueRestartTest.java index c8170adc35..9760cf36e5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/DeleteQueueRestartTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/DeleteQueueRestartTest.java @@ -21,8 +21,8 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.jms.client.HornetQBytesMessage; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.jms.client.ActiveMQBytesMessage; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; import org.junit.Test; @@ -64,7 +64,7 @@ public class DeleteQueueRestartTest extends ServiceTestBase private void internalDeleteQueueAndRestart() throws Exception { - HornetQServer server = createServer(true); + ActiveMQServer server = createServer(true); server.start(); @@ -84,7 +84,7 @@ public class DeleteQueueRestartTest extends ServiceTestBase for (int i = 0; i < 100; i++) { - ClientMessage msg = createBytesMessage(session, HornetQBytesMessage.TYPE, new byte[0], true); + ClientMessage msg = createBytesMessage(session, ActiveMQBytesMessage.TYPE, new byte[0], true); prod.send(msg); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/ExportFormatTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/ExportFormatTest.java index 05a809f8a6..4a04c1bc1f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/ExportFormatTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/ExportFormatTest.java @@ -24,7 +24,7 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.journal.impl.ExportJournal; import org.apache.activemq.core.journal.impl.ImportJournal; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; /** @@ -42,14 +42,14 @@ public class ExportFormatTest extends ServiceTestBase // Attributes ---------------------------------------------------- // Case the format was changed, and the change was agreed, use _testCreateFormat to recreate this field - String bindingsFile = "#File,JournalFileImpl: (hornetq-bindings-1.bindings id = 1, recordID = 1)\n" + + String bindingsFile = "#File,JournalFileImpl: (activemq-bindings-1.bindings id = 1, recordID = 1)\n" + "operation@AddRecord,id@2,userRecordType@24,length@8,isUpdate@false,compactCount@0,data@AAAAAH____8=\n" + "operation@AddRecord,id@2,userRecordType@21,length@17,isUpdate@false,compactCount@0,data@AAAABEEAMQAAAAAEQQAxAAA=\n" + "operation@AddRecord,id@20,userRecordType@24,length@8,isUpdate@false,compactCount@0,data@AAAAAAAAABQ=\n" + - "#File,JournalFileImpl: (hornetq-bindings-2.bindings id = 2, recordID = 2)"; + "#File,JournalFileImpl: (activemq-bindings-2.bindings id = 2, recordID = 2)"; // Case the format was changed, and the change was agreed, use _testCreateFormat to recreate this field - String journalFile = "#File,JournalFileImpl: (hornetq-data-1.hq id = 1, recordID = 1)\n" + + String journalFile = "#File,JournalFileImpl: (activemq-data-1.amq id = 1, recordID = 1)\n" + "operation@AddRecordTX,txID@0,id@4,userRecordType@31,length@65,isUpdate@false,compactCount@0,data@AAAAEQAAAE4AAAAAAAAABAEAAAAEQQAxAAAA_wAAAAAAAAAAAAABLLxYP40EAQAAAAEAAAAGawBlAHkABgAAAAA=\n" + "operation@UpdateTX,txID@0,id@4,userRecordType@32,length@8,isUpdate@true,compactCount@0,data@AAAAAAAAAAI=\n" + "operation@AddRecordTX,txID@0,id@5,userRecordType@31,length@65,isUpdate@false,compactCount@0,data@AAAAEQAAAE4AAAAAAAAABQEAAAAEQQAxAAAA_wAAAAAAAAAAAAABLLxYP5EEAQAAAAEAAAAGawBlAHkABgAAAAE=\n" + @@ -71,11 +71,11 @@ public class ExportFormatTest extends ServiceTestBase "operation@Update,id@15,userRecordType@32,length@8,isUpdate@true,compactCount@0,data@AAAAAAAAAAI=\n" + "operation@AddRecord,id@16,userRecordType@31,length@65,isUpdate@false,compactCount@0,data@AAAAEQAAAE4AAAAAAAAAEAEAAAAEQQAxAAAA_wAAAAAAAAAAAAABLLxYP64EAQAAAAEAAAAGawBlAHkABgAAAAk=\n" + "operation@Update,id@16,userRecordType@32,length@8,isUpdate@true,compactCount@0,data@AAAAAAAAAAI=\n" + - "#File,JournalFileImpl: (hornetq-data-2.hq id = 2, recordID = 2)"; + "#File,JournalFileImpl: (activemq-data-2.amq id = 2, recordID = 2)"; public void _testCreateFormat() throws Exception { - HornetQServer server = createServer(true); + ActiveMQServer server = createServer(true); server.start(); ServerLocator locator = createInVMNonHALocator(); @@ -111,25 +111,25 @@ public class ExportFormatTest extends ServiceTestBase System.out.println("copy & paste the following as bindingsFile:"); - ExportJournal.exportJournal(getBindingsDir(), "hornetq-bindings", "bindings", 2, 1048576, System.out); + ExportJournal.exportJournal(getBindingsDir(), "activemq-bindings", "bindings", 2, 1048576, System.out); System.out.println("copy & paste the following as dataFile:"); - ExportJournal.exportJournal(getJournalDir(), "hornetq-data", "hq", 2, 102400, System.out); + ExportJournal.exportJournal(getJournalDir(), "activemq-data", "amq", 2, 102400, System.out); } @Test public void testConsumeFromFormat() throws Exception { - ImportJournal.importJournal(getJournalDir(), "hornetq-data", "hq", 2, 102400, new StringReader(journalFile)); + ImportJournal.importJournal(getJournalDir(), "activemq-data", "amq", 2, 102400, new StringReader(journalFile)); ImportJournal.importJournal(getBindingsDir(), - "hornetq-bindings", + "activemq-bindings", "bindings", 2, 1048576, new StringReader(bindingsFile)); - HornetQServer server = createServer(true); + ActiveMQServer server = createServer(true); server.start(); ServerLocator locator = createInVMNonHALocator(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/StorageManagerTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/StorageManagerTestBase.java index 5636f08cf5..4855e49bd2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/StorageManagerTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/StorageManagerTestBase.java @@ -119,7 +119,7 @@ public abstract class StorageManagerTestBase extends ServiceTestBase protected JournalStorageManager createJournalStorageManager(Configuration configuration) { JournalStorageManager jsm = new JournalStorageManager(configuration, execFactory, null); - addHornetQComponent(jsm); + addActiveMQComponent(jsm); return jsm; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/XmlImportExportTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/XmlImportExportTest.java index 4d364f0dda..563bd8330c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/XmlImportExportTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/XmlImportExportTest.java @@ -14,7 +14,7 @@ package org.apache.activemq.tests.integration.persistence; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.jms.JMSFactoryType; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.tests.unit.util.InVMContext; @@ -32,14 +32,14 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.persistence.impl.journal.JournalStorageManager; import org.apache.activemq.core.persistence.impl.journal.LargeServerMessageImpl; import org.apache.activemq.tools.XmlDataConstants; import org.apache.activemq.tools.XmlDataExporter; import org.apache.activemq.tools.XmlDataImporter; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.utils.UUIDGenerator; @@ -61,7 +61,7 @@ public class XmlImportExportTest extends ServiceTestBase public static final int CONSUMER_TIMEOUT = 5000; private static final String QUEUE_NAME = "A1"; private ServerLocator locator; - private HornetQServer server; + private ActiveMQServer server; private JMSServerManager jmsServer; private ClientSessionFactory factory; private InVMContext namingContext; @@ -166,7 +166,7 @@ public class XmlImportExportTest extends ServiceTestBase server.getConfiguration().getConnectorConfigurations().put("in-vm1", new TransportConfiguration(INVM_CONNECTOR_FACTORY)); server.getConfiguration().getConnectorConfigurations().put("in-vm2", new TransportConfiguration(INVM_CONNECTOR_FACTORY)); jmsServer = new JMSServerManagerImpl(server); - addHornetQComponent(jmsServer); + addActiveMQComponent(jmsServer); namingContext = new InVMContext(); jmsServer.setContext(namingContext); jmsServer.start(); @@ -424,7 +424,7 @@ public class XmlImportExportTest extends ServiceTestBase ConnectionFactory cf1 = (ConnectionFactory) namingContext.lookup(jndi_binding1); assertNotNull(cf1); - HornetQConnectionFactory hcf1 = (HornetQConnectionFactory) cf1; + ActiveMQConnectionFactory hcf1 = (ActiveMQConnectionFactory) cf1; assertEquals(ha, hcf1.isHA()); assertEquals(type.intValue(), hcf1.getFactoryType()); assertEquals(clientId, hcf1.getClientID()); @@ -581,12 +581,12 @@ public class XmlImportExportTest extends ServiceTestBase fileMessage.setMessageID(1005); fileMessage.setDurable(true); - for (int i = 0; i < 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) + for (int i = 0; i < 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) { fileMessage.addBytes(new byte[]{getSamplebyte(i)}); } - fileMessage.putLongProperty(Message.HDR_LARGE_BODY_SIZE, 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + fileMessage.putLongProperty(Message.HDR_LARGE_BODY_SIZE, 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); fileMessage.releaseResources(); @@ -628,9 +628,9 @@ public class XmlImportExportTest extends ServiceTestBase assertNotNull(msg); - assertEquals(2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, msg.getBodySize()); + assertEquals(2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, msg.getBodySize()); - for (int i = 0; i < 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) + for (int i = 0; i < 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) { assertEquals(getSamplebyte(i), msg.getBodyBuffer().readByte()); } @@ -695,7 +695,7 @@ public class XmlImportExportTest extends ServiceTestBase final String MY_QUEUE = "myQueue"; final String MY_QUEUE2 = "myQueue2"; - HornetQServer server = createServer(true); + ActiveMQServer server = createServer(true); AddressSettings defaultSetting = new AddressSettings(); defaultSetting.setPageSizeBytes(10 * 1024); @@ -836,7 +836,7 @@ public class XmlImportExportTest extends ServiceTestBase final String MY_ADDRESS = "myAddress"; final String MY_QUEUE = "myQueue"; - HornetQServer server = createServer(true); + ActiveMQServer server = createServer(true); AddressSettings defaultSetting = new AddressSettings(); defaultSetting.setPageSizeBytes(10 * 1024); @@ -871,12 +871,12 @@ public class XmlImportExportTest extends ServiceTestBase fileMessage.setMessageID(1005); fileMessage.setDurable(true); - for (int i = 0; i < 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) + for (int i = 0; i < 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) { fileMessage.addBytes(new byte[]{getSamplebyte(i)}); } - fileMessage.putLongProperty(Message.HDR_LARGE_BODY_SIZE, 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + fileMessage.putLongProperty(Message.HDR_LARGE_BODY_SIZE, 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); fileMessage.releaseResources(); @@ -918,9 +918,9 @@ public class XmlImportExportTest extends ServiceTestBase assertNotNull(msg); - assertEquals(2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, msg.getBodySize()); + assertEquals(2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, msg.getBodySize()); - for (int i = 0; i < 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) + for (int i = 0; i < 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) { assertEquals(getSamplebyte(i), msg.getBodyBuffer().readByte()); } @@ -973,7 +973,7 @@ public class XmlImportExportTest extends ServiceTestBase public void testBody() throws Exception { final String QUEUE_NAME = "A1"; - HornetQServer server = createServer(true); + ActiveMQServer server = createServer(true); server.start(); ServerLocator locator = createInVMNonHALocator(); ClientSessionFactory factory = locator.createSessionFactory(); @@ -1022,7 +1022,7 @@ public class XmlImportExportTest extends ServiceTestBase public void testBody2() throws Exception { final String QUEUE_NAME = "A1"; - HornetQServer server = createServer(true); + ActiveMQServer server = createServer(true); server.start(); ServerLocator locator = createInVMNonHALocator(); ClientSessionFactory factory = locator.createSessionFactory(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/proton/ProtonTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/proton/ProtonTest.java index c9e045d567..67e9488655 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/proton/ProtonTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/proton/ProtonTest.java @@ -43,11 +43,11 @@ import org.apache.qpid.amqp_1_0.jms.impl.QueueImpl; import org.apache.qpid.amqp_1_0.type.UnsignedInteger; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.utils.ByteUtil; import org.junit.After; @@ -73,8 +73,8 @@ public class ProtonTest extends ServiceTestBase // these 3 are for comparison return Arrays.asList(new Object[][]{ {"AMQP", 0}, - {"HornetQ (InVM)", 1}, - {"HornetQ (Netty)", 2}, + {"ActiveMQ (InVM)", 1}, + {"ActiveMQ (Netty)", 2}, {"AMQP_ANONYMOUS", 3} }); } @@ -97,7 +97,7 @@ public class ProtonTest extends ServiceTestBase } } - private HornetQServer server; + private ActiveMQServer server; private final String coreAddress; private final String address; private Connection connection; @@ -220,7 +220,7 @@ public class ProtonTest extends ServiceTestBase { // As this test was hunging, we added a protection here to fail it instead. // it seems something on the qpid client, so this failure belongs to them and we can ignore it on - // our side (HornetQ) + // our side (ActiveMQ) success = runWithTimeout(new RunnerWithEX() { @Override @@ -890,7 +890,7 @@ public class ProtonTest extends ServiceTestBase } else { - return HornetQJMSClient.createQueue(address); + return ActiveMQJMSClient.createQueue(address); } } @@ -940,7 +940,7 @@ public class ProtonTest extends ServiceTestBase transport = new TransportConfiguration(NETTY_CONNECTOR_FACTORY); } - factory = new HornetQConnectionFactory(false, transport); + factory = new ActiveMQConnectionFactory(false, transport); connection = factory.createConnection("guest", "guest"); connection.setExceptionListener(new ExceptionListener() { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQActivationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQActivationTest.java similarity index 84% rename from tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQActivationTest.java rename to tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQActivationTest.java index 8ba83c473b..344c22bdf2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQActivationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQActivationTest.java @@ -12,20 +12,20 @@ */ package org.apache.activemq.tests.integration.ra; +import org.apache.activemq.ra.inflow.ActiveMQActivationSpec; import org.junit.Test; -import org.apache.activemq.ra.HornetQResourceAdapter; -import org.apache.activemq.ra.inflow.HornetQActivationSpec; +import org.apache.activemq.ra.ActiveMQResourceAdapter; import org.apache.activemq.tests.util.ServiceTestBase; /** - * A HornetQActivationTest + * A ActiveMQActivationTest * * @author clebertsuconic * * */ -public class HornetQActivationTest extends ServiceTestBase +public class ActiveMQActivationTest extends ServiceTestBase { // Constants ----------------------------------------------------- @@ -41,8 +41,8 @@ public class HornetQActivationTest extends ServiceTestBase @Test public void testValidateJNDIParameters() throws Exception { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQClusteredTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQClusteredTest.java similarity index 87% rename from tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQClusteredTest.java rename to tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQClusteredTest.java index 1299de6163..3ef4c20f97 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQClusteredTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQClusteredTest.java @@ -17,15 +17,15 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.core.server.Queue; -import org.apache.activemq.ra.HornetQResourceAdapter; -import org.apache.activemq.ra.inflow.HornetQActivation; -import org.apache.activemq.ra.inflow.HornetQActivationSpec; +import org.apache.activemq.ra.ActiveMQResourceAdapter; +import org.apache.activemq.ra.inflow.ActiveMQActivation; +import org.apache.activemq.ra.inflow.ActiveMQActivationSpec; import org.junit.Test; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -public class HornetQClusteredTest extends HornetQRAClusteredTestBase +public class ActiveMQClusteredTest extends ActiveMQRAClusteredTestBase { /* @@ -34,11 +34,11 @@ public class HornetQClusteredTest extends HornetQRAClusteredTestBase @Test public void testShutdownOnPartialConnect() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.setHA(true); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setSetupAttempts(0); @@ -67,10 +67,10 @@ public class HornetQClusteredTest extends HornetQRAClusteredTestBase @Test public void testNonDurableInCluster() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Topic"); @@ -88,7 +88,7 @@ public class HornetQClusteredTest extends HornetQRAClusteredTestBase clientProducer.send(message); - HornetQActivation activation = lookupActivation(qResourceAdapter); + ActiveMQActivation activation = lookupActivation(qResourceAdapter); SimpleString tempQueue = activation.getTopicTemporaryQueue(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQMessageHandlerSecurityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQMessageHandlerSecurityTest.java similarity index 88% rename from tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQMessageHandlerSecurityTest.java rename to tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQMessageHandlerSecurityTest.java index d90faec0b0..c689f45ac9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQMessageHandlerSecurityTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQMessageHandlerSecurityTest.java @@ -19,15 +19,15 @@ import java.util.concurrent.CountDownLatch; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.impl.LocalQueueBinding; import org.apache.activemq.core.security.Role; -import org.apache.activemq.ra.HornetQResourceAdapter; -import org.apache.activemq.ra.inflow.HornetQActivationSpec; +import org.apache.activemq.ra.ActiveMQResourceAdapter; +import org.apache.activemq.ra.inflow.ActiveMQActivationSpec; import org.junit.Test; /** * @author Andy Taylor * Created Jul 6, 2010 */ -public class HornetQMessageHandlerSecurityTest extends HornetQRATestBase +public class ActiveMQMessageHandlerSecurityTest extends ActiveMQRATestBase { @Override public boolean useSecurity() @@ -38,10 +38,10 @@ public class HornetQMessageHandlerSecurityTest extends HornetQRATestBase @Test public void testSimpleMessageReceivedOnQueueWithSecurityFails() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -69,10 +69,10 @@ public class HornetQMessageHandlerSecurityTest extends HornetQRATestBase Set roles = new HashSet(); roles.add(role); server.getSecurityRepository().addMatch(MDBQUEUEPREFIXED, roles); - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQMessageHandlerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQMessageHandlerTest.java similarity index 91% rename from tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQMessageHandlerTest.java rename to tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQMessageHandlerTest.java index ef8fd35772..b1774ef1a2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQMessageHandlerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQMessageHandlerTest.java @@ -30,9 +30,9 @@ import org.apache.activemq.api.core.client.SessionFailureListener; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.impl.LocalQueueBinding; -import org.apache.activemq.ra.HornetQResourceAdapter; -import org.apache.activemq.ra.inflow.HornetQActivation; -import org.apache.activemq.ra.inflow.HornetQActivationSpec; +import org.apache.activemq.ra.ActiveMQResourceAdapter; +import org.apache.activemq.ra.inflow.ActiveMQActivation; +import org.apache.activemq.ra.inflow.ActiveMQActivationSpec; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.Test; @@ -41,7 +41,7 @@ import org.junit.Test; * @author Andy Taylor * Created May 20, 2010 */ -public class HornetQMessageHandlerTest extends HornetQRATestBase +public class ActiveMQMessageHandlerTest extends ActiveMQRATestBase { @Override @@ -53,10 +53,10 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testSimpleMessageReceivedOnQueue() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -85,10 +85,10 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testSimpleMessageReceivedOnQueueManyMessages() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -118,10 +118,10 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase public void testSimpleMessageReceivedOnQueueManyMessagesAndInterrupt() throws Exception { final int SIZE = 14; - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -154,10 +154,10 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase public void testSimpleMessageReceivedOnQueueManyMessagesAndInterruptTimeout() throws Exception { final int SIZE = 14; - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setCallTimeout(500L); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); @@ -190,9 +190,9 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase /** * @return */ - protected HornetQResourceAdapter newResourceAdapter() + protected ActiveMQResourceAdapter newResourceAdapter() { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setTransactionManagerLocatorClass(""); qResourceAdapter.setTransactionManagerLocatorMethod(""); qResourceAdapter.setConnectorClassName(UnitTestCase.INVM_CONNECTOR_FACTORY); @@ -202,7 +202,7 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testServerShutdownAndReconnect() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); qResourceAdapter.setReconnectAttempts(-1); qResourceAdapter.setCallTimeout(500L); qResourceAdapter.setTransactionManagerLocatorClass(""); @@ -212,7 +212,7 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase qResourceAdapter.start(ctx); // This is just to register a listener final CountDownLatch failedLatch = new CountDownLatch(1); - ClientSessionFactoryInternal factoryListener = (ClientSessionFactoryInternal) qResourceAdapter.getDefaultHornetQConnectionFactory().getServerLocator().createSessionFactory(); + ClientSessionFactoryInternal factoryListener = (ClientSessionFactoryInternal) qResourceAdapter.getDefaultActiveMQConnectionFactory().getServerLocator().createSessionFactory(); factoryListener.addFailureListener(new SessionFailureListener() { @@ -233,7 +233,7 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase failedLatch.countDown(); } }); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -266,10 +266,10 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testInvalidAckMode() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); try { spec.setAcknowledgeMode("CLIENT_ACKNOWLEDGE"); @@ -285,11 +285,11 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testSimpleMessageReceivedOnQueueInLocalTX() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); qResourceAdapter.setUseLocalTx(true); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -325,10 +325,10 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testSimpleMessageReceivedOnQueueWithSelector() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -362,10 +362,10 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testEndpointDeactivated() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -386,10 +386,10 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testMaxSessions() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setMaxSession(1); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); @@ -409,10 +409,10 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testSimpleTopic() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Topic"); @@ -440,10 +440,10 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testDurableSubscription() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Topic"); @@ -497,10 +497,10 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testNonDurableSubscription() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Topic"); @@ -546,12 +546,12 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testNonDurableSubscriptionDeleteAfterCrash() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); qResourceAdapter.setTransactionManagerLocatorClass(""); qResourceAdapter.setTransactionManagerLocatorMethod(""); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Topic"); @@ -573,7 +573,7 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase assertNotNull(endpoint.lastMessage); assertEquals(endpoint.lastMessage.getCoreMessage().getBodyBuffer().readString(), "1"); - HornetQActivation activation = lookupActivation(qResourceAdapter); + ActiveMQActivation activation = lookupActivation(qResourceAdapter); SimpleString tempQueueName = activation.getTopicTemporaryQueue(); @@ -581,7 +581,7 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase assertTrue(query.isExists()); //this should be enough to simulate the crash - qResourceAdapter.getDefaultHornetQConnectionFactory().close(); + qResourceAdapter.getDefaultActiveMQConnectionFactory().close(); qResourceAdapter.stop(); query = session.queueQuery(tempQueueName); @@ -592,13 +592,13 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testSelectorChangedWithTopic() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Topic"); @@ -655,11 +655,11 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testSharedSubscription() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Topic"); @@ -671,7 +671,7 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase spec.setShareSubscriptions(true); spec.setMaxSession(1); - HornetQActivationSpec spec2 = new HornetQActivationSpec(); + ActiveMQActivationSpec spec2 = new ActiveMQActivationSpec(); spec2.setResourceAdapter(qResourceAdapter); spec2.setUseJNDI(false); spec2.setDestinationType("javax.jms.Topic"); @@ -720,11 +720,11 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testNullSubscriptionName() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestination("mdbTopic"); @@ -754,11 +754,11 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testBadDestinationType() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("badDestinationType"); @@ -785,10 +785,10 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase @Test public void testSelectorNotChangedWithTopic() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Topic"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQMessageHandlerXATest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQMessageHandlerXATest.java similarity index 93% rename from tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQMessageHandlerXATest.java rename to tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQMessageHandlerXATest.java index c065d8f4dd..52604abee6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQMessageHandlerXATest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQMessageHandlerXATest.java @@ -14,14 +14,14 @@ package org.apache.activemq.tests.integration.ra; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.server.Queue; +import org.apache.activemq.ra.inflow.ActiveMQActivationSpec; import org.junit.Test; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.core.transaction.impl.XidImpl; -import org.apache.activemq.ra.HornetQResourceAdapter; -import org.apache.activemq.ra.inflow.HornetQActivationSpec; +import org.apache.activemq.ra.ActiveMQResourceAdapter; import org.apache.activemq.tests.util.UnitTestCase; import org.apache.activemq.utils.UUIDGenerator; @@ -38,7 +38,7 @@ import java.util.concurrent.TimeUnit; * @author Andy Taylor * Created Jul 6, 2010 */ -public class HornetQMessageHandlerXATest extends HornetQRATestBase +public class ActiveMQMessageHandlerXATest extends ActiveMQRATestBase { @Override public boolean useSecurity() @@ -49,10 +49,10 @@ public class HornetQMessageHandlerXATest extends HornetQRATestBase @Test public void testXACommit() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -81,10 +81,10 @@ public class HornetQMessageHandlerXATest extends HornetQRATestBase @Test public void testXACommitWhenStopping() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -121,10 +121,10 @@ public class HornetQMessageHandlerXATest extends HornetQRATestBase @Test public void testXACommitInterruptsWhenStopping() throws Exception { - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setCallTimeout(500L); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); @@ -162,11 +162,11 @@ public class HornetQMessageHandlerXATest extends HornetQRATestBase public void testXARollback() throws Exception { setupDLQ(10); - HornetQResourceAdapter qResourceAdapter = newResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter(); qResourceAdapter.setConnectorClassName(UnitTestCase.INVM_CONNECTOR_FACTORY); MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setMaxSession(1); spec.setUseJNDI(false); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQRAClusteredTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRAClusteredTestBase.java similarity index 92% rename from tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQRAClusteredTestBase.java rename to tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRAClusteredTestBase.java index 757367244e..5cdfd75309 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQRAClusteredTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRAClusteredTestBase.java @@ -17,15 +17,15 @@ import java.util.HashMap; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.impl.ConfigurationImpl; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.Before; -public class HornetQRAClusteredTestBase extends HornetQRATestBase +public class ActiveMQRAClusteredTestBase extends ActiveMQRATestBase { - protected HornetQServer secondaryServer; + protected ActiveMQServer secondaryServer; protected JMSServerManagerImpl secondaryJmsServer; protected TransportConfiguration secondaryConnector; protected TransportConfiguration primaryConnector; @@ -42,7 +42,7 @@ public class HornetQRAClusteredTestBase extends HornetQRATestBase secondaryConnector = new TransportConfiguration(INVM_CONNECTOR_FACTORY, params); Configuration conf = createSecondaryDefaultConfig(true, true); - secondaryServer = HornetQServers.newHornetQServer(conf, mbeanServer, usePersistence()); + secondaryServer = ActiveMQServers.newActiveMQServer(conf, mbeanServer, usePersistence()); addServer(secondaryServer); secondaryJmsServer = new JMSServerManagerImpl(secondaryServer); secondaryJmsServer.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQRATestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRATestBase.java similarity index 90% rename from tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQRATestBase.java rename to tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRATestBase.java index 4300984a69..da735da277 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/HornetQRATestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRATestBase.java @@ -35,9 +35,9 @@ import java.util.concurrent.CountDownLatch; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.settings.impl.AddressSettings; -import org.apache.activemq.jms.client.HornetQMessage; -import org.apache.activemq.ra.HornetQResourceAdapter; -import org.apache.activemq.ra.inflow.HornetQActivation; +import org.apache.activemq.jms.client.ActiveMQMessage; +import org.apache.activemq.ra.ActiveMQResourceAdapter; +import org.apache.activemq.ra.inflow.ActiveMQActivation; import org.apache.activemq.tests.util.JMSTestBase; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.After; @@ -47,7 +47,7 @@ import org.junit.Before; * @author Andy Taylor * Created Jul 6, 2010 */ -public abstract class HornetQRATestBase extends JMSTestBase +public abstract class ActiveMQRATestBase extends JMSTestBase { protected ServerLocator locator; @@ -84,17 +84,17 @@ public abstract class HornetQRATestBase extends JMSTestBase super.tearDown(); } - protected HornetQActivation lookupActivation(HornetQResourceAdapter qResourceAdapter) + protected ActiveMQActivation lookupActivation(ActiveMQResourceAdapter qResourceAdapter) { - Map activations = qResourceAdapter.getActivations(); + Map activations = qResourceAdapter.getActivations(); assertEquals(1, activations.size()); return activations.values().iterator().next(); } - protected HornetQResourceAdapter newResourceAdapter() + protected ActiveMQResourceAdapter newResourceAdapter() { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); // We don't have a TM on these tests.. This would cause the lookup to take at least 10 seconds if we didn't set to "" qResourceAdapter.setTransactionManagerLocatorClass(""); qResourceAdapter.setTransactionManagerLocatorMethod(""); @@ -134,7 +134,7 @@ public abstract class HornetQRATestBase extends JMSTestBase { public CountDownLatch latch; - public HornetQMessage lastMessage; + public ActiveMQMessage lastMessage; public boolean released = false; @@ -167,7 +167,7 @@ public abstract class HornetQRATestBase extends JMSTestBase public void onMessage(Message message) { - lastMessage = (HornetQMessage) message; + lastMessage = (ActiveMQMessage) message; System.err.println(message); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/JMSContextTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/JMSContextTest.java index aa7924a88f..3dd810a559 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/JMSContextTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/JMSContextTest.java @@ -20,21 +20,21 @@ import java.util.Set; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; import org.apache.activemq.core.security.Role; -import org.apache.activemq.ra.HornetQRAConnectionFactory; -import org.apache.activemq.ra.HornetQRAConnectionFactoryImpl; -import org.apache.activemq.ra.HornetQRAConnectionManager; -import org.apache.activemq.ra.HornetQRAManagedConnectionFactory; -import org.apache.activemq.ra.HornetQResourceAdapter; +import org.apache.activemq.ra.ActiveMQRAConnectionFactory; +import org.apache.activemq.ra.ActiveMQRAConnectionFactoryImpl; +import org.apache.activemq.ra.ActiveMQRAConnectionManager; +import org.apache.activemq.ra.ActiveMQRAManagedConnectionFactory; +import org.apache.activemq.ra.ActiveMQResourceAdapter; import org.junit.After; import org.junit.Before; import org.junit.Test; -public class JMSContextTest extends HornetQRATestBase +public class JMSContextTest extends ActiveMQRATestBase { - private HornetQResourceAdapter resourceAdapter; + private ActiveMQResourceAdapter resourceAdapter; - HornetQRAConnectionManager qraConnectionManager = new HornetQRAConnectionManager(); - private HornetQRAConnectionFactory qraConnectionFactory; + ActiveMQRAConnectionManager qraConnectionManager = new ActiveMQRAConnectionManager(); + private ActiveMQRAConnectionFactory qraConnectionFactory; public TransactionManager getTm() { @@ -55,16 +55,16 @@ public class JMSContextTest extends HornetQRATestBase Set roles = new HashSet(); roles.add(role); server.getSecurityRepository().addMatch(MDBQUEUEPREFIXED, roles); - resourceAdapter = new HornetQResourceAdapter(); + resourceAdapter = new ActiveMQResourceAdapter(); resourceAdapter.setTransactionManagerLocatorClass(JMSContextTest.class.getName()); resourceAdapter.setTransactionManagerLocatorMethod("getTm"); resourceAdapter.setConnectorClassName(InVMConnectorFactory.class.getName()); MyBootstrapContext ctx = new MyBootstrapContext(); resourceAdapter.start(ctx); - HornetQRAManagedConnectionFactory mcf = new HornetQRAManagedConnectionFactory(); + ActiveMQRAManagedConnectionFactory mcf = new ActiveMQRAManagedConnectionFactory(); mcf.setResourceAdapter(resourceAdapter); - qraConnectionFactory = new HornetQRAConnectionFactoryImpl(mcf, qraConnectionManager); + qraConnectionFactory = new ActiveMQRAConnectionFactoryImpl(mcf, qraConnectionManager); } @Override diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/OutgoingConnectionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/OutgoingConnectionTest.java index c333fe8fd4..8cbed72be5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/OutgoingConnectionTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/OutgoingConnectionTest.java @@ -39,18 +39,18 @@ import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; import org.apache.activemq.core.security.Role; import org.apache.activemq.core.transaction.impl.XidImpl; -import org.apache.activemq.ra.HornetQRAConnectionFactory; -import org.apache.activemq.ra.HornetQRAConnectionFactoryImpl; -import org.apache.activemq.ra.HornetQRAConnectionManager; -import org.apache.activemq.ra.HornetQRAManagedConnectionFactory; -import org.apache.activemq.ra.HornetQRASession; -import org.apache.activemq.ra.HornetQResourceAdapter; +import org.apache.activemq.ra.ActiveMQRAConnectionFactory; +import org.apache.activemq.ra.ActiveMQRAConnectionFactoryImpl; +import org.apache.activemq.ra.ActiveMQRAConnectionManager; +import org.apache.activemq.ra.ActiveMQRAManagedConnectionFactory; +import org.apache.activemq.ra.ActiveMQRASession; +import org.apache.activemq.ra.ActiveMQResourceAdapter; import org.apache.activemq.utils.UUIDGenerator; -import org.apache.activemq.ra.HornetQXAResourceWrapper; +import org.apache.activemq.ra.ActiveMQXAResourceWrapper; import org.apache.activemq.utils.VersionLoader; import org.junit.After; import org.junit.Before; @@ -61,11 +61,11 @@ import org.junit.Test; * @author Martyn Taylor * Created Jul 7, 2010 */ -public class OutgoingConnectionTest extends HornetQRATestBase +public class OutgoingConnectionTest extends ActiveMQRATestBase { - private HornetQResourceAdapter resourceAdapter; - private HornetQRAConnectionFactory qraConnectionFactory; - private HornetQRAManagedConnectionFactory mcf; + private ActiveMQResourceAdapter resourceAdapter; + private ActiveMQRAConnectionFactory qraConnectionFactory; + private ActiveMQRAManagedConnectionFactory mcf; @Override public boolean useSecurity() @@ -73,7 +73,7 @@ public class OutgoingConnectionTest extends HornetQRATestBase return true; } - HornetQRAConnectionManager qraConnectionManager = new HornetQRAConnectionManager(); + ActiveMQRAConnectionManager qraConnectionManager = new ActiveMQRAConnectionManager(); @Override @Before @@ -90,7 +90,7 @@ public class OutgoingConnectionTest extends HornetQRATestBase roles.add(role); server.getSecurityRepository().addMatch(MDBQUEUEPREFIXED, roles); - resourceAdapter = new HornetQResourceAdapter(); + resourceAdapter = new ActiveMQResourceAdapter(); resourceAdapter.setTransactionManagerLocatorClass(JMSContextTest.class.getName()); resourceAdapter.setTransactionManagerLocatorMethod("getTm"); resourceAdapter.setEntries("[\"java://jmsXA\"]"); @@ -98,9 +98,9 @@ public class OutgoingConnectionTest extends HornetQRATestBase resourceAdapter.setConnectorClassName(InVMConnectorFactory.class.getName()); MyBootstrapContext ctx = new MyBootstrapContext(); resourceAdapter.start(ctx); - mcf = new HornetQRAManagedConnectionFactory(); + mcf = new ActiveMQRAManagedConnectionFactory(); mcf.setResourceAdapter(resourceAdapter); - qraConnectionFactory = new HornetQRAConnectionFactoryImpl(mcf, qraConnectionManager); + qraConnectionFactory = new ActiveMQRAConnectionFactoryImpl(mcf, qraConnectionManager); } @Override @@ -122,7 +122,7 @@ public class OutgoingConnectionTest extends HornetQRATestBase { QueueConnection queueConnection = qraConnectionFactory.createQueueConnection(); Session s = queueConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - Queue q = HornetQJMSClient.createQueue(MDBQUEUE); + Queue q = ActiveMQJMSClient.createQueue(MDBQUEUE); MessageProducer mp = s.createProducer(q); MessageConsumer consumer = s.createConsumer(q); Message message = s.createTextMessage("test"); @@ -136,7 +136,7 @@ public class OutgoingConnectionTest extends HornetQRATestBase @Test public void testSimpleSendNoXAJMSContext() throws Exception { - Queue q = HornetQJMSClient.createQueue(MDBQUEUE); + Queue q = ActiveMQJMSClient.createQueue(MDBQUEUE); try (ClientSessionFactory sf = locator.createSessionFactory(); ClientSession session = sf.createSession(); @@ -160,7 +160,7 @@ public class OutgoingConnectionTest extends HornetQRATestBase @Test public void testSimpleSendNoXAJMS1() throws Exception { - Queue q = HornetQJMSClient.createQueue(MDBQUEUE); + Queue q = ActiveMQJMSClient.createQueue(MDBQUEUE); try (ClientSessionFactory sf = locator.createSessionFactory(); ClientSession session = sf.createSession(); ClientConsumer consVerify = session.createConsumer("jms.queue." + MDBQUEUE); @@ -190,7 +190,7 @@ public class OutgoingConnectionTest extends HornetQRATestBase XAResource resource = s.getXAResource(); resource.start(xid, XAResource.TMNOFLAGS); - Queue q = HornetQJMSClient.createQueue(MDBQUEUE); + Queue q = ActiveMQJMSClient.createQueue(MDBQUEUE); MessageProducer mp = s.createProducer(q); MessageConsumer consumer = s.createConsumer(q); Message message = s.createTextMessage("test"); @@ -219,9 +219,9 @@ public class OutgoingConnectionTest extends HornetQRATestBase resourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); resourceAdapter.start(ctx); - HornetQRAManagedConnectionFactory mcf = new HornetQRAManagedConnectionFactory(); + ActiveMQRAManagedConnectionFactory mcf = new ActiveMQRAManagedConnectionFactory(); mcf.setResourceAdapter(resourceAdapter); - HornetQRAConnectionFactory qraConnectionFactory = new HornetQRAConnectionFactoryImpl(mcf, qraConnectionManager); + ActiveMQRAConnectionFactory qraConnectionFactory = new ActiveMQRAConnectionFactoryImpl(mcf, qraConnectionManager); Connection conn = null; try @@ -288,12 +288,12 @@ public class OutgoingConnectionTest extends HornetQRATestBase DummyTransactionManager.tm.tx = new DummyTransaction(); MyBootstrapContext ctx = new MyBootstrapContext(); resourceAdapter.start(ctx); - HornetQRAManagedConnectionFactory mcf = new HornetQRAManagedConnectionFactory(); + ActiveMQRAManagedConnectionFactory mcf = new ActiveMQRAManagedConnectionFactory(); mcf.setResourceAdapter(resourceAdapter); - HornetQRAConnectionFactory qraConnectionFactory = new HornetQRAConnectionFactoryImpl(mcf, qraConnectionManager); + ActiveMQRAConnectionFactory qraConnectionFactory = new ActiveMQRAConnectionFactoryImpl(mcf, qraConnectionManager); QueueConnection queueConnection = qraConnectionFactory.createQueueConnection(); Session s = queueConnection.createSession(true, Session.AUTO_ACKNOWLEDGE); - Queue q = HornetQJMSClient.createQueue(MDBQUEUE); + Queue q = ActiveMQJMSClient.createQueue(MDBQUEUE); MessageProducer mp = s.createProducer(q); MessageConsumer consumer = s.createConsumer(q); Message message = s.createTextMessage("test"); @@ -316,9 +316,9 @@ public class OutgoingConnectionTest extends HornetQRATestBase resourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); resourceAdapter.start(ctx); - HornetQRAManagedConnectionFactory mcf = new HornetQRAManagedConnectionFactory(); + ActiveMQRAManagedConnectionFactory mcf = new ActiveMQRAManagedConnectionFactory(); mcf.setResourceAdapter(resourceAdapter); - HornetQRAConnectionFactory qraConnectionFactory = new HornetQRAConnectionFactoryImpl(mcf, qraConnectionManager); + ActiveMQRAConnectionFactory qraConnectionFactory = new ActiveMQRAConnectionFactoryImpl(mcf, qraConnectionManager); QueueConnection queueConnection = qraConnectionFactory.createQueueConnection(); Session s = queueConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); try @@ -337,9 +337,9 @@ public class OutgoingConnectionTest extends HornetQRATestBase resourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); resourceAdapter.start(ctx); - HornetQRAManagedConnectionFactory mcf = new HornetQRAManagedConnectionFactory(); + ActiveMQRAManagedConnectionFactory mcf = new ActiveMQRAManagedConnectionFactory(); mcf.setResourceAdapter(resourceAdapter); - HornetQRAConnectionFactory qraConnectionFactory = new HornetQRAConnectionFactoryImpl(mcf, qraConnectionManager); + ActiveMQRAConnectionFactory qraConnectionFactory = new ActiveMQRAConnectionFactoryImpl(mcf, qraConnectionManager); QueueConnection queueConnection = qraConnectionFactory.createQueueConnection(); QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); @@ -354,13 +354,13 @@ public class OutgoingConnectionTest extends HornetQRATestBase resourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); resourceAdapter.start(ctx); - HornetQRAManagedConnectionFactory mcf = new HornetQRAManagedConnectionFactory(); + ActiveMQRAManagedConnectionFactory mcf = new ActiveMQRAManagedConnectionFactory(); mcf.setResourceAdapter(resourceAdapter); - HornetQRAConnectionFactory qraConnectionFactory = new HornetQRAConnectionFactoryImpl(mcf, qraConnectionManager); + ActiveMQRAConnectionFactory qraConnectionFactory = new ActiveMQRAConnectionFactoryImpl(mcf, qraConnectionManager); QueueConnection queueConnection = qraConnectionFactory.createQueueConnection(); QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); - ManagedConnection mc = ((HornetQRASession) session).getManagedConnection(); + ManagedConnection mc = ((ActiveMQRASession) session).getManagedConnection(); queueConnection.close(); mc.destroy(); @@ -382,9 +382,9 @@ public class OutgoingConnectionTest extends HornetQRATestBase resourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); resourceAdapter.start(ctx); - HornetQRAManagedConnectionFactory mcf = new HornetQRAManagedConnectionFactory(); + ActiveMQRAManagedConnectionFactory mcf = new ActiveMQRAManagedConnectionFactory(); mcf.setResourceAdapter(resourceAdapter); - HornetQRAConnectionFactory qraConnectionFactory = new HornetQRAConnectionFactoryImpl(mcf, qraConnectionManager); + ActiveMQRAConnectionFactory qraConnectionFactory = new ActiveMQRAConnectionFactoryImpl(mcf, qraConnectionManager); try { QueueConnection queueConnection = qraConnectionFactory.createQueueConnection("testuser", "testwrongpassword"); @@ -404,9 +404,9 @@ public class OutgoingConnectionTest extends HornetQRATestBase resourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); resourceAdapter.start(ctx); - HornetQRAManagedConnectionFactory mcf = new HornetQRAManagedConnectionFactory(); + ActiveMQRAManagedConnectionFactory mcf = new ActiveMQRAManagedConnectionFactory(); mcf.setResourceAdapter(resourceAdapter); - HornetQRAConnectionFactory qraConnectionFactory = new HornetQRAConnectionFactoryImpl(mcf, qraConnectionManager); + ActiveMQRAConnectionFactory qraConnectionFactory = new ActiveMQRAConnectionFactoryImpl(mcf, qraConnectionManager); QueueConnection queueConnection = qraConnectionFactory.createQueueConnection(); QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); @@ -419,9 +419,9 @@ public class OutgoingConnectionTest extends HornetQRATestBase resourceAdapter = newResourceAdapter(); MyBootstrapContext ctx = new MyBootstrapContext(); resourceAdapter.start(ctx); - HornetQRAManagedConnectionFactory mcf = new HornetQRAManagedConnectionFactory(); + ActiveMQRAManagedConnectionFactory mcf = new ActiveMQRAManagedConnectionFactory(); mcf.setResourceAdapter(resourceAdapter); - HornetQRAConnectionFactory qraConnectionFactory = new HornetQRAConnectionFactoryImpl(mcf, qraConnectionManager); + ActiveMQRAConnectionFactory qraConnectionFactory = new ActiveMQRAConnectionFactoryImpl(mcf, qraConnectionManager); JMSContext jmsctx = qraConnectionFactory.createContext(JMSContext.DUPS_OK_ACKNOWLEDGE); assertEquals(JMSContext.DUPS_OK_ACKNOWLEDGE, jmsctx.getSessionMode()); @@ -523,11 +523,11 @@ public class OutgoingConnectionTest extends HornetQRATestBase XASession s = queueConnection.createXASession(); XAResource resource = s.getXAResource(); - assertTrue(resource instanceof HornetQXAResourceWrapper); + assertTrue(resource instanceof ActiveMQXAResourceWrapper); - HornetQXAResourceWrapper xaResourceWrapper = (HornetQXAResourceWrapper) resource; + ActiveMQXAResourceWrapper xaResourceWrapper = (ActiveMQXAResourceWrapper) resource; assertTrue(xaResourceWrapper.getJndiName().equals("java://jmsXA NodeId:" + server.getNodeID())); assertTrue(xaResourceWrapper.getProductVersion().equals(VersionLoader.getVersion().getFullVersion())); - assertTrue(xaResourceWrapper.getProductName().equals(HornetQResourceAdapter.PRODUCT_NAME)); + assertTrue(xaResourceWrapper.getProductName().equals(ActiveMQResourceAdapter.PRODUCT_NAME)); } } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ResourceAdapterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ResourceAdapterTest.java index 1e2522273d..518dada417 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ResourceAdapterTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ResourceAdapterTest.java @@ -29,16 +29,16 @@ import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.client.impl.ServerLocatorImpl; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; import org.apache.activemq.jms.server.recovery.RecoveryDiscovery; import org.apache.activemq.jms.server.recovery.XARecoveryConfig; -import org.apache.activemq.ra.HornetQResourceAdapter; -import org.apache.activemq.ra.inflow.HornetQActivation; -import org.apache.activemq.ra.inflow.HornetQActivationSpec; +import org.apache.activemq.ra.ActiveMQResourceAdapter; +import org.apache.activemq.ra.inflow.ActiveMQActivation; +import org.apache.activemq.ra.inflow.ActiveMQActivationSpec; import org.apache.activemq.tests.unit.ra.MessageEndpointFactory; import org.apache.activemq.tests.util.UnitTestCase; import org.apache.activemq.utils.DefaultSensitiveStringCodec; @@ -48,7 +48,7 @@ import org.junit.Test; * @author Andy Taylor * Created Jul 7, 2010 */ -public class ResourceAdapterTest extends HornetQRATestBase +public class ResourceAdapterTest extends ActiveMQRATestBase { @Test public void testStartStopActivationManyTimes() throws Exception @@ -56,11 +56,11 @@ public class ResourceAdapterTest extends HornetQRATestBase ServerLocator locator = createInVMNonHALocator(); ClientSessionFactory factory = locator.createSessionFactory(); ClientSession session = factory.createSession(false, false, false); - HornetQDestination queue = (HornetQDestination) HornetQJMSClient.createQueue("test"); + ActiveMQDestination queue = (ActiveMQDestination) ActiveMQJMSClient.createQueue("test"); session.createQueue(queue.getSimpleAddress(), queue.getSimpleAddress(), true); session.close(); - HornetQResourceAdapter ra = new HornetQResourceAdapter(); + ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory"); ra.setUserName("userGlobal"); @@ -69,11 +69,11 @@ public class ResourceAdapterTest extends HornetQRATestBase ra.setTransactionManagerLocatorMethod(""); ra.start(new org.apache.activemq.tests.unit.ra.BootstrapContext()); - Connection conn = ra.getDefaultHornetQConnectionFactory().createConnection(); + Connection conn = ra.getDefaultActiveMQConnectionFactory().createConnection(); conn.close(); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(ra); @@ -88,9 +88,9 @@ public class ResourceAdapterTest extends HornetQRATestBase spec.setMinSession(1); spec.setMaxSession(15); - HornetQActivation activation = new HornetQActivation(ra, new MessageEndpointFactory(), spec); + ActiveMQActivation activation = new ActiveMQActivation(ra, new MessageEndpointFactory(), spec); - ServerLocatorImpl serverLocator = (ServerLocatorImpl) ra.getDefaultHornetQConnectionFactory().getServerLocator(); + ServerLocatorImpl serverLocator = (ServerLocatorImpl) ra.getDefaultActiveMQConnectionFactory().getServerLocator(); Field f = Class.forName(ServerLocatorImpl.class.getName()).getDeclaredField("factories"); @@ -123,13 +123,13 @@ public class ResourceAdapterTest extends HornetQRATestBase @Test public void testStartStop() throws Exception { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setConnectorClassName(UnitTestCase.INVM_CONNECTOR_FACTORY); - HornetQRATestBase.MyBootstrapContext ctx = new HornetQRATestBase.MyBootstrapContext(); + ActiveMQRATestBase.MyBootstrapContext ctx = new ActiveMQRATestBase.MyBootstrapContext(); qResourceAdapter.setTransactionManagerLocatorClass(""); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -160,7 +160,7 @@ public class ResourceAdapterTest extends HornetQRATestBase String loadbalancer = "loadbalancer"; String testpass = "testpass"; String testuser = "testuser"; - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); testParams(b, l, i, @@ -194,7 +194,7 @@ public class ResourceAdapterTest extends HornetQRATestBase String loadbalancer = "loadbalancer2"; String testpass = "testpass2"; String testuser = "testuser2"; - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); testParams(b, l, i, @@ -224,7 +224,7 @@ public class ResourceAdapterTest extends HornetQRATestBase String testaddress, String testpass, String testuser, - HornetQResourceAdapter qResourceAdapter) + ActiveMQResourceAdapter qResourceAdapter) { qResourceAdapter.setUseLocalTx(b); qResourceAdapter.setConnectorClassName(className); @@ -300,9 +300,9 @@ public class ResourceAdapterTest extends HornetQRATestBase @Test public void testResourceAdapterSetup() throws Exception { - HornetQResourceAdapter adapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter adapter = new ActiveMQResourceAdapter(); adapter.setDiscoveryAddress("231.1.1.1"); - HornetQConnectionFactory factory = adapter.getDefaultHornetQConnectionFactory(); + ActiveMQConnectionFactory factory = adapter.getDefaultActiveMQConnectionFactory(); long initWait = factory.getDiscoveryGroupConfiguration().getDiscoveryInitialWaitTimeout(); long refresh = factory.getDiscoveryGroupConfiguration().getRefreshTimeout(); int port = ((UDPBroadcastGroupConfiguration) factory.getDiscoveryGroupConfiguration().getBroadcastEndpointFactoryConfiguration()).getGroupPort(); @@ -312,11 +312,11 @@ public class ResourceAdapterTest extends HornetQRATestBase assertEquals(10000L, initWait); assertEquals(9876, port); - adapter = new HornetQResourceAdapter(); + adapter = new ActiveMQResourceAdapter(); adapter.setDiscoveryAddress("231.1.1.1"); adapter.setDiscoveryPort(9876); adapter.setDiscoveryRefreshTimeout(1234L); - factory = adapter.getDefaultHornetQConnectionFactory(); + factory = adapter.getDefaultActiveMQConnectionFactory(); initWait = factory.getDiscoveryGroupConfiguration().getDiscoveryInitialWaitTimeout(); refresh = factory.getDiscoveryGroupConfiguration().getRefreshTimeout(); @@ -324,11 +324,11 @@ public class ResourceAdapterTest extends HornetQRATestBase assertEquals(1234L, refresh); assertEquals(10000L, initWait); - adapter = new HornetQResourceAdapter(); + adapter = new ActiveMQResourceAdapter(); adapter.setDiscoveryAddress("231.1.1.1"); adapter.setDiscoveryPort(9876); adapter.setDiscoveryInitialWaitTimeout(9999L); - factory = adapter.getDefaultHornetQConnectionFactory(); + factory = adapter.getDefaultActiveMQConnectionFactory(); initWait = factory.getDiscoveryGroupConfiguration().getDiscoveryInitialWaitTimeout(); refresh = factory.getDiscoveryGroupConfiguration().getRefreshTimeout(); @@ -336,11 +336,11 @@ public class ResourceAdapterTest extends HornetQRATestBase assertEquals(10000L, refresh); assertEquals(9999L, initWait); - adapter = new HornetQResourceAdapter(); + adapter = new ActiveMQResourceAdapter(); adapter.setDiscoveryAddress("231.1.1.1"); adapter.setDiscoveryPort(9876); adapter.setDiscoveryInitialWaitTimeout(9999L); - factory = adapter.getDefaultHornetQConnectionFactory(); + factory = adapter.getDefaultActiveMQConnectionFactory(); initWait = factory.getDiscoveryGroupConfiguration().getDiscoveryInitialWaitTimeout(); refresh = factory.getDiscoveryGroupConfiguration().getRefreshTimeout(); @@ -354,14 +354,14 @@ public class ResourceAdapterTest extends HornetQRATestBase @Test public void testResourceAdapterSetupOverrideCFParams() throws Exception { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY); qResourceAdapter.setConnectionParameters("server-id=0"); - HornetQRATestBase.MyBootstrapContext ctx = new HornetQRATestBase.MyBootstrapContext(); + ActiveMQRATestBase.MyBootstrapContext ctx = new ActiveMQRATestBase.MyBootstrapContext(); qResourceAdapter.setTransactionManagerLocatorClass(""); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -381,14 +381,14 @@ public class ResourceAdapterTest extends HornetQRATestBase @Test public void testRecoveryRegistrationOnFailure() throws Exception { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY); qResourceAdapter.setConnectionParameters("server-id=0"); - HornetQRATestBase.MyBootstrapContext ctx = new HornetQRATestBase.MyBootstrapContext(); + ActiveMQRATestBase.MyBootstrapContext ctx = new ActiveMQRATestBase.MyBootstrapContext(); qResourceAdapter.setTransactionManagerLocatorClass(""); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -410,14 +410,14 @@ public class ResourceAdapterTest extends HornetQRATestBase @Test public void testResourceAdapterSetupOverrideNoCFParams() throws Exception { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY); qResourceAdapter.setConnectionParameters("server-id=0"); - HornetQRATestBase.MyBootstrapContext ctx = new HornetQRATestBase.MyBootstrapContext(); + ActiveMQRATestBase.MyBootstrapContext ctx = new ActiveMQRATestBase.MyBootstrapContext(); qResourceAdapter.setTransactionManagerLocatorClass(""); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -435,21 +435,21 @@ public class ResourceAdapterTest extends HornetQRATestBase @Test public void testResourceAdapterSetupNoOverrideDiscovery() throws Exception { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setDiscoveryAddress("231.6.6.6"); qResourceAdapter.setDiscoveryPort(1234); qResourceAdapter.setDiscoveryRefreshTimeout(1L); qResourceAdapter.setDiscoveryInitialWaitTimeout(1L); - HornetQRATestBase.MyBootstrapContext ctx = new HornetQRATestBase.MyBootstrapContext(); + ActiveMQRATestBase.MyBootstrapContext ctx = new ActiveMQRATestBase.MyBootstrapContext(); qResourceAdapter.setTransactionManagerLocatorClass(""); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); spec.setDestination(MDBQUEUE); - HornetQConnectionFactory fac = qResourceAdapter.createHornetQConnectionFactory(spec); + ActiveMQConnectionFactory fac = qResourceAdapter.createActiveMQConnectionFactory(spec); DiscoveryGroupConfiguration dc = fac.getServerLocator().getDiscoveryGroupConfiguration(); UDPBroadcastGroupConfiguration udpDg = (UDPBroadcastGroupConfiguration) dc.getBroadcastEndpointFactoryConfiguration(); assertEquals(udpDg.getGroupAddress(), "231.6.6.6"); @@ -462,16 +462,16 @@ public class ResourceAdapterTest extends HornetQRATestBase @Test public void testResourceAdapterSetupOverrideDiscovery() throws Exception { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setDiscoveryAddress("231.7.7.7"); // qResourceAdapter.getTransactionManagerLocatorClass - HornetQRATestBase.MyBootstrapContext ctx = new HornetQRATestBase.MyBootstrapContext(); + ActiveMQRATestBase.MyBootstrapContext ctx = new ActiveMQRATestBase.MyBootstrapContext(); qResourceAdapter.setTransactionManagerLocatorClass(""); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -481,7 +481,7 @@ public class ResourceAdapterTest extends HornetQRATestBase spec.setDiscoveryPort(1234); spec.setDiscoveryInitialWaitTimeout(1L); spec.setDiscoveryRefreshTimeout(1L); - HornetQConnectionFactory fac = qResourceAdapter.createHornetQConnectionFactory(spec); + ActiveMQConnectionFactory fac = qResourceAdapter.createActiveMQConnectionFactory(spec); DiscoveryGroupConfiguration dc = fac.getServerLocator().getDiscoveryGroupConfiguration(); UDPBroadcastGroupConfiguration udpDg = (UDPBroadcastGroupConfiguration) dc.getBroadcastEndpointFactoryConfiguration(); assertEquals(udpDg.getGroupAddress(), "231.6.6.6"); @@ -494,21 +494,21 @@ public class ResourceAdapterTest extends HornetQRATestBase @Test public void testResourceAdapterSetupNoHAOverride() throws Exception { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY); qResourceAdapter.setConnectionParameters("server-id=0"); qResourceAdapter.setHA(true); - HornetQRATestBase.MyBootstrapContext ctx = new HornetQRATestBase.MyBootstrapContext(); + ActiveMQRATestBase.MyBootstrapContext ctx = new ActiveMQRATestBase.MyBootstrapContext(); qResourceAdapter.setTransactionManagerLocatorClass(""); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); spec.setDestination(MDBQUEUE); - HornetQConnectionFactory fac = qResourceAdapter.createHornetQConnectionFactory(spec); + ActiveMQConnectionFactory fac = qResourceAdapter.createActiveMQConnectionFactory(spec); assertTrue(fac.isHA()); @@ -519,20 +519,20 @@ public class ResourceAdapterTest extends HornetQRATestBase @Test public void testResourceAdapterSetupNoHADefault() throws Exception { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY); qResourceAdapter.setConnectionParameters("server-id=0"); - HornetQRATestBase.MyBootstrapContext ctx = new HornetQRATestBase.MyBootstrapContext(); + ActiveMQRATestBase.MyBootstrapContext ctx = new ActiveMQRATestBase.MyBootstrapContext(); qResourceAdapter.setTransactionManagerLocatorClass(""); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); spec.setDestination(MDBQUEUE); - HornetQConnectionFactory fac = qResourceAdapter.createHornetQConnectionFactory(spec); + ActiveMQConnectionFactory fac = qResourceAdapter.createActiveMQConnectionFactory(spec); assertFalse(fac.isHA()); @@ -543,20 +543,20 @@ public class ResourceAdapterTest extends HornetQRATestBase @Test public void testResourceAdapterSetupHAOverride() throws Exception { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY); qResourceAdapter.setConnectionParameters("server-id=0"); - HornetQRATestBase.MyBootstrapContext ctx = new HornetQRATestBase.MyBootstrapContext(); + ActiveMQRATestBase.MyBootstrapContext ctx = new ActiveMQRATestBase.MyBootstrapContext(); qResourceAdapter.setTransactionManagerLocatorClass(""); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); spec.setDestination(MDBQUEUE); spec.setHA(true); - HornetQConnectionFactory fac = qResourceAdapter.createHornetQConnectionFactory(spec); + ActiveMQConnectionFactory fac = qResourceAdapter.createActiveMQConnectionFactory(spec); assertTrue(fac.isHA()); @@ -567,21 +567,21 @@ public class ResourceAdapterTest extends HornetQRATestBase @Test public void testResourceAdapterSetupNoReconnectAttemptsOverride() throws Exception { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY); qResourceAdapter.setConnectionParameters("server-id=0"); qResourceAdapter.setReconnectAttempts(100); - HornetQRATestBase.MyBootstrapContext ctx = new HornetQRATestBase.MyBootstrapContext(); + ActiveMQRATestBase.MyBootstrapContext ctx = new ActiveMQRATestBase.MyBootstrapContext(); qResourceAdapter.setTransactionManagerLocatorClass(""); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); spec.setDestination(MDBQUEUE); - HornetQConnectionFactory fac = qResourceAdapter.createHornetQConnectionFactory(spec); + ActiveMQConnectionFactory fac = qResourceAdapter.createActiveMQConnectionFactory(spec); assertEquals(100, fac.getReconnectAttempts()); @@ -592,20 +592,20 @@ public class ResourceAdapterTest extends HornetQRATestBase @Test public void testResourceAdapterSetupReconnectAttemptDefault() throws Exception { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY); qResourceAdapter.setConnectionParameters("server-id=0"); - HornetQRATestBase.MyBootstrapContext ctx = new HornetQRATestBase.MyBootstrapContext(); + ActiveMQRATestBase.MyBootstrapContext ctx = new ActiveMQRATestBase.MyBootstrapContext(); qResourceAdapter.setTransactionManagerLocatorClass(""); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); spec.setDestination(MDBQUEUE); - HornetQConnectionFactory fac = qResourceAdapter.createHornetQConnectionFactory(spec); + ActiveMQConnectionFactory fac = qResourceAdapter.createActiveMQConnectionFactory(spec); assertEquals(-1, fac.getReconnectAttempts()); @@ -616,20 +616,20 @@ public class ResourceAdapterTest extends HornetQRATestBase @Test public void testResourceAdapterSetupReconnectAttemptsOverride() throws Exception { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY); qResourceAdapter.setConnectionParameters("server-id=0"); - HornetQRATestBase.MyBootstrapContext ctx = new HornetQRATestBase.MyBootstrapContext(); + ActiveMQRATestBase.MyBootstrapContext ctx = new ActiveMQRATestBase.MyBootstrapContext(); qResourceAdapter.setTransactionManagerLocatorClass(""); qResourceAdapter.start(ctx); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); spec.setDestination(MDBQUEUE); spec.setReconnectAttempts(100); - HornetQConnectionFactory fac = qResourceAdapter.createHornetQConnectionFactory(spec); + ActiveMQConnectionFactory fac = qResourceAdapter.createActiveMQConnectionFactory(spec); assertEquals(100, fac.getReconnectAttempts()); @@ -640,9 +640,9 @@ public class ResourceAdapterTest extends HornetQRATestBase @Test public void testMaskPassword() throws Exception { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setConnectorClassName(UnitTestCase.INVM_CONNECTOR_FACTORY); - HornetQRATestBase.MyBootstrapContext ctx = new HornetQRATestBase.MyBootstrapContext(); + ActiveMQRATestBase.MyBootstrapContext ctx = new ActiveMQRATestBase.MyBootstrapContext(); DefaultSensitiveStringCodec codec = new DefaultSensitiveStringCodec(); String mask = (String) codec.encode("helloworld"); @@ -655,7 +655,7 @@ public class ResourceAdapterTest extends HornetQRATestBase assertEquals("helloworld", qResourceAdapter.getPassword()); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); @@ -678,9 +678,9 @@ public class ResourceAdapterTest extends HornetQRATestBase @Test public void testMaskPassword2() throws Exception { - HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter(); + ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setConnectorClassName(UnitTestCase.INVM_CONNECTOR_FACTORY); - HornetQRATestBase.MyBootstrapContext ctx = new HornetQRATestBase.MyBootstrapContext(); + ActiveMQRATestBase.MyBootstrapContext ctx = new ActiveMQRATestBase.MyBootstrapContext(); qResourceAdapter.setUseMaskedPassword(true); qResourceAdapter.setPasswordCodec(DefaultSensitiveStringCodec.class.getName() + ";key=anotherkey"); @@ -700,7 +700,7 @@ public class ResourceAdapterTest extends HornetQRATestBase assertEquals("helloworld", qResourceAdapter.getPassword()); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(qResourceAdapter); spec.setUseJNDI(false); spec.setDestinationType("javax.jms.Queue"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/BatchDelayTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/BatchDelayTest.java index 7874276ff5..3d240ac23e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/BatchDelayTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/BatchDelayTest.java @@ -24,11 +24,11 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; /** @@ -44,7 +44,7 @@ public class BatchDelayTest extends ServiceTestBase private static final int N = 1000; private static final long DELAY = 500; - private HornetQServer server; + private ActiveMQServer server; @Override @Before @@ -68,7 +68,7 @@ public class BatchDelayTest extends ServiceTestBase Map params = new HashMap(); params.put(TransportConstants.BATCH_DELAY, DELAY); ServerLocator locator = - HornetQClient.createServerLocatorWithoutHA(createTransportConfiguration(true, false, params)); + ActiveMQClient.createServerLocatorWithoutHA(createTransportConfiguration(true, false, params)); addServerLocator(locator); ClientSessionFactory sf = createSessionFactory(locator); return addSessionFactory(sf); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/DestroyConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/DestroyConsumerTest.java index b31ca5fd65..c870cb320d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/DestroyConsumerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/DestroyConsumerTest.java @@ -36,7 +36,7 @@ public class DestroyConsumerTest extends ServiceTestBase // public void testDestroyConsumer() throws Exception // { - // HornetQServer server = createService(false, false, createDefaultConfig(), new HashMap()); + // ActiveMQServer server = createService(false, false, createDefaultConfig(), new HashMap()); // server.start(); // // SimpleString queue = new SimpleString("add1"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/DirectDeliverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/DirectDeliverTest.java index 9fe8694c9e..7d37837693 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/DirectDeliverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/DirectDeliverTest.java @@ -25,14 +25,14 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.impl.QueueImpl; import org.apache.activemq.tests.util.ServiceTestBase; @@ -48,7 +48,7 @@ import org.apache.activemq.tests.util.ServiceTestBase; public class DirectDeliverTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private ServerLocator locator; @@ -68,7 +68,7 @@ public class DirectDeliverTest extends ServiceTestBase server = createServer(false, config); server.start(); - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); addServerLocator(locator); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/NetworkAddressTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/NetworkAddressTestBase.java index 83726a95cb..47d3e84d2f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/NetworkAddressTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/NetworkAddressTestBase.java @@ -25,10 +25,10 @@ import java.util.Set; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; @@ -213,7 +213,7 @@ public abstract class NetworkAddressTestBase extends ServiceTestBase Configuration config = createDefaultConfig(true); config.setAcceptorConfigurations(transportConfigs); - HornetQServer messagingService = createServer(false, config); + ActiveMQServer messagingService = createServer(false, config); try { messagingService.start(); @@ -225,7 +225,7 @@ public abstract class NetworkAddressTestBase extends ServiceTestBase params.put(getLocalPortProperty(), localPort); } TransportConfiguration connectorConfig = new TransportConfiguration(getConnectorFactoryClassName(), params); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(connectorConfig)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(connectorConfig)); if (mustConnect) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/PingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/PingTest.java index b038748656..7f9c5bdaa2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/PingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/PingTest.java @@ -28,7 +28,7 @@ import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.client.SessionFailureListener; import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl; @@ -39,7 +39,7 @@ import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.core.remoting.CloseListener; import org.apache.activemq.core.remoting.server.impl.RemotingServiceImpl; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; @@ -58,7 +58,7 @@ public class PingTest extends ServiceTestBase // Attributes ---------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; // Static -------------------------------------------------------- @@ -171,7 +171,7 @@ public class PingTest extends ServiceTestBase public void testNoFailureNoPinging() throws Exception { TransportConfiguration transportConfig = new TransportConfiguration("org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory"); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(transportConfig)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(transportConfig)); locator.setClientFailureCheckPeriod(-1); locator.setConnectionTTL(-1); ClientSessionFactory csf = createSessionFactory(locator); @@ -204,7 +204,7 @@ public class PingTest extends ServiceTestBase serverConn.addFailureListener(serverListener); - Thread.sleep(HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD); + Thread.sleep(ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD); Assert.assertNull(clientListener.getException()); @@ -239,7 +239,7 @@ public class PingTest extends ServiceTestBase { if (packet.getType() == PacketImpl.PING) { - Assert.assertEquals(HornetQClient.DEFAULT_CONNECTION_TTL_INVM, ((Ping) packet).getConnectionTTL()); + Assert.assertEquals(ActiveMQClient.DEFAULT_CONNECTION_TTL_INVM, ((Ping) packet).getConnectionTTL()); unwantedPings.countDown(); requiredPings.countDown(); } @@ -248,7 +248,7 @@ public class PingTest extends ServiceTestBase }); TransportConfiguration transportConfig = new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory"); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(transportConfig)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(transportConfig)); ClientSessionFactory csf = createSessionFactory(locator); ClientSession session = csf.createSession(false, true, true); @@ -257,7 +257,7 @@ public class PingTest extends ServiceTestBase Assert.assertTrue("server didn't received an expected ping from the client", requiredPings.await(5000, TimeUnit.MILLISECONDS)); - Assert.assertFalse("server received an unexpected ping from the client", unwantedPings.await(HornetQClient.DEFAULT_CONNECTION_TTL * 2, TimeUnit.MILLISECONDS)); + Assert.assertFalse("server received an unexpected ping from the client", unwantedPings.await(ActiveMQClient.DEFAULT_CONNECTION_TTL * 2, TimeUnit.MILLISECONDS)); session.close(); @@ -273,7 +273,7 @@ public class PingTest extends ServiceTestBase public void testServerFailureNoPing() throws Exception { TransportConfiguration transportConfig = new TransportConfiguration("org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory"); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(transportConfig)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(transportConfig)); locator.setClientFailureCheckPeriod(PingTest.CLIENT_FAILURE_CHECK_PERIOD); locator.setConnectionTTL(PingTest.CLIENT_FAILURE_CHECK_PERIOD * 2); ClientSessionFactoryImpl csf = (ClientSessionFactoryImpl) createSessionFactory(locator); @@ -369,7 +369,7 @@ public class PingTest extends ServiceTestBase }); TransportConfiguration transportConfig = new TransportConfiguration("org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory"); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(transportConfig)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(transportConfig)); locator.setClientFailureCheckPeriod(PingTest.CLIENT_FAILURE_CHECK_PERIOD); locator.setConnectionTTL(PingTest.CLIENT_FAILURE_CHECK_PERIOD * 2); ClientSessionFactory csf = createSessionFactory(locator); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/ReconnectTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/ReconnectTest.java index 959d05e939..b7ce74ed44 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/ReconnectTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/ReconnectTest.java @@ -27,7 +27,7 @@ import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.client.SessionFailureListener; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.client.impl.ClientSessionInternal; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; /** @@ -56,7 +56,7 @@ public class ReconnectTest extends ServiceTestBase { final int pingPeriod = 1000; - HornetQServer server = createServer(false, isNetty); + ActiveMQServer server = createServer(false, isNetty); server.start(); @@ -158,7 +158,7 @@ public class ReconnectTest extends ServiceTestBase { final int pingPeriod = 1000; - HornetQServer server = createServer(false, isNetty); + ActiveMQServer server = createServer(false, isNetty); server.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/SynchronousCloseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/SynchronousCloseTest.java index 3366c386ba..03efc60a7f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/SynchronousCloseTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/remoting/SynchronousCloseTest.java @@ -20,10 +20,10 @@ import org.junit.Assert; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; /** @@ -37,7 +37,7 @@ import org.apache.activemq.tests.util.ServiceTestBase; public class SynchronousCloseTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; // Static -------------------------------------------------------- @@ -71,11 +71,11 @@ public class SynchronousCloseTest extends ServiceTestBase ServerLocator locator; if (isNetty()) { - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.NETTY_CONNECTOR_FACTORY)); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.NETTY_CONNECTOR_FACTORY)); } else { - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY)); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY)); } return createSessionFactory(locator); @@ -88,7 +88,7 @@ public class SynchronousCloseTest extends ServiceTestBase @Test public void testSynchronousClose() throws Exception { - Assert.assertEquals(0, server.getHornetQServerControl().listRemoteAddresses().length); + Assert.assertEquals(0, server.getActiveMQServerControl().listRemoteAddresses().length); ClientSessionFactory sf = createSessionFactory(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/replication/ReplicationOrderTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/replication/ReplicationOrderTest.java index 02ca20147b..dd2ba2324c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/replication/ReplicationOrderTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/replication/ReplicationOrderTest.java @@ -22,7 +22,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.tests.integration.cluster.failover.FailoverTestBase; import org.apache.activemq.tests.util.RandomUtil; @@ -56,7 +56,7 @@ public class ReplicationOrderTest extends FailoverTestBase { String address = RandomUtil.randomString(); String queue = RandomUtil.randomString(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(getConnectorTransportConfiguration(true)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(getConnectorTransportConfiguration(true)); addServerLocator(locator); locator.setBlockOnNonDurableSend(false); locator.setBlockOnDurableSend(false); @@ -98,7 +98,7 @@ public class ReplicationOrderTest extends FailoverTestBase } session.close(); - locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(getConnectorTransportConfiguration(true))); + locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(getConnectorTransportConfiguration(true))); csf = createSessionFactory(locator); session = csf.createSession(true, true); session.start(); 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 7c3420f17d..29350b1318 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 @@ -68,8 +68,8 @@ import org.apache.activemq.core.protocol.core.CoreRemotingConnection; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.replication.ReplicatedJournal; import org.apache.activemq.core.replication.ReplicationManager; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.server.impl.ServerMessageImpl; import org.apache.activemq.core.settings.HierarchicalRepository; @@ -79,7 +79,7 @@ import org.apache.activemq.tests.util.ReplicatedBackupUtils; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.TransportConfigurationUtils; import org.apache.activemq.utils.ExecutorFactory; -import org.apache.activemq.utils.HornetQThreadFactory; +import org.apache.activemq.utils.ActiveMQThreadFactory; import org.apache.activemq.utils.OrderedExecutorFactory; import org.junit.After; import org.junit.Assert; @@ -99,11 +99,11 @@ public final class ReplicationTest extends ServiceTestBase private ExecutorFactory factory; private ScheduledExecutorService scheduledExecutor; - private HornetQServer backupServer; + private ActiveMQServer backupServer; /** * This field is not always used. */ - private HornetQServer liveServer; + private ActiveMQServer liveServer; private ServerLocator locator; @@ -161,7 +161,7 @@ public final class ReplicationTest extends ServiceTestBase } } - private static void waitForComponent(HornetQComponent component) throws Exception + private static void waitForComponent(ActiveMQComponent component) throws Exception { waitForComponent(component, 3); } @@ -181,7 +181,7 @@ public final class ReplicationTest extends ServiceTestBase { ClientSessionFactory sf = createSessionFactory(locator); manager = new ReplicationManager((CoreRemotingConnection) sf.getConnection(), factory); - addHornetQComponent(manager); + addActiveMQComponent(manager); manager.start(); Assert.fail("Exception was expected"); } @@ -549,7 +549,7 @@ public final class ReplicationTest extends ServiceTestBase { super.setUp(); - tFactory = new HornetQThreadFactory("HornetQ-ReplicationTest", false, this.getClass().getClassLoader()); + tFactory = new ActiveMQThreadFactory("ActiveMQ-ReplicationTest", false, this.getClass().getClassLoader()); executor = Executors.newCachedThreadPool(tFactory); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/scheduling/DelayedMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/scheduling/DelayedMessageTest.java index 57d224d13b..f6a7681c7b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/scheduling/DelayedMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/scheduling/DelayedMessageTest.java @@ -24,9 +24,9 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -40,7 +40,7 @@ public class DelayedMessageTest extends ServiceTestBase private Configuration configuration; - private HornetQServer server; + private ActiveMQServer server; private static final long DELAY = 3000; @@ -292,7 +292,7 @@ public class DelayedMessageTest extends ServiceTestBase private ClientMessage createDurableMessage(final ClientSession session, final String body) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, true, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/scheduling/MultipliedDelayedMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/scheduling/MultipliedDelayedMessageTest.java index 5f9ef600c1..3939eab147 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/scheduling/MultipliedDelayedMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/scheduling/MultipliedDelayedMessageTest.java @@ -19,9 +19,9 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -38,7 +38,7 @@ public class MultipliedDelayedMessageTest extends ServiceTestBase private Configuration configuration; - private HornetQServer server; + private ActiveMQServer server; private static final long DELAY = 1000; @@ -130,7 +130,7 @@ public class MultipliedDelayedMessageTest extends ServiceTestBase private ClientMessage createDurableMessage(final ClientSession session, final String body) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, true, 0, System.currentTimeMillis(), (byte) 1); + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, true, 0, System.currentTimeMillis(), (byte) 1); message.getBodyBuffer().writeString(body); return message; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/scheduling/ScheduledMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/scheduling/ScheduledMessageTest.java index 8e59caecdc..e473663127 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/scheduling/ScheduledMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/scheduling/ScheduledMessageTest.java @@ -26,10 +26,10 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.core.transaction.impl.XidImpl; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -52,7 +52,7 @@ public class ScheduledMessageTest extends ServiceTestBase private Configuration configuration; - private HornetQServer server; + private ActiveMQServer server; private ServerLocator locator; @@ -298,7 +298,7 @@ public class ScheduledMessageTest extends ServiceTestBase ClientSession session = sessionFactory.createSession(false, true, false); session.createQueue(atestq, atestq, null, true); ClientProducer producer = session.createProducer(atestq); - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -1011,7 +1011,7 @@ public class ScheduledMessageTest extends ServiceTestBase private ClientMessage createDurableMessage(final ClientSession session, final String body) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, true, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/NettySecurityClientTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/NettySecurityClientTest.java index d90b263b95..a950ae56b8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/NettySecurityClientTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/NettySecurityClientTest.java @@ -17,7 +17,7 @@ import java.io.InputStreamReader; import java.net.URL; import org.apache.activemq.core.config.impl.ConfigurationImpl; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.SpawnedVMSupport; @@ -35,7 +35,7 @@ public class NettySecurityClientTest extends ServiceTestBase private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER; - private HornetQServer messagingService; + private ActiveMQServer messagingService; @Test public void testProducerConsumerClientWithoutSecurityManager() throws Exception diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/SecurityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/SecurityTest.java index f3d62656cf..f8a966afd8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/SecurityTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/SecurityTest.java @@ -39,10 +39,10 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.security.Role; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.settings.HierarchicalRepository; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; import org.apache.activemq.spi.core.security.JAASSecurityManager; import org.apache.activemq.tests.util.CreateMessage; import org.apache.activemq.tests.util.ServiceTestBase; @@ -80,8 +80,8 @@ public class SecurityTest extends ServiceTestBase @Test public void testCreateSessionWithNullUserPass() throws Exception { - HornetQServer server = createServer(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQServer server = createServer(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("guest", "guest"); securityManager.setDefaultUser("guest"); server.start(); @@ -103,18 +103,18 @@ public class SecurityTest extends ServiceTestBase * @return * @throws Exception */ - private HornetQServer createServer() throws Exception + private ActiveMQServer createServer() throws Exception { configuration = createDefaultConfig(false) .setSecurityEnabled(true); - HornetQServer server = createServer(false, configuration); + ActiveMQServer server = createServer(false, configuration); return server; } @Test public void testCreateSessionWithNullUserPassNoGuest() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); ClientSessionFactory cf = createSessionFactory(locator); try @@ -135,8 +135,8 @@ public class SecurityTest extends ServiceTestBase @Test public void testCreateSessionWithCorrectUserWrongPass() throws Exception { - HornetQServer server = createServer(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQServer server = createServer(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("newuser", "apass"); server.start(); ClientSessionFactory cf = createSessionFactory(locator); @@ -159,8 +159,8 @@ public class SecurityTest extends ServiceTestBase @Test public void testCreateSessionWithCorrectUserCorrectPass() throws Exception { - HornetQServer server = createServer(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQServer server = createServer(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("newuser", "apass"); server.start(); ClientSessionFactory cf = createSessionFactory(locator); @@ -180,10 +180,10 @@ public class SecurityTest extends ServiceTestBase @Test public void testCreateDurableQueueWithRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); Role role = new Role("arole", false, false, true, false, false, false, false); Set roles = new HashSet(); @@ -199,11 +199,11 @@ public class SecurityTest extends ServiceTestBase @Test public void testCreateDurableQueueWithoutRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); Role role = new Role("arole", false, false, false, false, false, false, false); Set roles = new HashSet(); @@ -231,10 +231,10 @@ public class SecurityTest extends ServiceTestBase @Test public void testDeleteDurableQueueWithRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); Role role = new Role("arole", false, false, true, true, false, false, false); Set roles = new HashSet(); @@ -251,10 +251,10 @@ public class SecurityTest extends ServiceTestBase @Test public void testDeleteDurableQueueWithoutRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); Role role = new Role("arole", false, false, true, false, false, false, false); Set roles = new HashSet(); @@ -283,11 +283,11 @@ public class SecurityTest extends ServiceTestBase @Test public void testCreateTempQueueWithRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); Role role = new Role("arole", false, false, false, false, true, false, false); Set roles = new HashSet(); @@ -303,11 +303,11 @@ public class SecurityTest extends ServiceTestBase @Test public void testCreateTempQueueWithoutRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); Role role = new Role("arole", false, false, false, false, false, false, false); Set roles = new HashSet(); @@ -335,10 +335,10 @@ public class SecurityTest extends ServiceTestBase @Test public void testDeleteTempQueueWithRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); Role role = new Role("arole", false, false, false, false, true, true, false); Set roles = new HashSet(); @@ -355,10 +355,10 @@ public class SecurityTest extends ServiceTestBase @Test public void testDeleteTempQueueWithoutRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); Role role = new Role("arole", false, false, false, false, true, false, false); Set roles = new HashSet(); @@ -387,13 +387,13 @@ public class SecurityTest extends ServiceTestBase @Test public void testSendWithRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); @@ -454,11 +454,11 @@ public class SecurityTest extends ServiceTestBase @Test public void testSendWithoutRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); Role role = new Role("arole", false, false, true, false, false, false, false); Set roles = new HashSet(); @@ -488,11 +488,11 @@ public class SecurityTest extends ServiceTestBase @Test public void testNonBlockSendWithoutRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); Role role = new Role("arole", false, false, true, false, false, false, false); Set roles = new HashSet(); @@ -513,10 +513,10 @@ public class SecurityTest extends ServiceTestBase @Test public void testCreateConsumerWithRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); securityManager.addUser("guest", "guest"); securityManager.addRole("guest", "guest"); @@ -542,10 +542,10 @@ public class SecurityTest extends ServiceTestBase @Test public void testCreateConsumerWithoutRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); securityManager.addUser("guest", "guest"); securityManager.addRole("guest", "guest"); @@ -585,10 +585,10 @@ public class SecurityTest extends ServiceTestBase Configuration configuration = createDefaultConfig(false) .setSecurityEnabled(true) .setSecurityInvalidationInterval(10000); - HornetQServer server = createServer(false, configuration); + ActiveMQServer server = createServer(false, configuration); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); securityManager.addUser("guest", "guest"); securityManager.addRole("guest", "guest"); @@ -641,11 +641,11 @@ public class SecurityTest extends ServiceTestBase Configuration configuration = createDefaultConfig(false) .setSecurityEnabled(true) .setSecurityInvalidationInterval(0); - HornetQServer server = createServer(false, configuration); + ActiveMQServer server = createServer(false, configuration); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); securityManager.addUser("guest", "guest"); securityManager.addRole("guest", "guest"); @@ -711,10 +711,10 @@ public class SecurityTest extends ServiceTestBase Configuration configuration = createDefaultConfig(false) .setSecurityEnabled(true) .setSecurityInvalidationInterval(-1); - HornetQServer server = createServer(false, configuration); + ActiveMQServer server = createServer(false, configuration); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); securityManager.addUser("guest", "guest"); securityManager.addRole("guest", "guest"); @@ -810,11 +810,11 @@ public class SecurityTest extends ServiceTestBase @Test public void testSendManagementWithRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); Role role = new Role("arole", false, false, false, false, false, false, true); Set roles = new HashSet(); @@ -832,11 +832,11 @@ public class SecurityTest extends ServiceTestBase @Test public void testSendManagementWithoutRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); Role role = new Role("arole", false, false, true, false, false, false, false); Set roles = new HashSet(); @@ -867,11 +867,11 @@ public class SecurityTest extends ServiceTestBase @Test public void testNonBlockSendManagementWithoutRole() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); HierarchicalRepository> securityRepository = server.getSecurityRepository(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("auser", "pass"); Role role = new Role("arole", false, false, true, false, false, false, false); Set roles = new HashSet(); @@ -901,7 +901,7 @@ public class SecurityTest extends ServiceTestBase Configuration configuration = createDefaultConfig(false) .setSecurityEnabled(true); JAASSecurityManager securityManager = new JAASSecurityManager(); - HornetQServer server = createServer(false, configuration, securityManager); + ActiveMQServer server = createServer(false, configuration, securityManager); securityManager.setConfigurationName(domainName); securityManager.setCallbackHandler(new CallbackHandler() @@ -937,7 +937,7 @@ public class SecurityTest extends ServiceTestBase Configuration configuration = createDefaultConfig(false) .setSecurityEnabled(true); JAASSecurityManager securityManager = new JAASSecurityManager(); - HornetQServer server = createServer(false, configuration, securityManager); + ActiveMQServer server = createServer(false, configuration, securityManager); securityManager.setConfigurationName(domainName); securityManager.setCallbackHandler(new CallbackHandler() @@ -972,14 +972,14 @@ public class SecurityTest extends ServiceTestBase @Test public void testComplexRoles() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("all", "all"); - securityManager.addUser("bill", "hornetq"); - securityManager.addUser("andrew", "hornetq1"); - securityManager.addUser("frank", "hornetq2"); - securityManager.addUser("sam", "hornetq3"); + securityManager.addUser("bill", "activemq"); + securityManager.addUser("andrew", "activemq1"); + securityManager.addUser("frank", "activemq2"); + securityManager.addUser("sam", "activemq3"); securityManager.addRole("all", "all"); securityManager.addRole("bill", "user"); securityManager.addRole("andrew", "europe-user"); @@ -1040,7 +1040,7 @@ public class SecurityTest extends ServiceTestBase // Step 5. bill tries to make a connection using wrong password try { - billConnection = factory.createSession("bill", "hornetq1", false, true, true, false, -1); + billConnection = factory.createSession("bill", "activemq1", false, true, true, false, -1); Assert.fail("should throw exception"); } catch (ActiveMQSecurityException se) @@ -1053,16 +1053,16 @@ public class SecurityTest extends ServiceTestBase } // Step 6. bill makes a good connection. - billConnection = factory.createSession("bill", "hornetq", false, true, true, false, -1); + billConnection = factory.createSession("bill", "activemq", false, true, true, false, -1); // Step 7. andrew makes a good connection. - andrewConnection = factory.createSession("andrew", "hornetq1", false, true, true, false, -1); + andrewConnection = factory.createSession("andrew", "activemq1", false, true, true, false, -1); // Step 8. frank makes a good connection. - frankConnection = factory.createSession("frank", "hornetq2", false, true, true, false, -1); + frankConnection = factory.createSession("frank", "activemq2", false, true, true, false, -1); // Step 9. sam makes a good connection. - samConnection = factory.createSession("sam", "hornetq3", false, true, true, false, -1); + samConnection = factory.createSession("sam", "activemq3", false, true, true, false, -1); checkUserSendAndReceive(genericQueueName, billConnection); checkUserSendAndReceive(genericQueueName, andrewConnection); @@ -1111,14 +1111,14 @@ public class SecurityTest extends ServiceTestBase public void _testComplexRoles2() throws Exception { - HornetQServer server = createServer(); + ActiveMQServer server = createServer(); server.start(); - HornetQSecurityManager securityManager = server.getSecurityManager(); + ActiveMQSecurityManager securityManager = server.getSecurityManager(); securityManager.addUser("all", "all"); - securityManager.addUser("bill", "hornetq"); - securityManager.addUser("andrew", "hornetq1"); - securityManager.addUser("frank", "hornetq2"); - securityManager.addUser("sam", "hornetq3"); + securityManager.addUser("bill", "activemq"); + securityManager.addUser("andrew", "activemq1"); + securityManager.addUser("frank", "activemq2"); + securityManager.addUser("sam", "activemq3"); securityManager.addRole("all", "all"); securityManager.addRole("bill", "user"); securityManager.addRole("andrew", "europe-user"); @@ -1179,7 +1179,7 @@ public class SecurityTest extends ServiceTestBase // Step 5. bill tries to make a connection using wrong password try { - billConnection = factory.createSession("bill", "hornetq1", false, true, true, false, -1); + billConnection = factory.createSession("bill", "activemq1", false, true, true, false, -1); Assert.fail("should throw exception"); } catch (ActiveMQSecurityException se) @@ -1192,16 +1192,16 @@ public class SecurityTest extends ServiceTestBase } // Step 6. bill makes a good connection. - billConnection = factory.createSession("bill", "hornetq", false, true, true, false, -1); + billConnection = factory.createSession("bill", "activemq", false, true, true, false, -1); // Step 7. andrew makes a good connection. - andrewConnection = factory.createSession("andrew", "hornetq1", false, true, true, false, -1); + andrewConnection = factory.createSession("andrew", "activemq1", false, true, true, false, -1); // Step 8. frank makes a good connection. - frankConnection = factory.createSession("frank", "hornetq2", false, true, true, false, -1); + frankConnection = factory.createSession("frank", "activemq2", false, true, true, false, -1); // Step 9. sam makes a good connection. - samConnection = factory.createSession("sam", "hornetq3", false, true, true, false, -1); + samConnection = factory.createSession("sam", "activemq3", false, true, true, false, -1); checkUserSendAndReceive(genericQueueName, billConnection); checkUserSendAndReceive(genericQueueName, andrewConnection); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/SimpleClient.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/SimpleClient.java index e590b9e795..6dc601df53 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/SimpleClient.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/SimpleClient.java @@ -18,9 +18,9 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.util.RandomUtil; /** @@ -44,7 +44,7 @@ final class SimpleClient String queueName = RandomUtil.randomString(); String messageText = RandomUtil.randomString(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(connectorFactoryClassName)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(connectorFactoryClassName)); try { ClientSessionFactory sf = locator.createSessionFactory(); @@ -54,7 +54,7 @@ final class SimpleClient ClientProducer producer = session.createProducer(queueName); ClientConsumer consumer = session.createConsumer(queueName); - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/AddressFullLoggingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/AddressFullLoggingTest.java index 4a4d26a827..c07c25d446 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/AddressFullLoggingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/AddressFullLoggingTest.java @@ -26,7 +26,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.logging.AssertionLoggerHandler; @@ -56,7 +56,7 @@ public class AddressFullLoggingTest extends ServiceTestBase final String MY_ADDRESS = "myAddress"; final String MY_QUEUE = "myQueue"; - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); AddressSettings defaultSetting = new AddressSettings(); defaultSetting.setPageSizeBytes(10 * 1024); @@ -130,8 +130,8 @@ public class AddressFullLoggingTest extends ServiceTestBase server.stop(); // Using the code only so the test doesn't fail just because someone edits the log text - Assert.assertTrue("Expected to find HQ222183", AssertionLoggerHandler.findText("HQ222183", "myAddress")); - Assert.assertTrue("Expected to find HQ221046", AssertionLoggerHandler.findText("HQ221046", "myAddress")); + Assert.assertTrue("Expected to find AMQ222183", AssertionLoggerHandler.findText("AMQ222183", "myAddress")); + Assert.assertTrue("Expected to find AMQ221046", AssertionLoggerHandler.findText("AMQ221046", "myAddress")); } @AfterClass diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/ExpiryRunnerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/ExpiryRunnerTest.java index b8c47a03d3..773da18bf2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/ExpiryRunnerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/ExpiryRunnerTest.java @@ -31,11 +31,11 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.impl.ConfigurationImpl; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.UnitTestCase; @@ -45,7 +45,7 @@ import org.apache.activemq.tests.util.UnitTestCase; */ public class ExpiryRunnerTest extends UnitTestCase { - private HornetQServer server; + private ActiveMQServer server; private ClientSession clientSession; @@ -265,11 +265,11 @@ public class ExpiryRunnerTest extends UnitTestCase ConfigurationImpl configuration = createBasicConfig() .setMessageExpiryScanPeriod(1000) .addAcceptorConfiguration(new TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY)); - server = HornetQServers.newHornetQServer(configuration, false); + server = ActiveMQServers.newActiveMQServer(configuration, false); // start the server server.start(); // then we create a client as normal - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); locator.setBlockOnAcknowledge(true); ClientSessionFactory sessionFactory = createSessionFactory(locator); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/FileLockTimeoutTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/FileLockTimeoutTest.java index 35d64bf6c9..6f98cba135 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/FileLockTimeoutTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/FileLockTimeoutTest.java @@ -20,7 +20,7 @@ import java.util.concurrent.TimeUnit; import org.apache.activemq.core.asyncio.impl.AsynchronousFileImpl; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.JournalType; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.logging.AssertionLoggerHandler; @@ -56,7 +56,7 @@ public class FileLockTimeoutTest extends ServiceTestBase .setHAPolicyConfiguration(new SharedStoreMasterPolicyConfiguration()) .clearAcceptorConfigurations(); - HornetQServer server1 = createServer(true, config); + ActiveMQServer server1 = createServer(true, config); if (useAIO) { server1.getConfiguration().setJournalType(JournalType.ASYNCIO); @@ -67,7 +67,7 @@ public class FileLockTimeoutTest extends ServiceTestBase } server1.start(); server1.waitForActivation(10, TimeUnit.SECONDS); - final HornetQServer server2 = createServer(true, config); + final ActiveMQServer server2 = createServer(true, config); if (useAIO) { server2.getConfiguration().setJournalType(JournalType.ASYNCIO); @@ -109,7 +109,7 @@ public class FileLockTimeoutTest extends ServiceTestBase service.shutdown(); - assertTrue("Expected to find HQ224000", AssertionLoggerHandler.findText("HQ224000")); + assertTrue("Expected to find AMQ224000", AssertionLoggerHandler.findText("AMQ224000")); assertTrue("Expected to find \"timed out waiting for lock\"", AssertionLoggerHandler.findText("timed out waiting for lock")); } } \ No newline at end of file diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/LVQRecoveryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/LVQRecoveryTest.java index e25ca46589..d7c1c810b2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/LVQRecoveryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/LVQRecoveryTest.java @@ -24,10 +24,10 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.core.transaction.impl.XidImpl; import org.apache.activemq.tests.util.ServiceTestBase; @@ -42,7 +42,7 @@ import org.junit.Test; */ public class LVQRecoveryTest extends ServiceTestBase { - private HornetQServer server; + private ActiveMQServer server; private ClientSession clientSession; @@ -230,7 +230,7 @@ public class LVQRecoveryTest extends ServiceTestBase qs.setLastValueQueue(true); server.getAddressSettingsRepository().addMatch(address.toString(), qs); // then we create a client as normal - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); locator.setBlockOnAcknowledge(true); locator.setAckBatchSize(0); @@ -254,7 +254,7 @@ public class LVQRecoveryTest extends ServiceTestBase server.getAddressSettingsRepository().addMatch(address.toString(), qs1); // then we create a client as normal locator.close(); - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); locator.setBlockOnAcknowledge(true); locator.setAckBatchSize(0); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/LVQTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/LVQTest.java index ba08b158b2..3356b8a526 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/LVQTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/LVQTest.java @@ -28,11 +28,11 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.impl.ConfigurationImpl; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.UnitTestCase; @@ -41,7 +41,7 @@ import org.apache.activemq.tests.util.UnitTestCase; */ public class LVQTest extends UnitTestCase { - private HornetQServer server; + private ActiveMQServer server; private ClientSession clientSession; @@ -675,7 +675,7 @@ public class LVQTest extends UnitTestCase ConfigurationImpl configuration = createBasicConfig() .addAcceptorConfiguration(new TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY)); - server = HornetQServers.newHornetQServer(configuration, false); + server = ActiveMQServers.newActiveMQServer(configuration, false); // start the server server.start(); @@ -683,7 +683,7 @@ public class LVQTest extends UnitTestCase qs.setLastValueQueue(true); server.getAddressSettingsRepository().addMatch(address.toString(), qs); // then we create a client as normalServer - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY)); locator.setBlockOnAcknowledge(true); locator.setAckBatchSize(0); ClientSessionFactory sessionFactory = createSessionFactory(locator); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/PredefinedQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/PredefinedQueueTest.java index 74fc5fbc0e..235abe682e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/PredefinedQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/PredefinedQueueTest.java @@ -24,13 +24,13 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.CoreQueueConfiguration; import org.apache.activemq.core.postoffice.Bindings; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; @@ -80,11 +80,11 @@ public class PredefinedQueueTest extends ServiceTestBase conf.setQueueConfigurations(queueConfs); - HornetQServer server = HornetQServers.newHornetQServer(conf, false); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, false); server.start(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -168,7 +168,7 @@ public class PredefinedQueueTest extends ServiceTestBase conf.setQueueConfigurations(queueConfs); - HornetQServer server = HornetQServers.newHornetQServer(conf, false); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, false); server.start(); @@ -178,7 +178,7 @@ public class PredefinedQueueTest extends ServiceTestBase Assert.assertEquals(2, bindings.getBindings() .size()); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -243,11 +243,11 @@ public class PredefinedQueueTest extends ServiceTestBase final String queueName3 = "queue3"; - HornetQServer server = addServer(HornetQServers.newHornetQServer(conf)); + ActiveMQServer server = addServer(ActiveMQServers.newActiveMQServer(conf)); server.start(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); @@ -372,7 +372,7 @@ public class PredefinedQueueTest extends ServiceTestBase conf.setQueueConfigurations(queueConfs); - HornetQServer server = addServer(HornetQServers.newHornetQServer(conf)); + ActiveMQServer server = addServer(ActiveMQServers.newActiveMQServer(conf)); server.start(); @@ -466,11 +466,11 @@ public class PredefinedQueueTest extends ServiceTestBase conf.setQueueConfigurations(queueConfs); - HornetQServer server = HornetQServers.newHornetQServer(conf, false); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, false); server.start(); - ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY)); + ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY)); ClientSessionFactory sf = createSessionFactory(locator); 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 97380f282a..8d1ef79f9f 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 @@ -18,7 +18,7 @@ import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.core.config.ScaleDownConfiguration; import org.apache.activemq.core.config.ha.LiveOnlyPolicyConfiguration; import org.apache.activemq.core.persistence.impl.journal.JournalStorageManager; @@ -143,12 +143,12 @@ public class ScaleDown3NodeTest extends ClusterTestBase fileMessage.setMessageID(1005); fileMessage.setDurable(true); - for (int i = 0; i < 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) + for (int i = 0; i < 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) { fileMessage.addBytes(new byte[]{UnitTestCase.getSamplebyte(i)}); } - fileMessage.putLongProperty(Message.HDR_LARGE_BODY_SIZE, 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + fileMessage.putLongProperty(Message.HDR_LARGE_BODY_SIZE, 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); fileMessage.releaseResources(); @@ -246,9 +246,9 @@ public class ScaleDown3NodeTest extends ClusterTestBase Assert.assertNotNull(clientMessage); if (large) { - Assert.assertEquals(2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, clientMessage.getBodySize()); + Assert.assertEquals(2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, clientMessage.getBodySize()); - for (int j = 0; j < 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; j++) + for (int j = 0; j < 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; j++) { Assert.assertEquals(UnitTestCase.getSamplebyte(j), clientMessage.getBodyBuffer().readByte()); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/ScaleDownTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/ScaleDownTest.java index 4027f06bb4..86b72c0736 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/ScaleDownTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/ScaleDownTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.core.config.ScaleDownConfiguration; import org.apache.activemq.core.config.ha.LiveOnlyPolicyConfiguration; import org.apache.activemq.core.persistence.impl.journal.JournalStorageManager; @@ -383,12 +383,12 @@ public class ScaleDownTest extends ClusterTestBase fileMessage.setMessageID(1005); fileMessage.setDurable(true); - for (int i = 0; i < 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) + for (int i = 0; i < 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) { fileMessage.addBytes(new byte[]{UnitTestCase.getSamplebyte(i)}); } - fileMessage.putLongProperty(Message.HDR_LARGE_BODY_SIZE, 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + fileMessage.putLongProperty(Message.HDR_LARGE_BODY_SIZE, 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); fileMessage.releaseResources(); @@ -409,9 +409,9 @@ public class ScaleDownTest extends ClusterTestBase Assert.assertNotNull(msg); - Assert.assertEquals(2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, msg.getBodySize()); + Assert.assertEquals(2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, msg.getBodySize()); - for (int i = 0; i < 2 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) + for (int i = 0; i < 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++) { Assert.assertEquals(UnitTestCase.getSamplebyte(i), msg.getBodyBuffer().readByte()); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/SuppliedThreadPoolTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/SuppliedThreadPoolTest.java index d6d78b93cd..576816ade7 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/SuppliedThreadPoolTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/server/SuppliedThreadPoolTest.java @@ -21,8 +21,8 @@ import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.ServiceRegistry; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.After; @@ -35,7 +35,7 @@ import org.junit.Test; public class SuppliedThreadPoolTest extends UnitTestCase { - private HornetQServer server; + private ActiveMQServer server; private Thread serverThread; @@ -46,7 +46,7 @@ public class SuppliedThreadPoolTest extends UnitTestCase serviceRegistry = new ServiceRegistry(); serviceRegistry.setExecutorService(Executors.newFixedThreadPool(1)); serviceRegistry.setScheduledExecutorService(Executors.newScheduledThreadPool(1)); - server = new HornetQServerImpl(null, null, null, null, serviceRegistry); + server = new ActiveMQServerImpl(null, null, null, null, serviceRegistry); server.start(); server.waitForActivation(100, TimeUnit.MILLISECONDS); } @@ -86,7 +86,7 @@ public class SuppliedThreadPoolTest extends UnitTestCase assertNotNull(threadPool); assertNotNull(scheduledExecutorService); - // Ensure that HornetQ does not shutdown supplied thread pools. + // Ensure that ActiveMQ does not shutdown supplied thread pools. assertFalse(threadPool.isShutdown()); assertFalse(scheduledExecutorService.isShutdown()); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/spring/SpringIntegrationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/spring/SpringIntegrationTest.java index f12eac67ed..3c06c6192e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/spring/SpringIntegrationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/spring/SpringIntegrationTest.java @@ -14,7 +14,7 @@ package org.apache.activemq.tests.integration.spring; import java.util.concurrent.TimeUnit; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.jms.server.embedded.EmbeddedJMS; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.UnitTestCase; @@ -56,7 +56,7 @@ public class SpringIntegrationTest extends UnitTestCase ExampleListener.latch.await(10, TimeUnit.SECONDS); Thread.sleep(500); Assert.assertEquals(ExampleListener.lastMessage, "Hello world"); - ((HornetQConnectionFactory) sender.getConnectionFactory()).close(); + ((ActiveMQConnectionFactory) sender.getConnectionFactory()).close(); } finally { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ssl/CoreClientOverOneWaySSLTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ssl/CoreClientOverOneWaySSLTest.java index 8a631e8357..566d0f5957 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ssl/CoreClientOverOneWaySSLTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ssl/CoreClientOverOneWaySSLTest.java @@ -30,12 +30,12 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; import org.apache.activemq.core.remoting.impl.ssl.SSLSupport; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.ServiceTestBase; @@ -73,21 +73,21 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase /** These artifacts are required for testing 1-way SSL * * Commands to create the JKS artifacts: - * keytool -genkey -keystore server-side-keystore.jks -storepass secureexample -keypass secureexample -dname "CN=HornetQ, OU=HornetQ, O=HornetQ, L=HornetQ, S=HornetQ, C=HQ" - * keytool -export -keystore server-side-keystore.jks -file hornetq-jks.cer -storepass secureexample - * keytool -import -keystore client-side-truststore.jks -file hornetq-jks.cer -storepass secureexample -keypass secureexample -noprompt + * keytool -genkey -keystore server-side-keystore.jks -storepass secureexample -keypass secureexample -dname "CN=ActiveMQ, OU=ActiveMQ, O=ActiveMQ, L=ActiveMQ, S=ActiveMQ, C=AMQ" + * keytool -export -keystore server-side-keystore.jks -file activemq-jks.cer -storepass secureexample + * keytool -import -keystore client-side-truststore.jks -file activemq-jks.cer -storepass secureexample -keypass secureexample -noprompt * * Commands to create the JCEKS artifacts: - * keytool -genkey -keystore server-side-keystore.jceks -storetype JCEKS -storepass secureexample -keypass secureexample -dname "CN=HornetQ, OU=HornetQ, O=HornetQ, L=HornetQ, S=HornetQ, C=HQ" - * keytool -export -keystore server-side-keystore.jceks -file hornetq-jceks.cer -storetype jceks -storepass secureexample - * keytool -import -keystore client-side-truststore.jceks -storetype JCEKS -file hornetq-jceks.cer -storepass secureexample -keypass secureexample -noprompt + * keytool -genkey -keystore server-side-keystore.jceks -storetype JCEKS -storepass secureexample -keypass secureexample -dname "CN=ActiveMQ, OU=ActiveMQ, O=ActiveMQ, L=ActiveMQ, S=ActiveMQ, C=AMQ" + * keytool -export -keystore server-side-keystore.jceks -file activemq-jceks.cer -storetype jceks -storepass secureexample + * keytool -import -keystore client-side-truststore.jceks -storetype JCEKS -file activemq-jceks.cer -storepass secureexample -keypass secureexample -noprompt */ private static String storeType; private static String SERVER_SIDE_KEYSTORE; private static String CLIENT_SIDE_TRUSTSTORE; private static final String PASSWORD = "secureexample"; - private HornetQServer server; + private ActiveMQServer server; private TransportConfiguration tc; @@ -102,7 +102,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase tc.getParams().put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, CLIENT_SIDE_TRUSTSTORE); tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); ClientSessionFactory sf = addSessionFactory(createSessionFactory(locator)); ClientSession session = addClientSession(sf.createSession(false, true, true)); session.createQueue(CoreClientOverOneWaySSLTest.QUEUE, CoreClientOverOneWaySSLTest.QUEUE, false); @@ -129,7 +129,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD); tc.getParams().put(TransportConstants.ENABLED_CIPHER_SUITES_PROP_NAME, "myBadCipherSuite"); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); try { createSessionFactory(locator); @@ -150,7 +150,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase tc.getParams().put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, CLIENT_SIDE_TRUSTSTORE); tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); try { createSessionFactory(locator); @@ -173,7 +173,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase tc.getParams().put(TransportConstants.ENABLED_CIPHER_SUITES_PROP_NAME, getEnabledCipherSuites()[1]); tc.getParams().put(TransportConstants.ENABLED_PROTOCOLS_PROP_NAME, "TLSv1.2"); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); try { createSessionFactory(locator); @@ -195,7 +195,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD); tc.getParams().put(TransportConstants.ENABLED_PROTOCOLS_PROP_NAME, "myBadProtocol"); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); try { createSessionFactory(locator); @@ -216,7 +216,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase tc.getParams().put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, CLIENT_SIDE_TRUSTSTORE); tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); try { createSessionFactory(locator); @@ -238,7 +238,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD); tc.getParams().put(TransportConstants.ENABLED_PROTOCOLS_PROP_NAME, "TLSv1.2"); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); try { createSessionFactory(locator); @@ -261,7 +261,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD); tc.getParams().put(TransportConstants.ENABLED_PROTOCOLS_PROP_NAME, "SSLv3"); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); try { createSessionFactory(locator); @@ -286,7 +286,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase tc.getParams().put(TransportConstants.ENABLED_CIPHER_SUITES_PROP_NAME, getSuitableCipherSuite()); tc.getParams().put(TransportConstants.ENABLED_PROTOCOLS_PROP_NAME, "TLSv1.2"); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); ClientSessionFactory sf = null; try { @@ -324,7 +324,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD); tc.getParams().put(TransportConstants.ENABLED_PROTOCOLS_PROP_NAME, "TLSv1.2"); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); ClientSessionFactory sf = null; try { @@ -362,7 +362,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD); tc.getParams().put(TransportConstants.ENABLED_PROTOCOLS_PROP_NAME, "TLSv1"); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); ClientSessionFactory sf = null; try { @@ -400,7 +400,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase tc.getParams().put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, CLIENT_SIDE_TRUSTSTORE); tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); ClientSessionFactory sf = null; try { @@ -473,7 +473,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase createCustomSslServer(); tc.getParams().put(TransportConstants.SSL_ENABLED_PROP_NAME, true); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); try { createSessionFactory(locator); @@ -498,7 +498,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase tc.getParams().put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, CLIENT_SIDE_TRUSTSTORE); tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "invalid password"); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); try { ClientSessionFactory sf = createSessionFactory(locator); @@ -522,7 +522,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase tc.getParams().put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, "incorrect path"); tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); try { ClientSessionFactory sf = createSessionFactory(locator); @@ -545,7 +545,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase createCustomSslServer(); tc.getParams().put(TransportConstants.SSL_ENABLED_PROP_NAME, false); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); locator.setCallTimeout(2000); try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java index 3d6211bb96..9a7c03ac35 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java @@ -30,14 +30,14 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.core.remoting.impl.netty.NettyConnection; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.ServiceTestBase; @@ -77,14 +77,14 @@ public class CoreClientOverTwoWaySSLTest extends ServiceTestBase /** These artifacts are required for testing 2-way SSL * * Commands to create the JKS artifacts: - * keytool -genkey -keystore client-side-keystore.jks -storepass secureexample -keypass secureexample -dname "CN=HornetQ, OU=HornetQ, O=HornetQ, L=HornetQ, S=HornetQ, C=HQ" - * keytool -export -keystore client-side-keystore.jks -file hornetq-jks.cer -storepass secureexample - * keytool -import -keystore server-side-truststore.jks -file hornetq-jks.cer -storepass secureexample -keypass secureexample -noprompt + * keytool -genkey -keystore client-side-keystore.jks -storepass secureexample -keypass secureexample -dname "CN=ActiveMQ, OU=ActiveMQ, O=ActiveMQ, L=ActiveMQ, S=ActiveMQ, C=AMQ" + * keytool -export -keystore client-side-keystore.jks -file activemq-jks.cer -storepass secureexample + * keytool -import -keystore server-side-truststore.jks -file activemq-jks.cer -storepass secureexample -keypass secureexample -noprompt * * Commands to create the JCEKS artifacts: - * keytool -genkey -keystore client-side-keystore.jceks -storetype JCEKS -storepass secureexample -keypass secureexample -dname "CN=HornetQ, OU=HornetQ, O=HornetQ, L=HornetQ, S=HornetQ, C=HQ" - * keytool -export -keystore client-side-keystore.jceks -file hornetq-jceks.cer -storetype jceks -storepass secureexample - * keytool -import -keystore server-side-truststore.jceks -storetype JCEKS -file hornetq-jceks.cer -storepass secureexample -keypass secureexample -noprompt + * keytool -genkey -keystore client-side-keystore.jceks -storetype JCEKS -storepass secureexample -keypass secureexample -dname "CN=ActiveMQ, OU=ActiveMQ, O=ActiveMQ, L=ActiveMQ, S=ActiveMQ, C=AMQ" + * keytool -export -keystore client-side-keystore.jceks -file activemq-jceks.cer -storetype jceks -storepass secureexample + * keytool -import -keystore server-side-truststore.jceks -storetype JCEKS -file activemq-jceks.cer -storepass secureexample -keypass secureexample -noprompt */ private static String storeType; @@ -94,7 +94,7 @@ public class CoreClientOverTwoWaySSLTest extends ServiceTestBase private static String CLIENT_SIDE_KEYSTORE; private static final String PASSWORD = "secureexample"; - private HornetQServer server; + private ActiveMQServer server; private TransportConfiguration tc; @@ -140,7 +140,7 @@ public class CoreClientOverTwoWaySSLTest extends ServiceTestBase server.getRemotingService().addIncomingInterceptor(new MyInterceptor()); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); ClientSessionFactory sf = createSessionFactory(locator); ClientSession session = sf.createSession(false, true, true); session.createQueue(CoreClientOverTwoWaySSLTest.QUEUE, CoreClientOverTwoWaySSLTest.QUEUE, false); @@ -165,7 +165,7 @@ public class CoreClientOverTwoWaySSLTest extends ServiceTestBase tc.getParams().put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, CLIENT_SIDE_TRUSTSTORE); tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(tc)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc)); try { createSessionFactory(locator); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/ExtraStompTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/ExtraStompTest.java index a3800d01c3..74e1659d7a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/ExtraStompTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/ExtraStompTest.java @@ -21,15 +21,15 @@ import java.util.HashMap; import java.util.Map; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.protocol.stomp.Stomp; import org.apache.activemq.core.protocol.stomp.StompProtocolManagerFactory; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.config.JMSConfiguration; import org.apache.activemq.jms.server.config.impl.JMSConfigurationImpl; @@ -207,7 +207,7 @@ public class ExtraStompTest extends StompTestBase setUpAfterServer(); - int msgSize = 3 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; + int msgSize = 3 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; char[] contents = new char[msgSize]; for (int i = 0; i < msgSize; i++) { @@ -349,7 +349,7 @@ public class ExtraStompTest extends StompTestBase setUpAfterServer(); - int msgSize = 3 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; + int msgSize = 3 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; char[] contents = new char[msgSize]; for (int i = 0; i < msgSize; i++) { @@ -414,8 +414,8 @@ public class ExtraStompTest extends StompTestBase setUpAfterServer(true); - TestLargeMessageInputStream input = new TestLargeMessageInputStream(HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, true); - LargeMessageTestBase.adjustLargeCompression(true, input, HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + TestLargeMessageInputStream input = new TestLargeMessageInputStream(ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, true); + LargeMessageTestBase.adjustLargeCompression(true, input, ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); char[] contents = input.toArray(); String msg = new String(contents); @@ -486,8 +486,8 @@ public class ExtraStompTest extends StompTestBase setUpAfterServer(true); - TestLargeMessageInputStream input = new TestLargeMessageInputStream(HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, true); - LargeMessageTestBase.adjustLargeCompression(true, input, HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + TestLargeMessageInputStream input = new TestLargeMessageInputStream(ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, true); + LargeMessageTestBase.adjustLargeCompression(true, input, ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); char[] contents = input.toArray(); String msg = new String(contents); @@ -549,9 +549,9 @@ public class ExtraStompTest extends StompTestBase setUpAfterServer(true); - TestLargeMessageInputStream input = new TestLargeMessageInputStream(HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, true); - input.setSize(10 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); - LargeMessageTestBase.adjustLargeCompression(false, input, 10 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + TestLargeMessageInputStream input = new TestLargeMessageInputStream(ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, true); + input.setSize(10 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + LargeMessageTestBase.adjustLargeCompression(false, input, 10 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); char[] contents = input.toArray(); String msg = new String(contents); @@ -613,9 +613,9 @@ public class ExtraStompTest extends StompTestBase setUpAfterServer(true); - TestLargeMessageInputStream input = new TestLargeMessageInputStream(HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, true); - input.setSize(10 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); - LargeMessageTestBase.adjustLargeCompression(false, input, 10 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + TestLargeMessageInputStream input = new TestLargeMessageInputStream(ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, true); + input.setSize(10 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + LargeMessageTestBase.adjustLargeCompression(false, input, 10 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); char[] contents = input.toArray(); String msg = new String(contents); @@ -689,7 +689,7 @@ public class ExtraStompTest extends StompTestBase .addAcceptorConfiguration(stompTransport) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - HornetQServer hornetQServer = HornetQServers.newHornetQServer(config, defUser, defPass); + ActiveMQServer activeMQServer = ActiveMQServers.newActiveMQServer(config, defUser, defPass); JMSConfiguration jmsConfig = new JMSConfigurationImpl(); jmsConfig.getQueueConfigurations().add(new JMSQueueConfigurationImpl() @@ -698,7 +698,7 @@ public class ExtraStompTest extends StompTestBase jmsConfig.getTopicConfigurations().add(new TopicConfigurationImpl() .setName(getTopicName()) .setBindings(getTopicName())); - server = new JMSServerManagerImpl(hornetQServer, jmsConfig); + server = new JMSServerManagerImpl(activeMQServer, jmsConfig); server.setContext(new InVMNamingContext()); return server; } @@ -736,7 +736,7 @@ public class ExtraStompTest extends StompTestBase while (enu.hasMoreElements()) { Message msg = (Message) enu.nextElement(); - String msgId = msg.getStringProperty("hqMessageId"); + String msgId = msg.getStringProperty("amqMessageId"); if (enable != null && enable.booleanValue()) { assertNotNull(msgId); @@ -795,7 +795,7 @@ public class ExtraStompTest extends StompTestBase .addAcceptorConfiguration(stompTransport) .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY)); - HornetQServer hornetQServer = addServer(HornetQServers.newHornetQServer(config, defUser, defPass)); + ActiveMQServer activeMQServer = addServer(ActiveMQServers.newActiveMQServer(config, defUser, defPass)); JMSConfiguration jmsConfig = new JMSConfigurationImpl(); jmsConfig.getQueueConfigurations().add(new JMSQueueConfigurationImpl() @@ -805,7 +805,7 @@ public class ExtraStompTest extends StompTestBase jmsConfig.getTopicConfigurations().add(new TopicConfigurationImpl() .setName(getTopicName()) .setBindings(getTopicName())); - server = new JMSServerManagerImpl(hornetQServer, jmsConfig); + server = new JMSServerManagerImpl(activeMQServer, jmsConfig); server.setContext(new InVMNamingContext()); return server; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/StompConnectionCleanupTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/StompConnectionCleanupTest.java index 2d5a7e5d22..652e842a8d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/StompConnectionCleanupTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/StompConnectionCleanupTest.java @@ -63,9 +63,9 @@ public class StompConnectionCleanupTest extends StompTestBase while (true) { - int connCount = server.getHornetQServer().getRemotingService().getConnections().size(); + int connCount = server.getActiveMQServer().getRemotingService().getConnections().size(); - int sessionCount = server.getHornetQServer().getSessions().size(); + int sessionCount = server.getActiveMQServer().getSessions().size(); // All connections and sessions should be timed out including STOMP + JMS connection @@ -126,7 +126,7 @@ public class StompConnectionCleanupTest extends StompTestBase { JMSServerManager s = super.createServer(); - s.getHornetQServer().getConfiguration().setConnectionTTLOverride(CONNECTION_TTL); + s.getActiveMQServer().getConfiguration().setConnectionTTLOverride(CONNECTION_TTL); return s; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/StompTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/StompTestBase.java index 83d07837bb..45713dddb4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/StompTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/StompTestBase.java @@ -52,10 +52,10 @@ import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQJMSConnectionFactory; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.config.JMSConfiguration; import org.apache.activemq.jms.server.config.impl.JMSConfigurationImpl; @@ -170,9 +170,9 @@ public abstract class StompTestBase extends UnitTestCase protected void setUpAfterServer(boolean jmsCompressLarge) throws Exception { connectionFactory = createConnectionFactory(); - HornetQConnectionFactory hqFact = (HornetQConnectionFactory) connectionFactory; + ActiveMQConnectionFactory activeMQConnectionFactory = (ActiveMQConnectionFactory) connectionFactory; - hqFact.setCompressLargeMessage(jmsCompressLarge); + activeMQConnectionFactory.setCompressLargeMessage(jmsCompressLarge); createBootstrap(); connection = connectionFactory.createConnection(); @@ -200,7 +200,7 @@ public abstract class StompTestBase extends UnitTestCase .addAcceptorConfiguration(stompTransport) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - HornetQServer hornetQServer = HornetQServers.newHornetQServer(config, defUser, defPass); + ActiveMQServer activeMQServer = ActiveMQServers.newActiveMQServer(config, defUser, defPass); JMSConfiguration jmsConfig = new JMSConfigurationImpl(); jmsConfig.getQueueConfigurations().add(new JMSQueueConfigurationImpl() @@ -210,7 +210,7 @@ public abstract class StompTestBase extends UnitTestCase jmsConfig.getTopicConfigurations().add(new TopicConfigurationImpl() .setName(getTopicName()) .setBindings(getTopicName())); - server = new JMSServerManagerImpl(hornetQServer, jmsConfig); + server = new JMSServerManagerImpl(activeMQServer, jmsConfig); server.setContext(new InVMNamingContext()); return server; } @@ -261,7 +261,7 @@ public abstract class StompTestBase extends UnitTestCase protected ConnectionFactory createConnectionFactory() { - return new HornetQJMSConnectionFactory(false, new TransportConfiguration(InVMConnectorFactory.class.getName())); + return new ActiveMQJMSConnectionFactory(false, new TransportConfiguration(InVMConnectorFactory.class.getName())); } protected Socket createSocket() throws IOException diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/StompWebSocketTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/StompWebSocketTest.java index ef523c1bb7..72b31e67c1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/StompWebSocketTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/StompWebSocketTest.java @@ -22,8 +22,8 @@ import org.apache.activemq.core.protocol.stomp.StompProtocolManagerFactory; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.config.JMSConfiguration; import org.apache.activemq.jms.server.config.impl.JMSConfigurationImpl; @@ -77,10 +77,10 @@ public class StompWebSocketTest extends UnitTestCase .setName(getQueueName()) .setDurable(false)); - HornetQServer hornetQServer = addServer(HornetQServers.newHornetQServer(config)); + ActiveMQServer activeMQServer = addServer(ActiveMQServers.newActiveMQServer(config)); JMSConfiguration jmsConfig = new JMSConfigurationImpl(); - server = new JMSServerManagerImpl(hornetQServer, jmsConfig); + server = new JMSServerManagerImpl(activeMQServer, jmsConfig); server.setContext(null); return server; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v11/ExtraStompTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v11/ExtraStompTest.java index b0335cafaf..ee164b0d05 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v11/ExtraStompTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v11/ExtraStompTest.java @@ -216,7 +216,7 @@ public class ExtraStompTest extends StompV11TestBase assertEquals("Hello World", frame.getBody()); - //if hornetq sends trailing garbage bytes, the second message + //if activemq sends trailing garbage bytes, the second message //will not be normal frame = connV10.receiveFrame(10000); @@ -321,7 +321,7 @@ public class ExtraStompTest extends StompV11TestBase assertEquals("Hello World", frame.getBody()); - //if hornetq sends trailing garbage bytes, the second message + //if activemq sends trailing garbage bytes, the second message //will not be normal frame = connV11.receiveFrame(10000); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v11/StompV11Test.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v11/StompV11Test.java index 860464b596..2923f35159 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v11/StompV11Test.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v11/StompV11Test.java @@ -74,7 +74,7 @@ public class StompV11Test extends StompV11TestBase @Test public void testConnection() throws Exception { - server.getHornetQServer().getConfiguration().setSecurityEnabled(true); + server.getActiveMQServer().getConfiguration().setSecurityEnabled(true); StompClientConnection connection = StompClientConnectionFactory.createClientConnection("1.0", hostname, port); connection.connect(defUser, defPass); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v11/StompV11TestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v11/StompV11TestBase.java index da4c1061ea..91718bcaf1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v11/StompV11TestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v11/StompV11TestBase.java @@ -35,9 +35,9 @@ import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQJMSConnectionFactory; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.config.JMSConfiguration; import org.apache.activemq.jms.server.config.impl.JMSConfigurationImpl; @@ -107,7 +107,7 @@ public abstract class StompV11TestBase extends UnitTestCase .addAcceptorConfiguration(stompTransport) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); - HornetQServer hornetQServer = addServer(HornetQServers.newHornetQServer(config, defUser, defPass)); + ActiveMQServer activeMQServer = addServer(ActiveMQServers.newActiveMQServer(config, defUser, defPass)); JMSConfiguration jmsConfig = new JMSConfigurationImpl(); jmsConfig.getQueueConfigurations().add(new JMSQueueConfigurationImpl() @@ -116,7 +116,7 @@ public abstract class StompV11TestBase extends UnitTestCase jmsConfig.getTopicConfigurations().add(new TopicConfigurationImpl() .setName(getTopicName()) .setBindings(getTopicName())); - server = new JMSServerManagerImpl(hornetQServer, jmsConfig); + server = new JMSServerManagerImpl(activeMQServer, jmsConfig); server.setContext(new InVMNamingContext()); return server; } @@ -140,7 +140,7 @@ public abstract class StompV11TestBase extends UnitTestCase protected ConnectionFactory createConnectionFactory() { - return new HornetQJMSConnectionFactory(false, new TransportConfiguration(InVMConnectorFactory.class.getName())); + return new ActiveMQJMSConnectionFactory(false, new TransportConfiguration(InVMConnectorFactory.class.getName())); } protected String getQueueName() diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v12/StompV12Test.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v12/StompV12Test.java index d55298bf06..1704c6da5d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v12/StompV12Test.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/v12/StompV12Test.java @@ -77,7 +77,7 @@ public class StompV12Test extends StompV11TestBase @Test public void testConnection() throws Exception { - server.getHornetQServer().getConfiguration().setSecurityEnabled(true); + server.getActiveMQServer().getConfiguration().setSecurityEnabled(true); StompClientConnection connection = StompClientConnectionFactory.createClientConnection("1.0", hostname, port); connection.connect(defUser, defPass); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/transports/netty/HornetQFrameDecoder2Test.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/transports/netty/ActiveMQFrameDecoder2Test.java similarity index 80% rename from tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/transports/netty/HornetQFrameDecoder2Test.java rename to tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/transports/netty/ActiveMQFrameDecoder2Test.java index dffe1799be..03a45f86e4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/transports/netty/HornetQFrameDecoder2Test.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/transports/netty/ActiveMQFrameDecoder2Test.java @@ -19,7 +19,7 @@ import java.util.Random; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.embedded.EmbeddedChannel; -import org.apache.activemq.core.remoting.impl.netty.HornetQFrameDecoder2; +import org.apache.activemq.core.remoting.impl.netty.ActiveMQFrameDecoder2; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.After; import org.junit.Assert; @@ -27,12 +27,12 @@ import org.junit.Before; import org.junit.Test; /** - * A HornetQFrameDecoder2Test + * A ActiveMQFrameDecoder2Test * * @author Trustin Lee * @version $Revision$, $Date$ */ -public class HornetQFrameDecoder2Test extends UnitTestCase +public class ActiveMQFrameDecoder2Test extends UnitTestCase { private static final int MSG_CNT = 10000; @@ -57,21 +57,21 @@ public class HornetQFrameDecoder2Test extends UnitTestCase @Test public void testOrdinaryFragmentation() throws Exception { - final EmbeddedChannel decoder = new EmbeddedChannel(new HornetQFrameDecoder2()); - final byte[] data = new byte[HornetQFrameDecoder2Test.MSG_LEN]; - HornetQFrameDecoder2Test.rand.nextBytes(data); + final EmbeddedChannel decoder = new EmbeddedChannel(new ActiveMQFrameDecoder2()); + final byte[] data = new byte[ActiveMQFrameDecoder2Test.MSG_LEN]; + ActiveMQFrameDecoder2Test.rand.nextBytes(data); - ByteBuf src = Unpooled.buffer(HornetQFrameDecoder2Test.MSG_CNT * (HornetQFrameDecoder2Test.MSG_LEN + 4)); + ByteBuf src = Unpooled.buffer(ActiveMQFrameDecoder2Test.MSG_CNT * (ActiveMQFrameDecoder2Test.MSG_LEN + 4)); while (src.writerIndex() < src.capacity()) { - src.writeInt(HornetQFrameDecoder2Test.MSG_LEN); + src.writeInt(ActiveMQFrameDecoder2Test.MSG_LEN); src.writeBytes(data); } List packets = new ArrayList(); while (src.isReadable()) { - int length = Math.min(HornetQFrameDecoder2Test.rand.nextInt(HornetQFrameDecoder2Test.FRAGMENT_MAX_LEN), + int length = Math.min(ActiveMQFrameDecoder2Test.rand.nextInt(ActiveMQFrameDecoder2Test.FRAGMENT_MAX_LEN), src.readableBytes()); packets.add(src.readBytes(length)); } @@ -88,19 +88,19 @@ public class HornetQFrameDecoder2Test extends UnitTestCase break; } Assert.assertEquals(4, frame.readerIndex()); - Assert.assertEquals(HornetQFrameDecoder2Test.MSG_LEN, frame.readableBytes()); + Assert.assertEquals(ActiveMQFrameDecoder2Test.MSG_LEN, frame.readableBytes()); Assert.assertEquals(Unpooled.wrappedBuffer(data), frame); cnt++; frame.release(); } } - Assert.assertEquals(HornetQFrameDecoder2Test.MSG_CNT, cnt); + Assert.assertEquals(ActiveMQFrameDecoder2Test.MSG_CNT, cnt); } @Test public void testExtremeFragmentation() throws Exception { - final EmbeddedChannel decoder = new EmbeddedChannel(new HornetQFrameDecoder2()); + final EmbeddedChannel decoder = new EmbeddedChannel(new ActiveMQFrameDecoder2()); decoder.writeInbound(Unpooled.wrappedBuffer(new byte[]{0})); Assert.assertNull(decoder.readInbound()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/transports/netty/NettyConnectorWithHTTPUpgradeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/transports/netty/NettyConnectorWithHTTPUpgradeTest.java index 702d71284d..63ce158729 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/transports/netty/NettyConnectorWithHTTPUpgradeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/transports/netty/NettyConnectorWithHTTPUpgradeTest.java @@ -39,15 +39,15 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptor; import org.apache.activemq.core.remoting.impl.netty.PartialPooledByteBufAllocator; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.After; import org.junit.Before; @@ -57,8 +57,8 @@ import static io.netty.handler.codec.http.HttpHeaders.Names.UPGRADE; import static io.netty.handler.codec.http.HttpResponseStatus.SWITCHING_PROTOCOLS; import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1; import static org.apache.activemq.core.remoting.impl.netty.NettyConnector.MAGIC_NUMBER; -import static org.apache.activemq.core.remoting.impl.netty.NettyConnector.SEC_HORNETQ_REMOTING_ACCEPT; -import static org.apache.activemq.core.remoting.impl.netty.NettyConnector.SEC_HORNETQ_REMOTING_KEY; +import static org.apache.activemq.core.remoting.impl.netty.NettyConnector.SEC_ACTIVEMQ_REMOTING_ACCEPT; +import static org.apache.activemq.core.remoting.impl.netty.NettyConnector.SEC_ACTIVEMQ_REMOTING_KEY; import static org.apache.activemq.core.remoting.impl.netty.NettyConnector.createExpectedResponse; import static org.apache.activemq.tests.util.RandomUtil.randomString; @@ -75,7 +75,7 @@ public class NettyConnectorWithHTTPUpgradeTest extends UnitTestCase private static final int HTTP_PORT = 8080; private Configuration conf; - private HornetQServer server; + private ActiveMQServer server; private ServerLocator locator; private String acceptorName; @@ -99,13 +99,13 @@ public class NettyConnectorWithHTTPUpgradeTest extends UnitTestCase .addAcceptorConfiguration(new TransportConfiguration(NETTY_ACCEPTOR_FACTORY, httpParams, acceptorName)) .addAcceptorConfiguration(new TransportConfiguration(NETTY_ACCEPTOR_FACTORY, emptyParams, randomString())); - server = addServer(HornetQServers.newHornetQServer(conf, false)); + server = addServer(ActiveMQServers.newActiveMQServer(conf, false)); server.start(); - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY, httpParams)); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY, httpParams)); addServerLocator(locator); - // THe web server owns the HTTP port, not HornetQ. + // THe web server owns the HTTP port, not ActiveMQ. startWebServer(HTTP_PORT); } @@ -130,7 +130,7 @@ public class NettyConnectorWithHTTPUpgradeTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, false, 0, System.currentTimeMillis(), @@ -165,7 +165,7 @@ public class NettyConnectorWithHTTPUpgradeTest extends UnitTestCase params.put(TransportConstants.HTTP_UPGRADE_ENABLED_PROP_NAME, true); long start = System.currentTimeMillis(); - locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY, params)); + locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY, params)); Exception e = null; @@ -207,7 +207,7 @@ public class NettyConnectorWithHTTPUpgradeTest extends UnitTestCase p.addLast("encoder", new HttpResponseEncoder()); p.addLast("http-upgrade-handler", new SimpleChannelInboundHandler() { - // handle HTTP GET + Upgrade with a handshake specific to HornetQ remoting. + // handle HTTP GET + Upgrade with a handshake specific to ActiveMQ remoting. @Override protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception { @@ -220,11 +220,11 @@ public class NettyConnectorWithHTTPUpgradeTest extends UnitTestCase System.out.println(entry); } String upgrade = request.headers().get(UPGRADE); - String secretKey = request.headers().get(SEC_HORNETQ_REMOTING_KEY); + String secretKey = request.headers().get(SEC_ACTIVEMQ_REMOTING_KEY); FullHttpResponse response = new DefaultFullHttpResponse(HTTP_1_1, SWITCHING_PROTOCOLS); response.headers().set(UPGRADE, upgrade); - response.headers().set(SEC_HORNETQ_REMOTING_ACCEPT, createExpectedResponse(MAGIC_NUMBER, secretKey)); + response.headers().set(SEC_ACTIVEMQ_REMOTING_ACCEPT, createExpectedResponse(MAGIC_NUMBER, secretKey)); ctx.writeAndFlush(response); // when the handshake is successful, the HTTP handlers are removed diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/twitter/TwitterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/twitter/TwitterTest.java index f58862d6c2..abc6ff4899 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/twitter/TwitterTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/twitter/TwitterTest.java @@ -22,13 +22,13 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.ConnectorServiceConfiguration; import org.apache.activemq.core.config.CoreQueueConfiguration; import org.apache.activemq.core.server.ConnectorService; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.integration.twitter.TwitterConstants; import org.apache.activemq.integration.twitter.TwitterIncomingConnectorServiceFactory; import org.apache.activemq.integration.twitter.TwitterOutgoingConnectorServiceFactory; @@ -183,7 +183,7 @@ public class TwitterTest extends ServiceTestBase protected void internalTestIncoming(boolean createQueue, boolean restart) throws Exception { - HornetQServer server0 = null; + ActiveMQServer server0 = null; ClientSession session = null; ServerLocator locator = null; String queue = "TwitterTestQueue"; @@ -244,7 +244,7 @@ public class TwitterTest extends ServiceTestBase twitter.updateStatus(testMessage); TransportConfiguration tpconf = new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY); - locator = HornetQClient.createServerLocatorWithoutHA(tpconf); + locator = ActiveMQClient.createServerLocatorWithoutHA(tpconf); ClientSessionFactory sf = createSessionFactory(locator); session = sf.createSession(false, true, true); ClientConsumer consumer = session.createConsumer(queue); @@ -286,7 +286,7 @@ public class TwitterTest extends ServiceTestBase protected void internalTestIncomingFailedToInitialize(HashMap params) throws Exception { - HornetQServer server0 = null; + ActiveMQServer server0 = null; String connectorName = "test-incoming-connector"; String queue = "TwitterTestQueue"; String consumerKey = "invalidConsumerKey"; @@ -365,7 +365,7 @@ public class TwitterTest extends ServiceTestBase protected void internalTestOutgoing(boolean createQueue, boolean restart) throws Exception { - HornetQServer server0 = null; + ActiveMQServer server0 = null; ServerLocator locator = null; ClientSession session = null; String queue = "TwitterTestQueue"; @@ -423,7 +423,7 @@ public class TwitterTest extends ServiceTestBase } TransportConfiguration tpconf = new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY); - locator = HornetQClient.createServerLocatorWithoutHA(tpconf); + locator = ActiveMQClient.createServerLocatorWithoutHA(tpconf); ClientSessionFactory sf = createSessionFactory(locator); session = sf.createSession(false, true, true); ClientProducer producer = session.createProducer(queue); @@ -470,7 +470,7 @@ public class TwitterTest extends ServiceTestBase protected void internalTestOutgoingFailedToInitialize(HashMap params) throws Exception { - HornetQServer server0 = null; + ActiveMQServer server0 = null; String connectorName = "test-outgoing-connector"; String queue = "TwitterTestQueue"; String consumerKey = TWITTER_CONSUMER_KEY; @@ -544,7 +544,7 @@ public class TwitterTest extends ServiceTestBase protected void internalTestOutgoingWithInReplyTo() throws Exception { - HornetQServer server0 = null; + ActiveMQServer server0 = null; ClientSession session = null; ServerLocator locator = null; String queue = "TwitterTestQueue"; @@ -583,7 +583,7 @@ public class TwitterTest extends ServiceTestBase server0.start(); TransportConfiguration tpconf = new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY); - locator = HornetQClient.createServerLocatorWithoutHA(tpconf); + locator = ActiveMQClient.createServerLocatorWithoutHA(tpconf); ClientSessionFactory sf = createSessionFactory(locator); session = sf.createSession(false, true, true); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/vertx/HornetQVertxUnitTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/vertx/ActiveMQVertxUnitTest.java similarity index 98% rename from tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/vertx/HornetQVertxUnitTest.java rename to tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/vertx/ActiveMQVertxUnitTest.java index 8ff284d9e2..d37f2f896d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/vertx/HornetQVertxUnitTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/vertx/ActiveMQVertxUnitTest.java @@ -20,12 +20,12 @@ import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.ConnectorServiceConfiguration; import org.apache.activemq.core.config.CoreQueueConfiguration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.integration.vertx.VertxConstants; import org.apache.activemq.integration.vertx.VertxIncomingConnectorServiceFactory; import org.apache.activemq.integration.vertx.VertxOutgoingConnectorServiceFactory; @@ -45,13 +45,13 @@ import org.vertx.java.platform.PlatformManager; import org.vertx.java.spi.cluster.impl.hazelcast.HazelcastClusterManagerFactory; /** - * This class tests the basics of HornetQ + * This class tests the basics of ActiveMQ * vertx integration */ -public class HornetQVertxUnitTest extends ServiceTestBase +public class ActiveMQVertxUnitTest extends ServiceTestBase { protected PlatformManager vertxManager; - protected HornetQServer server; + protected ActiveMQServer server; protected String host = "localhost"; protected String port = "0"; @@ -167,7 +167,7 @@ public class HornetQVertxUnitTest extends ServiceTestBase } /** - * (vertx events) ===> (incomingQueue1) ===> (hornetq consumer) + * (vertx events) ===> (incomingQueue1) ===> (activemq consumer) * @throws Exception */ @Test @@ -201,12 +201,12 @@ public class HornetQVertxUnitTest extends ServiceTestBase vertxType = msg.getIntProperty(VertxConstants.VERTX_MESSAGE_TYPE); assertEquals(VertxConstants.TYPE_BUFFER, vertxType); - ActiveMQBuffer hqBuf = msg.getBodyBuffer(); - int len = hqBuf.readInt(); + ActiveMQBuffer activeMQBuffer = msg.getBodyBuffer(); + int len = activeMQBuffer.readInt(); System.out.println("==== len is: " + len); assertEquals(content.length, len); byte[] bytes = new byte[len]; - hqBuf.readBytes(bytes); + activeMQBuffer.readBytes(bytes); //bytes must match for (int i = 0; i < len; i++) @@ -679,7 +679,7 @@ public class HornetQVertxUnitTest extends ServiceTestBase try { TransportConfiguration tpconf = new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY); - locator = HornetQClient.createServerLocatorWithoutHA(tpconf); + locator = ActiveMQClient.createServerLocatorWithoutHA(tpconf); sf = createSessionFactory(locator); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/xa/BasicXaRecoveryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/xa/BasicXaRecoveryTest.java index ce7ca0a995..642097110d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/xa/BasicXaRecoveryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/xa/BasicXaRecoveryTest.java @@ -30,11 +30,11 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.QueueControl; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.core.transaction.impl.XidImpl; -import org.apache.activemq.jms.client.HornetQBytesMessage; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQBytesMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.integration.management.ManagementControlHelper; import org.apache.activemq.tests.util.ServiceTestBase; @@ -55,7 +55,7 @@ public class BasicXaRecoveryTest extends ServiceTestBase private final Map addressSettings = new HashMap(); - private HornetQServer server; + private ActiveMQServer server; private ClientSession clientSession; @@ -1296,7 +1296,7 @@ public class BasicXaRecoveryTest extends ServiceTestBase private ClientMessage createTextMessage(final String s, final boolean durable) { - ClientMessage message = clientSession.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = clientSession.createMessage(ActiveMQTextMessage.TYPE, durable, 0, System.currentTimeMillis(), @@ -1307,7 +1307,7 @@ public class BasicXaRecoveryTest extends ServiceTestBase private ClientMessage createBytesMessage(final byte[] b, final boolean durable) { - ClientMessage message = clientSession.createMessage(HornetQBytesMessage.TYPE, + ClientMessage message = clientSession.createMessage(ActiveMQBytesMessage.TYPE, durable, 0, System.currentTimeMillis(), diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/xa/BasicXaTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/xa/BasicXaTest.java index 9ab3c8e146..320fd40d5f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/xa/BasicXaTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/xa/BasicXaTest.java @@ -30,10 +30,10 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.core.transaction.impl.XidImpl; -import org.apache.activemq.ra.HornetQRAXAResource; +import org.apache.activemq.ra.ActiveMQRAXAResource; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.utils.UUIDGenerator; @@ -51,7 +51,7 @@ public class BasicXaTest extends ServiceTestBase private final Map addressSettings = new HashMap(); - private HornetQServer messagingService; + private ActiveMQServer messagingService; private ClientSession clientSession; @@ -168,8 +168,8 @@ public class BasicXaTest extends ServiceTestBase ClientSession session1 = nettyFactory.createSession(true, false, false); ClientSession session2 = nettyFactory2.createSession(true, false, false); assertTrue(session1.isSameRM(session2)); - HornetQRAXAResource hornetQRAXAResource = new HornetQRAXAResource(null, session2); - assertTrue(session1.isSameRM(hornetQRAXAResource)); + ActiveMQRAXAResource activeMQRAXAResource = new ActiveMQRAXAResource(null, session2); + assertTrue(session1.isSameRM(activeMQRAXAResource)); } } @@ -541,16 +541,16 @@ public class BasicXaTest extends ServiceTestBase clientSession.end(xid, XAResource.TMSUCCESS); clientSession.prepare(xid); - String[] preparedTransactions = messagingService.getHornetQServerControl().listPreparedTransactions(); + String[] preparedTransactions = messagingService.getActiveMQServerControl().listPreparedTransactions(); Assert.assertEquals(1, preparedTransactions.length); System.out.println(preparedTransactions[0]); - Assert.assertTrue(messagingService.getHornetQServerControl() + Assert.assertTrue(messagingService.getActiveMQServerControl() .commitPreparedTransaction(XidImpl.toBase64String(xid))); - Assert.assertEquals(1, messagingService.getHornetQServerControl().listHeuristicCommittedTransactions().length); + Assert.assertEquals(1, messagingService.getActiveMQServerControl().listHeuristicCommittedTransactions().length); clientSession.forget(xid); - Assert.assertEquals(0, messagingService.getHornetQServerControl().listHeuristicCommittedTransactions().length); + Assert.assertEquals(0, messagingService.getActiveMQServerControl().listHeuristicCommittedTransactions().length); } @Test @@ -561,17 +561,17 @@ public class BasicXaTest extends ServiceTestBase clientSession.end(xid, XAResource.TMSUCCESS); clientSession.prepare(xid); - String[] preparedTransactions = messagingService.getHornetQServerControl().listPreparedTransactions(); + String[] preparedTransactions = messagingService.getActiveMQServerControl().listPreparedTransactions(); Assert.assertEquals(1, preparedTransactions.length); System.out.println(preparedTransactions[0]); - Assert.assertTrue(messagingService.getHornetQServerControl() + Assert.assertTrue(messagingService.getActiveMQServerControl() .rollbackPreparedTransaction(XidImpl.toBase64String(xid))); - Assert.assertEquals(1, messagingService.getHornetQServerControl().listHeuristicRolledBackTransactions().length); + Assert.assertEquals(1, messagingService.getActiveMQServerControl().listHeuristicRolledBackTransactions().length); clientSession.forget(xid); - Assert.assertEquals(0, messagingService.getHornetQServerControl().listHeuristicRolledBackTransactions().length); + Assert.assertEquals(0, messagingService.getActiveMQServerControl().listHeuristicRolledBackTransactions().length); } @Test @@ -870,22 +870,22 @@ public class BasicXaTest extends ServiceTestBase clientSession.end(xid, XAResource.TMSUCCESS); clientSession.prepare(xid); - String[] preparedTransactions = messagingService.getHornetQServerControl().listPreparedTransactions(); + String[] preparedTransactions = messagingService.getActiveMQServerControl().listPreparedTransactions(); Assert.assertEquals(1, preparedTransactions.length); if (heuristicCommit) { - Assert.assertTrue(messagingService.getHornetQServerControl() + Assert.assertTrue(messagingService.getActiveMQServerControl() .commitPreparedTransaction(XidImpl.toBase64String(xid))); - Assert.assertEquals(1, messagingService.getHornetQServerControl().listHeuristicCommittedTransactions().length); + Assert.assertEquals(1, messagingService.getActiveMQServerControl().listHeuristicCommittedTransactions().length); } else { - Assert.assertTrue(messagingService.getHornetQServerControl() + Assert.assertTrue(messagingService.getActiveMQServerControl() .rollbackPreparedTransaction(XidImpl.toBase64String(xid))); - Assert.assertEquals(1, messagingService.getHornetQServerControl().listHeuristicRolledBackTransactions().length); + Assert.assertEquals(1, messagingService.getActiveMQServerControl().listHeuristicRolledBackTransactions().length); } - Assert.assertEquals(0, messagingService.getHornetQServerControl().listPreparedTransactions().length); + Assert.assertEquals(0, messagingService.getActiveMQServerControl().listPreparedTransactions().length); try { @@ -914,11 +914,11 @@ public class BasicXaTest extends ServiceTestBase if (heuristicCommit) { - Assert.assertEquals(1, messagingService.getHornetQServerControl().listHeuristicCommittedTransactions().length); + Assert.assertEquals(1, messagingService.getActiveMQServerControl().listHeuristicCommittedTransactions().length); } else { - Assert.assertEquals(1, messagingService.getHornetQServerControl().listHeuristicRolledBackTransactions().length); + Assert.assertEquals(1, messagingService.getActiveMQServerControl().listHeuristicRolledBackTransactions().length); } } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/xa/XaTimeoutTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/xa/XaTimeoutTest.java index 53012a53f1..84fc3de111 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/xa/XaTimeoutTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/xa/XaTimeoutTest.java @@ -31,15 +31,15 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionXAStartMessage; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.core.transaction.Transaction; import org.apache.activemq.core.transaction.TransactionOperationAbstract; @@ -60,7 +60,7 @@ public class XaTimeoutTest extends UnitTestCase private final Map addressSettings = new HashMap(); - private HornetQServer messagingService; + private ActiveMQServer messagingService; private ClientSession clientSession; @@ -86,12 +86,12 @@ public class XaTimeoutTest extends UnitTestCase configuration = createBasicConfig() .setTransactionTimeoutScanPeriod(500) .addAcceptorConfiguration(new TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY)); - messagingService = addServer(HornetQServers.newHornetQServer(configuration, false)); + messagingService = addServer(ActiveMQServers.newActiveMQServer(configuration, false)); // start the server messagingService.start(); // then we create a client as normal locator = - addServerLocator(HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( + addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration( InVMConnectorFactory.class.getName()))); sessionFactory = createSessionFactory(locator); clientSession = sessionFactory.createSession(true, false, false); @@ -733,7 +733,7 @@ public class XaTimeoutTest extends UnitTestCase } messagingService.getRemotingService().addIncomingInterceptor(new SomeInterceptor()); - ServerLocator locatorTimeout = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(InVMConnectorFactory.class.getName())); + ServerLocator locatorTimeout = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(InVMConnectorFactory.class.getName())); locatorTimeout.setCallTimeout(300); ClientSessionFactory factoryTimeout = locatorTimeout.createSessionFactory(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/largemessage/LargeMessageTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/largemessage/LargeMessageTestBase.java index 77f0a129d2..d80e1fc0f8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/largemessage/LargeMessageTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/largemessage/LargeMessageTestBase.java @@ -33,7 +33,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.tests.integration.IntegrationTestLogger; import org.apache.activemq.tests.util.ServiceTestBase; @@ -57,7 +57,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase protected final SimpleString ADDRESS = new SimpleString("SimpleAddress"); - protected HornetQServer server; + protected ActiveMQServer server; // Attributes ---------------------------------------------------- diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/JMSClusteredTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/JMSClusteredTestBase.java index e4c4bd3370..b6c354b6a2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/JMSClusteredTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/JMSClusteredTestBase.java @@ -23,14 +23,14 @@ import java.util.List; import java.util.Map; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.config.ClusterConnectionConfiguration; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.jms.server.config.impl.JMSConfigurationImpl; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.tests.integration.IntegrationTestLogger; @@ -50,13 +50,13 @@ public class JMSClusteredTestBase extends ServiceTestBase protected MBeanServer mBeanServer1; - protected HornetQServer server1; + protected ActiveMQServer server1; protected JMSServerManagerImpl jmsServer1; protected MBeanServer mBeanServer2; - protected HornetQServer server2; + protected ActiveMQServer server2; protected JMSServerManagerImpl jmsServer2; @@ -122,20 +122,20 @@ public class JMSClusteredTestBase extends ServiceTestBase jmsServer1.start(); jmsServer1.activated(); - waitForServer(jmsServer1.getHornetQServer()); + waitForServer(jmsServer1.getActiveMQServer()); jmsServer2.start(); jmsServer2.activated(); - waitForServer(jmsServer2.getHornetQServer()); + waitForServer(jmsServer2.getActiveMQServer()); - waitForTopology(jmsServer1.getHornetQServer(), 2); + waitForTopology(jmsServer1.getActiveMQServer(), 2); - waitForTopology(jmsServer2.getHornetQServer(), 2); + waitForTopology(jmsServer2.getActiveMQServer(), 2); - cf1 = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(InVMConnectorFactory.class.getName(), - generateInVMParams(0))); - cf2 = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(InVMConnectorFactory.class.getName(), - generateInVMParams(1))); + cf1 = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(InVMConnectorFactory.class.getName(), + generateInVMParams(0))); + cf2 = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(InVMConnectorFactory.class.getName(), + generateInVMParams(1))); } /** @@ -148,7 +148,7 @@ public class JMSClusteredTestBase extends ServiceTestBase JMSConfigurationImpl jmsconfig = new JMSConfigurationImpl(); mBeanServer2 = MBeanServerFactory.createMBeanServer(); - server2 = HornetQServers.newHornetQServer(conf2, mBeanServer2, enablePersistence()); + server2 = ActiveMQServers.newActiveMQServer(conf2, mBeanServer2, enablePersistence()); jmsServer2 = new JMSServerManagerImpl(server2, jmsconfig); context2 = new InVMNamingContext(); jmsServer2.setContext(context2); @@ -195,7 +195,7 @@ public class JMSClusteredTestBase extends ServiceTestBase JMSConfigurationImpl jmsconfig = new JMSConfigurationImpl(); mBeanServer1 = MBeanServerFactory.createMBeanServer(); - server1 = HornetQServers.newHornetQServer(conf1, mBeanServer1, enablePersistence()); + server1 = ActiveMQServers.newActiveMQServer(conf1, mBeanServer1, enablePersistence()); jmsServer1 = new JMSServerManagerImpl(server1, jmsconfig); context1 = new InVMNamingContext(); jmsServer1.setContext(context1); @@ -256,9 +256,9 @@ public class JMSClusteredTestBase extends ServiceTestBase log.warn("Can't stop server2", e); } - ((HornetQConnectionFactory) cf1).close(); + ((ActiveMQConnectionFactory) cf1).close(); - ((HornetQConnectionFactory) cf2).close(); + ((ActiveMQConnectionFactory) cf2).close(); server2 = null; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/JMSTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/JMSTestBase.java index 8751ab042d..fbe163edf8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/JMSTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/JMSTestBase.java @@ -34,8 +34,8 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.QueueControl; import org.apache.activemq.api.jms.management.JMSQueueControl; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration; import org.apache.activemq.jms.server.config.impl.ConnectionFactoryConfigurationImpl; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; @@ -52,7 +52,7 @@ import org.junit.Before; public class JMSTestBase extends ServiceTestBase { - protected HornetQServer server; + protected ActiveMQServer server; protected JMSServerManagerImpl jmsServer; @@ -151,7 +151,7 @@ public class JMSTestBase extends ServiceTestBase .setSecurityEnabled(useSecurity()) .addConnectorConfiguration("invm", new TransportConfiguration(INVM_CONNECTOR_FACTORY)); - server = HornetQServers.newHornetQServer(conf, mbeanServer, usePersistence()); + server = ActiveMQServers.newActiveMQServer(conf, mbeanServer, usePersistence()); addServer(server); jmsServer = new JMSServerManagerImpl(server); namingContext = new InVMNamingContext(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/ReplicatedBackupUtils.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/ReplicatedBackupUtils.java index bb3c0a2290..f9fbe9be97 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/ReplicatedBackupUtils.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/ReplicatedBackupUtils.java @@ -19,8 +19,8 @@ import org.apache.activemq.core.config.ha.ReplicatedPolicyConfiguration; public final class ReplicatedBackupUtils { - public static final String LIVE_NODE_NAME = "hqLIVE"; - public static final String BACKUP_NODE_NAME = "hqBackup"; + public static final String LIVE_NODE_NAME = "amqLIVE"; + public static final String BACKUP_NODE_NAME = "amqBackup"; private ReplicatedBackupUtils() { // Utility class diff --git a/tests/integration-tests/src/test/resources/hornetq-jms-for-JMSServerDeployerTest.xml b/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest.xml similarity index 100% rename from tests/integration-tests/src/test/resources/hornetq-jms-for-JMSServerDeployerTest.xml rename to tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest.xml diff --git a/tests/integration-tests/src/test/resources/hornetq-jms-for-JMSServerDeployerTest2.xml b/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest2.xml similarity index 100% rename from tests/integration-tests/src/test/resources/hornetq-jms-for-JMSServerDeployerTest2.xml rename to tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest2.xml diff --git a/tests/integration-tests/src/test/resources/spring-hornetq-config.xml b/tests/integration-tests/src/test/resources/spring-activemq-config.xml similarity index 100% rename from tests/integration-tests/src/test/resources/spring-hornetq-config.xml rename to tests/integration-tests/src/test/resources/spring-activemq-config.xml diff --git a/tests/integration-tests/src/test/resources/spring-hornetq-jms.xml b/tests/integration-tests/src/test/resources/spring-activemq-jms.xml similarity index 100% rename from tests/integration-tests/src/test/resources/spring-hornetq-jms.xml rename to tests/integration-tests/src/test/resources/spring-activemq-jms.xml diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/AcknowledgementTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/AcknowledgementTest.java index 883ec27c04..1a0d98e134 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/AcknowledgementTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/AcknowledgementTest.java @@ -45,7 +45,7 @@ public class AcknowledgementTest extends JMSTestCase { TopicConnection topicConn = createTopicConnection(); TopicSession sess = topicConn.createTopicSession(true, 0); - TopicPublisher pub = sess.createPublisher(HornetQServerTestCase.topic1); + TopicPublisher pub = sess.createPublisher(ActiveMQServerTestCase.topic1); pub.setDeliveryMode(DeliveryMode.PERSISTENT); Message m = sess.createTextMessage("testing123"); @@ -54,7 +54,7 @@ public class AcknowledgementTest extends JMSTestCase topicConn.close(); - checkEmpty(HornetQServerTestCase.topic1); + checkEmpty(ActiveMQServerTestCase.topic1); } /** @@ -66,8 +66,8 @@ public class AcknowledgementTest extends JMSTestCase TopicConnection topicConn = createTopicConnection(); topicConn.start(); TopicSession sess = topicConn.createTopicSession(true, 0); - TopicPublisher pub = sess.createPublisher(HornetQServerTestCase.topic1); - TopicSubscriber sub = sess.createSubscriber(HornetQServerTestCase.topic1); + TopicPublisher pub = sess.createPublisher(ActiveMQServerTestCase.topic1); + TopicSubscriber sub = sess.createSubscriber(ActiveMQServerTestCase.topic1); pub.setDeliveryMode(DeliveryMode.PERSISTENT); Message m = sess.createTextMessage("testing123"); @@ -84,7 +84,7 @@ public class AcknowledgementTest extends JMSTestCase topicConn.close(); - checkEmpty(HornetQServerTestCase.topic1); + checkEmpty(ActiveMQServerTestCase.topic1); } @Test @@ -92,8 +92,8 @@ public class AcknowledgementTest extends JMSTestCase { TopicConnection topicConn = createTopicConnection(); TopicSession sess = topicConn.createTopicSession(true, 0); - TopicPublisher pub = sess.createPublisher(HornetQServerTestCase.topic1); - TopicSubscriber cons = sess.createSubscriber(HornetQServerTestCase.topic1); + TopicPublisher pub = sess.createPublisher(ActiveMQServerTestCase.topic1); + TopicSubscriber cons = sess.createSubscriber(ActiveMQServerTestCase.topic1); topicConn.start(); Message m = sess.createTextMessage("testing123"); @@ -118,8 +118,8 @@ public class AcknowledgementTest extends JMSTestCase // test 2 TopicSession newsess = topicConn.createTopicSession(true, 0); - TopicPublisher newpub = newsess.createPublisher(HornetQServerTestCase.topic1); - TopicSubscriber newcons = newsess.createSubscriber(HornetQServerTestCase.topic1); + TopicPublisher newpub = newsess.createPublisher(ActiveMQServerTestCase.topic1); + TopicSubscriber newcons = newsess.createSubscriber(ActiveMQServerTestCase.topic1); Message m3 = newsess.createTextMessage("testing456"); newpub.publish(m3); @@ -636,10 +636,10 @@ public class AcknowledgementTest extends JMSTestCase conn = myCF.createConnection(); Session producerSess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer producer = producerSess.createProducer(HornetQServerTestCase.topic1); + MessageProducer producer = producerSess.createProducer(ActiveMQServerTestCase.topic1); Session consumerSess = conn.createSession(false, Session.DUPS_OK_ACKNOWLEDGE); - MessageConsumer consumer = consumerSess.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer consumer = consumerSess.createConsumer(ActiveMQServerTestCase.topic1); conn.start(); // Send some messages @@ -669,7 +669,7 @@ public class AcknowledgementTest extends JMSTestCase conn.close(); } - HornetQServerTestCase.undeployConnectionFactory("MyConnectionFactory2"); + ActiveMQServerTestCase.undeployConnectionFactory("MyConnectionFactory2"); } } diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/HornetQServerTestCase.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ActiveMQServerTestCase.java similarity index 82% rename from tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/HornetQServerTestCase.java rename to tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ActiveMQServerTestCase.java index 828d32b1e5..807a4d68e5 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/HornetQServerTestCase.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ActiveMQServerTestCase.java @@ -38,7 +38,7 @@ import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.postoffice.impl.LocalQueueBinding; import org.apache.activemq.core.security.Role; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.tests.tools.ServerManagement; import org.apache.activemq.jms.tests.tools.container.Server; @@ -61,7 +61,7 @@ import org.junit.runner.Description; * org.apache.activemq.tests.integration.jms at the integration-tests project. */ @Deprecated -public abstract class HornetQServerTestCase +public abstract class ActiveMQServerTestCase { public static final int MAX_TIMEOUT = 1000 * 10 /* seconds */; @@ -122,7 +122,7 @@ public abstract class HornetQServerTestCase @Override protected void failed(Throwable e, Description description) { - HornetQServerTestCase.tearDownAllServers(); + ActiveMQServerTestCase.tearDownAllServers(); } }; @@ -134,12 +134,12 @@ public abstract class HornetQServerTestCase try { // create any new server we need - HornetQServerTestCase.servers.add(ServerManagement.create()); + ActiveMQServerTestCase.servers.add(ServerManagement.create()); // start the servers if needed - if (!HornetQServerTestCase.servers.get(0).isStarted()) + if (!ActiveMQServerTestCase.servers.get(0).isStarted()) { - HornetQServerTestCase.servers.get(0).start(getConfiguration(), true); + ActiveMQServerTestCase.servers.get(0).start(getConfiguration(), true); } // deploy the objects for this test deployAdministeredObjects(); @@ -149,7 +149,7 @@ public abstract class HornetQServerTestCase { // if we get here we need to clean up for the next test e.printStackTrace(); - HornetQServerTestCase.servers.get(0).stop(); + ActiveMQServerTestCase.servers.get(0).stop(); throw e; } // empty the queues @@ -183,7 +183,7 @@ public abstract class HornetQServerTestCase public void stop() throws Exception { - HornetQServerTestCase.servers.get(0).stop(); + ActiveMQServerTestCase.servers.get(0).stop(); } public String getContextFactory() @@ -194,24 +194,24 @@ public abstract class HornetQServerTestCase public void start() throws Exception { System.setProperty("java.naming.factory.initial", getContextFactory()); - HornetQServerTestCase.servers.get(0).start(getConfiguration(), false); + ActiveMQServerTestCase.servers.get(0).start(getConfiguration(), false); } public void startNoDelete() throws Exception { System.setProperty("java.naming.factory.initial", getContextFactory()); - HornetQServerTestCase.servers.get(0).start(getConfiguration(), false); + ActiveMQServerTestCase.servers.get(0).start(getConfiguration(), false); } public void stopServerPeer() throws Exception { - HornetQServerTestCase.servers.get(0).stopServerPeer(); + ActiveMQServerTestCase.servers.get(0).stopServerPeer(); } public void startServerPeer() throws Exception { System.setProperty("java.naming.factory.initial", getContextFactory()); - HornetQServerTestCase.servers.get(0).startServerPeer(); + ActiveMQServerTestCase.servers.get(0).startServerPeer(); } protected HashMap getConfiguration() @@ -246,9 +246,9 @@ public abstract class HornetQServerTestCase private void lookUp() throws Exception { InitialContext ic = getInitialContext(); - HornetQServerTestCase.topic1 = (Topic) ic.lookup("/topic/Topic1"); - HornetQServerTestCase.topic2 = (Topic) ic.lookup("/topic/Topic2"); - HornetQServerTestCase.topic3 = (Topic) ic.lookup("/topic/Topic3"); + ActiveMQServerTestCase.topic1 = (Topic) ic.lookup("/topic/Topic1"); + ActiveMQServerTestCase.topic2 = (Topic) ic.lookup("/topic/Topic2"); + ActiveMQServerTestCase.topic3 = (Topic) ic.lookup("/topic/Topic3"); queue1 = (Queue) ic.lookup("/queue/Queue1"); queue2 = (Queue) ic.lookup("/queue/Queue2"); queue3 = (Queue) ic.lookup("/queue/Queue3"); @@ -291,14 +291,14 @@ public abstract class HornetQServerTestCase servers.clear(); } - protected HornetQServer getJmsServer() throws Exception + protected ActiveMQServer getJmsServer() throws Exception { - return HornetQServerTestCase.servers.get(0).getHornetQServer(); + return ActiveMQServerTestCase.servers.get(0).getActiveMQServer(); } protected JMSServerManager getJmsServerManager() throws Exception { - return HornetQServerTestCase.servers.get(0).getJMSServerManager(); + return ActiveMQServerTestCase.servers.get(0).getJMSServerManager(); } protected void checkNoSubscriptions(final Topic topic) throws Exception @@ -368,42 +368,42 @@ public abstract class HornetQServerTestCase public void configureSecurityForDestination(final String destName, final boolean isQueue, final HashSet roles) throws Exception { - HornetQServerTestCase.servers.get(0).configureSecurityForDestination(destName, isQueue, roles); + ActiveMQServerTestCase.servers.get(0).configureSecurityForDestination(destName, isQueue, roles); } public void createQueue(final String name) throws Exception { - HornetQServerTestCase.servers.get(0).createQueue(name, null); + ActiveMQServerTestCase.servers.get(0).createQueue(name, null); } public void createTopic(final String name) throws Exception { - HornetQServerTestCase.servers.get(0).createTopic(name, null); + ActiveMQServerTestCase.servers.get(0).createTopic(name, null); } public void destroyQueue(final String name) throws Exception { - HornetQServerTestCase.servers.get(0).destroyQueue(name, null); + ActiveMQServerTestCase.servers.get(0).destroyQueue(name, null); } public void destroyTopic(final String name) throws Exception { - HornetQServerTestCase.servers.get(0).destroyTopic(name, null); + ActiveMQServerTestCase.servers.get(0).destroyTopic(name, null); } public void createQueue(final String name, final int i) throws Exception { - HornetQServerTestCase.servers.get(i).createQueue(name, null); + ActiveMQServerTestCase.servers.get(i).createQueue(name, null); } public void createTopic(final String name, final int i) throws Exception { - HornetQServerTestCase.servers.get(i).createTopic(name, null); + ActiveMQServerTestCase.servers.get(i).createTopic(name, null); } public void destroyQueue(final String name, final int i) throws Exception { - HornetQServerTestCase.servers.get(i).destroyQueue(name, null); + ActiveMQServerTestCase.servers.get(i).destroyQueue(name, null); } public boolean checkNoMessageData() @@ -413,7 +413,7 @@ public abstract class HornetQServerTestCase public boolean checkEmpty(final Queue queue) throws Exception { - Long messageCount = HornetQServerTestCase.servers.get(0).getMessageCountForQueue(queue.getQueueName()); + Long messageCount = ActiveMQServerTestCase.servers.get(0).getMessageCountForQueue(queue.getQueueName()); if (messageCount > 0) { removeAllMessages(queue.getQueueName(), true); @@ -433,18 +433,18 @@ public abstract class HornetQServerTestCase protected void removeAllMessages(final String destName, final boolean isQueue) throws Exception { - HornetQServerTestCase.servers.get(0).removeAllMessages(destName, isQueue); + ActiveMQServerTestCase.servers.get(0).removeAllMessages(destName, isQueue); } protected boolean assertRemainingMessages(final int expected) throws Exception { String queueName = "Queue1"; - Binding binding = servers.get(0).getHornetQServer().getPostOffice().getBinding(SimpleString.toSimpleString("jms.queue." + queueName)); + Binding binding = servers.get(0).getActiveMQServer().getPostOffice().getBinding(SimpleString.toSimpleString("jms.queue." + queueName)); if (binding != null && binding instanceof LocalQueueBinding) { ((LocalQueueBinding)binding).getQueue().flushExecutor(); } - Long messageCount = HornetQServerTestCase.servers.get(0).getMessageCountForQueue(queueName); + Long messageCount = ActiveMQServerTestCase.servers.get(0).getMessageCountForQueue(queueName); ProxyAssertSupport.assertEquals(expected, messageCount.intValue()); return expected == messageCount.intValue(); @@ -452,9 +452,9 @@ public abstract class HornetQServerTestCase protected static void assertActiveConnectionsOnTheServer(final int expectedSize) throws Exception { - ProxyAssertSupport.assertEquals(expectedSize, HornetQServerTestCase.servers.get(0) - .getHornetQServer() - .getHornetQServerControl() + ProxyAssertSupport.assertEquals(expectedSize, ActiveMQServerTestCase.servers.get(0) + .getActiveMQServer() + .getActiveMQServerControl() .getConnectionCount()); } @@ -462,14 +462,14 @@ public abstract class HornetQServerTestCase final String objectName, final String... jndiBindings) throws Exception { - HornetQServerTestCase.servers.get(0).deployConnectionFactory(clientId, objectName, jndiBindings); + ActiveMQServerTestCase.servers.get(0).deployConnectionFactory(clientId, objectName, jndiBindings); } public static void deployConnectionFactory(final String objectName, final int prefetchSize, final String... jndiBindings) throws Exception { - HornetQServerTestCase.servers.get(0).deployConnectionFactory(objectName, prefetchSize, jndiBindings); + ActiveMQServerTestCase.servers.get(0).deployConnectionFactory(objectName, prefetchSize, jndiBindings); } @@ -478,12 +478,12 @@ public abstract class HornetQServerTestCase final int prefetchSize, final String... jndiBindings) throws Exception { - HornetQServerTestCase.servers.get(server).deployConnectionFactory(objectName, prefetchSize, jndiBindings); + ActiveMQServerTestCase.servers.get(server).deployConnectionFactory(objectName, prefetchSize, jndiBindings); } public static void deployConnectionFactory(final int server, final String objectName, final String... jndiBindings) throws Exception { - HornetQServerTestCase.servers.get(server).deployConnectionFactory(objectName, jndiBindings); + ActiveMQServerTestCase.servers.get(server).deployConnectionFactory(objectName, jndiBindings); } public void deployConnectionFactory(final String clientId, @@ -498,7 +498,7 @@ public abstract class HornetQServerTestCase final boolean blockOnAcknowledge, final String... jndiBindings) throws Exception { - HornetQServerTestCase.servers.get(0).deployConnectionFactory(clientId, + ActiveMQServerTestCase.servers.get(0).deployConnectionFactory(clientId, objectName, prefetchSize, defaultTempQueueFullSize, @@ -518,7 +518,7 @@ public abstract class HornetQServerTestCase final int defaultTempQueueDownCacheSize, final String... jndiBindings) throws Exception { - HornetQServerTestCase.servers.get(0).deployConnectionFactory(objectName, + ActiveMQServerTestCase.servers.get(0).deployConnectionFactory(objectName, prefetchSize, defaultTempQueueFullSize, defaultTempQueuePageSize, @@ -528,32 +528,32 @@ public abstract class HornetQServerTestCase public static void undeployConnectionFactory(final String objectName) throws Exception { - HornetQServerTestCase.servers.get(0).undeployConnectionFactory(objectName); + ActiveMQServerTestCase.servers.get(0).undeployConnectionFactory(objectName); } protected List listAllSubscribersForTopic(final String s) throws Exception { - return HornetQServerTestCase.servers.get(0).listAllSubscribersForTopic(s); + return ActiveMQServerTestCase.servers.get(0).listAllSubscribersForTopic(s); } protected Long getMessageCountForQueue(final String s) throws Exception { - return HornetQServerTestCase.servers.get(0).getMessageCountForQueue(s); + return ActiveMQServerTestCase.servers.get(0).getMessageCountForQueue(s); } protected Set getSecurityConfig() throws Exception { - return HornetQServerTestCase.servers.get(0).getSecurityConfig(); + return ActiveMQServerTestCase.servers.get(0).getSecurityConfig(); } protected void setSecurityConfig(final Set defConfig) throws Exception { - HornetQServerTestCase.servers.get(0).setSecurityConfig(defConfig); + ActiveMQServerTestCase.servers.get(0).setSecurityConfig(defConfig); } protected void setSecurityConfigOnManager(final String destination, final boolean isQueue, final Set roles) throws Exception { - HornetQServerTestCase.servers.get(0).configureSecurityForDestination(destination, isQueue, roles); + ActiveMQServerTestCase.servers.get(0).configureSecurityForDestination(destination, isQueue, roles); } protected final JMSContext addContext(JMSContext createContext) diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/BrowserTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/BrowserTest.java index 60bfdb0cc3..012a21f6fc 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/BrowserTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/BrowserTest.java @@ -25,7 +25,7 @@ import javax.jms.TextMessage; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.junit.After; import org.junit.Assert; @@ -100,7 +100,7 @@ public class BrowserTest extends JMSTestCase MessageProducer producer = session.createProducer(queue1); - HornetQConnectionFactory cf1 = (HornetQConnectionFactory)getConnectionFactory(); + ActiveMQConnectionFactory cf1 = (ActiveMQConnectionFactory)getConnectionFactory(); ClientSession coreSession = cf1.getServerLocator().createSessionFactory().createSession(true, true); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/CTSMiscellaneousTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/CTSMiscellaneousTest.java index 61fabb24cb..7264db66e9 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/CTSMiscellaneousTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/CTSMiscellaneousTest.java @@ -19,9 +19,9 @@ import javax.jms.DeliveryMode; import javax.jms.MessageProducer; import javax.jms.Session; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.jms.JMSFactoryType; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -40,7 +40,7 @@ public class CTSMiscellaneousTest extends JMSTest // Static -------------------------------------------------------- // Attributes ---------------------------------------------------- - protected static HornetQConnectionFactory cf; + protected static ActiveMQConnectionFactory cf; private static final String ORG_JBOSS_MESSAGING_SERVICE_LBCONNECTION_FACTORY = "StrictTCKConnectionFactory"; @@ -61,38 +61,38 @@ public class CTSMiscellaneousTest extends JMSTest JMSFactoryType.CF, NETTY_CONNECTOR, null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, - HornetQClient.DEFAULT_CALL_TIMEOUT, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CALL_TIMEOUT, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, true, true, true, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_RETRY_INTERVAL, - HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, - HornetQClient.DEFAULT_MAX_RETRY_INTERVAL, - HornetQClient.DEFAULT_RECONNECT_ATTEMPTS, - HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS, + ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, null, "/StrictTCKConnectionFactory"); - CTSMiscellaneousTest.cf = (HornetQConnectionFactory)getInitialContext().lookup("/StrictTCKConnectionFactory"); + CTSMiscellaneousTest.cf = (ActiveMQConnectionFactory)getInitialContext().lookup("/StrictTCKConnectionFactory"); } catch (Exception e) { @@ -147,7 +147,7 @@ public class CTSMiscellaneousTest extends JMSTest public void tearDown() throws Exception { super.tearDown(); - HornetQServerTestCase.undeployConnectionFactory(CTSMiscellaneousTest.ORG_JBOSS_MESSAGING_SERVICE_LBCONNECTION_FACTORY); + ActiveMQServerTestCase.undeployConnectionFactory(CTSMiscellaneousTest.ORG_JBOSS_MESSAGING_SERVICE_LBCONNECTION_FACTORY); } // Package protected --------------------------------------------- diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionClosedTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionClosedTest.java index 9ab22b785f..1f71eba92d 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionClosedTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionClosedTest.java @@ -73,15 +73,15 @@ public class ConnectionClosedTest extends JMSTestCase TopicSession sess1 = conn1.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); TopicSession sess2 = conn2.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); - TopicSubscriber sub1 = sess1.createSubscriber(HornetQServerTestCase.topic1); - TopicSubscriber sub2 = sess2.createSubscriber(HornetQServerTestCase.topic1); + TopicSubscriber sub1 = sess1.createSubscriber(ActiveMQServerTestCase.topic1); + TopicSubscriber sub2 = sess2.createSubscriber(ActiveMQServerTestCase.topic1); conn1.start(); Connection conn3 = createConnection(); Session sess3 = conn3.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer prod = sess3.createProducer(HornetQServerTestCase.topic1); + MessageProducer prod = sess3.createProducer(ActiveMQServerTestCase.topic1); prod.setDeliveryMode(DeliveryMode.NON_PERSISTENT); final int NUM_MESSAGES = 10; @@ -136,7 +136,7 @@ public class ConnectionClosedTest extends JMSTestCase conn.start(); - final MessageConsumer consumer = session.createConsumer(HornetQServerTestCase.topic1); + final MessageConsumer consumer = session.createConsumer(ActiveMQServerTestCase.topic1); class TestRunnable implements Runnable { @@ -229,8 +229,8 @@ public class ConnectionClosedTest extends JMSTestCase { Connection conn = createConnection(); Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer consumer = sess.createConsumer(HornetQServerTestCase.topic1); - MessageProducer producer = sess.createProducer(HornetQServerTestCase.topic1); + MessageConsumer consumer = sess.createConsumer(ActiveMQServerTestCase.topic1); + MessageProducer producer = sess.createProducer(ActiveMQServerTestCase.topic1); sess.createBrowser(queue1); Message m = sess.createMessage(); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionFactoryTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionFactoryTest.java index f3517eb664..85eaad2b8a 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionFactoryTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionFactoryTest.java @@ -35,7 +35,7 @@ import javax.jms.XAQueueConnectionFactory; import javax.jms.XATopicConnection; import javax.jms.XATopicConnectionFactory; -import org.apache.activemq.jms.client.HornetQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.junit.Assert; import org.junit.Before; @@ -55,7 +55,7 @@ public class ConnectionFactoryTest extends JMSTestCase public void setUp() throws Exception { super.setUp(); - testClientId = "hq" + random.nextInt(); + testClientId = "amq" + random.nextInt(); } /** @@ -86,7 +86,7 @@ public class ConnectionFactoryTest extends JMSTestCase public void testAdministrativelyConfiguredClientID() throws Exception { // deploy a connection factory that has an administatively configured clientID - HornetQServerTestCase.deployConnectionFactory(testClientId, "TestConnectionFactory", "TestConnectionFactory"); + ActiveMQServerTestCase.deployConnectionFactory(testClientId, "TestConnectionFactory", "TestConnectionFactory"); ConnectionFactory cf = (ConnectionFactory)ic.lookup("/TestConnectionFactory"); Connection c = cf.createConnection(); @@ -104,13 +104,13 @@ public class ConnectionFactoryTest extends JMSTestCase // OK } c.close(); - HornetQServerTestCase.undeployConnectionFactory("TestConnectionFactory"); + ActiveMQServerTestCase.undeployConnectionFactory("TestConnectionFactory"); } @Test public void testNoClientIDConfigured_1() throws Exception { - // the ConnectionFactories that ship with HornetQ do not have their clientID + // the ConnectionFactories that ship with ActiveMQ do not have their clientID // administratively configured. ConnectionFactory cf = (ConnectionFactory)ic.lookup("/CF_XA_FALSE"); @@ -124,7 +124,7 @@ public class ConnectionFactoryTest extends JMSTestCase @Test public void testNoClientIDConfigured_2() throws Exception { - // the ConnectionFactories that ship with HornetQ do not have their clientID + // the ConnectionFactories that ship with ActiveMQ do not have their clientID // administratively configured. ConnectionFactory cf = (ConnectionFactory)ic.lookup("/CF_XA_FALSE"); @@ -142,7 +142,7 @@ public class ConnectionFactoryTest extends JMSTestCase @Test public void testDurableSubscriptionOnPreConfiguredConnectionFactory() throws Exception { - HornetQServerTestCase.deployConnectionFactory("TestConnectionFactory1", "cfTest", "/TestDurableCF"); + ActiveMQServerTestCase.deployConnectionFactory("TestConnectionFactory1", "cfTest", "/TestDurableCF"); createTopic("TestSubscriber"); @@ -195,7 +195,7 @@ public class ConnectionFactoryTest extends JMSTestCase { ArrayList bindings = new ArrayList(); bindings.add("TestSlowConsumersCF"); - HornetQServerTestCase.deployConnectionFactory(0, "TestSlowConsumersCF", 1, "TestSlowConsumersCF"); + ActiveMQServerTestCase.deployConnectionFactory(0, "TestSlowConsumersCF", 1, "TestSlowConsumersCF"); Connection conn = null; @@ -319,7 +319,7 @@ public class ConnectionFactoryTest extends JMSTestCase try { - HornetQServerTestCase.undeployConnectionFactory("TestSlowConsumersCF"); + ActiveMQServerTestCase.undeployConnectionFactory("TestSlowConsumersCF"); } catch (Exception e) { @@ -333,64 +333,64 @@ public class ConnectionFactoryTest extends JMSTestCase @Test public void testFactoryTypes() throws Exception { - HornetQConnectionFactory factory = null; + ActiveMQConnectionFactory factory = null; - factory = (HornetQConnectionFactory)ic.lookup("/ConnectionFactory"); + factory = (ActiveMQConnectionFactory)ic.lookup("/ConnectionFactory"); Assert.assertTrue(factory instanceof ConnectionFactory); assertNTypes(factory, 4); - factory = (HornetQConnectionFactory)ic.lookup("/CF_XA_TRUE"); + factory = (ActiveMQConnectionFactory)ic.lookup("/CF_XA_TRUE"); Assert.assertTrue(factory instanceof XAConnectionFactory); assertNTypes(factory, 6); - factory = (HornetQConnectionFactory)ic.lookup("/CF_XA_FALSE"); + factory = (ActiveMQConnectionFactory)ic.lookup("/CF_XA_FALSE"); Assert.assertTrue(factory instanceof ConnectionFactory); assertNTypes(factory, 4); - factory = (HornetQConnectionFactory)ic.lookup("/CF_GENERIC"); + factory = (ActiveMQConnectionFactory)ic.lookup("/CF_GENERIC"); Assert.assertTrue(factory instanceof ConnectionFactory); assertNTypes(factory, 4); - factory = (HornetQConnectionFactory)ic.lookup("/CF_GENERIC_XA_TRUE"); + factory = (ActiveMQConnectionFactory)ic.lookup("/CF_GENERIC_XA_TRUE"); Assert.assertTrue(factory instanceof XAConnectionFactory); assertNTypes(factory, 6); - factory = (HornetQConnectionFactory)ic.lookup("/CF_GENERIC_XA_FALSE"); + factory = (ActiveMQConnectionFactory)ic.lookup("/CF_GENERIC_XA_FALSE"); Assert.assertTrue(factory instanceof ConnectionFactory); assertNTypes(factory, 4); - factory = (HornetQConnectionFactory)ic.lookup("/CF_QUEUE"); + factory = (ActiveMQConnectionFactory)ic.lookup("/CF_QUEUE"); Assert.assertTrue(factory instanceof QueueConnectionFactory); assertNTypes(factory, 3); - factory = (HornetQConnectionFactory)ic.lookup("/CF_QUEUE_XA_TRUE"); + factory = (ActiveMQConnectionFactory)ic.lookup("/CF_QUEUE_XA_TRUE"); Assert.assertTrue(factory instanceof XAQueueConnectionFactory); assertNTypes(factory, 4); - factory = (HornetQConnectionFactory)ic.lookup("/CF_QUEUE_XA_FALSE"); + factory = (ActiveMQConnectionFactory)ic.lookup("/CF_QUEUE_XA_FALSE"); Assert.assertTrue(factory instanceof QueueConnectionFactory); assertNTypes(factory, 3); - factory = (HornetQConnectionFactory)ic.lookup("/CF_TOPIC"); + factory = (ActiveMQConnectionFactory)ic.lookup("/CF_TOPIC"); Assert.assertTrue(factory instanceof TopicConnectionFactory); assertNTypes(factory, 3); - factory = (HornetQConnectionFactory)ic.lookup("/CF_TOPIC_XA_TRUE"); + factory = (ActiveMQConnectionFactory)ic.lookup("/CF_TOPIC_XA_TRUE"); Assert.assertTrue(factory instanceof XATopicConnectionFactory); assertNTypes(factory, 4); - factory = (HornetQConnectionFactory)ic.lookup("/CF_TOPIC_XA_FALSE"); + factory = (ActiveMQConnectionFactory)ic.lookup("/CF_TOPIC_XA_FALSE"); Assert.assertTrue(factory instanceof TopicConnectionFactory); assertNTypes(factory, 3); @@ -463,7 +463,7 @@ public class ConnectionFactoryTest extends JMSTestCase } } - private void assertNTypes(HornetQConnectionFactory factory, final int total) + private void assertNTypes(ActiveMQConnectionFactory factory, final int total) { StringBuilder text = new StringBuilder(); text.append(factory + "\n is instance of "); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionTest.java index a442fa5ad2..f13a624c74 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionTest.java @@ -298,7 +298,7 @@ public class ConnectionTest extends JMSTestCase try { - queueConnection.createDurableConnectionConsumer(HornetQServerTestCase.topic1, + queueConnection.createDurableConnectionConsumer(ActiveMQServerTestCase.topic1, "subscriptionName", "", (ServerSessionPool)null, diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/DurableSubscriptionTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/DurableSubscriptionTest.java index a4a95540fb..07c321e82e 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/DurableSubscriptionTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/DurableSubscriptionTest.java @@ -60,10 +60,10 @@ public class DurableSubscriptionTest extends JMSTestCase conn.setClientID("brookeburke"); Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer prod = s.createProducer(HornetQServerTestCase.topic1); + MessageProducer prod = s.createProducer(ActiveMQServerTestCase.topic1); prod.setDeliveryMode(DeliveryMode.PERSISTENT); - s.createDurableSubscriber(HornetQServerTestCase.topic1, "monicabelucci"); + s.createDurableSubscriber(ActiveMQServerTestCase.topic1, "monicabelucci"); List subs = listAllSubscribersForTopic("Topic1"); @@ -88,7 +88,7 @@ public class DurableSubscriptionTest extends JMSTestCase s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer durable = s.createDurableSubscriber(HornetQServerTestCase.topic1, "monicabelucci"); + MessageConsumer durable = s.createDurableSubscriber(ActiveMQServerTestCase.topic1, "monicabelucci"); conn.start(); @@ -130,10 +130,10 @@ public class DurableSubscriptionTest extends JMSTestCase conn.setClientID("brookeburke"); Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer prod = s.createProducer(HornetQServerTestCase.topic1); + MessageProducer prod = s.createProducer(ActiveMQServerTestCase.topic1); prod.setDeliveryMode(DeliveryMode.PERSISTENT); - s.createDurableSubscriber(HornetQServerTestCase.topic1, "monicabelucci"); + s.createDurableSubscriber(ActiveMQServerTestCase.topic1, "monicabelucci"); prod.send(s.createTextMessage("one")); @@ -144,7 +144,7 @@ public class DurableSubscriptionTest extends JMSTestCase conn.setClientID("brookeburke"); s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer durable = s.createDurableSubscriber(HornetQServerTestCase.topic2, "monicabelucci"); + MessageConsumer durable = s.createDurableSubscriber(ActiveMQServerTestCase.topic2, "monicabelucci"); conn.start(); @@ -183,10 +183,10 @@ public class DurableSubscriptionTest extends JMSTestCase conn.setClientID("brookeburke"); Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer prod = s.createProducer(HornetQServerTestCase.topic1); + MessageProducer prod = s.createProducer(ActiveMQServerTestCase.topic1); prod.setDeliveryMode(DeliveryMode.PERSISTENT); - MessageConsumer durable = s.createDurableSubscriber(HornetQServerTestCase.topic1, + MessageConsumer durable = s.createDurableSubscriber(ActiveMQServerTestCase.topic1, "monicabelucci", "color = 'red' AND shape = 'square'", false); @@ -221,7 +221,7 @@ public class DurableSubscriptionTest extends JMSTestCase s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); // modify the selector - durable = s.createDurableSubscriber(HornetQServerTestCase.topic1, "monicabelucci", "color = 'red'", false); + durable = s.createDurableSubscriber(ActiveMQServerTestCase.topic1, "monicabelucci", "color = 'red'", false); conn.start(); @@ -287,8 +287,8 @@ public class DurableSubscriptionTest extends JMSTestCase conn.setClientID("ak47"); Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer cons = s.createDurableSubscriber(HornetQServerTestCase.topic1, "uzzi"); - MessageProducer prod = s.createProducer(HornetQServerTestCase.topic1); + MessageConsumer cons = s.createDurableSubscriber(ActiveMQServerTestCase.topic1, "uzzi"); + MessageProducer prod = s.createProducer(ActiveMQServerTestCase.topic1); prod.setDeliveryMode(DeliveryMode.PERSISTENT); prod.send(s.createTextMessage("one")); @@ -296,7 +296,7 @@ public class DurableSubscriptionTest extends JMSTestCase cons.close(); s.unsubscribe("uzzi"); - MessageConsumer ds = s.createDurableSubscriber(HornetQServerTestCase.topic1, "uzzi"); + MessageConsumer ds = s.createDurableSubscriber(ActiveMQServerTestCase.topic1, "uzzi"); conn.start(); ProxyAssertSupport.assertNull(ds.receive(1000)); @@ -323,7 +323,7 @@ public class DurableSubscriptionTest extends JMSTestCase try { - s.createDurableSubscriber(HornetQServerTestCase.topic1, "mysubscribption", "=TEST 'test'", true); + s.createDurableSubscriber(ActiveMQServerTestCase.topic1, "mysubscribption", "=TEST 'test'", true); ProxyAssertSupport.fail("this should fail"); } catch (InvalidSelectorException e) @@ -341,7 +341,7 @@ public class DurableSubscriptionTest extends JMSTestCase Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - TopicSubscriber dursub = s.createDurableSubscriber(HornetQServerTestCase.topic1, "dursub0"); + TopicSubscriber dursub = s.createDurableSubscriber(ActiveMQServerTestCase.topic1, "dursub0"); try { @@ -366,11 +366,11 @@ public class DurableSubscriptionTest extends JMSTestCase Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - TopicSubscriber dursub1 = s.createDurableSubscriber(HornetQServerTestCase.topic1, "dursub1"); + TopicSubscriber dursub1 = s.createDurableSubscriber(ActiveMQServerTestCase.topic1, "dursub1"); try { - s.createDurableSubscriber(HornetQServerTestCase.topic1, "dursub1"); + s.createDurableSubscriber(ActiveMQServerTestCase.topic1, "dursub1"); ProxyAssertSupport.fail(); } catch (IllegalStateException e) @@ -391,10 +391,10 @@ public class DurableSubscriptionTest extends JMSTestCase Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - TopicSubscriber subscriber = s.createDurableSubscriber(HornetQServerTestCase.topic1, + TopicSubscriber subscriber = s.createDurableSubscriber(ActiveMQServerTestCase.topic1, ".subscription.name.with.periods."); - s.createProducer(HornetQServerTestCase.topic1).send(s.createTextMessage("Subscription test")); + s.createProducer(ActiveMQServerTestCase.topic1).send(s.createTextMessage("Subscription test")); conn.start(); @@ -427,16 +427,16 @@ public class DurableSubscriptionTest extends JMSTestCase Session s1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); Session s2 = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); - TopicSubscriber subscriber1 = s1.createDurableSubscriber(HornetQServerTestCase.topic1, + TopicSubscriber subscriber1 = s1.createDurableSubscriber(ActiveMQServerTestCase.topic1, ".subscription.name.with.periods.", null, noLocal); - TopicSubscriber subscriber2 = s2.createDurableSubscriber(HornetQServerTestCase.topic1, + TopicSubscriber subscriber2 = s2.createDurableSubscriber(ActiveMQServerTestCase.topic1, ".subscription.name.with.periods.", null, false); - s1.createProducer(HornetQServerTestCase.topic1).send(s1.createTextMessage("Subscription test")); + s1.createProducer(ActiveMQServerTestCase.topic1).send(s1.createTextMessage("Subscription test")); conn1.start(); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/JMSTestCase.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/JMSTestCase.java index 867f009da2..b63efe2a2a 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/JMSTestCase.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/JMSTestCase.java @@ -22,11 +22,11 @@ import javax.jms.TopicConnection; import javax.jms.XAConnection; import javax.naming.InitialContext; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.jms.JMSFactoryType; -import org.apache.activemq.jms.client.HornetQJMSConnectionFactory; -import org.apache.activemq.jms.client.HornetQQueueConnectionFactory; -import org.apache.activemq.jms.client.HornetQTopicConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQQueueConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQTopicConnectionFactory; import org.junit.After; import org.junit.Before; @@ -36,7 +36,7 @@ import org.junit.Before; * @author Tim Fox */ @Deprecated -public class JMSTestCase extends HornetQServerTestCase +public class JMSTestCase extends ActiveMQServerTestCase { protected static final ArrayList NETTY_CONNECTOR = new ArrayList(); @@ -46,11 +46,11 @@ public class JMSTestCase extends HornetQServerTestCase NETTY_CONNECTOR.add("netty"); } - protected HornetQJMSConnectionFactory cf; + protected ActiveMQJMSConnectionFactory cf; - protected HornetQQueueConnectionFactory queueCf; + protected ActiveMQQueueConnectionFactory queueCf; - protected HornetQTopicConnectionFactory topicCf; + protected ActiveMQTopicConnectionFactory topicCf; protected InitialContext ic; @@ -75,34 +75,34 @@ public class JMSTestCase extends HornetQServerTestCase JMSFactoryType.CF, NETTY_CONNECTOR, null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, - HornetQClient.DEFAULT_CALL_TIMEOUT, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CALL_TIMEOUT, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, true, true, true, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_RETRY_INTERVAL, - HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, - HornetQClient.DEFAULT_MAX_RETRY_INTERVAL, - HornetQClient.DEFAULT_RECONNECT_ATTEMPTS, - HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS, + ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, null, "/testsuitecf"); @@ -111,34 +111,34 @@ public class JMSTestCase extends HornetQServerTestCase JMSFactoryType.QUEUE_CF, NETTY_CONNECTOR, null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, - HornetQClient.DEFAULT_CALL_TIMEOUT, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CALL_TIMEOUT, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, true, true, true, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_RETRY_INTERVAL, - HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, - HornetQClient.DEFAULT_MAX_RETRY_INTERVAL, - HornetQClient.DEFAULT_RECONNECT_ATTEMPTS, - HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS, + ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, null, "/testsuitecf_queue"); @@ -147,40 +147,40 @@ public class JMSTestCase extends HornetQServerTestCase JMSFactoryType.TOPIC_CF, NETTY_CONNECTOR, null, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, - HornetQClient.DEFAULT_CALL_TIMEOUT, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, - HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CALL_TIMEOUT, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, + ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, true, true, true, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_RETRY_INTERVAL, - HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, - HornetQClient.DEFAULT_MAX_RETRY_INTERVAL, - HornetQClient.DEFAULT_RECONNECT_ATTEMPTS, - HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS, + ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, null, "/testsuitecf_topic"); - cf = (HornetQJMSConnectionFactory)getInitialContext().lookup("/testsuitecf"); - queueCf = (HornetQQueueConnectionFactory)getInitialContext().lookup("/testsuitecf_queue"); - topicCf = (HornetQTopicConnectionFactory)getInitialContext().lookup("/testsuitecf_topic"); + cf = (ActiveMQJMSConnectionFactory)getInitialContext().lookup("/testsuitecf"); + queueCf = (ActiveMQQueueConnectionFactory)getInitialContext().lookup("/testsuitecf_queue"); + topicCf = (ActiveMQTopicConnectionFactory)getInitialContext().lookup("/testsuitecf_topic"); assertRemainingMessages(0); } diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/JmsTestLogger.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/JmsTestLogger.java index c1a91fb717..6de2250817 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/JmsTestLogger.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/JmsTestLogger.java @@ -21,7 +21,7 @@ import org.jboss.logging.annotations.MessageLogger; * 4/17/12 */ -@MessageLogger(projectCode = "HQTEST") +@MessageLogger(projectCode = "AMQTEST") public interface JmsTestLogger extends BasicLogger { /** diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/MessageConsumerTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/MessageConsumerTest.java index 0eb9c35cb8..ecda38b7e1 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/MessageConsumerTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/MessageConsumerTest.java @@ -1445,9 +1445,9 @@ public class MessageConsumerTest extends JMSTestCase Session sess2 = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); Session sess3 = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer cons1 = sess1.createConsumer(HornetQServerTestCase.topic1); - MessageConsumer cons2 = sess2.createConsumer(HornetQServerTestCase.topic1); - MessageConsumer cons3 = sess3.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer cons1 = sess1.createConsumer(ActiveMQServerTestCase.topic1); + MessageConsumer cons2 = sess2.createConsumer(ActiveMQServerTestCase.topic1); + MessageConsumer cons3 = sess3.createConsumer(ActiveMQServerTestCase.topic1); final int NUM_MESSAGES = 10; @@ -1508,7 +1508,7 @@ public class MessageConsumerTest extends JMSTestCase producerConnection.start(); Session prodSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer prod = prodSession.createProducer(HornetQServerTestCase.topic1); + MessageProducer prod = prodSession.createProducer(ActiveMQServerTestCase.topic1); prod.setDeliveryMode(DeliveryMode.NON_PERSISTENT); for (int i = 0; i < NUM_MESSAGES; i++) @@ -1557,7 +1557,7 @@ public class MessageConsumerTest extends JMSTestCase String selector = "JMSType = 'something'"; - MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1, selector); + MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1, selector); ProxyAssertSupport.assertEquals(selector, topicConsumer.getMessageSelector()); } @@ -1581,7 +1581,7 @@ public class MessageConsumerTest extends JMSTestCase Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1); topicConsumer.close(); @@ -1616,7 +1616,7 @@ public class MessageConsumerTest extends JMSTestCase TopicSession consumerSession = tc.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); - TopicSubscriber topicConsumer = consumerSession.createSubscriber(HornetQServerTestCase.topic1); + TopicSubscriber topicConsumer = consumerSession.createSubscriber(ActiveMQServerTestCase.topic1); topicConsumer.close(); @@ -1650,11 +1650,11 @@ public class MessageConsumerTest extends JMSTestCase Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1); Topic t = ((TopicSubscriber) topicConsumer).getTopic(); - ProxyAssertSupport.assertEquals(HornetQServerTestCase.topic1, t); + ProxyAssertSupport.assertEquals(ActiveMQServerTestCase.topic1, t); } finally { @@ -1676,7 +1676,7 @@ public class MessageConsumerTest extends JMSTestCase Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1); topicConsumer.close(); @@ -1770,7 +1770,7 @@ public class MessageConsumerTest extends JMSTestCase Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1); Message m = topicConsumer.receive(1000); @@ -1802,9 +1802,9 @@ public class MessageConsumerTest extends JMSTestCase Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - final MessageProducer topicProducer = producerSession.createProducer(HornetQServerTestCase.topic1); + final MessageProducer topicProducer = producerSession.createProducer(ActiveMQServerTestCase.topic1); - MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1); final Message m = producerSession.createMessage(); new Thread(new Runnable() @@ -1856,9 +1856,9 @@ public class MessageConsumerTest extends JMSTestCase Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - final MessageProducer topicProducer = producerSession.createProducer(HornetQServerTestCase.topic1); + final MessageProducer topicProducer = producerSession.createProducer(ActiveMQServerTestCase.topic1); - MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1); consumerConnection.start(); @@ -1913,9 +1913,9 @@ public class MessageConsumerTest extends JMSTestCase Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - final MessageProducer topicProducer = producerSession.createProducer(HornetQServerTestCase.topic1); + final MessageProducer topicProducer = producerSession.createProducer(ActiveMQServerTestCase.topic1); - MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1); consumerConnection.start(); @@ -1971,9 +1971,9 @@ public class MessageConsumerTest extends JMSTestCase Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - final MessageProducer topicProducer = producerSession.createProducer(HornetQServerTestCase.topic1); + final MessageProducer topicProducer = producerSession.createProducer(ActiveMQServerTestCase.topic1); - MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1); consumerConnection.start(); @@ -2092,9 +2092,9 @@ public class MessageConsumerTest extends JMSTestCase Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - final MessageProducer topicProducer = producerSession.createProducer(HornetQServerTestCase.topic1); + final MessageProducer topicProducer = producerSession.createProducer(ActiveMQServerTestCase.topic1); - MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1); final int count = 1000; @@ -2128,7 +2128,7 @@ public class MessageConsumerTest extends JMSTestCase ProxyAssertSupport.assertNotNull(m); } - checkEmpty(HornetQServerTestCase.topic1); + checkEmpty(ActiveMQServerTestCase.topic1); } finally { @@ -2154,7 +2154,7 @@ public class MessageConsumerTest extends JMSTestCase Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - final MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1); + final MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1); consumerConnection.start(); final CountDownLatch latch = new CountDownLatch(1); @@ -2294,11 +2294,11 @@ public class MessageConsumerTest extends JMSTestCase Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1); // This is a really weird test - the received object is always going to be null since no message is sent!! - HornetQServerTestCase.forceGC(); // / If A GC need to be executed, it' s better to be executed now + ActiveMQServerTestCase.forceGC(); // / If A GC need to be executed, it' s better to be executed now if (log.isTraceEnabled()) { log.trace("testTimeoutReceiveOnClose"); @@ -2356,9 +2356,9 @@ public class MessageConsumerTest extends JMSTestCase Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer topicProducer = producerSession.createProducer(HornetQServerTestCase.topic1); + MessageProducer topicProducer = producerSession.createProducer(ActiveMQServerTestCase.topic1); - MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1); MessageListenerImpl l = new MessageListenerImpl(); topicConsumer.setMessageListener(l); @@ -2404,9 +2404,9 @@ public class MessageConsumerTest extends JMSTestCase Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer topicProducer = producerSession.createProducer(HornetQServerTestCase.topic1); + MessageProducer topicProducer = producerSession.createProducer(ActiveMQServerTestCase.topic1); - MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1); log.debug("testMessageListenerOnTopicMultipleMessages"); @@ -2526,9 +2526,9 @@ public class MessageConsumerTest extends JMSTestCase Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer topicProducer = producerSession.createProducer(HornetQServerTestCase.topic1); + MessageProducer topicProducer = producerSession.createProducer(ActiveMQServerTestCase.topic1); - MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1); MessageListenerImpl listener1 = new MessageListenerImpl(); @@ -2575,7 +2575,7 @@ public class MessageConsumerTest extends JMSTestCase Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - final MessageConsumer topicConsumer = consumerSession.createConsumer(HornetQServerTestCase.topic1); + final MessageConsumer topicConsumer = consumerSession.createConsumer(ActiveMQServerTestCase.topic1); consumerConnection.start(); Thread worker1 = new Thread(new Runnable() @@ -2923,21 +2923,21 @@ public class MessageConsumerTest extends JMSTestCase conn1 = createConnection(); Session sess1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer producer1 = sess1.createProducer(HornetQServerTestCase.topic1); + MessageProducer producer1 = sess1.createProducer(ActiveMQServerTestCase.topic1); producer1.setDeliveryMode(DeliveryMode.NON_PERSISTENT); - MessageConsumer consumer1 = sess1.createConsumer(HornetQServerTestCase.topic1, null, true); + MessageConsumer consumer1 = sess1.createConsumer(ActiveMQServerTestCase.topic1, null, true); conn2 = createConnection(); Session sess2 = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); ProxyAssertSupport.assertEquals(Session.AUTO_ACKNOWLEDGE, sess2.getAcknowledgeMode()); - MessageConsumer consumer2 = sess2.createConsumer(HornetQServerTestCase.topic1, null, true); + MessageConsumer consumer2 = sess2.createConsumer(ActiveMQServerTestCase.topic1, null, true); // we need different session because we cannot access the same session from different // threads Session sess3 = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); ProxyAssertSupport.assertEquals(Session.AUTO_ACKNOWLEDGE, sess3.getAcknowledgeMode()); - MessageConsumer consumer3 = sess3.createConsumer(HornetQServerTestCase.topic1, null, true); + MessageConsumer consumer3 = sess3.createConsumer(ActiveMQServerTestCase.topic1, null, true); // ClientConsumer 1 should not get the message but consumers 2 and 3 should @@ -3021,9 +3021,9 @@ public class MessageConsumerTest extends JMSTestCase Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer prod = sess.createProducer(HornetQServerTestCase.topic1); + MessageProducer prod = sess.createProducer(ActiveMQServerTestCase.topic1); - MessageConsumer cons = sess.createConsumer(HornetQServerTestCase.topic1, null, true); + MessageConsumer cons = sess.createConsumer(ActiveMQServerTestCase.topic1, null, true); final int numMessages = 100; @@ -3038,7 +3038,7 @@ public class MessageConsumerTest extends JMSTestCase ProxyAssertSupport.assertNull(msg); - checkEmpty(HornetQServerTestCase.topic1); + checkEmpty(ActiveMQServerTestCase.topic1); } finally { @@ -3068,14 +3068,14 @@ public class MessageConsumerTest extends JMSTestCase Session sess1 = conn1.createSession(false, Session.CLIENT_ACKNOWLEDGE); Session sess2 = conn1.createSession(false, Session.CLIENT_ACKNOWLEDGE); - MessageConsumer cons1 = sess1.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer cons1 = sess1.createConsumer(ActiveMQServerTestCase.topic1); - MessageConsumer cons2 = sess2.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer cons2 = sess2.createConsumer(ActiveMQServerTestCase.topic1); conn1.start(); Session sess3 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer prod = sess3.createProducer(HornetQServerTestCase.topic1); + MessageProducer prod = sess3.createProducer(ActiveMQServerTestCase.topic1); prod.setDeliveryMode(DeliveryMode.NON_PERSISTENT); TextMessage tm = sess3.createTextMessage("nurse!"); @@ -3138,12 +3138,12 @@ public class MessageConsumerTest extends JMSTestCase final int NUM_MESSAGES = 1; - MessageConsumer cons = sess1.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer cons = sess1.createConsumer(ActiveMQServerTestCase.topic1); for (int i = 0; i < NUM_MESSAGES; i++) { TextMessage tm = sess1.createTextMessage("helloxyz"); - prod.send(HornetQServerTestCase.topic1, tm); + prod.send(ActiveMQServerTestCase.topic1, tm); } // receive but don't ack @@ -3165,7 +3165,7 @@ public class MessageConsumerTest extends JMSTestCase conn1 = null; - checkEmpty(HornetQServerTestCase.topic1); + checkEmpty(ActiveMQServerTestCase.topic1); } finally { @@ -3284,7 +3284,7 @@ public class MessageConsumerTest extends JMSTestCase MessageProducer prod = sess1.createProducer(null); prod.setDeliveryMode(DeliveryMode.PERSISTENT); - MessageConsumer durable = sess1.createDurableSubscriber(HornetQServerTestCase.topic1, "mySubscription"); + MessageConsumer durable = sess1.createDurableSubscriber(ActiveMQServerTestCase.topic1, "mySubscription"); conn1.start(); @@ -3293,7 +3293,7 @@ public class MessageConsumerTest extends JMSTestCase for (int i = 0; i < NUM_MESSAGES; i++) { TextMessage tm = sess1.createTextMessage("hello"); - prod.send(HornetQServerTestCase.topic1, tm); + prod.send(ActiveMQServerTestCase.topic1, tm); } int count = 0; @@ -3339,9 +3339,9 @@ public class MessageConsumerTest extends JMSTestCase Session sess1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); - sess1.createDurableSubscriber(HornetQServerTestCase.topic1, "mySubscription1"); + sess1.createDurableSubscriber(ActiveMQServerTestCase.topic1, "mySubscription1"); - sess1.createDurableSubscriber(HornetQServerTestCase.topic1, "mySubscription2"); + sess1.createDurableSubscriber(ActiveMQServerTestCase.topic1, "mySubscription2"); conn1.close(); @@ -3349,7 +3349,7 @@ public class MessageConsumerTest extends JMSTestCase conn2.setClientID(CLIENT_ID1); Session sess2 = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer producer = sess2.createProducer(HornetQServerTestCase.topic1); + MessageProducer producer = sess2.createProducer(ActiveMQServerTestCase.topic1); producer.setDeliveryMode(DeliveryMode.PERSISTENT); final int NUM_MESSAGES = 50; @@ -3368,7 +3368,7 @@ public class MessageConsumerTest extends JMSTestCase conn3.setClientID(CLIENT_ID1); conn3.start(); Session sess3 = conn3.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer durable3 = sess3.createDurableSubscriber(HornetQServerTestCase.topic1, "mySubscription2"); + MessageConsumer durable3 = sess3.createDurableSubscriber(ActiveMQServerTestCase.topic1, "mySubscription2"); int count = 0; while (true) @@ -3386,7 +3386,7 @@ public class MessageConsumerTest extends JMSTestCase log.debug("received " + NUM_MESSAGES + " messages"); - MessageConsumer durable4 = sess3.createDurableSubscriber(HornetQServerTestCase.topic1, "mySubscription1"); + MessageConsumer durable4 = sess3.createDurableSubscriber(ActiveMQServerTestCase.topic1, "mySubscription1"); Message m = durable4.receive(1000); ProxyAssertSupport.assertNull(m); @@ -3439,7 +3439,7 @@ public class MessageConsumerTest extends JMSTestCase conn1 = createConnection(); conn1.setClientID(CLIENT_ID1); sess1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer durable = sess1.createDurableSubscriber(HornetQServerTestCase.topic1, "mySubscription"); + MessageConsumer durable = sess1.createDurableSubscriber(ActiveMQServerTestCase.topic1, "mySubscription"); conn1.close(); // Send some messages on another connection and close it @@ -3452,7 +3452,7 @@ public class MessageConsumerTest extends JMSTestCase for (int i = 0; i < NUM_MESSAGES; i++) { TextMessage tm = sess2.createTextMessage("hello"); - prod2.send(HornetQServerTestCase.topic1, tm); + prod2.send(ActiveMQServerTestCase.topic1, tm); } conn2.close(); @@ -3461,7 +3461,7 @@ public class MessageConsumerTest extends JMSTestCase conn3.setClientID(CLIENT_ID1); conn3.start(); sess3 = conn3.createSession(false, Session.AUTO_ACKNOWLEDGE); - durable = sess3.createDurableSubscriber(HornetQServerTestCase.topic1, "mySubscription"); + durable = sess3.createDurableSubscriber(ActiveMQServerTestCase.topic1, "mySubscription"); int count = 0; while (true) { @@ -3481,7 +3481,7 @@ public class MessageConsumerTest extends JMSTestCase conn4.setClientID(CLIENT_ID1); conn4.start(); sess4 = conn4.createSession(false, Session.AUTO_ACKNOWLEDGE); - durable = sess4.createDurableSubscriber(HornetQServerTestCase.topic1, "mySubscription"); + durable = sess4.createDurableSubscriber(ActiveMQServerTestCase.topic1, "mySubscription"); TextMessage tm = (TextMessage) durable.receive(1000); ProxyAssertSupport.assertNull(tm); @@ -3499,7 +3499,7 @@ public class MessageConsumerTest extends JMSTestCase for (int i = 0; i < NUM_MESSAGES; i++) { TextMessage tm2 = sess5.createTextMessage("hello"); - prod5.send(HornetQServerTestCase.topic1, tm2); + prod5.send(ActiveMQServerTestCase.topic1, tm2); } log.debug("unsubscribing mySubscription"); @@ -3514,7 +3514,7 @@ public class MessageConsumerTest extends JMSTestCase conn6.setClientID(CLIENT_ID1); conn6.start(); sess6 = conn6.createSession(false, Session.AUTO_ACKNOWLEDGE); - durable = sess6.createDurableSubscriber(HornetQServerTestCase.topic1, "mySubscription"); + durable = sess6.createDurableSubscriber(ActiveMQServerTestCase.topic1, "mySubscription"); TextMessage tm3 = (TextMessage) durable.receive(1000); ProxyAssertSupport.assertNull(tm3); @@ -3571,7 +3571,7 @@ public class MessageConsumerTest extends JMSTestCase MessageProducer prod = sess1.createProducer(null); prod.setDeliveryMode(DeliveryMode.PERSISTENT); - MessageConsumer durable = sess1.createDurableSubscriber(HornetQServerTestCase.topic1, "mySubscription"); + MessageConsumer durable = sess1.createDurableSubscriber(ActiveMQServerTestCase.topic1, "mySubscription"); conn1.start(); @@ -3580,7 +3580,7 @@ public class MessageConsumerTest extends JMSTestCase for (int i = 0; i < NUM_MESSAGES; i++) { TextMessage tm = sess1.createTextMessage("hello"); - prod.send(HornetQServerTestCase.topic1, tm); + prod.send(ActiveMQServerTestCase.topic1, tm); } final int NUM_TO_RECEIVE = NUM_MESSAGES - 1; @@ -3603,7 +3603,7 @@ public class MessageConsumerTest extends JMSTestCase // Re-subscribe to the subscription - MessageConsumer durable2 = sess2.createDurableSubscriber(HornetQServerTestCase.topic1, "mySubscription"); + MessageConsumer durable2 = sess2.createDurableSubscriber(ActiveMQServerTestCase.topic1, "mySubscription"); conn2.start(); @@ -3656,7 +3656,7 @@ public class MessageConsumerTest extends JMSTestCase MessageProducer prod = sess1.createProducer(null); prod.setDeliveryMode(DeliveryMode.PERSISTENT); - MessageConsumer durable = sess1.createDurableSubscriber(HornetQServerTestCase.topic1, "mySubscription"); + MessageConsumer durable = sess1.createDurableSubscriber(ActiveMQServerTestCase.topic1, "mySubscription"); conn1.start(); @@ -3665,7 +3665,7 @@ public class MessageConsumerTest extends JMSTestCase for (int i = 0; i < NUM_MESSAGES; i++) { TextMessage tm = sess1.createTextMessage("hello"); - prod.send(HornetQServerTestCase.topic1, tm); + prod.send(ActiveMQServerTestCase.topic1, tm); } final int NUM_TO_RECEIVE1 = 22; @@ -3690,7 +3690,7 @@ public class MessageConsumerTest extends JMSTestCase Session sess2 = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); // Re-subscribe to the subscription - MessageConsumer durable2 = sess2.createDurableSubscriber(HornetQServerTestCase.topic1, "mySubscription"); + MessageConsumer durable2 = sess2.createDurableSubscriber(ActiveMQServerTestCase.topic1, "mySubscription"); conn2.start(); @@ -3777,7 +3777,7 @@ public class MessageConsumerTest extends JMSTestCase try { - sess1.createDurableSubscriber(HornetQServerTestCase.topic1, "mySubscription"); + sess1.createDurableSubscriber(ActiveMQServerTestCase.topic1, "mySubscription"); ProxyAssertSupport.fail(); } catch (JMSException e) diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/MessageProducerTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/MessageProducerTest.java index 6bc6b63e5e..aac91f0b86 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/MessageProducerTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/MessageProducerTest.java @@ -27,7 +27,7 @@ import java.io.Serializable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.jms.tests.message.SimpleJMSMessage; import org.apache.activemq.jms.tests.message.SimpleJMSTextMessage; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; @@ -226,11 +226,11 @@ public class MessageProducerTest extends JMSTestCase { Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); Session cs = cconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - final MessageProducer p = ps.createProducer(HornetQServerTestCase.topic1); + final MessageProducer p = ps.createProducer(ActiveMQServerTestCase.topic1); p.setDeliveryMode(persistent ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT); - MessageConsumer c = cs.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer c = cs.createConsumer(ActiveMQServerTestCase.topic1); cconn.start(); @@ -275,7 +275,7 @@ public class MessageProducerTest extends JMSTestCase { Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); Session cs = cconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer c2 = cs.createConsumer(HornetQServerTestCase.topic2); + MessageConsumer c2 = cs.createConsumer(ActiveMQServerTestCase.topic2); final Message m1 = ps.createMessage(); cconn.start(); @@ -288,7 +288,7 @@ public class MessageProducerTest extends JMSTestCase { try { - anonProducer.send(HornetQServerTestCase.topic2, m1); + anonProducer.send(ActiveMQServerTestCase.topic2, m1); } catch (Exception e) { @@ -349,9 +349,9 @@ public class MessageProducerTest extends JMSTestCase try { Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer p = ps.createProducer(ActiveMQServerTestCase.topic1); Destination dest = p.getDestination(); - ProxyAssertSupport.assertEquals(dest, HornetQServerTestCase.topic1); + ProxyAssertSupport.assertEquals(dest, ActiveMQServerTestCase.topic1); } finally { @@ -367,7 +367,7 @@ public class MessageProducerTest extends JMSTestCase try { Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer p = ps.createProducer(ActiveMQServerTestCase.topic1); p.close(); try @@ -395,7 +395,7 @@ public class MessageProducerTest extends JMSTestCase Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); try { - ps.createProducer(HornetQJMSClient.createTopic("NoSuchTopic")); + ps.createProducer(ActiveMQJMSClient.createTopic("NoSuchTopic")); ProxyAssertSupport.fail("should throw exception"); } catch (InvalidDestinationException e) @@ -421,7 +421,7 @@ public class MessageProducerTest extends JMSTestCase try { Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer p = ps.createProducer(ActiveMQServerTestCase.topic1); ProxyAssertSupport.assertFalse(p.getDisableMessageID()); } @@ -439,7 +439,7 @@ public class MessageProducerTest extends JMSTestCase try { Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer p = ps.createProducer(ActiveMQServerTestCase.topic1); p.close(); @@ -471,7 +471,7 @@ public class MessageProducerTest extends JMSTestCase try { Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer tp = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer tp = ps.createProducer(ActiveMQServerTestCase.topic1); MessageProducer qp = ps.createProducer(queue1); ProxyAssertSupport.assertFalse(tp.getDisableMessageTimestamp()); ProxyAssertSupport.assertFalse(qp.getDisableMessageTimestamp()); @@ -536,7 +536,7 @@ public class MessageProducerTest extends JMSTestCase try { Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer p = ps.createProducer(ActiveMQServerTestCase.topic1); p.close(); @@ -568,7 +568,7 @@ public class MessageProducerTest extends JMSTestCase try { Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer tp = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer tp = ps.createProducer(ActiveMQServerTestCase.topic1); MessageProducer qp = ps.createProducer(queue1); ProxyAssertSupport.assertEquals(DeliveryMode.PERSISTENT, tp.getDeliveryMode()); @@ -588,7 +588,7 @@ public class MessageProducerTest extends JMSTestCase try { Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer p = ps.createProducer(ActiveMQServerTestCase.topic1); p.setDeliveryMode(DeliveryMode.NON_PERSISTENT); ProxyAssertSupport.assertEquals(DeliveryMode.NON_PERSISTENT, p.getDeliveryMode()); @@ -610,7 +610,7 @@ public class MessageProducerTest extends JMSTestCase try { Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer p = ps.createProducer(ActiveMQServerTestCase.topic1); p.close(); @@ -642,7 +642,7 @@ public class MessageProducerTest extends JMSTestCase try { Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer tp = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer tp = ps.createProducer(ActiveMQServerTestCase.topic1); MessageProducer qp = ps.createProducer(queue1); ProxyAssertSupport.assertEquals(4, tp.getPriority()); @@ -662,7 +662,7 @@ public class MessageProducerTest extends JMSTestCase try { Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer p = ps.createProducer(ActiveMQServerTestCase.topic1); p.setPriority(9); ProxyAssertSupport.assertEquals(9, p.getPriority()); @@ -684,7 +684,7 @@ public class MessageProducerTest extends JMSTestCase try { Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer p = ps.createProducer(ActiveMQServerTestCase.topic1); p.close(); @@ -713,7 +713,7 @@ public class MessageProducerTest extends JMSTestCase { Connection pconn = createConnection(); Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer tp = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer tp = ps.createProducer(ActiveMQServerTestCase.topic1); MessageProducer qp = ps.createProducer(queue1); ProxyAssertSupport.assertEquals(0L, tp.getTimeToLive()); @@ -725,7 +725,7 @@ public class MessageProducerTest extends JMSTestCase { Connection pconn = createConnection(); Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer p = ps.createProducer(ActiveMQServerTestCase.topic1); p.setTimeToLive(100L); ProxyAssertSupport.assertEquals(100L, p.getTimeToLive()); @@ -740,7 +740,7 @@ public class MessageProducerTest extends JMSTestCase Connection pconn = createConnection(); Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer p = ps.createProducer(ActiveMQServerTestCase.topic1); p.close(); @@ -761,7 +761,7 @@ public class MessageProducerTest extends JMSTestCase Connection pconn = createConnection(); Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer p = ps.createProducer(ActiveMQServerTestCase.topic1); CountDownLatch latch = new CountDownLatch(1); CloseCompletionListener listener = new CloseCompletionListener(p, latch); @@ -783,7 +783,7 @@ public class MessageProducerTest extends JMSTestCase Connection pconn = createConnection(); Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer p = ps.createProducer(ActiveMQServerTestCase.topic1); CountDownLatch latch = new CountDownLatch(1); ConnectionCloseCompletionListener listener = new ConnectionCloseCompletionListener(pconn, latch); @@ -805,7 +805,7 @@ public class MessageProducerTest extends JMSTestCase Connection pconn = createConnection(); Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = ps.createProducer(HornetQServerTestCase.topic1); + MessageProducer p = ps.createProducer(ActiveMQServerTestCase.topic1); CountDownLatch latch = new CountDownLatch(1); SessionCloseCompletionListener listener = new SessionCloseCompletionListener(ps, latch); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/NonDurableSubscriberTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/NonDurableSubscriberTest.java index 1b54ba7641..576a7b822a 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/NonDurableSubscriberTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/NonDurableSubscriberTest.java @@ -93,7 +93,7 @@ public class NonDurableSubscriberTest extends JMSTestCase try { - s.createSubscriber(HornetQServerTestCase.topic1, "=TEST 'test'", false); + s.createSubscriber(ActiveMQServerTestCase.topic1, "=TEST 'test'", false); ProxyAssertSupport.fail("this should fail"); } catch (InvalidSelectorException e) diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/PersistenceTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/PersistenceTest.java index 1eb74acbfe..fb2f512442 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/PersistenceTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/PersistenceTest.java @@ -55,7 +55,7 @@ public class PersistenceTest extends JMSTestCase startNoDelete(); - // HornetQ server restart implies new ConnectionFactory lookup + // ActiveMQ server restart implies new ConnectionFactory lookup deployAndLookupAdministeredObjects(); conn = createConnection(); @@ -146,7 +146,7 @@ public class PersistenceTest extends JMSTestCase startNoDelete(); - // HornetQ server restart implies new ConnectionFactory lookup + // ActiveMQ server restart implies new ConnectionFactory lookup deployAndLookupAdministeredObjects(); conn = createConnection(); @@ -217,7 +217,7 @@ public class PersistenceTest extends JMSTestCase startNoDelete(); - // HornetQ server restart implies new ConnectionFactory lookup + // ActiveMQ server restart implies new ConnectionFactory lookup deployAndLookupAdministeredObjects(); conn = createConnection(); @@ -417,9 +417,9 @@ public class PersistenceTest extends JMSTestCase Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer ds = s.createDurableSubscriber(HornetQServerTestCase.topic1, "sub", null, false); + MessageConsumer ds = s.createDurableSubscriber(ActiveMQServerTestCase.topic1, "sub", null, false); - MessageProducer p = s.createProducer(HornetQServerTestCase.topic1); + MessageProducer p = s.createProducer(ActiveMQServerTestCase.topic1); p.setDeliveryMode(DeliveryMode.PERSISTENT); TextMessage tm = s.createTextMessage("thebody"); @@ -440,7 +440,7 @@ public class PersistenceTest extends JMSTestCase s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); conn.start(); - ds = s.createDurableSubscriber(HornetQServerTestCase.topic1, "sub", null, false); + ds = s.createDurableSubscriber(ActiveMQServerTestCase.topic1, "sub", null, false); TextMessage rm = (TextMessage)ds.receive(3000); ProxyAssertSupport.assertNotNull(rm); @@ -474,12 +474,12 @@ public class PersistenceTest extends JMSTestCase Session sessConsume = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer sub1 = sessConsume.createDurableSubscriber(HornetQServerTestCase.topic1, "sub1", null, false); - MessageConsumer sub2 = sessConsume.createDurableSubscriber(HornetQServerTestCase.topic1, "sub2", null, false); - MessageConsumer sub3 = sessConsume.createDurableSubscriber(HornetQServerTestCase.topic1, "sub3", null, false); + MessageConsumer sub1 = sessConsume.createDurableSubscriber(ActiveMQServerTestCase.topic1, "sub1", null, false); + MessageConsumer sub2 = sessConsume.createDurableSubscriber(ActiveMQServerTestCase.topic1, "sub2", null, false); + MessageConsumer sub3 = sessConsume.createDurableSubscriber(ActiveMQServerTestCase.topic1, "sub3", null, false); Session sessSend = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer prod = sessSend.createProducer(HornetQServerTestCase.topic1); + MessageProducer prod = sessSend.createProducer(ActiveMQServerTestCase.topic1); prod.setDeliveryMode(DeliveryMode.PERSISTENT); for (int i = 0; i < 10; i++) @@ -494,7 +494,7 @@ public class PersistenceTest extends JMSTestCase startNoDelete(); - // HornetQ server restart implies new ConnectionFactory lookup + // ActiveMQ server restart implies new ConnectionFactory lookup deployAndLookupAdministeredObjects(); conn = createConnection(); @@ -503,9 +503,9 @@ public class PersistenceTest extends JMSTestCase sessConsume = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); conn.start(); - sub1 = sessConsume.createDurableSubscriber(HornetQServerTestCase.topic1, "sub1", null, false); - sub2 = sessConsume.createDurableSubscriber(HornetQServerTestCase.topic1, "sub2", null, false); - sub3 = sessConsume.createDurableSubscriber(HornetQServerTestCase.topic1, "sub3", null, false); + sub1 = sessConsume.createDurableSubscriber(ActiveMQServerTestCase.topic1, "sub1", null, false); + sub2 = sessConsume.createDurableSubscriber(ActiveMQServerTestCase.topic1, "sub2", null, false); + sub3 = sessConsume.createDurableSubscriber(ActiveMQServerTestCase.topic1, "sub3", null, false); for (int i = 0; i < 10; i++) { diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/QueueTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/QueueTest.java index 9fd79c8068..9d589b01f2 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/QueueTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/QueueTest.java @@ -89,7 +89,7 @@ public class QueueTest extends JMSTestCase startNoDelete(); - // HornetQ server restart implies new ConnectionFactory lookup + // ActiveMQ server restart implies new ConnectionFactory lookup deployAndLookupAdministeredObjects(); conn = createConnection(); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ReferenceableTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ReferenceableTest.java index fbd2ac07bc..da25efb4ba 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ReferenceableTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ReferenceableTest.java @@ -23,11 +23,11 @@ import javax.naming.Reference; import javax.naming.Referenceable; import java.io.Serializable; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; -import org.apache.activemq.jms.client.HornetQJMSConnectionFactory; -import org.apache.activemq.jms.client.HornetQQueue; -import org.apache.activemq.jms.client.HornetQTopic; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; +import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQQueue; +import org.apache.activemq.jms.client.ActiveMQTopic; import org.apache.activemq.jms.referenceable.ConnectionFactoryObjectFactory; import org.apache.activemq.jms.referenceable.DestinationObjectFactory; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; @@ -61,7 +61,7 @@ public class ReferenceableTest extends JMSTestCase ProxyAssertSupport.assertTrue(queue1 instanceof Serializable); - ProxyAssertSupport.assertTrue(HornetQServerTestCase.topic1 instanceof Serializable); + ProxyAssertSupport.assertTrue(ActiveMQServerTestCase.topic1 instanceof Serializable); } @SuppressWarnings("cast") @@ -72,7 +72,7 @@ public class ReferenceableTest extends JMSTestCase ProxyAssertSupport.assertTrue(queue1 instanceof Referenceable); - ProxyAssertSupport.assertTrue(HornetQServerTestCase.topic1 instanceof Referenceable); + ProxyAssertSupport.assertTrue(ActiveMQServerTestCase.topic1 instanceof Referenceable); } @Test @@ -88,9 +88,9 @@ public class ReferenceableTest extends JMSTestCase Object instance = factory.getObjectInstance(cfRef, null, null, null); - ProxyAssertSupport.assertTrue(instance instanceof HornetQConnectionFactory); + ProxyAssertSupport.assertTrue(instance instanceof ActiveMQConnectionFactory); - HornetQJMSConnectionFactory cf2 = (HornetQJMSConnectionFactory) instance; + ActiveMQJMSConnectionFactory cf2 = (ActiveMQJMSConnectionFactory) instance; simpleSendReceive(cf2, queue1); } @@ -108,9 +108,9 @@ public class ReferenceableTest extends JMSTestCase Object instance = factory.getObjectInstance(queueRef, null, null, null); - ProxyAssertSupport.assertTrue(instance instanceof HornetQDestination); + ProxyAssertSupport.assertTrue(instance instanceof ActiveMQDestination); - HornetQQueue queue2 = (HornetQQueue) instance; + ActiveMQQueue queue2 = (ActiveMQQueue) instance; ProxyAssertSupport.assertEquals(queue1.getQueueName(), queue2.getQueueName()); @@ -120,7 +120,7 @@ public class ReferenceableTest extends JMSTestCase @Test public void testReferenceTopic() throws Exception { - Reference topicRef = ((Referenceable) HornetQServerTestCase.topic1).getReference(); + Reference topicRef = ((Referenceable) ActiveMQServerTestCase.topic1).getReference(); String factoryName = topicRef.getFactoryClassName(); @@ -130,11 +130,11 @@ public class ReferenceableTest extends JMSTestCase Object instance = factory.getObjectInstance(topicRef, null, null, null); - ProxyAssertSupport.assertTrue(instance instanceof HornetQDestination); + ProxyAssertSupport.assertTrue(instance instanceof ActiveMQDestination); - HornetQTopic topic2 = (HornetQTopic) instance; + ActiveMQTopic topic2 = (ActiveMQTopic) instance; - ProxyAssertSupport.assertEquals(HornetQServerTestCase.topic1.getTopicName(), topic2.getTopicName()); + ProxyAssertSupport.assertEquals(ActiveMQServerTestCase.topic1.getTopicName(), topic2.getTopicName()); simpleSendReceive(cf, topic2); } diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/SecurityTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/SecurityTest.java index 3f3084863e..e7cc2054df 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/SecurityTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/SecurityTest.java @@ -112,7 +112,7 @@ public class SecurityTest extends JMSTestCase Connection conn = null; try { - HornetQServerTestCase.deployConnectionFactory("dilbert-id", "preConfcf", "preConfcf"); + ActiveMQServerTestCase.deployConnectionFactory("dilbert-id", "preConfcf", "preConfcf"); ConnectionFactory cf = (ConnectionFactory) getInitialContext().lookup("preConfcf"); conn = cf.createConnection("guest", "guest"); String clientID = conn.getClientID(); @@ -124,7 +124,7 @@ public class SecurityTest extends JMSTestCase { conn.close(); } - HornetQServerTestCase.undeployConnectionFactory("preConfcf"); + ActiveMQServerTestCase.undeployConnectionFactory("preConfcf"); } } @@ -149,7 +149,7 @@ public class SecurityTest extends JMSTestCase Connection conn = null; try { - HornetQServerTestCase.deployConnectionFactory("dilbert-id", "preConfcf", "preConfcf"); + ActiveMQServerTestCase.deployConnectionFactory("dilbert-id", "preConfcf", "preConfcf"); ConnectionFactory cf = (ConnectionFactory) getInitialContext().lookup("preConfcf"); conn = cf.createConnection("guest", "guest"); conn.setClientID("myID"); @@ -165,7 +165,7 @@ public class SecurityTest extends JMSTestCase { conn.close(); } - HornetQServerTestCase.undeployConnectionFactory("preConfcf"); + ActiveMQServerTestCase.undeployConnectionFactory("preConfcf"); } } diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/SessionTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/SessionTest.java index ebbf896c70..e556c99676 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/SessionTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/SessionTest.java @@ -37,7 +37,7 @@ import org.junit.Test; * @author Ovidiu Feodorov * */ -public class SessionTest extends HornetQServerTestCase +public class SessionTest extends ActiveMQServerTestCase { // Constants ----------------------------------------------------- @@ -54,7 +54,7 @@ public class SessionTest extends HornetQServerTestCase { Connection conn = getConnectionFactory().createConnection(); Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - sess.createProducer(HornetQServerTestCase.topic1); + sess.createProducer(ActiveMQServerTestCase.topic1); conn.close(); } @@ -86,7 +86,7 @@ public class SessionTest extends HornetQServerTestCase Connection conn = getConnectionFactory().createConnection(); Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - sess.createConsumer(HornetQServerTestCase.topic1); + sess.createConsumer(ActiveMQServerTestCase.topic1); conn.close(); } diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/TopicTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/TopicTest.java index 9318370fcf..5e29df9e09 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/TopicTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/TopicTest.java @@ -51,8 +51,8 @@ public class TopicTest extends JMSTestCase Connection conn = createConnection(); Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = s.createProducer(HornetQServerTestCase.topic1); - MessageConsumer c = s.createConsumer(HornetQServerTestCase.topic1); + MessageProducer p = s.createProducer(ActiveMQServerTestCase.topic1); + MessageConsumer c = s.createConsumer(ActiveMQServerTestCase.topic1); conn.start(); p.send(s.createTextMessage("payload")); @@ -67,8 +67,8 @@ public class TopicTest extends JMSTestCase Connection conn = createConnection(); Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = s.createProducer(HornetQServerTestCase.topic1); - MessageConsumer c = s.createConsumer(HornetQServerTestCase.topic1); + MessageProducer p = s.createProducer(ActiveMQServerTestCase.topic1); + MessageConsumer c = s.createConsumer(ActiveMQServerTestCase.topic1); conn.start(); p.send(s.createTextMessage("payload")); @@ -94,16 +94,16 @@ public class TopicTest extends JMSTestCase Session sSend = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer prod = sSend.createProducer(HornetQServerTestCase.topic1); + MessageProducer prod = sSend.createProducer(ActiveMQServerTestCase.topic1); prod.setDeliveryMode(DeliveryMode.NON_PERSISTENT); Session s1 = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); Session s2 = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); Session s3 = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer c1 = s1.createConsumer(HornetQServerTestCase.topic1); - MessageConsumer c2 = s2.createConsumer(HornetQServerTestCase.topic1); - MessageConsumer c3 = s3.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer c1 = s1.createConsumer(ActiveMQServerTestCase.topic1); + MessageConsumer c2 = s2.createConsumer(ActiveMQServerTestCase.topic1); + MessageConsumer c3 = s3.createConsumer(ActiveMQServerTestCase.topic1); final int numMessages = 500; diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/TransactedSessionTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/TransactedSessionTest.java index 03164b871f..eb893fd0a3 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/TransactedSessionTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/TransactedSessionTest.java @@ -94,9 +94,9 @@ public class TransactedSessionTest extends JMSTestCase Session sessSend = conn.createSession(true, Session.SESSION_TRANSACTED); Session sess1 = conn.createSession(true, Session.SESSION_TRANSACTED); - MessageConsumer consumer1 = sess1.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer consumer1 = sess1.createConsumer(ActiveMQServerTestCase.topic1); - MessageProducer producer = sessSend.createProducer(HornetQServerTestCase.topic1); + MessageProducer producer = sessSend.createProducer(ActiveMQServerTestCase.topic1); Message mSent = sessSend.createTextMessage("igloo"); producer.send(mSent); sessSend.commit(); @@ -139,9 +139,9 @@ public class TransactedSessionTest extends JMSTestCase conn = createConnection(); Session sess = conn.createSession(true, Session.SESSION_TRANSACTED); - MessageProducer producer = sess.createProducer(HornetQServerTestCase.topic1); + MessageProducer producer = sess.createProducer(ActiveMQServerTestCase.topic1); - MessageConsumer consumer = sess.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer consumer = sess.createConsumer(ActiveMQServerTestCase.topic1); conn.start(); Message mSent = sess.createTextMessage("igloo"); @@ -183,9 +183,9 @@ public class TransactedSessionTest extends JMSTestCase conn = createConnection(); Session sess = conn.createSession(true, Session.SESSION_TRANSACTED); - MessageProducer producer = sess.createProducer(HornetQServerTestCase.topic1); + MessageProducer producer = sess.createProducer(ActiveMQServerTestCase.topic1); - MessageConsumer consumer = sess.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer consumer = sess.createConsumer(ActiveMQServerTestCase.topic1); conn.start(); log.info("sending message first time"); @@ -242,10 +242,10 @@ public class TransactedSessionTest extends JMSTestCase conn = createConnection(); Session producerSess = conn.createSession(true, Session.SESSION_TRANSACTED); - MessageProducer producer = producerSess.createProducer(HornetQServerTestCase.topic1); + MessageProducer producer = producerSess.createProducer(ActiveMQServerTestCase.topic1); Session consumerSess = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE); - MessageConsumer consumer = consumerSess.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer consumer = consumerSess.createConsumer(ActiveMQServerTestCase.topic1); conn.start(); final int NUM_MESSAGES = 10; @@ -283,10 +283,10 @@ public class TransactedSessionTest extends JMSTestCase conn = createConnection(); Session producerSess = conn.createSession(true, Session.SESSION_TRANSACTED); - MessageProducer producer = producerSess.createProducer(HornetQServerTestCase.topic1); + MessageProducer producer = producerSess.createProducer(ActiveMQServerTestCase.topic1); Session consumerSess = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE); - MessageConsumer consumer = consumerSess.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer consumer = consumerSess.createConsumer(ActiveMQServerTestCase.topic1); conn.start(); final int NUM_MESSAGES = 10; @@ -339,10 +339,10 @@ public class TransactedSessionTest extends JMSTestCase conn = createConnection(); Session producerSess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer producer = producerSess.createProducer(HornetQServerTestCase.topic1); + MessageProducer producer = producerSess.createProducer(ActiveMQServerTestCase.topic1); Session consumerSess = conn.createSession(true, Session.SESSION_TRANSACTED); - MessageConsumer consumer = consumerSess.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer consumer = consumerSess.createConsumer(ActiveMQServerTestCase.topic1); conn.start(); final int NUM_MESSAGES = 10; @@ -409,10 +409,10 @@ public class TransactedSessionTest extends JMSTestCase conn = createConnection(); Session producerSess = conn.createSession(true, Session.SESSION_TRANSACTED); - MessageProducer producer = producerSess.createProducer(HornetQServerTestCase.topic1); + MessageProducer producer = producerSess.createProducer(ActiveMQServerTestCase.topic1); Session consumerSess = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE); - MessageConsumer consumer = consumerSess.createConsumer(HornetQServerTestCase.topic1); + MessageConsumer consumer = consumerSess.createConsumer(ActiveMQServerTestCase.topic1); conn.start(); final int NUM_MESSAGES = 10; diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/XARecoveryTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/XARecoveryTest.java index 050f9d9214..7c1e83bd40 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/XARecoveryTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/XARecoveryTest.java @@ -1879,11 +1879,11 @@ public class XARecoveryTest extends JMSTestCase Session sess1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer prod1 = sess1.createProducer(HornetQServerTestCase.topic2); + MessageProducer prod1 = sess1.createProducer(ActiveMQServerTestCase.topic2); - MessageConsumer sub1 = sess1.createDurableSubscriber(HornetQServerTestCase.topic2, "sub1"); + MessageConsumer sub1 = sess1.createDurableSubscriber(ActiveMQServerTestCase.topic2, "sub1"); - MessageConsumer sub2 = sess1.createDurableSubscriber(HornetQServerTestCase.topic2, "sub2"); + MessageConsumer sub2 = sess1.createDurableSubscriber(ActiveMQServerTestCase.topic2, "sub2"); // send four messages @@ -1917,7 +1917,7 @@ public class XARecoveryTest extends JMSTestCase // Now send four more messages in a global tx - MessageProducer prod2 = sess2.createProducer(HornetQServerTestCase.topic2); + MessageProducer prod2 = sess2.createProducer(ActiveMQServerTestCase.topic2); TextMessage tm5 = sess2.createTextMessage("tm5"); TextMessage tm6 = sess2.createTextMessage("tm6"); @@ -1931,9 +1931,9 @@ public class XARecoveryTest extends JMSTestCase // And consume the first four from each in the tx - sub1 = sess2.createDurableSubscriber(HornetQServerTestCase.topic2, "sub1"); + sub1 = sess2.createDurableSubscriber(ActiveMQServerTestCase.topic2, "sub1"); - sub2 = sess2.createDurableSubscriber(HornetQServerTestCase.topic2, "sub2"); + sub2 = sess2.createDurableSubscriber(ActiveMQServerTestCase.topic2, "sub2"); TextMessage rm1 = (TextMessage) sub1.receive(1000); ProxyAssertSupport.assertNotNull(rm1); @@ -2016,9 +2016,9 @@ public class XARecoveryTest extends JMSTestCase // Should now see the last 4 messages - sub1 = sess1.createDurableSubscriber(HornetQServerTestCase.topic2, "sub1"); + sub1 = sess1.createDurableSubscriber(ActiveMQServerTestCase.topic2, "sub1"); - sub2 = sess1.createDurableSubscriber(HornetQServerTestCase.topic2, "sub2"); + sub2 = sess1.createDurableSubscriber(ActiveMQServerTestCase.topic2, "sub2"); TextMessage rm5 = (TextMessage) sub1.receive(1000); ProxyAssertSupport.assertNotNull(rm5); @@ -2136,11 +2136,11 @@ public class XARecoveryTest extends JMSTestCase Session sess1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer prod1 = sess1.createProducer(HornetQServerTestCase.topic2); + MessageProducer prod1 = sess1.createProducer(ActiveMQServerTestCase.topic2); - MessageConsumer sub1 = sess1.createDurableSubscriber(HornetQServerTestCase.topic2, "sub1"); + MessageConsumer sub1 = sess1.createDurableSubscriber(ActiveMQServerTestCase.topic2, "sub1"); - MessageConsumer sub2 = sess1.createDurableSubscriber(HornetQServerTestCase.topic2, "sub2"); + MessageConsumer sub2 = sess1.createDurableSubscriber(ActiveMQServerTestCase.topic2, "sub2"); // send four messages @@ -2174,7 +2174,7 @@ public class XARecoveryTest extends JMSTestCase // Now send four more messages in a global tx - MessageProducer prod2 = sess2.createProducer(HornetQServerTestCase.topic2); + MessageProducer prod2 = sess2.createProducer(ActiveMQServerTestCase.topic2); TextMessage tm5 = sess2.createTextMessage("tm5"); TextMessage tm6 = sess2.createTextMessage("tm6"); @@ -2188,9 +2188,9 @@ public class XARecoveryTest extends JMSTestCase // And consume the first four from each in the tx - sub1 = sess2.createDurableSubscriber(HornetQServerTestCase.topic2, "sub1"); + sub1 = sess2.createDurableSubscriber(ActiveMQServerTestCase.topic2, "sub1"); - sub2 = sess2.createDurableSubscriber(HornetQServerTestCase.topic2, "sub2"); + sub2 = sess2.createDurableSubscriber(ActiveMQServerTestCase.topic2, "sub2"); TextMessage rm1 = (TextMessage) sub1.receive(1000); ProxyAssertSupport.assertNotNull(rm1); @@ -2285,9 +2285,9 @@ public class XARecoveryTest extends JMSTestCase // Should now see the last 4 messages - sub1 = sess1.createDurableSubscriber(HornetQServerTestCase.topic2, "sub1"); + sub1 = sess1.createDurableSubscriber(ActiveMQServerTestCase.topic2, "sub1"); - sub2 = sess1.createDurableSubscriber(HornetQServerTestCase.topic2, "sub2"); + sub2 = sess1.createDurableSubscriber(ActiveMQServerTestCase.topic2, "sub2"); TextMessage rm5 = (TextMessage) sub1.receive(1000); ProxyAssertSupport.assertNotNull(rm5); @@ -2516,12 +2516,12 @@ public class XARecoveryTest extends JMSTestCase // Should now be able to receive tm1 and tm2 - m1 = (TextMessage) cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + m1 = (TextMessage) cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m1); ProxyAssertSupport.assertEquals(tm1.getText(), m1.getText()); - TextMessage m2 = (TextMessage) cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m2 = (TextMessage) cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals(tm2.getText(), m2.getText()); @@ -2535,12 +2535,12 @@ public class XARecoveryTest extends JMSTestCase // Should now be able to receive tm3 and tm4 - m3 = (TextMessage) cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + m3 = (TextMessage) cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m3); ProxyAssertSupport.assertEquals(tm3.getText(), m3.getText()); - TextMessage m4 = (TextMessage) cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m4 = (TextMessage) cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m4); ProxyAssertSupport.assertEquals(tm4.getText(), m4.getText()); @@ -2682,21 +2682,21 @@ public class XARecoveryTest extends JMSTestCase MessageConsumer cons = sessRec.createConsumer(queue2); conn3.start(); - Message msg = cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + Message msg = cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); TextMessage m1 = (TextMessage) msg; ProxyAssertSupport.assertNotNull(m1); ProxyAssertSupport.assertTrue("alpha".equals(m1.getText()) || "beta".equals(m1.getText())); - TextMessage m2 = (TextMessage) cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m2 = (TextMessage) cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertTrue("alpha".equals(m2.getText()) || "beta".equals(m2.getText())); ProxyAssertSupport.assertTrue(!tm1.getText().equals(tm2.getText())); - Message nullMessage = cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + Message nullMessage = cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertTrue(nullMessage == null); } @@ -2832,11 +2832,11 @@ public class XARecoveryTest extends JMSTestCase MessageConsumer cons = sessRec.createConsumer(queue1); conn3.start(); - TextMessage m1 = (TextMessage) cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m1 = (TextMessage) cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m1); ProxyAssertSupport.assertEquals("testing1", m1.getText()); - TextMessage m2 = (TextMessage) cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m2 = (TextMessage) cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("testing2", m2.getText()); @@ -2930,11 +2930,11 @@ public class XARecoveryTest extends JMSTestCase MessageConsumer cons = sessRec.createConsumer(queue1); conn3.start(); - TextMessage m1 = (TextMessage) cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m1 = (TextMessage) cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m1); ProxyAssertSupport.assertEquals("testing1", m1.getText()); - TextMessage m2 = (TextMessage) cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m2 = (TextMessage) cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("testing2", m2.getText()); @@ -3032,15 +3032,15 @@ public class XARecoveryTest extends JMSTestCase conn3.start(); - TextMessage m1 = (TextMessage) cons1.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m1 = (TextMessage) cons1.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m1); ProxyAssertSupport.assertEquals("testing1", m1.getText()); - TextMessage m2 = (TextMessage) cons2.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m2 = (TextMessage) cons2.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("testing2", m2.getText()); - TextMessage m3 = (TextMessage) cons3.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m3 = (TextMessage) cons3.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m3); ProxyAssertSupport.assertEquals("testing3", m3.getText()); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/XATest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/XATest.java index 4f0701ce80..b7c41c409d 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/XATest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/XATest.java @@ -51,7 +51,7 @@ import org.junit.Test; * * */ -public class XATest extends HornetQServerTestCase +public class XATest extends ActiveMQServerTestCase { // Constants ----------------------------------------------------- @@ -224,10 +224,10 @@ public class XATest extends HornetQServerTestCase conn2.start(); Session sessReceiver = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageConsumer cons = sessReceiver.createConsumer(queue1); - TextMessage m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest1", m2.getText()); - m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest2", m2.getText()); } @@ -282,7 +282,7 @@ public class XATest extends HornetQServerTestCase conn2.start(); Session sessReceiver = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageConsumer cons = sessReceiver.createConsumer(queue1); - Message m2 = cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + Message m2 = cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(m2); } @@ -353,7 +353,7 @@ public class XATest extends HornetQServerTestCase conn2.start(); Session sessReceiver = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageConsumer cons = sessReceiver.createConsumer(queue1); - Message m2 = cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + Message m2 = cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(m2); } finally @@ -408,7 +408,7 @@ public class XATest extends HornetQServerTestCase conn2.start(); Session sessReceiver = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageConsumer cons = sessReceiver.createConsumer(queue1); - Message m2 = cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + Message m2 = cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(m2); } @@ -460,12 +460,12 @@ public class XATest extends HornetQServerTestCase MessageConsumer cons = sess.createConsumer(queue1); - TextMessage m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest1", m2.getText()); - m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest2", m2.getText()); @@ -481,7 +481,7 @@ public class XATest extends HornetQServerTestCase tx.enlistResource(res); tx.enlistResource(res2); - Message m3 = cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + Message m3 = cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(m3); @@ -538,12 +538,12 @@ public class XATest extends HornetQServerTestCase MessageConsumer cons = sess.createConsumer(queue1); - TextMessage m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest1", m2.getText()); - m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest2", m2.getText()); @@ -559,7 +559,7 @@ public class XATest extends HornetQServerTestCase tx.enlistResource(res); tx.enlistResource(res2); - Message m3 = cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + Message m3 = cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(m3); @@ -617,10 +617,10 @@ public class XATest extends HornetQServerTestCase MessageConsumer cons = sess.createConsumer(queue1); - TextMessage m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest1", m2.getText()); - m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest2", m2.getText()); @@ -637,10 +637,10 @@ public class XATest extends HornetQServerTestCase tx.enlistResource(res); tx.enlistResource(res2); - TextMessage m3 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m3 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m3); ProxyAssertSupport.assertEquals("XATest1", m3.getText()); - m3 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + m3 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m3); ProxyAssertSupport.assertEquals("XATest2", m3.getText()); @@ -698,10 +698,10 @@ public class XATest extends HornetQServerTestCase MessageConsumer cons = sess.createConsumer(queue1); - TextMessage m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest1", m2.getText()); - m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest2", m2.getText()); @@ -718,10 +718,10 @@ public class XATest extends HornetQServerTestCase tx.enlistResource(res); tx.enlistResource(res2); - TextMessage m3 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m3 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m3); ProxyAssertSupport.assertEquals("XATest1", m3.getText()); - m3 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + m3 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m3); ProxyAssertSupport.assertEquals("XATest2", m3.getText()); @@ -780,10 +780,10 @@ public class XATest extends HornetQServerTestCase conn2.start(); Session sessReceiver = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageConsumer cons = sessReceiver.createConsumer(queue1); - TextMessage m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest1", m2.getText()); - m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest2", m2.getText()); } @@ -833,7 +833,7 @@ public class XATest extends HornetQServerTestCase conn2.start(); Session sessReceiver = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageConsumer cons = sessReceiver.createConsumer(queue1); - Message m2 = cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + Message m2 = cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(m2); } @@ -880,11 +880,11 @@ public class XATest extends HornetQServerTestCase MessageConsumer cons = sess.createConsumer(queue1); - TextMessage m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest1", m2.getText()); - m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest2", m2.getText()); @@ -898,7 +898,7 @@ public class XATest extends HornetQServerTestCase tx = tm.getTransaction(); tx.enlistResource(res); - Message m3 = cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + Message m3 = cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(m3); @@ -949,12 +949,12 @@ public class XATest extends HornetQServerTestCase MessageConsumer cons = sess.createConsumer(queue1); - TextMessage m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest1", m2.getText()); - m2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + m2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m2); ProxyAssertSupport.assertEquals("XATest2", m2.getText()); @@ -970,12 +970,12 @@ public class XATest extends HornetQServerTestCase tx = tm.getTransaction(); tx.enlistResource(res); - TextMessage m3 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage m3 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m3); ProxyAssertSupport.assertEquals("XATest1", m3.getText()); - m3 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + m3 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(m3); ProxyAssertSupport.assertEquals("XATest2", m3.getText()); @@ -1037,7 +1037,7 @@ public class XATest extends HornetQServerTestCase // Receive the messages, one on each consumer MessageConsumer cons1 = sess1.createConsumer(queue1); - TextMessage r1 = (TextMessage)cons1.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r1 = (TextMessage)cons1.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r1); ProxyAssertSupport.assertEquals("jellyfish1", r1.getText()); @@ -1045,7 +1045,7 @@ public class XATest extends HornetQServerTestCase cons1.close(); MessageConsumer cons2 = sess2.createConsumer(queue1); - TextMessage r2 = (TextMessage)cons2.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r2 = (TextMessage)cons2.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r2); ProxyAssertSupport.assertEquals("jellyfish2", r2.getText()); @@ -1060,7 +1060,7 @@ public class XATest extends HornetQServerTestCase MessageConsumer cons = sess.createConsumer(queue1); conn2.start(); - TextMessage r3 = (TextMessage)cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + TextMessage r3 = (TextMessage)cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(r3); } @@ -1114,7 +1114,7 @@ public class XATest extends HornetQServerTestCase // Receive the messages, one on each consumer MessageConsumer cons1 = sess1.createConsumer(queue1); - TextMessage r1 = (TextMessage)cons1.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r1 = (TextMessage)cons1.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r1); ProxyAssertSupport.assertEquals("jellyfish1", r1.getText()); @@ -1122,7 +1122,7 @@ public class XATest extends HornetQServerTestCase cons1.close(); MessageConsumer cons2 = sess2.createConsumer(queue1); - TextMessage r2 = (TextMessage)cons2.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r2 = (TextMessage)cons2.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r2); ProxyAssertSupport.assertEquals("jellyfish2", r2.getText()); @@ -1137,7 +1137,7 @@ public class XATest extends HornetQServerTestCase MessageConsumer cons = sess.createConsumer(queue1); conn2.start(); - TextMessage r3 = (TextMessage)cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + TextMessage r3 = (TextMessage)cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(r3); } @@ -1195,12 +1195,12 @@ public class XATest extends HornetQServerTestCase // Receive the messages, two on each consumer MessageConsumer cons1 = sess1.createConsumer(queue1); - TextMessage r1 = (TextMessage)cons1.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r1 = (TextMessage)cons1.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r1); ProxyAssertSupport.assertEquals("jellyfish1", r1.getText()); - r1 = (TextMessage)cons1.receive(HornetQServerTestCase.MAX_TIMEOUT); + r1 = (TextMessage)cons1.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r1); ProxyAssertSupport.assertEquals("jellyfish2", r1.getText()); @@ -1208,12 +1208,12 @@ public class XATest extends HornetQServerTestCase cons1.close(); MessageConsumer cons2 = sess2.createConsumer(queue1); - TextMessage r2 = (TextMessage)cons2.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r2 = (TextMessage)cons2.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r2); ProxyAssertSupport.assertEquals("jellyfish3", r2.getText()); - r2 = (TextMessage)cons2.receive(HornetQServerTestCase.MAX_TIMEOUT); + r2 = (TextMessage)cons2.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r2); ProxyAssertSupport.assertEquals("jellyfish4", r2.getText()); @@ -1237,7 +1237,7 @@ public class XATest extends HornetQServerTestCase MessageConsumer cons = sess.createConsumer(queue1); conn2.start(); - TextMessage r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); boolean session1First = false; @@ -1257,19 +1257,19 @@ public class XATest extends HornetQServerTestCase if (session1First) { - r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); ProxyAssertSupport.assertEquals("jellyfish2", r.getText()); - r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); ProxyAssertSupport.assertEquals("jellyfish3", r.getText()); - r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); @@ -1278,26 +1278,26 @@ public class XATest extends HornetQServerTestCase } else { - r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); ProxyAssertSupport.assertEquals("jellyfish4", r.getText()); - r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); ProxyAssertSupport.assertEquals("jellyfish1", r.getText()); - r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); ProxyAssertSupport.assertEquals("jellyfish2", r.getText()); } - r = (TextMessage)cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(r); @@ -1356,12 +1356,12 @@ public class XATest extends HornetQServerTestCase // Receive the messages, two on each consumer MessageConsumer cons1 = sess1.createConsumer(queue1); - TextMessage r1 = (TextMessage)cons1.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r1 = (TextMessage)cons1.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r1); ProxyAssertSupport.assertEquals("jellyfish1", r1.getText()); - r1 = (TextMessage)cons1.receive(HornetQServerTestCase.MAX_TIMEOUT); + r1 = (TextMessage)cons1.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r1); ProxyAssertSupport.assertEquals("jellyfish2", r1.getText()); @@ -1372,12 +1372,12 @@ public class XATest extends HornetQServerTestCase Thread.sleep(500); MessageConsumer cons2 = sess2.createConsumer(queue1); - TextMessage r2 = (TextMessage)cons2.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r2 = (TextMessage)cons2.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r2); ProxyAssertSupport.assertEquals("jellyfish3", r2.getText()); - r2 = (TextMessage)cons2.receive(HornetQServerTestCase.MAX_TIMEOUT); + r2 = (TextMessage)cons2.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r2); ProxyAssertSupport.assertEquals("jellyfish4", r2.getText()); @@ -1401,7 +1401,7 @@ public class XATest extends HornetQServerTestCase MessageConsumer cons = sess.createConsumer(queue1); conn2.start(); - TextMessage r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); boolean session1First = false; @@ -1421,19 +1421,19 @@ public class XATest extends HornetQServerTestCase if (session1First) { - r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); ProxyAssertSupport.assertEquals("jellyfish2", r.getText()); - r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); ProxyAssertSupport.assertEquals("jellyfish3", r.getText()); - r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); @@ -1442,26 +1442,26 @@ public class XATest extends HornetQServerTestCase } else { - r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); ProxyAssertSupport.assertEquals("jellyfish4", r.getText()); - r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); ProxyAssertSupport.assertEquals("jellyfish1", r.getText()); - r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); ProxyAssertSupport.assertEquals("jellyfish2", r.getText()); } - r = (TextMessage)cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(r); } @@ -1514,22 +1514,22 @@ public class XATest extends HornetQServerTestCase tx.enlistResource(res2); MessageConsumer cons1 = sess1.createConsumer(queue1); - TextMessage r1 = (TextMessage)cons1.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r1 = (TextMessage)cons1.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r1); ProxyAssertSupport.assertEquals("jellyfish1", r1.getText()); - r1 = (TextMessage)cons1.receive(HornetQServerTestCase.MAX_TIMEOUT); + r1 = (TextMessage)cons1.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r1); ProxyAssertSupport.assertEquals("jellyfish2", r1.getText()); - r1 = (TextMessage)cons1.receive(HornetQServerTestCase.MAX_TIMEOUT); + r1 = (TextMessage)cons1.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r1); ProxyAssertSupport.assertEquals("jellyfish3", r1.getText()); - r1 = (TextMessage)cons1.receive(HornetQServerTestCase.MAX_TIMEOUT); + r1 = (TextMessage)cons1.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r1); ProxyAssertSupport.assertEquals("jellyfish4", r1.getText()); @@ -1566,31 +1566,31 @@ public class XATest extends HornetQServerTestCase MessageConsumer cons = sess.createConsumer(queue1); conn2.start(); - TextMessage r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); ProxyAssertSupport.assertEquals("jellyfish1", r.getText()); - r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); ProxyAssertSupport.assertEquals("jellyfish2", r.getText()); - r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); ProxyAssertSupport.assertEquals("jellyfish3", r.getText()); - r = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r); ProxyAssertSupport.assertEquals("jellyfish4", r.getText()); - r = (TextMessage)cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + r = (TextMessage)cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(r); } @@ -1655,11 +1655,11 @@ public class XATest extends HornetQServerTestCase MessageConsumer cons = sess.createConsumer(queue1); conn2.start(); - TextMessage r1 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r1 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r1); ProxyAssertSupport.assertEquals("echidna1", r1.getText()); - TextMessage r2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r2); ProxyAssertSupport.assertEquals("echidna2", r2.getText()); @@ -1727,11 +1727,11 @@ public class XATest extends HornetQServerTestCase MessageConsumer cons = sess.createConsumer(queue1); conn2.start(); - TextMessage r1 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r1 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r1); ProxyAssertSupport.assertEquals("echidna1", r1.getText()); - TextMessage r2 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r2); ProxyAssertSupport.assertEquals("echidna2", r2.getText()); @@ -1798,7 +1798,7 @@ public class XATest extends HornetQServerTestCase MessageConsumer cons = sess.createConsumer(queue1); conn2.start(); - TextMessage r1 = (TextMessage)cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + TextMessage r1 = (TextMessage)cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(r1); } @@ -1863,7 +1863,7 @@ public class XATest extends HornetQServerTestCase MessageConsumer cons = sess.createConsumer(queue1); conn2.start(); - TextMessage r1 = (TextMessage)cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + TextMessage r1 = (TextMessage)cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(r1); } finally @@ -1913,7 +1913,7 @@ public class XATest extends HornetQServerTestCase // Receive one message in one tx - TextMessage r1 = (TextMessage)cons1.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r1 = (TextMessage)cons1.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r1); ProxyAssertSupport.assertEquals("jellyfish1", r1.getText()); @@ -1928,7 +1928,7 @@ public class XATest extends HornetQServerTestCase tx2.enlistResource(res1); // Receive 2nd message in a different tx - TextMessage r2 = (TextMessage)cons1.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r2 = (TextMessage)cons1.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r2); ProxyAssertSupport.assertEquals("jellyfish2", r2.getText()); @@ -1943,7 +1943,7 @@ public class XATest extends HornetQServerTestCase Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); conn2.start(); MessageConsumer cons = sess.createConsumer(queue1); - TextMessage r3 = (TextMessage)cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + TextMessage r3 = (TextMessage)cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(r3); // now resume the first tx and then commit it @@ -1998,7 +1998,7 @@ public class XATest extends HornetQServerTestCase // Receive one message in one tx - TextMessage r1 = (TextMessage)cons1.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r1 = (TextMessage)cons1.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r1); ProxyAssertSupport.assertEquals("jellyfish1", r1.getText()); @@ -2013,7 +2013,7 @@ public class XATest extends HornetQServerTestCase tx2.enlistResource(res1); // Receive 2nd message in a different tx - TextMessage r2 = (TextMessage)cons1.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r2 = (TextMessage)cons1.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r2); ProxyAssertSupport.assertEquals("jellyfish2", r2.getText()); @@ -2031,11 +2031,11 @@ public class XATest extends HornetQServerTestCase conn2.start(); MessageConsumer cons = sess.createConsumer(queue1); - TextMessage r3 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r3 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r3); ProxyAssertSupport.assertEquals("jellyfish2", r3.getText()); - r3 = (TextMessage)cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + r3 = (TextMessage)cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(r3); // rollback the other tx @@ -2043,10 +2043,10 @@ public class XATest extends HornetQServerTestCase tm.rollback(); // Verify the first message is now available - r3 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + r3 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r3); ProxyAssertSupport.assertEquals("jellyfish1", r3.getText()); - r3 = (TextMessage)cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + r3 = (TextMessage)cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(r3); } @@ -2114,10 +2114,10 @@ public class XATest extends HornetQServerTestCase Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); conn2.start(); MessageConsumer cons = sess.createConsumer(queue1); - TextMessage r1 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r1 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r1); ProxyAssertSupport.assertEquals("kangaroo2", r1.getText()); - TextMessage r2 = (TextMessage)cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + TextMessage r2 = (TextMessage)cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(r2); // now resume the first tx and then commit it @@ -2126,7 +2126,7 @@ public class XATest extends HornetQServerTestCase tm.commit(); // verify that the first text message is received - TextMessage r3 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r3 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r3); ProxyAssertSupport.assertEquals("kangaroo1", r3.getText()); @@ -2212,7 +2212,7 @@ public class XATest extends HornetQServerTestCase Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); conn2.start(); MessageConsumer cons = sess.createConsumer(queue1); - TextMessage r1 = (TextMessage)cons.receive(HornetQServerTestCase.MIN_TIMEOUT); + TextMessage r1 = (TextMessage)cons.receive(ActiveMQServerTestCase.MIN_TIMEOUT); ProxyAssertSupport.assertNull(r1); @@ -2224,7 +2224,7 @@ public class XATest extends HornetQServerTestCase tm.commit(); // verify that the first text message is received - TextMessage r3 = (TextMessage)cons.receive(HornetQServerTestCase.MAX_TIMEOUT); + TextMessage r3 = (TextMessage)cons.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(r3); ProxyAssertSupport.assertEquals("kangaroo1", r3.getText()); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/JMSExpirationHeaderTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/JMSExpirationHeaderTest.java index feb2215dee..36bfdf9b8c 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/JMSExpirationHeaderTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/JMSExpirationHeaderTest.java @@ -17,7 +17,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import javax.jms.DeliveryMode; import javax.jms.Message; -import org.apache.activemq.jms.client.HornetQMessage; +import org.apache.activemq.jms.client.ActiveMQMessage; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.After; @@ -192,7 +192,7 @@ public class JMSExpirationHeaderTest extends MessageHeaderTestBase Message m = queueProducerSession.createMessage(); queueProducer.send(m, DeliveryMode.NON_PERSISTENT, 4, -1); - HornetQMessage msg = (HornetQMessage)m; + ActiveMQMessage msg = (ActiveMQMessage)m; if (!msg.getCoreMessage().isExpired()) { diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/JMSPriorityHeaderTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/JMSPriorityHeaderTest.java index 20ed3b8c51..dd3cbe2d96 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/JMSPriorityHeaderTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/JMSPriorityHeaderTest.java @@ -19,7 +19,7 @@ import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TextMessage; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.junit.Test; @@ -27,7 +27,7 @@ import org.junit.Test; * @author Tim Fox * */ -public class JMSPriorityHeaderTest extends HornetQServerTestCase +public class JMSPriorityHeaderTest extends ActiveMQServerTestCase { /* * Note - this test is testing our current implementation of message ordering since the spec diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/JMSXDeliveryCountTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/JMSXDeliveryCountTest.java index 76be98ae7e..2676f5cdf7 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/JMSXDeliveryCountTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/JMSXDeliveryCountTest.java @@ -29,7 +29,7 @@ import javax.transaction.xa.Xid; import com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.junit.Test; @@ -41,7 +41,7 @@ import org.junit.Test; * * */ -public class JMSXDeliveryCountTest extends HornetQServerTestCase +public class JMSXDeliveryCountTest extends ActiveMQServerTestCase { // Constants ------------------------------------------------------------------------------------ @@ -256,9 +256,9 @@ public class JMSXDeliveryCountTest extends HornetQServerTestCase Session sess2 = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE); Session sess3 = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE); - MessageConsumer cons1 = sess1.createConsumer(HornetQServerTestCase.topic1); - MessageConsumer cons2 = sess2.createConsumer(HornetQServerTestCase.topic1); - MessageConsumer cons3 = sess3.createDurableSubscriber(HornetQServerTestCase.topic1, "subxyz"); + MessageConsumer cons1 = sess1.createConsumer(ActiveMQServerTestCase.topic1); + MessageConsumer cons2 = sess2.createConsumer(ActiveMQServerTestCase.topic1); + MessageConsumer cons3 = sess3.createDurableSubscriber(ActiveMQServerTestCase.topic1, "subxyz"); conn.start(); @@ -278,7 +278,7 @@ public class JMSXDeliveryCountTest extends HornetQServerTestCase t3.start(); Session sessSend = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer prod = sessSend.createProducer(HornetQServerTestCase.topic1); + MessageProducer prod = sessSend.createProducer(ActiveMQServerTestCase.topic1); prod.setDeliveryMode(DeliveryMode.NON_PERSISTENT); for (int i = 0; i < NUM_MESSAGES; i++) diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageBodyTestCase.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageBodyTestCase.java index e746ab4390..b3753c2792 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageBodyTestCase.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageBodyTestCase.java @@ -19,10 +19,10 @@ import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Session; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.junit.Before; -public abstract class MessageBodyTestCase extends HornetQServerTestCase +public abstract class MessageBodyTestCase extends ActiveMQServerTestCase { protected Connection producerConnection, consumerConnection; protected Session queueProducerSession, queueConsumerSession; diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageHeaderTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageHeaderTest.java index 47194cbdac..d5a1923299 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageHeaderTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageHeaderTest.java @@ -47,12 +47,12 @@ import org.apache.activemq.api.core.client.SendAcknowledgementHandler; import org.apache.activemq.api.core.client.SessionFailureListener; import org.apache.activemq.core.client.impl.ClientMessageImpl; import org.apache.activemq.core.remoting.FailureListener; -import org.apache.activemq.jms.client.HornetQBytesMessage; -import org.apache.activemq.jms.client.HornetQMapMessage; -import org.apache.activemq.jms.client.HornetQMessage; -import org.apache.activemq.jms.client.HornetQObjectMessage; -import org.apache.activemq.jms.client.HornetQStreamMessage; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQBytesMessage; +import org.apache.activemq.jms.client.ActiveMQMapMessage; +import org.apache.activemq.jms.client.ActiveMQMessage; +import org.apache.activemq.jms.client.ActiveMQObjectMessage; +import org.apache.activemq.jms.client.ActiveMQStreamMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.junit.Test; @@ -793,19 +793,19 @@ public class MessageHeaderTest extends MessageHeaderTestBase @Test public void testCopyOnJBossMessage() throws JMSException { - ClientMessage clientMessage = new ClientMessageImpl(HornetQTextMessage.TYPE, + ClientMessage clientMessage = new ClientMessageImpl(ActiveMQTextMessage.TYPE, true, 0, System.currentTimeMillis(), (byte) 4, 1000); ClientSession session = new FakeSession(clientMessage); - HornetQMessage jbossMessage = HornetQMessage.createMessage(clientMessage, session); + ActiveMQMessage jbossMessage = ActiveMQMessage.createMessage(clientMessage, session); jbossMessage.clearProperties(); MessageHeaderTestBase.configureMessage(jbossMessage); - HornetQMessage copy = new HornetQMessage(jbossMessage, session); + ActiveMQMessage copy = new ActiveMQMessage(jbossMessage, session); MessageHeaderTestBase.ensureEquivalent(jbossMessage, copy); } @@ -813,7 +813,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase @Test public void testCopyOnForeignMessage() throws JMSException { - ClientMessage clientMessage = new ClientMessageImpl(HornetQTextMessage.TYPE, + ClientMessage clientMessage = new ClientMessageImpl(ActiveMQTextMessage.TYPE, true, 0, System.currentTimeMillis(), @@ -823,7 +823,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase Message foreignMessage = new SimpleJMSMessage(); - HornetQMessage copy = new HornetQMessage(foreignMessage, session); + ActiveMQMessage copy = new ActiveMQMessage(foreignMessage, session); MessageHeaderTestBase.ensureEquivalent(foreignMessage, copy); @@ -832,7 +832,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase @Test public void testCopyOnForeignBytesMessage() throws JMSException { - ClientMessage clientMessage = new ClientMessageImpl(HornetQTextMessage.TYPE, + ClientMessage clientMessage = new ClientMessageImpl(ActiveMQTextMessage.TYPE, true, 0, System.currentTimeMillis(), @@ -846,7 +846,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase foreignBytesMessage.writeByte((byte) i); } - HornetQBytesMessage copy = new HornetQBytesMessage(foreignBytesMessage, session); + ActiveMQBytesMessage copy = new ActiveMQBytesMessage(foreignBytesMessage, session); foreignBytesMessage.reset(); copy.reset(); @@ -857,7 +857,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase @Test public void testCopyOnForeignMapMessage() throws JMSException { - ClientMessage clientMessage = new ClientMessageImpl(HornetQTextMessage.TYPE, + ClientMessage clientMessage = new ClientMessageImpl(ActiveMQTextMessage.TYPE, true, 0, System.currentTimeMillis(), @@ -868,7 +868,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase foreignMapMessage.setInt("int", 1); foreignMapMessage.setString("string", "test"); - HornetQMapMessage copy = new HornetQMapMessage(foreignMapMessage, session); + ActiveMQMapMessage copy = new ActiveMQMapMessage(foreignMapMessage, session); MessageHeaderTestBase.ensureEquivalent(foreignMapMessage, copy); } @@ -876,7 +876,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase @Test public void testCopyOnForeignObjectMessage() throws JMSException { - ClientMessage clientMessage = new ClientMessageImpl(HornetQTextMessage.TYPE, + ClientMessage clientMessage = new ClientMessageImpl(ActiveMQTextMessage.TYPE, true, 0, System.currentTimeMillis(), @@ -886,7 +886,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase ObjectMessage foreignObjectMessage = new SimpleJMSObjectMessage(); - HornetQObjectMessage copy = new HornetQObjectMessage(foreignObjectMessage, session); + ActiveMQObjectMessage copy = new ActiveMQObjectMessage(foreignObjectMessage, session); MessageHeaderTestBase.ensureEquivalent(foreignObjectMessage, copy); } @@ -894,7 +894,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase @Test public void testCopyOnForeignStreamMessage() throws JMSException { - ClientMessage clientMessage = new ClientMessageImpl(HornetQTextMessage.TYPE, + ClientMessage clientMessage = new ClientMessageImpl(ActiveMQTextMessage.TYPE, true, 0, System.currentTimeMillis(), @@ -907,7 +907,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase foreignStreamMessage.writeByte((byte) 2); foreignStreamMessage.writeByte((byte) 3); - HornetQStreamMessage copy = new HornetQStreamMessage(foreignStreamMessage, session); + ActiveMQStreamMessage copy = new ActiveMQStreamMessage(foreignStreamMessage, session); MessageHeaderTestBase.ensureEquivalent(foreignStreamMessage, copy); } @@ -915,7 +915,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase @Test public void testCopyOnForeignTextMessage() throws JMSException { - ClientMessage clientMessage = new ClientMessageImpl(HornetQTextMessage.TYPE, + ClientMessage clientMessage = new ClientMessageImpl(ActiveMQTextMessage.TYPE, true, 0, System.currentTimeMillis(), @@ -924,7 +924,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase ClientSession session = new FakeSession(clientMessage); TextMessage foreignTextMessage = new SimpleJMSTextMessage(); - HornetQTextMessage copy = new HornetQTextMessage(foreignTextMessage, session); + ActiveMQTextMessage copy = new ActiveMQTextMessage(foreignTextMessage, session); MessageHeaderTestBase.ensureEquivalent(foreignTextMessage, copy); } @@ -946,7 +946,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase Message receivedMessage = queueConsumer.receive(2000); - MessageHeaderTestBase.ensureEquivalent(receivedMessage, (HornetQMessage) message); + MessageHeaderTestBase.ensureEquivalent(receivedMessage, (ActiveMQMessage) message); } // Package protected --------------------------------------------- diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageHeaderTestBase.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageHeaderTestBase.java index 975f02035f..85545c6d81 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageHeaderTestBase.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageHeaderTestBase.java @@ -28,14 +28,14 @@ import javax.jms.Session; import javax.jms.StreamMessage; import javax.jms.TextMessage; -import org.apache.activemq.api.jms.HornetQJMSClient; -import org.apache.activemq.jms.client.HornetQBytesMessage; -import org.apache.activemq.jms.client.HornetQMapMessage; -import org.apache.activemq.jms.client.HornetQMessage; -import org.apache.activemq.jms.client.HornetQObjectMessage; -import org.apache.activemq.jms.client.HornetQStreamMessage; -import org.apache.activemq.jms.client.HornetQTextMessage; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.api.jms.ActiveMQJMSClient; +import org.apache.activemq.jms.client.ActiveMQBytesMessage; +import org.apache.activemq.jms.client.ActiveMQMapMessage; +import org.apache.activemq.jms.client.ActiveMQMessage; +import org.apache.activemq.jms.client.ActiveMQObjectMessage; +import org.apache.activemq.jms.client.ActiveMQStreamMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.junit.Before; @@ -46,7 +46,7 @@ import org.junit.Before; * @version $Revision: 2883 $ * */ -public abstract class MessageHeaderTestBase extends HornetQServerTestCase +public abstract class MessageHeaderTestBase extends ActiveMQServerTestCase { // Constants ----------------------------------------------------- @@ -55,13 +55,13 @@ public abstract class MessageHeaderTestBase extends HornetQServerTestCase /** * Loads the message header fields with significant values. */ - public static void configureMessage(final HornetQMessage m) throws JMSException + public static void configureMessage(final ActiveMQMessage m) throws JMSException { m.setJMSMessageID("ID:messageID777"); m.setJMSTimestamp(123456789L); m.setJMSCorrelationID("correlationID777"); - m.setJMSReplyTo(HornetQJMSClient.createQueue("ReplyToQueue")); - m.setJMSDestination(HornetQJMSClient.createQueue("DestinationQueue")); + m.setJMSReplyTo(ActiveMQJMSClient.createQueue("ReplyToQueue")); + m.setJMSDestination(ActiveMQJMSClient.createQueue("DestinationQueue")); m.setJMSDeliveryMode(DeliveryMode.PERSISTENT); m.setJMSExpiration(987654321L); m.setJMSPriority(9); @@ -80,7 +80,7 @@ public abstract class MessageHeaderTestBase extends HornetQServerTestCase * Makes sure two physically different message are equivalent: they have identical JMS fields and * body. */ - public static void ensureEquivalent(final Message m1, final HornetQMessage m2) throws JMSException + public static void ensureEquivalent(final Message m1, final ActiveMQMessage m2) throws JMSException { ProxyAssertSupport.assertTrue(m1 != m2); @@ -307,7 +307,7 @@ public abstract class MessageHeaderTestBase extends HornetQServerTestCase } } - public static void ensureEquivalent(final BytesMessage m1, final HornetQBytesMessage m2) throws JMSException + public static void ensureEquivalent(final BytesMessage m1, final ActiveMQBytesMessage m2) throws JMSException { MessageHeaderTestBase.ensureEquivalent((Message)m1, m2); @@ -339,7 +339,7 @@ public abstract class MessageHeaderTestBase extends HornetQServerTestCase } @SuppressWarnings("unchecked") - public static void ensureEquivalent(final MapMessage m1, final HornetQMapMessage m2) throws JMSException + public static void ensureEquivalent(final MapMessage m1, final ActiveMQMapMessage m2) throws JMSException { MessageHeaderTestBase.ensureEquivalent((Message)m1, m2); @@ -356,13 +356,13 @@ public abstract class MessageHeaderTestBase extends HornetQServerTestCase } } - public static void ensureEquivalent(final ObjectMessage m1, final HornetQObjectMessage m2) throws JMSException + public static void ensureEquivalent(final ObjectMessage m1, final ActiveMQObjectMessage m2) throws JMSException { MessageHeaderTestBase.ensureEquivalent((Message)m1, m2); ProxyAssertSupport.assertEquals(m1.getObject(), m2.getObject()); } - public static void ensureEquivalent(final StreamMessage m1, final HornetQStreamMessage m2) throws JMSException + public static void ensureEquivalent(final StreamMessage m1, final ActiveMQStreamMessage m2) throws JMSException { MessageHeaderTestBase.ensureEquivalent((Message)m1, m2); @@ -422,7 +422,7 @@ public abstract class MessageHeaderTestBase extends HornetQServerTestCase } } - public static void ensureEquivalent(final TextMessage m1, final HornetQTextMessage m2) throws JMSException + public static void ensureEquivalent(final TextMessage m1, final ActiveMQTextMessage m2) throws JMSException { MessageHeaderTestBase.ensureEquivalent((Message)m1, m2); ProxyAssertSupport.assertEquals(m1.getText(), m2.getText()); @@ -461,8 +461,8 @@ public abstract class MessageHeaderTestBase extends HornetQServerTestCase topicProducerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); topicConsumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - topicProducer = topicProducerSession.createProducer(HornetQServerTestCase.topic1); - topicConsumer = topicConsumerSession.createConsumer(HornetQServerTestCase.topic1); + topicProducer = topicProducerSession.createProducer(ActiveMQServerTestCase.topic1); + topicConsumer = topicConsumerSession.createConsumer(ActiveMQServerTestCase.topic1); consumerConnection.start(); } diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessagePropertyConversionTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessagePropertyConversionTest.java index 5ff78ba03b..76d7506323 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessagePropertyConversionTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessagePropertyConversionTest.java @@ -24,7 +24,7 @@ import javax.jms.MessageProducer; import javax.jms.Session; import org.apache.activemq.api.core.SimpleString; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.junit.After; import org.junit.Assert; @@ -36,7 +36,7 @@ import org.junit.Test; * * @author Alex Fu */ -public class MessagePropertyConversionTest extends HornetQServerTestCase +public class MessagePropertyConversionTest extends ActiveMQServerTestCase { // Attributes ---------------------------------------------------- diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageTestBase.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageTestBase.java index efa816ee66..a0125defa2 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageTestBase.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/MessageTestBase.java @@ -19,7 +19,7 @@ import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Session; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.junit.After; import org.junit.Before; @@ -29,7 +29,7 @@ import org.junit.Test; * @author Ovidiu Feodorov * */ -public abstract class MessageTestBase extends HornetQServerTestCase +public abstract class MessageTestBase extends ActiveMQServerTestCase { // Constants ----------------------------------------------------- @@ -193,7 +193,7 @@ public abstract class MessageTestBase extends HornetQServerTestCase m.setStringProperty("stringProperty", "this is a String property"); m.setJMSCorrelationID("this is the correlation ID"); - m.setJMSReplyTo(HornetQServerTestCase.topic1); + m.setJMSReplyTo(ActiveMQServerTestCase.topic1); m.setJMSType("someArbitraryType"); } @@ -215,7 +215,7 @@ public abstract class MessageTestBase extends HornetQServerTestCase ProxyAssertSupport.assertEquals("this is a String property", m.getStringProperty("stringProperty")); ProxyAssertSupport.assertEquals("this is the correlation ID", m.getJMSCorrelationID()); - ProxyAssertSupport.assertEquals(HornetQServerTestCase.topic1, m.getJMSReplyTo()); + ProxyAssertSupport.assertEquals(ActiveMQServerTestCase.topic1, m.getJMSReplyTo()); ProxyAssertSupport.assertEquals("someArbitraryType", m.getJMSType()); ProxyAssertSupport.assertEquals(queue1, m.getJMSDestination()); ProxyAssertSupport.assertEquals("JMS Redelivered property", m.getJMSRedelivered(), redelivered); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/ObjectMessageDeliveryTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/ObjectMessageDeliveryTest.java index 53377d6b92..babed94cbe 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/ObjectMessageDeliveryTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/ObjectMessageDeliveryTest.java @@ -23,7 +23,7 @@ import javax.jms.TopicPublisher; import javax.jms.TopicSession; import javax.jms.TopicSubscriber; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; /** @@ -34,7 +34,7 @@ import org.apache.activemq.jms.tests.util.ProxyAssertSupport; * * */ -public class ObjectMessageDeliveryTest extends HornetQServerTestCase +public class ObjectMessageDeliveryTest extends ActiveMQServerTestCase { // Constants ----------------------------------------------------- @@ -64,8 +64,8 @@ public class ObjectMessageDeliveryTest extends HornetQServerTestCase try { TopicSession s = conn.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); - TopicPublisher publisher = s.createPublisher(HornetQServerTestCase.topic1); - TopicSubscriber sub = s.createSubscriber(HornetQServerTestCase.topic1); + TopicPublisher publisher = s.createPublisher(ActiveMQServerTestCase.topic1); + TopicSubscriber sub = s.createSubscriber(ActiveMQServerTestCase.topic1); conn.start(); // Create 3 object messages with different bodies @@ -95,11 +95,11 @@ public class ObjectMessageDeliveryTest extends HornetQServerTestCase publisher.send(om3); - ObjectMessage rm1 = (ObjectMessage)sub.receive(HornetQServerTestCase.MAX_TIMEOUT); + ObjectMessage rm1 = (ObjectMessage)sub.receive(ActiveMQServerTestCase.MAX_TIMEOUT); - ObjectMessage rm2 = (ObjectMessage)sub.receive(HornetQServerTestCase.MAX_TIMEOUT); + ObjectMessage rm2 = (ObjectMessage)sub.receive(ActiveMQServerTestCase.MAX_TIMEOUT); - ObjectMessage rm3 = (ObjectMessage)sub.receive(HornetQServerTestCase.MAX_TIMEOUT); + ObjectMessage rm3 = (ObjectMessage)sub.receive(ActiveMQServerTestCase.MAX_TIMEOUT); ProxyAssertSupport.assertNotNull(rm1); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/foreign/ForeignBytesMessageTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/foreign/ForeignBytesMessageTest.java index 1497fcdc9d..b33fb60f22 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/foreign/ForeignBytesMessageTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/foreign/ForeignBytesMessageTest.java @@ -36,7 +36,7 @@ public class ForeignBytesMessageTest extends ForeignMessageTest log.debug("creating JMS Message type " + m.getClass().getName()); - String bytes = "HornetQ"; + String bytes = "ActiveMQ"; m.writeBytes(bytes.getBytes()); return m; } @@ -56,6 +56,6 @@ public class ForeignBytesMessageTest extends ForeignMessageTest sb.append(new String(buffer, 0, n)); n = byteMsg.readBytes(buffer); } - ProxyAssertSupport.assertEquals("HornetQ", sb.toString()); + ProxyAssertSupport.assertEquals("ActiveMQ", sb.toString()); } } \ No newline at end of file diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/foreign/ForeignMessageTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/foreign/ForeignMessageTest.java index 1e66867555..a8090908ae 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/foreign/ForeignMessageTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/foreign/ForeignMessageTest.java @@ -15,7 +15,7 @@ package org.apache.activemq.jms.tests.message.foreign; import javax.jms.Message; import javax.jms.TextMessage; -import org.apache.activemq.api.jms.HornetQJMSConstants; +import org.apache.activemq.api.jms.ActiveMQJMSConstants; import org.apache.activemq.jms.tests.message.MessageTestBase; import org.apache.activemq.jms.tests.message.SimpleJMSMessage; import org.apache.activemq.jms.tests.message.SimpleJMSTextMessage; @@ -76,7 +76,7 @@ public class ForeignMessageTest extends MessageTestBase @Test public void testForeignMessageCorrelationIDBytesDisabled() throws Exception { - System.setProperty(HornetQJMSConstants.JMS_HORNETQ_ENABLE_BYTE_ARRAY_JMS_CORRELATION_ID_PROPERTY_NAME, "false"); + System.setProperty(ActiveMQJMSConstants.JMS_ACTIVEMQ_ENABLE_BYTE_ARRAY_JMS_CORRELATION_ID_PROPERTY_NAME, "false"); SimpleJMSMessage msg = new SimpleJMSMessage(); @@ -97,7 +97,7 @@ public class ForeignMessageTest extends MessageTestBase @Test public void testForeignMessageCorrelationID() throws Exception { - System.setProperty(HornetQJMSConstants.JMS_HORNETQ_ENABLE_BYTE_ARRAY_JMS_CORRELATION_ID_PROPERTY_NAME, "true"); + System.setProperty(ActiveMQJMSConstants.JMS_ACTIVEMQ_ENABLE_BYTE_ARRAY_JMS_CORRELATION_ID_PROPERTY_NAME, "true"); SimpleJMSMessage msg = new SimpleJMSMessage(); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/selector/SelectorTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/selector/SelectorTest.java index 78cb93ca01..15acabfb1e 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/selector/SelectorTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/selector/SelectorTest.java @@ -24,8 +24,8 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.CountDownLatch; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.Assert; @@ -37,7 +37,7 @@ import static org.junit.Assert.assertNull; /** * @author Ovidiu Feodorov */ -public class SelectorTest extends HornetQServerTestCase +public class SelectorTest extends ActiveMQServerTestCase { /** @@ -117,9 +117,9 @@ public class SelectorTest extends HornetQServerTestCase Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer cons1 = sess.createConsumer(HornetQServerTestCase.topic1, selector1); + MessageConsumer cons1 = sess.createConsumer(ActiveMQServerTestCase.topic1, selector1); - MessageProducer prod = sess.createProducer(HornetQServerTestCase.topic1); + MessageProducer prod = sess.createProducer(ActiveMQServerTestCase.topic1); for (int j = 0; j < 100; j++) { @@ -361,9 +361,9 @@ public class SelectorTest extends HornetQServerTestCase { Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer cons1 = sess.createConsumer(HornetQServerTestCase.topic1, selector1); + MessageConsumer cons1 = sess.createConsumer(ActiveMQServerTestCase.topic1, selector1); - MessageProducer prod = sess.createProducer(HornetQServerTestCase.topic1); + MessageProducer prod = sess.createProducer(ActiveMQServerTestCase.topic1); for (int j = 0; j < 10; j++) { @@ -480,11 +480,11 @@ public class SelectorTest extends HornetQServerTestCase conn = getConnectionFactory().createConnection(); conn.start(); Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer cons1 = sess.createConsumer(HornetQServerTestCase.topic1, selector1); - MessageConsumer cons2 = sess.createConsumer(HornetQServerTestCase.topic1, selector2); - MessageConsumer cons3 = sess.createConsumer(HornetQServerTestCase.topic1, selector3); - MessageConsumer cons4 = sess.createConsumer(HornetQServerTestCase.topic1, selector4); - MessageConsumer cons5 = sess.createConsumer(HornetQServerTestCase.topic1, selector5); + MessageConsumer cons1 = sess.createConsumer(ActiveMQServerTestCase.topic1, selector1); + MessageConsumer cons2 = sess.createConsumer(ActiveMQServerTestCase.topic1, selector2); + MessageConsumer cons3 = sess.createConsumer(ActiveMQServerTestCase.topic1, selector3); + MessageConsumer cons4 = sess.createConsumer(ActiveMQServerTestCase.topic1, selector4); + MessageConsumer cons5 = sess.createConsumer(ActiveMQServerTestCase.topic1, selector5); Message m1 = sess.createMessage(); m1.setStringProperty("beatle", "john"); @@ -501,7 +501,7 @@ public class SelectorTest extends HornetQServerTestCase Message m5 = sess.createMessage(); m5.setStringProperty("beatle", "jesus"); - MessageProducer prod = sess.createProducer(HornetQServerTestCase.topic1); + MessageProducer prod = sess.createProducer(ActiveMQServerTestCase.topic1); prod.send(m1); prod.send(m2); @@ -999,7 +999,7 @@ public class SelectorTest extends HornetQServerTestCase try { ConnectionFactory factory = getConnectionFactory(); - HornetQConnectionFactory hcf = (HornetQConnectionFactory)factory; + ActiveMQConnectionFactory hcf = (ActiveMQConnectionFactory)factory; hcf.setConsumerWindowSize(0); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/ConcurrentCloseStressTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/ConcurrentCloseStressTest.java index 1f1d7d061e..0c2ded4fdc 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/ConcurrentCloseStressTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/ConcurrentCloseStressTest.java @@ -23,7 +23,7 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.apache.activemq.jms.tests.JmsTestLogger; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.junit.After; @@ -35,7 +35,7 @@ import org.junit.Test; * This test was added to test regression on http://jira.jboss.com/jira/browse/JBMESSAGING-660 * @author Clebert Suconic */ -public class ConcurrentCloseStressTest extends HornetQServerTestCase +public class ConcurrentCloseStressTest extends ActiveMQServerTestCase { @BeforeClass public static void stressTestsEnabled() diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/CorruptMessageStressTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/CorruptMessageStressTest.java index f8e5f9fd5a..cf3269d414 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/CorruptMessageStressTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/CorruptMessageStressTest.java @@ -20,7 +20,7 @@ import javax.jms.Queue; import javax.jms.Session; import javax.naming.InitialContext; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; @@ -31,7 +31,7 @@ import org.junit.Test; * * @author Ovidiu Feodorov */ -public class CorruptMessageStressTest extends HornetQServerTestCase +public class CorruptMessageStressTest extends ActiveMQServerTestCase { @BeforeClass public static void stressTestsEnabled() diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/JMSStressTestBase.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/JMSStressTestBase.java index 44233fda3f..87059fda6b 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/JMSStressTestBase.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/JMSStressTestBase.java @@ -16,7 +16,7 @@ import javax.jms.Destination; import javax.jms.Topic; import javax.jms.XASession; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.junit.After; import org.junit.BeforeClass; @@ -28,7 +28,7 @@ import org.junit.BeforeClass; * @author Tim Fox * */ -public abstract class JMSStressTestBase extends HornetQServerTestCase +public abstract class JMSStressTestBase extends ActiveMQServerTestCase { public static final boolean STRESS_TESTS_ENABLED = false; diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/ManyConnectionsStressTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/ManyConnectionsStressTest.java index 8cc1d4c3e1..0879be958e 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/ManyConnectionsStressTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/ManyConnectionsStressTest.java @@ -26,7 +26,7 @@ import javax.naming.InitialContext; import java.util.HashSet; import java.util.Set; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.junit.After; import org.junit.Before; @@ -38,7 +38,7 @@ import org.junit.Test; * * @author Tim Fox */ -public class ManyConnectionsStressTest extends HornetQServerTestCase +public class ManyConnectionsStressTest extends ActiveMQServerTestCase { @BeforeClass public static void stressTestsEnabled() diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/OpenCloseStressTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/OpenCloseStressTest.java index fc33ea521a..fecc90db9c 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/OpenCloseStressTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/OpenCloseStressTest.java @@ -25,7 +25,7 @@ import javax.jms.TextMessage; import javax.jms.Topic; import javax.naming.InitialContext; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.apache.activemq.utils.UUIDGenerator; import org.junit.After; @@ -45,7 +45,7 @@ import org.junit.Test; * E.g. http://jira.jboss.com/jira/browse/JBMESSAGING-982 * @author Tim Fox */ -public class OpenCloseStressTest extends HornetQServerTestCase +public class OpenCloseStressTest extends ActiveMQServerTestCase { @BeforeClass public static void stressTestsEnabled() diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/RelayStressTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/RelayStressTest.java index 914f17173e..b0d4b45201 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/RelayStressTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/RelayStressTest.java @@ -23,7 +23,7 @@ import javax.jms.Session; import javax.jms.Topic; import javax.naming.InitialContext; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.apache.activemq.jms.tests.JmsTestLogger; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.junit.After; @@ -39,7 +39,7 @@ import org.junit.Test; * * */ -public class RelayStressTest extends HornetQServerTestCase +public class RelayStressTest extends ActiveMQServerTestCase { @BeforeClass public static void stressTestsEnabled() diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/SeveralClientsStressTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/SeveralClientsStressTest.java index 232dd4d2f6..87f482423a 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/SeveralClientsStressTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/stress/SeveralClientsStressTest.java @@ -27,7 +27,7 @@ import javax.jms.Queue; import javax.jms.Session; import javax.naming.Context; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.apache.activemq.jms.tests.JmsTestLogger; import org.apache.activemq.jms.tests.util.ProxyAssertSupport; import org.junit.Before; @@ -49,7 +49,7 @@ clebert hard nofile 10240 * @author Clebert Suconic */ -public class SeveralClientsStressTest extends HornetQServerTestCase +public class SeveralClientsStressTest extends ActiveMQServerTestCase { @BeforeClass public static void stressTestsEnabled() diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/ServerManagement.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/ServerManagement.java index ad1360bf60..e43e62d2ff 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/ServerManagement.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/ServerManagement.java @@ -75,7 +75,7 @@ public class ServerManagement public static void start(final int i, final String config, final boolean clearDatabase, - final boolean startHornetQServer) throws Exception + final boolean startActiveMQServer) throws Exception { throw new IllegalStateException("Method to start a server is not implemented"); } diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/Constants.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/Constants.java index 18c7844bd8..4902a399d3 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/Constants.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/Constants.java @@ -21,7 +21,7 @@ public class Constants { // Constants ----------------------------------------------------- - public static final String SERVER_INDEX_PROPERTY_NAME = "hornetq.test.server.index"; + public static final String SERVER_INDEX_PROPERTY_NAME = "activemq.test.server.index"; // Static -------------------------------------------------------- diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/LocalTestServer.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/LocalTestServer.java index eb4c7d0a12..ce666692b5 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/LocalTestServer.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/LocalTestServer.java @@ -26,7 +26,7 @@ import javax.management.ObjectName; import javax.naming.InitialContext; import org.apache.activemq.api.core.TransportConfiguration; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.management.ObjectNameBuilder; import org.apache.activemq.api.core.management.ResourceNames; import org.apache.activemq.api.jms.JMSFactoryType; @@ -35,12 +35,12 @@ import org.apache.activemq.api.jms.management.TopicControl; import org.apache.activemq.core.config.impl.FileConfiguration; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; import org.apache.activemq.core.security.Role; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.jms.tests.JmsTestLogger; -import org.apache.activemq.spi.core.security.HornetQSecurityManagerImpl; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl; import org.jnp.server.Main; import org.jnp.server.NamingBeanImpl; @@ -122,9 +122,9 @@ public class LocalTestServer implements Server, Runnable javax.management.MBeanServer beanServer = java.lang.management.ManagementFactory.getPlatformMBeanServer(); FileConfiguration fileConfiguration = new FileConfiguration(); - HornetQSecurityManagerImpl securityManager = new HornetQSecurityManagerImpl(); - HornetQServerImpl hornetQServer = new HornetQServerImpl(fileConfiguration, beanServer, securityManager); - jmsServerManager = new JMSServerManagerImpl(hornetQServer); + ActiveMQSecurityManagerImpl securityManager = new ActiveMQSecurityManagerImpl(); + ActiveMQServerImpl activeMQServer = new ActiveMQServerImpl(fileConfiguration, beanServer, securityManager); + jmsServerManager = new JMSServerManagerImpl(activeMQServer); System.setProperty(Constants.SERVER_INDEX_PROPERTY_NAME, "" + getServerID()); namingBean.start(); @@ -185,13 +185,13 @@ public class LocalTestServer implements Server, Runnable public synchronized void startServerPeer() throws Exception { System.setProperty(Constants.SERVER_INDEX_PROPERTY_NAME, "" + getServerID()); - getHornetQServer().start(); + getActiveMQServer().start(); } public synchronized void stopServerPeer() throws Exception { System.setProperty(Constants.SERVER_INDEX_PROPERTY_NAME, "" + getServerID()); - getHornetQServer().stop(); + getActiveMQServer().stop(); // also unbind everything unbindAll(); } @@ -211,9 +211,9 @@ public class LocalTestServer implements Server, Runnable /** * Only for in-VM use! */ - public HornetQServer getServerPeer() + public ActiveMQServer getServerPeer() { - return getHornetQServer(); + return getActiveMQServer(); } public void destroyQueue(final String name, final String jndiName) throws Exception @@ -314,34 +314,34 @@ public class LocalTestServer implements Server, Runnable JMSFactoryType.CF, connectors, clientId, - HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, - HornetQClient.DEFAULT_CONNECTION_TTL, - HornetQClient.DEFAULT_CALL_TIMEOUT, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, + ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, + ActiveMQClient.DEFAULT_CONNECTION_TTL, + ActiveMQClient.DEFAULT_CALL_TIMEOUT, + ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, + ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, + ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, + ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, prefetchSize, - HornetQClient.DEFAULT_CONSUMER_MAX_RATE, - HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE, - HornetQClient.DEFAULT_PRODUCER_MAX_RATE, + ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, + ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE, + ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, blockOnAcknowledge, true, true, - HornetQClient.DEFAULT_AUTO_GROUP, - HornetQClient.DEFAULT_PRE_ACKNOWLEDGE, - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, - HornetQClient.DEFAULT_ACK_BATCH_SIZE, + ActiveMQClient.DEFAULT_AUTO_GROUP, + ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, + ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, dupsOkBatchSize, - HornetQClient.DEFAULT_USE_GLOBAL_POOLS, - HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE, - HornetQClient.DEFAULT_RETRY_INTERVAL, - HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, - HornetQClient.DEFAULT_MAX_RETRY_INTERVAL, - HornetQClient.DEFAULT_RECONNECT_ATTEMPTS, - HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, + ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, + ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, + ActiveMQClient.DEFAULT_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, + ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS, + ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, null, jndiBindings); } @@ -356,11 +356,11 @@ public class LocalTestServer implements Server, Runnable String destination = (isQueue ? "jms.queue." : "jms.topic.") + destName; if (roles != null) { - getHornetQServer().getSecurityRepository().addMatch(destination, roles); + getActiveMQServer().getSecurityRepository().addMatch(destination, roles); } else { - getHornetQServer().getSecurityRepository().removeMatch(destination); + getActiveMQServer().getSecurityRepository().removeMatch(destination); } } @@ -372,9 +372,9 @@ public class LocalTestServer implements Server, Runnable // Private -------------------------------------------------------------------------------------- - public HornetQServer getHornetQServer() + public ActiveMQServer getActiveMQServer() { - return jmsServerManager.getHornetQServer(); + return jmsServerManager.getActiveMQServer(); } public JMSServerManager getJMSServerManager() @@ -416,7 +416,7 @@ public class LocalTestServer implements Server, Runnable @Override public Long getMessageCountForQueue(final String queueName) throws Exception { - JMSQueueControl queue = (JMSQueueControl)getHornetQServer().getManagementService() + JMSQueueControl queue = (JMSQueueControl) getActiveMQServer().getManagementService() .getResource(ResourceNames.JMS_QUEUE + queueName); if (queue != null) { @@ -433,13 +433,13 @@ public class LocalTestServer implements Server, Runnable { if (isQueue) { - JMSQueueControl queue = (JMSQueueControl)getHornetQServer().getManagementService() + JMSQueueControl queue = (JMSQueueControl) getActiveMQServer().getManagementService() .getResource(ResourceNames.JMS_QUEUE + destination); queue.removeMessages(null); } else { - TopicControl topic = (TopicControl)getHornetQServer().getManagementService() + TopicControl topic = (TopicControl) getActiveMQServer().getManagementService() .getResource(ResourceNames.JMS_TOPIC + destination); topic.removeMessages(null); } @@ -464,13 +464,13 @@ public class LocalTestServer implements Server, Runnable public Set getSecurityConfig() throws Exception { - return getHornetQServer().getSecurityRepository().getMatch("*"); + return getActiveMQServer().getSecurityRepository().getMatch("*"); } public void setSecurityConfig(final Set defConfig) throws Exception { - getHornetQServer().getSecurityRepository().removeMatch("#"); - getHornetQServer().getSecurityRepository().addMatch("#", defConfig); + getActiveMQServer().getSecurityRepository().removeMatch("#"); + getActiveMQServer().getSecurityRepository().addMatch("#", defConfig); } // Inner classes -------------------------------------------------------------------------------- diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/Server.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/Server.java index 09b7af365b..203aecba2a 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/Server.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/Server.java @@ -19,7 +19,7 @@ import java.util.List; import java.util.Set; import org.apache.activemq.core.security.Role; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.jms.server.JMSServerManager; /** @@ -79,7 +79,7 @@ public interface Server extends Remote // /** // * Only for in-VM use // */ - HornetQServer getServerPeer() throws Exception; + ActiveMQServer getServerPeer() throws Exception; void createQueue(String name, String jndiName) throws Exception; @@ -168,7 +168,7 @@ public interface Server extends Remote void configureSecurityForDestination(String destName, boolean isQueue, Set roles) throws Exception; - HornetQServer getHornetQServer() throws Exception; + ActiveMQServer getActiveMQServer() throws Exception; InitialContext getInitialContext() throws Exception; diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/util/JNDIUtilTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/util/JNDIUtilTest.java index 9b7020dcdd..d324ef89b9 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/util/JNDIUtilTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/util/JNDIUtilTest.java @@ -18,13 +18,13 @@ import org.junit.Test; import javax.naming.InitialContext; import javax.naming.NameNotFoundException; -import org.apache.activemq.jms.tests.HornetQServerTestCase; +import org.apache.activemq.jms.tests.ActiveMQServerTestCase; import org.apache.activemq.utils.JNDIUtil; /** * @author Ovidiu Feodorov */ -public class JNDIUtilTest extends HornetQServerTestCase +public class JNDIUtilTest extends ActiveMQServerTestCase { // Constants ----------------------------------------------------- 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/ActiveMQQAdmin.java similarity index 94% rename from tests/joram-tests/src/test/java/org/apache/activemq/jms/HornetQAdmin.java rename to tests/joram-tests/src/test/java/org/apache/activemq/jms/ActiveMQQAdmin.java index 3a9eda6bcd..9d3c897863 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/ActiveMQQAdmin.java @@ -26,7 +26,7 @@ import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientRequestor; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.management.ManagementHelper; import org.apache.activemq.api.core.management.ResourceNames; @@ -36,11 +36,11 @@ import org.junit.Assert; import org.objectweb.jtests.jms.admin.Admin; /** - * A HornetQAdmin + * A ActiveMQAdmin * * @author Jeff Mesnil */ -public class HornetQAdmin implements Admin +public class ActiveMQQAdmin implements Admin { private ClientSession clientSession; @@ -55,16 +55,16 @@ public class HornetQAdmin implements Admin ServerLocator serverLocator; /** - * Determines whether to act or 'no-op' on {@link HornetQAdmin#serverStart()} and - * {@link HornetQAdmin#serverStop()}. This is used when testing combinations of client and + * Determines whether to act or 'no-op' on {@link ActiveMQQAdmin#serverStart()} and + * {@link ActiveMQQAdmin#serverStop()}. This is used when testing combinations of client and * servers with different versions. * * @see https://github.com/hornetq/hornetq-version-tests */ private final boolean serverLifeCycleActive; - private static final String SERVER_LIVE_CYCLE_PROPERTY = "org.apache.activemq.jms.HornetQAdmin.serverLifeCycle"; + private static final String SERVER_LIVE_CYCLE_PROPERTY = "org.apache.activemq.jms.ActiveMQAdmin.serverLifeCycle"; - public HornetQAdmin() + public ActiveMQQAdmin() { serverLifeCycleActive = Boolean.valueOf(System.getProperty(SERVER_LIVE_CYCLE_PROPERTY, "true")); try @@ -83,7 +83,7 @@ public class HornetQAdmin implements Admin public void start() throws Exception { - serverLocator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); + serverLocator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); sf = serverLocator.createSessionFactory(); clientSession = sf.createSession(ActiveMQDefaultConfiguration.getDefaultClusterUser(), ActiveMQDefaultConfiguration.getDefaultClusterPassword(), diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/jms/SpawnedJMSServer.java b/tests/joram-tests/src/test/java/org/apache/activemq/jms/SpawnedJMSServer.java index 5f6eb6961e..1768a43391 100644 --- a/tests/joram-tests/src/test/java/org/apache/activemq/jms/SpawnedJMSServer.java +++ b/tests/joram-tests/src/test/java/org/apache/activemq/jms/SpawnedJMSServer.java @@ -23,8 +23,8 @@ import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.jnp.server.Main; @@ -71,7 +71,7 @@ public class SpawnedJMSServer conf.getConnectorConfigurations().put("netty", new TransportConfiguration(NettyConnectorFactory.class.getName())); // disable server persistence since JORAM tests do not restart server - final HornetQServer server = HornetQServers.newHornetQServer(conf, false); + final ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, false); Hashtable env = new Hashtable(); env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); diff --git a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/ConnectionTest.java b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/ConnectionTest.java index 01fe2794f3..418a151647 100644 --- a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/ConnectionTest.java +++ b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/ConnectionTest.java @@ -47,7 +47,7 @@ public class ConnectionTest extends PTPTestCase receiverSession = receiverConnection.createQueueSession(false, Session.CLIENT_ACKNOWLEDGE); receiver.close(); // Before assigning a new receiver, we need to close the old one... // Not closing it could cause load balancing between receivers. - // Not having this close might be valid for JORAM or JBossMQ, but it's not valid for HornetQ (and still legal) + // Not having this close might be valid for JORAM or JBossMQ, but it's not valid for ActiveMQ (and still legal) receiver = receiverSession.createReceiver(receiverQueue); receiverConnection.start(); diff --git a/tests/joram-tests/src/test/resources/provider.properties b/tests/joram-tests/src/test/resources/provider.properties index 910d2162cf..b8f137f732 100644 --- a/tests/joram-tests/src/test/resources/provider.properties +++ b/tests/joram-tests/src/test/resources/provider.properties @@ -27,7 +27,7 @@ # Uncomment the chosen provider and comment the other ones ## -jms.provider.admin.class=org.apache.activemq.jms.HornetQAdmin +jms.provider.admin.class=org.apache.activemq.jms.ActiveMQQAdmin #jms.provider.admin.class = org.apache.activemq.api.jms.GenericAdmin #jms.provider.admin.class = org.objectweb.jtests.providers.admin.JoramAdmin #jms.provider.admin.class = org.objectweb.jtests.providers.admin.AshnaMQAdmin diff --git a/tests/performance-tests/src/test/java/org/apache/activemq/tests/performance/journal/JournalImplTestUnit.java b/tests/performance-tests/src/test/java/org/apache/activemq/tests/performance/journal/JournalImplTestUnit.java index 1ea98bdeb2..f0cf0bf31d 100644 --- a/tests/performance-tests/src/test/java/org/apache/activemq/tests/performance/journal/JournalImplTestUnit.java +++ b/tests/performance-tests/src/test/java/org/apache/activemq/tests/performance/journal/JournalImplTestUnit.java @@ -202,7 +202,7 @@ public abstract class JournalImplTestUnit extends JournalImplTestBase @Test public void testSpeedTransactional() throws Exception { - Journal journal = new JournalImpl(10 * 1024 * 1024, 10, 0, 0, getFileFactory(), "hornetq-data", "hq", 5000); + Journal journal = new JournalImpl(10 * 1024 * 1024, 10, 0, 0, getFileFactory(), "activemq-data", "amq", 5000); journal.start(); @@ -265,7 +265,7 @@ public abstract class JournalImplTestUnit extends JournalImplTestBase JournalImplTestUnit.log.debug("num Files=" + numFiles); - Journal journal = new JournalImpl(10 * 1024 * 1024, numFiles, 0, 0, getFileFactory(), "hornetq-data", "hq", 5000); + Journal journal = new JournalImpl(10 * 1024 * 1024, numFiles, 0, 0, getFileFactory(), "activemq-data", "amq", 5000); journal.start(); @@ -289,7 +289,7 @@ public abstract class JournalImplTestUnit extends JournalImplTestBase journal.stop(); - journal = new JournalImpl(10 * 1024 * 1024, numFiles, 0, 0, getFileFactory(), "hornetq-data", "hq", 5000); + journal = new JournalImpl(10 * 1024 * 1024, numFiles, 0, 0, getFileFactory(), "activemq-data", "amq", 5000); journal.start(); journal.load(new ArrayList(), null, null); diff --git a/tests/performance-tests/src/test/java/org/apache/activemq/tests/performance/paging/MeasurePagingMultiThreadTest.java b/tests/performance-tests/src/test/java/org/apache/activemq/tests/performance/paging/MeasurePagingMultiThreadTest.java index d17c4a0b93..1105eca5ba 100644 --- a/tests/performance-tests/src/test/java/org/apache/activemq/tests/performance/paging/MeasurePagingMultiThreadTest.java +++ b/tests/performance-tests/src/test/java/org/apache/activemq/tests/performance/paging/MeasurePagingMultiThreadTest.java @@ -22,7 +22,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -52,7 +52,7 @@ public class MeasurePagingMultiThreadTest extends ServiceTestBase HashMap settings = new HashMap(); - HornetQServer messagingService = createServer(true, config, 10 * 1024, 20 * 1024, settings); + ActiveMQServer messagingService = createServer(true, config, 10 * 1024, 20 * 1024, settings); messagingService.start(); ServerLocator locator = createInVMNonHALocator(); try diff --git a/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/ClientAbstract.java b/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/ClientAbstract.java index 2ba5a8fab9..deeba0c849 100644 --- a/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/ClientAbstract.java +++ b/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/ClientAbstract.java @@ -26,7 +26,7 @@ import org.apache.activemq.utils.UUIDGenerator; * TransactionManager. This class is doing the job of a TransactionManager that fits for the purpose * of this test only, however there are many more pitfalls to deal with Transactions. *

    - * This is just to stress and soak test Transactions with HornetQ. + * This is just to stress and soak test Transactions with ActiveMQ. *

    * And this is dealing with XA directly for the purpose testing only. * @author Clebert Suconic diff --git a/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/ClientNonDivertedSoakTest.java b/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/ClientNonDivertedSoakTest.java index c1342a2cfe..50256266ed 100644 --- a/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/ClientNonDivertedSoakTest.java +++ b/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/ClientNonDivertedSoakTest.java @@ -22,7 +22,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Before; @@ -54,7 +54,7 @@ public class ClientNonDivertedSoakTest extends ServiceTestBase // Public -------------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; @Override @Before diff --git a/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/ClientSoakTest.java b/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/ClientSoakTest.java index da7eec13fd..2ce3d3cee0 100644 --- a/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/ClientSoakTest.java +++ b/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/ClientSoakTest.java @@ -24,7 +24,7 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.DivertConfiguration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.After; @@ -61,7 +61,7 @@ public class ClientSoakTest extends ServiceTestBase // Public -------------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; @Override @Before diff --git a/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/SimpleSendReceiveSoakTest.java b/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/SimpleSendReceiveSoakTest.java index 061a3c6843..78cf8d4c89 100644 --- a/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/SimpleSendReceiveSoakTest.java +++ b/tests/soak-tests/src/test/java/org/apache/activemq/tests/soak/client/SimpleSendReceiveSoakTest.java @@ -25,7 +25,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.util.ServiceTestBase; @@ -57,7 +57,7 @@ public class SimpleSendReceiveSoakTest extends ServiceTestBase // Public -------------------------------------------------------- - private HornetQServer server; + private ActiveMQServer server; @Override @Before diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/client/SendStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/client/SendStressTest.java index 97cebd5970..e93177f347 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/client/SendStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/client/SendStressTest.java @@ -18,7 +18,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; import org.junit.Test; @@ -56,7 +56,7 @@ public class SendStressTest extends ServiceTestBase public void doTestStressSend(final boolean netty) throws Exception { - HornetQServer server = createServer(false, netty); + ActiveMQServer server = createServer(false, netty); server.start(); ServerLocator locator = createNonHALocator(netty); ClientSessionFactory sf = createSessionFactory(locator); diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/AddAndRemoveStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/AddAndRemoveStressTest.java index fb2f45c161..46c9e237fb 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/AddAndRemoveStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/AddAndRemoveStressTest.java @@ -83,8 +83,8 @@ public class AddAndRemoveStressTest extends UnitTestCase 0, 0, factory, - "hq", - "hq", + "amq", + "amq", 1000); impl.start(); @@ -108,8 +108,8 @@ public class AddAndRemoveStressTest extends UnitTestCase 0, 0, factory, - "hq", - "hq", + "amq", + "amq", 1000); impl.start(); @@ -134,8 +134,8 @@ public class AddAndRemoveStressTest extends UnitTestCase 0, 0, factory, - "hq", - "hq", + "amq", + "amq", 1000); impl.start(); @@ -171,8 +171,8 @@ public class AddAndRemoveStressTest extends UnitTestCase 0, 0, factory, - "hq", - "hq", + "amq", + "amq", 1000); impl.start(); @@ -192,7 +192,7 @@ public class AddAndRemoveStressTest extends UnitTestCase impl.stop(); factory = new AIOSequentialFileFactory(getTestDir()); - impl = new JournalImpl(10 * 1024 * 1024, 10, 0, 0, factory, "hq", "hq", 1000); + impl = new JournalImpl(10 * 1024 * 1024, 10, 0, 0, factory, "amq", "amq", 1000); impl.start(); @@ -216,8 +216,8 @@ public class AddAndRemoveStressTest extends UnitTestCase 0, 0, factory, - "hq", - "hq", + "amq", + "amq", 1000); impl.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 e04b233f8d..e9b58d06b8 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 @@ -29,7 +29,7 @@ import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.asyncio.impl.AsynchronousFileImpl; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.JournalType; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -62,7 +62,7 @@ public class CompactingStressTest extends ServiceTestBase private static final int TOT_AD3 = 5000; - private HornetQServer server; + private ActiveMQServer server; private ClientSessionFactory sf; 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 5053a029e5..c7c7d6cdc7 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 @@ -42,7 +42,7 @@ import org.apache.activemq.core.persistence.impl.journal.OperationContextImpl; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; -import org.apache.activemq.utils.HornetQThreadFactory; +import org.apache.activemq.utils.ActiveMQThreadFactory; import org.apache.activemq.utils.OrderedExecutorFactory; import org.apache.activemq.utils.SimpleIDGenerator; import org.junit.After; @@ -78,7 +78,7 @@ public class JournalCleanupCompactStressTest extends ServiceTestBase private JournalImpl journal; - ThreadFactory tFactory = new HornetQThreadFactory("SoakTest" + System.identityHashCode(this), + ThreadFactory tFactory = new ActiveMQThreadFactory("SoakTest" + System.identityHashCode(this), false, JournalCleanupCompactStressTest.class.getClassLoader()); @@ -130,8 +130,8 @@ public class JournalCleanupCompactStressTest extends ServiceTestBase 50, ActiveMQDefaultConfiguration.getDefaultJournalCompactPercentage(), factory, - "hornetq-data", - "hq", + "activemq-data", + "amq", maxAIO) { @Override diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/JournalRestartStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/JournalRestartStressTest.java index 18e4411c6b..6a75b30c38 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/JournalRestartStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/JournalRestartStressTest.java @@ -21,7 +21,7 @@ import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Test; @@ -49,7 +49,7 @@ public class JournalRestartStressTest extends ServiceTestBase @Test public void testLoad() throws Throwable { - HornetQServer server2 = createServer(true, false); + ActiveMQServer server2 = createServer(true, false); server2.getConfiguration().setJournalFileSize(10 * 1024 * 1024); server2.getConfiguration().setJournalMinFiles(10); 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 6a7a92df68..6668ceb6ff 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 @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.JournalType; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -52,7 +52,7 @@ public class LargeJournalStressTest extends ServiceTestBase private static final String Q2 = "q2"; - private HornetQServer server; + private ActiveMQServer server; private ClientSessionFactory sf; 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 32e3912964..198d58fd78 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 @@ -24,7 +24,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.JournalType; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -50,7 +50,7 @@ public class MultiThreadConsumerStressTest extends ServiceTestBase final SimpleString QUEUE = new SimpleString("SomeQueue"); - private HornetQServer server; + private ActiveMQServer server; private ClientSessionFactory sf; 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 988845f26e..764b336edb 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 @@ -33,7 +33,7 @@ import org.apache.activemq.core.journal.PreparedTransactionInfo; import org.apache.activemq.core.journal.RecordInfo; import org.apache.activemq.core.journal.impl.JournalImpl; import org.apache.activemq.core.journal.impl.NIOSequentialFileFactory; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.JournalType; import org.apache.activemq.tests.util.ServiceTestBase; import org.apache.activemq.tests.util.UnitTestCase; @@ -57,7 +57,7 @@ public class NIOMultiThreadCompactorStressTest extends ServiceTestBase final SimpleString QUEUE = new SimpleString("SomeQueue"); - private HornetQServer server; + private ActiveMQServer server; private ClientSessionFactory sf; @@ -98,8 +98,8 @@ public class NIOMultiThreadCompactorStressTest extends ServiceTestBase 0, 0, factory, - "hornetq-data", - "hq", + "activemq-data", + "amq", 100); List committedRecords = new ArrayList(); diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/XmlImportExportStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/XmlImportExportStressTest.java index f8c08a09b0..d7dab14425 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/XmlImportExportStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/journal/XmlImportExportStressTest.java @@ -22,7 +22,7 @@ import org.junit.Test; import org.apache.activemq.tools.XmlDataExporter; import org.apache.activemq.tools.XmlDataImporter; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.tests.util.ServiceTestBase; import java.io.BufferedOutputStream; @@ -40,7 +40,7 @@ public class XmlImportExportStressTest extends ServiceTestBase final String FILE_NAME = getTestDir() + "/export.out"; final String QUEUE_NAME = "A1"; - HornetQServer server = createServer(true); + ActiveMQServer server = createServer(true); server.start(); ServerLocator locator = createInVMNonHALocator(); ClientSessionFactory factory = locator.createSessionFactory(); diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/paging/MultipleConsumersPageStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/paging/MultipleConsumersPageStressTest.java index 475b83f7ff..2c1f6e548b 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/paging/MultipleConsumersPageStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/paging/MultipleConsumersPageStressTest.java @@ -31,7 +31,7 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.impl.QueueImpl; import org.apache.activemq.core.settings.impl.AddressSettings; import org.apache.activemq.tests.unit.UnitTestLogger; @@ -67,7 +67,7 @@ public class MultipleConsumersPageStressTest extends ServiceTestBase private boolean openConsumerOnEveryLoop = true; - private HornetQServer messagingService; + private ActiveMQServer messagingService; private ServerLocator sharedLocator; diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/paging/PageCursorStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/paging/PageCursorStressTest.java index f65d26bf6e..a0c3b3e863 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/paging/PageCursorStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/paging/PageCursorStressTest.java @@ -32,7 +32,7 @@ import org.apache.activemq.core.paging.cursor.impl.PageCursorProviderImpl; import org.apache.activemq.core.paging.impl.PagingStoreImpl; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.persistence.impl.journal.OperationContextImpl; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.RoutingContext; import org.apache.activemq.core.server.ServerMessage; @@ -64,7 +64,7 @@ public class PageCursorStressTest extends ServiceTestBase private final SimpleString ADDRESS = new SimpleString("test-add"); - private HornetQServer server; + private ActiveMQServer server; private Queue queue; diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/paging/PageStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/paging/PageStressTest.java index fcad42d483..2d32bf498e 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/paging/PageStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/paging/PageStressTest.java @@ -23,9 +23,9 @@ import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.settings.impl.AddressSettings; -import org.apache.activemq.jms.client.HornetQBytesMessage; +import org.apache.activemq.jms.client.ActiveMQBytesMessage; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; import org.junit.Before; @@ -43,7 +43,7 @@ public class PageStressTest extends ServiceTestBase // Attributes ---------------------------------------------------- - private HornetQServer messagingService; + private ActiveMQServer messagingService; private ServerLocator locator; @@ -79,7 +79,7 @@ public class PageStressTest extends ServiceTestBase ClientProducer prod = session.createProducer(address); - ClientMessage message = createBytesMessage(session, HornetQBytesMessage.TYPE, new byte[700], true); + ClientMessage message = createBytesMessage(session, ActiveMQBytesMessage.TYPE, new byte[700], true); for (int i = 0; i < NUMBER_OF_MESSAGES; i++) { @@ -188,7 +188,7 @@ public class PageStressTest extends ServiceTestBase ClientProducer prod = session.createProducer(address); - ClientMessage message = createBytesMessage(session, HornetQBytesMessage.TYPE, new byte[700], false); + ClientMessage message = createBytesMessage(session, ActiveMQBytesMessage.TYPE, new byte[700], false); int NUMBER_OF_MESSAGES = 60000; diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/remote/PingStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/remote/PingStressTest.java index 7999829694..47c8749c3f 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/remote/PingStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/remote/PingStressTest.java @@ -23,12 +23,12 @@ import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.PacketImpl; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.unit.UnitTestLogger; import org.apache.activemq.tests.util.RandomUtil; @@ -44,7 +44,7 @@ public class PingStressTest extends ServiceTestBase private static final long PING_INTERVAL = 500; - private HornetQServer server; + private ActiveMQServer server; @Override @Before @@ -101,7 +101,7 @@ public class PingStressTest extends ServiceTestBase }; server.getRemotingService().addIncomingInterceptor(noPongInterceptor); - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(transportConfig)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(transportConfig)); locator.setClientFailureCheckPeriod(PingStressTest.PING_INTERVAL); locator.setConnectionTTL((long)(PingStressTest.PING_INTERVAL * 1.5)); locator.setCallTimeout(PingStressTest.PING_INTERVAL * 10); @@ -132,7 +132,7 @@ public class PingStressTest extends ServiceTestBase try { - ServerLocator locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(transportConfig)); + ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(transportConfig)); locator.setClientFailureCheckPeriod(PingStressTest.PING_INTERVAL); locator.setConnectionTTL((long)(PingStressTest.PING_INTERVAL * 1.5)); locator.setCallTimeout(PingStressTest.PING_INTERVAL * 10); diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/stomp/StompStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/stomp/StompStressTest.java index 318a4e6a90..931e3efb0d 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/stomp/StompStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/tests/stress/stomp/StompStressTest.java @@ -35,8 +35,8 @@ import org.apache.activemq.core.protocol.stomp.Stomp; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.tests.util.UnitTestCase; public class StompStressTest extends UnitTestCase @@ -51,7 +51,7 @@ public class StompStressTest extends UnitTestCase private final String destination = "stomp.stress.queue"; - private HornetQServer server; + private ActiveMQServer server; @Test public void testSendAndReceiveMessage() throws Exception @@ -101,7 +101,7 @@ public class StompStressTest extends UnitTestCase inputBuffer = new ByteArrayOutputStream(); } - private HornetQServer createServer() throws Exception + private ActiveMQServer createServer() throws Exception { Map params = new HashMap(); params.put(TransportConstants.PROTOCOLS_PROP_NAME, StompProtocolManagerFactory.STOMP_PROTOCOL_NAME); @@ -117,7 +117,7 @@ public class StompStressTest extends UnitTestCase .setName(destination) .setDurable(false)); - return addServer(HornetQServers.newHornetQServer(config)); + return addServer(ActiveMQServers.newActiveMQServer(config)); } @Override diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java index 7ab4a230ed..bc7d963c11 100644 --- a/tests/timing-tests/src/test/java/org/apache/activemq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java +++ b/tests/timing-tests/src/test/java/org/apache/activemq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java @@ -40,18 +40,18 @@ import java.util.concurrent.atomic.AtomicReference; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.ObjectNameBuilder; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.api.jms.management.JMSQueueControl; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.jms.bridge.ConnectionFactoryFactory; import org.apache.activemq.jms.bridge.DestinationFactory; import org.apache.activemq.jms.bridge.QualityOfServiceMode; import org.apache.activemq.jms.bridge.impl.JMSBridgeImpl; -import org.apache.activemq.jms.client.HornetQJMSConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory; import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.tests.unit.UnitTestLogger; @@ -159,7 +159,7 @@ public class JMSBridgeImplTest extends UnitTestCase private static ConnectionFactory createConnectionFactory() { - HornetQJMSConnectionFactory cf = (HornetQJMSConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(InVMConnectorFactory.class.getName())); + ActiveMQJMSConnectionFactory cf = (ActiveMQJMSConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(InVMConnectorFactory.class.getName())); // Note! We disable automatic reconnection on the session factory. The bridge needs to do the reconnection cf.setReconnectAttempts(0); cf.setBlockOnNonDurableSend(true); @@ -174,7 +174,7 @@ public class JMSBridgeImplTest extends UnitTestCase @Test public void testStartWithRepeatedFailure() throws Exception { - HornetQJMSConnectionFactory failingSourceCF = new HornetQJMSConnectionFactory(false, new TransportConfiguration(InVMConnectorFactory.class.getName())) + ActiveMQJMSConnectionFactory failingSourceCF = new ActiveMQJMSConnectionFactory(false, new TransportConfiguration(InVMConnectorFactory.class.getName())) { private static final long serialVersionUID = 2834937512213001068L; @@ -187,8 +187,8 @@ public class JMSBridgeImplTest extends UnitTestCase ConnectionFactoryFactory sourceCFF = JMSBridgeImplTest.newConnectionFactoryFactory(failingSourceCF); ConnectionFactoryFactory targetCFF = JMSBridgeImplTest.newConnectionFactoryFactory(JMSBridgeImplTest.createConnectionFactory()); - DestinationFactory sourceDF = JMSBridgeImplTest.newDestinationFactory(HornetQJMSClient.createQueue(JMSBridgeImplTest.SOURCE)); - DestinationFactory targetDF = JMSBridgeImplTest.newDestinationFactory(HornetQJMSClient.createQueue(JMSBridgeImplTest.TARGET)); + DestinationFactory sourceDF = JMSBridgeImplTest.newDestinationFactory(ActiveMQJMSClient.createQueue(JMSBridgeImplTest.SOURCE)); + DestinationFactory targetDF = JMSBridgeImplTest.newDestinationFactory(ActiveMQJMSClient.createQueue(JMSBridgeImplTest.TARGET)); TransactionManager tm = JMSBridgeImplTest.newTransactionManager(); JMSBridgeImpl bridge = new JMSBridgeImpl(); @@ -220,7 +220,7 @@ public class JMSBridgeImplTest extends UnitTestCase @Test public void testStartWithFailureThenSuccess() throws Exception { - HornetQJMSConnectionFactory failingSourceCF = new HornetQJMSConnectionFactory(false, new TransportConfiguration(InVMConnectorFactory.class.getName())) + ActiveMQJMSConnectionFactory failingSourceCF = new ActiveMQJMSConnectionFactory(false, new TransportConfiguration(InVMConnectorFactory.class.getName())) { private static final long serialVersionUID = 4657153922210359725L; boolean firstTime = true; @@ -246,8 +246,8 @@ public class JMSBridgeImplTest extends UnitTestCase ConnectionFactoryFactory sourceCFF = JMSBridgeImplTest.newConnectionFactoryFactory(failingSourceCF); ConnectionFactoryFactory targetCFF = JMSBridgeImplTest.newConnectionFactoryFactory(JMSBridgeImplTest.createConnectionFactory()); - DestinationFactory sourceDF = JMSBridgeImplTest.newDestinationFactory(HornetQJMSClient.createQueue(JMSBridgeImplTest.SOURCE)); - DestinationFactory targetDF = JMSBridgeImplTest.newDestinationFactory(HornetQJMSClient.createQueue(JMSBridgeImplTest.TARGET)); + DestinationFactory sourceDF = JMSBridgeImplTest.newDestinationFactory(ActiveMQJMSClient.createQueue(JMSBridgeImplTest.SOURCE)); + DestinationFactory targetDF = JMSBridgeImplTest.newDestinationFactory(ActiveMQJMSClient.createQueue(JMSBridgeImplTest.TARGET)); TransactionManager tm = JMSBridgeImplTest.newTransactionManager(); JMSBridgeImpl bridge = new JMSBridgeImpl(); @@ -287,8 +287,8 @@ public class JMSBridgeImplTest extends UnitTestCase ConnectionFactoryFactory sourceCFF = JMSBridgeImplTest.newConnectionFactoryFactory(JMSBridgeImplTest.createConnectionFactory()); ConnectionFactoryFactory targetCFF = JMSBridgeImplTest.newConnectionFactoryFactory(JMSBridgeImplTest.createConnectionFactory()); - DestinationFactory sourceDF = JMSBridgeImplTest.newDestinationFactory(HornetQJMSClient.createQueue(JMSBridgeImplTest.SOURCE)); - DestinationFactory targetDF = JMSBridgeImplTest.newDestinationFactory(HornetQJMSClient.createQueue(JMSBridgeImplTest.TARGET)); + DestinationFactory sourceDF = JMSBridgeImplTest.newDestinationFactory(ActiveMQJMSClient.createQueue(JMSBridgeImplTest.SOURCE)); + DestinationFactory targetDF = JMSBridgeImplTest.newDestinationFactory(ActiveMQJMSClient.createQueue(JMSBridgeImplTest.TARGET)); TransactionManager tm = JMSBridgeImplTest.newTransactionManager(); JMSBridgeImpl bridge = new JMSBridgeImpl(); @@ -348,8 +348,8 @@ public class JMSBridgeImplTest extends UnitTestCase ConnectionFactoryFactory sourceCFF = JMSBridgeImplTest.newConnectionFactoryFactory(JMSBridgeImplTest.createConnectionFactory()); ConnectionFactoryFactory targetCFF = JMSBridgeImplTest.newConnectionFactoryFactory(JMSBridgeImplTest.createConnectionFactory()); - DestinationFactory sourceDF = JMSBridgeImplTest.newDestinationFactory(HornetQJMSClient.createQueue(JMSBridgeImplTest.SOURCE)); - DestinationFactory targetDF = JMSBridgeImplTest.newDestinationFactory(HornetQJMSClient.createQueue(JMSBridgeImplTest.TARGET)); + DestinationFactory sourceDF = JMSBridgeImplTest.newDestinationFactory(ActiveMQJMSClient.createQueue(JMSBridgeImplTest.SOURCE)); + DestinationFactory targetDF = JMSBridgeImplTest.newDestinationFactory(ActiveMQJMSClient.createQueue(JMSBridgeImplTest.TARGET)); TransactionManager tm = JMSBridgeImplTest.newTransactionManager(); JMSBridgeImpl bridge = new JMSBridgeImpl(); @@ -436,8 +436,8 @@ public class JMSBridgeImplTest extends UnitTestCase ConnectionFactoryFactory sourceCFF = JMSBridgeImplTest.newConnectionFactoryFactory(JMSBridgeImplTest.createConnectionFactory()); ConnectionFactoryFactory targetCFF = JMSBridgeImplTest.newConnectionFactoryFactory(JMSBridgeImplTest.createConnectionFactory()); - DestinationFactory sourceDF = JMSBridgeImplTest.newDestinationFactory(HornetQJMSClient.createQueue(JMSBridgeImplTest.SOURCE)); - DestinationFactory targetDF = JMSBridgeImplTest.newDestinationFactory(HornetQJMSClient.createQueue(JMSBridgeImplTest.TARGET)); + DestinationFactory sourceDF = JMSBridgeImplTest.newDestinationFactory(ActiveMQJMSClient.createQueue(JMSBridgeImplTest.SOURCE)); + DestinationFactory targetDF = JMSBridgeImplTest.newDestinationFactory(ActiveMQJMSClient.createQueue(JMSBridgeImplTest.TARGET)); TransactionManager tm = JMSBridgeImplTest.newTransactionManager(); JMSBridgeImpl bridge = new JMSBridgeImpl(); @@ -487,7 +487,7 @@ public class JMSBridgeImplTest extends UnitTestCase public void testExceptionOnSourceAndRetrySucceeds() throws Exception { final AtomicReference sourceConn = new AtomicReference(); - HornetQJMSConnectionFactory failingSourceCF = new HornetQJMSConnectionFactory(false, new TransportConfiguration(InVMConnectorFactory.class.getName())) + ActiveMQJMSConnectionFactory failingSourceCF = new ActiveMQJMSConnectionFactory(false, new TransportConfiguration(InVMConnectorFactory.class.getName())) { private static final long serialVersionUID = -8866390811966688830L; @@ -505,8 +505,8 @@ public class JMSBridgeImplTest extends UnitTestCase ConnectionFactoryFactory sourceCFF = JMSBridgeImplTest.newConnectionFactoryFactory(failingSourceCF); ConnectionFactoryFactory targetCFF = JMSBridgeImplTest.newConnectionFactoryFactory(JMSBridgeImplTest.createConnectionFactory()); - DestinationFactory sourceDF = JMSBridgeImplTest.newDestinationFactory(HornetQJMSClient.createQueue(JMSBridgeImplTest.SOURCE)); - DestinationFactory targetDF = JMSBridgeImplTest.newDestinationFactory(HornetQJMSClient.createQueue(JMSBridgeImplTest.TARGET)); + DestinationFactory sourceDF = JMSBridgeImplTest.newDestinationFactory(ActiveMQJMSClient.createQueue(JMSBridgeImplTest.SOURCE)); + DestinationFactory targetDF = JMSBridgeImplTest.newDestinationFactory(ActiveMQJMSClient.createQueue(JMSBridgeImplTest.TARGET)); TransactionManager tm = JMSBridgeImplTest.newTransactionManager(); JMSBridgeImpl bridge = new JMSBridgeImpl(); @@ -540,8 +540,8 @@ public class JMSBridgeImplTest extends UnitTestCase public void testExceptionOnSourceAndRetryFails() throws Exception { final AtomicReference sourceConn = new AtomicReference(); - HornetQJMSConnectionFactory failingSourceCF = - new HornetQJMSConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY)) + ActiveMQJMSConnectionFactory failingSourceCF = + new ActiveMQJMSConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY)) { private static final long serialVersionUID = 8216804886099984645L; boolean firstTime = true; @@ -568,8 +568,8 @@ public class JMSBridgeImplTest extends UnitTestCase ConnectionFactoryFactory sourceCFF = JMSBridgeImplTest.newConnectionFactoryFactory(failingSourceCF); ConnectionFactoryFactory targetCFF = JMSBridgeImplTest.newConnectionFactoryFactory(JMSBridgeImplTest.createConnectionFactory()); - DestinationFactory sourceDF = JMSBridgeImplTest.newDestinationFactory(HornetQJMSClient.createQueue(JMSBridgeImplTest.SOURCE)); - DestinationFactory targetDF = JMSBridgeImplTest.newDestinationFactory(HornetQJMSClient.createQueue(JMSBridgeImplTest.TARGET)); + DestinationFactory sourceDF = JMSBridgeImplTest.newDestinationFactory(ActiveMQJMSClient.createQueue(JMSBridgeImplTest.SOURCE)); + DestinationFactory targetDF = JMSBridgeImplTest.newDestinationFactory(ActiveMQJMSClient.createQueue(JMSBridgeImplTest.TARGET)); TransactionManager tm = JMSBridgeImplTest.newTransactionManager(); JMSBridgeImpl bridge = new JMSBridgeImpl(); @@ -611,7 +611,7 @@ public class JMSBridgeImplTest extends UnitTestCase .setFileDeploymentEnabled(false) .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())); InVMNamingContext context = new InVMNamingContext(); - jmsServer = new JMSServerManagerImpl(HornetQServers.newHornetQServer(config, false)); + jmsServer = new JMSServerManagerImpl(ActiveMQServers.newActiveMQServer(config, false)); jmsServer.setContext(context); jmsServer.start(); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/UnitTestLogger.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/UnitTestLogger.java index d0518c97d6..76bd74b73c 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/UnitTestLogger.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/UnitTestLogger.java @@ -21,7 +21,7 @@ import org.jboss.logging.annotations.MessageLogger; * 4/17/12 */ -@MessageLogger(projectCode = "HQTEST") +@MessageLogger(projectCode = "AMQTEST") public interface UnitTestLogger extends BasicLogger { /** diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/asyncio/AsynchronousFileTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/asyncio/AsynchronousFileTest.java index 336cf12f11..3e61fc3765 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/asyncio/AsynchronousFileTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/asyncio/AsynchronousFileTest.java @@ -36,7 +36,7 @@ import org.apache.activemq.core.asyncio.impl.AsynchronousFileImpl; import org.apache.activemq.core.journal.impl.AIOSequentialFileFactory; import org.apache.activemq.tests.unit.UnitTestLogger; import org.apache.activemq.tests.util.UnitTestCase; -import org.apache.activemq.utils.HornetQThreadFactory; +import org.apache.activemq.utils.ActiveMQThreadFactory; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -92,7 +92,7 @@ public class AsynchronousFileTest extends AIOTestBase public void setUp() throws Exception { super.setUp(); - pollerExecutor = Executors.newCachedThreadPool(new HornetQThreadFactory("ActiveMQ-AIO-poller-pool" + System.identityHashCode(this), + pollerExecutor = Executors.newCachedThreadPool(new ActiveMQThreadFactory("ActiveMQ-AIO-poller-pool" + System.identityHashCode(this), false, this.getClass().getClassLoader())); executor = Executors.newSingleThreadExecutor(); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/asyncio/MultiThreadAsynchronousFileTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/asyncio/MultiThreadAsynchronousFileTest.java index 7eef77d8f7..f78b86d7ad 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/asyncio/MultiThreadAsynchronousFileTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/asyncio/MultiThreadAsynchronousFileTest.java @@ -26,7 +26,7 @@ import org.apache.activemq.core.asyncio.impl.AsynchronousFileImpl; import org.apache.activemq.core.journal.impl.AIOSequentialFileFactory; import org.apache.activemq.tests.unit.UnitTestLogger; import org.apache.activemq.tests.util.UnitTestCase; -import org.apache.activemq.utils.HornetQThreadFactory; +import org.apache.activemq.utils.ActiveMQThreadFactory; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -72,7 +72,7 @@ public class MultiThreadAsynchronousFileTest extends AIOTestBase public void setUp() throws Exception { super.setUp(); - pollerExecutor = Executors.newCachedThreadPool(new HornetQThreadFactory("ActiveMQ-AIO-poller-pool" + System.identityHashCode(this), + pollerExecutor = Executors.newCachedThreadPool(new ActiveMQThreadFactory("ActiveMQ-AIO-poller-pool" + System.identityHashCode(this), false, this.getClass().getClassLoader())); executor = Executors.newSingleThreadExecutor(); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/client/impl/LargeMessageBufferTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/client/impl/LargeMessageBufferTest.java index 6408259102..5f24ae24f5 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/client/impl/LargeMessageBufferTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/client/impl/LargeMessageBufferTest.java @@ -38,12 +38,12 @@ import org.apache.activemq.core.client.impl.ClientLargeMessageInternal; import org.apache.activemq.core.client.impl.ClientMessageInternal; import org.apache.activemq.core.client.impl.ClientSessionInternal; import org.apache.activemq.core.client.impl.LargeMessageControllerImpl; -import org.apache.activemq.core.protocol.core.impl.HornetQConsumerContext; +import org.apache.activemq.core.protocol.core.impl.ActiveMQConsumerContext; import org.apache.activemq.spi.core.remoting.ConsumerContext; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.UnitTestCase; import org.apache.activemq.utils.FutureLatch; -import org.apache.activemq.utils.HornetQBufferInputStream; +import org.apache.activemq.utils.ActiveMQBufferInputStream; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -183,7 +183,7 @@ public class LargeMessageBufferTest extends UnitTestCase public void testReadIntegersOverStream() throws Exception { LargeMessageControllerImpl buffer = createBufferWithIntegers(3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); - HornetQBufferInputStream is = new HornetQBufferInputStream(buffer); + ActiveMQBufferInputStream is = new ActiveMQBufferInputStream(buffer); DataInputStream dataInput = new DataInputStream(is); for (int i = 1; i <= 15; i++) @@ -220,7 +220,7 @@ public class LargeMessageBufferTest extends UnitTestCase public void testReadLongsOverStream() throws Exception { LargeMessageControllerImpl buffer = createBufferWithLongs(3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); - HornetQBufferInputStream is = new HornetQBufferInputStream(buffer); + ActiveMQBufferInputStream is = new ActiveMQBufferInputStream(buffer); DataInputStream dataInput = new DataInputStream(is); for (int i = 1; i <= 15; i++) @@ -660,7 +660,7 @@ public class LargeMessageBufferTest extends UnitTestCase ActiveMQBuffer splitbuffer = splitBuffer(3, byteArray); - HornetQBufferInputStream is = new HornetQBufferInputStream(splitbuffer); + ActiveMQBufferInputStream is = new ActiveMQBufferInputStream(splitbuffer); for (int i = 0; i < 100; i++) { @@ -775,7 +775,7 @@ public class LargeMessageBufferTest extends UnitTestCase public ConsumerContext getConsumerContext() { - return new HornetQConsumerContext(0); + return new ActiveMQConsumerContext(0); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/config/impl/ConfigurationValidationTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/config/impl/ConfigurationValidationTest.java index c91c4725ea..5f5ee0da2a 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/config/impl/ConfigurationValidationTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/config/impl/ConfigurationValidationTest.java @@ -50,7 +50,7 @@ public class ConfigurationValidationTest extends UnitTestCase @Test public void testMinimalConfiguration() throws Exception { - String xml = "" + ""; + String xml = "" + ""; Element element = XMLUtil.stringToElement(xml); Assert.assertNotNull(element); XMLUtil.validate(element, "schema/activemq-configuration.xsd"); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/deployers/impl/AddressSettingsDeployerTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/deployers/impl/AddressSettingsDeployerTest.java index 266c21dcaf..02dc154a3f 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/deployers/impl/AddressSettingsDeployerTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/deployers/impl/AddressSettingsDeployerTest.java @@ -89,7 +89,7 @@ public class AddressSettingsDeployerTest extends UnitTestCase @Test public void testDeployFromConfigurationFile() throws Exception { - String xml = " " + "" + + String xml = " " + "" + conf + "" + ""; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/deployers/impl/BasicUserCredentialsDeployerTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/deployers/impl/BasicUserCredentialsDeployerTest.java index aaf6bf8721..57fcffa774 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/deployers/impl/BasicUserCredentialsDeployerTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/deployers/impl/BasicUserCredentialsDeployerTest.java @@ -21,7 +21,7 @@ import org.apache.activemq.core.deployers.DeploymentManager; import org.apache.activemq.core.deployers.impl.BasicUserCredentialsDeployer; import org.apache.activemq.core.security.CheckType; import org.apache.activemq.core.security.Role; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; import org.apache.activemq.tests.util.UnitTestCase; import org.apache.activemq.utils.DefaultSensitiveStringCodec; import org.apache.activemq.utils.XMLUtil; @@ -44,7 +44,7 @@ public class BasicUserCredentialsDeployerTest extends UnitTestCase { private FakeDeployer deployer; - private FakeHornetQUpdateableSecurityManager securityManager; + private FakeActiveMQUpdateableSecurityManager securityManager; private URI url; @@ -111,7 +111,7 @@ public class BasicUserCredentialsDeployerTest extends UnitTestCase { super.setUp(); DeploymentManager deploymentManager = new FakeDeploymentManager(); - securityManager = new FakeHornetQUpdateableSecurityManager(); + securityManager = new FakeActiveMQUpdateableSecurityManager(); deployer = new FakeDeployer(deploymentManager, securityManager); url = new URI("http://localhost"); @@ -385,9 +385,9 @@ public class BasicUserCredentialsDeployerTest extends UnitTestCase { private Element element; - public FakeDeployer(DeploymentManager deploymentManager, HornetQSecurityManager hornetQSecurityManager) + public FakeDeployer(DeploymentManager deploymentManager, ActiveMQSecurityManager activeMQSecurityManager) { - super(deploymentManager, hornetQSecurityManager); + super(deploymentManager, activeMQSecurityManager); } public Element getElement() @@ -413,7 +413,7 @@ public class BasicUserCredentialsDeployerTest extends UnitTestCase } } - class FakeHornetQUpdateableSecurityManager implements HornetQSecurityManager + class FakeActiveMQUpdateableSecurityManager implements ActiveMQSecurityManager { String defaultUser; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/deployers/impl/SecurityDeployerTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/deployers/impl/SecurityDeployerTest.java index f85d845d19..ab07464d62 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/deployers/impl/SecurityDeployerTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/deployers/impl/SecurityDeployerTest.java @@ -289,7 +289,7 @@ public class SecurityDeployerTest extends UnitTestCase @Test public void testDeployFromConfigurationFile() throws Exception { - String xml = " " + "" + String xml = " " + "" + " " + " " + " " diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/AlignedJournalImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/AlignedJournalImplTest.java index e1513e9af2..2d31c3f7d7 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/AlignedJournalImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/AlignedJournalImplTest.java @@ -1297,7 +1297,7 @@ public class AlignedJournalImplTest extends UnitTestCase { factory = new FakeSequentialFileFactory(512, false); - journalImpl = new JournalImpl(512 + 512 * 3, 20, 0, 0, factory, "hq", "hq", 1000); + journalImpl = new JournalImpl(512 + 512 * 3, 20, 0, 0, factory, "amq", "amq", 1000); journalImpl.start(); @@ -1310,8 +1310,8 @@ public class AlignedJournalImplTest extends UnitTestCase journalImpl.stop(); - journalImpl = new JournalImpl(512 + 1024 + 512, 20, 0, 0, factory, "hq", "hq", 1000); - addHornetQComponent(journalImpl); + journalImpl = new JournalImpl(512 + 1024 + 512, 20, 0, 0, factory, "amq", "amq", 1000); + addActiveMQComponent(journalImpl); journalImpl.start(); journalImpl.load(AlignedJournalImplTest.dummyLoader); @@ -1326,8 +1326,8 @@ public class AlignedJournalImplTest extends UnitTestCase journalImpl.stop(); - journalImpl = new JournalImpl(512 + 1024 + 512, 20, 0, 0, factory, "hq", "hq", 1000); - addHornetQComponent(journalImpl); + journalImpl = new JournalImpl(512 + 1024 + 512, 20, 0, 0, factory, "amq", "amq", 1000); + addActiveMQComponent(journalImpl); journalImpl.start(); ArrayList info = new ArrayList(); @@ -1402,7 +1402,7 @@ public class AlignedJournalImplTest extends UnitTestCase } journalImpl = new JournalImpl(journalSize, numberOfMinimalFiles, 0, 0, factory, "tt", "tt", 1000); - addHornetQComponent(journalImpl); + addActiveMQComponent(journalImpl); journalImpl.start(); records.clear(); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/JournalImplTestBase.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/JournalImplTestBase.java index 0a7e066533..07f81e05dc 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/JournalImplTestBase.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/JournalImplTestBase.java @@ -62,9 +62,9 @@ public abstract class JournalImplTestBase extends UnitTestCase protected boolean sync; - protected String filePrefix = "hq"; + protected String filePrefix = "amq"; - protected String fileExtension = "hq"; + protected String fileExtension = "amq"; protected SequentialFileFactory fileFactory; @@ -165,7 +165,7 @@ public abstract class JournalImplTestBase extends UnitTestCase }; journal.setAutoReclaim(false); - addHornetQComponent(journal); + addActiveMQComponent(journal); } // It will start compacting, but it will let the thread in wait mode at onCompactDone, so we can validate command diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/JournalImplTestUnit.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/JournalImplTestUnit.java index 32b5d341c2..40df2466c8 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/JournalImplTestUnit.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/JournalImplTestUnit.java @@ -397,9 +397,9 @@ public abstract class JournalImplTestUnit extends JournalImplTestBase } finally { - filePrefix = "hq"; + filePrefix = "amq"; - fileExtension = "hq"; + fileExtension = "amq"; } } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/SequentialFileFactoryTestBase.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/SequentialFileFactoryTestBase.java index c54e9b0fbb..33e3bc8031 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/SequentialFileFactoryTestBase.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/SequentialFileFactoryTestBase.java @@ -79,7 +79,7 @@ public abstract class SequentialFileFactoryTestBase extends UnitTestCase for (int i = 0; i < numFiles; i++) { - String fileName = UUID.randomUUID().toString() + ".hq"; + String fileName = UUID.randomUUID().toString() + ".amq"; expectedFiles.add(fileName); @@ -101,7 +101,7 @@ public abstract class SequentialFileFactoryTestBase extends UnitTestCase SequentialFile sf2 = factory.createSequentialFile("different.cheese", 1); sf2.open(); - List fileNames = factory.listFiles("hq"); + List fileNames = factory.listFiles("amq"); Assert.assertEquals(expectedFiles.size(), fileNames.size()); @@ -129,7 +129,7 @@ public abstract class SequentialFileFactoryTestBase extends UnitTestCase @Test public void testFill() throws Exception { - SequentialFile sf = factory.createSequentialFile("fill.hq", 1); + SequentialFile sf = factory.createSequentialFile("fill.amq", 1); sf.open(); @@ -155,29 +155,29 @@ public abstract class SequentialFileFactoryTestBase extends UnitTestCase @Test public void testDelete() throws Exception { - SequentialFile sf = factory.createSequentialFile("delete-me.hq", 1); + SequentialFile sf = factory.createSequentialFile("delete-me.amq", 1); sf.open(); - SequentialFile sf2 = factory.createSequentialFile("delete-me2.hq", 1); + SequentialFile sf2 = factory.createSequentialFile("delete-me2.amq", 1); sf2.open(); - List fileNames = factory.listFiles("hq"); + List fileNames = factory.listFiles("amq"); Assert.assertEquals(2, fileNames.size()); - Assert.assertTrue(fileNames.contains("delete-me.hq")); + Assert.assertTrue(fileNames.contains("delete-me.amq")); - Assert.assertTrue(fileNames.contains("delete-me2.hq")); + Assert.assertTrue(fileNames.contains("delete-me2.amq")); sf.delete(); - fileNames = factory.listFiles("hq"); + fileNames = factory.listFiles("amq"); Assert.assertEquals(1, fileNames.size()); - Assert.assertTrue(fileNames.contains("delete-me2.hq")); + Assert.assertTrue(fileNames.contains("delete-me2.amq")); sf2.close(); @@ -186,15 +186,15 @@ public abstract class SequentialFileFactoryTestBase extends UnitTestCase @Test public void testRename() throws Exception { - SequentialFile sf = factory.createSequentialFile("test1.hq", 1); + SequentialFile sf = factory.createSequentialFile("test1.amq", 1); sf.open(); - List fileNames = factory.listFiles("hq"); + List fileNames = factory.listFiles("amq"); Assert.assertEquals(1, fileNames.size()); - Assert.assertTrue(fileNames.contains("test1.hq")); + Assert.assertTrue(fileNames.contains("test1.amq")); sf.renameTo("test1.cmp"); @@ -206,7 +206,7 @@ public abstract class SequentialFileFactoryTestBase extends UnitTestCase sf.delete(); - fileNames = factory.listFiles("hq"); + fileNames = factory.listFiles("amq"); Assert.assertEquals(0, fileNames.size()); @@ -219,7 +219,7 @@ public abstract class SequentialFileFactoryTestBase extends UnitTestCase @Test public void testWriteandRead() throws Exception { - SequentialFile sf = factory.createSequentialFile("write.hq", 1); + SequentialFile sf = factory.createSequentialFile("write.amq", 1); sf.open(); @@ -288,7 +288,7 @@ public abstract class SequentialFileFactoryTestBase extends UnitTestCase @Test public void testPosition() throws Exception { - SequentialFile sf = factory.createSequentialFile("position.hq", 1); + SequentialFile sf = factory.createSequentialFile("position.amq", 1); sf.open(); @@ -373,7 +373,7 @@ public abstract class SequentialFileFactoryTestBase extends UnitTestCase @Test public void testOpenClose() throws Exception { - SequentialFile sf = factory.createSequentialFile("openclose.hq", 1); + SequentialFile sf = factory.createSequentialFile("openclose.amq", 1); sf.open(); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java index 276b0a632e..07393084b6 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java @@ -601,7 +601,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory } /* (non-Javadoc) - * @see org.apache.activemq.core.journal.SequentialFile#write(org.apache.activemq.spi.core.remoting.HornetQBuffer, boolean, org.apache.activemq.core.journal.IOCallback) + * @see org.apache.activemq.core.journal.SequentialFile#write(org.apache.activemq.spi.core.remoting.ActiveMQBuffer, boolean, org.apache.activemq.core.journal.IOCallback) */ public void write(final ActiveMQBuffer bytes, final boolean sync, final IOAsyncTask callback) throws Exception { @@ -612,7 +612,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory } /* (non-Javadoc) - * @see org.apache.activemq.core.journal.SequentialFile#write(org.apache.activemq.spi.core.remoting.HornetQBuffer, boolean) + * @see org.apache.activemq.core.journal.SequentialFile#write(org.apache.activemq.spi.core.remoting.ActiveMQBuffer, boolean) */ public void write(final ActiveMQBuffer bytes, final boolean sync) throws Exception { diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/postoffice/impl/FakeQueue.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/postoffice/impl/FakeQueue.java index 8118c963bc..fc73b89b31 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/postoffice/impl/FakeQueue.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/postoffice/impl/FakeQueue.java @@ -21,7 +21,7 @@ import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.filter.Filter; import org.apache.activemq.core.paging.cursor.PageSubscription; import org.apache.activemq.core.server.Consumer; -import org.apache.activemq.core.server.HornetQServer; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.RoutingContext; @@ -56,7 +56,7 @@ public class FakeQueue implements Queue } @Override - public void setConsumersRefCount(HornetQServer server) + public void setConsumersRefCount(ActiveMQServer server) { } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/HornetQBufferTestBase.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/ActiveMQBufferTestBase.java similarity index 99% rename from tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/HornetQBufferTestBase.java rename to tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/ActiveMQBufferTestBase.java index e7258ba158..751fedb8f4 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/HornetQBufferTestBase.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/ActiveMQBufferTestBase.java @@ -27,7 +27,7 @@ import org.apache.activemq.tests.util.UnitTestCase; * @author Jeff Mesnil. * */ -public abstract class HornetQBufferTestBase extends UnitTestCase +public abstract class ActiveMQBufferTestBase extends UnitTestCase { // Constants ----------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/ChannelBufferWrapper2Test.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/ChannelBufferWrapper2Test.java index c0408e4cce..0b2b329a71 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/ChannelBufferWrapper2Test.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/ChannelBufferWrapper2Test.java @@ -14,7 +14,7 @@ package org.apache.activemq.tests.unit.core.remoting.impl.netty; import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQBuffers; -import org.apache.activemq.tests.unit.core.remoting.HornetQBufferTestBase; +import org.apache.activemq.tests.unit.core.remoting.ActiveMQBufferTestBase; /** * Same as ChannelBufferWrapperTest, but using a different constructor @@ -23,7 +23,7 @@ import org.apache.activemq.tests.unit.core.remoting.HornetQBufferTestBase; * * */ -public class ChannelBufferWrapper2Test extends HornetQBufferTestBase +public class ChannelBufferWrapper2Test extends ActiveMQBufferTestBase { // Constants ----------------------------------------------------- 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 522e8a187a..961b22c74b 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 @@ -21,7 +21,7 @@ import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptor; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.spi.core.remoting.Acceptor; import org.apache.activemq.spi.core.remoting.BufferHandler; import org.apache.activemq.spi.core.remoting.Connection; @@ -62,7 +62,7 @@ public class NettyAcceptorFactoryTest extends UnitTestCase { } - public void connectionCreated(HornetQComponent component, final Connection connection, final String protocol) + public void connectionCreated(ActiveMQComponent component, final Connection connection, final String protocol) { } 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 15df3db6d2..fc0df6c6e6 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 @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.remoting.impl.netty.NettyAcceptor; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.spi.core.remoting.BufferHandler; import org.apache.activemq.spi.core.remoting.Connection; import org.apache.activemq.spi.core.remoting.ConnectionLifeCycleListener; @@ -90,7 +90,7 @@ public class NettyAcceptorTest extends UnitTestCase { } - public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) + public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } @@ -107,7 +107,7 @@ public class NettyAcceptorTest extends UnitTestCase pool2, null); - addHornetQComponent(acceptor); + addActiveMQComponent(acceptor); acceptor.start(); Assert.assertTrue(acceptor.isStarted()); acceptor.stop(); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java index cdcd09216a..7a985a13c7 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.remoting.impl.netty.NettyConnection; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.spi.core.remoting.Connection; import org.apache.activemq.spi.core.remoting.ConnectionLifeCycleListener; import org.apache.activemq.tests.util.UnitTestCase; @@ -84,7 +84,7 @@ public class NettyConnectionTest extends UnitTestCase class MyListener implements ConnectionLifeCycleListener { - public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) + public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java index 13c00ee4ea..a8713b3ce0 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java @@ -24,7 +24,7 @@ import org.junit.Assert; import org.apache.activemq.core.remoting.impl.netty.NettyConnector; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; -import org.apache.activemq.core.server.HornetQComponent; +import org.apache.activemq.core.server.ActiveMQComponent; import org.apache.activemq.spi.core.remoting.BufferHandler; import org.apache.activemq.spi.core.remoting.Connection; import org.apache.activemq.spi.core.remoting.ConnectionLifeCycleListener; @@ -56,7 +56,7 @@ public class NettyConnectorTest extends UnitTestCase { } - public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) + public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } public void connectionReadyForWrites(Object connectionID, boolean ready) @@ -97,7 +97,7 @@ public class NettyConnectorTest extends UnitTestCase { } - public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) + public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } @@ -163,7 +163,7 @@ public class NettyConnectorTest extends UnitTestCase { } - public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) + public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } public void connectionReadyForWrites(Object connectionID, boolean ready) @@ -190,7 +190,7 @@ public class NettyConnectorTest extends UnitTestCase Assert.assertFalse(connector.isStarted()); } @Test - public void testHornetQSystemPropertyOverrides() throws Exception + public void testActiveMQSystemPropertyOverrides() throws Exception { BufferHandler handler = new BufferHandler() { @@ -214,7 +214,7 @@ public class NettyConnectorTest extends UnitTestCase { } - public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) + public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } public void connectionReadyForWrites(Object connectionID, boolean ready) @@ -235,10 +235,10 @@ public class NettyConnectorTest extends UnitTestCase System.setProperty(NettyConnector.JAVAX_TRUSTSTORE_PATH_PROP_NAME, "bad path"); System.setProperty(NettyConnector.JAVAX_TRUSTSTORE_PASSWORD_PROP_NAME, "bad password"); - System.setProperty(NettyConnector.HORNETQ_KEYSTORE_PATH_PROP_NAME, "client-side-keystore.jks"); - System.setProperty(NettyConnector.HORNETQ_KEYSTORE_PASSWORD_PROP_NAME, "secureexample"); - System.setProperty(NettyConnector.HORNETQ_TRUSTSTORE_PATH_PROP_NAME, "client-side-truststore.jks"); - System.setProperty(NettyConnector.HORNETQ_TRUSTSTORE_PASSWORD_PROP_NAME, "secureexample"); + System.setProperty(NettyConnector.ACTIVEMQ_KEYSTORE_PATH_PROP_NAME, "client-side-keystore.jks"); + System.setProperty(NettyConnector.ACTIVEMQ_KEYSTORE_PASSWORD_PROP_NAME, "secureexample"); + System.setProperty(NettyConnector.ACTIVEMQ_TRUSTSTORE_PATH_PROP_NAME, "client-side-truststore.jks"); + System.setProperty(NettyConnector.ACTIVEMQ_TRUSTSTORE_PASSWORD_PROP_NAME, "secureexample"); connector.start(); @@ -269,7 +269,7 @@ public class NettyConnectorTest extends UnitTestCase { } - public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) + public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } public void connectionReadyForWrites(Object connectionID, boolean ready) @@ -314,7 +314,7 @@ public class NettyConnectorTest extends UnitTestCase { } - public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) + public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } public void connectionReadyForWrites(Object connectionID, boolean ready) diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/security/impl/HornetQSecurityManagerImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/security/impl/ActiveMQSecurityManagerImplTest.java similarity index 96% rename from tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/security/impl/HornetQSecurityManagerImplTest.java rename to tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/security/impl/ActiveMQSecurityManagerImplTest.java index 2696a0480a..fda8348683 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/security/impl/HornetQSecurityManagerImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/security/impl/ActiveMQSecurityManagerImplTest.java @@ -22,17 +22,17 @@ import org.junit.Assert; import org.apache.activemq.core.security.CheckType; import org.apache.activemq.core.security.Role; -import org.apache.activemq.spi.core.security.HornetQSecurityManagerImpl; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl; import org.apache.activemq.tests.util.UnitTestCase; /** - * tests HornetQSecurityManagerImpl + * tests ActiveMQSecurityManagerImpl * * @author Andy Taylor */ -public class HornetQSecurityManagerImplTest extends UnitTestCase +public class ActiveMQSecurityManagerImplTest extends UnitTestCase { - private HornetQSecurityManagerImpl securityManager; + private ActiveMQSecurityManagerImpl securityManager; @Override @Before @@ -40,7 +40,7 @@ public class HornetQSecurityManagerImplTest extends UnitTestCase { super.setUp(); - securityManager = new HornetQSecurityManagerImpl(); + securityManager = new ActiveMQSecurityManagerImpl(); } @Override diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/server/impl/QueueImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/server/impl/QueueImplTest.java index 98dbfd006f..db752fcae9 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/server/impl/QueueImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/server/impl/QueueImplTest.java @@ -32,8 +32,8 @@ import org.apache.activemq.core.filter.impl.FilterImpl; import org.apache.activemq.core.postoffice.impl.LocalQueueBinding; import org.apache.activemq.core.server.Consumer; import org.apache.activemq.core.server.HandleStatus; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.ServerMessage; @@ -1613,7 +1613,7 @@ public class QueueImplTest extends UnitTestCase final String MY_ADDRESS = "myAddress"; final String MY_QUEUE = "myQueue"; - HornetQServer server = HornetQServers.newHornetQServer(createDefaultConfig(false), true); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(createDefaultConfig(false), true); AddressSettings defaultSetting = new AddressSettings(); defaultSetting.setPageSizeBytes(10 * 1024); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/HornetQDestinationTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/ActiveMQDestinationTest.java similarity index 74% rename from tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/HornetQDestinationTest.java rename to tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/ActiveMQDestinationTest.java index e8302db717..049dd05970 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/HornetQDestinationTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/ActiveMQDestinationTest.java @@ -20,7 +20,7 @@ import javax.jms.Topic; import org.junit.Assert; -import org.apache.activemq.jms.client.HornetQDestination; +import org.apache.activemq.jms.client.ActiveMQDestination; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.UnitTestCase; @@ -29,7 +29,7 @@ import org.apache.activemq.tests.util.UnitTestCase; * * */ -public class HornetQDestinationTest extends UnitTestCase +public class ActiveMQDestinationTest extends UnitTestCase { // Constants ----------------------------------------------------- @@ -45,10 +45,10 @@ public class HornetQDestinationTest extends UnitTestCase public void testEquals() throws Exception { String destinationName = RandomUtil.randomString(); - String address = HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX + destinationName; - HornetQDestination destination = (HornetQDestination) HornetQDestination.fromAddress(address); - HornetQDestination sameDestination = (HornetQDestination) HornetQDestination.fromAddress(address); - HornetQDestination differentDestination = (HornetQDestination) HornetQDestination.fromAddress(address + RandomUtil.randomString()); + String address = ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX + destinationName; + ActiveMQDestination destination = (ActiveMQDestination) ActiveMQDestination.fromAddress(address); + ActiveMQDestination sameDestination = (ActiveMQDestination) ActiveMQDestination.fromAddress(address); + ActiveMQDestination differentDestination = (ActiveMQDestination) ActiveMQDestination.fromAddress(address + RandomUtil.randomString()); Assert.assertFalse(destination.equals(null)); Assert.assertTrue(destination.equals(destination)); @@ -60,8 +60,8 @@ public class HornetQDestinationTest extends UnitTestCase public void testFromAddressWithQueueAddressPrefix() throws Exception { String destinationName = RandomUtil.randomString(); - String address = HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX + destinationName; - HornetQDestination destination = (HornetQDestination) HornetQDestination.fromAddress(address); + String address = ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX + destinationName; + ActiveMQDestination destination = (ActiveMQDestination) ActiveMQDestination.fromAddress(address); Assert.assertTrue(destination instanceof Queue); Assert.assertEquals(destinationName, ((Queue)destination).getQueueName()); } @@ -70,8 +70,8 @@ public class HornetQDestinationTest extends UnitTestCase public void testFromAddressWithTopicAddressPrefix() throws Exception { String destinationName = RandomUtil.randomString(); - String address = HornetQDestination.JMS_TOPIC_ADDRESS_PREFIX + destinationName; - HornetQDestination destination = (HornetQDestination) HornetQDestination.fromAddress(address); + String address = ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX + destinationName; + ActiveMQDestination destination = (ActiveMQDestination) ActiveMQDestination.fromAddress(address); Assert.assertTrue(destination instanceof Topic); Assert.assertEquals(destinationName, ((Topic)destination).getTopicName()); } @@ -84,7 +84,7 @@ public class HornetQDestinationTest extends UnitTestCase String address = invalidPrefix + destinationName; try { - HornetQDestination.fromAddress(address); + ActiveMQDestination.fromAddress(address); Assert.fail("IllegalArgumentException"); } catch (JMSRuntimeException e) diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/HornetQMapMessageTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/ActiveMQMapMessageTest.java similarity index 81% rename from tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/HornetQMapMessageTest.java rename to tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/ActiveMQMapMessageTest.java index b2356c95c0..947cb80865 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/HornetQMapMessageTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/ActiveMQMapMessageTest.java @@ -13,7 +13,7 @@ package org.apache.activemq.tests.unit.jms.client; import javax.jms.MessageFormatException; -import org.apache.activemq.jms.client.HornetQMapMessage; +import org.apache.activemq.jms.client.ActiveMQMapMessage; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.Assert; @@ -25,7 +25,7 @@ import org.junit.Test; * * */ -public class HornetQMapMessageTest extends UnitTestCase +public class ActiveMQMapMessageTest extends UnitTestCase { // Constants ----------------------------------------------------- @@ -51,7 +51,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testClearBody() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setBoolean(itemName, true); Assert.assertTrue(message.itemExists(itemName)); @@ -64,14 +64,14 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetType() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); - Assert.assertEquals(HornetQMapMessage.TYPE, message.getType()); + ActiveMQMapMessage message = new ActiveMQMapMessage(); + Assert.assertEquals(ActiveMQMapMessage.TYPE, message.getType()); } @Test public void testCheckItemNameIsNull() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); try { message.setBoolean(null, true); @@ -86,7 +86,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testCheckItemNameIsEmpty() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); try { message.setBoolean("", true); @@ -103,7 +103,7 @@ public class HornetQMapMessageTest extends UnitTestCase { boolean value = true; - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setBoolean(itemName, value); Assert.assertEquals(value, message.getBoolean(itemName)); @@ -112,7 +112,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetBooleanFromNull() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); Assert.assertEquals(false, message.getBoolean(itemName)); } @@ -121,7 +121,7 @@ public class HornetQMapMessageTest extends UnitTestCase { boolean value = true; - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setString(itemName, Boolean.toString(value)); Assert.assertEquals(value, message.getBoolean(itemName)); @@ -130,7 +130,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetBooleanFromInvalidType() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setFloat(itemName, RandomUtil.randomFloat()); try @@ -148,7 +148,7 @@ public class HornetQMapMessageTest extends UnitTestCase { byte value = RandomUtil.randomByte(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setByte(itemName, value); Assert.assertEquals(value, message.getByte(itemName)); @@ -157,7 +157,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetByteFromNull() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); try { @@ -174,7 +174,7 @@ public class HornetQMapMessageTest extends UnitTestCase { byte value = RandomUtil.randomByte(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setString(itemName, Byte.toString(value)); Assert.assertEquals(value, message.getByte(itemName)); @@ -183,7 +183,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetByteFromInvalidType() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setFloat(itemName, RandomUtil.randomFloat()); try @@ -201,7 +201,7 @@ public class HornetQMapMessageTest extends UnitTestCase { byte value = RandomUtil.randomByte(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setByte(itemName, value); Assert.assertEquals(value, message.getShort(itemName)); @@ -212,7 +212,7 @@ public class HornetQMapMessageTest extends UnitTestCase { short value = RandomUtil.randomShort(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setShort(itemName, value); Assert.assertEquals(value, message.getShort(itemName)); @@ -221,7 +221,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetShortFromNull() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); try { @@ -238,7 +238,7 @@ public class HornetQMapMessageTest extends UnitTestCase { short value = RandomUtil.randomShort(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setString(itemName, Short.toString(value)); Assert.assertEquals(value, message.getShort(itemName)); @@ -247,7 +247,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetShortFromInvalidType() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setFloat(itemName, RandomUtil.randomFloat()); try @@ -265,7 +265,7 @@ public class HornetQMapMessageTest extends UnitTestCase { byte value = RandomUtil.randomByte(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setByte(itemName, value); Assert.assertEquals(value, message.getInt(itemName)); @@ -276,7 +276,7 @@ public class HornetQMapMessageTest extends UnitTestCase { short value = RandomUtil.randomShort(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setShort(itemName, value); Assert.assertEquals(value, message.getInt(itemName)); @@ -287,7 +287,7 @@ public class HornetQMapMessageTest extends UnitTestCase { int value = RandomUtil.randomInt(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setInt(itemName, value); Assert.assertEquals(value, message.getInt(itemName)); @@ -296,7 +296,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetIntFromNull() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); try { @@ -313,7 +313,7 @@ public class HornetQMapMessageTest extends UnitTestCase { int value = RandomUtil.randomInt(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setString(itemName, Integer.toString(value)); Assert.assertEquals(value, message.getInt(itemName)); @@ -322,7 +322,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetIntFromInvalidType() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setFloat(itemName, RandomUtil.randomFloat()); try @@ -340,7 +340,7 @@ public class HornetQMapMessageTest extends UnitTestCase { char value = RandomUtil.randomChar(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setChar(itemName, value); Assert.assertEquals(value, message.getChar(itemName)); @@ -349,7 +349,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetCharFromNull() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); try { @@ -364,7 +364,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetCharFromInvalidType() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setFloat(itemName, RandomUtil.randomFloat()); try @@ -382,7 +382,7 @@ public class HornetQMapMessageTest extends UnitTestCase { byte value = RandomUtil.randomByte(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setByte(itemName, value); Assert.assertEquals(value, message.getLong(itemName)); @@ -393,7 +393,7 @@ public class HornetQMapMessageTest extends UnitTestCase { short value = RandomUtil.randomShort(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setShort(itemName, value); Assert.assertEquals(value, message.getLong(itemName)); @@ -404,7 +404,7 @@ public class HornetQMapMessageTest extends UnitTestCase { int value = RandomUtil.randomInt(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setInt(itemName, value); Assert.assertEquals(value, message.getLong(itemName)); @@ -415,7 +415,7 @@ public class HornetQMapMessageTest extends UnitTestCase { long value = RandomUtil.randomLong(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setLong(itemName, value); Assert.assertEquals(value, message.getLong(itemName)); @@ -424,7 +424,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetLongFromNull() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); try { @@ -441,7 +441,7 @@ public class HornetQMapMessageTest extends UnitTestCase { long value = RandomUtil.randomLong(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setString(itemName, Long.toString(value)); Assert.assertEquals(value, message.getLong(itemName)); @@ -450,7 +450,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetLongFromInvalidType() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setFloat(itemName, RandomUtil.randomFloat()); try @@ -468,7 +468,7 @@ public class HornetQMapMessageTest extends UnitTestCase { float value = RandomUtil.randomFloat(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setFloat(itemName, value); Assert.assertEquals(value, message.getFloat(itemName), 0.000001); @@ -477,7 +477,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetFloatFromNull() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); try { @@ -494,7 +494,7 @@ public class HornetQMapMessageTest extends UnitTestCase { float value = RandomUtil.randomFloat(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setString(itemName, Float.toString(value)); Assert.assertEquals(value, message.getFloat(itemName), 0.000001); @@ -503,7 +503,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetFloatFromInvalidType() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setChar(itemName, RandomUtil.randomChar()); try @@ -521,7 +521,7 @@ public class HornetQMapMessageTest extends UnitTestCase { float value = RandomUtil.randomFloat(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setFloat(itemName, value); Assert.assertEquals(Float.valueOf(value).doubleValue(), message.getDouble(itemName), 0.000001); @@ -532,7 +532,7 @@ public class HornetQMapMessageTest extends UnitTestCase { double value = RandomUtil.randomDouble(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setDouble(itemName, value); Assert.assertEquals(value, message.getDouble(itemName), 0.000001); @@ -541,7 +541,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetDoubleFromNull() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); try { @@ -558,7 +558,7 @@ public class HornetQMapMessageTest extends UnitTestCase { double value = RandomUtil.randomDouble(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setString(itemName, Double.toString(value)); Assert.assertEquals(value, message.getDouble(itemName), 0.000001); @@ -567,7 +567,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetDoubleFromInvalidType() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setChar(itemName, RandomUtil.randomChar()); try @@ -585,7 +585,7 @@ public class HornetQMapMessageTest extends UnitTestCase { boolean value = RandomUtil.randomBoolean(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setBoolean(itemName, value); Assert.assertEquals(Boolean.toString(value), message.getString(itemName)); @@ -596,7 +596,7 @@ public class HornetQMapMessageTest extends UnitTestCase { byte value = RandomUtil.randomByte(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setByte(itemName, value); Assert.assertEquals(Byte.toString(value), message.getString(itemName)); @@ -607,7 +607,7 @@ public class HornetQMapMessageTest extends UnitTestCase { char value = RandomUtil.randomChar(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setChar(itemName, value); Assert.assertEquals(Character.toString(value), message.getString(itemName)); @@ -618,7 +618,7 @@ public class HornetQMapMessageTest extends UnitTestCase { short value = RandomUtil.randomShort(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setShort(itemName, value); Assert.assertEquals(Short.toString(value), message.getString(itemName)); @@ -629,7 +629,7 @@ public class HornetQMapMessageTest extends UnitTestCase { int value = RandomUtil.randomInt(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setInt(itemName, value); Assert.assertEquals(Integer.toString(value), message.getString(itemName)); @@ -640,7 +640,7 @@ public class HornetQMapMessageTest extends UnitTestCase { long value = RandomUtil.randomLong(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setLong(itemName, value); Assert.assertEquals(Long.toString(value), message.getString(itemName)); @@ -651,7 +651,7 @@ public class HornetQMapMessageTest extends UnitTestCase { float value = RandomUtil.randomFloat(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setFloat(itemName, value); Assert.assertEquals(Float.toString(value), message.getString(itemName)); @@ -662,7 +662,7 @@ public class HornetQMapMessageTest extends UnitTestCase { double value = RandomUtil.randomByte(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setDouble(itemName, value); Assert.assertEquals(Double.toString(value), message.getString(itemName)); @@ -671,7 +671,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetStringFromNull() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); Assert.assertNull(message.getString(itemName)); } @@ -681,7 +681,7 @@ public class HornetQMapMessageTest extends UnitTestCase { String value = RandomUtil.randomString(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setString(itemName, value); Assert.assertEquals(value, message.getString(itemName)); @@ -691,7 +691,7 @@ public class HornetQMapMessageTest extends UnitTestCase public void testGetBytesFromBytes() throws Exception { byte[] value = RandomUtil.randomBytes(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setBytes(itemName, value); UnitTestCase.assertEqualsByteArrays(value, message.getBytes(itemName)); @@ -700,7 +700,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetBytesFromNull() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); Assert.assertNull(message.getBytes(itemName)); } @@ -708,7 +708,7 @@ public class HornetQMapMessageTest extends UnitTestCase @Test public void testGetBytesFromInvalidType() throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setChar(itemName, RandomUtil.randomChar()); try @@ -725,7 +725,7 @@ public class HornetQMapMessageTest extends UnitTestCase public void testSetObjectFromBoolean() throws Exception { boolean value = RandomUtil.randomBoolean(); - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setObject(itemName, value); Assert.assertEquals(value, message.getObject(itemName)); @@ -787,7 +787,7 @@ public class HornetQMapMessageTest extends UnitTestCase private void doTestSetObject(final Object value) throws Exception { - HornetQMapMessage message = new HornetQMapMessage(); + ActiveMQMapMessage message = new ActiveMQMapMessage(); message.setObject(itemName, value); Assert.assertEquals(value, message.getObject(itemName)); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/HornetQStreamMessageTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/ActiveMQStreamMessageTest.java similarity index 77% rename from tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/HornetQStreamMessageTest.java rename to tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/ActiveMQStreamMessageTest.java index b97600ebd4..8601ab2f40 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/HornetQStreamMessageTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/ActiveMQStreamMessageTest.java @@ -21,7 +21,7 @@ import javax.jms.MessageFormatException; import org.junit.Assert; -import org.apache.activemq.jms.client.HornetQStreamMessage; +import org.apache.activemq.jms.client.ActiveMQStreamMessage; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.UnitTestCase; @@ -30,7 +30,7 @@ import org.apache.activemq.tests.util.UnitTestCase; * * */ -public class HornetQStreamMessageTest extends UnitTestCase +public class ActiveMQStreamMessageTest extends UnitTestCase { // Constants ----------------------------------------------------- @@ -45,15 +45,15 @@ public class HornetQStreamMessageTest extends UnitTestCase @Test public void testGetType() throws Exception { - HornetQStreamMessage message = new HornetQStreamMessage(); - Assert.assertEquals(HornetQStreamMessage.TYPE, message.getType()); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); + Assert.assertEquals(ActiveMQStreamMessage.TYPE, message.getType()); } @Test public void testReadBooleanFromBoolean() throws Exception { boolean value = RandomUtil.randomBoolean(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeBoolean(value); message.reset(); @@ -65,7 +65,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadBooleanFromString() throws Exception { boolean value = RandomUtil.randomBoolean(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeString(Boolean.toString(value)); message.reset(); @@ -78,7 +78,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromInvalidType(RandomUtil.randomFloat(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readBoolean(); } @@ -90,7 +90,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromEmptyMessage(new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readBoolean(); } @@ -102,7 +102,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromInvalidType(RandomUtil.randomFloat(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readChar(); } @@ -114,7 +114,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromEmptyMessage(new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readChar(); } @@ -125,7 +125,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadByteFromByte() throws Exception { byte value = RandomUtil.randomByte(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeByte(value); message.reset(); @@ -137,7 +137,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadByteFromString() throws Exception { byte value = RandomUtil.randomByte(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeString(Byte.toString(value)); message.reset(); @@ -150,7 +150,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromInvalidType(RandomUtil.randomFloat(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readByte(); } @@ -162,7 +162,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromEmptyMessage(new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readByte(); } @@ -173,7 +173,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadBytesFromBytes() throws Exception { byte[] value = RandomUtil.randomBytes(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeBytes(value); message.reset(); @@ -188,7 +188,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadBytesFromBytes_2() throws Exception { byte[] value = RandomUtil.randomBytes(512); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeBytes(value, 0, 256); message.reset(); @@ -204,7 +204,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromInvalidType(RandomUtil.randomBoolean(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readByte(); } @@ -216,7 +216,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromEmptyMessage(new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { byte[] bytes = new byte[1]; return message.readBytes(bytes); @@ -228,7 +228,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadShortFromByte() throws Exception { byte value = RandomUtil.randomByte(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeByte(value); message.reset(); @@ -240,7 +240,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadShortFromShort() throws Exception { short value = RandomUtil.randomShort(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeShort(value); message.reset(); @@ -252,7 +252,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadShortFromString() throws Exception { short value = RandomUtil.randomShort(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeString(Short.toString(value)); message.reset(); @@ -265,7 +265,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromInvalidType(RandomUtil.randomFloat(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readShort(); } @@ -277,7 +277,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromEmptyMessage(new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readShort(); } @@ -288,7 +288,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadIntFromByte() throws Exception { byte value = RandomUtil.randomByte(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeByte(value); message.reset(); @@ -300,7 +300,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadIntFromShort() throws Exception { short value = RandomUtil.randomShort(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeShort(value); message.reset(); @@ -312,7 +312,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadIntFromInt() throws Exception { int value = RandomUtil.randomInt(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeInt(value); message.reset(); @@ -324,7 +324,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadIntFromString() throws Exception { int value = RandomUtil.randomInt(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeString(Integer.toString(value)); message.reset(); @@ -337,7 +337,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromInvalidType(RandomUtil.randomFloat(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readInt(); } @@ -349,7 +349,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromEmptyMessage(new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readInt(); } @@ -360,7 +360,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadCharFromChar() throws Exception { char value = RandomUtil.randomChar(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeChar(value); message.reset(); @@ -371,7 +371,7 @@ public class HornetQStreamMessageTest extends UnitTestCase @Test public void testReadCharFromNull() throws Exception { - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeString(null); message.reset(); @@ -390,7 +390,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadLongFromByte() throws Exception { byte value = RandomUtil.randomByte(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeByte(value); message.reset(); @@ -402,7 +402,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadLongFromShort() throws Exception { short value = RandomUtil.randomShort(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeShort(value); message.reset(); @@ -414,7 +414,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadLongFromInt() throws Exception { int value = RandomUtil.randomInt(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeInt(value); message.reset(); @@ -426,7 +426,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadLongFromLong() throws Exception { long value = RandomUtil.randomLong(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeLong(value); message.reset(); @@ -438,7 +438,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadLongFromString() throws Exception { long value = RandomUtil.randomLong(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeString(Long.toString(value)); message.reset(); @@ -451,7 +451,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromInvalidType(RandomUtil.randomFloat(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readLong(); } @@ -463,7 +463,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromEmptyMessage(new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readLong(); } @@ -474,7 +474,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadFloatFromFloat() throws Exception { float value = RandomUtil.randomFloat(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeFloat(value); message.reset(); @@ -486,7 +486,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadFloatFromString() throws Exception { float value = RandomUtil.randomFloat(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeString(Float.toString(value)); message.reset(); @@ -499,7 +499,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromInvalidType(RandomUtil.randomBoolean(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readFloat(); } @@ -511,7 +511,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromEmptyMessage(new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readFloat(); } @@ -522,7 +522,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadDoubleFromFloat() throws Exception { float value = RandomUtil.randomFloat(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeFloat(value); message.reset(); @@ -534,7 +534,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadDoubleFromDouble() throws Exception { double value = RandomUtil.randomDouble(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeDouble(value); message.reset(); @@ -546,7 +546,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadDoubleFromString() throws Exception { double value = RandomUtil.randomDouble(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeString(Double.toString(value)); message.reset(); @@ -559,7 +559,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromInvalidType(RandomUtil.randomBoolean(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readDouble(); } @@ -571,7 +571,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromEmptyMessage(new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readDouble(); } @@ -582,7 +582,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadStringFromBoolean() throws Exception { boolean value = RandomUtil.randomBoolean(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeBoolean(value); message.reset(); @@ -594,7 +594,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadStringFromChar() throws Exception { char value = RandomUtil.randomChar(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeChar(value); message.reset(); @@ -606,7 +606,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadStringFromByte() throws Exception { byte value = RandomUtil.randomByte(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeByte(value); message.reset(); @@ -618,7 +618,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testString() throws Exception { String value = RandomUtil.randomString(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeString(value); message.reset(); @@ -640,7 +640,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadStringFromShort() throws Exception { short value = RandomUtil.randomShort(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeShort(value); message.reset(); @@ -652,7 +652,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadStringFromInt() throws Exception { int value = RandomUtil.randomInt(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeInt(value); message.reset(); @@ -664,7 +664,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadStringFromLong() throws Exception { long value = RandomUtil.randomLong(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeLong(value); message.reset(); @@ -676,7 +676,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadStringFromFloat() throws Exception { float value = RandomUtil.randomFloat(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeFloat(value); message.reset(); @@ -688,7 +688,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadStringFromDouble() throws Exception { double value = RandomUtil.randomDouble(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeDouble(value); message.reset(); @@ -700,7 +700,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadStringFromString() throws Exception { String value = RandomUtil.randomString(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeString(value); message.reset(); @@ -711,7 +711,7 @@ public class HornetQStreamMessageTest extends UnitTestCase @Test public void testReadStringFromNullString() throws Exception { - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeString(null); message.reset(); @@ -724,7 +724,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doReadTypeFromEmptyMessage(new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readString(); } @@ -736,7 +736,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doWriteObjectWithType(RandomUtil.randomBoolean(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readBoolean(); } @@ -748,7 +748,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doWriteObjectWithType(RandomUtil.randomChar(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readChar(); } @@ -760,7 +760,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doWriteObjectWithType(RandomUtil.randomByte(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readByte(); } @@ -773,7 +773,7 @@ public class HornetQStreamMessageTest extends UnitTestCase final byte[] value = RandomUtil.randomBytes(); doWriteObjectWithType(value, new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { byte[] bytes = new byte[value.length]; message.readBytes(bytes); @@ -787,7 +787,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doWriteObjectWithType(RandomUtil.randomShort(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readShort(); } @@ -799,7 +799,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doWriteObjectWithType(RandomUtil.randomInt(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readInt(); } @@ -811,7 +811,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doWriteObjectWithType(RandomUtil.randomLong(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readLong(); } @@ -823,7 +823,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doWriteObjectWithType(RandomUtil.randomFloat(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readFloat(); } @@ -835,7 +835,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doWriteObjectWithType(RandomUtil.randomDouble(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readDouble(); } @@ -847,7 +847,7 @@ public class HornetQStreamMessageTest extends UnitTestCase { doWriteObjectWithType(RandomUtil.randomString(), new TypeReader() { - public Object readType(final HornetQStreamMessage message) throws Exception + public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readString(); } @@ -857,7 +857,7 @@ public class HornetQStreamMessageTest extends UnitTestCase @Test public void testWriteObjectWithNull() throws Exception { - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeObject(null); } @@ -865,7 +865,7 @@ public class HornetQStreamMessageTest extends UnitTestCase @Test public void testWriteObjectWithInvalidType() throws Exception { - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); try { @@ -881,7 +881,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadObjectFromBoolean() throws Exception { boolean value = RandomUtil.randomBoolean(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeBoolean(value); message.reset(); @@ -893,7 +893,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadObjectFromChar() throws Exception { char value = RandomUtil.randomChar(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeChar(value); message.reset(); @@ -905,7 +905,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadObjectFromByte() throws Exception { byte value = RandomUtil.randomByte(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeByte(value); message.reset(); @@ -917,7 +917,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadObjectFromBytes() throws Exception { byte[] value = RandomUtil.randomBytes(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeBytes(value); message.reset(); @@ -930,7 +930,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadObjectFromShort() throws Exception { short value = RandomUtil.randomShort(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeShort(value); message.reset(); @@ -942,7 +942,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadObjectFromInt() throws Exception { int value = RandomUtil.randomInt(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeInt(value); message.reset(); @@ -954,7 +954,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadObjectFromLong() throws Exception { long value = RandomUtil.randomLong(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeLong(value); message.reset(); @@ -966,7 +966,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadObjectFromFloat() throws Exception { float value = RandomUtil.randomFloat(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeFloat(value); message.reset(); @@ -978,7 +978,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadObjectFromDouble() throws Exception { double value = RandomUtil.randomDouble(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeDouble(value); message.reset(); @@ -990,7 +990,7 @@ public class HornetQStreamMessageTest extends UnitTestCase public void testReadObjectFromString() throws Exception { String value = RandomUtil.randomString(); - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeString(value); message.reset(); @@ -1002,7 +1002,7 @@ public class HornetQStreamMessageTest extends UnitTestCase private void doReadTypeFromEmptyMessage(final TypeReader reader) throws Exception { - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.reset(); try @@ -1017,7 +1017,7 @@ public class HornetQStreamMessageTest extends UnitTestCase private void doReadTypeFromInvalidType(final Object invalidValue, final TypeReader reader) throws Exception { - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeObject(invalidValue); message.reset(); @@ -1034,7 +1034,7 @@ public class HornetQStreamMessageTest extends UnitTestCase private void doWriteObjectWithType(final Object value, final TypeReader reader) throws Exception { - HornetQStreamMessage message = new HornetQStreamMessage(); + ActiveMQStreamMessage message = new ActiveMQStreamMessage(); message.writeObject(value); message.reset(); @@ -1054,6 +1054,6 @@ public class HornetQStreamMessageTest extends UnitTestCase private interface TypeReader { - Object readType(HornetQStreamMessage message) throws Exception; + Object readType(ActiveMQStreamMessage message) throws Exception; } } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/JMSExceptionHelperTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/JMSExceptionHelperTest.java index d853fc4dc3..a699237ff9 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/JMSExceptionHelperTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/JMSExceptionHelperTest.java @@ -116,7 +116,7 @@ public class JMSExceptionHelperTest extends UnitTestCase final Class expectedException) { ActiveMQException me = new ActiveMQException(errorCode); - Exception e = JMSExceptionHelper.convertFromHornetQException(me); + Exception e = JMSExceptionHelper.convertFromActiveMQException(me); Assert.assertNotNull(e); Assert.assertTrue(e.getClass().isAssignableFrom(expectedException)); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/SelectorTranslatorTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/SelectorTranslatorTest.java index ea8bbc43ec..87101d81ea 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/SelectorTranslatorTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/client/SelectorTranslatorTest.java @@ -31,7 +31,7 @@ public class SelectorTranslatorTest extends UnitTestCase @Test public void testParseNull() { - Assert.assertNull(SelectorTranslator.convertToHornetQFilterString(null)); + Assert.assertNull(SelectorTranslator.convertToActiveMQFilterString(null)); } @Test @@ -39,7 +39,7 @@ public class SelectorTranslatorTest extends UnitTestCase { final String selector = "color = 'red'"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); } @Test @@ -47,7 +47,7 @@ public class SelectorTranslatorTest extends UnitTestCase { final String selector = "color = 'red' OR cheese = 'stilton' OR (age = 3 AND shoesize = 12)"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); } @Test @@ -55,21 +55,21 @@ public class SelectorTranslatorTest extends UnitTestCase { String selector = "JMSDeliveryMode='NON_PERSISTENT'"; - Assert.assertEquals("HQDurable='NON_DURABLE'", SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals("HQDurable='NON_DURABLE'", SelectorTranslator.convertToActiveMQFilterString(selector)); selector = "JMSDeliveryMode='PERSISTENT'"; - Assert.assertEquals("HQDurable='DURABLE'", SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals("HQDurable='DURABLE'", SelectorTranslator.convertToActiveMQFilterString(selector)); selector = "color = 'red' AND 'NON_PERSISTENT' = JMSDeliveryMode"; Assert.assertEquals("color = 'red' AND 'NON_DURABLE' = HQDurable", - SelectorTranslator.convertToHornetQFilterString(selector)); + SelectorTranslator.convertToActiveMQFilterString(selector)); selector = "color = 'red' AND 'PERSISTENT' = JMSDeliveryMode"; Assert.assertEquals("color = 'red' AND 'DURABLE' = HQDurable", - SelectorTranslator.convertToHornetQFilterString(selector)); + SelectorTranslator.convertToActiveMQFilterString(selector)); checkNoSubstitute("JMSDeliveryMode"); } @@ -79,23 +79,23 @@ public class SelectorTranslatorTest extends UnitTestCase { String selector = "JMSPriority=5"; - Assert.assertEquals("HQPriority=5", SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals("HQPriority=5", SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " JMSPriority = 7"; - Assert.assertEquals(" HQPriority = 7", SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(" HQPriority = 7", SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " JMSPriority = 7 OR 1 = JMSPriority AND (JMSPriority= 1 + 4)"; Assert.assertEquals(" HQPriority = 7 OR 1 = HQPriority AND (HQPriority= 1 + 4)", - SelectorTranslator.convertToHornetQFilterString(selector)); + SelectorTranslator.convertToActiveMQFilterString(selector)); checkNoSubstitute("JMSPriority"); selector = "animal = 'lion' JMSPriority = 321 OR animal_name = 'xyzJMSPriorityxyz'"; Assert.assertEquals("animal = 'lion' HQPriority = 321 OR animal_name = 'xyzJMSPriorityxyz'", - SelectorTranslator.convertToHornetQFilterString(selector)); + SelectorTranslator.convertToActiveMQFilterString(selector)); } @@ -104,23 +104,23 @@ public class SelectorTranslatorTest extends UnitTestCase { String selector = "JMSMessageID='ID:HQ-12435678"; - Assert.assertEquals("HQUserID='ID:HQ-12435678", SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals("HQUserID='ID:HQ-12435678", SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " JMSMessageID='ID:HQ-12435678"; - Assert.assertEquals(" HQUserID='ID:HQ-12435678", SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(" HQUserID='ID:HQ-12435678", SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " JMSMessageID = 'ID:HQ-12435678"; - Assert.assertEquals(" HQUserID = 'ID:HQ-12435678", SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(" HQUserID = 'ID:HQ-12435678", SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " myHeader = JMSMessageID"; - Assert.assertEquals(" myHeader = HQUserID", SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(" myHeader = HQUserID", SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " myHeader = JMSMessageID OR (JMSMessageID = 'ID-HQ' + '12345')"; - Assert.assertEquals(" myHeader = HQUserID OR (HQUserID = 'ID-HQ' + '12345')", SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(" myHeader = HQUserID OR (HQUserID = 'ID-HQ' + '12345')", SelectorTranslator.convertToActiveMQFilterString(selector)); checkNoSubstitute("JMSMessageID"); } @@ -130,23 +130,23 @@ public class SelectorTranslatorTest extends UnitTestCase { String selector = "JMSTimestamp=12345678"; - Assert.assertEquals("HQTimestamp=12345678", SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals("HQTimestamp=12345678", SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " JMSTimestamp=12345678"; - Assert.assertEquals(" HQTimestamp=12345678", SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(" HQTimestamp=12345678", SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " JMSTimestamp=12345678 OR 78766 = JMSTimestamp AND (JMSTimestamp= 1 + 4878787)"; Assert.assertEquals(" HQTimestamp=12345678 OR 78766 = HQTimestamp AND (HQTimestamp= 1 + 4878787)", - SelectorTranslator.convertToHornetQFilterString(selector)); + SelectorTranslator.convertToActiveMQFilterString(selector)); checkNoSubstitute("JMSTimestamp"); selector = "animal = 'lion' JMSTimestamp = 321 OR animal_name = 'xyzJMSTimestampxyz'"; Assert.assertEquals("animal = 'lion' HQTimestamp = 321 OR animal_name = 'xyzJMSTimestampxyz'", - SelectorTranslator.convertToHornetQFilterString(selector)); + SelectorTranslator.convertToActiveMQFilterString(selector)); } @@ -155,23 +155,23 @@ public class SelectorTranslatorTest extends UnitTestCase { String selector = "JMSExpiration=12345678"; - Assert.assertEquals("HQExpiration=12345678", SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals("HQExpiration=12345678", SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " JMSExpiration=12345678"; - Assert.assertEquals(" HQExpiration=12345678", SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(" HQExpiration=12345678", SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " JMSExpiration=12345678 OR 78766 = JMSExpiration AND (JMSExpiration= 1 + 4878787)"; Assert.assertEquals(" HQExpiration=12345678 OR 78766 = HQExpiration AND (HQExpiration= 1 + 4878787)", - SelectorTranslator.convertToHornetQFilterString(selector)); + SelectorTranslator.convertToActiveMQFilterString(selector)); checkNoSubstitute("JMSExpiration"); selector = "animal = 'lion' JMSExpiration = 321 OR animal_name = 'xyzJMSExpirationxyz'"; Assert.assertEquals("animal = 'lion' HQExpiration = 321 OR animal_name = 'xyzJMSExpirationxyz'", - SelectorTranslator.convertToHornetQFilterString(selector)); + SelectorTranslator.convertToActiveMQFilterString(selector)); } @@ -180,23 +180,23 @@ public class SelectorTranslatorTest extends UnitTestCase { String selector = "JMSCorrelationID='ID:HQ-12435678"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " JMSCorrelationID='ID:HQ-12435678"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " JMSCorrelationID = 'ID:HQ-12435678"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " myHeader = JMSCorrelationID"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " myHeader = JMSCorrelationID OR (JMSCorrelationID = 'ID-HQ' + '12345')"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); checkNoSubstitute("JMSCorrelationID"); } @@ -206,23 +206,23 @@ public class SelectorTranslatorTest extends UnitTestCase { String selector = "JMSType='aardvark'"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " JMSType='aardvark'"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " JMSType = 'aardvark'"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " myHeader = JMSType"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = " myHeader = JMSType OR (JMSType = 'aardvark' + 'sandwich')"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); checkNoSubstitute("JMSType"); } @@ -235,43 +235,43 @@ public class SelectorTranslatorTest extends UnitTestCase { String selector = "Other" + fieldName + " = 767868"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = "cheese = 'cheddar' AND Wrong" + fieldName + " = 54"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = "fruit = 'pomegranate' AND " + fieldName + "NotThisOne = 'tuesday'"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = "animal = 'lion' AND animal_name = '" + fieldName + "'"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = "animal = 'lion' AND animal_name = ' " + fieldName + "'"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = "animal = 'lion' AND animal_name = ' " + fieldName + " '"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = "animal = 'lion' AND animal_name = 'xyz " + fieldName + "'"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = "animal = 'lion' AND animal_name = 'xyz" + fieldName + "'"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = "animal = 'lion' AND animal_name = '" + fieldName + "xyz'"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); selector = "animal = 'lion' AND animal_name = 'xyz" + fieldName + "xyz'"; - Assert.assertEquals(selector, SelectorTranslator.convertToHornetQFilterString(selector)); + Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector)); } } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/misc/ManifestTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/misc/ManifestTest.java index 96458a13e0..bc1b2cf750 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/misc/ManifestTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/misc/ManifestTest.java @@ -25,9 +25,9 @@ import javax.jms.ConnectionMetaData; import org.junit.Assert; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServers; -import org.apache.activemq.jms.client.HornetQConnectionMetaData; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.core.server.ActiveMQServers; +import org.apache.activemq.jms.client.ActiveMQConnectionMetaData; import org.apache.activemq.tests.unit.UnitTestLogger; import org.apache.activemq.tests.util.UnitTestCase; @@ -55,7 +55,7 @@ public class ManifestTest extends UnitTestCase UnitTestLogger.LOGGER.trace("userDir is " + userDir); // The jar must be there - File file = new File("build/jars", "hornetq-core.jar"); + File file = new File("build/jars", "activemq-core.jar"); Assert.assertTrue(file.exists()); // Open the jar and load MANIFEST.MF @@ -67,14 +67,14 @@ public class ManifestTest extends UnitTestCase try { - HornetQServer server = HornetQServers.newHornetQServer(createBasicConfig()); + ActiveMQServer server = ActiveMQServers.newActiveMQServer(createBasicConfig()); - ConnectionMetaData meta = new HornetQConnectionMetaData(server.getVersion()); + ConnectionMetaData meta = new ActiveMQConnectionMetaData(server.getVersion()); // Compare the value from ConnectionMetaData and MANIFEST.MF Attributes attrs = manifest.getMainAttributes(); - Assert.assertEquals(meta.getProviderVersion(), attrs.getValue("HornetQ-Version")); + Assert.assertEquals(meta.getProviderVersion(), attrs.getValue("ActiveMQ-Version")); //TODO fix this Assert.assertEquals("https://svn.jboss.org/repos/hornetq/branches/Branch_2_2_EAP", attrs.getValue("HornetQ-SVN-URL")); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/referenceable/ConnectionFactoryObjectFactoryTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/referenceable/ConnectionFactoryObjectFactoryTest.java index 5cb51fda14..a6a14003e1 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/referenceable/ConnectionFactoryObjectFactoryTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/referenceable/ConnectionFactoryObjectFactoryTest.java @@ -40,15 +40,15 @@ public class ConnectionFactoryObjectFactoryTest extends UnitTestCase // public void testReference() throws Exception // { - // HornetQRAConnectionFactory cf = - // new HornetQRAConnectionFactory(null, null, 123, 123, randomString(), 1, 1, 1, 1, 1, true, true, true); + // ActiveMQRAConnectionFactory cf = + // new ActiveMQRAConnectionFactory(null, null, 123, 123, randomString(), 1, 1, 1, 1, 1, true, true, true); // Reference reference = cf.getReference(); // // ConnectionFactoryObjectFactory factory = new ConnectionFactoryObjectFactory(); // // Object object = factory.getObjectInstance(reference, null, null, null); // assertNotNull(object); - // assertTrue(object instanceof HornetQRAConnectionFactory); + // assertTrue(object instanceof ActiveMQRAConnectionFactory); // } // Package protected --------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/referenceable/DestinationObjectFactoryTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/referenceable/DestinationObjectFactoryTest.java index 7ed43ca5c7..32d1bac104 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/referenceable/DestinationObjectFactoryTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/jms/referenceable/DestinationObjectFactoryTest.java @@ -18,8 +18,8 @@ import javax.naming.Reference; import org.junit.Assert; -import org.apache.activemq.api.jms.HornetQJMSClient; -import org.apache.activemq.jms.client.HornetQDestination; +import org.apache.activemq.api.jms.ActiveMQJMSClient; +import org.apache.activemq.jms.client.ActiveMQDestination; import org.apache.activemq.jms.referenceable.DestinationObjectFactory; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.UnitTestCase; @@ -44,13 +44,13 @@ public class DestinationObjectFactoryTest extends UnitTestCase @Test public void testReference() throws Exception { - HornetQDestination queue = (HornetQDestination) HornetQJMSClient.createQueue(RandomUtil.randomString()); + ActiveMQDestination queue = (ActiveMQDestination) ActiveMQJMSClient.createQueue(RandomUtil.randomString()); Reference reference = queue.getReference(); DestinationObjectFactory factory = new DestinationObjectFactory(); Object object = factory.getObjectInstance(reference, null, null, null); Assert.assertNotNull(object); - Assert.assertTrue(object instanceof HornetQDestination); + Assert.assertTrue(object instanceof ActiveMQDestination); Assert.assertEquals(queue, object); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/ra/HornetQResourceAdapterConfigTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/ra/ActiveMQResourceAdapterConfigTest.java similarity index 98% rename from tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/ra/HornetQResourceAdapterConfigTest.java rename to tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/ra/ActiveMQResourceAdapterConfigTest.java index a431494e40..020fd71f9f 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/ra/HornetQResourceAdapterConfigTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/ra/ActiveMQResourceAdapterConfigTest.java @@ -21,7 +21,7 @@ import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; -import org.apache.activemq.ra.HornetQResourceAdapter; +import org.apache.activemq.ra.ActiveMQResourceAdapter; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.Test; import org.w3c.dom.Document; @@ -32,13 +32,13 @@ import org.xml.sax.InputSource; /** - * This test is used to generate the commented out configs in the src/config/ra.xml. If you add a setter to the HornetQResourceAdapter + * This test is used to generate the commented out configs in the src/config/ra.xml. If you add a setter to the ActiveMQResourceAdapter * this test should fail, if it does paste the new commented out configs into the ra.xml file and in here. don't forget to * add a description for each new property added and try and put it in the config some where appropriate. * * @author Andy Taylor */ -public class HornetQResourceAdapterConfigTest extends UnitTestCase +public class ActiveMQResourceAdapterConfigTest extends UnitTestCase { private static String config = "" + "\n" + @@ -298,7 +298,7 @@ public class HornetQResourceAdapterConfigTest extends UnitTestCase " \n" + " Add a new managed connection factory\n" + " ManagedConnectionFactory\n" + - " org.apache.activemq.ra.HornetQRAManagedConnectionFactory\n" + + " org.apache.activemq.ra.ActiveMQManagedConnectionFactory\n" + " \n" + " " + " \n" + @@ -404,7 +404,7 @@ public class HornetQResourceAdapterConfigTest extends UnitTestCase @Test public void testConfiguration() throws Exception { - Method[] methods = HornetQResourceAdapter.class.getMethods(); + Method[] methods = ActiveMQResourceAdapter.class.getMethods(); Map methodList = new HashMap(); for (Method method : methods) { diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/ra/ConnectionFactoryPropertiesTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/ra/ConnectionFactoryPropertiesTest.java index 3f74b28694..5b337e4e39 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/ra/ConnectionFactoryPropertiesTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/ra/ConnectionFactoryPropertiesTest.java @@ -19,8 +19,8 @@ import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.ra.HornetQResourceAdapter; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.ra.ActiveMQResourceAdapter; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.Test; @@ -62,7 +62,7 @@ public class ConnectionFactoryPropertiesTest extends UnitTestCase UNSUPPORTED_RA_PROPERTIES.add("jgroupsChannelRefName"); UNSUPPORTED_RA_PROPERTIES.add("entries"); - // TODO: shouldn't this be also set on the HornetQConnectionFactory: + // TODO: shouldn't this be also set on the ActiveMQConnectionFactory: // https://community.jboss.org/thread/211815?tstart=0 UNSUPPORTED_RA_PROPERTIES.add("connectionPoolName"); } @@ -70,13 +70,13 @@ public class ConnectionFactoryPropertiesTest extends UnitTestCase @Test public void testCompareConnectionFactoryAndResourceAdapterProperties() throws Exception { - SortedSet connectionFactoryProperties = findAllPropertyNames(HornetQConnectionFactory.class); + SortedSet connectionFactoryProperties = findAllPropertyNames(ActiveMQConnectionFactory.class); connectionFactoryProperties.removeAll(UNSUPPORTED_CF_PROPERTIES); - SortedSet raProperties = findAllPropertyNames(HornetQResourceAdapter.class); + SortedSet raProperties = findAllPropertyNames(ActiveMQResourceAdapter.class); raProperties.removeAll(UNSUPPORTED_RA_PROPERTIES); - compare("HornetQ Connection Factory", connectionFactoryProperties, - "HornetQ Resource Adapter", raProperties); + compare("ActiveMQ Connection Factory", connectionFactoryProperties, + "ActiveMQ Resource Adapter", raProperties); } private static void compare(String name1, SortedSet set1, diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/ra/ResourceAdapterTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/ra/ResourceAdapterTest.java index c9615571b5..9285be6dc9 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/ra/ResourceAdapterTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/ra/ResourceAdapterTest.java @@ -22,19 +22,19 @@ import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; -import org.apache.activemq.api.core.client.HornetQClient; +import org.apache.activemq.api.core.client.ActiveMQClient; import org.apache.activemq.api.core.client.ServerLocator; -import org.apache.activemq.api.jms.HornetQJMSClient; +import org.apache.activemq.api.jms.ActiveMQJMSClient; import org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.jms.client.HornetQConnectionFactory; -import org.apache.activemq.jms.client.HornetQDestination; +import org.apache.activemq.core.server.ActiveMQServer; +import org.apache.activemq.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.jms.client.ActiveMQDestination; import org.apache.activemq.ra.ConnectionFactoryProperties; -import org.apache.activemq.ra.HornetQRAManagedConnectionFactory; -import org.apache.activemq.ra.HornetQResourceAdapter; -import org.apache.activemq.ra.inflow.HornetQActivation; -import org.apache.activemq.ra.inflow.HornetQActivationSpec; +import org.apache.activemq.ra.ActiveMQRAManagedConnectionFactory; +import org.apache.activemq.ra.ActiveMQResourceAdapter; +import org.apache.activemq.ra.inflow.ActiveMQActivation; +import org.apache.activemq.ra.inflow.ActiveMQActivationSpec; import org.apache.activemq.tests.util.ServiceTestBase; import org.junit.Assert; import org.junit.Test; @@ -60,90 +60,90 @@ public class ResourceAdapterTest extends ServiceTestBase @Test public void testDefaultConnectionFactory() throws Exception { - HornetQResourceAdapter ra = new HornetQResourceAdapter(); + ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName(InVMConnectorFactory.class.getName()); - HornetQConnectionFactory factory = ra.getDefaultHornetQConnectionFactory(); - Assert.assertEquals(factory.getCallTimeout(), HornetQClient.DEFAULT_CALL_TIMEOUT); - Assert.assertEquals(factory.getClientFailureCheckPeriod(), HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD); + ActiveMQConnectionFactory factory = ra.getDefaultActiveMQConnectionFactory(); + Assert.assertEquals(factory.getCallTimeout(), ActiveMQClient.DEFAULT_CALL_TIMEOUT); + Assert.assertEquals(factory.getClientFailureCheckPeriod(), ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD); Assert.assertEquals(factory.getClientID(), null); Assert.assertEquals(factory.getConnectionLoadBalancingPolicyClassName(), - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME); - Assert.assertEquals(factory.getConnectionTTL(), HornetQClient.DEFAULT_CONNECTION_TTL); - Assert.assertEquals(factory.getConsumerMaxRate(), HornetQClient.DEFAULT_CONSUMER_MAX_RATE); - Assert.assertEquals(factory.getConsumerWindowSize(), HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE); - Assert.assertEquals(factory.getDupsOKBatchSize(), HornetQClient.DEFAULT_ACK_BATCH_SIZE); - Assert.assertEquals(factory.getMinLargeMessageSize(), HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); - Assert.assertEquals(factory.getProducerMaxRate(), HornetQClient.DEFAULT_PRODUCER_MAX_RATE); - Assert.assertEquals(factory.getConfirmationWindowSize(), HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE); + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME); + Assert.assertEquals(factory.getConnectionTTL(), ActiveMQClient.DEFAULT_CONNECTION_TTL); + Assert.assertEquals(factory.getConsumerMaxRate(), ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE); + Assert.assertEquals(factory.getConsumerWindowSize(), ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE); + Assert.assertEquals(factory.getDupsOKBatchSize(), ActiveMQClient.DEFAULT_ACK_BATCH_SIZE); + Assert.assertEquals(factory.getMinLargeMessageSize(), ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + Assert.assertEquals(factory.getProducerMaxRate(), ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE); + Assert.assertEquals(factory.getConfirmationWindowSize(), ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE); // by default, reconnect attempts is set to -1 Assert.assertEquals(-1, factory.getReconnectAttempts()); - Assert.assertEquals(factory.getRetryInterval(), HornetQClient.DEFAULT_RETRY_INTERVAL); - Assert.assertEquals(factory.getRetryIntervalMultiplier(), HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + Assert.assertEquals(factory.getRetryInterval(), ActiveMQClient.DEFAULT_RETRY_INTERVAL); + Assert.assertEquals(factory.getRetryIntervalMultiplier(), ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, 0.00001); - Assert.assertEquals(factory.getScheduledThreadPoolMaxSize(), HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE); - Assert.assertEquals(factory.getThreadPoolMaxSize(), HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE); - Assert.assertEquals(factory.getTransactionBatchSize(), HornetQClient.DEFAULT_ACK_BATCH_SIZE); - Assert.assertEquals(factory.isAutoGroup(), HornetQClient.DEFAULT_AUTO_GROUP); - Assert.assertEquals(factory.isBlockOnAcknowledge(), HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE); - Assert.assertEquals(factory.isBlockOnNonDurableSend(), HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND); - Assert.assertEquals(factory.isBlockOnDurableSend(), HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND); - Assert.assertEquals(factory.isPreAcknowledge(), HornetQClient.DEFAULT_PRE_ACKNOWLEDGE); - Assert.assertEquals(factory.isUseGlobalPools(), HornetQClient.DEFAULT_USE_GLOBAL_POOLS); + Assert.assertEquals(factory.getScheduledThreadPoolMaxSize(), ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE); + Assert.assertEquals(factory.getThreadPoolMaxSize(), ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE); + Assert.assertEquals(factory.getTransactionBatchSize(), ActiveMQClient.DEFAULT_ACK_BATCH_SIZE); + Assert.assertEquals(factory.isAutoGroup(), ActiveMQClient.DEFAULT_AUTO_GROUP); + Assert.assertEquals(factory.isBlockOnAcknowledge(), ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE); + Assert.assertEquals(factory.isBlockOnNonDurableSend(), ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND); + Assert.assertEquals(factory.isBlockOnDurableSend(), ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND); + Assert.assertEquals(factory.isPreAcknowledge(), ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE); + Assert.assertEquals(factory.isUseGlobalPools(), ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS); } @Test public void test2DefaultConnectionFactorySame() throws Exception { - HornetQResourceAdapter ra = new HornetQResourceAdapter(); + ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName(InVMConnectorFactory.class.getName()); - HornetQConnectionFactory factory = ra.getDefaultHornetQConnectionFactory(); - HornetQConnectionFactory factory2 = ra.getDefaultHornetQConnectionFactory(); + ActiveMQConnectionFactory factory = ra.getDefaultActiveMQConnectionFactory(); + ActiveMQConnectionFactory factory2 = ra.getDefaultActiveMQConnectionFactory(); Assert.assertEquals(factory, factory2); } @Test public void testCreateConnectionFactoryNoOverrides() throws Exception { - HornetQResourceAdapter ra = new HornetQResourceAdapter(); + ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName(InVMConnectorFactory.class.getName()); - HornetQConnectionFactory factory = ra.createHornetQConnectionFactory(new ConnectionFactoryProperties()); - Assert.assertEquals(factory.getCallTimeout(), HornetQClient.DEFAULT_CALL_TIMEOUT); - Assert.assertEquals(factory.getClientFailureCheckPeriod(), HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD); + ActiveMQConnectionFactory factory = ra.createActiveMQConnectionFactory(new ConnectionFactoryProperties()); + Assert.assertEquals(factory.getCallTimeout(), ActiveMQClient.DEFAULT_CALL_TIMEOUT); + Assert.assertEquals(factory.getClientFailureCheckPeriod(), ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD); Assert.assertEquals(factory.getClientID(), null); Assert.assertEquals(factory.getConnectionLoadBalancingPolicyClassName(), - HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME); - Assert.assertEquals(factory.getConnectionTTL(), HornetQClient.DEFAULT_CONNECTION_TTL); - Assert.assertEquals(factory.getConsumerMaxRate(), HornetQClient.DEFAULT_CONSUMER_MAX_RATE); - Assert.assertEquals(factory.getConsumerWindowSize(), HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE); - Assert.assertEquals(factory.getDupsOKBatchSize(), HornetQClient.DEFAULT_ACK_BATCH_SIZE); - Assert.assertEquals(factory.getMinLargeMessageSize(), HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); - Assert.assertEquals(factory.getProducerMaxRate(), HornetQClient.DEFAULT_PRODUCER_MAX_RATE); - Assert.assertEquals(factory.getConfirmationWindowSize(), HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE); + ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME); + Assert.assertEquals(factory.getConnectionTTL(), ActiveMQClient.DEFAULT_CONNECTION_TTL); + Assert.assertEquals(factory.getConsumerMaxRate(), ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE); + Assert.assertEquals(factory.getConsumerWindowSize(), ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE); + Assert.assertEquals(factory.getDupsOKBatchSize(), ActiveMQClient.DEFAULT_ACK_BATCH_SIZE); + Assert.assertEquals(factory.getMinLargeMessageSize(), ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE); + Assert.assertEquals(factory.getProducerMaxRate(), ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE); + Assert.assertEquals(factory.getConfirmationWindowSize(), ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE); // by default, reconnect attempts is set to -1 Assert.assertEquals(-1, factory.getReconnectAttempts()); - Assert.assertEquals(factory.getRetryInterval(), HornetQClient.DEFAULT_RETRY_INTERVAL); - Assert.assertEquals(factory.getRetryIntervalMultiplier(), HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, + Assert.assertEquals(factory.getRetryInterval(), ActiveMQClient.DEFAULT_RETRY_INTERVAL); + Assert.assertEquals(factory.getRetryIntervalMultiplier(), ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, 0.000001); - Assert.assertEquals(factory.getScheduledThreadPoolMaxSize(), HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE); - Assert.assertEquals(factory.getThreadPoolMaxSize(), HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE); - Assert.assertEquals(factory.getTransactionBatchSize(), HornetQClient.DEFAULT_ACK_BATCH_SIZE); - Assert.assertEquals(factory.isAutoGroup(), HornetQClient.DEFAULT_AUTO_GROUP); - Assert.assertEquals(factory.isBlockOnAcknowledge(), HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE); - Assert.assertEquals(factory.isBlockOnNonDurableSend(), HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND); - Assert.assertEquals(factory.isBlockOnDurableSend(), HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND); - Assert.assertEquals(factory.isPreAcknowledge(), HornetQClient.DEFAULT_PRE_ACKNOWLEDGE); - Assert.assertEquals(factory.isUseGlobalPools(), HornetQClient.DEFAULT_USE_GLOBAL_POOLS); + Assert.assertEquals(factory.getScheduledThreadPoolMaxSize(), ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE); + Assert.assertEquals(factory.getThreadPoolMaxSize(), ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE); + Assert.assertEquals(factory.getTransactionBatchSize(), ActiveMQClient.DEFAULT_ACK_BATCH_SIZE); + Assert.assertEquals(factory.isAutoGroup(), ActiveMQClient.DEFAULT_AUTO_GROUP); + Assert.assertEquals(factory.isBlockOnAcknowledge(), ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE); + Assert.assertEquals(factory.isBlockOnNonDurableSend(), ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND); + Assert.assertEquals(factory.isBlockOnDurableSend(), ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND); + Assert.assertEquals(factory.isPreAcknowledge(), ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE); + Assert.assertEquals(factory.isUseGlobalPools(), ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS); } @Test public void testDefaultConnectionFactoryOverrides() throws Exception { - HornetQResourceAdapter ra = new HornetQResourceAdapter(); + ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName(InVMConnectorFactory.class.getName()); - ra.setAutoGroup(!HornetQClient.DEFAULT_AUTO_GROUP); - ra.setBlockOnAcknowledge(!HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE); - ra.setBlockOnNonDurableSend(!HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND); - ra.setBlockOnDurableSend(!HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND); + ra.setAutoGroup(!ActiveMQClient.DEFAULT_AUTO_GROUP); + ra.setBlockOnAcknowledge(!ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE); + ra.setBlockOnNonDurableSend(!ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND); + ra.setBlockOnDurableSend(!ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND); ra.setCallTimeout(1L); ra.setClientFailureCheckPeriod(2L); ra.setClientID("myid"); @@ -155,7 +155,7 @@ public class ResourceAdapterTest extends ServiceTestBase ra.setDiscoveryRefreshTimeout(7L); ra.setDupsOKBatchSize(8); ra.setMinLargeMessageSize(10); - ra.setPreAcknowledge(!HornetQClient.DEFAULT_PRE_ACKNOWLEDGE); + ra.setPreAcknowledge(!ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE); ra.setProducerMaxRate(11); ra.setConfirmationWindowSize(12); ra.setReconnectAttempts(13); @@ -164,8 +164,8 @@ public class ResourceAdapterTest extends ServiceTestBase ra.setScheduledThreadPoolMaxSize(16); ra.setThreadPoolMaxSize(17); ra.setTransactionBatchSize(18); - ra.setUseGlobalPools(!HornetQClient.DEFAULT_USE_GLOBAL_POOLS); - HornetQConnectionFactory factory = ra.getDefaultHornetQConnectionFactory(); + ra.setUseGlobalPools(!ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS); + ActiveMQConnectionFactory factory = ra.getDefaultActiveMQConnectionFactory(); Assert.assertEquals(factory.getCallTimeout(), 1); Assert.assertEquals(factory.getClientFailureCheckPeriod(), 2); Assert.assertEquals(factory.getClientID(), "myid"); @@ -183,24 +183,24 @@ public class ResourceAdapterTest extends ServiceTestBase Assert.assertEquals(factory.getScheduledThreadPoolMaxSize(), 16); Assert.assertEquals(factory.getThreadPoolMaxSize(), 17); Assert.assertEquals(factory.getTransactionBatchSize(), 18); - Assert.assertEquals(factory.isAutoGroup(), !HornetQClient.DEFAULT_AUTO_GROUP); - Assert.assertEquals(factory.isBlockOnAcknowledge(), !HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE); - Assert.assertEquals(factory.isBlockOnNonDurableSend(), !HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND); - Assert.assertEquals(factory.isBlockOnDurableSend(), !HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND); - Assert.assertEquals(factory.isPreAcknowledge(), !HornetQClient.DEFAULT_PRE_ACKNOWLEDGE); - Assert.assertEquals(factory.isUseGlobalPools(), !HornetQClient.DEFAULT_USE_GLOBAL_POOLS); + Assert.assertEquals(factory.isAutoGroup(), !ActiveMQClient.DEFAULT_AUTO_GROUP); + Assert.assertEquals(factory.isBlockOnAcknowledge(), !ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE); + Assert.assertEquals(factory.isBlockOnNonDurableSend(), !ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND); + Assert.assertEquals(factory.isBlockOnDurableSend(), !ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND); + Assert.assertEquals(factory.isPreAcknowledge(), !ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE); + Assert.assertEquals(factory.isUseGlobalPools(), !ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS); } @Test public void testCreateConnectionFactoryOverrides() throws Exception { - HornetQResourceAdapter ra = new HornetQResourceAdapter(); + ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName(InVMConnectorFactory.class.getName()); ConnectionFactoryProperties connectionFactoryProperties = new ConnectionFactoryProperties(); - connectionFactoryProperties.setAutoGroup(!HornetQClient.DEFAULT_AUTO_GROUP); - connectionFactoryProperties.setBlockOnAcknowledge(!HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE); - connectionFactoryProperties.setBlockOnNonDurableSend(!HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND); - connectionFactoryProperties.setBlockOnDurableSend(!HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND); + connectionFactoryProperties.setAutoGroup(!ActiveMQClient.DEFAULT_AUTO_GROUP); + connectionFactoryProperties.setBlockOnAcknowledge(!ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE); + connectionFactoryProperties.setBlockOnNonDurableSend(!ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND); + connectionFactoryProperties.setBlockOnDurableSend(!ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND); connectionFactoryProperties.setCallTimeout(1L); connectionFactoryProperties.setClientFailureCheckPeriod(2L); connectionFactoryProperties.setClientID("myid"); @@ -212,7 +212,7 @@ public class ResourceAdapterTest extends ServiceTestBase connectionFactoryProperties.setDiscoveryRefreshTimeout(7L); connectionFactoryProperties.setDupsOKBatchSize(8); connectionFactoryProperties.setMinLargeMessageSize(10); - connectionFactoryProperties.setPreAcknowledge(!HornetQClient.DEFAULT_PRE_ACKNOWLEDGE); + connectionFactoryProperties.setPreAcknowledge(!ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE); connectionFactoryProperties.setProducerMaxRate(11); connectionFactoryProperties.setConfirmationWindowSize(12); connectionFactoryProperties.setReconnectAttempts(13); @@ -221,8 +221,8 @@ public class ResourceAdapterTest extends ServiceTestBase connectionFactoryProperties.setScheduledThreadPoolMaxSize(16); connectionFactoryProperties.setThreadPoolMaxSize(17); connectionFactoryProperties.setTransactionBatchSize(18); - connectionFactoryProperties.setUseGlobalPools(!HornetQClient.DEFAULT_USE_GLOBAL_POOLS); - HornetQConnectionFactory factory = ra.createHornetQConnectionFactory(connectionFactoryProperties); + connectionFactoryProperties.setUseGlobalPools(!ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS); + ActiveMQConnectionFactory factory = ra.createActiveMQConnectionFactory(connectionFactoryProperties); Assert.assertEquals(factory.getCallTimeout(), 1); Assert.assertEquals(factory.getClientFailureCheckPeriod(), 2); Assert.assertEquals(factory.getClientID(), "myid"); @@ -240,39 +240,39 @@ public class ResourceAdapterTest extends ServiceTestBase Assert.assertEquals(factory.getScheduledThreadPoolMaxSize(), 16); Assert.assertEquals(factory.getThreadPoolMaxSize(), 17); Assert.assertEquals(factory.getTransactionBatchSize(), 18); - Assert.assertEquals(factory.isAutoGroup(), !HornetQClient.DEFAULT_AUTO_GROUP); - Assert.assertEquals(factory.isBlockOnAcknowledge(), !HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE); - Assert.assertEquals(factory.isBlockOnNonDurableSend(), !HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND); - Assert.assertEquals(factory.isBlockOnDurableSend(), !HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND); - Assert.assertEquals(factory.isPreAcknowledge(), !HornetQClient.DEFAULT_PRE_ACKNOWLEDGE); - Assert.assertEquals(factory.isUseGlobalPools(), !HornetQClient.DEFAULT_USE_GLOBAL_POOLS); + Assert.assertEquals(factory.isAutoGroup(), !ActiveMQClient.DEFAULT_AUTO_GROUP); + Assert.assertEquals(factory.isBlockOnAcknowledge(), !ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE); + Assert.assertEquals(factory.isBlockOnNonDurableSend(), !ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND); + Assert.assertEquals(factory.isBlockOnDurableSend(), !ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND); + Assert.assertEquals(factory.isPreAcknowledge(), !ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE); + Assert.assertEquals(factory.isUseGlobalPools(), !ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS); } @Test public void testCreateConnectionFactoryOverrideConnector() throws Exception { - HornetQResourceAdapter ra = new HornetQResourceAdapter(); + ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName(InVMConnectorFactory.class.getName()); ConnectionFactoryProperties connectionFactoryProperties = new ConnectionFactoryProperties(); ArrayList value = new ArrayList(); value.add(NettyConnectorFactory.class.getName()); connectionFactoryProperties.setParsedConnectorClassNames(value); - HornetQConnectionFactory factory = ra.createHornetQConnectionFactory(connectionFactoryProperties); - HornetQConnectionFactory defaultFactory = ra.getDefaultHornetQConnectionFactory(); + ActiveMQConnectionFactory factory = ra.createActiveMQConnectionFactory(connectionFactoryProperties); + ActiveMQConnectionFactory defaultFactory = ra.getDefaultActiveMQConnectionFactory(); Assert.assertNotSame(factory, defaultFactory); } @Test public void testCreateConnectionFactoryOverrideDiscovery() throws Exception { - HornetQResourceAdapter ra = new HornetQResourceAdapter(); + ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName(InVMConnectorFactory.class.getName()); ConnectionFactoryProperties connectionFactoryProperties = new ConnectionFactoryProperties(); connectionFactoryProperties.setDiscoveryAddress("myhost"); connectionFactoryProperties.setDiscoveryPort(5678); connectionFactoryProperties.setDiscoveryLocalBindAddress("newAddress"); - HornetQConnectionFactory factory = ra.createHornetQConnectionFactory(connectionFactoryProperties); - HornetQConnectionFactory defaultFactory = ra.getDefaultHornetQConnectionFactory(); + ActiveMQConnectionFactory factory = ra.createActiveMQConnectionFactory(connectionFactoryProperties); + ActiveMQConnectionFactory defaultFactory = ra.getDefaultActiveMQConnectionFactory(); Assert.assertNotSame(factory, defaultFactory); DiscoveryGroupConfiguration dc = factory.getServerLocator().getDiscoveryGroupConfiguration(); UDPBroadcastGroupConfiguration udpDg = (UDPBroadcastGroupConfiguration) dc.getBroadcastEndpointFactoryConfiguration(); @@ -284,9 +284,9 @@ public class ResourceAdapterTest extends ServiceTestBase @Test public void testCreateConnectionFactoryMultipleConnectors() { - HornetQResourceAdapter ra = new HornetQResourceAdapter(); + ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName(NETTY_CONNECTOR_FACTORY + "," + INVM_CONNECTOR_FACTORY + "," + NETTY_CONNECTOR_FACTORY); - HornetQConnectionFactory factory = ra.createHornetQConnectionFactory(new ConnectionFactoryProperties()); + ActiveMQConnectionFactory factory = ra.createActiveMQConnectionFactory(new ConnectionFactoryProperties()); TransportConfiguration[] configurations = factory.getServerLocator().getStaticTransportConfigurations(); assertNotNull(configurations); assertEquals(3, configurations.length); @@ -301,10 +301,10 @@ public class ResourceAdapterTest extends ServiceTestBase @Test public void testCreateConnectionFactoryMultipleConnectorsAndParams() { - HornetQResourceAdapter ra = new HornetQResourceAdapter(); + ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName(NETTY_CONNECTOR_FACTORY + "," + INVM_CONNECTOR_FACTORY + "," + NETTY_CONNECTOR_FACTORY); ra.setConnectionParameters("host=host1;port=5445, serverid=0, host=host2;port=5446"); - HornetQConnectionFactory factory = ra.createHornetQConnectionFactory(new ConnectionFactoryProperties()); + ActiveMQConnectionFactory factory = ra.createActiveMQConnectionFactory(new ConnectionFactoryProperties()); TransportConfiguration[] configurations = factory.getServerLocator().getStaticTransportConfigurations(); assertNotNull(configurations); assertEquals(3, configurations.length); @@ -324,7 +324,7 @@ public class ResourceAdapterTest extends ServiceTestBase @Test public void testCreateConnectionFactoryMultipleConnectorsOverride() { - HornetQResourceAdapter ra = new HornetQResourceAdapter(); + ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName(NETTY_CONNECTOR_FACTORY + "," + INVM_CONNECTOR_FACTORY + "," + NETTY_CONNECTOR_FACTORY); ConnectionFactoryProperties overrideProperties = new ConnectionFactoryProperties(); ArrayList value = new ArrayList(); @@ -332,7 +332,7 @@ public class ResourceAdapterTest extends ServiceTestBase value.add(NETTY_CONNECTOR_FACTORY); value.add(INVM_CONNECTOR_FACTORY); overrideProperties.setParsedConnectorClassNames(value); - HornetQConnectionFactory factory = ra.createHornetQConnectionFactory(overrideProperties); + ActiveMQConnectionFactory factory = ra.createActiveMQConnectionFactory(overrideProperties); TransportConfiguration[] configurations = factory.getServerLocator().getStaticTransportConfigurations(); assertNotNull(configurations); assertEquals(3, configurations.length); @@ -347,7 +347,7 @@ public class ResourceAdapterTest extends ServiceTestBase @Test public void testCreateConnectionFactoryMultipleConnectorsOverrideAndParams() { - HornetQResourceAdapter ra = new HornetQResourceAdapter(); + ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName(NETTY_CONNECTOR_FACTORY + "," + INVM_CONNECTOR_FACTORY + "," + NETTY_CONNECTOR_FACTORY); ra.setConnectionParameters("host=host1;port=5445, serverid=0, host=host2;port=5446"); ConnectionFactoryProperties overrideProperties = new ConnectionFactoryProperties(); @@ -368,7 +368,7 @@ public class ResourceAdapterTest extends ServiceTestBase map3.put("serverid", "1"); connectionParameters.add(map3); overrideProperties.setParsedConnectionParameters(connectionParameters); - HornetQConnectionFactory factory = ra.createHornetQConnectionFactory(overrideProperties); + ActiveMQConnectionFactory factory = ra.createActiveMQConnectionFactory(overrideProperties); TransportConfiguration[] configurations = factory.getServerLocator().getStaticTransportConfigurations(); assertNotNull(configurations); assertEquals(3, configurations.length); @@ -387,11 +387,11 @@ public class ResourceAdapterTest extends ServiceTestBase @Test public void testCreateConnectionFactoryThrowsException() throws Exception { - HornetQResourceAdapter ra = new HornetQResourceAdapter(); + ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter(); ConnectionFactoryProperties connectionFactoryProperties = new ConnectionFactoryProperties(); try { - ra.createHornetQConnectionFactory(connectionFactoryProperties); + ra.createActiveMQConnectionFactory(connectionFactoryProperties); Assert.fail("should throw exception"); } catch (IllegalArgumentException e) @@ -403,22 +403,22 @@ public class ResourceAdapterTest extends ServiceTestBase @Test public void testValidateProperties() throws Exception { - validateGettersAndSetters(new HornetQResourceAdapter(), + validateGettersAndSetters(new ActiveMQResourceAdapter(), "backupTransportConfiguration", "connectionParameters", "jndiParams"); - validateGettersAndSetters(new HornetQRAManagedConnectionFactory(), + validateGettersAndSetters(new ActiveMQRAManagedConnectionFactory(), "connectionParameters", "sessionDefaultType", "backupConnectionParameters", "jndiParams"); - validateGettersAndSetters(new HornetQActivationSpec(), + validateGettersAndSetters(new ActiveMQActivationSpec(), "connectionParameters", "acknowledgeMode", "subscriptionDurability", "jndiParams"); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setAcknowledgeMode("DUPS_OK_ACKNOWLEDGE"); Assert.assertEquals("Dups-ok-acknowledge", spec.getAcknowledgeMode()); @@ -429,8 +429,8 @@ public class ResourceAdapterTest extends ServiceTestBase spec.setSubscriptionDurability("NonDurable"); Assert.assertEquals("NonDurable", spec.getSubscriptionDurability()); - spec = new HornetQActivationSpec(); - HornetQResourceAdapter adapter = new HornetQResourceAdapter(); + spec = new ActiveMQActivationSpec(); + ActiveMQResourceAdapter adapter = new ActiveMQResourceAdapter(); adapter.setUserName("us1"); adapter.setPassword("ps1"); @@ -454,7 +454,7 @@ public class ResourceAdapterTest extends ServiceTestBase @Test public void testStartActivation() throws Exception { - HornetQServer server = createServer(false); + ActiveMQServer server = createServer(false); try { @@ -463,11 +463,11 @@ public class ResourceAdapterTest extends ServiceTestBase ServerLocator locator = createInVMNonHALocator(); ClientSessionFactory factory = createSessionFactory(locator); ClientSession session = factory.createSession(false, false, false); - HornetQDestination queue = (HornetQDestination) HornetQJMSClient.createQueue("test"); + ActiveMQDestination queue = (ActiveMQDestination) ActiveMQJMSClient.createQueue("test"); session.createQueue(queue.getSimpleAddress(), queue.getSimpleAddress(), true); session.close(); - HornetQResourceAdapter ra = new HornetQResourceAdapter(); + ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName(INVM_CONNECTOR_FACTORY); ra.setUserName("userGlobal"); @@ -476,11 +476,11 @@ public class ResourceAdapterTest extends ServiceTestBase ra.setTransactionManagerLocatorMethod(""); ra.start(new org.apache.activemq.tests.unit.ra.BootstrapContext()); - Connection conn = ra.getDefaultHornetQConnectionFactory().createConnection(); + Connection conn = ra.getDefaultActiveMQConnectionFactory().createConnection(); conn.close(); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(ra); @@ -495,7 +495,7 @@ public class ResourceAdapterTest extends ServiceTestBase spec.setMinSession(1); spec.setMaxSession(1); - HornetQActivation activation = new HornetQActivation(ra, new MessageEndpointFactory(), spec); + ActiveMQActivation activation = new ActiveMQActivation(ra, new MessageEndpointFactory(), spec); activation.start(); activation.stop(); @@ -514,16 +514,16 @@ public class ResourceAdapterTest extends ServiceTestBase @Test public void testForConnectionLeakDuringActivationWhenSessionCreationFails() throws Exception { - HornetQServer server = createServer(false); - HornetQResourceAdapter ra = null; - HornetQActivation activation = null; + ActiveMQServer server = createServer(false); + ActiveMQResourceAdapter ra = null; + ActiveMQActivation activation = null; try { server.getConfiguration().setSecurityEnabled(true); server.start(); - ra = new HornetQResourceAdapter(); + ra = new ActiveMQResourceAdapter(); ra.setConnectorClassName(INVM_CONNECTOR_FACTORY); ra.setUserName("badUser"); @@ -532,7 +532,7 @@ public class ResourceAdapterTest extends ServiceTestBase ra.setTransactionManagerLocatorMethod(""); ra.start(new org.apache.activemq.tests.unit.ra.BootstrapContext()); - HornetQActivationSpec spec = new HornetQActivationSpec(); + ActiveMQActivationSpec spec = new ActiveMQActivationSpec(); spec.setResourceAdapter(ra); @@ -548,7 +548,7 @@ public class ResourceAdapterTest extends ServiceTestBase spec.setMaxSession(1); spec.setSetupAttempts(1); - activation = new HornetQActivation(ra, new MessageEndpointFactory(), spec); + activation = new ActiveMQActivation(ra, new MessageEndpointFactory(), spec); try { diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/HornetQBufferInputStreamTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/ActiveMQBufferInputStreamTest.java similarity index 88% rename from tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/HornetQBufferInputStreamTest.java rename to tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/ActiveMQBufferInputStreamTest.java index fea11b0819..4c391edd2b 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/HornetQBufferInputStreamTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/ActiveMQBufferInputStreamTest.java @@ -15,15 +15,15 @@ package org.apache.activemq.tests.unit.util; import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.tests.util.UnitTestCase; -import org.apache.activemq.utils.HornetQBufferInputStream; +import org.apache.activemq.utils.ActiveMQBufferInputStream; import org.junit.Test; /** - * A HornetQInputStreamTest + * A ActiveMQInputStreamTest * * @author Clebert Suconic */ -public class HornetQBufferInputStreamTest extends UnitTestCase +public class ActiveMQBufferInputStreamTest extends UnitTestCase { @Test @@ -36,7 +36,7 @@ public class HornetQBufferInputStreamTest extends UnitTestCase } ActiveMQBuffer buffer = ActiveMQBuffers.wrappedBuffer(bytes); - HornetQBufferInputStream is = new HornetQBufferInputStream(buffer); + ActiveMQBufferInputStream is = new ActiveMQBufferInputStream(buffer); // First read byte per byte for (int i = 0; i < 1024; i++) diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/VersionLoaderTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/VersionLoaderTest.java index 484a61bb4f..e5bfe9857e 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/VersionLoaderTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/VersionLoaderTest.java @@ -43,16 +43,16 @@ public class VersionLoaderTest extends UnitTestCase Properties props = new Properties(); props.load(ClassLoader.getSystemResourceAsStream(VersionLoader.DEFAULT_PROP_FILE_NAME)); - Assert.assertEquals(props.get("hornetq.version.versionName"), version.getVersionName()); - Assert.assertEquals(props.get("hornetq.version.versionSuffix"), version.getVersionSuffix()); + Assert.assertEquals(props.get("activemq.version.versionName"), version.getVersionName()); + Assert.assertEquals(props.get("activemq.version.versionSuffix"), version.getVersionSuffix()); - Assert.assertEquals(Integer.parseInt(props.getProperty("hornetq.version.majorVersion")), + Assert.assertEquals(Integer.parseInt(props.getProperty("activemq.version.majorVersion")), version.getMajorVersion()); - Assert.assertEquals(Integer.parseInt(props.getProperty("hornetq.version.minorVersion")), + Assert.assertEquals(Integer.parseInt(props.getProperty("activemq.version.minorVersion")), version.getMinorVersion()); - Assert.assertEquals(Integer.parseInt(props.getProperty("hornetq.version.microVersion")), + Assert.assertEquals(Integer.parseInt(props.getProperty("activemq.version.microVersion")), version.getMicroVersion()); - Assert.assertEquals(Integer.parseInt(new StringTokenizer(props.getProperty("hornetq.version.incrementingVersion"), ",").nextToken()), + Assert.assertEquals(Integer.parseInt(new StringTokenizer(props.getProperty("activemq.version.incrementingVersion"), ",").nextToken()), version.getIncrementingVersion()); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/xa/XAResourceWrapperTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/xa/XAResourceWrapperTest.java index a0160d500b..e78258ddee 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/xa/XAResourceWrapperTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/xa/XAResourceWrapperTest.java @@ -15,8 +15,8 @@ package org.apache.activemq.tests.unit.xa; import javax.transaction.xa.XAResource; -import org.apache.activemq.ra.HornetQRAXAResource; -import org.apache.activemq.ra.HornetQXAResourceWrapper; +import org.apache.activemq.ra.ActiveMQRAXAResource; +import org.apache.activemq.ra.ActiveMQXAResourceWrapper; import org.apache.activemq.tests.util.UnitTestCase; import org.jboss.tm.XAResourceWrapper; import org.junit.Test; @@ -32,8 +32,8 @@ public class XAResourceWrapperTest extends UnitTestCase { String jndiName = "java://jmsXA"; String nodeId = "0"; - XAResource xaResource = new HornetQRAXAResource(null, null); - XAResourceWrapper xaResourceWrapper = new HornetQXAResourceWrapper(xaResource, jndiName, nodeId); + XAResource xaResource = new ActiveMQRAXAResource(null, null); + XAResourceWrapper xaResourceWrapper = new ActiveMQXAResourceWrapper(xaResource, jndiName, nodeId); assertEquals(xaResource, xaResourceWrapper.getResource()); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/util/CreateMessage.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/util/CreateMessage.java index 7d7b5c470e..e302007eda 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/util/CreateMessage.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/util/CreateMessage.java @@ -14,8 +14,8 @@ package org.apache.activemq.tests.util; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession; -import org.apache.activemq.jms.client.HornetQBytesMessage; -import org.apache.activemq.jms.client.HornetQTextMessage; +import org.apache.activemq.jms.client.ActiveMQBytesMessage; +import org.apache.activemq.jms.client.ActiveMQTextMessage; public final class CreateMessage { @@ -27,7 +27,7 @@ public final class CreateMessage public static ClientMessage createTextMessage(final String s, final ClientSession clientSession) { - ClientMessage message = clientSession.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = clientSession.createMessage(ActiveMQTextMessage.TYPE, true, 0, System.currentTimeMillis(), @@ -38,7 +38,7 @@ public final class CreateMessage public static ClientMessage createBytesMessage(final ClientSession session, final byte[] b, final boolean durable) { - ClientMessage message = session.createMessage(HornetQBytesMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQBytesMessage.TYPE, durable, 0, System.currentTimeMillis(), @@ -49,7 +49,7 @@ public final class CreateMessage public static ClientMessage createTextMessage(final ClientSession session, final String s, final boolean durable) { - ClientMessage message = session.createMessage(HornetQTextMessage.TYPE, + ClientMessage message = session.createMessage(ActiveMQTextMessage.TYPE, durable, 0, System.currentTimeMillis(),

    Date