From 1bf2e41f23193b1cf53cc15163aab18ff88d1d3b Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Mon, 17 Nov 2014 14:53:12 -0500 Subject: [PATCH] ACTIVEMQ6-3 Renaming Exception classes and fixing native compilation https://issues.apache.org/jira/browse/ACTIVEMQ6-3 The Native Layer has some dependencies on the Exception classes so I had to rename them now in order to fix the native dependencies --- ...va => ActiveMQAddressExistsException.java} | 8 +- ...java => ActiveMQAddressFullException.java} | 8 +- ... ActiveMQAlreadyReplicatingException.java} | 8 +- ...HornetQBuffer.java => ActiveMQBuffer.java} | 70 ++-- ...rnetQBuffers.java => ActiveMQBuffers.java} | 20 +- ... => ActiveMQClusterSecurityException.java} | 10 +- ... ActiveMQConnectionTimedOutException.java} | 8 +- ...ava => ActiveMQDisconnectedException.java} | 8 +- ...java => ActiveMQDuplicateIdException.java} | 8 +- ...> ActiveMQDuplicateMetaDataException.java} | 8 +- ...QException.java => ActiveMQException.java} | 26 +- .../api/core/ActiveMQExceptionType.java | 298 ++++++++++++++++++ ...ion.java => ActiveMQIOErrorException.java} | 10 +- ...ava => ActiveMQIllegalStateException.java} | 8 +- ...eMQIncompatibleClientServerException.java} | 8 +- ...MQInterceptorRejectedPacketException.java} | 8 +- ...va => ActiveMQInternalErrorException.java} | 12 +- ...java => ActiveMQInterruptedException.java} | 4 +- ...veMQInvalidFilterExpressionException.java} | 8 +- ...eMQInvalidTransientQueueUseException.java} | 8 +- ...ava => ActiveMQLargeMessageException.java} | 8 +- ...veMQLargeMessageInterruptedException.java} | 8 +- ...OError.java => ActiveMQNativeIOError.java} | 10 +- ...=> ActiveMQNonExistentQueueException.java} | 8 +- ...ava => ActiveMQNotConnectedException.java} | 8 +- ...ava => ActiveMQObjectClosedException.java} | 8 +- ... ActiveMQPropertyConversionException.java} | 4 +- ...java => ActiveMQQueueExistsException.java} | 8 +- ...on.java => ActiveMQSecurityException.java} | 8 +- ... => ActiveMQSessionCreationException.java} | 8 +- ...MQTransactionOutcomeUnknownException.java} | 8 +- ...tiveMQTransactionRolledBackException.java} | 8 +- ...n.java => ActiveMQUnBlockedException.java} | 8 +- ...> ActiveMQUnsupportedPacketException.java} | 8 +- .../api/core/HornetQExceptionType.java | 298 ------------------ .../buffers/impl/ChannelBufferWrapper.java | 40 +-- .../activemq/utils/HornetQUtilBundle.java | 4 +- .../activemq/utils/PasswordMaskingUtil.java | 8 +- .../activemq/utils/TypedProperties.java | 94 +++--- .../org/apache/activemq/utils/UTF8Util.java | 6 +- .../apache/activemq/api/core/Interceptor.java | 4 +- .../org/apache/activemq/api/core/Message.java | 72 ++--- .../api/core/TransportConfiguration.java | 4 +- .../api/core/client/ClientConsumer.java | 38 +-- .../api/core/client/ClientMessage.java | 26 +- .../api/core/client/ClientProducer.java | 26 +- .../api/core/client/ClientSession.java | 152 ++++----- .../api/core/client/ClientSessionFactory.java | 34 +- .../api/core/client/ServerLocator.java | 2 +- .../core/client/SessionFailureListener.java | 4 +- .../core/management/HornetQServerControl.java | 6 +- .../impl/ResetLimitWrappedHornetQBuffer.java | 16 +- .../core/client/HornetQClientLogger.java | 4 +- .../client/HornetQClientMessageBundle.java | 96 +++--- .../core/client/impl/ClientConsumerImpl.java | 54 ++-- .../client/impl/ClientConsumerInternal.java | 20 +- .../client/impl/ClientLargeMessageImpl.java | 22 +- .../core/client/impl/ClientMessageImpl.java | 30 +- .../client/impl/ClientProducerCredits.java | 4 +- .../impl/ClientProducerCreditsImpl.java | 4 +- .../core/client/impl/ClientProducerImpl.java | 56 ++-- .../client/impl/ClientSessionFactoryImpl.java | 64 ++-- .../impl/ClientSessionFactoryInternal.java | 4 +- .../core/client/impl/ClientSessionImpl.java | 152 ++++----- .../client/impl/ClientSessionInternal.java | 18 +- .../CompressedLargeMessageControllerImpl.java | 50 +-- .../core/client/impl/DelegatingSession.java | 94 +++--- .../client/impl/LargeMessageController.java | 12 +- .../impl/LargeMessageControllerImpl.java | 82 +++-- .../core/client/impl/ServerLocatorImpl.java | 52 +-- .../client/impl/ServerLocatorInternal.java | 8 +- .../activemq/core/cluster/DiscoveryGroup.java | 12 +- .../activemq/core/message/BodyEncoder.java | 12 +- .../core/message/impl/MessageImpl.java | 92 +++--- .../core/message/impl/MessageInternal.java | 16 +- .../core/protocol/ClientPacketDecoder.java | 4 +- .../activemq/core/protocol/core/Channel.java | 6 +- .../activemq/core/protocol/core/Packet.java | 8 +- .../core/protocol/core/impl/ChannelImpl.java | 22 +- .../impl/HornetQClientProtocolManager.java | 36 +-- .../core/impl/HornetQSessionContext.java | 86 ++--- .../protocol/core/impl/PacketDecoder.java | 4 +- .../core/protocol/core/impl/PacketImpl.java | 12 +- .../core/impl/RemotingConnectionImpl.java | 8 +- .../impl/wireformat/CheckFailoverMessage.java | 6 +- .../wireformat/CheckFailoverReplyMessage.java | 6 +- .../ClusterTopologyChangeMessage.java | 6 +- .../ClusterTopologyChangeMessage_V2.java | 6 +- .../ClusterTopologyChangeMessage_V3.java | 6 +- .../impl/wireformat/CreateQueueMessage.java | 6 +- .../impl/wireformat/CreateSessionMessage.java | 6 +- .../CreateSessionResponseMessage.java | 6 +- .../wireformat/CreateSharedQueueMessage.java | 6 +- .../wireformat/DisconnectConsumerMessage.java | 6 +- .../impl/wireformat/DisconnectMessage.java | 6 +- .../impl/wireformat/DisconnectMessage_V2.java | 6 +- .../wireformat/HornetQExceptionMessage.java | 18 +- .../wireformat/PacketsConfirmedMessage.java | 6 +- .../protocol/core/impl/wireformat/Ping.java | 6 +- .../wireformat/ReattachSessionMessage.java | 6 +- .../ReattachSessionResponseMessage.java | 6 +- .../core/impl/wireformat/RollbackMessage.java | 6 +- .../wireformat/SessionAcknowledgeMessage.java | 6 +- .../wireformat/SessionAddMetaDataMessage.java | 6 +- .../SessionAddMetaDataMessageV2.java | 6 +- .../SessionBindingQueryMessage.java | 6 +- .../SessionBindingQueryResponseMessage.java | 6 +- .../SessionConsumerCloseMessage.java | 6 +- .../SessionConsumerFlowCreditMessage.java | 6 +- .../SessionContinuationMessage.java | 6 +- .../SessionCreateConsumerMessage.java | 6 +- .../wireformat/SessionDeleteQueueMessage.java | 6 +- .../impl/wireformat/SessionExpireMessage.java | 6 +- .../SessionForceConsumerDelivery.java | 6 +- .../SessionIndividualAcknowledgeMessage.java | 6 +- .../SessionProducerCreditsFailMessage.java | 6 +- .../SessionProducerCreditsMessage.java | 6 +- .../wireformat/SessionQueueQueryMessage.java | 6 +- .../SessionQueueQueryResponseMessage.java | 6 +- .../SessionReceiveClientLargeMessage.java | 4 +- .../SessionReceiveContinuationMessage.java | 6 +- .../SessionReceiveLargeMessage.java | 6 +- .../wireformat/SessionReceiveMessage.java | 8 +- .../SessionRequestProducerCreditsMessage.java | 6 +- .../SessionSendContinuationMessage.java | 6 +- .../wireformat/SessionSendLargeMessage.java | 6 +- .../impl/wireformat/SessionSendMessage.java | 8 +- .../SessionXAAfterFailedMessage.java | 6 +- .../wireformat/SessionXACommitMessage.java | 6 +- .../impl/wireformat/SessionXAEndMessage.java | 6 +- .../wireformat/SessionXAForgetMessage.java | 6 +- ...essionXAGetInDoubtXidsResponseMessage.java | 6 +- .../SessionXAGetTimeoutResponseMessage.java | 6 +- .../impl/wireformat/SessionXAJoinMessage.java | 6 +- .../wireformat/SessionXAPrepareMessage.java | 6 +- .../wireformat/SessionXAResponseMessage.java | 6 +- .../wireformat/SessionXAResumeMessage.java | 6 +- .../wireformat/SessionXARollbackMessage.java | 6 +- .../SessionXASetTimeoutMessage.java | 6 +- .../SessionXASetTimeoutResponseMessage.java | 6 +- .../wireformat/SessionXAStartMessage.java | 6 +- ...ubscribeClusterTopologyUpdatesMessage.java | 6 +- ...scribeClusterTopologyUpdatesMessageV2.java | 6 +- .../core/remoting/FailureListener.java | 6 +- .../impl/netty/HornetQChannelHandler.java | 6 +- .../remoting/impl/netty/NettyConnection.java | 24 +- .../remoting/impl/netty/NettyConnector.java | 4 +- .../activemq/reader/MapMessageUtil.java | 6 +- .../apache/activemq/reader/MessageUtil.java | 14 +- .../activemq/reader/StreamMessageUtil.java | 24 +- .../activemq/reader/TextMessageUtil.java | 6 +- .../protocol/AbstractRemotingConnection.java | 16 +- .../spi/core/protocol/RemotingConnection.java | 10 +- .../spi/core/remoting/BufferDecoder.java | 6 +- .../spi/core/remoting/BufferHandler.java | 4 +- .../core/remoting/ClientProtocolManager.java | 8 +- .../spi/core/remoting/Connection.java | 10 +- .../remoting/ConnectionLifeCycleListener.java | 4 +- .../spi/core/remoting/SessionContext.java | 78 ++--- .../apache/activemq/utils/BufferHelper.java | 24 +- .../activemq/utils/ConfigurationHelper.java | 4 +- .../utils/HornetQBufferInputStream.java | 6 +- .../utils/OrderedExecutorFactory.java | 4 +- .../activemq/utils/XidCodecSupport.java | 6 +- .../activemq/tests/util/RandomUtil.java | 8 +- .../util/TypedPropertiesConversionTest.java | 20 +- .../activemq/util/TypedPropertiesTest.java | 8 +- .../jms/client/HornetQBytesMessage.java | 8 +- .../jms/client/HornetQConnection.java | 26 +- .../jms/client/HornetQJMSClientBundle.java | 12 +- .../jms/client/HornetQJMSProducer.java | 24 +- .../jms/client/HornetQMapMessage.java | 28 +- .../activemq/jms/client/HornetQMessage.java | 38 +-- .../jms/client/HornetQMessageConsumer.java | 8 +- .../jms/client/HornetQMessageProducer.java | 8 +- .../jms/client/HornetQObjectMessage.java | 4 +- .../jms/client/HornetQQueueBrowser.java | 8 +- .../activemq/jms/client/HornetQSession.java | 46 +-- .../jms/client/HornetQStreamMessage.java | 4 +- .../jms/client/HornetQTextMessage.java | 4 +- .../jms/client/JMSExceptionHelper.java | 4 +- .../jms/client/JMSMessageListenerWrapper.java | 6 +- .../jms/bridge/impl/JMSBridgeImpl.java | 12 +- .../management/impl/JMSQueueControlImpl.java | 6 +- .../management/impl/JMSTopicControlImpl.java | 4 +- .../config/PersistedConnectionFactory.java | 6 +- .../config/PersistedDestination.java | 6 +- .../jms/persistence/config/PersistedJNDI.java | 6 +- .../journal/JMSJournalStorageManagerImpl.java | 6 +- .../jms/server/HornetQJMSServerBundle.java | 22 +- .../ConnectionFactoryConfigurationImpl.java | 6 +- ...TransportConfigurationEncodingSupport.java | 10 +- .../impl/JMSServerConfigParserImpl.java | 4 +- .../jms/server/impl/JMSServerManagerImpl.java | 6 +- .../recovery/HornetQXAResourceWrapper.java | 16 +- .../server/recovery/RecoveryDiscovery.java | 12 +- .../core/asyncio/AsynchronousFile.java | 20 +- .../asyncio/impl/AsynchronousFileImpl.java | 46 +-- .../core/journal/EncodingSupport.java | 6 +- .../activemq/core/journal/SequentialFile.java | 10 +- .../core/journal/impl/AIOSequentialFile.java | 12 +- .../impl/AIOSequentialFileFactory.java | 6 +- .../impl/AbstractJournalUpdateTask.java | 14 +- .../journal/impl/AbstractSequentialFile.java | 30 +- .../impl/AbstractSequentialFileFactory.java | 4 +- .../core/journal/impl/FileWrapperJournal.java | 16 +- .../core/journal/impl/JournalBase.java | 6 +- .../core/journal/impl/JournalCompactor.java | 6 +- .../core/journal/impl/JournalImpl.java | 14 +- .../core/journal/impl/JournalTransaction.java | 4 +- .../core/journal/impl/NIOSequentialFile.java | 44 +-- .../journal/impl/SimpleWaitIOCallback.java | 12 +- .../core/journal/impl/TimedBuffer.java | 22 +- .../impl/dataformat/ByteArrayEncoding.java | 6 +- .../impl/dataformat/JournalAddRecord.java | 4 +- .../impl/dataformat/JournalAddRecordTX.java | 4 +- .../dataformat/JournalCompleteRecordTX.java | 4 +- .../impl/dataformat/JournalDeleteRecord.java | 4 +- .../dataformat/JournalDeleteRecordTX.java | 4 +- .../dataformat/JournalInternalRecord.java | 4 +- .../dataformat/JournalRollbackRecordTX.java | 4 +- .../journal/HornetQJournalBundle.java | 10 +- activemq-native/README | 3 +- activemq-native/bin/libactivemqAIO64.so | Bin 0 -> 51692 bytes activemq-native/pom.xml | 4 +- .../src/main/c/JNI_AsynchronousFileImpl.cpp | 38 +-- activemq-native/src/main/c/JavaUtilities.cpp | 2 +- .../apache/activemq/core/libaio/Native.java | 12 +- .../HornetQProtonRemotingConnection.java | 8 +- .../proton/ProtonProtocolManager.java | 6 +- .../converter/jms/ServerJMSMapMessage.java | 24 +- .../converter/jms/ServerJMSMessage.java | 4 +- .../converter/jms/ServerJMSStreamMessage.java | 4 +- .../core/protocol/proton/TestConversions.java | 40 +-- .../protocol/openwire/DataInputWrapper.java | 4 +- .../protocol/openwire/OpenWireConnection.java | 28 +- .../openwire/OpenWireMessageConverter.java | 10 +- .../openwire/OpenWireProtocolManager.java | 6 +- .../core/protocol/openwire/OpenWireUtil.java | 8 +- .../core/protocol/stomp/StompConnection.java | 22 +- .../core/protocol/stomp/StompDecoder.java | 4 +- .../core/protocol/stomp/StompFrame.java | 12 +- .../protocol/stomp/StompProtocolManager.java | 10 +- .../core/protocol/stomp/StompSession.java | 4 +- .../stomp/VersionedStompFrameHandler.java | 6 +- .../protocol/stomp/v11/StompFrameV11.java | 10 +- .../protocol/stomp/v12/StompFrameV12.java | 10 +- .../apache/activemq/ra/HornetQRABundle.java | 4 +- .../activemq/ra/HornetQRAProperties.java | 4 +- .../activemq/ra/HornetQRAXAResource.java | 4 +- .../activemq/ra/HornetQResourceAdapter.java | 10 +- .../activemq/ra/inflow/HornetQActivation.java | 20 +- .../ra/inflow/HornetQMessageHandler.java | 10 +- .../activemq/rest/HornetQRestLogger.java | 4 +- .../rest/queue/AcknowledgedQueueConsumer.java | 10 +- .../rest/queue/ConsumersResource.java | 8 +- .../activemq/rest/queue/PostMessage.java | 8 +- .../rest/queue/PostMessageDupsOk.java | 4 +- .../activemq/rest/queue/QueueConsumer.java | 6 +- .../rest/queue/QueueDestinationsResource.java | 4 +- .../rest/queue/push/PushConsumer.java | 4 +- .../push/PushConsumerMessageHandler.java | 8 +- .../AcknowledgedSubscriptionResource.java | 4 +- .../activemq/rest/topic/PushSubscription.java | 6 +- .../rest/topic/PushSubscriptionsResource.java | 8 +- .../rest/topic/SubscriptionResource.java | 4 +- .../rest/topic/SubscriptionsResource.java | 18 +- .../rest/topic/TopicDestinationsResource.java | 4 +- .../core/config/ConfigurationUtils.java | 8 +- .../core/deployers/impl/XmlDeployer.java | 6 +- .../activemq/core/filter/impl/FilterImpl.java | 10 +- .../management/impl/QueueControlImpl.java | 8 +- .../activemq/core/paging/impl/Page.java | 10 +- .../core/paging/impl/PageSyncTimer.java | 4 +- .../paging/impl/PageTransactionInfoImpl.java | 6 +- .../core/paging/impl/PagedMessageImpl.java | 10 +- .../config/PersistedAddressSetting.java | 6 +- .../persistence/config/PersistedRoles.java | 6 +- .../impl/journal/BatchingIDGenerator.java | 8 +- .../impl/journal/DescribeJournal.java | 8 +- .../impl/journal/JournalStorageManager.java | 104 +++--- .../impl/journal/LargeServerMessageImpl.java | 36 +-- .../journal/LargeServerMessageInSync.java | 4 +- .../impl/journal/OperationContextImpl.java | 8 +- .../nullpm/NullStorageLargeServerMessage.java | 4 +- .../core/postoffice/impl/PostOfficeImpl.java | 18 +- .../core/protocol/ServerPacketDecoder.java | 4 +- .../core/ServerSessionPacketHandler.java | 16 +- .../core/impl/CoreProtocolManager.java | 6 +- .../core/impl/HornetQPacketHandler.java | 18 +- .../wireformat/BackupRegistrationMessage.java | 6 +- .../BackupReplicationStartFailedMessage.java | 6 +- .../impl/wireformat/BackupRequestMessage.java | 6 +- .../wireformat/BackupResponseMessage.java | 6 +- .../wireformat/ClusterConnectMessage.java | 6 +- .../ClusterConnectReplyMessage.java | 6 +- .../impl/wireformat/NodeAnnounceMessage.java | 6 +- .../impl/wireformat/QuorumVoteMessage.java | 8 +- .../wireformat/QuorumVoteReplyMessage.java | 8 +- .../wireformat/ReplicationAddMessage.java | 6 +- .../wireformat/ReplicationAddTXMessage.java | 6 +- .../wireformat/ReplicationCommitMessage.java | 6 +- .../wireformat/ReplicationDeleteMessage.java | 6 +- .../ReplicationDeleteTXMessage.java | 6 +- .../ReplicationLargeMessageBeginMessage.java | 6 +- .../ReplicationLargeMessageEndMessage.java | 6 +- .../ReplicationLargeMessageWriteMessage.java | 6 +- .../ReplicationLiveIsStoppingMessage.java | 6 +- .../ReplicationPageEventMessage.java | 6 +- .../ReplicationPageWriteMessage.java | 6 +- .../wireformat/ReplicationPrepareMessage.java | 6 +- .../ReplicationStartSyncMessage.java | 6 +- .../ReplicationSyncFileMessage.java | 6 +- .../wireformat/ScaleDownAnnounceMessage.java | 6 +- .../core/remoting/impl/invm/InVMAcceptor.java | 4 +- .../remoting/impl/invm/InVMConnection.java | 20 +- .../remoting/impl/invm/InVMConnector.java | 4 +- .../remoting/impl/netty/NettyAcceptor.java | 4 +- .../impl/netty/NettyServerConnection.java | 4 +- .../server/impl/RemotingServiceImpl.java | 12 +- .../core/replication/ReplicationEndpoint.java | 10 +- .../core/replication/ReplicationManager.java | 27 +- .../core/server/HornetQMessageBundle.java | 122 +++---- .../core/server/HornetQServerLogger.java | 4 +- .../core/server/LargeServerMessage.java | 6 +- .../activemq/core/server/LiveNodeLocator.java | 8 +- .../activemq/core/server/NodeManager.java | 4 +- .../core/server/cluster/ClusterControl.java | 18 +- .../server/cluster/ClusterController.java | 4 +- .../core/server/cluster/ClusterManager.java | 10 +- .../server/cluster/ha/ScaleDownPolicy.java | 4 +- .../core/server/cluster/impl/BridgeImpl.java | 22 +- .../cluster/impl/BroadcastGroupImpl.java | 6 +- .../cluster/impl/ClusterConnectionBridge.java | 8 +- .../cluster/impl/ClusterConnectionImpl.java | 4 +- .../server/cluster/qourum/BooleanVote.java | 6 +- .../cluster/qourum/QuorumVoteHandler.java | 4 +- .../qourum/SharedNothingBackupQuorum.java | 12 +- .../core/server/cluster/qourum/Vote.java | 6 +- .../activemq/core/server/impl/Activation.java | 4 +- .../AnyLiveNodeLocatorForReplication.java | 6 +- .../impl/AnyLiveNodeLocatorForScaleDown.java | 8 +- .../core/server/impl/ColocatedActivation.java | 8 +- .../core/server/impl/FileLockNodeManager.java | 6 +- .../core/server/impl/InVMNodeManager.java | 4 +- .../core/server/impl/LiveOnlyActivation.java | 4 +- .../NamedLiveNodeLocatorForReplication.java | 6 +- .../NamedLiveNodeLocatorForScaleDown.java | 8 +- .../server/impl/NamedNodeIdNodeLocator.java | 6 +- .../core/server/impl/ReplicationError.java | 8 +- .../core/server/impl/ServerConsumerImpl.java | 14 +- .../core/server/impl/ServerSessionImpl.java | 22 +- .../impl/SharedNothingBackupActivation.java | 12 +- .../impl/SharedNothingLiveActivation.java | 26 +- .../impl/SharedStoreBackupActivation.java | 4 +- .../impl/TransientQueueManagerImpl.java | 4 +- .../core/settings/impl/AddressSettings.java | 6 +- .../core/transaction/Transaction.java | 4 +- .../transaction/impl/TransactionImpl.java | 6 +- .../spi/core/protocol/ProtocolManager.java | 6 +- .../activemq/core/filter/impl/FilterTest.java | 12 +- .../impl/ScheduledDeliveryHandlerTest.java | 70 ++-- .../util/CountDownSessionFailureListener.java | 8 +- .../activemq/tests/util/ServiceTestBase.java | 8 +- .../activemq/tests/util/UnitTestCase.java | 18 +- .../org/apache/activemq/tools/PrintPages.java | 6 +- .../activemq/tools/XmlDataExporter.java | 16 +- activemq6-native/bin/libHornetQAIO32.so | Bin 44803 -> 0 bytes activemq6-native/bin/libHornetQAIO64.so | Bin 51969 -> 0 bytes docs/user-manual/en/ha.xml | 12 +- .../en/intercepting-operations.xml | 6 +- docs/user-manual/zh/ha.xml | 12 +- .../zh/intercepting-operations.xml | 2 +- examples/jms/interceptor/readme.html | 4 +- .../jms/example/SimpleInterceptor.java | 4 +- .../aerogear/HornetQAeroGearBundle.java | 10 +- .../vertx/IncomingVertxEventHandler.java | 4 +- .../vertx/OutgoingVertxEventHandler.java | 4 +- pom.xml | 8 +- tests/byteman-tests/pom.xml | 4 +- .../byteman/tests/BMFailoverTest.java | 14 +- .../byteman/tests/ClusteredGroupingTest.java | 10 +- .../activemq/byteman/tests/GroupingTest.java | 4 +- .../byteman/tests/MessageCopyTest.java | 6 +- tests/concurrent-tests/pom.xml | 2 +- tests/integration-tests/pom.xml | 2 +- .../integration/DuplicateDetectionTest.java | 16 +- .../tests/integration/InterceptorTest.java | 32 +- .../integration/client/AcknowledgeTest.java | 74 ++--- .../integration/client/AutogroupIdTest.java | 4 +- .../client/CommitRollbackTest.java | 10 +- .../integration/client/ConsumerCloseTest.java | 16 +- .../integration/client/ConsumerTest.java | 12 +- .../integration/client/CoreClientTest.java | 4 +- .../client/CreateQueueIdempotentTest.java | 12 +- .../client/DeadLetterAddressTest.java | 4 +- .../integration/client/DeliveryOrderTest.java | 4 +- .../client/FailureDeadlockTest.java | 6 +- .../integration/client/HangConsumerTest.java | 10 +- .../integration/client/HornetQCrashTest.java | 4 +- .../client/IncompatibleVersionTest.java | 8 +- .../client/InterruptedLargeMessageTest.java | 6 +- .../integration/client/LargeMessageTest.java | 4 +- .../client/MessageDurabilityTest.java | 18 +- .../MessageGroupingConnectionFactoryTest.java | 4 +- .../client/MessageGroupingTest.java | 4 +- .../client/MultipleThreadFilterOneTest.java | 6 +- .../client/NewDeadLetterAddressTest.java | 4 +- .../integration/client/PagingOrderTest.java | 12 +- .../integration/client/PagingSyncTest.java | 4 +- .../tests/integration/client/PagingTest.java | 68 ++-- .../integration/client/ProducerCloseTest.java | 8 +- .../client/ProducerFlowControlTest.java | 4 +- .../integration/client/ProducerTest.java | 4 +- .../tests/integration/client/ReceiveTest.java | 14 +- .../client/RedeliveryConsumerTest.java | 4 +- .../integration/client/RequestorTest.java | 10 +- .../client/SelfExpandingBufferTest.java | 4 +- .../client/ServerLocatorConnectTest.java | 10 +- .../integration/client/SessionCloseTest.java | 44 +-- ...ClosedOnRemotingConnectionFailureTest.java | 16 +- .../SessionCreateAndDeleteQueueTest.java | 8 +- .../client/SessionCreateConsumerTest.java | 14 +- .../client/SessionCreateProducerTest.java | 8 +- .../tests/integration/client/SessionTest.java | 12 +- .../integration/client/SlowConsumerTest.java | 18 +- .../client/TemporaryQueueTest.java | 28 +- .../client/TransientQueueTest.java | 10 +- .../client/WildCardRoutingTest.java | 4 +- .../clientcrash/DummyInterceptor.java | 8 +- .../clientcrash/DummyInterceptorB.java | 4 +- .../cluster/ClusterControllerTest.java | 4 +- .../cluster/bridge/BridgeReconnectTest.java | 16 +- .../cluster/bridge/BridgeTest.java | 10 +- .../cluster/bridge/SimpleTransformer.java | 4 +- .../cluster/distribution/ClusterTestBase.java | 6 +- .../distribution/ClusteredGroupingTest.java | 6 +- .../failover/AsynchronousFailoverTest.java | 40 +-- .../failover/BackupAuthenticationTest.java | 4 +- .../failover/BackupSyncJournalTest.java | 8 +- .../failover/BackupSyncLargeMessageTest.java | 8 +- .../cluster/failover/DelayInterceptor.java | 4 +- .../cluster/failover/DelayInterceptor2.java | 4 +- .../cluster/failover/DelayInterceptor3.java | 4 +- .../failover/FailoverOnFlowControlTest.java | 4 +- .../cluster/failover/FailoverTest.java | 78 ++--- .../cluster/failover/FailoverTestBase.java | 4 +- .../NettyAsynchronousReattachTest.java | 4 +- .../failover/ReplicatedDistributionTest.java | 4 +- .../remote/FailoverWithSharedStoreTest.java | 8 +- .../MultiThreadRandomReattachTestBase.java | 4 +- .../MultiThreadReattachSupportTestBase.java | 4 +- .../cluster/reattach/OrderReattachTest.java | 4 +- .../cluster/reattach/RandomReattachTest.java | 10 +- .../cluster/reattach/ReattachTest.java | 48 +-- .../topology/TopologyClusterTestBase.java | 16 +- .../cluster/util/BackupSyncDelay.java | 6 +- .../integration/discovery/DiscoveryTest.java | 4 +- .../jms/bridge/ClusteredBridgeTestBase.java | 6 +- .../jms/bridge/JMSBridgeClusteredTest.java | 12 +- .../integration/jms/client/GroupingTest.java | 4 +- ...ClosedOnRemotingConnectionFailureTest.java | 8 +- .../jms/cluster/BindingsClusterTest.java | 10 +- .../jms/cluster/JMSFailoverTest.java | 4 +- .../jms/cluster/JMSReconnectTest.java | 6 +- .../CloseDestroyedConnectionTest.java | 14 +- .../jms/connection/ExceptionListenerTest.java | 12 +- .../management/JMSServerControlTest.java | 8 +- .../jms/server/management/JMSUtil.java | 8 +- .../journal/JournalPerfTuneTest.java | 6 +- .../largemessage/LargeMessageTestBase.java | 20 +- .../management/AcceptorControlTest.java | 6 +- .../ManagementWithPagingServerTest.java | 4 +- .../management/NotificationTest.java | 4 +- .../management/QueueControlTest.java | 4 +- .../management/SecurityNotificationTest.java | 4 +- .../persistence/DeleteQueueRestartTest.java | 4 +- ...ectionFactoryConfigurationStorageTest.java | 8 +- ...sportConfigurationEncodingSupportTest.java | 8 +- .../ra/HornetQMessageHandlerTest.java | 8 +- .../tests/integration/remoting/PingTest.java | 22 +- .../integration/remoting/ReconnectTest.java | 22 +- .../replication/ReplicationTest.java | 24 +- .../integration/security/SecurityTest.java | 96 +++--- .../server/AddressFullLoggingTest.java | 4 +- .../integration/server/ExpiryRunnerTest.java | 4 +- .../integration/server/LVQRecoveryTest.java | 6 +- .../tests/integration/server/LVQTest.java | 8 +- .../server/PredefinedQueueTest.java | 16 +- .../ssl/CoreClientOverOneWaySSLTest.java | 46 +-- .../ssl/CoreClientOverTwoWaySSLTest.java | 10 +- .../NettyConnectorWithHTTPUpgradeTest.java | 10 +- .../vertx/HornetQVertxUnitTest.java | 4 +- .../integration/xa/BasicXaRecoveryTest.java | 4 +- .../tests/integration/xa/BasicXaTest.java | 8 +- .../tests/integration/xa/XaTimeoutTest.java | 6 +- .../largemessage/LargeMessageTestBase.java | 20 +- tests/jms-tests/pom.xml | 2 +- .../jms/tests/message/MessageHeaderTest.java | 110 +++---- tests/joram-tests/pom.xml | 2 +- tests/performance-tests/pom.xml | 2 +- .../paging/MeasurePagingMultiThreadTest.java | 14 +- tests/pom.xml | 2 +- tests/soak-tests/pom.xml | 2 +- tests/stress-tests/pom.xml | 2 +- .../journal/JournalRestartStressTest.java | 2 +- .../NIOMultiThreadCompactorStressTest.java | 12 +- .../stress/paging/PageCursorStressTest.java | 14 +- .../tests/stress/paging/PageStressTest.java | 4 +- .../tests/stress/remote/PingStressTest.java | 4 +- tests/timing-tests/pom.xml | 2 +- .../activemq/tests/timing/util/UTF8Test.java | 8 +- .../tests/unit/core/asyncio/AIOTestBase.java | 4 +- .../core/asyncio/AsynchronousFileTest.java | 10 +- .../MultiThreadAsynchronousFileTest.java | 6 +- .../client/impl/LargeMessageBufferTest.java | 46 +-- .../journal/impl/JournalImplTestUnit.java | 8 +- .../impl/SequentialFileFactoryTestBase.java | 14 +- .../core/journal/impl/TimedBufferTest.java | 14 +- .../impl/fakes/FakeSequentialFileFactory.java | 18 +- .../journal/impl/fakes/SimpleEncoding.java | 6 +- .../core/message/impl/MessageImplTest.java | 6 +- .../tests/unit/core/paging/impl/PageTest.java | 10 +- .../core/paging/impl/PagingStoreImplTest.java | 26 +- .../impl/BatchIDGeneratorUnitTest.java | 6 +- .../impl/OperationContextUnitTest.java | 4 +- .../postoffice/impl/BindingsImplTest.java | 4 +- .../core/remoting/HornetQBufferTestBase.java | 6 +- .../impl/netty/ChannelBufferWrapper2Test.java | 8 +- .../impl/netty/NettyAcceptorFactoryTest.java | 8 +- .../impl/netty/NettyAcceptorTest.java | 8 +- .../impl/netty/NettyConnectionTest.java | 12 +- .../impl/netty/NettyConnectorTest.java | 28 +- .../server/impl/fake/FakeInterceptor.java | 4 +- .../jms/client/JMSExceptionHelperTest.java | 30 +- .../util/HornetQBufferInputStreamTest.java | 6 +- .../activemq/tests/unit/util/UTF8Test.java | 20 +- 537 files changed, 3736 insertions(+), 3742 deletions(-) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQAddressExistsException.java => ActiveMQAddressExistsException.java} (79%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQAddressFullException.java => ActiveMQAddressFullException.java} (77%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQAlreadyReplicatingException.java => ActiveMQAlreadyReplicatingException.java} (78%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQBuffer.java => ActiveMQBuffer.java} (95%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQBuffers.java => ActiveMQBuffers.java} (80%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQClusterSecurityException.java => ActiveMQClusterSecurityException.java} (72%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQConnectionTimedOutException.java => ActiveMQConnectionTimedOutException.java} (78%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQDisconnectedException.java => ActiveMQDisconnectedException.java} (79%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQDuplicateIdException.java => ActiveMQDuplicateIdException.java} (78%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQDuplicateMetaDataException.java => ActiveMQDuplicateMetaDataException.java} (77%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQException.java => ActiveMQException.java} (65%) create mode 100644 activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQExceptionType.java rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQIOErrorException.java => ActiveMQIOErrorException.java} (77%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQIllegalStateException.java => ActiveMQIllegalStateException.java} (80%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQIncompatibleClientServerException.java => ActiveMQIncompatibleClientServerException.java} (77%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQInterceptorRejectedPacketException.java => ActiveMQInterceptorRejectedPacketException.java} (78%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQInternalErrorException.java => ActiveMQInternalErrorException.java} (73%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQInterruptedException.java => ActiveMQInterruptedException.java} (87%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQInvalidFilterExpressionException.java => ActiveMQInvalidFilterExpressionException.java} (76%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQInvalidTransientQueueUseException.java => ActiveMQInvalidTransientQueueUseException.java} (76%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQLargeMessageException.java => ActiveMQLargeMessageException.java} (79%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQLargeMessageInterruptedException.java => ActiveMQLargeMessageInterruptedException.java} (74%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQNativeIOError.java => ActiveMQNativeIOError.java} (76%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQNonExistentQueueException.java => ActiveMQNonExistentQueueException.java} (78%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQNotConnectedException.java => ActiveMQNotConnectedException.java} (79%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQObjectClosedException.java => ActiveMQObjectClosedException.java} (80%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQPropertyConversionException.java => ActiveMQPropertyConversionException.java} (87%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQQueueExistsException.java => ActiveMQQueueExistsException.java} (79%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQSecurityException.java => ActiveMQSecurityException.java} (80%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQSessionCreationException.java => ActiveMQSessionCreationException.java} (79%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQTransactionOutcomeUnknownException.java => ActiveMQTransactionOutcomeUnknownException.java} (76%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQTransactionRolledBackException.java => ActiveMQTransactionRolledBackException.java} (76%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQUnBlockedException.java => ActiveMQUnBlockedException.java} (80%) rename activemq-commons/src/main/java/org/apache/activemq/api/core/{HornetQUnsupportedPacketException.java => ActiveMQUnsupportedPacketException.java} (78%) delete mode 100644 activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQExceptionType.java create mode 100755 activemq-native/bin/libactivemqAIO64.so delete mode 100755 activemq6-native/bin/libHornetQAIO32.so delete mode 100755 activemq6-native/bin/libHornetQAIO64.so diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQAddressExistsException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAddressExistsException.java similarity index 79% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQAddressExistsException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAddressExistsException.java index bbf3da7e6a..6b5742250d 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQAddressExistsException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAddressExistsException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.ADDRESS_EXISTS; +import static org.apache.activemq.api.core.ActiveMQExceptionType.ADDRESS_EXISTS; /** * An operation failed because an address exists on the server. * @author Andy Taylor 5/2/12 */ -public final class HornetQAddressExistsException extends HornetQException +public final class ActiveMQAddressExistsException extends ActiveMQException { private static final long serialVersionUID = 3032730450033992367L; - public HornetQAddressExistsException() + public ActiveMQAddressExistsException() { super(ADDRESS_EXISTS); } - public HornetQAddressExistsException(String msg) + public ActiveMQAddressExistsException(String msg) { super(ADDRESS_EXISTS, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQAddressFullException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAddressFullException.java similarity index 77% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQAddressFullException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAddressFullException.java index 704554121b..18beeceaac 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQAddressFullException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAddressFullException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.ADDRESS_FULL; +import static org.apache.activemq.api.core.ActiveMQExceptionType.ADDRESS_FULL; /** * An address is full. * @author Justin Bertram */ -public final class HornetQAddressFullException extends HornetQException +public final class ActiveMQAddressFullException extends ActiveMQException { private static final long serialVersionUID = 0; - public HornetQAddressFullException(String message) + public ActiveMQAddressFullException(String message) { super(ADDRESS_FULL, message); } - public HornetQAddressFullException() + public ActiveMQAddressFullException() { super(ADDRESS_FULL); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQAlreadyReplicatingException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAlreadyReplicatingException.java similarity index 78% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQAlreadyReplicatingException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAlreadyReplicatingException.java index 2d0731f8bd..81af8d37a3 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQAlreadyReplicatingException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAlreadyReplicatingException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.ALREADY_REPLICATING; +import static org.apache.activemq.api.core.ActiveMQExceptionType.ALREADY_REPLICATING; /** * The server is already paired with a replicating backup. * @author Andy Taylor 5/2/12 */ -public final class HornetQAlreadyReplicatingException extends HornetQException +public final class ActiveMQAlreadyReplicatingException extends ActiveMQException { private static final long serialVersionUID = -7352538521961996152L; - public HornetQAlreadyReplicatingException() + public ActiveMQAlreadyReplicatingException() { super(ALREADY_REPLICATING); } - public HornetQAlreadyReplicatingException(String msg) + public ActiveMQAlreadyReplicatingException(String msg) { super(ALREADY_REPLICATING, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQBuffer.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffer.java similarity index 95% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQBuffer.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffer.java index 82cc0fa83b..b6065cfd29 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQBuffer.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffer.java @@ -20,13 +20,13 @@ import io.netty.buffer.ByteBuf; /** * A HornetQBuffer wraps a Netty's ChannelBuffer and is used throughout HornetQ code base. *

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

* Much of it derived from Netty ChannelBuffer by Trustin Lee * @author Tim Fox - * @see HornetQBuffers + * @see ActiveMQBuffers */ -public interface HornetQBuffer +public interface ActiveMQBuffer { /** * Returns the underlying Netty's ByteBuf @@ -287,10 +287,10 @@ public interface HornetQBuffer * Transfers this buffer's data to the specified destination starting at * the specified absolute {@code index} until the destination becomes * non-writable. This method is basically same with - * {@link #getBytes(int, HornetQBuffer, int, int)}, except that this + * {@link #getBytes(int, ActiveMQBuffer, int, int)}, except that this * method increases the {@code writerIndex} of the destination by the * number of the transferred bytes while - * {@link #getBytes(int, HornetQBuffer, int, int)} does not. + * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not. * This method does not modify {@code readerIndex} or {@code writerIndex} of * the source buffer (i.e. {@code this}). * @@ -299,15 +299,15 @@ public interface HornetQBuffer * if {@code index + dst.writableBytes} is greater than * {@code this.capacity} */ - void getBytes(int index, HornetQBuffer dst); + void getBytes(int index, ActiveMQBuffer dst); /** * Transfers this buffer's data to the specified destination starting at * the specified absolute {@code index}. This method is basically same - * with {@link #getBytes(int, HornetQBuffer, int, int)}, except that this + * with {@link #getBytes(int, ActiveMQBuffer, int, int)}, except that this * method increases the {@code writerIndex} of the destination by the * number of the transferred bytes while - * {@link #getBytes(int, HornetQBuffer, int, int)} does not. + * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not. * This method does not modify {@code readerIndex} or {@code writerIndex} of * the source buffer (i.e. {@code this}). * @@ -319,7 +319,7 @@ public interface HornetQBuffer * {@code this.capacity}, or * if {@code length} is greater than {@code dst.writableBytes} */ - void getBytes(int index, HornetQBuffer dst, int length); + void getBytes(int index, ActiveMQBuffer dst, int length); /** * Transfers this buffer's data to the specified destination starting at @@ -338,7 +338,7 @@ public interface HornetQBuffer * if {@code dstIndex + length} is greater than * {@code dst.capacity} */ - void getBytes(int index, HornetQBuffer dst, int dstIndex, int length); + void getBytes(int index, ActiveMQBuffer dst, int dstIndex, int length); /** * Transfers this buffer's data to the specified destination starting at @@ -471,10 +471,10 @@ public interface HornetQBuffer * Transfers the specified source buffer's data to this buffer starting at * the specified absolute {@code index} until the destination becomes * unreadable. This method is basically same with - * {@link #setBytes(int, HornetQBuffer, int, int)}, except that this + * {@link #setBytes(int, ActiveMQBuffer, int, int)}, except that this * method increases the {@code readerIndex} of the source buffer by * the number of the transferred bytes while - * {@link #getBytes(int, HornetQBuffer, int, int)} does not. + * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not. * This method does not modify {@code readerIndex} or {@code writerIndex} of * the source buffer (i.e. {@code this}). * @@ -483,15 +483,15 @@ public interface HornetQBuffer * if {@code index + src.readableBytes} is greater than * {@code this.capacity} */ - void setBytes(int index, HornetQBuffer src); + void setBytes(int index, ActiveMQBuffer src); /** * Transfers the specified source buffer's data to this buffer starting at * the specified absolute {@code index}. This method is basically same - * with {@link #setBytes(int, HornetQBuffer, int, int)}, except that this + * with {@link #setBytes(int, ActiveMQBuffer, int, int)}, except that this * method increases the {@code readerIndex} of the source buffer by * the number of the transferred bytes while - * {@link #getBytes(int, HornetQBuffer, int, int)} does not. + * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not. * This method does not modify {@code readerIndex} or {@code writerIndex} of * the source buffer (i.e. {@code this}). * @@ -503,7 +503,7 @@ public interface HornetQBuffer * {@code this.capacity}, or * if {@code length} is greater than {@code src.readableBytes} */ - void setBytes(int index, HornetQBuffer src, int length); + void setBytes(int index, ActiveMQBuffer src, int length); /** * Transfers the specified source buffer's data to this buffer starting at @@ -522,7 +522,7 @@ public interface HornetQBuffer * if {@code srcIndex + length} is greater than * {@code src.capacity} */ - void setBytes(int index, HornetQBuffer src, int srcIndex, int length); + void setBytes(int index, ActiveMQBuffer src, int srcIndex, int length); /** * Transfers the specified source array's data to this buffer starting at @@ -740,7 +740,7 @@ public interface HornetQBuffer * @throws IndexOutOfBoundsException * if {@code length} is greater than {@code this.readableBytes} */ - HornetQBuffer readBytes(int length); + ActiveMQBuffer readBytes(int length); /** * Returns a new slice of this buffer's sub-region starting at the current @@ -754,38 +754,38 @@ public interface HornetQBuffer * @throws IndexOutOfBoundsException * if {@code length} is greater than {@code this.readableBytes} */ - HornetQBuffer readSlice(int length); + ActiveMQBuffer readSlice(int length); /** * Transfers this buffer's data to the specified destination starting at * the current {@code readerIndex} until the destination becomes * non-writable, and increases the {@code readerIndex} by the number of the * transferred bytes. This method is basically same with - * {@link #readBytes(HornetQBuffer, int, int)}, except that this method + * {@link #readBytes(ActiveMQBuffer, int, int)}, except that this method * increases the {@code writerIndex} of the destination by the number of - * the transferred bytes while {@link #readBytes(HornetQBuffer, int, int)} + * the transferred bytes while {@link #readBytes(ActiveMQBuffer, int, int)} * does not. * * @throws IndexOutOfBoundsException * if {@code dst.writableBytes} is greater than * {@code this.readableBytes} */ - void readBytes(HornetQBuffer dst); + void readBytes(ActiveMQBuffer dst); /** * Transfers this buffer's data to the specified destination starting at * the current {@code readerIndex} and increases the {@code readerIndex} * by the number of the transferred bytes (= {@code length}). This method - * is basically same with {@link #readBytes(HornetQBuffer, int, int)}, + * is basically same with {@link #readBytes(ActiveMQBuffer, int, int)}, * except that this method increases the {@code writerIndex} of the * destination by the number of the transferred bytes (= {@code length}) - * while {@link #readBytes(HornetQBuffer, int, int)} does not. + * while {@link #readBytes(ActiveMQBuffer, int, int)} does not. * * @throws IndexOutOfBoundsException * if {@code length} is greater than {@code this.readableBytes} or * if {@code length} is greater than {@code dst.writableBytes} */ - void readBytes(HornetQBuffer dst, int length); + void readBytes(ActiveMQBuffer dst, int length); /** * Transfers this buffer's data to the specified destination starting at @@ -801,7 +801,7 @@ public interface HornetQBuffer * if {@code dstIndex + length} is greater than * {@code dst.capacity} */ - void readBytes(HornetQBuffer dst, int dstIndex, int length); + void readBytes(ActiveMQBuffer dst, int dstIndex, int length); /** * Transfers this buffer's data to the specified destination starting at @@ -949,10 +949,10 @@ public interface HornetQBuffer * Transfers the specified source buffer's data to this buffer starting at * the current {@code writerIndex} and increases the {@code writerIndex} * by the number of the transferred bytes (= {@code length}). This method - * is basically same with {@link #writeBytes(HornetQBuffer, int, int)}, + * is basically same with {@link #writeBytes(ActiveMQBuffer, int, int)}, * except that this method increases the {@code readerIndex} of the source * buffer by the number of the transferred bytes (= {@code length}) while - * {@link #writeBytes(HornetQBuffer, int, int)} does not. + * {@link #writeBytes(ActiveMQBuffer, int, int)} does not. * * @param length the number of bytes to transfer * @@ -960,7 +960,7 @@ public interface HornetQBuffer * if {@code length} is greater than {@code this.writableBytes} or * if {@code length} is greater then {@code src.readableBytes} */ - void writeBytes(HornetQBuffer src, int length); + void writeBytes(ActiveMQBuffer src, int length); /** * Transfers the specified source buffer's data to this buffer starting at @@ -976,7 +976,7 @@ public interface HornetQBuffer * {@code src.capacity}, or * if {@code length} is greater than {@code this.writableBytes} */ - void writeBytes(HornetQBuffer src, int srcIndex, int length); + void writeBytes(ActiveMQBuffer src, int srcIndex, int length); /** * Transfers the specified source array's data to this buffer starting at @@ -1024,7 +1024,7 @@ public interface HornetQBuffer * this buffer. * */ - HornetQBuffer copy(); + ActiveMQBuffer copy(); /** * Returns a copy of this buffer's sub-region. Modifying the content of @@ -1032,7 +1032,7 @@ public interface HornetQBuffer * This method does not modify {@code readerIndex} or {@code writerIndex} of * this buffer. */ - HornetQBuffer copy(int index, int length); + ActiveMQBuffer copy(int index, int length); /** * Returns a slice of this buffer's readable bytes. Modifying the content @@ -1042,7 +1042,7 @@ public interface HornetQBuffer * This method does not modify {@code readerIndex} or {@code writerIndex} of * this buffer. */ - HornetQBuffer slice(); + ActiveMQBuffer slice(); /** * Returns a slice of this buffer's sub-region. Modifying the content of @@ -1051,7 +1051,7 @@ public interface HornetQBuffer * This method does not modify {@code readerIndex} or {@code writerIndex} of * this buffer. */ - HornetQBuffer slice(int index, int length); + ActiveMQBuffer slice(int index, int length); /** * Returns a buffer which shares the whole region of this buffer. @@ -1061,7 +1061,7 @@ public interface HornetQBuffer * This method does not modify {@code readerIndex} or {@code writerIndex} of * this buffer. */ - HornetQBuffer duplicate(); + ActiveMQBuffer duplicate(); /** * Converts this buffer's readable bytes into a NIO buffer. The returned diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQBuffers.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffers.java similarity index 80% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQBuffers.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffers.java index 10af850a61..482e801dfe 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQBuffers.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffers.java @@ -19,10 +19,10 @@ import io.netty.buffer.Unpooled; import org.apache.activemq.core.buffers.impl.ChannelBufferWrapper; /** - * Factory class to create instances of {@link HornetQBuffer}. + * Factory class to create instances of {@link ActiveMQBuffer}. * @author Tim Fox */ -public final class HornetQBuffers +public final class ActiveMQBuffers { /** * Creates a self-expanding HornetQBuffer with the given initial size @@ -30,7 +30,7 @@ public final class HornetQBuffers * @param size the initial size of the created HornetQBuffer * @return a self-expanding HornetQBuffer starting with the given size */ - public static HornetQBuffer dynamicBuffer(final int size) + public static ActiveMQBuffer dynamicBuffer(final int size) { return new ChannelBufferWrapper(Unpooled.buffer(size)); } @@ -41,9 +41,9 @@ public final class HornetQBuffers * @param bytes the created buffer will be initially filled with this byte array * @return a self-expanding HornetQBuffer filled with the given byte array */ - public static HornetQBuffer dynamicBuffer(final byte[] bytes) + public static ActiveMQBuffer dynamicBuffer(final byte[] bytes) { - HornetQBuffer buff = dynamicBuffer(bytes.length); + ActiveMQBuffer buff = dynamicBuffer(bytes.length); buff.writeBytes(bytes); @@ -58,9 +58,9 @@ public final class HornetQBuffers * @param underlying the underlying NIO ByteBuffer * @return a HornetQBuffer wrapping the underlying NIO ByteBuffer */ - public static HornetQBuffer wrappedBuffer(final ByteBuffer underlying) + public static ActiveMQBuffer wrappedBuffer(final ByteBuffer underlying) { - HornetQBuffer buff = new ChannelBufferWrapper(Unpooled.wrappedBuffer(underlying)); + ActiveMQBuffer buff = new ChannelBufferWrapper(Unpooled.wrappedBuffer(underlying)); buff.clear(); @@ -73,7 +73,7 @@ public final class HornetQBuffers * @param underlying the underlying byte array * @return a HornetQBuffer wrapping the underlying byte array */ - public static HornetQBuffer wrappedBuffer(final byte[] underlying) + public static ActiveMQBuffer wrappedBuffer(final byte[] underlying) { return new ChannelBufferWrapper(Unpooled.wrappedBuffer(underlying)); } @@ -84,12 +84,12 @@ public final class HornetQBuffers * @param size the size of the created HornetQBuffer * @return a fixed HornetQBuffer with the given size */ - public static HornetQBuffer fixedBuffer(final int size) + public static ActiveMQBuffer fixedBuffer(final int size) { return new ChannelBufferWrapper(Unpooled.buffer(size, size)); } - private HornetQBuffers() + private ActiveMQBuffers() { // Utility class } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQClusterSecurityException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQClusterSecurityException.java similarity index 72% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQClusterSecurityException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQClusterSecurityException.java index a4730a902d..01a30a0062 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQClusterSecurityException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQClusterSecurityException.java @@ -16,17 +16,17 @@ package org.apache.activemq.api.core; /** * Security exception thrown when the cluster user fails authentication. */ -public final class HornetQClusterSecurityException extends HornetQException +public final class ActiveMQClusterSecurityException extends ActiveMQException { private static final long serialVersionUID = -5890578849781297933L; - public HornetQClusterSecurityException() + public ActiveMQClusterSecurityException() { - super(HornetQExceptionType.CLUSTER_SECURITY_EXCEPTION); + super(ActiveMQExceptionType.CLUSTER_SECURITY_EXCEPTION); } - public HornetQClusterSecurityException(final String msg) + public ActiveMQClusterSecurityException(final String msg) { - super(HornetQExceptionType.CLUSTER_SECURITY_EXCEPTION, msg); + super(ActiveMQExceptionType.CLUSTER_SECURITY_EXCEPTION, msg); } } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQConnectionTimedOutException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQConnectionTimedOutException.java similarity index 78% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQConnectionTimedOutException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQConnectionTimedOutException.java index c2b0cd0291..88c39c3763 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQConnectionTimedOutException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQConnectionTimedOutException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.CONNECTION_TIMEDOUT; +import static org.apache.activemq.api.core.ActiveMQExceptionType.CONNECTION_TIMEDOUT; /** * A client timed out will connecting to HornetQ server. * @author Andy Taylor 4/30/12 */ -public final class HornetQConnectionTimedOutException extends HornetQException +public final class ActiveMQConnectionTimedOutException extends ActiveMQException { private static final long serialVersionUID = 3244233758084830372L; - public HornetQConnectionTimedOutException() + public ActiveMQConnectionTimedOutException() { super(CONNECTION_TIMEDOUT); } - public HornetQConnectionTimedOutException(String msg) + public ActiveMQConnectionTimedOutException(String msg) { super(CONNECTION_TIMEDOUT, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQDisconnectedException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQDisconnectedException.java similarity index 79% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQDisconnectedException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQDisconnectedException.java index 3c8668abab..038472ce7b 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQDisconnectedException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQDisconnectedException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.DISCONNECTED; +import static org.apache.activemq.api.core.ActiveMQExceptionType.DISCONNECTED; /** * A client was disconnected from HornetQ server when the server has shut down. * @author Andy Taylor 4/30/12 */ -public final class HornetQDisconnectedException extends HornetQException +public final class ActiveMQDisconnectedException extends ActiveMQException { private static final long serialVersionUID = 7414966383933311627L; - public HornetQDisconnectedException() + public ActiveMQDisconnectedException() { super(DISCONNECTED); } - public HornetQDisconnectedException(String message) + public ActiveMQDisconnectedException(String message) { super(DISCONNECTED, message); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQDuplicateIdException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQDuplicateIdException.java similarity index 78% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQDuplicateIdException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQDuplicateIdException.java index 069231918f..93731da666 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQDuplicateIdException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQDuplicateIdException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.DUPLICATE_ID_REJECTED; +import static org.apache.activemq.api.core.ActiveMQExceptionType.DUPLICATE_ID_REJECTED; /** * A DuplicateID was rejected. * @author Andy Taylor 5/2/12 */ -public final class HornetQDuplicateIdException extends HornetQException +public final class ActiveMQDuplicateIdException extends ActiveMQException { private static final long serialVersionUID = -4302979339865777119L; - public HornetQDuplicateIdException() + public ActiveMQDuplicateIdException() { super(DUPLICATE_ID_REJECTED); } - public HornetQDuplicateIdException(String message) + public ActiveMQDuplicateIdException(String message) { super(DUPLICATE_ID_REJECTED, message); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQDuplicateMetaDataException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQDuplicateMetaDataException.java similarity index 77% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQDuplicateMetaDataException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQDuplicateMetaDataException.java index 7d7be3022d..17fec0a58a 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQDuplicateMetaDataException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQDuplicateMetaDataException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.DUPLICATE_METADATA; +import static org.apache.activemq.api.core.ActiveMQExceptionType.DUPLICATE_METADATA; /** * A Session Metadata was set in duplication * @author Andy Taylor 5/2/12 */ -public final class HornetQDuplicateMetaDataException extends HornetQException +public final class ActiveMQDuplicateMetaDataException extends ActiveMQException { private static final long serialVersionUID = 7877182872143004058L; - public HornetQDuplicateMetaDataException() + public ActiveMQDuplicateMetaDataException() { super(DUPLICATE_METADATA); } - public HornetQDuplicateMetaDataException(String msg) + public ActiveMQDuplicateMetaDataException(String msg) { super(DUPLICATE_METADATA, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQException.java similarity index 65% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQException.java index 6a738defb8..6165617a09 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQException.java @@ -13,56 +13,56 @@ package org.apache.activemq.api.core; /** - * HornetQException is the root exception for the HornetQ API. + * ActiveMQException is the root exception for the ActiveMQ API. * @author Tim Fox * @author Andy Taylor */ -public class HornetQException extends Exception +public class ActiveMQException extends Exception { private static final long serialVersionUID = -4802014152804997417L; - private final HornetQExceptionType type; + private final ActiveMQExceptionType type; - public HornetQException() + public ActiveMQException() { - type = HornetQExceptionType.GENERIC_EXCEPTION; + type = ActiveMQExceptionType.GENERIC_EXCEPTION; } - public HornetQException(final String msg) + public ActiveMQException(final String msg) { super(msg); - type = HornetQExceptionType.GENERIC_EXCEPTION; + type = ActiveMQExceptionType.GENERIC_EXCEPTION; } /* * This constructor is needed only for the native layer */ - public HornetQException(int code, String msg) + public ActiveMQException(int code, String msg) { super(msg); - this.type = HornetQExceptionType.getType(code); + this.type = ActiveMQExceptionType.getType(code); } - public HornetQException(HornetQExceptionType type, String msg) + public ActiveMQException(ActiveMQExceptionType type, String msg) { super(msg); this.type = type; } - public HornetQException(HornetQExceptionType type) + public ActiveMQException(ActiveMQExceptionType type) { this.type = type; } - public HornetQException(HornetQExceptionType type, String message, Throwable t) + public ActiveMQException(ActiveMQExceptionType type, String message, Throwable t) { super(message, t); this.type = type; } - public HornetQExceptionType getType() + public ActiveMQExceptionType getType() { return type; } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQExceptionType.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQExceptionType.java new file mode 100644 index 0000000000..5e459ec90f --- /dev/null +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQExceptionType.java @@ -0,0 +1,298 @@ +/* + * Copyright 2005-2014 Red Hat, Inc. + * Red Hat licenses this file to you under the Apache License, version + * 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package org.apache.activemq.api.core; + +import java.util.Collections; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.Map; + +/** + * Defines all {@link ActiveMQException} types and their codes. + */ +public enum ActiveMQExceptionType +{ + + // Error codes ------------------------------------------------- + + INTERNAL_ERROR(000) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQInternalErrorException(msg); + } + }, + UNSUPPORTED_PACKET(001) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQUnsupportedPacketException(msg); + } + }, + NOT_CONNECTED(002) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQNotConnectedException(msg); + } + }, + CONNECTION_TIMEDOUT(003) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQConnectionTimedOutException(msg); + } + }, + DISCONNECTED(004) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQDisconnectedException(msg); + } + }, + UNBLOCKED(005) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQUnBlockedException(msg); + } + }, + IO_ERROR(006) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQIOErrorException(msg); + } + }, + QUEUE_DOES_NOT_EXIST(100) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQNonExistentQueueException(msg); + } + }, + QUEUE_EXISTS(101) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQQueueExistsException(msg); + } + }, + OBJECT_CLOSED(102) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQObjectClosedException(msg); + } + }, + INVALID_FILTER_EXPRESSION(103) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQInvalidFilterExpressionException(msg); + } + }, + ILLEGAL_STATE(104) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQIllegalStateException(msg); + } + }, + SECURITY_EXCEPTION(105) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQSecurityException(msg); + } + }, + ADDRESS_EXISTS(107) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQAddressExistsException(msg); + } + }, + INCOMPATIBLE_CLIENT_SERVER_VERSIONS(108) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQIncompatibleClientServerException(msg); + } + }, + LARGE_MESSAGE_ERROR_BODY(110) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQLargeMessageException(msg); + } + }, + TRANSACTION_ROLLED_BACK(111) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQTransactionRolledBackException(msg); + } + }, + SESSION_CREATION_REJECTED(112) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQSessionCreationException(msg); + } + }, + DUPLICATE_ID_REJECTED(113) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQDuplicateIdException(msg); + } + }, + DUPLICATE_METADATA(114) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQDuplicateMetaDataException(msg); + } + }, + TRANSACTION_OUTCOME_UNKNOWN(115) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQTransactionOutcomeUnknownException(msg); + } + }, + ALREADY_REPLICATING(116) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQAlreadyReplicatingException(msg); + } + }, + INTERCEPTOR_REJECTED_PACKET(117) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQInterceptorRejectedPacketException(msg); + } + }, + INVALID_TRANSIENT_QUEUE_USE(118) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQInvalidTransientQueueUseException(msg); + } + }, + + GENERIC_EXCEPTION(999), + NATIVE_ERROR_INTERNAL(200), + NATIVE_ERROR_INVALID_BUFFER(201), + NATIVE_ERROR_NOT_ALIGNED(202), + NATIVE_ERROR_CANT_INITIALIZE_AIO(203), + NATIVE_ERROR_CANT_RELEASE_AIO(204), + NATIVE_ERROR_CANT_OPEN_CLOSE_FILE(205), + NATIVE_ERROR_CANT_ALLOCATE_QUEUE(206), + NATIVE_ERROR_PREALLOCATE_FILE(208), + NATIVE_ERROR_ALLOCATE_MEMORY(209), + ADDRESS_FULL(210) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQAddressFullException(msg); + } + }, + LARGE_MESSAGE_INTERRUPTED(211) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQLargeMessageInterruptedException(msg); + } + }, + CLUSTER_SECURITY_EXCEPTION(212) + { + @Override + public ActiveMQException createException(String msg) + { + return new ActiveMQClusterSecurityException(msg); + } + + }; + + private static final Map TYPE_MAP; + + static + { + HashMap map = new HashMap(); + for (ActiveMQExceptionType type : EnumSet.allOf(ActiveMQExceptionType.class)) + { + map.put(type.getCode(), type); + } + TYPE_MAP = Collections.unmodifiableMap(map); + } + + private final int code; + + ActiveMQExceptionType(int code) + { + this.code = code; + } + + public int getCode() + { + return code; + } + + public ActiveMQException createException(String msg) + { + return new ActiveMQException(msg + ", code:" + this); + } + + public static ActiveMQException createException(int code, String msg) + { + return getType(code).createException(msg); + } + + public static ActiveMQExceptionType getType(int code) + { + ActiveMQExceptionType type = TYPE_MAP.get(code); + if (type != null) + return type; + return ActiveMQExceptionType.GENERIC_EXCEPTION; + } +} \ No newline at end of file diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQIOErrorException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQIOErrorException.java similarity index 77% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQIOErrorException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQIOErrorException.java index 88a206fe46..032b39a376 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQIOErrorException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQIOErrorException.java @@ -13,27 +13,27 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.IO_ERROR; +import static org.apache.activemq.api.core.ActiveMQExceptionType.IO_ERROR; /** * Unexpected I/O error occurred on the server. * @author Andy Taylor 4/30/12 */ -public final class HornetQIOErrorException extends HornetQException +public final class ActiveMQIOErrorException extends ActiveMQException { private static final long serialVersionUID = 797277117077787396L; - public HornetQIOErrorException() + public ActiveMQIOErrorException() { super(IO_ERROR); } - public HornetQIOErrorException(String msg) + public ActiveMQIOErrorException(String msg) { super(IO_ERROR, msg); } - public HornetQIOErrorException(String msg, Throwable cause) + public ActiveMQIOErrorException(String msg, Throwable cause) { super(IO_ERROR, msg, cause); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQIllegalStateException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQIllegalStateException.java similarity index 80% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQIllegalStateException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQIllegalStateException.java index 07f5332e01..2dd437f8c8 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQIllegalStateException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQIllegalStateException.java @@ -13,23 +13,23 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.ILLEGAL_STATE; +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 * MessageHandler is set). * @author Andy Taylor 5/2/12 */ -public final class HornetQIllegalStateException extends HornetQException +public final class ActiveMQIllegalStateException extends ActiveMQException { private static final long serialVersionUID = -4480125401057788511L; - public HornetQIllegalStateException() + public ActiveMQIllegalStateException() { super(ILLEGAL_STATE); } - public HornetQIllegalStateException(String message) + public ActiveMQIllegalStateException(String message) { super(ILLEGAL_STATE, message); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQIncompatibleClientServerException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQIncompatibleClientServerException.java similarity index 77% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQIncompatibleClientServerException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQIncompatibleClientServerException.java index 42b864adde..a83c2bbaf6 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQIncompatibleClientServerException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQIncompatibleClientServerException.java @@ -13,7 +13,7 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS; +import static org.apache.activemq.api.core.ActiveMQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS; /** * The server version and the client version are incompatible. @@ -21,16 +21,16 @@ import static org.apache.activemq.api.core.HornetQExceptionType.INCOMPATIBLE_CLI * Normally this means you are trying to use a newer client on an older server. * @author Andy Taylor */ -public final class HornetQIncompatibleClientServerException extends HornetQException +public final class ActiveMQIncompatibleClientServerException extends ActiveMQException { private static final long serialVersionUID = -1662999230291452298L; - public HornetQIncompatibleClientServerException() + public ActiveMQIncompatibleClientServerException() { super(INCOMPATIBLE_CLIENT_SERVER_VERSIONS); } - public HornetQIncompatibleClientServerException(String msg) + public ActiveMQIncompatibleClientServerException(String msg) { super(INCOMPATIBLE_CLIENT_SERVER_VERSIONS, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQInterceptorRejectedPacketException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInterceptorRejectedPacketException.java similarity index 78% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQInterceptorRejectedPacketException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInterceptorRejectedPacketException.java index 19a6961c5e..aae32a7cce 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQInterceptorRejectedPacketException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInterceptorRejectedPacketException.java @@ -13,7 +13,7 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.INTERCEPTOR_REJECTED_PACKET; +import static org.apache.activemq.api.core.ActiveMQExceptionType.INTERCEPTOR_REJECTED_PACKET; /** * An outgoing interceptor returned false. @@ -21,16 +21,16 @@ import static org.apache.activemq.api.core.HornetQExceptionType.INTERCEPTOR_REJE * @author Justin Bertram */ // XXX I doubt any reader will make much sense of this Javadoc's text. -public final class HornetQInterceptorRejectedPacketException extends HornetQException +public final class ActiveMQInterceptorRejectedPacketException extends ActiveMQException { private static final long serialVersionUID = -5798841227645281815L; - public HornetQInterceptorRejectedPacketException() + public ActiveMQInterceptorRejectedPacketException() { super(INTERCEPTOR_REJECTED_PACKET); } - public HornetQInterceptorRejectedPacketException(String msg) + public ActiveMQInterceptorRejectedPacketException(String msg) { super(INTERCEPTOR_REJECTED_PACKET, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQInternalErrorException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInternalErrorException.java similarity index 73% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQInternalErrorException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInternalErrorException.java index a77f6bb2a5..691b2881a1 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQInternalErrorException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInternalErrorException.java @@ -13,32 +13,32 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.INTERNAL_ERROR; +import static org.apache.activemq.api.core.ActiveMQExceptionType.INTERNAL_ERROR; /** * Internal error which prevented HornetQ from performing an important operation. * @author Andy Taylor 4/30/12 */ -public final class HornetQInternalErrorException extends HornetQException +public final class ActiveMQInternalErrorException extends ActiveMQException { private static final long serialVersionUID = -5987814047521530695L; - public HornetQInternalErrorException() + public ActiveMQInternalErrorException() { super(INTERNAL_ERROR); } - public HornetQInternalErrorException(String msg) + public ActiveMQInternalErrorException(String msg) { super(INTERNAL_ERROR, msg); } - public HornetQInternalErrorException(String message, Exception e) + public ActiveMQInternalErrorException(String message, Exception e) { super(INTERNAL_ERROR, message, e); } - public HornetQInternalErrorException(String message, Throwable t) + public ActiveMQInternalErrorException(String message, Throwable t) { super(INTERNAL_ERROR, message, t); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQInterruptedException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInterruptedException.java similarity index 87% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQInterruptedException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInterruptedException.java index aef8fcf898..0b395277f3 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQInterruptedException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInterruptedException.java @@ -16,11 +16,11 @@ package org.apache.activemq.api.core; * When an interruption happens, we will just throw a non-checked exception. * @author clebertsuconic */ -public final class HornetQInterruptedException extends RuntimeException +public final class ActiveMQInterruptedException extends RuntimeException { private static final long serialVersionUID = -5744690023549671221L; - public HornetQInterruptedException(Throwable cause) + public ActiveMQInterruptedException(Throwable cause) { super(cause); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQInvalidFilterExpressionException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInvalidFilterExpressionException.java similarity index 76% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQInvalidFilterExpressionException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInvalidFilterExpressionException.java index 447c95dfd7..b7f9738581 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQInvalidFilterExpressionException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInvalidFilterExpressionException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.INVALID_FILTER_EXPRESSION; +import static org.apache.activemq.api.core.ActiveMQExceptionType.INVALID_FILTER_EXPRESSION; /** * A filter expression was found to be invalid. * @author Andy Taylor 4/30/12 */ -public final class HornetQInvalidFilterExpressionException extends HornetQException +public final class ActiveMQInvalidFilterExpressionException extends ActiveMQException { private static final long serialVersionUID = 7188625553939665128L; - public HornetQInvalidFilterExpressionException() + public ActiveMQInvalidFilterExpressionException() { super(INVALID_FILTER_EXPRESSION); } - public HornetQInvalidFilterExpressionException(String msg) + public ActiveMQInvalidFilterExpressionException(String msg) { super(INVALID_FILTER_EXPRESSION, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQInvalidTransientQueueUseException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInvalidTransientQueueUseException.java similarity index 76% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQInvalidTransientQueueUseException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInvalidTransientQueueUseException.java index 653c6f2360..3ce363493c 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQInvalidTransientQueueUseException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQInvalidTransientQueueUseException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.INVALID_TRANSIENT_QUEUE_USE; +import static org.apache.activemq.api.core.ActiveMQExceptionType.INVALID_TRANSIENT_QUEUE_USE; /** * An operation failed because a queue exists on the server. * @author Andy Taylor 4/30/12 */ -public final class HornetQInvalidTransientQueueUseException extends HornetQException +public final class ActiveMQInvalidTransientQueueUseException extends ActiveMQException { private static final long serialVersionUID = -405552292451883063L; - public HornetQInvalidTransientQueueUseException() + public ActiveMQInvalidTransientQueueUseException() { super(INVALID_TRANSIENT_QUEUE_USE); } - public HornetQInvalidTransientQueueUseException(String msg) + public ActiveMQInvalidTransientQueueUseException(String msg) { super(INVALID_TRANSIENT_QUEUE_USE, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQLargeMessageException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQLargeMessageException.java similarity index 79% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQLargeMessageException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQLargeMessageException.java index f5f449084f..b9758e65a6 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQLargeMessageException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQLargeMessageException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.LARGE_MESSAGE_ERROR_BODY; +import static org.apache.activemq.api.core.ActiveMQExceptionType.LARGE_MESSAGE_ERROR_BODY; /** * A problem occurred while manipulating the body of a large message. * @author Andy Taylor 5/2/12 */ -public final class HornetQLargeMessageException extends HornetQException +public final class ActiveMQLargeMessageException extends ActiveMQException { private static final long serialVersionUID = 1087867463974768491L; - public HornetQLargeMessageException() + public ActiveMQLargeMessageException() { super(LARGE_MESSAGE_ERROR_BODY); } - public HornetQLargeMessageException(String msg) + public ActiveMQLargeMessageException(String msg) { super(LARGE_MESSAGE_ERROR_BODY, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQLargeMessageInterruptedException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQLargeMessageInterruptedException.java similarity index 74% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQLargeMessageInterruptedException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQLargeMessageInterruptedException.java index db0b4da2b3..9d69cfb99e 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQLargeMessageInterruptedException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQLargeMessageInterruptedException.java @@ -14,22 +14,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.LARGE_MESSAGE_INTERRUPTED; +import static org.apache.activemq.api.core.ActiveMQExceptionType.LARGE_MESSAGE_INTERRUPTED; /** * @author Clebert */ // XXX -public class HornetQLargeMessageInterruptedException extends HornetQException +public class ActiveMQLargeMessageInterruptedException extends ActiveMQException { private static final long serialVersionUID = 0; - public HornetQLargeMessageInterruptedException(String message) + public ActiveMQLargeMessageInterruptedException(String message) { super(LARGE_MESSAGE_INTERRUPTED, message); } - public HornetQLargeMessageInterruptedException() + public ActiveMQLargeMessageInterruptedException() { super(LARGE_MESSAGE_INTERRUPTED); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQNativeIOError.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNativeIOError.java similarity index 76% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQNativeIOError.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNativeIOError.java index 1e6f445d34..c1697df35a 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQNativeIOError.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNativeIOError.java @@ -19,17 +19,17 @@ package org.apache.activemq.api.core; * @author Andy Taylor 5/4/12 */ // XXX -public final class HornetQNativeIOError extends HornetQException +public final class ActiveMQNativeIOError extends ActiveMQException { private static final long serialVersionUID = 2355120980683293085L; - public HornetQNativeIOError() + public ActiveMQNativeIOError() { - super(HornetQExceptionType.NATIVE_ERROR_CANT_INITIALIZE_AIO); + super(ActiveMQExceptionType.NATIVE_ERROR_CANT_INITIALIZE_AIO); } - public HornetQNativeIOError(String msg) + public ActiveMQNativeIOError(String msg) { - super(HornetQExceptionType.NATIVE_ERROR_CANT_INITIALIZE_AIO, msg); + super(ActiveMQExceptionType.NATIVE_ERROR_CANT_INITIALIZE_AIO, msg); } } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQNonExistentQueueException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNonExistentQueueException.java similarity index 78% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQNonExistentQueueException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNonExistentQueueException.java index 83f7c9875c..86d3e557a1 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQNonExistentQueueException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNonExistentQueueException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.QUEUE_DOES_NOT_EXIST; +import static org.apache.activemq.api.core.ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST; /** * An operation failed because a queue does not exist on the server. * @author Andy Taylor 4/30/12 */ -public final class HornetQNonExistentQueueException extends HornetQException +public final class ActiveMQNonExistentQueueException extends ActiveMQException { private static final long serialVersionUID = -8199298881947523607L; - public HornetQNonExistentQueueException() + public ActiveMQNonExistentQueueException() { super(QUEUE_DOES_NOT_EXIST); } - public HornetQNonExistentQueueException(String msg) + public ActiveMQNonExistentQueueException(String msg) { super(QUEUE_DOES_NOT_EXIST, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQNotConnectedException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNotConnectedException.java similarity index 79% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQNotConnectedException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNotConnectedException.java index efd6c49398..0b6e99c6c0 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQNotConnectedException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQNotConnectedException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.NOT_CONNECTED; +import static org.apache.activemq.api.core.ActiveMQExceptionType.NOT_CONNECTED; /** * A client is not able to connect to HornetQ server. * @author Andy Taylor 4/30/12 */ -public final class HornetQNotConnectedException extends HornetQException +public final class ActiveMQNotConnectedException extends ActiveMQException { private static final long serialVersionUID = -3489189971813613325L; - public HornetQNotConnectedException(String message) + public ActiveMQNotConnectedException(String message) { super(NOT_CONNECTED, message); } - public HornetQNotConnectedException() + public ActiveMQNotConnectedException() { super(NOT_CONNECTED); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQObjectClosedException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQObjectClosedException.java similarity index 80% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQObjectClosedException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQObjectClosedException.java index 84d916978e..87898b7e6c 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQObjectClosedException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQObjectClosedException.java @@ -13,23 +13,23 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.OBJECT_CLOSED; +import static org.apache.activemq.api.core.ActiveMQExceptionType.OBJECT_CLOSED; /** * A client operation failed because the calling resource (ClientSession, ClientProducer, etc.) is * closed. * @author Andy Taylor 4/30/12 */ -public final class HornetQObjectClosedException extends HornetQException +public final class ActiveMQObjectClosedException extends ActiveMQException { private static final long serialVersionUID = 809024052184914812L; - public HornetQObjectClosedException() + public ActiveMQObjectClosedException() { super(OBJECT_CLOSED); } - public HornetQObjectClosedException(String msg) + public ActiveMQObjectClosedException(String msg) { super(OBJECT_CLOSED, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQPropertyConversionException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQPropertyConversionException.java similarity index 87% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQPropertyConversionException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQPropertyConversionException.java index 1ba8107ccd..02a0199638 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQPropertyConversionException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQPropertyConversionException.java @@ -18,12 +18,12 @@ package org.apache.activemq.api.core; * @author Jeff Mesnil * @see org.apache.activemq.api.core.Message */ -public final class HornetQPropertyConversionException extends RuntimeException +public final class ActiveMQPropertyConversionException extends RuntimeException { private static final long serialVersionUID = -3010008708334904332L; - public HornetQPropertyConversionException(final String message) + public ActiveMQPropertyConversionException(final String message) { super(message); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQQueueExistsException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQQueueExistsException.java similarity index 79% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQQueueExistsException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQQueueExistsException.java index 2c5c65d15e..86257c3bbd 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQQueueExistsException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQQueueExistsException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.QUEUE_EXISTS; +import static org.apache.activemq.api.core.ActiveMQExceptionType.QUEUE_EXISTS; /** * An operation failed because a queue exists on the server. * @author Andy Taylor 4/30/12 */ -public final class HornetQQueueExistsException extends HornetQException +public final class ActiveMQQueueExistsException extends ActiveMQException { private static final long serialVersionUID = -405552292451883063L; - public HornetQQueueExistsException() + public ActiveMQQueueExistsException() { super(QUEUE_EXISTS); } - public HornetQQueueExistsException(String msg) + public ActiveMQQueueExistsException(String msg) { super(QUEUE_EXISTS, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQSecurityException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQSecurityException.java similarity index 80% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQSecurityException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQSecurityException.java index 17e3a623c6..4e4a65e939 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQSecurityException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQSecurityException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.SECURITY_EXCEPTION; +import static org.apache.activemq.api.core.ActiveMQExceptionType.SECURITY_EXCEPTION; /** * A security problem occurred (authentication issues, permission issues,...) * @author Andy Taylor 5/2/12 */ -public final class HornetQSecurityException extends HornetQException +public final class ActiveMQSecurityException extends ActiveMQException { private static final long serialVersionUID = 3291210307590756881L; - public HornetQSecurityException() + public ActiveMQSecurityException() { super(SECURITY_EXCEPTION); } - public HornetQSecurityException(String msg) + public ActiveMQSecurityException(String msg) { super(SECURITY_EXCEPTION, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQSessionCreationException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQSessionCreationException.java similarity index 79% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQSessionCreationException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQSessionCreationException.java index 15db001e4c..8a7a85a4d9 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQSessionCreationException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQSessionCreationException.java @@ -13,23 +13,23 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.SESSION_CREATION_REJECTED; +import static org.apache.activemq.api.core.ActiveMQExceptionType.SESSION_CREATION_REJECTED; /** * The creation of a session was rejected by the server (e.g. if the server is starting and has not * finish to be initialized. * @author Andy Taylor 5/2/12 */ -public final class HornetQSessionCreationException extends HornetQException +public final class ActiveMQSessionCreationException extends ActiveMQException { private static final long serialVersionUID = -4486139158452585895L; - public HornetQSessionCreationException() + public ActiveMQSessionCreationException() { super(SESSION_CREATION_REJECTED); } - public HornetQSessionCreationException(String msg) + public ActiveMQSessionCreationException(String msg) { super(SESSION_CREATION_REJECTED, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQTransactionOutcomeUnknownException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQTransactionOutcomeUnknownException.java similarity index 76% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQTransactionOutcomeUnknownException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQTransactionOutcomeUnknownException.java index 4817afc133..beced68591 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQTransactionOutcomeUnknownException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQTransactionOutcomeUnknownException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.TRANSACTION_OUTCOME_UNKNOWN; +import static org.apache.activemq.api.core.ActiveMQExceptionType.TRANSACTION_OUTCOME_UNKNOWN; /** * The outcome of a transaction is unknown. * @author Andy Taylor 5/2/12 */ -public final class HornetQTransactionOutcomeUnknownException extends HornetQException +public final class ActiveMQTransactionOutcomeUnknownException extends ActiveMQException { private static final long serialVersionUID = 7940794286427650558L; - public HornetQTransactionOutcomeUnknownException() + public ActiveMQTransactionOutcomeUnknownException() { super(TRANSACTION_OUTCOME_UNKNOWN); } - public HornetQTransactionOutcomeUnknownException(String msg) + public ActiveMQTransactionOutcomeUnknownException(String msg) { super(TRANSACTION_OUTCOME_UNKNOWN, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQTransactionRolledBackException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQTransactionRolledBackException.java similarity index 76% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQTransactionRolledBackException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQTransactionRolledBackException.java index 19bd17fba8..8a0c1802d4 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQTransactionRolledBackException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQTransactionRolledBackException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.TRANSACTION_ROLLED_BACK; +import static org.apache.activemq.api.core.ActiveMQExceptionType.TRANSACTION_ROLLED_BACK; /** * A transaction was rolled back. * @author Andy Taylor 5/2/12 */ -public final class HornetQTransactionRolledBackException extends HornetQException +public final class ActiveMQTransactionRolledBackException extends ActiveMQException { private static final long serialVersionUID = 5823412198677126300L; - public HornetQTransactionRolledBackException() + public ActiveMQTransactionRolledBackException() { super(TRANSACTION_ROLLED_BACK); } - public HornetQTransactionRolledBackException(String msg) + public ActiveMQTransactionRolledBackException(String msg) { super(TRANSACTION_ROLLED_BACK, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQUnBlockedException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQUnBlockedException.java similarity index 80% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQUnBlockedException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQUnBlockedException.java index 13de034892..56639f17b3 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQUnBlockedException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQUnBlockedException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.UNBLOCKED; +import static org.apache.activemq.api.core.ActiveMQExceptionType.UNBLOCKED; /** * A blocking call from a client was unblocked during failover. * @author Andy Taylor 4/30/12 */ -public final class HornetQUnBlockedException extends HornetQException +public final class ActiveMQUnBlockedException extends ActiveMQException { private static final long serialVersionUID = -4507889261891160608L; - public HornetQUnBlockedException() + public ActiveMQUnBlockedException() { super(UNBLOCKED); } - public HornetQUnBlockedException(String msg) + public ActiveMQUnBlockedException(String msg) { super(UNBLOCKED, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQUnsupportedPacketException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQUnsupportedPacketException.java similarity index 78% rename from activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQUnsupportedPacketException.java rename to activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQUnsupportedPacketException.java index 38303a1512..0403bbe40b 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQUnsupportedPacketException.java +++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQUnsupportedPacketException.java @@ -13,22 +13,22 @@ package org.apache.activemq.api.core; -import static org.apache.activemq.api.core.HornetQExceptionType.UNSUPPORTED_PACKET; +import static org.apache.activemq.api.core.ActiveMQExceptionType.UNSUPPORTED_PACKET; /** * A packet of unsupported type was received by HornetQ PacketHandler. * @author Andy Taylor 4/30/12 */ -public final class HornetQUnsupportedPacketException extends HornetQException +public final class ActiveMQUnsupportedPacketException extends ActiveMQException { private static final long serialVersionUID = -7074681529482463675L; - public HornetQUnsupportedPacketException() + public ActiveMQUnsupportedPacketException() { super(UNSUPPORTED_PACKET); } - public HornetQUnsupportedPacketException(String msg) + public ActiveMQUnsupportedPacketException(String msg) { super(UNSUPPORTED_PACKET, msg); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQExceptionType.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQExceptionType.java deleted file mode 100644 index c0adf65054..0000000000 --- a/activemq-commons/src/main/java/org/apache/activemq/api/core/HornetQExceptionType.java +++ /dev/null @@ -1,298 +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.api.core; - -import java.util.Collections; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.Map; - -/** - * Defines all {@link HornetQException} types and their codes. - */ -public enum HornetQExceptionType -{ - - // Error codes ------------------------------------------------- - - INTERNAL_ERROR(000) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQInternalErrorException(msg); - } - }, - UNSUPPORTED_PACKET(001) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQUnsupportedPacketException(msg); - } - }, - NOT_CONNECTED(002) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQNotConnectedException(msg); - } - }, - CONNECTION_TIMEDOUT(003) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQConnectionTimedOutException(msg); - } - }, - DISCONNECTED(004) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQDisconnectedException(msg); - } - }, - UNBLOCKED(005) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQUnBlockedException(msg); - } - }, - IO_ERROR(006) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQIOErrorException(msg); - } - }, - QUEUE_DOES_NOT_EXIST(100) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQNonExistentQueueException(msg); - } - }, - QUEUE_EXISTS(101) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQQueueExistsException(msg); - } - }, - OBJECT_CLOSED(102) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQObjectClosedException(msg); - } - }, - INVALID_FILTER_EXPRESSION(103) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQInvalidFilterExpressionException(msg); - } - }, - ILLEGAL_STATE(104) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQIllegalStateException(msg); - } - }, - SECURITY_EXCEPTION(105) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQSecurityException(msg); - } - }, - ADDRESS_EXISTS(107) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQAddressExistsException(msg); - } - }, - INCOMPATIBLE_CLIENT_SERVER_VERSIONS(108) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQIncompatibleClientServerException(msg); - } - }, - LARGE_MESSAGE_ERROR_BODY(110) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQLargeMessageException(msg); - } - }, - TRANSACTION_ROLLED_BACK(111) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQTransactionRolledBackException(msg); - } - }, - SESSION_CREATION_REJECTED(112) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQSessionCreationException(msg); - } - }, - DUPLICATE_ID_REJECTED(113) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQDuplicateIdException(msg); - } - }, - DUPLICATE_METADATA(114) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQDuplicateMetaDataException(msg); - } - }, - TRANSACTION_OUTCOME_UNKNOWN(115) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQTransactionOutcomeUnknownException(msg); - } - }, - ALREADY_REPLICATING(116) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQAlreadyReplicatingException(msg); - } - }, - INTERCEPTOR_REJECTED_PACKET(117) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQInterceptorRejectedPacketException(msg); - } - }, - INVALID_TRANSIENT_QUEUE_USE(118) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQInvalidTransientQueueUseException(msg); - } - }, - - GENERIC_EXCEPTION(999), - NATIVE_ERROR_INTERNAL(200), - NATIVE_ERROR_INVALID_BUFFER(201), - NATIVE_ERROR_NOT_ALIGNED(202), - NATIVE_ERROR_CANT_INITIALIZE_AIO(203), - NATIVE_ERROR_CANT_RELEASE_AIO(204), - NATIVE_ERROR_CANT_OPEN_CLOSE_FILE(205), - NATIVE_ERROR_CANT_ALLOCATE_QUEUE(206), - NATIVE_ERROR_PREALLOCATE_FILE(208), - NATIVE_ERROR_ALLOCATE_MEMORY(209), - ADDRESS_FULL(210) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQAddressFullException(msg); - } - }, - LARGE_MESSAGE_INTERRUPTED(211) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQLargeMessageInterruptedException(msg); - } - }, - CLUSTER_SECURITY_EXCEPTION(212) - { - @Override - public HornetQException createException(String msg) - { - return new HornetQClusterSecurityException(msg); - } - - }; - - private static final Map TYPE_MAP; - - static - { - HashMap map = new HashMap(); - for (HornetQExceptionType type : EnumSet.allOf(HornetQExceptionType.class)) - { - map.put(type.getCode(), type); - } - TYPE_MAP = Collections.unmodifiableMap(map); - } - - private final int code; - - HornetQExceptionType(int code) - { - this.code = code; - } - - public int getCode() - { - return code; - } - - public HornetQException createException(String msg) - { - return new HornetQException(msg + ", code:" + this); - } - - public static HornetQException createException(int code, String msg) - { - return getType(code).createException(msg); - } - - public static HornetQExceptionType getType(int code) - { - HornetQExceptionType type = TYPE_MAP.get(code); - if (type != null) - return type; - return HornetQExceptionType.GENERIC_EXCEPTION; - } -} \ No newline at end of file diff --git a/activemq-commons/src/main/java/org/apache/activemq/core/buffers/impl/ChannelBufferWrapper.java b/activemq-commons/src/main/java/org/apache/activemq/core/buffers/impl/ChannelBufferWrapper.java index 08371130dc..c7fbb8ef92 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/core/buffers/impl/ChannelBufferWrapper.java +++ b/activemq-commons/src/main/java/org/apache/activemq/core/buffers/impl/ChannelBufferWrapper.java @@ -17,7 +17,7 @@ import java.nio.ByteBuffer; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.utils.DataConstants; import org.apache.activemq.utils.UTF8Util; @@ -27,7 +27,7 @@ import org.apache.activemq.utils.UTF8Util; * * @author Tim Fox */ -public class ChannelBufferWrapper implements HornetQBuffer +public class ChannelBufferWrapper implements ActiveMQBuffer { protected ByteBuf buffer; // NO_UCD (use final) private final boolean releasable; @@ -215,12 +215,12 @@ public class ChannelBufferWrapper implements HornetQBuffer buffer.clear(); } - public HornetQBuffer copy() + public ActiveMQBuffer copy() { return new ChannelBufferWrapper(buffer.copy(), releasable); } - public HornetQBuffer copy(final int index, final int length) + public ActiveMQBuffer copy(final int index, final int length) { return new ChannelBufferWrapper(buffer.copy(index, length), releasable); } @@ -230,7 +230,7 @@ public class ChannelBufferWrapper implements HornetQBuffer buffer.discardReadBytes(); } - public HornetQBuffer duplicate() + public ActiveMQBuffer duplicate() { return new ChannelBufferWrapper(buffer.duplicate(), releasable); } @@ -255,17 +255,17 @@ public class ChannelBufferWrapper implements HornetQBuffer buffer.getBytes(index, dst); } - public void getBytes(final int index, final HornetQBuffer dst, final int dstIndex, final int length) + public void getBytes(final int index, final ActiveMQBuffer dst, final int dstIndex, final int length) { buffer.getBytes(index, dst.byteBuf(), dstIndex, length); } - public void getBytes(final int index, final HornetQBuffer dst, final int length) + public void getBytes(final int index, final ActiveMQBuffer dst, final int length) { buffer.getBytes(index, dst.byteBuf(), length); } - public void getBytes(final int index, final HornetQBuffer dst) + public void getBytes(final int index, final ActiveMQBuffer dst) { buffer.getBytes(index, dst.byteBuf()); } @@ -355,22 +355,22 @@ public class ChannelBufferWrapper implements HornetQBuffer buffer.readBytes(dst); } - public void readBytes(final HornetQBuffer dst, final int dstIndex, final int length) + public void readBytes(final ActiveMQBuffer dst, final int dstIndex, final int length) { buffer.readBytes(dst.byteBuf(), dstIndex, length); } - public void readBytes(final HornetQBuffer dst, final int length) + public void readBytes(final ActiveMQBuffer dst, final int length) { buffer.readBytes(dst.byteBuf(), length); } - public void readBytes(final HornetQBuffer dst) + public void readBytes(final ActiveMQBuffer dst) { buffer.readBytes(dst.byteBuf()); } - public HornetQBuffer readBytes(final int length) + public ActiveMQBuffer readBytes(final int length) { return new ChannelBufferWrapper(buffer.readBytes(length), releasable); } @@ -415,7 +415,7 @@ public class ChannelBufferWrapper implements HornetQBuffer return buffer.readShort(); } - public HornetQBuffer readSlice(final int length) + public ActiveMQBuffer readSlice(final int length) { return new ChannelBufferWrapper(buffer.readSlice(length), releasable); } @@ -465,17 +465,17 @@ public class ChannelBufferWrapper implements HornetQBuffer buffer.setBytes(index, src); } - public void setBytes(final int index, final HornetQBuffer src, final int srcIndex, final int length) + public void setBytes(final int index, final ActiveMQBuffer src, final int srcIndex, final int length) { buffer.setBytes(index, src.byteBuf(), srcIndex, length); } - public void setBytes(final int index, final HornetQBuffer src, final int length) + public void setBytes(final int index, final ActiveMQBuffer src, final int length) { buffer.setBytes(index, src.byteBuf(), length); } - public void setBytes(final int index, final HornetQBuffer src) + public void setBytes(final int index, final ActiveMQBuffer src) { buffer.setBytes(index, src.byteBuf()); } @@ -520,12 +520,12 @@ public class ChannelBufferWrapper implements HornetQBuffer buffer.skipBytes(length); } - public HornetQBuffer slice() + public ActiveMQBuffer slice() { return new ChannelBufferWrapper(buffer.slice(), releasable); } - public HornetQBuffer slice(final int index, final int length) + public ActiveMQBuffer slice(final int index, final int length) { return new ChannelBufferWrapper(buffer.slice(index, length), releasable); } @@ -570,12 +570,12 @@ public class ChannelBufferWrapper implements HornetQBuffer buffer.writeBytes(src); } - public void writeBytes(final HornetQBuffer src, final int srcIndex, final int length) + public void writeBytes(final ActiveMQBuffer src, final int srcIndex, final int length) { buffer.writeBytes(src.byteBuf(), srcIndex, length); } - public void writeBytes(final HornetQBuffer src, final int length) + public void writeBytes(final ActiveMQBuffer src, final int length) { buffer.writeBytes(src.byteBuf(), length); } diff --git a/activemq-commons/src/main/java/org/apache/activemq/utils/HornetQUtilBundle.java b/activemq-commons/src/main/java/org/apache/activemq/utils/HornetQUtilBundle.java index 28f89df6cc..6fdd103b50 100644 --- a/activemq-commons/src/main/java/org/apache/activemq/utils/HornetQUtilBundle.java +++ b/activemq-commons/src/main/java/org/apache/activemq/utils/HornetQUtilBundle.java @@ -13,7 +13,7 @@ package org.apache.activemq.utils; -import org.apache.activemq.api.core.HornetQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.Message; import org.jboss.logging.annotations.MessageBundle; @@ -35,7 +35,7 @@ public interface HornetQUtilBundle HornetQUtilBundle BUNDLE = Messages.getBundle(HornetQUtilBundle.class); @Message(id = 209000, value = "invalid property: {0}" , format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException invalidProperty(String part); + ActiveMQIllegalStateException invalidProperty(String part); @Message(id = 209001, value = "Invalid type: {0}", format = Message.Format.MESSAGE_FORMAT) IllegalStateException invalidType(Byte type); 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 880536b046..472d216178 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 @@ -17,8 +17,8 @@ import java.security.PrivilegedAction; import java.util.HashMap; import java.util.Map; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; /** * A PasswordMarkingUtil @@ -38,7 +38,7 @@ public class PasswordMaskingUtil * * Where only is required. key/value pairs are optional */ - public static SensitiveDataCodec getCodec(String codecDesc) throws HornetQException + public static SensitiveDataCodec getCodec(String codecDesc) throws ActiveMQException { SensitiveDataCodec codecInstance = null; @@ -46,7 +46,7 @@ public class PasswordMaskingUtil String[] parts = codecDesc.split(";"); if (parts.length < 1) - throw new HornetQException(HornetQExceptionType.ILLEGAL_STATE, "Invalid PasswordCodec value: " + codecDesc); + throw new ActiveMQException(ActiveMQExceptionType.ILLEGAL_STATE, "Invalid PasswordCodec value: " + codecDesc); final String codecClassName = parts[0]; 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 3593b81bb4..8760f5fe77 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 @@ -20,8 +20,8 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQPropertyConversionException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQPropertyConversionException; import org.apache.activemq.api.core.SimpleString; import static org.apache.activemq.utils.DataConstants.BOOLEAN; @@ -168,7 +168,7 @@ public final class TypedProperties return doGetProperty(key); } - public Boolean getBooleanProperty(final SimpleString key) throws HornetQPropertyConversionException + public Boolean getBooleanProperty(final SimpleString key) throws ActiveMQPropertyConversionException { Object value = doGetProperty(key); if (value == null) @@ -185,11 +185,11 @@ public final class TypedProperties } else { - throw new HornetQPropertyConversionException("Invalid conversion"); + throw new ActiveMQPropertyConversionException("Invalid conversion"); } } - public Byte getByteProperty(final SimpleString key) throws HornetQPropertyConversionException + public Byte getByteProperty(final SimpleString key) throws ActiveMQPropertyConversionException { Object value = doGetProperty(key); if (value == null) @@ -206,11 +206,11 @@ public final class TypedProperties } else { - throw new HornetQPropertyConversionException("Invalid conversion"); + throw new ActiveMQPropertyConversionException("Invalid conversion"); } } - public Character getCharProperty(final SimpleString key) throws HornetQPropertyConversionException + public Character getCharProperty(final SimpleString key) throws ActiveMQPropertyConversionException { Object value = doGetProperty(key); if (value == null) @@ -224,11 +224,11 @@ public final class TypedProperties } else { - throw new HornetQPropertyConversionException("Invalid conversion"); + throw new ActiveMQPropertyConversionException("Invalid conversion"); } } - public byte[] getBytesProperty(final SimpleString key) throws HornetQPropertyConversionException + public byte[] getBytesProperty(final SimpleString key) throws ActiveMQPropertyConversionException { Object value = doGetProperty(key); if (value == null) @@ -241,11 +241,11 @@ public final class TypedProperties } else { - throw new HornetQPropertyConversionException("Invalid conversion"); + throw new ActiveMQPropertyConversionException("Invalid conversion"); } } - public Double getDoubleProperty(final SimpleString key) throws HornetQPropertyConversionException + public Double getDoubleProperty(final SimpleString key) throws ActiveMQPropertyConversionException { Object value = doGetProperty(key); if (value == null) @@ -266,11 +266,11 @@ public final class TypedProperties } else { - throw new HornetQPropertyConversionException("Invalid conversion"); + throw new ActiveMQPropertyConversionException("Invalid conversion"); } } - public Integer getIntProperty(final SimpleString key) throws HornetQPropertyConversionException + public Integer getIntProperty(final SimpleString key) throws ActiveMQPropertyConversionException { Object value = doGetProperty(key); if (value == null) @@ -295,11 +295,11 @@ public final class TypedProperties } else { - throw new HornetQPropertyConversionException("Invalid conversion"); + throw new ActiveMQPropertyConversionException("Invalid conversion"); } } - public Long getLongProperty(final SimpleString key) throws HornetQPropertyConversionException + public Long getLongProperty(final SimpleString key) throws ActiveMQPropertyConversionException { Object value = doGetProperty(key); if (value == null) @@ -328,11 +328,11 @@ public final class TypedProperties } else { - throw new HornetQPropertyConversionException("Invalid conversion"); + throw new ActiveMQPropertyConversionException("Invalid conversion"); } } - public Short getShortProperty(final SimpleString key) throws HornetQPropertyConversionException + public Short getShortProperty(final SimpleString key) throws ActiveMQPropertyConversionException { Object value = doGetProperty(key); if (value == null) @@ -353,11 +353,11 @@ public final class TypedProperties } else { - throw new HornetQPropertyConversionException("Invalid Conversion."); + throw new ActiveMQPropertyConversionException("Invalid Conversion."); } } - public Float getFloatProperty(final SimpleString key) throws HornetQPropertyConversionException + public Float getFloatProperty(final SimpleString key) throws ActiveMQPropertyConversionException { Object value = doGetProperty(key); if (value == null) @@ -370,10 +370,10 @@ public final class TypedProperties { return Float.parseFloat(((SimpleString) value).toString()); } - throw new HornetQPropertyConversionException("Invalid conversion: " + key); + throw new ActiveMQPropertyConversionException("Invalid conversion: " + key); } - public SimpleString getSimpleStringProperty(final SimpleString key) throws HornetQPropertyConversionException + public SimpleString getSimpleStringProperty(final SimpleString key) throws ActiveMQPropertyConversionException { Object value = doGetProperty(key); @@ -418,7 +418,7 @@ public final class TypedProperties { return new SimpleString(value.toString()); } - throw new HornetQPropertyConversionException("Invalid conversion"); + throw new ActiveMQPropertyConversionException("Invalid conversion"); } public Object removeProperty(final SimpleString key) @@ -451,7 +451,7 @@ public final class TypedProperties } } - public synchronized void decode(final HornetQBuffer buffer) + public synchronized void decode(final ActiveMQBuffer buffer) { byte b = buffer.readByte(); @@ -554,7 +554,7 @@ public final class TypedProperties } } - public synchronized void encode(final HornetQBuffer buffer) + public synchronized void encode(final ActiveMQBuffer buffer) { if (properties == null) { @@ -741,7 +741,7 @@ public final class TypedProperties { abstract Object getValue(); - abstract void write(HornetQBuffer buffer); + abstract void write(ActiveMQBuffer buffer); abstract int encodeSize(); @@ -765,7 +765,7 @@ public final class TypedProperties } @Override - public void write(final HornetQBuffer buffer) + public void write(final ActiveMQBuffer buffer) { buffer.writeByte(DataConstants.NULL); } @@ -787,7 +787,7 @@ public final class TypedProperties this.val = val; } - public BooleanValue(final HornetQBuffer buffer) + public BooleanValue(final ActiveMQBuffer buffer) { val = buffer.readBoolean(); } @@ -799,7 +799,7 @@ public final class TypedProperties } @Override - public void write(final HornetQBuffer buffer) + public void write(final ActiveMQBuffer buffer) { buffer.writeByte(DataConstants.BOOLEAN); buffer.writeBoolean(val); @@ -822,7 +822,7 @@ public final class TypedProperties this.val = val; } - public ByteValue(final HornetQBuffer buffer) + public ByteValue(final ActiveMQBuffer buffer) { val = buffer.readByte(); } @@ -834,7 +834,7 @@ public final class TypedProperties } @Override - public void write(final HornetQBuffer buffer) + public void write(final ActiveMQBuffer buffer) { buffer.writeByte(DataConstants.BYTE); buffer.writeByte(val); @@ -856,7 +856,7 @@ public final class TypedProperties this.val = val; } - public BytesValue(final HornetQBuffer buffer) + public BytesValue(final ActiveMQBuffer buffer) { int len = buffer.readInt(); val = new byte[len]; @@ -870,7 +870,7 @@ public final class TypedProperties } @Override - public void write(final HornetQBuffer buffer) + public void write(final ActiveMQBuffer buffer) { buffer.writeByte(DataConstants.BYTES); buffer.writeInt(val.length); @@ -894,7 +894,7 @@ public final class TypedProperties this.val = val; } - public ShortValue(final HornetQBuffer buffer) + public ShortValue(final ActiveMQBuffer buffer) { val = buffer.readShort(); } @@ -906,7 +906,7 @@ public final class TypedProperties } @Override - public void write(final HornetQBuffer buffer) + public void write(final ActiveMQBuffer buffer) { buffer.writeByte(DataConstants.SHORT); buffer.writeShort(val); @@ -928,7 +928,7 @@ public final class TypedProperties this.val = val; } - public IntValue(final HornetQBuffer buffer) + public IntValue(final ActiveMQBuffer buffer) { val = buffer.readInt(); } @@ -940,7 +940,7 @@ public final class TypedProperties } @Override - public void write(final HornetQBuffer buffer) + public void write(final ActiveMQBuffer buffer) { buffer.writeByte(DataConstants.INT); buffer.writeInt(val); @@ -962,7 +962,7 @@ public final class TypedProperties this.val = val; } - public LongValue(final HornetQBuffer buffer) + public LongValue(final ActiveMQBuffer buffer) { val = buffer.readLong(); } @@ -974,7 +974,7 @@ public final class TypedProperties } @Override - public void write(final HornetQBuffer buffer) + public void write(final ActiveMQBuffer buffer) { buffer.writeByte(DataConstants.LONG); buffer.writeLong(val); @@ -996,7 +996,7 @@ public final class TypedProperties this.val = val; } - public FloatValue(final HornetQBuffer buffer) + public FloatValue(final ActiveMQBuffer buffer) { val = Float.intBitsToFloat(buffer.readInt()); } @@ -1008,7 +1008,7 @@ public final class TypedProperties } @Override - public void write(final HornetQBuffer buffer) + public void write(final ActiveMQBuffer buffer) { buffer.writeByte(DataConstants.FLOAT); buffer.writeInt(Float.floatToIntBits(val)); @@ -1031,7 +1031,7 @@ public final class TypedProperties this.val = val; } - public DoubleValue(final HornetQBuffer buffer) + public DoubleValue(final ActiveMQBuffer buffer) { val = Double.longBitsToDouble(buffer.readLong()); } @@ -1043,7 +1043,7 @@ public final class TypedProperties } @Override - public void write(final HornetQBuffer buffer) + public void write(final ActiveMQBuffer buffer) { buffer.writeByte(DataConstants.DOUBLE); buffer.writeLong(Double.doubleToLongBits(val)); @@ -1065,7 +1065,7 @@ public final class TypedProperties this.val = val; } - public CharValue(final HornetQBuffer buffer) + public CharValue(final ActiveMQBuffer buffer) { val = (char) buffer.readShort(); } @@ -1077,7 +1077,7 @@ public final class TypedProperties } @Override - public void write(final HornetQBuffer buffer) + public void write(final ActiveMQBuffer buffer) { buffer.writeByte(DataConstants.CHAR); buffer.writeShort((short) val); @@ -1099,7 +1099,7 @@ public final class TypedProperties this.val = val; } - public StringValue(final HornetQBuffer buffer) + public StringValue(final ActiveMQBuffer buffer) { val = buffer.readSimpleString(); } @@ -1111,7 +1111,7 @@ public final class TypedProperties } @Override - public void write(final HornetQBuffer buffer) + public void write(final ActiveMQBuffer buffer) { buffer.writeByte(DataConstants.STRING); buffer.writeSimpleString(val); @@ -1206,7 +1206,7 @@ public final class TypedProperties } else { - throw new HornetQPropertyConversionException(value.getClass() + " is not a valid property type"); + throw new ActiveMQPropertyConversionException(value.getClass() + " is not a valid property 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 40f22b048a..a11b0c2064 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 @@ -14,7 +14,7 @@ package org.apache.activemq.utils; import java.lang.ref.SoftReference; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; /** * @@ -40,7 +40,7 @@ public final class UTF8Util private static final ThreadLocal> currenBuffer = new ThreadLocal>(); - public static void saveUTF(final HornetQBuffer out, final String str) + public static void saveUTF(final ActiveMQBuffer out, final String str) { StringUtilBuffer buffer = UTF8Util.getThreadLocalBuffer(); @@ -106,7 +106,7 @@ public final class UTF8Util } } - public static String readUTF(final HornetQBuffer input) + public static String readUTF(final ActiveMQBuffer input) { StringUtilBuffer buffer = UTF8Util.getThreadLocalBuffer(); 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 62f6a4dcd9..ca7a72e697 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 @@ -34,7 +34,7 @@ public interface Interceptor * @param connection the connection the packet was received on * @return {@code true} to process the next interceptor and handle the packet, * {@code false} to abort processing of the packet - * @throws HornetQException + * @throws ActiveMQException */ - boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException; + boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException; } 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 29f47ed9f8..cfabd21071 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 @@ -44,7 +44,7 @@ import org.apache.activemq.utils.UUID; * *

* If conversion is not allowed (for example calling {@code getFloatProperty} on a property set a - * {@code boolean}), a {@link HornetQPropertyConversionException} will be thrown. + * {@code boolean}), a {@link ActiveMQPropertyConversionException} will be thrown. * * @author Tim Fox * @author ClebertSuconic @@ -198,7 +198,7 @@ public interface Message /** * Returns the message body as a HornetQBuffer */ - HornetQBuffer getBodyBuffer(); + ActiveMQBuffer getBodyBuffer(); /** * Writes the input byte array to the message body HornetQBuffer @@ -214,7 +214,7 @@ public interface Message * Returns a copy of the message body as a HornetQBuffer. Any modification * of this buffer should not impact the underlying buffer. */ - HornetQBuffer getBodyBufferCopy(); + ActiveMQBuffer getBodyBufferCopy(); // Properties // ----------------------------------------------------------------- @@ -371,15 +371,15 @@ public interface Message * * @param key property name * @param value property value - * @throws HornetQPropertyConversionException if the value is not one of the accepted property + * @throws ActiveMQPropertyConversionException if the value is not one of the accepted property * types. */ - Message putObjectProperty(SimpleString key, Object value) throws HornetQPropertyConversionException; + Message putObjectProperty(SimpleString key, Object value) throws ActiveMQPropertyConversionException; /** * @see #putObjectProperty(SimpleString, Object) */ - Message putObjectProperty(String key, Object value) throws HornetQPropertyConversionException; + Message putObjectProperty(String key, Object value) throws ActiveMQPropertyConversionException; /** * Removes the property corresponding to the specified key. @@ -410,62 +410,62 @@ public interface Message /** * Returns the property corresponding to the specified key as a Boolean. * - * @throws HornetQPropertyConversionException if the value can not be converted to a Boolean + * @throws ActiveMQPropertyConversionException if the value can not be converted to a Boolean */ - Boolean getBooleanProperty(SimpleString key) throws HornetQPropertyConversionException; + Boolean getBooleanProperty(SimpleString key) throws ActiveMQPropertyConversionException; /** * @see #getBooleanProperty(SimpleString) */ - Boolean getBooleanProperty(String key) throws HornetQPropertyConversionException; + Boolean getBooleanProperty(String key) throws ActiveMQPropertyConversionException; /** * Returns the property corresponding to the specified key as a Byte. * - * @throws HornetQPropertyConversionException if the value can not be converted to a Byte + * @throws ActiveMQPropertyConversionException if the value can not be converted to a Byte */ - Byte getByteProperty(SimpleString key) throws HornetQPropertyConversionException; + Byte getByteProperty(SimpleString key) throws ActiveMQPropertyConversionException; /** * @see #getByteProperty(SimpleString) */ - Byte getByteProperty(String key) throws HornetQPropertyConversionException; + Byte getByteProperty(String key) throws ActiveMQPropertyConversionException; /** * Returns the property corresponding to the specified key as a Double. * - * @throws HornetQPropertyConversionException if the value can not be converted to a Double + * @throws ActiveMQPropertyConversionException if the value can not be converted to a Double */ - Double getDoubleProperty(SimpleString key) throws HornetQPropertyConversionException; + Double getDoubleProperty(SimpleString key) throws ActiveMQPropertyConversionException; /** * @see #getDoubleProperty(SimpleString) */ - Double getDoubleProperty(String key) throws HornetQPropertyConversionException; + Double getDoubleProperty(String key) throws ActiveMQPropertyConversionException; /** * Returns the property corresponding to the specified key as an Integer. * - * @throws HornetQPropertyConversionException if the value can not be converted to an Integer + * @throws ActiveMQPropertyConversionException if the value can not be converted to an Integer */ - Integer getIntProperty(SimpleString key) throws HornetQPropertyConversionException; + Integer getIntProperty(SimpleString key) throws ActiveMQPropertyConversionException; /** * @see #getIntProperty(SimpleString) */ - Integer getIntProperty(String key) throws HornetQPropertyConversionException; + Integer getIntProperty(String key) throws ActiveMQPropertyConversionException; /** * Returns the property corresponding to the specified key as a Long. * - * @throws HornetQPropertyConversionException if the value can not be converted to a Long + * @throws ActiveMQPropertyConversionException if the value can not be converted to a Long */ - Long getLongProperty(SimpleString key) throws HornetQPropertyConversionException; + Long getLongProperty(SimpleString key) throws ActiveMQPropertyConversionException; /** * @see #getLongProperty(SimpleString) */ - Long getLongProperty(String key) throws HornetQPropertyConversionException; + Long getLongProperty(String key) throws ActiveMQPropertyConversionException; /** * Returns the property corresponding to the specified key @@ -480,62 +480,62 @@ public interface Message /** * Returns the property corresponding to the specified key as a Short. * - * @throws HornetQPropertyConversionException if the value can not be converted to a Short + * @throws ActiveMQPropertyConversionException if the value can not be converted to a Short */ - Short getShortProperty(SimpleString key) throws HornetQPropertyConversionException; + Short getShortProperty(SimpleString key) throws ActiveMQPropertyConversionException; /** * @see #getShortProperty(SimpleString) */ - Short getShortProperty(String key) throws HornetQPropertyConversionException; + Short getShortProperty(String key) throws ActiveMQPropertyConversionException; /** * Returns the property corresponding to the specified key as a Float. * - * @throws HornetQPropertyConversionException if the value can not be converted to a Float + * @throws ActiveMQPropertyConversionException if the value can not be converted to a Float */ - Float getFloatProperty(SimpleString key) throws HornetQPropertyConversionException; + Float getFloatProperty(SimpleString key) throws ActiveMQPropertyConversionException; /** * @see #getFloatProperty(SimpleString) */ - Float getFloatProperty(String key) throws HornetQPropertyConversionException; + Float getFloatProperty(String key) throws ActiveMQPropertyConversionException; /** * Returns the property corresponding to the specified key as a String. * - * @throws HornetQPropertyConversionException if the value can not be converted to a String + * @throws ActiveMQPropertyConversionException if the value can not be converted to a String */ - String getStringProperty(SimpleString key) throws HornetQPropertyConversionException; + String getStringProperty(SimpleString key) throws ActiveMQPropertyConversionException; /** * @see #getStringProperty(SimpleString) */ - String getStringProperty(String key) throws HornetQPropertyConversionException; + String getStringProperty(String key) throws ActiveMQPropertyConversionException; /** * Returns the property corresponding to the specified key as a SimpleString. * - * @throws HornetQPropertyConversionException if the value can not be converted to a SimpleString + * @throws ActiveMQPropertyConversionException if the value can not be converted to a SimpleString */ - SimpleString getSimpleStringProperty(SimpleString key) throws HornetQPropertyConversionException; + SimpleString getSimpleStringProperty(SimpleString key) throws ActiveMQPropertyConversionException; /** * @see #getSimpleStringProperty(SimpleString) */ - SimpleString getSimpleStringProperty(String key) throws HornetQPropertyConversionException; + SimpleString getSimpleStringProperty(String key) throws ActiveMQPropertyConversionException; /** * Returns the property corresponding to the specified key as a byte[]. * - * @throws HornetQPropertyConversionException if the value can not be converted to a byte[] + * @throws ActiveMQPropertyConversionException if the value can not be converted to a byte[] */ - byte[] getBytesProperty(SimpleString key) throws HornetQPropertyConversionException; + byte[] getBytesProperty(SimpleString key) throws ActiveMQPropertyConversionException; /** * @see #getBytesProperty(SimpleString) */ - byte[] getBytesProperty(String key) throws HornetQPropertyConversionException; + byte[] getBytesProperty(String key) throws ActiveMQPropertyConversionException; /** * Returns all the names of the properties for this message. 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 d43c6c5fd8..812e2d06e1 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 @@ -294,7 +294,7 @@ public class TransportConfiguration implements Serializable * * @param buffer the buffer to encode into */ - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeString(name); buffer.writeString(factoryClassName); @@ -344,7 +344,7 @@ public class TransportConfiguration implements Serializable * * @param buffer the buffer to decode from */ - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { name = buffer.readString(); factoryClassName = buffer.readString(); 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 e7567bdbf3..e652579550 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.api.core.client; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.spi.core.remoting.ConsumerContext; /** @@ -23,7 +23,7 @@ import org.apache.activemq.spi.core.remoting.ConsumerContext; * by setting a {@link MessageHandler}. *
* These 2 types of consumption are exclusive: a ClientConsumer with a MessageHandler set will - * throw HornetQException if its receive() methods are called. + * throw ActiveMQException if its receive() methods are called. * * @author Tim Fox * @author Clebert Suconic @@ -46,23 +46,23 @@ public interface ClientConsumer extends AutoCloseable *

* This call will block indefinitely until a message is received. *

- * Calling this method on a closed consumer will throw a HornetQException. + * Calling this method on a closed consumer will throw a ActiveMQException. * @return a ClientMessage - * @throws HornetQException if an exception occurs while waiting to receive a message + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while waiting to receive a message */ - ClientMessage receive() throws HornetQException; + ClientMessage receive() throws ActiveMQException; /** * Receives a message from a queue. *

* This call will block until a message is received or the given timeout expires. *

- * Calling this method on a closed consumer will throw a HornetQException. + * Calling this method on a closed consumer will throw a ActiveMQException. * @param timeout time (in milliseconds) to wait to receive a message * @return a message or {@code null} if the time out expired - * @throws HornetQException if an exception occurs while waiting to receive a message + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while waiting to receive a message */ - ClientMessage receive(long timeout) throws HornetQException; + ClientMessage receive(long timeout) throws ActiveMQException; /** * Receives a message from a queue. This call will force a network trip to HornetQ server to @@ -74,38 +74,38 @@ public interface ClientConsumer extends AutoCloseable * Note however that there is a performance cost as an additional network trip to the server may * required to check the queue status. *

- * Calling this method on a closed consumer will throw a HornetQException. + * Calling this method on a closed consumer will throw a ActiveMQException. * @return a message or {@code null} if there are no messages in the queue for this consumer - * @throws HornetQException if an exception occurs while waiting to receive a message + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while waiting to receive a message */ - ClientMessage receiveImmediate() throws HornetQException; + ClientMessage receiveImmediate() throws ActiveMQException; /** * Returns the MessageHandler associated to this consumer. *

- * Calling this method on a closed consumer will throw a HornetQException. + * Calling this method on a closed consumer will throw a ActiveMQException. * @return the MessageHandler associated to this consumer or {@code null} - * @throws HornetQException if an exception occurs while getting the MessageHandler + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while getting the MessageHandler */ - MessageHandler getMessageHandler() throws HornetQException; + MessageHandler getMessageHandler() throws ActiveMQException; /** * Sets the MessageHandler for this consumer to consume messages asynchronously. *

- * Calling this method on a closed consumer will throw a HornetQException. + * Calling this method on a closed consumer will throw a ActiveMQException. * @param handler a MessageHandler - * @throws HornetQException if an exception occurs while setting the MessageHandler + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while setting the MessageHandler */ - ClientConsumer setMessageHandler(MessageHandler handler) throws HornetQException; + ClientConsumer setMessageHandler(MessageHandler handler) throws ActiveMQException; /** * Closes the consumer. *

* Once this consumer is closed, it can not receive messages, whether synchronously or * asynchronously. - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - void close() throws HornetQException; + void close() throws ActiveMQException; /** * Returns whether the consumer is closed or not. 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 80dfb2fa25..bdfabd61d6 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 @@ -15,7 +15,7 @@ package org.apache.activemq.api.core.client; import java.io.InputStream; import java.io.OutputStream; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; @@ -49,10 +49,10 @@ public interface ClientMessage extends Message * If the session responsible to acknowledge this message has {@code autoCommitAcks} set to * {@code true}, the transaction will automatically commit the current transaction. Otherwise, * this acknowledgement will not be committed until the client commits the session transaction. - * @throws HornetQException if an error occurred while acknowledging the message. + * @throws org.apache.activemq.api.core.ActiveMQException if an error occurred while acknowledging the message. * @see ClientSession#isAutoCommitAcks() */ - ClientMessage acknowledge() throws HornetQException; + ClientMessage acknowledge() throws ActiveMQException; /** * Acknowledges reception of a single message. @@ -60,10 +60,10 @@ public interface ClientMessage extends Message * If the session responsible to acknowledge this message has {@code autoCommitAcks} set to * {@code true}, the transaction will automatically commit the current transaction. Otherwise, * this acknowledgement will not be committed until the client commits the session transaction. - * @throws HornetQException if an error occurred while acknowledging the message. + * @throws org.apache.activemq.api.core.ActiveMQException if an error occurred while acknowledging the message. * @see ClientSession#isAutoCommitAcks() */ - ClientMessage individualAcknowledge() throws HornetQException; + ClientMessage individualAcknowledge() throws ActiveMQException; /** * This can be optionally used to verify if the entire message has been received. @@ -71,9 +71,9 @@ public interface ClientMessage extends Message * The use case for this is to make sure there won't be an exception while getting the buffer. * Using getBodyBuffer directly would have the same effect but you could get a Runtime non checked Exception * instead - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - void checkCompletion() throws HornetQException; + void checkCompletion() throws ActiveMQException; /** * Returns the size (in bytes) of this message's body @@ -85,19 +85,19 @@ public interface ClientMessage extends Message *
* This method is used when consuming large messages * - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException * @return this ClientMessage */ - ClientMessage setOutputStream(OutputStream out) throws HornetQException; + ClientMessage setOutputStream(OutputStream out) throws ActiveMQException; /** * Saves the content of the message to the OutputStream. * It will block until the entire content is transferred to the OutputStream. *
* - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - void saveToOutputStream(OutputStream out) throws HornetQException; + void saveToOutputStream(OutputStream out) throws ActiveMQException; /** * Wait the outputStream completion of the message. @@ -106,9 +106,9 @@ public interface ClientMessage extends Message * * @param timeMilliseconds - 0 means wait forever * @return true if it reached the end - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - boolean waitOutputStreamCompletion(long timeMilliseconds) throws HornetQException; + boolean waitOutputStreamCompletion(long timeMilliseconds) throws ActiveMQException; /** * Sets the body's IntputStream. diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientProducer.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientProducer.java index 8b50a5b74a..d7ef7523ea 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientProducer.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientProducer.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.api.core.client; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; @@ -57,9 +57,9 @@ public interface ClientProducer extends AutoCloseable * {@link ServerLocator#setBlockOnNonDurableSend(boolean)} are set to true for the * specified message type. * @param message the message to send - * @throws HornetQException if an exception occurs while sending the message + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while sending the message */ - void send(Message message) throws HornetQException; + void send(Message message) throws ActiveMQException; /** * Sends a message to the specified address instead of the ClientProducer's address.
@@ -69,9 +69,9 @@ public interface ClientProducer extends AutoCloseable * The handler will only get called if {@link ServerLocator#setConfirmationWindowSize(int) -1}. * @param message the message to send * @param handler handler to call after receiving a SEND acknowledgement from the server - * @throws HornetQException if an exception occurs while sending the message + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while sending the message */ - void send(Message message, SendAcknowledgementHandler handler) throws HornetQException; + void send(Message message, SendAcknowledgementHandler handler) throws ActiveMQException; /** * Sends a message to the specified address instead of the ClientProducer's address.
@@ -82,9 +82,9 @@ public interface ClientProducer extends AutoCloseable * message type. * @param address the address where the message will be sent * @param message the message to send - * @throws HornetQException if an exception occurs while sending the message + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while sending the message */ - void send(SimpleString address, Message message) throws HornetQException; + void send(SimpleString address, Message message) throws ActiveMQException; /** * Sends a message to the specified address instead of the ClientProducer's address.
@@ -95,9 +95,9 @@ public interface ClientProducer extends AutoCloseable * @param address the address where the message will be sent * @param message the message to send * @param handler handler to call after receiving a SEND acknowledgement from the server - * @throws HornetQException if an exception occurs while sending the message + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while sending the message */ - void send(SimpleString address, Message message, SendAcknowledgementHandler handler) throws HornetQException; + void send(SimpleString address, Message message, SendAcknowledgementHandler handler) throws ActiveMQException; /** * Sends a message to the specified address instead of the ClientProducer's address.
@@ -108,16 +108,16 @@ public interface ClientProducer extends AutoCloseable * message type. * @param address the address where the message will be sent * @param message the message to send - * @throws HornetQException if an exception occurs while sending the message + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while sending the message */ - void send(String address, Message message) throws HornetQException; + void send(String address, Message message) throws ActiveMQException; /** * Closes the ClientProducer. If already closed nothing is done. * - * @throws HornetQException if an exception occurs while closing the producer + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while closing the producer */ - void close() throws HornetQException; + void close() throws ActiveMQException; /** * Returns whether the producer is closed or not. diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientSession.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientSession.java index 5c9ac02891..d9c7e08ca6 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientSession.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/ClientSession.java @@ -15,7 +15,7 @@ package org.apache.activemq.api.core.client; import javax.transaction.xa.XAResource; import java.util.List; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; /** @@ -111,24 +111,24 @@ public interface ClientSession extends XAResource, AutoCloseable * Starts the session. * The session must be started before ClientConsumers created by the session can consume messages from the queue. * - * @throws HornetQException if an exception occurs while starting the session + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while starting the session */ - ClientSession start() throws HornetQException; + ClientSession start() throws ActiveMQException; /** * Stops the session. * ClientConsumers created by the session can not consume messages when the session is stopped. * - * @throws HornetQException if an exception occurs while stopping the session + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while stopping the session */ - void stop() throws HornetQException; + void stop() throws ActiveMQException; /** * Closes the session. * - * @throws HornetQException if an exception occurs while closing the session + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while closing the session */ - void close() throws HornetQException; + void close() throws ActiveMQException; /** * Returns whether the session is closed or not. @@ -183,9 +183,9 @@ public interface ClientSession extends XAResource, AutoCloseable * @param address the queue will be bound to this address * @param queueName the name of the queue * @param durable whether the queue is durable or not - * @throws HornetQException in an exception occurs while creating the queue + * @throws org.apache.activemq.api.core.ActiveMQException in an exception occurs while creating the queue */ - void createQueue(SimpleString address, SimpleString queueName, boolean durable) throws HornetQException; + void createQueue(SimpleString address, SimpleString queueName, boolean durable) throws ActiveMQException; /** * Creates a transient queue. A queue that will exist as long as there are consumers. When the last consumer is closed the queue will be deleted @@ -195,9 +195,9 @@ public interface ClientSession extends XAResource, AutoCloseable * @param address the queue will be bound to this address * @param queueName the name of the queue * @param durable if the queue is durable - * @throws HornetQException in an exception occurs while creating the queue + * @throws org.apache.activemq.api.core.ActiveMQException in an exception occurs while creating the queue */ - void createSharedQueue(SimpleString address, SimpleString queueName, boolean durable) throws HornetQException; + void createSharedQueue(SimpleString address, SimpleString queueName, boolean durable) throws ActiveMQException; /** * Creates a transient queue. A queue that will exist as long as there are consumers. When the last consumer is closed the queue will be deleted @@ -208,9 +208,9 @@ public interface ClientSession extends XAResource, AutoCloseable * @param queueName the name of the queue * @param filter whether the queue is durable or not * @param durable if the queue is durable - * @throws HornetQException in an exception occurs while creating the queue + * @throws org.apache.activemq.api.core.ActiveMQException in an exception occurs while creating the queue */ - void createSharedQueue(SimpleString address, SimpleString queueName, SimpleString filter, boolean durable) throws HornetQException; + void createSharedQueue(SimpleString address, SimpleString queueName, SimpleString filter, boolean durable) throws ActiveMQException; /** * Creates a non-temporary queue. @@ -218,27 +218,27 @@ public interface ClientSession extends XAResource, AutoCloseable * @param address the queue will be bound to this address * @param queueName the name of the queue * @param durable whether the queue is durable or not - * @throws HornetQException in an exception occurs while creating the queue + * @throws org.apache.activemq.api.core.ActiveMQException in an exception occurs while creating the queue */ - void createQueue(String address, String queueName, boolean durable) throws HornetQException; + void createQueue(String address, String queueName, boolean durable) throws ActiveMQException; /** * Creates a non-temporary queue non-durable queue. * * @param address the queue will be bound to this address * @param queueName the name of the queue - * @throws HornetQException in an exception occurs while creating the queue + * @throws org.apache.activemq.api.core.ActiveMQException in an exception occurs while creating the queue */ - void createQueue(String address, String queueName) throws HornetQException; + void createQueue(String address, String queueName) throws ActiveMQException; /** * Creates a non-temporary queue non-durable queue. * * @param address the queue will be bound to this address * @param queueName the name of the queue - * @throws HornetQException in an exception occurs while creating the queue + * @throws org.apache.activemq.api.core.ActiveMQException in an exception occurs while creating the queue */ - void createQueue(SimpleString address, SimpleString queueName) throws HornetQException; + void createQueue(SimpleString address, SimpleString queueName) throws ActiveMQException; /** * Creates a non-temporary queue. @@ -247,9 +247,9 @@ public interface ClientSession extends XAResource, AutoCloseable * @param queueName the name of the queue * @param filter only messages which match this filter will be put in the queue * @param durable whether the queue is durable or not - * @throws HornetQException in an exception occurs while creating the queue + * @throws org.apache.activemq.api.core.ActiveMQException in an exception occurs while creating the queue */ - void createQueue(SimpleString address, SimpleString queueName, SimpleString filter, boolean durable) throws HornetQException; + void createQueue(SimpleString address, SimpleString queueName, SimpleString filter, boolean durable) throws ActiveMQException; /** * Creates a non-temporaryqueue. @@ -258,27 +258,27 @@ public interface ClientSession extends XAResource, AutoCloseable * @param queueName the name of the queue * @param durable whether the queue is durable or not * @param filter only messages which match this filter will be put in the queue - * @throws HornetQException in an exception occurs while creating the queue + * @throws org.apache.activemq.api.core.ActiveMQException in an exception occurs while creating the queue */ - void createQueue(String address, String queueName, String filter, boolean durable) throws HornetQException; + void createQueue(String address, String queueName, String filter, boolean durable) throws ActiveMQException; /** * Creates a temporary queue. * * @param address the queue will be bound to this address * @param queueName the name of the queue - * @throws HornetQException in an exception occurs while creating the queue + * @throws org.apache.activemq.api.core.ActiveMQException in an exception occurs while creating the queue */ - void createTemporaryQueue(SimpleString address, SimpleString queueName) throws HornetQException; + void createTemporaryQueue(SimpleString address, SimpleString queueName) throws ActiveMQException; /** * Creates a temporary queue. * * @param address the queue will be bound to this address * @param queueName the name of the queue - * @throws HornetQException in an exception occurs while creating the queue + * @throws org.apache.activemq.api.core.ActiveMQException in an exception occurs while creating the queue */ - void createTemporaryQueue(String address, String queueName) throws HornetQException; + void createTemporaryQueue(String address, String queueName) throws ActiveMQException; /** * Creates a temporary queue with a filter. @@ -286,9 +286,9 @@ public interface ClientSession extends XAResource, AutoCloseable * @param address the queue will be bound to this address * @param queueName the name of the queue * @param filter only messages which match this filter will be put in the queue - * @throws HornetQException in an exception occurs while creating the queue + * @throws org.apache.activemq.api.core.ActiveMQException in an exception occurs while creating the queue */ - void createTemporaryQueue(SimpleString address, SimpleString queueName, SimpleString filter) throws HornetQException; + void createTemporaryQueue(SimpleString address, SimpleString queueName, SimpleString filter) throws ActiveMQException; /** * Creates a temporary queue with a filter. @@ -296,25 +296,25 @@ public interface ClientSession extends XAResource, AutoCloseable * @param address the queue will be bound to this address * @param queueName the name of the queue * @param filter only messages which match this filter will be put in the queue - * @throws HornetQException in an exception occurs while creating the queue + * @throws org.apache.activemq.api.core.ActiveMQException in an exception occurs while creating the queue */ - void createTemporaryQueue(String address, String queueName, String filter) throws HornetQException; + void createTemporaryQueue(String address, String queueName, String filter) throws ActiveMQException; /** * Deletes the queue. * * @param queueName the name of the queue to delete - * @throws HornetQException if there is no queue for the given name or if the queue has consumers + * @throws org.apache.activemq.api.core.ActiveMQException if there is no queue for the given name or if the queue has consumers */ - void deleteQueue(SimpleString queueName) throws HornetQException; + void deleteQueue(SimpleString queueName) throws ActiveMQException; /** * Deletes the queue. * * @param queueName the name of the queue to delete - * @throws HornetQException if there is no queue for the given name or if the queue has consumers + * @throws org.apache.activemq.api.core.ActiveMQException if there is no queue for the given name or if the queue has consumers */ - void deleteQueue(String queueName) throws HornetQException; + void deleteQueue(String queueName) throws ActiveMQException; // Consumer Operations ------------------------------------------- @@ -323,18 +323,18 @@ public interface ClientSession extends XAResource, AutoCloseable * * @param queueName name of the queue to consume messages from * @return a ClientConsumer - * @throws HornetQException if an exception occurs while creating the ClientConsumer + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the ClientConsumer */ - ClientConsumer createConsumer(SimpleString queueName) throws HornetQException; + ClientConsumer createConsumer(SimpleString queueName) throws ActiveMQException; /** * Creates a ClientConsumer to consume messages from the queue with the given name. * * @param queueName name of the queue to consume messages from * @return a ClientConsumer - * @throws HornetQException if an exception occurs while creating the ClientConsumer + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the ClientConsumer */ - ClientConsumer createConsumer(String queueName) throws HornetQException; + ClientConsumer createConsumer(String queueName) throws ActiveMQException; /** * Creates a ClientConsumer to consume messages matching the filter from the queue with the given name. @@ -342,9 +342,9 @@ public interface ClientSession extends XAResource, AutoCloseable * @param queueName name of the queue to consume messages from * @param filter only messages which match this filter will be consumed * @return a ClientConsumer - * @throws HornetQException if an exception occurs while creating the ClientConsumer + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the ClientConsumer */ - ClientConsumer createConsumer(SimpleString queueName, SimpleString filter) throws HornetQException; + ClientConsumer createConsumer(SimpleString queueName, SimpleString filter) throws ActiveMQException; /** * Creates a ClientConsumer to consume messages matching the filter from the queue with the given name. @@ -352,9 +352,9 @@ public interface ClientSession extends XAResource, AutoCloseable * @param queueName name of the queue to consume messages from * @param filter only messages which match this filter will be consumed * @return a ClientConsumer - * @throws HornetQException if an exception occurs while creating the ClientConsumer + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the ClientConsumer */ - ClientConsumer createConsumer(String queueName, String filter) throws HornetQException; + ClientConsumer createConsumer(String queueName, String filter) throws ActiveMQException; /** * Creates a ClientConsumer to consume or browse messages from the queue with the given name. @@ -370,9 +370,9 @@ public interface ClientSession extends XAResource, AutoCloseable * @param queueName name of the queue to consume messages from * @param browseOnly whether the ClientConsumer will only browse the queue or consume messages. * @return a ClientConsumer - * @throws HornetQException if an exception occurs while creating the ClientConsumer + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the ClientConsumer */ - ClientConsumer createConsumer(SimpleString queueName, boolean browseOnly) throws HornetQException; + ClientConsumer createConsumer(SimpleString queueName, boolean browseOnly) throws ActiveMQException; /** * Creates a ClientConsumer to consume or browse messages from the queue with the given name. @@ -388,9 +388,9 @@ public interface ClientSession extends XAResource, AutoCloseable * @param queueName name of the queue to consume messages from * @param browseOnly whether the ClientConsumer will only browse the queue or consume messages. * @return a ClientConsumer - * @throws HornetQException if an exception occurs while creating the ClientConsumer + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the ClientConsumer */ - ClientConsumer createConsumer(String queueName, boolean browseOnly) throws HornetQException; + ClientConsumer createConsumer(String queueName, boolean browseOnly) throws ActiveMQException; /** * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with @@ -408,9 +408,9 @@ public interface ClientSession extends XAResource, AutoCloseable * @param filter only messages which match this filter will be consumed * @param browseOnly whether the ClientConsumer will only browse the queue or consume messages. * @return a ClientConsumer - * @throws HornetQException if an exception occurs while creating the ClientConsumer + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the ClientConsumer */ - ClientConsumer createConsumer(String queueName, String filter, boolean browseOnly) throws HornetQException; + ClientConsumer createConsumer(String queueName, String filter, boolean browseOnly) throws ActiveMQException; /** * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with @@ -428,9 +428,9 @@ public interface ClientSession extends XAResource, AutoCloseable * @param filter only messages which match this filter will be consumed * @param browseOnly whether the ClientConsumer will only browse the queue or consume messages. * @return a ClientConsumer - * @throws HornetQException if an exception occurs while creating the ClientConsumer + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the ClientConsumer */ - ClientConsumer createConsumer(SimpleString queueName, SimpleString filter, boolean browseOnly) throws HornetQException; + ClientConsumer createConsumer(SimpleString queueName, SimpleString filter, boolean browseOnly) throws ActiveMQException; /** * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with @@ -450,13 +450,13 @@ public interface ClientSession extends XAResource, AutoCloseable * @param maxRate the maximum rate to consume messages * @param browseOnly whether the ClientConsumer will only browse the queue or consume messages. * @return a ClientConsumer - * @throws HornetQException if an exception occurs while creating the ClientConsumer + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the ClientConsumer */ ClientConsumer createConsumer(SimpleString queueName, SimpleString filter, int windowSize, int maxRate, - boolean browseOnly) throws HornetQException; + boolean browseOnly) throws ActiveMQException; /** * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with @@ -476,9 +476,9 @@ public interface ClientSession extends XAResource, AutoCloseable * @param maxRate the maximum rate to consume messages * @param browseOnly whether the ClientConsumer will only browse the queue or consume messages. * @return a ClientConsumer - * @throws HornetQException if an exception occurs while creating the ClientConsumer + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the ClientConsumer */ - ClientConsumer createConsumer(String queueName, String filter, int windowSize, int maxRate, boolean browseOnly) throws HornetQException; + ClientConsumer createConsumer(String queueName, String filter, int windowSize, int maxRate, boolean browseOnly) throws ActiveMQException; // Producer Operations ------------------------------------------- @@ -489,25 +489,25 @@ public interface ClientSession extends XAResource, AutoCloseable * @return a ClientProducer * @see ClientProducer#send(SimpleString, org.apache.activemq.api.core.Message) */ - ClientProducer createProducer() throws HornetQException; + ClientProducer createProducer() throws ActiveMQException; /** * Creates a producer which sends messages to the given address * * @param address the address to send messages to * @return a ClientProducer - * @throws HornetQException if an exception occurs while creating the ClientProducer + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the ClientProducer */ - ClientProducer createProducer(SimpleString address) throws HornetQException; + ClientProducer createProducer(SimpleString address) throws ActiveMQException; /** * Creates a producer which sends messages to the given address * * @param address the address to send messages to * @return a ClientProducer - * @throws HornetQException if an exception occurs while creating the ClientProducer + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the ClientProducer */ - ClientProducer createProducer(String address) throws HornetQException; + ClientProducer createProducer(String address) throws ActiveMQException; /** * Creates a producer which sends messages to the given address @@ -515,9 +515,9 @@ public interface ClientSession extends XAResource, AutoCloseable * @param address the address to send messages to * @param rate the producer rate * @return a ClientProducer - * @throws HornetQException if an exception occurs while creating the ClientProducer + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the ClientProducer */ - ClientProducer createProducer(SimpleString address, int rate) throws HornetQException; + ClientProducer createProducer(SimpleString address, int rate) throws ActiveMQException; // Message operations -------------------------------------------- @@ -557,18 +557,18 @@ public interface ClientSession extends XAResource, AutoCloseable * * @param queueName the name of the queue to query * @return a QueueQuery containing information on the given queue - * @throws HornetQException if an exception occurs while querying the queue + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while querying the queue */ - QueueQuery queueQuery(SimpleString queueName) throws HornetQException; + QueueQuery queueQuery(SimpleString queueName) throws ActiveMQException; /** * Queries information on a binding. * * @param address the address of the biding to query * @return a AddressQuery containing information on the binding attached to the given address - * @throws HornetQException if an exception occurs while querying the binding + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while querying the binding */ - AddressQuery addressQuery(SimpleString address) throws HornetQException; + AddressQuery addressQuery(SimpleString address) throws ActiveMQException; // Transaction operations ---------------------------------------- @@ -589,24 +589,24 @@ public interface ClientSession extends XAResource, AutoCloseable /** * Commits the current transaction. * - * @throws HornetQException if an exception occurs while committing the transaction + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while committing the transaction */ - void commit() throws HornetQException; + void commit() throws ActiveMQException; /** * Rolls back the current transaction. * - * @throws HornetQException if an exception occurs while rolling back the transaction + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while rolling back the transaction */ - void rollback() throws HornetQException; + void rollback() throws ActiveMQException; /** * Rolls back the current transaction. * * @param considerLastMessageAsDelivered the first message on deliveringMessage Buffer is considered as delivered - * @throws HornetQException if an exception occurs while rolling back the transaction + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while rolling back the transaction */ - void rollback(boolean considerLastMessageAsDelivered) throws HornetQException; + void rollback(boolean considerLastMessageAsDelivered) throws ActiveMQException; /** * Returns true if the current transaction has been flagged to rollback, false else. @@ -649,18 +649,18 @@ public interface ClientSession extends XAResource, AutoCloseable /** * Attach any metadata to the session. * - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - void addMetaData(String key, String data) throws HornetQException; + void addMetaData(String key, String data) throws ActiveMQException; /** * Attach any metadata to the session. Throws an exception if there's already a metadata available. * You can use this metadata to ensure that there is no other session with the same meta-data you are passing as an argument. * This is useful to simulate unique client-ids, where you may want to avoid multiple instances of your client application connected. * - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - void addUniqueMetaData(String key, String data) throws HornetQException; + void addUniqueMetaData(String key, String data) throws ActiveMQException; /** * Return the sessionFactory used to created this Session. 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 80bcf10d5b..f15061f3f1 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.api.core.client; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.spi.core.protocol.RemotingConnection; @@ -31,9 +31,9 @@ public interface ClientSessionFactory extends AutoCloseable * Creates a session with XA transaction semantics. * * @return a ClientSession with XA transaction semantics - * @throws HornetQException if an exception occurs while creating the session + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the session */ - ClientSession createXASession() throws HornetQException; + ClientSession createXASession() throws ActiveMQException; /** * Creates a transacted session. @@ -41,10 +41,10 @@ public interface ClientSessionFactory extends AutoCloseable * It is up to the client to commit when sending and acknowledging messages. * * @return a transacted ClientSession - * @throws HornetQException if an exception occurs while creating the session + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the session * @see ClientSession#commit() */ - ClientSession createTransactedSession() throws HornetQException; + ClientSession createTransactedSession() throws ActiveMQException; /** @@ -54,9 +54,9 @@ public interface ClientSessionFactory extends AutoCloseable * the session will automatically commit the transaction containing the acknowledgements. * * @return a non-transacted ClientSession - * @throws HornetQException if an exception occurs while creating the session + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the session */ - ClientSession createSession() throws HornetQException; + ClientSession createSession() throws ActiveMQException; /** * Creates a session. @@ -64,9 +64,9 @@ public interface ClientSessionFactory extends AutoCloseable * @param autoCommitSends true to automatically commit message sends, false to commit manually * @param autoCommitAcks true to automatically commit message acknowledgement, false to commit manually * @return a ClientSession - * @throws HornetQException if an exception occurs while creating the session + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the session */ - ClientSession createSession(boolean autoCommitSends, boolean autoCommitAcks) throws HornetQException; + ClientSession createSession(boolean autoCommitSends, boolean autoCommitAcks) throws ActiveMQException; /** * Creates a session. @@ -75,9 +75,9 @@ public interface ClientSessionFactory extends AutoCloseable * @param autoCommitAcks true to automatically commit message acknowledgement, false to commit manually * @param ackBatchSize the batch size of the acknowledgements * @return a ClientSession - * @throws HornetQException if an exception occurs while creating the session + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the session */ - ClientSession createSession(boolean autoCommitSends, boolean autoCommitAcks, int ackBatchSize) throws HornetQException; + ClientSession createSession(boolean autoCommitSends, boolean autoCommitAcks, int ackBatchSize) throws ActiveMQException; /** * Creates a session. @@ -86,9 +86,9 @@ public interface ClientSessionFactory extends AutoCloseable * @param autoCommitSends true to automatically commit message sends, false to commit manually * @param autoCommitAcks true to automatically commit message acknowledgement, false to commit manually * @return a ClientSession - * @throws HornetQException if an exception occurs while creating the session + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the session */ - ClientSession createSession(boolean xa, boolean autoCommitSends, boolean autoCommitAcks) throws HornetQException; + ClientSession createSession(boolean xa, boolean autoCommitSends, boolean autoCommitAcks) throws ActiveMQException; /** * Creates a session. @@ -102,9 +102,9 @@ public interface ClientSessionFactory extends AutoCloseable * @param autoCommitAcks true to automatically commit message acknowledgement, false to commit manually * @param preAcknowledge true to pre-acknowledge messages on the server, false to let the client acknowledge the messages * @return a ClientSession - * @throws HornetQException if an exception occurs while creating the session + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the session */ - ClientSession createSession(boolean xa, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge) throws HornetQException; + ClientSession createSession(boolean xa, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge) throws ActiveMQException; /** * Creates an authenticated session. @@ -120,7 +120,7 @@ public interface ClientSessionFactory extends AutoCloseable * @param autoCommitAcks true to automatically commit message acknowledgement, false to commit manually * @param preAcknowledge true to pre-acknowledge messages on the server, false to let the client acknowledge the messages * @return a ClientSession - * @throws HornetQException if an exception occurs while creating the session + * @throws org.apache.activemq.api.core.ActiveMQException if an exception occurs while creating the session */ ClientSession createSession(String username, String password, @@ -128,7 +128,7 @@ public interface ClientSessionFactory extends AutoCloseable boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, - int ackBatchSize) throws HornetQException; + int ackBatchSize) throws ActiveMQException; /** * Closes this factory and any session created by it. 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 087b28700f..e4a41fc215 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 @@ -165,7 +165,7 @@ public interface ServerLocator extends AutoCloseable * Returns the blocking calls timeout. *

* If client's blocking calls to the server take more than this timeout, the call will throw a - * {@link org.apache.activemq.api.core.HornetQException} with the code {@link org.apache.activemq.api.core.HornetQExceptionType#CONNECTION_TIMEDOUT}. Value + * {@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}. * * @return the blocking calls timeout diff --git a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/SessionFailureListener.java b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/SessionFailureListener.java index 8317af24a1..26d215050c 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/SessionFailureListener.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/api/core/client/SessionFailureListener.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.api.core.client; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.remoting.FailureListener; /** @@ -29,5 +29,5 @@ public interface SessionFailureListener extends FailureListener * * @param exception exception which has caused the connection to fail */ - void beforeReconnect(HornetQException exception); + void beforeReconnect(ActiveMQException exception); } 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/HornetQServerControl.java index 8c7e5c7645..8da629c9a6 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/HornetQServerControl.java @@ -316,7 +316,7 @@ public interface HornetQServerControl /** * Create a durable queue. *
- * This method throws a {@link org.apache.activemq.api.core.HornetQQueueExistsException}) exception if the queue already exits. + * This method throws a {@link org.apache.activemq.api.core.ActiveMQQueueExistsException}) exception if the queue already exits. * * @param address address to bind the queue to * @param name name of the queue @@ -328,7 +328,7 @@ public interface HornetQServerControl /** * Create a queue. *
- * This method throws a {@link org.apache.activemq.api.core.HornetQQueueExistsException}) exception if the queue already exits. + * This method throws a {@link org.apache.activemq.api.core.ActiveMQQueueExistsException}) exception if the queue already exits. * * @param address address to bind the queue to * @param name name of the queue @@ -344,7 +344,7 @@ public interface HornetQServerControl /** * Create a queue. *
- * This method throws a {@link org.apache.activemq.api.core.HornetQQueueExistsException}) exception if the queue already exits. + * This method throws a {@link org.apache.activemq.api.core.ActiveMQQueueExistsException}) exception if the queue already exits. * * @param address address to bind the queue to * @param name name of the queue 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/ResetLimitWrappedHornetQBuffer.java index 4f01f74c7a..71ef0a4bc1 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/ResetLimitWrappedHornetQBuffer.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.buffers.impl; import java.nio.ByteBuffer; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.message.impl.MessageInternal; @@ -40,7 +40,7 @@ public final class ResetLimitWrappedHornetQBuffer extends ChannelBufferWrapper this.message = message; } - public ResetLimitWrappedHornetQBuffer(final int limit, final HornetQBuffer buffer, final MessageInternal message) + public ResetLimitWrappedHornetQBuffer(final int limit, final ActiveMQBuffer buffer, final MessageInternal message) { super(buffer.byteBuf()); @@ -64,7 +64,7 @@ public final class ResetLimitWrappedHornetQBuffer extends ChannelBufferWrapper } } - public void setBuffer(final HornetQBuffer buffer) + public void setBuffer(final ActiveMQBuffer buffer) { if (this.buffer != null) { @@ -175,7 +175,7 @@ public final class ResetLimitWrappedHornetQBuffer extends ChannelBufferWrapper } @Override - public void setBytes(final int index, final HornetQBuffer src, final int srcIndex, final int length) + public void setBytes(final int index, final ActiveMQBuffer src, final int srcIndex, final int length) { changed(); @@ -183,7 +183,7 @@ public final class ResetLimitWrappedHornetQBuffer extends ChannelBufferWrapper } @Override - public void setBytes(final int index, final HornetQBuffer src, final int length) + public void setBytes(final int index, final ActiveMQBuffer src, final int length) { changed(); @@ -191,7 +191,7 @@ public final class ResetLimitWrappedHornetQBuffer extends ChannelBufferWrapper } @Override - public void setBytes(final int index, final HornetQBuffer src) + public void setBytes(final int index, final ActiveMQBuffer src) { changed(); @@ -287,7 +287,7 @@ public final class ResetLimitWrappedHornetQBuffer extends ChannelBufferWrapper } @Override - public void writeBytes(final HornetQBuffer src, final int srcIndex, final int length) + public void writeBytes(final ActiveMQBuffer src, final int srcIndex, final int length) { changed(); @@ -295,7 +295,7 @@ public final class ResetLimitWrappedHornetQBuffer extends ChannelBufferWrapper } @Override - public void writeBytes(final HornetQBuffer src, final int length) + public void writeBytes(final ActiveMQBuffer src, final int length) { changed(); 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/HornetQClientLogger.java index 3e63af852d..742bb34874 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/HornetQClientLogger.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.client; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.core.protocol.core.Packet; import org.jboss.logging.BasicLogger; @@ -223,7 +223,7 @@ public interface HornetQClientLogger extends BasicLogger @LogMessage(level = Logger.Level.WARN) @Message(id = 212037, value = "Connection failure has been detected: {0} [code={1}]", format = Message.Format.MESSAGE_FORMAT) - void connectionFailureDetected(String message, HornetQExceptionType type); + void connectionFailureDetected(String message, ActiveMQExceptionType type); @LogMessage(level = Logger.Level.WARN) @Message(id = 212038, value = "Failure in calling interceptor: {0}", format = Message.Format.MESSAGE_FORMAT) 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/HornetQClientMessageBundle.java index d69b30a426..9dbb2335cb 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/HornetQClientMessageBundle.java @@ -14,19 +14,19 @@ package org.apache.activemq.core.client; -import org.apache.activemq.api.core.HornetQAddressFullException; -import org.apache.activemq.api.core.HornetQConnectionTimedOutException; -import org.apache.activemq.api.core.HornetQDisconnectedException; -import org.apache.activemq.api.core.HornetQIllegalStateException; -import org.apache.activemq.api.core.HornetQInterceptorRejectedPacketException; -import org.apache.activemq.api.core.HornetQInternalErrorException; -import org.apache.activemq.api.core.HornetQLargeMessageException; -import org.apache.activemq.api.core.HornetQLargeMessageInterruptedException; -import org.apache.activemq.api.core.HornetQNotConnectedException; -import org.apache.activemq.api.core.HornetQObjectClosedException; -import org.apache.activemq.api.core.HornetQTransactionOutcomeUnknownException; -import org.apache.activemq.api.core.HornetQTransactionRolledBackException; -import org.apache.activemq.api.core.HornetQUnBlockedException; +import org.apache.activemq.api.core.ActiveMQAddressFullException; +import org.apache.activemq.api.core.ActiveMQConnectionTimedOutException; +import org.apache.activemq.api.core.ActiveMQDisconnectedException; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQInterceptorRejectedPacketException; +import org.apache.activemq.api.core.ActiveMQInternalErrorException; +import org.apache.activemq.api.core.ActiveMQLargeMessageException; +import org.apache.activemq.api.core.ActiveMQLargeMessageInterruptedException; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; +import org.apache.activemq.api.core.ActiveMQObjectClosedException; +import org.apache.activemq.api.core.ActiveMQTransactionOutcomeUnknownException; +import org.apache.activemq.api.core.ActiveMQTransactionRolledBackException; +import org.apache.activemq.api.core.ActiveMQUnBlockedException; import org.apache.activemq.core.cluster.DiscoveryGroup; import org.apache.activemq.spi.core.remoting.Connection; import org.jboss.logging.annotations.Cause; @@ -51,105 +51,105 @@ public interface HornetQClientMessageBundle HornetQClientMessageBundle BUNDLE = Messages.getBundle(HornetQClientMessageBundle.class); @Message(id = 119000, value = "ClientSession closed while creating session", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException clientSessionClosed(); + ActiveMQInternalErrorException clientSessionClosed(); @Message(id = 119001, value = "Failed to create session", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException failedToCreateSession(@Cause Throwable t); + ActiveMQInternalErrorException failedToCreateSession(@Cause Throwable t); @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) - HornetQInternalErrorException clietSessionInternal(); + ActiveMQInternalErrorException clietSessionInternal(); @Message(id = 119003, value = "Queue can not be both durable and temporary", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException queueMisConfigured(); + ActiveMQInternalErrorException queueMisConfigured(); @Message(id = 119004, value = "Failed to initialise session factory", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException failedToInitialiseSessionFactory(@Cause Exception e); + ActiveMQInternalErrorException failedToInitialiseSessionFactory(@Cause Exception e); @Message(id = 119005, value = "Exception in Netty transport", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException nettyError(); + ActiveMQInternalErrorException nettyError(); @Message(id = 119006, value = "Channel disconnected", format = Message.Format.MESSAGE_FORMAT) - HornetQNotConnectedException channelDisconnected(); + ActiveMQNotConnectedException channelDisconnected(); @Message(id = 119007, value = "Cannot connect to server(s). Tried with all available servers.", format = Message.Format.MESSAGE_FORMAT) - HornetQNotConnectedException cannotConnectToServers(); + ActiveMQNotConnectedException cannotConnectToServers(); @Message(id = 119008, value = "Failed to connect to any static connectors", format = Message.Format.MESSAGE_FORMAT) - HornetQNotConnectedException cannotConnectToStaticConnectors(@Cause Exception e); + ActiveMQNotConnectedException cannotConnectToStaticConnectors(@Cause Exception e); @Message(id = 119009, value = "Failed to connect to any static connectors", format = Message.Format.MESSAGE_FORMAT) - HornetQNotConnectedException cannotConnectToStaticConnectors2(); + ActiveMQNotConnectedException cannotConnectToStaticConnectors2(); @Message(id = 119010, value = "Connection is destroyed", format = Message.Format.MESSAGE_FORMAT) - HornetQNotConnectedException connectionDestroyed(); + ActiveMQNotConnectedException connectionDestroyed(); @Message(id = 119011, value = "Did not receive data from server for {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQConnectionTimedOutException connectionTimedOut(Connection transportConnection); + ActiveMQConnectionTimedOutException connectionTimedOut(Connection transportConnection); @Message(id = 119012, value = "Timed out waiting to receive initial broadcast from cluster", format = Message.Format.MESSAGE_FORMAT) - HornetQConnectionTimedOutException connectionTimedOutInInitialBroadcast(); + ActiveMQConnectionTimedOutException connectionTimedOutInInitialBroadcast(); @Message(id = 119013, value = "Timed out waiting to receive cluster topology. Group:{0}", format = Message.Format.MESSAGE_FORMAT) - HornetQConnectionTimedOutException connectionTimedOutOnReceiveTopology(DiscoveryGroup discoveryGroup); + ActiveMQConnectionTimedOutException connectionTimedOutOnReceiveTopology(DiscoveryGroup discoveryGroup); @Message(id = 119014, value = "Timed out waiting for response when sending packet {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQConnectionTimedOutException timedOutSendingPacket(Byte type); + ActiveMQConnectionTimedOutException timedOutSendingPacket(Byte type); @Message(id = 119015, value = "The connection was disconnected because of server shutdown", format = Message.Format.MESSAGE_FORMAT) - HornetQDisconnectedException disconnected(); + ActiveMQDisconnectedException disconnected(); @Message(id = 119016, value = "Connection failure detected. Unblocking a blocking call that will never get a resp" + "onse", format = Message.Format.MESSAGE_FORMAT) - HornetQUnBlockedException unblockingACall(@Cause Throwable t); + ActiveMQUnBlockedException unblockingACall(@Cause Throwable t); @Message(id = 119017, value = "Consumer is closed", format = Message.Format.MESSAGE_FORMAT) - HornetQObjectClosedException consumerClosed(); + ActiveMQObjectClosedException consumerClosed(); @Message(id = 119018, value = "Producer is closed", format = Message.Format.MESSAGE_FORMAT) - HornetQObjectClosedException producerClosed(); + ActiveMQObjectClosedException producerClosed(); @Message(id = 119019, value = "Session is closed", format = Message.Format.MESSAGE_FORMAT) - HornetQObjectClosedException sessionClosed(); + ActiveMQObjectClosedException sessionClosed(); @Message(id = 119020, value = "Cannot call receive(...) - a MessageHandler is set", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException messageHandlerSet(); + ActiveMQIllegalStateException messageHandlerSet(); @Message(id = 119021, value = "Cannot set MessageHandler - consumer is in receive(...)", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException inReceive(); + ActiveMQIllegalStateException inReceive(); @Message(id = 119022, value = "Header size ({0}) is too big, use the messageBody for large data, or increase minLargeMessageSize", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException headerSizeTooBig(Integer headerSize); + ActiveMQIllegalStateException headerSizeTooBig(Integer headerSize); @Message(id = 119023, value = "The large message lost connection with its session, either because of a rollback or a closed session", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException largeMessageLostSession(); + ActiveMQIllegalStateException largeMessageLostSession(); @Message(id = 119024, value = "Could not select a TransportConfiguration to create SessionFactory", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException noTCForSessionFactory(); + ActiveMQIllegalStateException noTCForSessionFactory(); @Message(id = 119025, value = "Error saving the message body", format = Message.Format.MESSAGE_FORMAT) - HornetQLargeMessageException errorSavingBody(@Cause Exception e); + ActiveMQLargeMessageException errorSavingBody(@Cause Exception e); @Message(id = 119026, value = "Error reading the LargeMessageBody", format = Message.Format.MESSAGE_FORMAT) - HornetQLargeMessageException errorReadingBody(@Cause Exception e); + ActiveMQLargeMessageException errorReadingBody(@Cause Exception e); @Message(id = 119027, value = "Error closing stream from LargeMessageBody", format = Message.Format.MESSAGE_FORMAT) - HornetQLargeMessageException errorClosingLargeMessage(@Cause Exception e); + ActiveMQLargeMessageException errorClosingLargeMessage(@Cause Exception e); @Message(id = 119028, value = "Timeout waiting for LargeMessage Body", format = Message.Format.MESSAGE_FORMAT) - HornetQLargeMessageException timeoutOnLargeMessage(); + ActiveMQLargeMessageException timeoutOnLargeMessage(); @Message(id = 119029, value = "Error writing body of message", format = Message.Format.MESSAGE_FORMAT) - HornetQLargeMessageException errorWritingLargeMessage(@Cause Exception e); + ActiveMQLargeMessageException errorWritingLargeMessage(@Cause Exception e); @Message(id = 119030, value = "The transaction was rolled back on failover to a backup server", format = Message.Format.MESSAGE_FORMAT) - HornetQTransactionRolledBackException txRolledBack(); + ActiveMQTransactionRolledBackException txRolledBack(); @Message(id = 119031, value = "The transaction was rolled back on failover however commit may have been successful" + "", format = Message.Format.MESSAGE_FORMAT) - HornetQTransactionOutcomeUnknownException txOutcomeUnknown(); + ActiveMQTransactionOutcomeUnknownException txOutcomeUnknown(); @Message(id = 119032, value = "Invalid type: {0}", format = Message.Format.MESSAGE_FORMAT) IllegalArgumentException invalidType(Object type); @@ -231,15 +231,15 @@ public interface HornetQClientMessageBundle IllegalArgumentException errordecodingPassword(@Cause Exception e); @Message(id = 119058, value = "Address \"{0}\" is full. Message encode size = {1}B", format = Message.Format.MESSAGE_FORMAT) - HornetQAddressFullException addressIsFull(String addressName, int size); + ActiveMQAddressFullException addressIsFull(String addressName, int size); @Message(id = 119059, value = "Interceptor {0} rejected packet in a blocking call. This call will never complete." , format = Message.Format.MESSAGE_FORMAT) - HornetQInterceptorRejectedPacketException interceptorRejectedPacket(String interceptionResult); + ActiveMQInterceptorRejectedPacketException interceptorRejectedPacket(String interceptionResult); @Message(id = 119060, value = "Large Message Transmission interrupted on consumer shutdown." , format = Message.Format.MESSAGE_FORMAT) - HornetQLargeMessageInterruptedException largeMessageInterrupted(); + ActiveMQLargeMessageInterruptedException largeMessageInterrupted(); @Message(id = 119061, value = "error decoding AMQP frame", format = Message.Format.MESSAGE_FORMAT) String decodeError(); 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 e7ef46dd70..c145186904 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 @@ -20,9 +20,9 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQInterruptedException; +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.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientMessage; @@ -186,7 +186,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal return consumerContext; } - private ClientMessage receive(final long timeout, final boolean forcingDelivery) throws HornetQException + private ClientMessage receive(final long timeout, final boolean forcingDelivery) throws ActiveMQException { checkClosed(); @@ -259,7 +259,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } if (m != null || closed) @@ -391,7 +391,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal } } - public ClientMessage receive(final long timeout) throws HornetQException + public ClientMessage receive(final long timeout) throws ActiveMQException { ClientMessage msg = receive(timeout, false); @@ -403,17 +403,17 @@ public final class ClientConsumerImpl implements ClientConsumerInternal return msg; } - public ClientMessage receive() throws HornetQException + public ClientMessage receive() throws ActiveMQException { return receive(0, false); } - public ClientMessage receiveImmediate() throws HornetQException + public ClientMessage receiveImmediate() throws ActiveMQException { return receive(0, true); } - public MessageHandler getMessageHandler() throws HornetQException + public MessageHandler getMessageHandler() throws ActiveMQException { checkClosed(); @@ -422,7 +422,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal // Must be synchronized since messages may be arriving while handler is being set and might otherwise end // up not queueing enough executors - so messages get stranded - public synchronized ClientConsumerImpl setMessageHandler(final MessageHandler theHandler) throws HornetQException + public synchronized ClientConsumerImpl setMessageHandler(final MessageHandler theHandler) throws ActiveMQException { checkClosed(); @@ -454,7 +454,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal return this; } - public void close() throws HornetQException + public void close() throws ActiveMQException { doCleanUp(true); } @@ -462,10 +462,10 @@ public final class ClientConsumerImpl implements ClientConsumerInternal /** * To be used by MDBs to stop any more handling of messages. * - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException * @param future the future to run once the onMessage Thread has completed */ - public Thread prepareForClose(final FutureLatch future) throws HornetQException + public Thread prepareForClose(final FutureLatch future) throws ActiveMQException { closing = true; @@ -490,7 +490,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { doCleanUp(false); } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQClientLogger.LOGGER.warn("problem cleaning up: " + this); } @@ -501,7 +501,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal return closed; } - public void stop(final boolean waitForOnMessage) throws HornetQException + public void stop(final boolean waitForOnMessage) throws ActiveMQException { waitForOnMessageToComplete(waitForOnMessage); @@ -661,7 +661,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal currentLargeMessageController.setLocal(true); //sets the packet - HornetQBuffer qbuff = clMessage.getBodyBuffer(); + ActiveMQBuffer qbuff = clMessage.getBodyBuffer(); int bytesToRead = qbuff.writerIndex() - qbuff.readerIndex(); final byte[] body = qbuff.readBytes(bytesToRead).toByteBuffer().array(); @@ -727,7 +727,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal } } - public void clear(boolean waitForOnMessage) throws HornetQException + public void clear(boolean waitForOnMessage) throws ActiveMQException { synchronized (this) { @@ -794,7 +794,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal return buffer.size(); } - public void acknowledge(final ClientMessage message) throws HornetQException + public void acknowledge(final ClientMessage message) throws ActiveMQException { ClientMessageInternal cmi = (ClientMessageInternal) message; @@ -817,7 +817,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal } } - public void individualAcknowledge(ClientMessage message) throws HornetQException + public void individualAcknowledge(ClientMessage message) throws ActiveMQException { if (lastAckedMessage != null) { @@ -827,7 +827,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal session.individualAcknowledge(this, message); } - public void flushAcks() throws HornetQException + public void flushAcks() throws ActiveMQException { if (lastAckedMessage != null) { @@ -841,7 +841,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal * * @param discountSlowConsumer When dealing with slowConsumers, we need to discount one credit that was pre-sent when the first receive was called. For largeMessage that is only done at the latest packet */ - public void flowControl(final int messageBytes, final boolean discountSlowConsumer) throws HornetQException + public void flowControl(final int messageBytes, final boolean discountSlowConsumer) throws ActiveMQException { if (clientWindowSize >= 0) { @@ -945,7 +945,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } } @@ -1015,7 +1015,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal } } - private void checkClosed() throws HornetQException + private void checkClosed() throws ActiveMQException { if (closed) { @@ -1139,9 +1139,9 @@ public final class ClientConsumerImpl implements ClientConsumerInternal /** * @param message - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - private void flowControlBeforeConsumption(final ClientMessageInternal message) throws HornetQException + private void flowControlBeforeConsumption(final ClientMessageInternal message) throws ActiveMQException { // Chunk messages will execute the flow control while receiving the chunks if (message.getFlowControlSize() != 0) @@ -1151,7 +1151,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal } } - private void doCleanUp(final boolean sendCloseMessage) throws HornetQException + private void doCleanUp(final boolean sendCloseMessage) throws ActiveMQException { try { @@ -1207,7 +1207,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal buffer.clear(); } - private void doAck(final ClientMessageInternal message) throws HornetQException + private void doAck(final ClientMessageInternal message) throws ActiveMQException { ackBytes = 0; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientConsumerInternal.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientConsumerInternal.java index 57f0ab034e..e49b03798f 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientConsumerInternal.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientConsumerInternal.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.client.impl; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -38,17 +38,17 @@ public interface ClientConsumerInternal extends ClientConsumer void handleLargeMessageContinuation(byte[] chunk, int flowControlSize, boolean isContinues) throws Exception; - void flowControl(final int messageBytes, final boolean discountSlowConsumer) throws HornetQException; + void flowControl(final int messageBytes, final boolean discountSlowConsumer) throws ActiveMQException; - void clear(boolean waitForOnMessage) throws HornetQException; + void clear(boolean waitForOnMessage) throws ActiveMQException; /** * To be called by things like MDBs during shutdown of the server * - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException * @param future */ - Thread prepareForClose(FutureLatch future) throws HornetQException; + Thread prepareForClose(FutureLatch future) throws ActiveMQException; void clearAtFailover(); @@ -56,15 +56,15 @@ public interface ClientConsumerInternal extends ClientConsumer int getBufferSize(); - void cleanUp() throws HornetQException; + void cleanUp() throws ActiveMQException; - void acknowledge(ClientMessage message) throws HornetQException; + void acknowledge(ClientMessage message) throws ActiveMQException; - void individualAcknowledge(ClientMessage message) throws HornetQException; + void individualAcknowledge(ClientMessage message) throws ActiveMQException; - void flushAcks() throws HornetQException; + void flushAcks() throws ActiveMQException; - void stop(boolean waitForOnMessage) throws HornetQException; + void stop(boolean waitForOnMessage) throws ActiveMQException; void start(); 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 389a9fd24b..b6fa16b159 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 @@ -15,8 +15,8 @@ package org.apache.activemq.core.client.impl; import java.io.IOException; import java.io.OutputStream; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +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.utils.DataConstants; @@ -84,20 +84,20 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C largeMessageController = controller; } - public void checkCompletion() throws HornetQException + public void checkCompletion() throws ActiveMQException { checkBuffer(); } @Override - public HornetQBuffer getBodyBuffer() + public ActiveMQBuffer getBodyBuffer() { try { checkBuffer(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new RuntimeException(e.getMessage(), e); } @@ -117,7 +117,7 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C } @Override - public void saveToOutputStream(final OutputStream out) throws HornetQException + public void saveToOutputStream(final OutputStream out) throws ActiveMQException { if (bodyBuffer != null) { @@ -131,7 +131,7 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C } @Override - public ClientLargeMessageImpl setOutputStream(final OutputStream out) throws HornetQException + public ClientLargeMessageImpl setOutputStream(final OutputStream out) throws ActiveMQException { if (bodyBuffer != null) { @@ -146,7 +146,7 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C } @Override - public boolean waitOutputStreamCompletion(final long timeMilliseconds) throws HornetQException + public boolean waitOutputStreamCompletion(final long timeMilliseconds) throws ActiveMQException { if (bodyBuffer != null) { @@ -171,7 +171,7 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C } } - private void checkBuffer() throws HornetQException + private void checkBuffer() throws ActiveMQException { if (bodyBuffer == null) { @@ -193,9 +193,9 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C private static class HornetQOutputStream extends OutputStream { - private final HornetQBuffer bufferOut; + private final ActiveMQBuffer bufferOut; - HornetQOutputStream(HornetQBuffer out) + HornetQOutputStream(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 8ef0cb6701..715837aafe 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 @@ -17,10 +17,10 @@ import java.io.InputStream; import java.io.OutputStream; import java.nio.ByteBuffer; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQPropertyConversionException; +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.ActiveMQPropertyConversionException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.client.HornetQClientMessageBundle; @@ -97,7 +97,7 @@ public class ClientMessageImpl extends MessageImpl implements ClientMessageInter } @Override - public ClientMessageImpl acknowledge() throws HornetQException + public ClientMessageImpl acknowledge() throws ActiveMQException { if (consumer != null) { @@ -108,7 +108,7 @@ public class ClientMessageImpl extends MessageImpl implements ClientMessageInter } @Override - public ClientMessageImpl individualAcknowledge() throws HornetQException + public ClientMessageImpl individualAcknowledge() throws ActiveMQException { if (consumer != null) { @@ -162,7 +162,7 @@ public class ClientMessageImpl extends MessageImpl implements ClientMessageInter } @Override - public void saveToOutputStream(final OutputStream out) throws HornetQException + public void saveToOutputStream(final OutputStream out) throws ActiveMQException { try { @@ -178,14 +178,14 @@ public class ClientMessageImpl extends MessageImpl implements ClientMessageInter } @Override - public ClientMessageImpl setOutputStream(final OutputStream out) throws HornetQException + public ClientMessageImpl setOutputStream(final OutputStream out) throws ActiveMQException { saveToOutputStream(out); return this; } @Override - public boolean waitOutputStreamCompletion(final long timeMilliseconds) throws HornetQException + public boolean waitOutputStreamCompletion(final long timeMilliseconds) throws ActiveMQException { return true; } @@ -215,7 +215,7 @@ public class ClientMessageImpl extends MessageImpl implements ClientMessageInter } @Override - public BodyEncoder getBodyEncoder() throws HornetQException + public BodyEncoder getBodyEncoder() throws ActiveMQException { return new DecodingContext(); } @@ -287,13 +287,13 @@ public class ClientMessageImpl extends MessageImpl implements ClientMessageInter } @Override - public ClientMessageImpl putObjectProperty(final SimpleString key, final Object value) throws HornetQPropertyConversionException + public ClientMessageImpl putObjectProperty(final SimpleString key, final Object value) throws ActiveMQPropertyConversionException { return (ClientMessageImpl) super.putObjectProperty(key, value); } @Override - public ClientMessageImpl putObjectProperty(final String key, final Object value) throws HornetQPropertyConversionException + public ClientMessageImpl putObjectProperty(final String key, final Object value) throws ActiveMQPropertyConversionException { return (ClientMessageImpl) super.putObjectProperty(key, value); } @@ -395,14 +395,14 @@ public class ClientMessageImpl extends MessageImpl implements ClientMessageInter } @Override - public int encode(final ByteBuffer bufferRead) throws HornetQException + public int encode(final ByteBuffer bufferRead) throws ActiveMQException { - HornetQBuffer buffer1 = HornetQBuffers.wrappedBuffer(bufferRead); + ActiveMQBuffer buffer1 = ActiveMQBuffers.wrappedBuffer(bufferRead); return encode(buffer1, bufferRead.capacity()); } @Override - public int encode(final HornetQBuffer bufferOut, final int size) + public int encode(final ActiveMQBuffer bufferOut, final int size) { byte[] bytes = new byte[size]; getWholeBuffer().readBytes(bytes); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientProducerCredits.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientProducerCredits.java index c57a50d503..776fa56cd9 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientProducerCredits.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientProducerCredits.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.client.impl; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.spi.core.remoting.SessionContext; /** @@ -24,7 +24,7 @@ import org.apache.activemq.spi.core.remoting.SessionContext; */ public interface ClientProducerCredits { - void acquireCredits(int credits) throws InterruptedException, HornetQException; + void acquireCredits(int credits) throws InterruptedException, ActiveMQException; void receiveCredits(int credits); 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 c943b3ecec..e037136892 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.client.impl; -import org.apache.activemq.api.core.HornetQException; +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; @@ -76,7 +76,7 @@ public class ClientProducerCreditsImpl implements ClientProducerCredits this.sessionContext.linkFlowControl(address, this); } - public void acquireCredits(final int credits) throws InterruptedException, HornetQException + public void acquireCredits(final int credits) throws InterruptedException, ActiveMQException { checkCredits(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 48c63a3a33..1c99da1798 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 @@ -16,10 +16,10 @@ import java.io.IOException; import java.io.InputStream; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQInterruptedException; +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.ActiveMQInterruptedException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.SendAcknowledgementHandler; @@ -118,27 +118,27 @@ public class ClientProducerImpl implements ClientProducerInternal return address; } - public void send(final Message msg) throws HornetQException + public void send(final Message msg) throws ActiveMQException { checkClosed(); doSend(null, msg, null, false); } - public void send(final SimpleString address1, final Message msg) throws HornetQException + public void send(final SimpleString address1, final Message msg) throws ActiveMQException { checkClosed(); doSend(address1, msg, null, false); } - public void send(final String address1, final Message message) throws HornetQException + public void send(final String address1, final Message message) throws ActiveMQException { send(SimpleString.toSimpleString(address1), message); } @Override - public void send(SimpleString address1, Message message, SendAcknowledgementHandler handler) throws HornetQException + public void send(SimpleString address1, Message message, SendAcknowledgementHandler handler) throws ActiveMQException { checkClosed(); boolean confirmationWindowEnabled = session.isConfirmationWindowEnabled(); @@ -157,12 +157,12 @@ public class ClientProducerImpl implements ClientProducerInternal } @Override - public void send(Message message, SendAcknowledgementHandler handler) throws HornetQException + public void send(Message message, SendAcknowledgementHandler handler) throws ActiveMQException { send(null, message, handler); } - public synchronized void close() throws HornetQException + public synchronized void close() throws ActiveMQException { if (closed) { @@ -222,7 +222,7 @@ public class ClientProducerImpl implements ClientProducerInternal } private void doSend(final SimpleString address1, final Message msg, final SendAcknowledgementHandler handler, - final boolean forceAsync) throws HornetQException + final boolean forceAsync) throws ActiveMQException { session.startCall(); @@ -307,7 +307,7 @@ public class ClientProducerImpl implements ClientProducerInternal } } - private void sendRegularMessage(final MessageInternal msgI, final boolean sendBlocking, final ClientProducerCredits theCredits, final SendAcknowledgementHandler handler) throws HornetQException + private void sendRegularMessage(final MessageInternal msgI, final boolean sendBlocking, final ClientProducerCredits theCredits, final SendAcknowledgementHandler handler) throws ActiveMQException { try { @@ -323,13 +323,13 @@ public class ClientProducerImpl implements ClientProducerInternal } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } sessionContext.sendFullMessage(msgI, sendBlocking, handler, address); } - private void checkClosed() throws HornetQException + private void checkClosed() throws ActiveMQException { if (closed) { @@ -342,10 +342,10 @@ public class ClientProducerImpl implements ClientProducerInternal /** * @param msgI * @param handler - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ private void largeMessageSend(final boolean sendBlocking, final MessageInternal msgI, - final ClientProducerCredits credits, SendAcknowledgementHandler handler) throws HornetQException + final ClientProducerCredits credits, SendAcknowledgementHandler handler) throws ActiveMQException { int headerSize = msgI.getHeadersAndPropertiesEncodeSize(); @@ -376,7 +376,7 @@ public class ClientProducerImpl implements ClientProducerInternal } } - private void sendInitialLargeMessageHeader(MessageInternal msgI, ClientProducerCredits credits) throws HornetQException + private void sendInitialLargeMessageHeader(MessageInternal msgI, ClientProducerCredits credits) throws ActiveMQException { int creditsUsed = sessionContext.sendInitialChunkOnLargeMessage(msgI); @@ -389,7 +389,7 @@ public class ClientProducerImpl implements ClientProducerInternal } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } @@ -400,10 +400,10 @@ public class ClientProducerImpl implements ClientProducerInternal * @param sendBlocking * @param msgI * @param handler - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ private void largeMessageSendServer(final boolean sendBlocking, final MessageInternal msgI, - final ClientProducerCredits credits, SendAcknowledgementHandler handler) throws HornetQException + final ClientProducerCredits credits, SendAcknowledgementHandler handler) throws ActiveMQException { sendInitialLargeMessageHeader(msgI, credits); @@ -421,7 +421,7 @@ public class ClientProducerImpl implements ClientProducerInternal final int chunkLength = Math.min((int) (bodySize - pos), minLargeMessageSize); - final HornetQBuffer bodyBuffer = HornetQBuffers.fixedBuffer(chunkLength); + final ActiveMQBuffer bodyBuffer = ActiveMQBuffers.fixedBuffer(chunkLength); context.encode(bodyBuffer, chunkLength); @@ -438,7 +438,7 @@ public class ClientProducerImpl implements ClientProducerInternal } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } } @@ -452,11 +452,11 @@ public class ClientProducerImpl implements ClientProducerInternal * @param sendBlocking * @param msgI * @param handler - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ private void largeMessageSendBuffered(final boolean sendBlocking, final MessageInternal msgI, - final ClientProducerCredits credits, SendAcknowledgementHandler handler) throws HornetQException + final ClientProducerCredits credits, SendAcknowledgementHandler handler) throws ActiveMQException { msgI.getBodyBuffer().readerIndex(0); largeMessageSendStreamed(sendBlocking, msgI, new HornetQBufferInputStream(msgI.getBodyBuffer()), credits, @@ -468,11 +468,11 @@ public class ClientProducerImpl implements ClientProducerInternal * @param msgI * @param inputStreamParameter * @param credits - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ private void largeMessageSendStreamed(final boolean sendBlocking, final MessageInternal msgI, final InputStream inputStreamParameter, final ClientProducerCredits credits, - SendAcknowledgementHandler handler) throws HornetQException + SendAcknowledgementHandler handler) throws ActiveMQException { boolean lastPacket = false; @@ -570,7 +570,7 @@ public class ClientProducerImpl implements ClientProducerInternal } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } } @@ -590,7 +590,7 @@ public class ClientProducerImpl implements ClientProducerInternal } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(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 7f677731ac..432234fbf4 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 @@ -28,10 +28,10 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQInterruptedException; -import org.apache.activemq.api.core.HornetQNotConnectedException; +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.ActiveMQNotConnectedException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; @@ -237,7 +237,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C return newFailoverLock; } - public void connect(final int initialConnectAttempts, final boolean failoverOnInitialConnection) throws HornetQException + public void connect(final int initialConnectAttempts, final boolean failoverOnInitialConnection) throws ActiveMQException { // Get the connection getConnectionWithRetry(initialConnectAttempts); @@ -250,7 +250,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C { msg.append(" and backup configuration ").append(backupConfig); } - throw new HornetQNotConnectedException(msg.toString()); + throw new ActiveMQNotConnectedException(msg.toString()); } } @@ -310,7 +310,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C final boolean autoCommitSends, final boolean autoCommitAcks, final boolean preAcknowledge, - final int ackBatchSize) throws HornetQException + final int ackBatchSize) throws ActiveMQException { return createSessionInternal(username, password, @@ -323,7 +323,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C public ClientSession createSession(final boolean autoCommitSends, final boolean autoCommitAcks, - final int ackBatchSize) throws HornetQException + final int ackBatchSize) throws ActiveMQException { return createSessionInternal(null, null, @@ -334,7 +334,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C ackBatchSize); } - public ClientSession createXASession() throws HornetQException + public ClientSession createXASession() throws ActiveMQException { return createSessionInternal(null, null, @@ -345,7 +345,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C serverLocator.getAckBatchSize()); } - public ClientSession createTransactedSession() throws HornetQException + public ClientSession createTransactedSession() throws ActiveMQException { return createSessionInternal(null, null, @@ -356,7 +356,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C serverLocator.getAckBatchSize()); } - public ClientSession createSession() throws HornetQException + public ClientSession createSession() throws ActiveMQException { return createSessionInternal(null, null, @@ -367,7 +367,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C serverLocator.getAckBatchSize()); } - public ClientSession createSession(final boolean autoCommitSends, final boolean autoCommitAcks) throws HornetQException + public ClientSession createSession(final boolean autoCommitSends, final boolean autoCommitAcks) throws ActiveMQException { return createSessionInternal(null, null, @@ -378,7 +378,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C serverLocator.getAckBatchSize()); } - public ClientSession createSession(final boolean xa, final boolean autoCommitSends, final boolean autoCommitAcks) throws HornetQException + public ClientSession createSession(final boolean xa, final boolean autoCommitSends, final boolean autoCommitAcks) throws ActiveMQException { return createSessionInternal(null, null, @@ -392,7 +392,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C public ClientSession createSession(final boolean xa, final boolean autoCommitSends, final boolean autoCommitAcks, - final boolean preAcknowledge) throws HornetQException + final boolean preAcknowledge) throws ActiveMQException { return createSessionInternal(null, null, @@ -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 HornetQException ex = HornetQClientMessageBundle.BUNDLE.channelDisconnected(); + final ActiveMQException ex = HornetQClientMessageBundle.BUNDLE.channelDisconnected(); // It has to use the same executor as the disconnect message is being sent through @@ -427,7 +427,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C } - public void connectionException(final Object connectionID, final HornetQException me) + public void connectionException(final Object connectionID, final ActiveMQException me) { handleConnectionFailure(connectionID, me); } @@ -559,18 +559,18 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C stopPingingAfterOne = true; } - private void handleConnectionFailure(final Object connectionID, final HornetQException me) + private void handleConnectionFailure(final Object connectionID, final ActiveMQException me) { handleConnectionFailure(connectionID, me, null); } - private void handleConnectionFailure(final Object connectionID, final HornetQException me, String scaleDownTargetNodeID) + private void handleConnectionFailure(final Object connectionID, final ActiveMQException me, String scaleDownTargetNodeID) { try { failoverOrReconnect(connectionID, me, scaleDownTargetNodeID); } - catch (HornetQInterruptedException e1) + 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); @@ -582,7 +582,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C * @param connectionID * @param me */ - private void failoverOrReconnect(final Object connectionID, final HornetQException me, String scaleDownTargetNodeID) + private void failoverOrReconnect(final Object connectionID, final ActiveMQException me, String scaleDownTargetNodeID) { Set sessionsToClose = null; if (!clientProtocolManager.isAlive()) @@ -630,7 +630,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C // locked. // While this is still locked it must then get the channel1 lock // It can then release the failoverLock - // It should catch HornetQException.INTERRUPTED in the call to channel.sendBlocking + // It should catch ActiveMQException.INTERRUPTED in the call to channel.sendBlocking // It should then return its connections, with channel 1 lock still held // It can then release the channel 1 lock, and retry (which will cause locking on // failoverLock @@ -740,7 +740,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C final boolean autoCommitSends, final boolean autoCommitAcks, final boolean preAcknowledge, - final int ackBatchSize) throws HornetQException + final int ackBatchSize) throws ActiveMQException { String name = UUIDGenerator.getInstance().generateStringUUID(); @@ -795,13 +795,13 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C } - private void callSessionFailureListeners(final HornetQException me, final boolean afterReconnect, + private void callSessionFailureListeners(final ActiveMQException me, final boolean afterReconnect, final boolean failedOver) { callSessionFailureListeners(me, afterReconnect, failedOver, null); } - private void callSessionFailureListeners(final HornetQException me, final boolean afterReconnect, + private void callSessionFailureListeners(final ActiveMQException me, final boolean afterReconnect, final boolean failedOver, final String scaleDownTargetNodeID) { final List listenersClone = new ArrayList(listeners); @@ -852,7 +852,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C /* * Re-attach sessions all pre-existing sessions to the new remoting connection */ - private void reconnectSessions(final RemotingConnection oldConnection, final int reconnectAttempts, final HornetQException cause) + private void reconnectSessions(final RemotingConnection oldConnection, final int reconnectAttempts, final ActiveMQException cause) { HashSet sessionsToFailover; synchronized (sessions) @@ -967,7 +967,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C } catch (InterruptedException ignore) { - throw new HornetQInterruptedException(createTrace); + throw new ActiveMQInterruptedException(createTrace); } // Exponential back-off @@ -1065,7 +1065,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C connection = null; } } - catch (HornetQException e) + catch (ActiveMQException e) { if (connection != null) { @@ -1382,7 +1382,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C private class DelegatingBufferHandler implements BufferHandler { - public void bufferReceived(final Object connectionID, final HornetQBuffer buffer) + public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { RemotingConnection theConn = connection; @@ -1407,13 +1407,13 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C } @Override - public void connectionFailed(final HornetQException me, final boolean failedOver) + public void connectionFailed(final ActiveMQException me, final boolean failedOver) { connectionFailed(me, failedOver, null); } @Override - public void connectionFailed(final HornetQException me, final boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, final boolean failedOver, String scaleDownTargetNodeID) { handleConnectionFailure(connectionID, me, scaleDownTargetNodeID); } @@ -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 HornetQException me = HornetQClientMessageBundle.BUNDLE.connectionTimedOut(connection.getTransportConnection()); + final ActiveMQException me = HornetQClientMessageBundle.BUNDLE.connectionTimedOut(connection.getTransportConnection()); cancelled = true; @@ -1550,7 +1550,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C final boolean xa, final boolean autoCommitSends, final boolean autoCommitAcks, - final boolean preAcknowledge) throws HornetQException + final boolean preAcknowledge) throws ActiveMQException { synchronized (createSessionLock) { diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionFactoryInternal.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionFactoryInternal.java index 64b41948c3..242ad114b1 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionFactoryInternal.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionFactoryInternal.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.client.impl; import java.util.concurrent.locks.Lock; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.SessionFailureListener; @@ -47,7 +47,7 @@ public interface ClientSessionFactoryInternal extends ClientSessionFactory void removeSession(final ClientSessionInternal session, boolean failingOver); - void connect(int reconnectAttempts, boolean failoverOnInitialConnection) throws HornetQException; + void connect(int reconnectAttempts, boolean failoverOnInitialConnection) throws ActiveMQException; void setBackupConnector(TransportConfiguration live, TransportConfiguration backUp); 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 173df2da72..8b958749ae 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 @@ -23,10 +23,10 @@ import java.util.Set; import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +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.ActiveMQExceptionType; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; @@ -171,7 +171,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi final String groupID, final SessionContext sessionContext, final Executor executor, - final Executor flowControlExecutor) throws HornetQException + final Executor flowControlExecutor) throws ActiveMQException { this.sessionFactory = sessionFactory; @@ -233,24 +233,24 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi // ClientSession implementation // ----------------------------------------------------------------- - public void createQueue(final SimpleString address, final SimpleString queueName) throws HornetQException + public void createQueue(final SimpleString address, final SimpleString queueName) throws ActiveMQException { internalCreateQueue(address, queueName, null, false, false); } - public void createQueue(final SimpleString address, final SimpleString queueName, final boolean durable) throws HornetQException + public void createQueue(final SimpleString address, final SimpleString queueName, final boolean durable) throws ActiveMQException { internalCreateQueue(address, queueName, null, durable, false); } - public void createQueue(final String address, final String queueName, final boolean durable) throws HornetQException + public void createQueue(final String address, final String queueName, final boolean durable) throws ActiveMQException { createQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName), durable); } public void createSharedQueue(SimpleString address, SimpleString queueName, - boolean durable) throws HornetQException + boolean durable) throws ActiveMQException { createSharedQueue(address, queueName, null, durable); } @@ -258,7 +258,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi public void createSharedQueue(SimpleString address, SimpleString queueName, SimpleString filterString, - boolean durable) throws HornetQException + boolean durable) throws ActiveMQException { checkClosed(); @@ -280,7 +280,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi public void createQueue(final SimpleString address, final SimpleString queueName, final SimpleString filterString, - final boolean durable) throws HornetQException + final boolean durable) throws ActiveMQException { internalCreateQueue(address, queueName, filterString, durable, false); } @@ -288,17 +288,17 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi public void createQueue(final String address, final String queueName, final String filterString, - final boolean durable) throws HornetQException + final boolean durable) throws ActiveMQException { createQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName), SimpleString.toSimpleString(filterString), durable); } - public void createTemporaryQueue(final SimpleString address, final SimpleString queueName) throws HornetQException + public void createTemporaryQueue(final SimpleString address, final SimpleString queueName) throws ActiveMQException { internalCreateQueue(address, queueName, null, false, true); } - public void createTemporaryQueue(final String address, final String queueName) throws HornetQException + public void createTemporaryQueue(final String address, final String queueName) throws ActiveMQException { internalCreateQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName), @@ -307,12 +307,12 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi true); } - public void createTemporaryQueue(final SimpleString address, final SimpleString queueName, final SimpleString filter) throws HornetQException + public void createTemporaryQueue(final SimpleString address, final SimpleString queueName, final SimpleString filter) throws ActiveMQException { internalCreateQueue(address, queueName, filter, false, true); } - public void createTemporaryQueue(final String address, final String queueName, final String filter) throws HornetQException + public void createTemporaryQueue(final String address, final String queueName, final String filter) throws ActiveMQException { internalCreateQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName), @@ -321,7 +321,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi true); } - public void deleteQueue(final SimpleString queueName) throws HornetQException + public void deleteQueue(final SimpleString queueName) throws ActiveMQException { checkClosed(); @@ -336,12 +336,12 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } - public void deleteQueue(final String queueName) throws HornetQException + public void deleteQueue(final String queueName) throws ActiveMQException { deleteQueue(SimpleString.toSimpleString(queueName)); } - public QueueQuery queueQuery(final SimpleString queueName) throws HornetQException + public QueueQuery queueQuery(final SimpleString queueName) throws ActiveMQException { checkClosed(); @@ -363,15 +363,15 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi * * @param address * @return - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ @Deprecated - public BindingQuery bindingQuery(final SimpleString address) throws HornetQException + public BindingQuery bindingQuery(final SimpleString address) throws ActiveMQException { return (BindingQuery) addressQuery(address); } - public AddressQuery addressQuery(final SimpleString address) throws HornetQException + public AddressQuery addressQuery(final SimpleString address) throws ActiveMQException { checkClosed(); @@ -379,51 +379,51 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi return sessionContext.addressQuery(address); } - public ClientConsumer createConsumer(final SimpleString queueName) throws HornetQException + public ClientConsumer createConsumer(final SimpleString queueName) throws ActiveMQException { return createConsumer(queueName, null, false); } - public ClientConsumer createConsumer(final String queueName) throws HornetQException + public ClientConsumer createConsumer(final String queueName) throws ActiveMQException { return createConsumer(SimpleString.toSimpleString(queueName)); } - public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString) throws HornetQException + public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString) throws ActiveMQException { return createConsumer(queueName, filterString, consumerWindowSize, consumerMaxRate, false); } - public void createQueue(final String address, final String queueName) throws HornetQException + public void createQueue(final String address, final String queueName) throws ActiveMQException { createQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName)); } - public ClientConsumer createConsumer(final String queueName, final String filterString) throws HornetQException + public ClientConsumer createConsumer(final String queueName, final String filterString) throws ActiveMQException { return createConsumer(SimpleString.toSimpleString(queueName), SimpleString.toSimpleString(filterString)); } public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString, - final boolean browseOnly) throws HornetQException + final boolean browseOnly) throws ActiveMQException { return createConsumer(queueName, filterString, consumerWindowSize, consumerMaxRate, browseOnly); } - public ClientConsumer createConsumer(final SimpleString queueName, final boolean browseOnly) throws HornetQException + public ClientConsumer createConsumer(final SimpleString queueName, final boolean browseOnly) throws ActiveMQException { return createConsumer(queueName, null, consumerWindowSize, consumerMaxRate, browseOnly); } - public ClientConsumer createConsumer(final String queueName, final String filterString, final boolean browseOnly) throws HornetQException + public ClientConsumer createConsumer(final String queueName, final String filterString, final boolean browseOnly) throws ActiveMQException { return createConsumer(SimpleString.toSimpleString(queueName), SimpleString.toSimpleString(filterString), browseOnly); } - public ClientConsumer createConsumer(final String queueName, final boolean browseOnly) throws HornetQException + public ClientConsumer createConsumer(final String queueName, final boolean browseOnly) throws ActiveMQException { return createConsumer(SimpleString.toSimpleString(queueName), null, browseOnly); } @@ -442,7 +442,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi final SimpleString filterString, final int windowSize, final int maxRate, - final boolean browseOnly) throws HornetQException + final boolean browseOnly) throws ActiveMQException { return internalCreateConsumer(queueName, filterString, windowSize, maxRate, browseOnly); } @@ -451,32 +451,32 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi final String filterString, final int windowSize, final int maxRate, - final boolean browseOnly) throws HornetQException + final boolean browseOnly) throws ActiveMQException { return createConsumer(SimpleString.toSimpleString(queueName), SimpleString.toSimpleString(filterString), windowSize, maxRate, browseOnly); } - public ClientProducer createProducer() throws HornetQException + public ClientProducer createProducer() throws ActiveMQException { return createProducer((SimpleString) null); } - public ClientProducer createProducer(final SimpleString address) throws HornetQException + public ClientProducer createProducer(final SimpleString address) throws ActiveMQException { return createProducer(address, producerMaxRate); } - public ClientProducer createProducer(final String address) throws HornetQException + public ClientProducer createProducer(final String address) throws ActiveMQException { return createProducer(SimpleString.toSimpleString(address)); } - public ClientProducer createProducer(final SimpleString address, final int maxRate) throws HornetQException + public ClientProducer createProducer(final SimpleString address, final int maxRate) throws ActiveMQException { return internalCreateProducer(address, maxRate); } - public ClientProducer createProducer(final String address, final int rate) throws HornetQException + public ClientProducer createProducer(final String address, final int rate) throws ActiveMQException { return createProducer(SimpleString.toSimpleString(address), rate); } @@ -486,7 +486,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi return this; } - private void rollbackOnFailover(boolean outcomeKnown) throws HornetQException + private void rollbackOnFailover(boolean outcomeKnown) throws ActiveMQException { rollback(false); @@ -498,7 +498,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi throw HornetQClientMessageBundle.BUNDLE.txOutcomeUnknown(); } - public void commit() throws HornetQException + public void commit() throws ActiveMQException { checkClosed(); @@ -528,9 +528,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi { sessionContext.simpleCommit(); } - catch (HornetQException e) + catch (ActiveMQException e) { - if (e.getType() == HornetQExceptionType.UNBLOCKED || rollbackOnly) + if (e.getType() == ActiveMQExceptionType.UNBLOCKED || rollbackOnly) { // The call to commit was unlocked on failover, we therefore rollback the tx, // and throw a transaction rolled back exception instead @@ -558,12 +558,12 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi return rollbackOnly; } - public void rollback() throws HornetQException + public void rollback() throws ActiveMQException { rollback(false); } - public void rollback(final boolean isLastMessageAsDelivered) throws HornetQException + public void rollback(final boolean isLastMessageAsDelivered) throws ActiveMQException { if (HornetQClientLogger.LOGGER.isTraceEnabled()) { @@ -647,7 +647,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi return xa; } - public void resetIfNeeded() throws HornetQException + public void resetIfNeeded() throws ActiveMQException { if (rollbackOnly) { @@ -656,7 +656,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } - public ClientSessionImpl start() throws HornetQException + public ClientSessionImpl start() throws ActiveMQException { checkClosed(); @@ -675,12 +675,12 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi return this; } - public void stop() throws HornetQException + public void stop() throws ActiveMQException { stop(true); } - public void stop(final boolean waitForOnMessage) throws HornetQException + public void stop(final boolean waitForOnMessage) throws ActiveMQException { checkClosed(); @@ -762,7 +762,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi /** * Acknowledges all messages received by the consumer so far. */ - public void acknowledge(final ClientConsumer consumer, final Message message) throws HornetQException + public void acknowledge(final ClientConsumer consumer, final Message message) throws ActiveMQException { // if we're pre-acknowledging then we don't need to do anything if (preAcknowledge) @@ -787,7 +787,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } - public void individualAcknowledge(final ClientConsumer consumer, final Message message) throws HornetQException + public void individualAcknowledge(final ClientConsumer consumer, final Message message) throws ActiveMQException { // if we're pre-acknowledging then we don't need to do anything if (preAcknowledge) @@ -809,7 +809,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } - public void expire(final ClientConsumer consumer, final Message message) throws HornetQException + public void expire(final ClientConsumer consumer, final Message message) throws ActiveMQException { checkClosed(); @@ -836,7 +836,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } - public void removeConsumer(final ClientConsumerInternal consumer) throws HornetQException + public void removeConsumer(final ClientConsumerInternal consumer) throws ActiveMQException { synchronized (consumers) { @@ -883,7 +883,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } @Override - public void handleConsumerDisconnect(ConsumerContext context) throws HornetQException + public void handleConsumerDisconnect(ConsumerContext context) throws ActiveMQException { final ClientConsumerInternal consumer = getConsumer(context); @@ -898,7 +898,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi { consumer.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQClientLogger.LOGGER.unableToCloseConsumer(e); } @@ -907,7 +907,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } - public void close() throws HornetQException + public void close() throws ActiveMQException { if (closed) { @@ -942,7 +942,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi doCleanup(false); } - public synchronized void cleanUp(boolean failingOver) throws HornetQException + public synchronized void cleanUp(boolean failingOver) throws ActiveMQException { if (closed) { @@ -972,7 +972,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi // Needs to be synchronized to prevent issues with occurring concurrently with close() - public void handleFailover(final RemotingConnection backupConnection, HornetQException cause) + public void handleFailover(final RemotingConnection backupConnection, ActiveMQException cause) { synchronized (this) { @@ -1089,7 +1089,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } - public void addMetaData(String key, String data) throws HornetQException + public void addMetaData(String key, String data) throws ActiveMQException { synchronized (metadata) { @@ -1099,7 +1099,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi sessionContext.addSessionMetadata(key, data); } - public void addUniqueMetaData(String key, String data) throws HornetQException + public void addUniqueMetaData(String key, String data) throws ActiveMQException { sessionContext.addUniqueMetaData(key, data); } @@ -1425,9 +1425,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi { throw xae; } - catch (HornetQException e) + catch (ActiveMQException e) { - if (e.getType() == HornetQExceptionType.UNBLOCKED) + if (e.getType() == ActiveMQExceptionType.UNBLOCKED) { // Unblocked on failover try @@ -1545,9 +1545,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi { throw xae; } - catch (HornetQException e) + catch (ActiveMQException e) { - if (e.getType() == HornetQExceptionType.UNBLOCKED) + if (e.getType() == ActiveMQExceptionType.UNBLOCKED) { // Unblocked on failover throw new XAException(XAException.XA_RETRY); @@ -1586,10 +1586,10 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi { throw xae; } - catch (HornetQException e) + catch (ActiveMQException e) { // we can retry this only because we know for sure that no work would have been done - if (e.getType() == HornetQExceptionType.UNBLOCKED) + if (e.getType() == ActiveMQExceptionType.UNBLOCKED) { try { @@ -1624,7 +1624,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi // FailureListener implementation -------------------------------------------- - public void connectionFailed(final HornetQException me, boolean failedOver) + public void connectionFailed(final ActiveMQException me, boolean failedOver) { try { @@ -1636,7 +1636,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } @@ -1684,13 +1684,13 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi * @param windowSize * @param browseOnly * @return - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ private ClientConsumer internalCreateConsumer(final SimpleString queueName, final SimpleString filterString, final int windowSize, final int maxRate, - final boolean browseOnly) throws HornetQException + final boolean browseOnly) throws ActiveMQException { checkClosed(); @@ -1712,7 +1712,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi return consumer; } - private ClientProducer internalCreateProducer(final SimpleString address, final int maxRate) throws HornetQException + private ClientProducer internalCreateProducer(final SimpleString address, final int maxRate) throws ActiveMQException { checkClosed(); @@ -1736,7 +1736,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi final SimpleString queueName, final SimpleString filterString, final boolean durable, - final boolean temp) throws HornetQException + final boolean temp) throws ActiveMQException { checkClosed(); @@ -1765,7 +1765,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } - private void checkClosed() throws HornetQException + private void checkClosed() throws ActiveMQException { if (closed || inClose) { @@ -1799,7 +1799,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi sessionFactory.removeSession(this, failingOver); } - private void cleanUpChildren() throws HornetQException + private void cleanUpChildren() throws ActiveMQException { Set consumersClone = cloneConsumers(); @@ -1845,7 +1845,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } - private void closeChildren() throws HornetQException + private void closeChildren() throws ActiveMQException { Set consumersClone = cloneConsumers(); @@ -1862,7 +1862,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } - private void flushAcks() throws HornetQException + private void flushAcks() throws ActiveMQException { for (ClientConsumerInternal consumer : cloneConsumers()) { @@ -1882,7 +1882,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi */ public static Object convert(Xid xid) { - HornetQBuffer buffer = HornetQBuffers.dynamicBuffer(200); + ActiveMQBuffer buffer = ActiveMQBuffers.dynamicBuffer(200); XidCodecSupport.encodeXid(xid, buffer); Object obj = XidCodecSupport.decodeXid(buffer); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionInternal.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionInternal.java index 952afd92b5..7b08ba6144 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionInternal.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ClientSessionInternal.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.client.impl; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; @@ -30,9 +30,9 @@ public interface ClientSessionInternal extends ClientSession { String getName(); - void acknowledge(ClientConsumer consumer, Message message) throws HornetQException; + void acknowledge(ClientConsumer consumer, Message message) throws ActiveMQException; - void individualAcknowledge(final ClientConsumer consumer, final Message message) throws HornetQException; + void individualAcknowledge(final ClientConsumer consumer, final Message message) throws ActiveMQException; boolean isCacheLargeMessageClient(); @@ -40,13 +40,13 @@ public interface ClientSessionInternal extends ClientSession boolean isCompressLargeMessages(); - void expire(ClientConsumer consumer, Message message) throws HornetQException; + void expire(ClientConsumer consumer, Message message) throws ActiveMQException; void addConsumer(ClientConsumerInternal consumer); void addProducer(ClientProducerInternal producer); - void removeConsumer(ClientConsumerInternal consumer) throws HornetQException; + void removeConsumer(ClientConsumerInternal consumer) throws ActiveMQException; void removeProducer(ClientProducerInternal producer); @@ -56,15 +56,15 @@ public interface ClientSessionInternal extends ClientSession void handleReceiveContinuation(ConsumerContext consumerID, byte[] chunk, int flowControlSize, boolean isContinues) throws Exception; - void handleConsumerDisconnect(ConsumerContext consumerContext) throws HornetQException; + void handleConsumerDisconnect(ConsumerContext consumerContext) throws ActiveMQException; void preHandleFailover(RemotingConnection connection); - void handleFailover(RemotingConnection backupConnection, HornetQException cause); + void handleFailover(RemotingConnection backupConnection, ActiveMQException cause); RemotingConnection getConnection(); - void cleanUp(boolean failingOver) throws HornetQException; + void cleanUp(boolean failingOver) throws ActiveMQException; void setForceNotSameRM(boolean force); @@ -86,7 +86,7 @@ public interface ClientSessionInternal extends ClientSession void setPacketSize(int packetSize); - void resetIfNeeded() throws HornetQException; + void resetIfNeeded() throws ActiveMQException; /** * This is used internally to control and educate the user 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 3f6a3197ac..acadf1a137 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 @@ -18,9 +18,9 @@ import java.io.OutputStream; import java.nio.ByteBuffer; import io.netty.buffer.ByteBuf; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; +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.utils.DataConstants; @@ -69,12 +69,12 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll bufferDelegate.cancel(); } - public void setOutputStream(final OutputStream output) throws HornetQException + public void setOutputStream(final OutputStream output) throws ActiveMQException { bufferDelegate.setOutputStream(new InflaterWriter(output)); } - public synchronized void saveBuffer(final OutputStream output) throws HornetQException + public synchronized void saveBuffer(final OutputStream output) throws ActiveMQException { setOutputStream(output); waitCompletion(0); @@ -83,7 +83,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll /** * @param timeWait Milliseconds to Wait. 0 means forever */ - public synchronized boolean waitCompletion(final long timeWait) throws HornetQException + public synchronized boolean waitCompletion(final long timeWait) throws ActiveMQException { return bufferDelegate.waitCompletion(timeWait); } @@ -140,7 +140,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll } @Override - public void getBytes(final int index, final HornetQBuffer dst, final int dstIndex, final int length) + public void getBytes(final int index, final ActiveMQBuffer dst, final int dstIndex, final int length) { positioningNotSupported(); } @@ -185,7 +185,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll } @Override - public void setBytes(final int index, final HornetQBuffer src, final int srcIndex, final int length) + public void setBytes(final int index, final ActiveMQBuffer src, final int srcIndex, final int length) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } @@ -330,12 +330,12 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll } } - public void getBytes(final int index, final HornetQBuffer dst) + public void getBytes(final int index, final ActiveMQBuffer dst) { getBytes(index, dst, dst.writableBytes()); } - public void getBytes(final int index, final HornetQBuffer dst, final int length) + public void getBytes(final int index, final ActiveMQBuffer dst, final int length) { if (length > dst.writableBytes()) { @@ -350,12 +350,12 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } - public void setBytes(final int index, final HornetQBuffer src) + public void setBytes(final int index, final ActiveMQBuffer src) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } - public void setBytes(final int index, final HornetQBuffer src, final int length) + public void setBytes(final int index, final ActiveMQBuffer src, final int length) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } @@ -446,12 +446,12 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll readBytes(dst, 0, dst.length); } - public void readBytes(final HornetQBuffer dst) + public void readBytes(final ActiveMQBuffer dst) { readBytes(dst, dst.writableBytes()); } - public void readBytes(final HornetQBuffer dst, final int length) + public void readBytes(final ActiveMQBuffer dst, final int length) { if (length > dst.writableBytes()) { @@ -461,7 +461,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll dst.writerIndex(dst.writerIndex() + length); } - public void readBytes(final HornetQBuffer dst, final int dstIndex, final int length) + public void readBytes(final ActiveMQBuffer dst, final int dstIndex, final int length) { byte[] destBytes = new byte[length]; readBytes(destBytes); @@ -521,7 +521,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } - public void writeBytes(final HornetQBuffer src, final int length) + public void writeBytes(final ActiveMQBuffer src, final int length) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } @@ -568,11 +568,11 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll return Float.intBitsToFloat(getInt(index)); } - public HornetQBuffer readBytes(final int length) + public ActiveMQBuffer readBytes(final int length) { byte[] bytesToGet = new byte[length]; readBytes(bytesToGet); - return HornetQBuffers.wrappedBuffer(bytesToGet); + return ActiveMQBuffers.wrappedBuffer(bytesToGet); } @Override @@ -710,12 +710,12 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } - public HornetQBuffer copy() + public ActiveMQBuffer copy() { throw new UnsupportedOperationException(); } - public HornetQBuffer slice(final int index, final int length) + public ActiveMQBuffer slice(final int index, final int length) { throw new UnsupportedOperationException(); } @@ -727,17 +727,17 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll return null; } - public HornetQBuffer copy(final int index, final int length) + public ActiveMQBuffer copy(final int index, final int length) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } - public HornetQBuffer duplicate() + public ActiveMQBuffer duplicate() { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } - public HornetQBuffer readSlice(final int length) + public ActiveMQBuffer readSlice(final int length) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } @@ -757,12 +757,12 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } - public HornetQBuffer slice() + public ActiveMQBuffer slice() { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } - public void writeBytes(final HornetQBuffer src, final int srcIndex, final int length) + public void writeBytes(final ActiveMQBuffer src, final int srcIndex, final int length) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } 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 f328aa42a9..f13de610af 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 @@ -17,7 +17,7 @@ import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; import java.util.Set; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; @@ -101,12 +101,12 @@ public class DelegatingSession implements ClientSessionInternal return session.isClosing(); } - public void acknowledge(final ClientConsumer consumer, final Message message) throws HornetQException + public void acknowledge(final ClientConsumer consumer, final Message message) throws ActiveMQException { session.acknowledge(consumer, message); } - public void individualAcknowledge(final ClientConsumer consumer, final Message message) throws HornetQException + public void individualAcknowledge(final ClientConsumer consumer, final Message message) throws ActiveMQException { session.individualAcknowledge(consumer, message); } @@ -131,17 +131,17 @@ public class DelegatingSession implements ClientSessionInternal session.addProducer(producer); } - public AddressQuery addressQuery(final SimpleString address) throws HornetQException + public AddressQuery addressQuery(final SimpleString address) throws ActiveMQException { return session.addressQuery(address); } - public void cleanUp(boolean failingOver) throws HornetQException + public void cleanUp(boolean failingOver) throws ActiveMQException { session.cleanUp(failingOver); } - public void close() throws HornetQException + public void close() throws ActiveMQException { closed = true; @@ -153,7 +153,7 @@ public class DelegatingSession implements ClientSessionInternal session.close(); } - public void commit() throws HornetQException + public void commit() throws ActiveMQException { session.commit(); } @@ -184,7 +184,7 @@ public class DelegatingSession implements ClientSessionInternal public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString, - final boolean browseOnly) throws HornetQException + final boolean browseOnly) throws ActiveMQException { return session.createConsumer(queueName, filterString, browseOnly); } @@ -193,22 +193,22 @@ public class DelegatingSession implements ClientSessionInternal final SimpleString filterString, final int windowSize, final int maxRate, - final boolean browseOnly) throws HornetQException + final boolean browseOnly) throws ActiveMQException { return session.createConsumer(queueName, filterString, windowSize, maxRate, browseOnly); } - public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString) throws HornetQException + public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString) throws ActiveMQException { return session.createConsumer(queueName, filterString); } - public ClientConsumer createConsumer(final SimpleString queueName) throws HornetQException + public ClientConsumer createConsumer(final SimpleString queueName) throws ActiveMQException { return session.createConsumer(queueName); } - public ClientConsumer createConsumer(final String queueName, final String filterString, final boolean browseOnly) throws HornetQException + public ClientConsumer createConsumer(final String queueName, final String filterString, final boolean browseOnly) throws ActiveMQException { return session.createConsumer(queueName, filterString, browseOnly); } @@ -217,74 +217,74 @@ public class DelegatingSession implements ClientSessionInternal final String filterString, final int windowSize, final int maxRate, - final boolean browseOnly) throws HornetQException + final boolean browseOnly) throws ActiveMQException { return session.createConsumer(queueName, filterString, windowSize, maxRate, browseOnly); } - public ClientConsumer createConsumer(final String queueName, final String filterString) throws HornetQException + public ClientConsumer createConsumer(final String queueName, final String filterString) throws ActiveMQException { return session.createConsumer(queueName, filterString); } - public ClientConsumer createConsumer(final String queueName) throws HornetQException + public ClientConsumer createConsumer(final String queueName) throws ActiveMQException { return session.createConsumer(queueName); } - public ClientConsumer createConsumer(final SimpleString queueName, final boolean browseOnly) throws HornetQException + public ClientConsumer createConsumer(final SimpleString queueName, final boolean browseOnly) throws ActiveMQException { return session.createConsumer(queueName, browseOnly); } - public ClientConsumer createConsumer(final String queueName, final boolean browseOnly) throws HornetQException + public ClientConsumer createConsumer(final String queueName, final boolean browseOnly) throws ActiveMQException { return session.createConsumer(queueName, browseOnly); } - public ClientProducer createProducer() throws HornetQException + public ClientProducer createProducer() throws ActiveMQException { return session.createProducer(); } - public ClientProducer createProducer(final SimpleString address, final int rate) throws HornetQException + public ClientProducer createProducer(final SimpleString address, final int rate) throws ActiveMQException { return session.createProducer(address, rate); } - public ClientProducer createProducer(final SimpleString address) throws HornetQException + public ClientProducer createProducer(final SimpleString address) throws ActiveMQException { return session.createProducer(address); } - public ClientProducer createProducer(final String address) throws HornetQException + public ClientProducer createProducer(final String address) throws ActiveMQException { return session.createProducer(address); } - public void createQueue(final String address, final String queueName) throws HornetQException + public void createQueue(final String address, final String queueName) throws ActiveMQException { session.createQueue(address, queueName); } - public void createQueue(final SimpleString address, final SimpleString queueName) throws HornetQException + public void createQueue(final SimpleString address, final SimpleString queueName) throws ActiveMQException { session.createQueue(address, queueName); } - public void createQueue(final SimpleString address, final SimpleString queueName, final boolean durable) throws HornetQException + public void createQueue(final SimpleString address, final SimpleString queueName, final boolean durable) throws ActiveMQException { session.createQueue(address, queueName, durable); } @Override - public void createSharedQueue(SimpleString address, SimpleString queueName, boolean durable) throws HornetQException + public void createSharedQueue(SimpleString address, SimpleString queueName, boolean durable) throws ActiveMQException { session.createSharedQueue(address, queueName, durable); } @Override - public void createSharedQueue(SimpleString address, SimpleString queueName, SimpleString filter, boolean durable) throws HornetQException + public void createSharedQueue(SimpleString address, SimpleString queueName, SimpleString filter, boolean durable) throws ActiveMQException { session.createSharedQueue(address, queueName, filter, durable); } @@ -292,12 +292,12 @@ public class DelegatingSession implements ClientSessionInternal public void createQueue(final SimpleString address, final SimpleString queueName, final SimpleString filterString, - final boolean durable) throws HornetQException + final boolean durable) throws ActiveMQException { session.createQueue(address, queueName, filterString, durable); } - public void createQueue(final String address, final String queueName, final boolean durable) throws HornetQException + public void createQueue(final String address, final String queueName, final boolean durable) throws ActiveMQException { session.createQueue(address, queueName, durable); } @@ -305,37 +305,37 @@ public class DelegatingSession implements ClientSessionInternal public void createQueue(final String address, final String queueName, final String filterString, - final boolean durable) throws HornetQException + final boolean durable) throws ActiveMQException { session.createQueue(address, queueName, filterString, durable); } - public void createTemporaryQueue(final SimpleString address, final SimpleString queueName, final SimpleString filter) throws HornetQException + public void createTemporaryQueue(final SimpleString address, final SimpleString queueName, final SimpleString filter) throws ActiveMQException { session.createTemporaryQueue(address, queueName, filter); } - public void createTemporaryQueue(final SimpleString address, final SimpleString queueName) throws HornetQException + public void createTemporaryQueue(final SimpleString address, final SimpleString queueName) throws ActiveMQException { session.createTemporaryQueue(address, queueName); } - public void createTemporaryQueue(final String address, final String queueName, final String filter) throws HornetQException + public void createTemporaryQueue(final String address, final String queueName, final String filter) throws ActiveMQException { session.createTemporaryQueue(address, queueName, filter); } - public void createTemporaryQueue(final String address, final String queueName) throws HornetQException + public void createTemporaryQueue(final String address, final String queueName) throws ActiveMQException { session.createTemporaryQueue(address, queueName); } - public void deleteQueue(final SimpleString queueName) throws HornetQException + public void deleteQueue(final SimpleString queueName) throws ActiveMQException { session.deleteQueue(queueName); } - public void deleteQueue(final String queueName) throws HornetQException + public void deleteQueue(final String queueName) throws ActiveMQException { session.deleteQueue(queueName); } @@ -345,7 +345,7 @@ public class DelegatingSession implements ClientSessionInternal session.end(xid, flags); } - public void expire(final ClientConsumer consumer, final Message message) throws HornetQException + public void expire(final ClientConsumer consumer, final Message message) throws ActiveMQException { session.expire(consumer, message); } @@ -390,7 +390,7 @@ public class DelegatingSession implements ClientSessionInternal session.preHandleFailover(connection); } - public void handleFailover(final RemotingConnection backupConnection, HornetQException cause) + public void handleFailover(final RemotingConnection backupConnection, ActiveMQException cause) { session.handleFailover(backupConnection, cause); } @@ -414,7 +414,7 @@ public class DelegatingSession implements ClientSessionInternal } @Override - public void handleConsumerDisconnect(ConsumerContext consumerContext) throws HornetQException + public void handleConsumerDisconnect(ConsumerContext consumerContext) throws ActiveMQException { session.handleConsumerDisconnect(consumerContext); } @@ -459,7 +459,7 @@ public class DelegatingSession implements ClientSessionInternal return session.prepare(xid); } - public QueueQuery queueQuery(final SimpleString queueName) throws HornetQException + public QueueQuery queueQuery(final SimpleString queueName) throws ActiveMQException { return session.queueQuery(queueName); } @@ -469,7 +469,7 @@ public class DelegatingSession implements ClientSessionInternal return session.recover(flag); } - public void removeConsumer(final ClientConsumerInternal consumer) throws HornetQException + public void removeConsumer(final ClientConsumerInternal consumer) throws ActiveMQException { session.removeConsumer(consumer); } @@ -489,7 +489,7 @@ public class DelegatingSession implements ClientSessionInternal session.removeProducer(producer); } - public void rollback() throws HornetQException + public void rollback() throws ActiveMQException { session.rollback(); } @@ -499,7 +499,7 @@ public class DelegatingSession implements ClientSessionInternal return session.isRollbackOnly(); } - public void rollback(final boolean considerLastMessageAsDelivered) throws HornetQException + public void rollback(final boolean considerLastMessageAsDelivered) throws ActiveMQException { session.rollback(considerLastMessageAsDelivered); } @@ -520,12 +520,12 @@ public class DelegatingSession implements ClientSessionInternal return session.setTransactionTimeout(seconds); } - public void resetIfNeeded() throws HornetQException + public void resetIfNeeded() throws ActiveMQException { session.resetIfNeeded(); } - public DelegatingSession start() throws HornetQException + public DelegatingSession start() throws ActiveMQException { session.start(); return this; @@ -536,7 +536,7 @@ public class DelegatingSession implements ClientSessionInternal session.start(xid, flags); } - public void stop() throws HornetQException + public void stop() throws ActiveMQException { session.stop(); } @@ -596,7 +596,7 @@ public class DelegatingSession implements ClientSessionInternal session.setPacketSize(packetSize); } - public void addMetaData(String key, String data) throws HornetQException + public void addMetaData(String key, String data) throws ActiveMQException { session.addMetaData(key, data); } @@ -613,7 +613,7 @@ public class DelegatingSession implements ClientSessionInternal } @Override - public void addUniqueMetaData(String key, String data) throws HornetQException + public void addUniqueMetaData(String key, String data) throws ActiveMQException { session.addUniqueMetaData(key, data); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/LargeMessageController.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/LargeMessageController.java index b7aba81970..61cd049818 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/LargeMessageController.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/LargeMessageController.java @@ -14,15 +14,15 @@ package org.apache.activemq.core.client.impl; import java.io.OutputStream; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; /** * A LargeMessageBufferInternal * * @author Jeff Mesnil */ -public interface LargeMessageController extends HornetQBuffer +public interface LargeMessageController extends ActiveMQBuffer { /** * Returns the size of this buffer. @@ -48,19 +48,19 @@ public interface LargeMessageController extends HornetQBuffer /** * Sets the OutputStream of this buffer to the specified output. */ - void setOutputStream(final OutputStream output) throws HornetQException; + void setOutputStream(final OutputStream output) throws ActiveMQException; /** * Saves this buffer to the specified output. This is just a blocking version of * {@link #setOutputStream(OutputStream)}. */ - void saveBuffer(final OutputStream output) throws HornetQException; + void saveBuffer(final OutputStream output) throws ActiveMQException; void addPacket(byte[] chunk, int flowControlSize, boolean isContinues); /** * Waits for the completion for the specified waiting time (in milliseconds). */ - boolean waitCompletion(long timeWait) throws HornetQException; + boolean waitCompletion(long timeWait) throws ActiveMQException; } 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 7c37524621..ff1436350d 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 @@ -26,11 +26,11 @@ import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; import io.netty.buffer.ByteBuf; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQInterruptedException; +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.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; @@ -268,7 +268,7 @@ public class LargeMessageControllerImpl implements LargeMessageController } } - public void setOutputStream(final OutputStream output) throws HornetQException + public void setOutputStream(final OutputStream output) throws ActiveMQException { int totalFlowControl = 0; @@ -304,7 +304,7 @@ public class LargeMessageControllerImpl implements LargeMessageController } } - public synchronized void saveBuffer(final OutputStream output) throws HornetQException + public synchronized void saveBuffer(final OutputStream output) throws ActiveMQException { if (streamClosed) { @@ -316,9 +316,9 @@ public class LargeMessageControllerImpl implements LargeMessageController /** * @param timeWait Milliseconds to Wait. 0 means forever - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - public synchronized boolean waitCompletion(final long timeWait) throws HornetQException + public synchronized boolean waitCompletion(final long timeWait) throws ActiveMQException { if (outStream == null) { @@ -347,23 +347,17 @@ public class LargeMessageControllerImpl implements LargeMessageController } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } if (!streamEnded && handledException == null) { if (timeWait != 0 && System.currentTimeMillis() > timeOut) { - - // TODO: what to do here? - //throw new HornetQException(HornetQException.LARGE_MESSAGE_ERROR_BODY, - // "Timeout waiting for LargeMessage Body"); throw HornetQClientMessageBundle.BUNDLE.timeoutOnLargeMessage(); } else if (System.currentTimeMillis() > timeOut && !packetAdded) { - // throw new HornetQException(HornetQException.LARGE_MESSAGE_ERROR_BODY, - // "No packets have arrived within " + readTimeout + " milliseconds"); throw HornetQClientMessageBundle.BUNDLE.timeoutOnLargeMessage(); } } @@ -376,21 +370,21 @@ public class LargeMessageControllerImpl implements LargeMessageController } /** - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - private void checkException() throws HornetQException + private void checkException() throws ActiveMQException { // it's not needed to copy it as we never set it back to null // once the exception is set, the controller is pretty much useless if (handledException != null) { - if (handledException instanceof HornetQException) + if (handledException instanceof ActiveMQException) { - throw (HornetQException)handledException; + throw (ActiveMQException)handledException; } else { - throw new HornetQException(HornetQExceptionType.LARGE_MESSAGE_ERROR_BODY, + throw new ActiveMQException(ActiveMQExceptionType.LARGE_MESSAGE_ERROR_BODY, "Error on saving LargeMessageBufferImpl", handledException); } @@ -431,14 +425,14 @@ public class LargeMessageControllerImpl implements LargeMessageController } @Override - public void getBytes(final int index, final HornetQBuffer dst, final int dstIndex, final int length) + public void getBytes(final int index, final ActiveMQBuffer dst, final int dstIndex, final int length) { byte[] destBytes = new byte[length]; getBytes(index, destBytes); dst.setBytes(dstIndex, destBytes); } - private void getBytes(final long index, final HornetQBuffer dst, final int dstIndex, final int length) + private void getBytes(final long index, final ActiveMQBuffer dst, final int dstIndex, final int length) { byte[] destBytes = new byte[length]; getBytes(index, destBytes); @@ -565,7 +559,7 @@ public class LargeMessageControllerImpl implements LargeMessageController } @Override - public void setBytes(final int index, final HornetQBuffer src, final int srcIndex, final int length) + public void setBytes(final int index, final ActiveMQBuffer src, final int srcIndex, final int length) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } @@ -763,12 +757,12 @@ public class LargeMessageControllerImpl implements LargeMessageController } } - public void getBytes(final int index, final HornetQBuffer dst) + public void getBytes(final int index, final ActiveMQBuffer dst) { getBytes(index, dst, dst.writableBytes()); } - public void getBytes(final int index, final HornetQBuffer dst, final int length) + public void getBytes(final int index, final ActiveMQBuffer dst, final int length) { if (length > dst.writableBytes()) { @@ -783,12 +777,12 @@ public class LargeMessageControllerImpl implements LargeMessageController throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } - public void setBytes(final int index, final HornetQBuffer src) + public void setBytes(final int index, final ActiveMQBuffer src) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } - public void setBytes(final int index, final HornetQBuffer src, final int length) + public void setBytes(final int index, final ActiveMQBuffer src, final int length) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } @@ -868,12 +862,12 @@ public class LargeMessageControllerImpl implements LargeMessageController readBytes(dst, 0, dst.length); } - public void readBytes(final HornetQBuffer dst) + public void readBytes(final ActiveMQBuffer dst) { readBytes(dst, dst.writableBytes()); } - public void readBytes(final HornetQBuffer dst, final int length) + public void readBytes(final ActiveMQBuffer dst, final int length) { if (length > dst.writableBytes()) { @@ -883,7 +877,7 @@ public class LargeMessageControllerImpl implements LargeMessageController dst.writerIndex(dst.writerIndex() + length); } - public void readBytes(final HornetQBuffer dst, final int dstIndex, final int length) + public void readBytes(final ActiveMQBuffer dst, final int dstIndex, final int length) { getBytes(readerIndex, dst, dstIndex, length); readerIndex += length; @@ -952,12 +946,12 @@ public class LargeMessageControllerImpl implements LargeMessageController throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } - public void writeBytes(final HornetQBuffer src) + public void writeBytes(final ActiveMQBuffer src) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } - public void writeBytes(final HornetQBuffer src, final int length) + public void writeBytes(final ActiveMQBuffer src, final int length) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } @@ -1034,12 +1028,12 @@ public class LargeMessageControllerImpl implements LargeMessageController return Float.intBitsToFloat(getInt(index)); } - public HornetQBuffer readBytes(final int length) + public ActiveMQBuffer readBytes(final int length) { byte[] bytesToGet = new byte[length]; getBytes(readerIndex, bytesToGet); readerIndex += length; - return HornetQBuffers.wrappedBuffer(bytesToGet); + return ActiveMQBuffers.wrappedBuffer(bytesToGet); } @Override @@ -1177,12 +1171,12 @@ public class LargeMessageControllerImpl implements LargeMessageController throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } - public HornetQBuffer copy() + public ActiveMQBuffer copy() { throw new UnsupportedOperationException(); } - public HornetQBuffer slice(final int index, final int length) + public ActiveMQBuffer slice(final int index, final int length) { throw new UnsupportedOperationException(); } @@ -1190,9 +1184,9 @@ public class LargeMessageControllerImpl implements LargeMessageController /** * @param output * @param packet - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - private void sendPacketToOutput(final OutputStream output, final LargeData packet) throws HornetQException + private void sendPacketToOutput(final OutputStream output, final LargeData packet) throws ActiveMQException { try { @@ -1427,17 +1421,17 @@ public class LargeMessageControllerImpl implements LargeMessageController return null; } - public HornetQBuffer copy(final int index, final int length) + public ActiveMQBuffer copy(final int index, final int length) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } - public HornetQBuffer duplicate() + public ActiveMQBuffer duplicate() { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } - public HornetQBuffer readSlice(final int length) + public ActiveMQBuffer readSlice(final int length) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } @@ -1457,12 +1451,12 @@ public class LargeMessageControllerImpl implements LargeMessageController throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } - public HornetQBuffer slice() + public ActiveMQBuffer slice() { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } - public void writeBytes(final HornetQBuffer src, final int srcIndex, final int length) + public void writeBytes(final ActiveMQBuffer src, final int srcIndex, final int length) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } 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 bd02f4d02f..e47ac01a8c 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 @@ -35,11 +35,11 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQIllegalStateException; -import org.apache.activemq.api.core.HornetQInterruptedException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; @@ -234,7 +234,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } finally { @@ -254,7 +254,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } finally { @@ -357,14 +357,14 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery }); } - private synchronized void initialise() throws HornetQException + private synchronized void initialise() throws ActiveMQException { if (state == STATE.INITIALIZED) return; synchronized (stateGuard) { if (state == STATE.CLOSING) - throw new HornetQIllegalStateException(); + throw new ActiveMQIllegalStateException(); try { state = STATE.INITIALIZED; @@ -669,12 +669,12 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } @Override - public ClientSessionFactoryInternal connect() throws HornetQException + public ClientSessionFactoryInternal connect() throws ActiveMQException { return connect(false); } - private ClientSessionFactoryInternal connect(final boolean skipWarnings) throws HornetQException + private ClientSessionFactoryInternal connect(final boolean skipWarnings) throws ActiveMQException { synchronized (this) { @@ -691,7 +691,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } @Override - public ClientSessionFactoryInternal connectNoWarnings() throws HornetQException + public ClientSessionFactoryInternal connectNoWarnings() throws ActiveMQException { return connect(true); } @@ -767,7 +767,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { factory.connect(reconnectAttempts, failoverOnInitialConnection); } - catch (HornetQException e1) + catch (ActiveMQException e1) { //we need to make sure is closed just for garbage collection factory.close(); @@ -810,7 +810,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { factory.connect(reconnectAttempts, failoverOnInitialConnection); } - catch (HornetQException e1) + catch (ActiveMQException e1) { //we need to make sure is closed just for garbage collection factory.close(); @@ -842,7 +842,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } } - public ClientSessionFactory createSessionFactory() throws HornetQException + public ClientSessionFactory createSessionFactory() throws ActiveMQException { assertOpen(); @@ -904,11 +904,11 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery removeFromConnecting(factory); } } - catch (HornetQException e) + catch (ActiveMQException e) { factory.close(); factory = null; - if (e.getType() == HornetQExceptionType.NOT_CONNECTED) + if (e.getType() == ActiveMQExceptionType.NOT_CONNECTED) { attempts++; @@ -947,7 +947,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } @@ -1556,7 +1556,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } @@ -1573,7 +1573,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } } @@ -1755,7 +1755,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { connect(); } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQClientLogger.LOGGER.errorConnectingToNodes(e); } @@ -1860,7 +1860,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery private List connectors; - public ClientSessionFactory connect(boolean skipWarnings) throws HornetQException + public ClientSessionFactory connect(boolean skipWarnings) throws ActiveMQException { assertOpen(); @@ -1893,9 +1893,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery // Case the node where the cluster connection was connected is gone, we need to restart the // connection @Override - public void connectionFailed(HornetQException exception, boolean failedOver) + public void connectionFailed(ActiveMQException exception, boolean failedOver) { - if (clusterConnection && exception.getType() == HornetQExceptionType.DISCONNECTED) + if (clusterConnection && exception.getType() == ActiveMQExceptionType.DISCONNECTED) { try { @@ -1910,7 +1910,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } @@ -2049,7 +2049,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery this.factory = factory; } - public ClientSessionFactory tryConnect() throws HornetQException + public ClientSessionFactory tryConnect() throws ActiveMQException { if (HornetQClientLogger.LOGGER.isDebugEnabled()) { @@ -2073,7 +2073,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } return factoryToUse; } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQClientLogger.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/ServerLocatorInternal.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorInternal.java index dcdca02d20..7395e59428 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorInternal.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorInternal.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.client.impl; import java.util.concurrent.Executor; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; @@ -52,13 +52,13 @@ public interface ServerLocatorInternal extends ServerLocator // Reset this Locator back as if it never received any topology void resetToInitialConnectors(); - ClientSessionFactoryInternal connect() throws HornetQException; + ClientSessionFactoryInternal connect() throws ActiveMQException; /** * Like {@link #connect()} but it does not log warnings if it fails to connect. - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - ClientSessionFactoryInternal connectNoWarnings() throws HornetQException; + ClientSessionFactoryInternal connectNoWarnings() throws ActiveMQException; void notifyNodeUp(long uniqueEventID, String nodeID, String backupGroupName, String scaleDownGroupName, Pair connectorPair, boolean last); 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 30bed336b0..ce4dbd28f5 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 @@ -19,11 +19,11 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +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.BroadcastEndpoint; import org.apache.activemq.api.core.BroadcastEndpointFactory; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQInterruptedException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.CoreNotificationType; @@ -161,7 +161,7 @@ public final class DiscoveryGroup implements HornetQComponent } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } thread = null; @@ -215,7 +215,7 @@ public final class DiscoveryGroup implements HornetQComponent } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } if (timeout != 0) @@ -295,7 +295,7 @@ public final class DiscoveryGroup implements HornetQComponent } } - HornetQBuffer buffer = HornetQBuffers.wrappedBuffer(data); + ActiveMQBuffer buffer = ActiveMQBuffers.wrappedBuffer(data); String originatingNodeID = buffer.readString(); 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 c3f4402c7c..609386e99e 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 @@ -14,8 +14,8 @@ package org.apache.activemq.core.message; import java.nio.ByteBuffer; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; /** * Class used to encode message body into buffers. @@ -30,22 +30,22 @@ public interface BodyEncoder /** * This method must not be called directly by HornetQ clients. */ - void open() throws HornetQException; + void open() throws ActiveMQException; /** * This method must not be called directly by HornetQ clients. */ - void close() throws HornetQException; + void close() throws ActiveMQException; /** * This method must not be called directly by HornetQ clients. */ - int encode(ByteBuffer bufferRead) throws HornetQException; + int encode(ByteBuffer bufferRead) throws ActiveMQException; /** * This method must not be called directly by HornetQ clients. */ - int encode(HornetQBuffer bufferOut, int size) throws HornetQException; + int encode(ActiveMQBuffer bufferOut, int size) throws ActiveMQException; /** * This method must not be called directly by HornetQ clients. 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 1c76af9507..8d4f3d738d 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 @@ -17,10 +17,10 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQPropertyConversionException; +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.ActiveMQPropertyConversionException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.buffers.impl.ResetLimitWrappedHornetQBuffer; @@ -76,7 +76,7 @@ public abstract class MessageImpl implements MessageInternal protected byte priority; - protected HornetQBuffer buffer; + protected ActiveMQBuffer buffer; protected ResetLimitWrappedHornetQBuffer bodyBuffer; @@ -205,7 +205,7 @@ public abstract class MessageImpl implements MessageInternal } - public void encodeHeadersAndProperties(final HornetQBuffer buffer) + public void encodeHeadersAndProperties(final ActiveMQBuffer buffer) { buffer.writeLong(messageID); buffer.writeNullableSimpleString(address); @@ -226,7 +226,7 @@ public abstract class MessageImpl implements MessageInternal properties.encode(buffer); } - public void decodeHeadersAndProperties(final HornetQBuffer buffer) + public void decodeHeadersAndProperties(final ActiveMQBuffer buffer) { messageID = buffer.readLong(); address = buffer.readNullableSimpleString(); @@ -261,7 +261,7 @@ public abstract class MessageImpl implements MessageInternal properties = msg.getTypedProperties(); } - public HornetQBuffer getBodyBuffer() + public ActiveMQBuffer getBodyBuffer() { if (bodyBuffer == null) { @@ -285,17 +285,17 @@ public abstract class MessageImpl implements MessageInternal return this; } - public void checkCompletion() throws HornetQException + public void checkCompletion() throws ActiveMQException { // no op on regular messages } - public synchronized HornetQBuffer getBodyBufferCopy() + public synchronized ActiveMQBuffer getBodyBufferCopy() { // Must copy buffer before sending it - HornetQBuffer newBuffer = buffer.copy(0, buffer.capacity()); + ActiveMQBuffer newBuffer = buffer.copy(0, buffer.capacity()); newBuffer.setIndex(0, getEndOfBodyPosition()); @@ -454,7 +454,7 @@ public abstract class MessageImpl implements MessageInternal return map; } - public void decodeFromBuffer(final HornetQBuffer buffer) + public void decodeFromBuffer(final ActiveMQBuffer buffer) { this.buffer = buffer; @@ -502,7 +502,7 @@ public abstract class MessageImpl implements MessageInternal } // Encode to journal or paging - public void encode(final HornetQBuffer buff) + public void encode(final ActiveMQBuffer buff) { encodeToBuffer(); @@ -510,7 +510,7 @@ public abstract class MessageImpl implements MessageInternal } // Decode from journal or paging - public void decode(final HornetQBuffer buff) + public void decode(final ActiveMQBuffer buff) { int start = buff.readerIndex(); @@ -529,13 +529,13 @@ public abstract class MessageImpl implements MessageInternal buff.readerIndex(start + length); } - public synchronized HornetQBuffer getEncodedBuffer() + public synchronized ActiveMQBuffer getEncodedBuffer() { - HornetQBuffer buff = encodeToBuffer(); + ActiveMQBuffer buff = encodeToBuffer(); if (bufferUsed) { - HornetQBuffer copied = buff.copy(0, buff.capacity()); + ActiveMQBuffer copied = buff.copy(0, buff.capacity()); copied.setIndex(0, endOfMessagePosition); @@ -656,7 +656,7 @@ public abstract class MessageImpl implements MessageInternal return this; } - public Message putObjectProperty(final SimpleString key, final Object value) throws HornetQPropertyConversionException + public Message putObjectProperty(final SimpleString key, final Object value) throws ActiveMQPropertyConversionException { TypedProperties.setObjectProperty(key, value, properties); bufferValid = false; @@ -664,7 +664,7 @@ public abstract class MessageImpl implements MessageInternal return this; } - public Message putObjectProperty(final String key, final Object value) throws HornetQPropertyConversionException + public Message putObjectProperty(final String key, final Object value) throws ActiveMQPropertyConversionException { putObjectProperty(new SimpleString(key), value); @@ -768,87 +768,87 @@ public abstract class MessageImpl implements MessageInternal return properties.getProperty(key); } - public Boolean getBooleanProperty(final SimpleString key) throws HornetQPropertyConversionException + public Boolean getBooleanProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getBooleanProperty(key); } - public Boolean getBooleanProperty(final String key) throws HornetQPropertyConversionException + public Boolean getBooleanProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getBooleanProperty(new SimpleString(key)); } - public Byte getByteProperty(final SimpleString key) throws HornetQPropertyConversionException + public Byte getByteProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getByteProperty(key); } - public Byte getByteProperty(final String key) throws HornetQPropertyConversionException + public Byte getByteProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getByteProperty(new SimpleString(key)); } - public byte[] getBytesProperty(final SimpleString key) throws HornetQPropertyConversionException + public byte[] getBytesProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getBytesProperty(key); } - public byte[] getBytesProperty(final String key) throws HornetQPropertyConversionException + public byte[] getBytesProperty(final String key) throws ActiveMQPropertyConversionException { return getBytesProperty(new SimpleString(key)); } - public Double getDoubleProperty(final SimpleString key) throws HornetQPropertyConversionException + public Double getDoubleProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getDoubleProperty(key); } - public Double getDoubleProperty(final String key) throws HornetQPropertyConversionException + public Double getDoubleProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getDoubleProperty(new SimpleString(key)); } - public Integer getIntProperty(final SimpleString key) throws HornetQPropertyConversionException + public Integer getIntProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getIntProperty(key); } - public Integer getIntProperty(final String key) throws HornetQPropertyConversionException + public Integer getIntProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getIntProperty(new SimpleString(key)); } - public Long getLongProperty(final SimpleString key) throws HornetQPropertyConversionException + public Long getLongProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getLongProperty(key); } - public Long getLongProperty(final String key) throws HornetQPropertyConversionException + public Long getLongProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getLongProperty(new SimpleString(key)); } - public Short getShortProperty(final SimpleString key) throws HornetQPropertyConversionException + public Short getShortProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getShortProperty(key); } - public Short getShortProperty(final String key) throws HornetQPropertyConversionException + public Short getShortProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getShortProperty(new SimpleString(key)); } - public Float getFloatProperty(final SimpleString key) throws HornetQPropertyConversionException + public Float getFloatProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getFloatProperty(key); } - public Float getFloatProperty(final String key) throws HornetQPropertyConversionException + public Float getFloatProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getFloatProperty(new SimpleString(key)); } - public String getStringProperty(final SimpleString key) throws HornetQPropertyConversionException + public String getStringProperty(final SimpleString key) throws ActiveMQPropertyConversionException { SimpleString str = getSimpleStringProperty(key); @@ -862,17 +862,17 @@ public abstract class MessageImpl implements MessageInternal } } - public String getStringProperty(final String key) throws HornetQPropertyConversionException + public String getStringProperty(final String key) throws ActiveMQPropertyConversionException { return getStringProperty(new SimpleString(key)); } - public SimpleString getSimpleStringProperty(final SimpleString key) throws HornetQPropertyConversionException + public SimpleString getSimpleStringProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getSimpleStringProperty(key); } - public SimpleString getSimpleStringProperty(final String key) throws HornetQPropertyConversionException + public SimpleString getSimpleStringProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getSimpleStringProperty(new SimpleString(key)); } @@ -911,12 +911,12 @@ public abstract class MessageImpl implements MessageInternal return properties.getPropertyNames(); } - public HornetQBuffer getWholeBuffer() + public ActiveMQBuffer getWholeBuffer() { return buffer; } - public BodyEncoder getBodyEncoder() throws HornetQException + public BodyEncoder getBodyEncoder() throws ActiveMQException { return new DecodingContext(); } @@ -1001,7 +1001,7 @@ public abstract class MessageImpl implements MessageInternal // This must be synchronized as it can be called concurrently id the message is being delivered // concurrently to // many queues - the first caller in this case will actually encode it - private synchronized HornetQBuffer encodeToBuffer() + private synchronized ActiveMQBuffer encodeToBuffer() { if (!bufferValid) { @@ -1062,7 +1062,7 @@ public abstract class MessageImpl implements MessageInternal public void createBody(final int initialMessageBufferSize) { - buffer = HornetQBuffers.dynamicBuffer(initialMessageBufferSize); + buffer = ActiveMQBuffers.dynamicBuffer(initialMessageBufferSize); // There's a bug in netty which means a dynamic buffer won't resize until you write a byte buffer.writeByte((byte) 0); @@ -1109,13 +1109,13 @@ public abstract class MessageImpl implements MessageInternal return buffer.writerIndex(); } - public int encode(final ByteBuffer bufferRead) throws HornetQException + public int encode(final ByteBuffer bufferRead) throws ActiveMQException { - HornetQBuffer buffer = HornetQBuffers.wrappedBuffer(bufferRead); + ActiveMQBuffer buffer = ActiveMQBuffers.wrappedBuffer(bufferRead); return encode(buffer, bufferRead.capacity()); } - public int encode(final HornetQBuffer bufferOut, final int size) + public int encode(final ActiveMQBuffer bufferOut, final int size) { bufferOut.writeBytes(getWholeBuffer(), lastPos, size); lastPos += size; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageInternal.java b/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageInternal.java index 9210173971..78fad27b41 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageInternal.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageInternal.java @@ -14,8 +14,8 @@ package org.apache.activemq.core.message.impl; import java.io.InputStream; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +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.api.core.SimpleString; import org.apache.activemq.core.message.BodyEncoder; @@ -30,7 +30,7 @@ import org.apache.activemq.utils.TypedProperties; */ public interface MessageInternal extends Message { - void decodeFromBuffer(HornetQBuffer buffer); + void decodeFromBuffer(ActiveMQBuffer buffer); int getEndOfMessagePosition(); @@ -44,17 +44,17 @@ public interface MessageInternal extends Message boolean isServerMessage(); - HornetQBuffer getEncodedBuffer(); + ActiveMQBuffer getEncodedBuffer(); int getHeadersAndPropertiesEncodeSize(); - HornetQBuffer getWholeBuffer(); + ActiveMQBuffer getWholeBuffer(); - void encodeHeadersAndProperties(HornetQBuffer buffer); + void encodeHeadersAndProperties(ActiveMQBuffer buffer); - void decodeHeadersAndProperties(HornetQBuffer buffer); + void decodeHeadersAndProperties(ActiveMQBuffer buffer); - BodyEncoder getBodyEncoder() throws HornetQException; + BodyEncoder getBodyEncoder() throws ActiveMQException; InputStream getBodyInputStream(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/ClientPacketDecoder.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/ClientPacketDecoder.java index 2029246167..4cd45d1769 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/ClientPacketDecoder.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/ClientPacketDecoder.java @@ -16,7 +16,7 @@ package org.apache.activemq.core.protocol; import static org.apache.activemq.core.protocol.core.impl.PacketImpl.SESS_RECEIVE_LARGE_MSG; import static org.apache.activemq.core.protocol.core.impl.PacketImpl.SESS_RECEIVE_MSG; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.client.impl.ClientLargeMessageImpl; import org.apache.activemq.core.client.impl.ClientMessageImpl; import org.apache.activemq.core.protocol.core.Packet; @@ -33,7 +33,7 @@ public class ClientPacketDecoder extends PacketDecoder public static final ClientPacketDecoder INSTANCE = new ClientPacketDecoder(); @Override - public Packet decode(final HornetQBuffer in) + public Packet decode(final ActiveMQBuffer in) { final byte packetType = in.readByte(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Channel.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Channel.java index b5a310ff7a..9f872034e6 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Channel.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Channel.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core; import java.util.concurrent.locks.Lock; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; /** * A channel is a way of interleaving data meant for different endpoints over the same {@link org.apache.activemq.core.protocol.core.CoreRemotingConnection}. @@ -69,9 +69,9 @@ public interface Channel * @param packet the packet to send * @param expectedPacket the packet being expected. * @return the response - * @throws HornetQException if an error occurs during the send + * @throws org.apache.activemq.api.core.ActiveMQException if an error occurs during the send */ - Packet sendBlocking(Packet packet, byte expectedPacket) throws HornetQException; + Packet sendBlocking(Packet packet, byte expectedPacket) throws ActiveMQException; /** * Sets the {@link org.apache.activemq.core.protocol.core.ChannelHandler} that this channel should diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Packet.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Packet.java index e4cb4148ad..3143c62075 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Packet.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Packet.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.spi.core.protocol.RemotingConnection; /** @@ -54,19 +54,19 @@ public interface Packet byte getType(); /** - * Encodes the packet and returns a {@link org.apache.activemq.api.core.HornetQBuffer} containing the data + * Encodes the packet and returns a {@link org.apache.activemq.api.core.ActiveMQBuffer} containing the data * * @param connection the connection * @return the buffer to encode to */ - HornetQBuffer encode(RemotingConnection connection); + ActiveMQBuffer encode(RemotingConnection connection); /** * decodes the buffer into this packet * * @param buffer the buffer to decode from */ - void decode(HornetQBuffer buffer); + void decode(ActiveMQBuffer buffer); /** * returns the size needed to encode this packet. 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 7021acd9ab..c5709b48cd 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 @@ -21,9 +21,9 @@ import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQInterruptedException; +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; @@ -240,7 +240,7 @@ public final class ChannelImpl implements Channel HornetQClientLogger.LOGGER.trace("Sending packet nonblocking " + packet + " on channeID=" + id); } - HornetQBuffer buffer = packet.encode(connection); + ActiveMQBuffer buffer = packet.encode(connection); lock.lock(); @@ -255,7 +255,7 @@ public final class ChannelImpl implements Channel } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } @@ -294,7 +294,7 @@ public final class ChannelImpl implements Channel * and the client could eventually retry another call, but the server could then answer a previous command issuing a class-cast-exception. * The expectedPacket will be used to filter out undesirable packets that would belong to previous calls. */ - public Packet sendBlocking(final Packet packet, byte expectedPacket) throws HornetQException + public Packet sendBlocking(final Packet packet, byte expectedPacket) throws ActiveMQException { String interceptionResult = invokeInterceptors(packet, interceptors, connection); @@ -320,7 +320,7 @@ public final class ChannelImpl implements Channel { packet.setChannelID(id); - final HornetQBuffer buffer = packet.encode(connection); + final ActiveMQBuffer buffer = packet.encode(connection); lock.lock(); @@ -347,7 +347,7 @@ public final class ChannelImpl implements Channel } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } @@ -373,7 +373,7 @@ public final class ChannelImpl implements Channel } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } if (response != null && response.getType() != PacketImpl.EXCEPTION && response.getType() != expectedPacket) @@ -402,7 +402,7 @@ public final class ChannelImpl implements Channel { final HornetQExceptionMessage mem = (HornetQExceptionMessage) response; - HornetQException e = mem.getException(); + ActiveMQException e = mem.getException(); e.fillInStackTrace(); @@ -653,7 +653,7 @@ public final class ChannelImpl implements Channel private void doWrite(final Packet packet) { - final HornetQBuffer buffer = packet.encode(connection); + final ActiveMQBuffer buffer = packet.encode(connection); connection.getTransportConnection().write(buffer, false, false); } 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/HornetQClientProtocolManager.java index f47078c156..c98db9702d 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/HornetQClientProtocolManager.java @@ -19,10 +19,10 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Lock; import io.netty.channel.ChannelPipeline; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQInterruptedException; +import org.apache.activemq.api.core.ActiveMQBuffer; +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.Interceptor; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; @@ -250,7 +250,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager @Override public SessionContext createSessionContext(String name, String username, String password, boolean xa, boolean autoCommitSends, boolean autoCommitAcks, - boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize) throws HornetQException + boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize) throws ActiveMQException { for (Version clientVersion : VersionLoader.getClientVersions()) { @@ -267,21 +267,21 @@ public class HornetQClientProtocolManager implements ClientProtocolManager minLargeMessageSize, confirmationWindowSize); } - catch (HornetQException e) + catch (ActiveMQException e) { - if (e.getType() != HornetQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS) + if (e.getType() != ActiveMQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS) { throw e; } } } connection.destroy(); - throw new HornetQException(HornetQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS); + throw new ActiveMQException(ActiveMQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS); } public SessionContext createSessionContext(Version clientVersion, String name, String username, String password, boolean xa, boolean autoCommitSends, boolean autoCommitAcks, - boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize) throws HornetQException + boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize) throws ActiveMQException { if (!isAlive()) throw HornetQClientMessageBundle.BUNDLE.clientSessionClosed(); @@ -331,12 +331,12 @@ public class HornetQClientProtocolManager implements ClientProtocolManager // channel1 reference here has to go away response = (CreateSessionResponseMessage) getChannel1().sendBlocking(request, PacketImpl.CREATESESSION_RESP); } - catch (HornetQException cause) + catch (ActiveMQException cause) { if (!isAlive()) throw cause; - if (cause.getType() == HornetQExceptionType.UNBLOCKED) + if (cause.getType() == ActiveMQExceptionType.UNBLOCKED) { // This means the thread was blocked on create session and failover unblocked it // so failover could occur @@ -363,9 +363,9 @@ public class HornetQClientProtocolManager implements ClientProtocolManager lock = null; } - if (t instanceof HornetQException) + if (t instanceof ActiveMQException) { - throw (HornetQException) t; + throw (ActiveMQException) t; } else { @@ -392,7 +392,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager } - public boolean cleanupBeforeFailover(HornetQException cause) + public boolean cleanupBeforeFailover(ActiveMQException cause) { boolean needToInterrupt; @@ -437,7 +437,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager } catch (InterruptedException e1) { - throw new HornetQInterruptedException(e1); + throw new ActiveMQInterruptedException(e1); } } } @@ -446,7 +446,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager } @Override - public boolean checkForFailover(String liveNodeID) throws HornetQException + public boolean checkForFailover(String liveNodeID) throws ActiveMQException { CheckFailoverMessage packet = new CheckFailoverMessage(liveNodeID); CheckFailoverReplyMessage message = (CheckFailoverReplyMessage) getChannel1().sendBlocking(packet, @@ -479,7 +479,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager { // no need to send handshake on inVM as inVM is not using the NettyProtocolHandling String handshake = "HORNETQ"; - HornetQBuffer hqbuffer = connection.createBuffer(handshake.length()); + ActiveMQBuffer hqbuffer = connection.createBuffer(handshake.length()); hqbuffer.writeBytes(handshake.getBytes()); transportConnection.write(hqbuffer); } @@ -598,7 +598,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager return ClientPacketDecoder.INSTANCE; } - private void forceReturnChannel1(HornetQException cause) + private void forceReturnChannel1(ActiveMQException cause) { if (connection != null) { 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/HornetQSessionContext.java index 2cc14eec0e..5589402095 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/HornetQSessionContext.java @@ -23,9 +23,9 @@ import java.util.List; import java.util.Map; import java.util.concurrent.Executor; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; @@ -172,7 +172,7 @@ public class HornetQSessionContext extends SessionContext // Failover utility methods @Override - public void returnBlocking(HornetQException cause) + public void returnBlocking(ActiveMQException cause) { sessionChannel.returnBlocking(cause); } @@ -215,17 +215,17 @@ public class HornetQSessionContext extends SessionContext public void createSharedQueue(SimpleString address, SimpleString queueName, SimpleString filterString, - boolean durable) throws HornetQException + boolean durable) throws ActiveMQException { sessionChannel.sendBlocking(new CreateSharedQueueMessage(address, queueName, filterString, durable, true), PacketImpl.NULL_RESPONSE); } - public void deleteQueue(final SimpleString queueName) throws HornetQException + public void deleteQueue(final SimpleString queueName) throws ActiveMQException { sessionChannel.sendBlocking(new SessionDeleteQueueMessage(queueName), PacketImpl.NULL_RESPONSE); } - public ClientSession.QueueQuery queueQuery(final SimpleString queueName) throws HornetQException + public ClientSession.QueueQuery queueQuery(final SimpleString queueName) throws ActiveMQException { SessionQueueQueryMessage request = new SessionQueueQueryMessage(queueName); SessionQueueQueryResponseMessage response = (SessionQueueQueryResponseMessage) sessionChannel.sendBlocking(request, PacketImpl.SESS_QUEUEQUERY_RESP); @@ -237,7 +237,7 @@ public class HornetQSessionContext extends SessionContext public ClientConsumerInternal createConsumer(SimpleString queueName, SimpleString filterString, int windowSize, int maxRate, int ackBatchSize, boolean browseOnly, - Executor executor, Executor flowControlExecutor) throws HornetQException + Executor executor, Executor flowControlExecutor) throws ActiveMQException { long consumerID = idGenerator.generateID(); @@ -278,7 +278,7 @@ public class HornetQSessionContext extends SessionContext return serverVersion; } - public ClientSession.AddressQuery addressQuery(final SimpleString address) throws HornetQException + public ClientSession.AddressQuery addressQuery(final SimpleString address) throws ActiveMQException { SessionBindingQueryResponseMessage response = (SessionBindingQueryResponseMessage) sessionChannel.sendBlocking(new SessionBindingQueryMessage(address), PacketImpl.SESS_BINDINGQUERY_RESP); @@ -288,7 +288,7 @@ public class HornetQSessionContext extends SessionContext @Override - public void closeConsumer(final ClientConsumer consumer) throws HornetQException + public void closeConsumer(final ClientConsumer consumer) throws ActiveMQException { sessionChannel.sendBlocking(new SessionConsumerCloseMessage(getConsumerID(consumer)), PacketImpl.NULL_RESPONSE); } @@ -298,44 +298,44 @@ public class HornetQSessionContext extends SessionContext sessionChannel.send(new SessionConsumerFlowCreditMessage(getConsumerID(consumer), credits)); } - public void forceDelivery(final ClientConsumer consumer, final long sequence) throws HornetQException + public void forceDelivery(final ClientConsumer consumer, final long sequence) throws ActiveMQException { SessionForceConsumerDelivery request = new SessionForceConsumerDelivery(getConsumerID(consumer), sequence); sessionChannel.send(request); } - public void simpleCommit() throws HornetQException + public void simpleCommit() throws ActiveMQException { sessionChannel.sendBlocking(new PacketImpl(PacketImpl.SESS_COMMIT), PacketImpl.NULL_RESPONSE); } - public void simpleRollback(boolean lastMessageAsDelivered) throws HornetQException + public void simpleRollback(boolean lastMessageAsDelivered) throws ActiveMQException { sessionChannel.sendBlocking(new RollbackMessage(lastMessageAsDelivered), PacketImpl.NULL_RESPONSE); } - public void sessionStart() throws HornetQException + public void sessionStart() throws ActiveMQException { sessionChannel.send(new PacketImpl(PacketImpl.SESS_START)); } - public void sessionStop() throws HornetQException + public void sessionStop() throws ActiveMQException { sessionChannel.sendBlocking(new PacketImpl(PacketImpl.SESS_STOP), PacketImpl.NULL_RESPONSE); } - public void addSessionMetadata(String key, String data) throws HornetQException + public void addSessionMetadata(String key, String data) throws ActiveMQException { sessionChannel.sendBlocking(new SessionAddMetaDataMessageV2(key, data), PacketImpl.NULL_RESPONSE); } - public void addUniqueMetaData(String key, String data) throws HornetQException + public void addUniqueMetaData(String key, String data) throws ActiveMQException { sessionChannel.sendBlocking(new SessionUniqueAddMetaDataMessage(key, data), PacketImpl.NULL_RESPONSE); } - public void xaCommit(Xid xid, boolean onePhase) throws XAException, HornetQException + public void xaCommit(Xid xid, boolean onePhase) throws XAException, ActiveMQException { SessionXACommitMessage packet = new SessionXACommitMessage(xid, onePhase); SessionXAResponseMessage response = (SessionXAResponseMessage) sessionChannel.sendBlocking(packet, PacketImpl.SESS_XA_RESP); @@ -351,7 +351,7 @@ public class HornetQSessionContext extends SessionContext } } - public void xaEnd(Xid xid, int flags) throws XAException, HornetQException + public void xaEnd(Xid xid, int flags) throws XAException, ActiveMQException { Packet packet; if (flags == XAResource.TMSUSPEND) @@ -401,7 +401,7 @@ public class HornetQSessionContext extends SessionContext return msgI.getEncodeSize(); } - public void sendFullMessage(MessageInternal msgI, boolean sendBlocking, SendAcknowledgementHandler handler, SimpleString defaultAddress) throws HornetQException + public void sendFullMessage(MessageInternal msgI, boolean sendBlocking, SendAcknowledgementHandler handler, SimpleString defaultAddress) throws ActiveMQException { SessionSendMessage packet = new SessionSendMessage(msgI, sendBlocking, handler); @@ -416,7 +416,7 @@ public class HornetQSessionContext extends SessionContext } @Override - public int sendInitialChunkOnLargeMessage(MessageInternal msgI) throws HornetQException + public int sendInitialChunkOnLargeMessage(MessageInternal msgI) throws ActiveMQException { SessionSendLargeMessage initialChunk = new SessionSendLargeMessage(msgI); @@ -426,7 +426,7 @@ public class HornetQSessionContext extends SessionContext } @Override - public int sendLargeMessageChunk(MessageInternal msgI, long messageBodySize, boolean sendBlocking, boolean lastChunk, byte[] chunk, SendAcknowledgementHandler messageHandler) throws HornetQException + public int sendLargeMessageChunk(MessageInternal msgI, long messageBodySize, boolean sendBlocking, boolean lastChunk, byte[] chunk, SendAcknowledgementHandler messageHandler) throws ActiveMQException { final boolean requiresResponse = lastChunk && sendBlocking; final SessionSendContinuationMessage chunkPacket = @@ -446,7 +446,7 @@ public class HornetQSessionContext extends SessionContext return chunkPacket.getPacketSize(); } - public void sendACK(boolean individual, boolean block, final ClientConsumer consumer, final Message message) throws HornetQException + public void sendACK(boolean individual, boolean block, final ClientConsumer consumer, final Message message) throws ActiveMQException { PacketImpl messagePacket; if (individual) @@ -468,7 +468,7 @@ public class HornetQSessionContext extends SessionContext } } - public void expireMessage(final ClientConsumer consumer, Message message) throws HornetQException + public void expireMessage(final ClientConsumer consumer, Message message) throws ActiveMQException { SessionExpireMessage messagePacket = new SessionExpireMessage(getConsumerID(consumer), message.getMessageID()); @@ -476,12 +476,12 @@ public class HornetQSessionContext extends SessionContext } - public void sessionClose() throws HornetQException + public void sessionClose() throws ActiveMQException { sessionChannel.sendBlocking(new SessionCloseMessage(), PacketImpl.NULL_RESPONSE); } - public void xaForget(Xid xid) throws XAException, HornetQException + public void xaForget(Xid xid) throws XAException, ActiveMQException { SessionXAResponseMessage response = (SessionXAResponseMessage) sessionChannel.sendBlocking(new SessionXAForgetMessage(xid), PacketImpl.SESS_XA_RESP); @@ -491,7 +491,7 @@ public class HornetQSessionContext extends SessionContext } } - public int xaPrepare(Xid xid) throws XAException, HornetQException + public int xaPrepare(Xid xid) throws XAException, ActiveMQException { SessionXAPrepareMessage packet = new SessionXAPrepareMessage(xid); @@ -507,7 +507,7 @@ public class HornetQSessionContext extends SessionContext } } - public Xid[] xaScan() throws HornetQException + public Xid[] xaScan() throws ActiveMQException { SessionXAGetInDoubtXidsResponseMessage response = (SessionXAGetInDoubtXidsResponseMessage) sessionChannel.sendBlocking(new PacketImpl(PacketImpl.SESS_XA_INDOUBT_XIDS), PacketImpl.SESS_XA_INDOUBT_XIDS_RESP); @@ -518,7 +518,7 @@ public class HornetQSessionContext extends SessionContext return xidArray; } - public void xaRollback(Xid xid, boolean wasStarted) throws HornetQException, XAException + public void xaRollback(Xid xid, boolean wasStarted) throws ActiveMQException, XAException { SessionXARollbackMessage packet = new SessionXARollbackMessage(xid); @@ -530,7 +530,7 @@ public class HornetQSessionContext extends SessionContext } } - public void xaStart(Xid xid, int flags) throws XAException, HornetQException + public void xaStart(Xid xid, int flags) throws XAException, ActiveMQException { Packet packet; if (flags == XAResource.TMJOIN) @@ -560,28 +560,28 @@ public class HornetQSessionContext extends SessionContext } } - public boolean configureTransactionTimeout(int seconds) throws HornetQException + public boolean configureTransactionTimeout(int seconds) throws ActiveMQException { SessionXASetTimeoutResponseMessage response = (SessionXASetTimeoutResponseMessage) sessionChannel.sendBlocking(new SessionXASetTimeoutMessage(seconds), PacketImpl.SESS_XA_SET_TIMEOUT_RESP); return response.isOK(); } - public int recoverSessionTimeout() throws HornetQException + public int recoverSessionTimeout() throws ActiveMQException { SessionXAGetTimeoutResponseMessage response = (SessionXAGetTimeoutResponseMessage) sessionChannel.sendBlocking(new PacketImpl(PacketImpl.SESS_XA_GET_TIMEOUT), PacketImpl.SESS_XA_GET_TIMEOUT_RESP); return response.getTimeoutSeconds(); } - public void createQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable, boolean temp) throws HornetQException + public void createQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable, boolean temp) throws ActiveMQException { CreateQueueMessage request = new CreateQueueMessage(address, queueName, filterString, durable, temp, true); sessionChannel.sendBlocking(request, PacketImpl.NULL_RESPONSE); } @Override - public boolean reattachOnNewConnection(RemotingConnection newConnection) throws HornetQException + public boolean reattachOnNewConnection(RemotingConnection newConnection) throws ActiveMQException { this.remotingConnection = newConnection; @@ -623,7 +623,7 @@ public class HornetQSessionContext extends SessionContext final boolean autoCommitSends, final boolean autoCommitAcks, final boolean preAcknowledge, - final SimpleString defaultAddress) throws HornetQException + final SimpleString defaultAddress) throws ActiveMQException { Packet createRequest = new CreateSessionMessage(name, sessionChannel.getID(), @@ -646,10 +646,10 @@ public class HornetQSessionContext extends SessionContext getCreateChannel().sendBlocking(createRequest, PacketImpl.CREATESESSION_RESP); retry = false; } - catch (HornetQException e) + catch (ActiveMQException e) { // the session was created while its server was starting, retry it: - if (e.getType() == HornetQExceptionType.SESSION_CREATION_REJECTED) + if (e.getType() == ActiveMQExceptionType.SESSION_CREATION_REJECTED) { HornetQClientLogger.LOGGER.retryCreateSessionSeverStarting(name); retry = true; @@ -674,7 +674,7 @@ public class HornetQSessionContext extends SessionContext } @Override - public void recreateConsumerOnServer(ClientConsumerInternal consumerInternal) throws HornetQException + public void recreateConsumerOnServer(ClientConsumerInternal consumerInternal) throws ActiveMQException { ClientSession.QueueQuery queueInfo = consumerInternal.getQueueInfo(); @@ -719,12 +719,12 @@ public class HornetQSessionContext extends SessionContext } } - public void xaFailed(Xid xid) throws HornetQException + public void xaFailed(Xid xid) throws ActiveMQException { sendPacketWithoutLock(sessionChannel, new SessionXAAfterFailedMessage(xid)); } - public void restartSession() throws HornetQException + public void restartSession() throws ActiveMQException { sendPacketWithoutLock(sessionChannel, new PacketImpl(PacketImpl.SESS_START)); } @@ -754,9 +754,9 @@ public class HornetQSessionContext extends SessionContext /** * This doesn't apply to other protocols probably, so it will be a hornetq exclusive feature * - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - private void handleConsumerDisconnected(DisconnectConsumerMessage packet) throws HornetQException + private void handleConsumerDisconnected(DisconnectConsumerMessage packet) throws ActiveMQException { DisconnectConsumerMessage message = packet; @@ -931,7 +931,7 @@ public class HornetQSessionContext extends SessionContext Connection conn = parameterChannel.getConnection().getTransportConnection(); - HornetQBuffer buffer = packet.encode(this.getCoreConnection()); + ActiveMQBuffer buffer = packet.encode(this.getCoreConnection()); conn.write(buffer, false, false); } 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 908f4839ef..764f8ecceb 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 @@ -76,7 +76,7 @@ import static org.apache.activemq.core.protocol.core.impl.PacketImpl.SUBSCRIBE_T import java.io.Serializable; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.wireformat.CheckFailoverMessage; @@ -144,7 +144,7 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.SubscribeClusterTo */ public abstract class PacketDecoder implements Serializable { - public abstract Packet decode(final HornetQBuffer in); + public abstract Packet decode(final ActiveMQBuffer in); public Packet decode(byte packetType) { diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketImpl.java index 0a94621590..1ff25f68f0 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketImpl.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.utils.DataConstants; @@ -266,9 +266,9 @@ public class PacketImpl implements Packet this.channelID = channelID; } - public HornetQBuffer encode(final RemotingConnection connection) + public ActiveMQBuffer encode(final RemotingConnection connection) { - HornetQBuffer buffer = connection.createBuffer(PacketImpl.INITIAL_PACKET_SIZE); + ActiveMQBuffer buffer = connection.createBuffer(PacketImpl.INITIAL_PACKET_SIZE); // The standard header fields @@ -288,7 +288,7 @@ public class PacketImpl implements Packet return buffer; } - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { channelID = buffer.readLong(); @@ -312,11 +312,11 @@ public class PacketImpl implements Packet return false; } - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { } - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { } 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 03a17d39cc..7e5b4f08b6 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 @@ -19,8 +19,8 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executor; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +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; @@ -198,7 +198,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement channels.put(channelID, channel); } - public void fail(final HornetQException me, String scaleDownTargetNodeID) + public void fail(final ActiveMQException me, String scaleDownTargetNodeID) { synchronized (failLock) { @@ -366,7 +366,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement // Buffer Handler implementation // ---------------------------------------------------- - public void bufferReceived(final Object connectionID, final HornetQBuffer buffer) + public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { try { diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverMessage.java index 16fb2db767..45b985e23d 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; public class CheckFailoverMessage extends PacketImpl @@ -31,13 +31,13 @@ public class CheckFailoverMessage extends PacketImpl } @Override - public void encodeRest(HornetQBuffer buffer) + public void encodeRest(ActiveMQBuffer buffer) { buffer.writeNullableString(nodeID); } @Override - public void decodeRest(HornetQBuffer buffer) + public void decodeRest(ActiveMQBuffer buffer) { nodeID = buffer.readNullableString(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverReplyMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverReplyMessage.java index 351766d189..001e751948 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverReplyMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverReplyMessage.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; public class CheckFailoverReplyMessage extends PacketImpl @@ -38,13 +38,13 @@ public class CheckFailoverReplyMessage extends PacketImpl } @Override - public void encodeRest(HornetQBuffer buffer) + public void encodeRest(ActiveMQBuffer buffer) { buffer.writeBoolean(okToFailover); } @Override - public void decodeRest(HornetQBuffer buffer) + public void decodeRest(ActiveMQBuffer buffer) { okToFailover = buffer.readBoolean(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java index 52c9d443ae..b6dc0106a1 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -92,7 +92,7 @@ public class ClusterTopologyChangeMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeBoolean(exit); buffer.writeString(nodeID); @@ -121,7 +121,7 @@ public class ClusterTopologyChangeMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { exit = buffer.readBoolean(); nodeID = buffer.readString(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java index 8f8d97b7df..c374977f2f 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; @@ -77,7 +77,7 @@ public class ClusterTopologyChangeMessage_V2 extends ClusterTopologyChangeMessag } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeBoolean(exit); buffer.writeString(nodeID); @@ -108,7 +108,7 @@ public class ClusterTopologyChangeMessage_V2 extends ClusterTopologyChangeMessag } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { exit = buffer.readBoolean(); nodeID = buffer.readString(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V3.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V3.java index e3c2b3f0c8..6fa8751b7b 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V3.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V3.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; @@ -54,14 +54,14 @@ public class ClusterTopologyChangeMessage_V3 extends ClusterTopologyChangeMessag } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { super.encodeRest(buffer); buffer.writeNullableString(scaleDownGroupName); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { super.decodeRest(buffer); scaleDownGroupName = buffer.readNullableString(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateQueueMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateQueueMessage.java index 9c07c721a7..b79c10d23c 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateQueueMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateQueueMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -128,7 +128,7 @@ public class CreateQueueMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeSimpleString(address); buffer.writeSimpleString(queueName); @@ -139,7 +139,7 @@ public class CreateQueueMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { address = buffer.readSimpleString(); queueName = buffer.readSimpleString(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionMessage.java index f3abf68aef..f7a41347dc 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -149,7 +149,7 @@ public class CreateSessionMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeString(name); buffer.writeLong(sessionChannelID); @@ -166,7 +166,7 @@ public class CreateSessionMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { name = buffer.readString(); sessionChannelID = buffer.readLong(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionResponseMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionResponseMessage.java index e1540a2d2d..97c4d72c02 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionResponseMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionResponseMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -48,13 +48,13 @@ public class CreateSessionResponseMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeInt(serverVersion); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { serverVersion = buffer.readInt(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSharedQueueMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSharedQueueMessage.java index 4479218b56..d84df89b61 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSharedQueueMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSharedQueueMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -108,7 +108,7 @@ public class CreateSharedQueueMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeSimpleString(address); buffer.writeSimpleString(queueName); @@ -118,7 +118,7 @@ public class CreateSharedQueueMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { address = buffer.readSimpleString(); queueName = buffer.readSimpleString(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectConsumerMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectConsumerMessage.java index 6eb4bf4f04..db0e32d69e 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectConsumerMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectConsumerMessage.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; public class DisconnectConsumerMessage extends PacketImpl @@ -32,13 +32,13 @@ public class DisconnectConsumerMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeLong(consumerId); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { consumerId = buffer.readLong(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage.java index 22391a20b2..b6aed8ae1b 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -53,13 +53,13 @@ public class DisconnectMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeNullableSimpleString(nodeID); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { nodeID = buffer.readNullableSimpleString(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage_V2.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage_V2.java index e7297a03e4..92d1f875a3 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage_V2.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage_V2.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; public class DisconnectMessage_V2 extends DisconnectMessage @@ -41,14 +41,14 @@ public class DisconnectMessage_V2 extends DisconnectMessage } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { super.encodeRest(buffer); buffer.writeNullableSimpleString(scaleDownNodeID); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { super.decodeRest(buffer); scaleDownNodeID = buffer.readNullableSimpleString(); 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/HornetQExceptionMessage.java index d8a88336f0..f8bfe5aa41 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/HornetQExceptionMessage.java @@ -12,9 +12,9 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -24,13 +24,13 @@ import org.apache.activemq.core.protocol.core.impl.PacketImpl; public class HornetQExceptionMessage extends PacketImpl { - private HornetQException exception; + private ActiveMQException exception; // Static -------------------------------------------------------- // Constructors -------------------------------------------------- - public HornetQExceptionMessage(final HornetQException exception) + public HornetQExceptionMessage(final ActiveMQException exception) { super(EXCEPTION); @@ -50,25 +50,25 @@ public class HornetQExceptionMessage extends PacketImpl return true; } - public HornetQException getException() + public ActiveMQException getException() { return exception; } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeInt(exception.getType().getCode()); buffer.writeNullableString(exception.getMessage()); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { int code = buffer.readInt(); String msg = buffer.readNullableString(); - exception = HornetQExceptionType.createException(code, msg); + exception = ActiveMQExceptionType.createException(code, msg); } @Override diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/PacketsConfirmedMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/PacketsConfirmedMessage.java index e131808633..daf799c1b6 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/PacketsConfirmedMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/PacketsConfirmedMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -47,13 +47,13 @@ public class PacketsConfirmedMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeInt(commandID); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { commandID = buffer.readInt(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/Ping.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/Ping.java index c0552c32aa..d0f4a47e15 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/Ping.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/Ping.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -43,13 +43,13 @@ public final class Ping extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeLong(connectionTTL); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { connectionTTL = buffer.readLong(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReattachSessionMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReattachSessionMessage.java index 8a4ea74838..070b95b80c 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReattachSessionMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReattachSessionMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -53,14 +53,14 @@ public class ReattachSessionMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeString(name); buffer.writeInt(lastConfirmedCommandID); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { name = buffer.readString(); lastConfirmedCommandID = buffer.readInt(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReattachSessionResponseMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReattachSessionResponseMessage.java index 7a0473cf29..cc6850ba13 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReattachSessionResponseMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReattachSessionResponseMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -55,14 +55,14 @@ public class ReattachSessionResponseMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeInt(lastConfirmedCommandID); buffer.writeBoolean(reattached); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { lastConfirmedCommandID = buffer.readInt(); reattached = buffer.readBoolean(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/RollbackMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/RollbackMessage.java index 4b6bec5ef5..b38ba9b4fa 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/RollbackMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/RollbackMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -54,13 +54,13 @@ public class RollbackMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeBoolean(considerLastMessageAsDelivered); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { considerLastMessageAsDelivered = buffer.readBoolean(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionAcknowledgeMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionAcknowledgeMessage.java index b8daa9e973..89347a2b4a 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionAcknowledgeMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionAcknowledgeMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -60,7 +60,7 @@ public class SessionAcknowledgeMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeLong(consumerID); @@ -70,7 +70,7 @@ public class SessionAcknowledgeMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { consumerID = buffer.readLong(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionAddMetaDataMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionAddMetaDataMessage.java index f545169b78..b8f92bba71 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionAddMetaDataMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionAddMetaDataMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -42,14 +42,14 @@ public class SessionAddMetaDataMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeString(key); buffer.writeString(data); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { key = buffer.readString(); data = buffer.readString(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionAddMetaDataMessageV2.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionAddMetaDataMessageV2.java index b75d9722b7..f28d867bff 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionAddMetaDataMessageV2.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionAddMetaDataMessageV2.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -66,7 +66,7 @@ public class SessionAddMetaDataMessageV2 extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeString(key); buffer.writeString(data); @@ -74,7 +74,7 @@ public class SessionAddMetaDataMessageV2 extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { key = buffer.readString(); data = buffer.readString(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionBindingQueryMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionBindingQueryMessage.java index 54a9bb713f..18b5db7c35 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionBindingQueryMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionBindingQueryMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -45,13 +45,13 @@ public class SessionBindingQueryMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeSimpleString(address); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { address = buffer.readSimpleString(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionBindingQueryResponseMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionBindingQueryResponseMessage.java index 20eb737a42..b2ede5e026 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionBindingQueryResponseMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionBindingQueryResponseMessage.java @@ -15,7 +15,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import java.util.ArrayList; import java.util.List; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -63,7 +63,7 @@ public class SessionBindingQueryResponseMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeBoolean(exists); buffer.writeInt(queueNames.size()); @@ -74,7 +74,7 @@ public class SessionBindingQueryResponseMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { exists = buffer.readBoolean(); int numQueues = buffer.readInt(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionConsumerCloseMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionConsumerCloseMessage.java index 863c378f46..a48b6bb112 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionConsumerCloseMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionConsumerCloseMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -43,13 +43,13 @@ public class SessionConsumerCloseMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeLong(consumerID); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { consumerID = buffer.readLong(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionConsumerFlowCreditMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionConsumerFlowCreditMessage.java index 259a188de6..980fb28d76 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionConsumerFlowCreditMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionConsumerFlowCreditMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -50,14 +50,14 @@ public class SessionConsumerFlowCreditMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeLong(consumerID); buffer.writeInt(credits); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { consumerID = buffer.readLong(); credits = buffer.readInt(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionContinuationMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionContinuationMessage.java index a6cb07771f..e77dde4c2f 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionContinuationMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionContinuationMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import java.util.Arrays; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.utils.DataConstants; @@ -75,7 +75,7 @@ public abstract class SessionContinuationMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeInt(body.length); buffer.writeBytes(body); @@ -83,7 +83,7 @@ public abstract class SessionContinuationMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { int size = buffer.readInt(); body = new byte[size]; diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionCreateConsumerMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionCreateConsumerMessage.java index 5e572ce3e3..a9e167c08e 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionCreateConsumerMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionCreateConsumerMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -103,7 +103,7 @@ public class SessionCreateConsumerMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeLong(id); buffer.writeSimpleString(queueName); @@ -113,7 +113,7 @@ public class SessionCreateConsumerMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { id = buffer.readLong(); queueName = buffer.readSimpleString(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionDeleteQueueMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionDeleteQueueMessage.java index 1d14c8aed8..37d67479fc 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionDeleteQueueMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionDeleteQueueMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -51,13 +51,13 @@ public class SessionDeleteQueueMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeSimpleString(queueName); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { queueName = buffer.readSimpleString(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionExpireMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionExpireMessage.java index f8368fbe91..dbad4444b3 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionExpireMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionExpireMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -59,7 +59,7 @@ public class SessionExpireMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeLong(consumerID); @@ -67,7 +67,7 @@ public class SessionExpireMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { consumerID = buffer.readLong(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionForceConsumerDelivery.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionForceConsumerDelivery.java index c5b986ad0a..979f88be8f 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionForceConsumerDelivery.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionForceConsumerDelivery.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -51,14 +51,14 @@ public class SessionForceConsumerDelivery extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeLong(consumerID); buffer.writeLong(sequence); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { consumerID = buffer.readLong(); sequence = buffer.readLong(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionIndividualAcknowledgeMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionIndividualAcknowledgeMessage.java index 9d4b58cbed..4f0248f4c1 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionIndividualAcknowledgeMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionIndividualAcknowledgeMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -68,7 +68,7 @@ public class SessionIndividualAcknowledgeMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeLong(consumerID); @@ -78,7 +78,7 @@ public class SessionIndividualAcknowledgeMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { consumerID = buffer.readLong(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionProducerCreditsFailMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionProducerCreditsFailMessage.java index 581494225d..2b86c792e3 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionProducerCreditsFailMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionProducerCreditsFailMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -51,14 +51,14 @@ public class SessionProducerCreditsFailMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeInt(credits); buffer.writeSimpleString(address); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { credits = buffer.readInt(); address = buffer.readSimpleString(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionProducerCreditsMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionProducerCreditsMessage.java index 164830ee85..183314516d 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionProducerCreditsMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionProducerCreditsMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -51,14 +51,14 @@ public class SessionProducerCreditsMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeInt(credits); buffer.writeSimpleString(address); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { credits = buffer.readInt(); address = buffer.readSimpleString(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionQueueQueryMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionQueueQueryMessage.java index 6f0306fbac..f8731360c3 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionQueueQueryMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionQueueQueryMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -45,13 +45,13 @@ public class SessionQueueQueryMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeSimpleString(queueName); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { queueName = buffer.readSimpleString(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage.java index ad5e400e36..21ffeac94b 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.core.client.impl.QueueQueryImpl; @@ -130,7 +130,7 @@ public class SessionQueueQueryResponseMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeBoolean(exists); buffer.writeBoolean(durable); @@ -143,7 +143,7 @@ public class SessionQueueQueryResponseMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { exists = buffer.readBoolean(); durable = buffer.readBoolean(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveClientLargeMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveClientLargeMessage.java index c718cafe34..175e9bd982 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveClientLargeMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveClientLargeMessage.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.client.impl.ClientLargeMessageInternal; import org.apache.activemq.core.message.impl.MessageInternal; @@ -29,7 +29,7 @@ public class SessionReceiveClientLargeMessage extends SessionReceiveLargeMessage } @Override - public void decodeRest(HornetQBuffer buffer) + public void decodeRest(ActiveMQBuffer buffer) { super.decodeRest(buffer); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveContinuationMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveContinuationMessage.java index 484a48a5a8..893d454df5 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveContinuationMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveContinuationMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.utils.DataConstants; /** @@ -80,7 +80,7 @@ public class SessionReceiveContinuationMessage extends SessionContinuationMessag // Public -------------------------------------------------------- @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { super.encodeRest(buffer); buffer.writeLong(consumerID); @@ -102,7 +102,7 @@ public class SessionReceiveContinuationMessage extends SessionContinuationMessag @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { super.decodeRest(buffer); consumerID = buffer.readLong(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveLargeMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveLargeMessage.java index d04df3a49b..7d0419a9d3 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveLargeMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveLargeMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.message.impl.MessageInternal; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -81,7 +81,7 @@ public class SessionReceiveLargeMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeLong(consumerID); buffer.writeInt(deliveryCount); @@ -90,7 +90,7 @@ public class SessionReceiveLargeMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { consumerID = buffer.readLong(); deliveryCount = buffer.readInt(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveMessage.java index 73d66c8626..0915a4ba3a 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionReceiveMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.message.impl.MessageInternal; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.utils.DataConstants; @@ -58,9 +58,9 @@ public class SessionReceiveMessage extends MessagePacket } @Override - public HornetQBuffer encode(final RemotingConnection connection) + public ActiveMQBuffer encode(final RemotingConnection connection) { - HornetQBuffer buffer = message.getEncodedBuffer(); + ActiveMQBuffer buffer = message.getEncodedBuffer(); // Sanity check if (buffer.writerIndex() != message.getEndOfMessagePosition()) @@ -87,7 +87,7 @@ public class SessionReceiveMessage extends MessagePacket } @Override - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { channelID = buffer.readLong(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionRequestProducerCreditsMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionRequestProducerCreditsMessage.java index 199f70d1ce..5a60c9f39c 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionRequestProducerCreditsMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionRequestProducerCreditsMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -58,14 +58,14 @@ public class SessionRequestProducerCreditsMessage extends PacketImpl // } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeInt(credits); buffer.writeSimpleString(address); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { credits = buffer.readInt(); address = buffer.readSimpleString(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionSendContinuationMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionSendContinuationMessage.java index 8b267e1b51..fecf94b42c 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionSendContinuationMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionSendContinuationMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.client.SendAcknowledgementHandler; import org.apache.activemq.core.message.impl.MessageInternal; @@ -94,7 +94,7 @@ public class SessionSendContinuationMessage extends SessionContinuationMessage } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { super.encodeRest(buffer); if (!continues) @@ -105,7 +105,7 @@ public class SessionSendContinuationMessage extends SessionContinuationMessage } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { super.decodeRest(buffer); if (!continues) diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionSendLargeMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionSendLargeMessage.java index 143e443bb9..dcd89f8676 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionSendLargeMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionSendLargeMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.message.impl.MessageInternal; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -48,13 +48,13 @@ public class SessionSendLargeMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { largeMessage.encodeHeadersAndProperties(buffer); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { largeMessage.decodeHeadersAndProperties(buffer); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionSendMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionSendMessage.java index 48503cec86..a3d5a82bee 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionSendMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionSendMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.client.SendAcknowledgementHandler; import org.apache.activemq.core.message.impl.MessageInternal; import org.apache.activemq.spi.core.protocol.RemotingConnection; @@ -63,9 +63,9 @@ public class SessionSendMessage extends MessagePacket } @Override - public HornetQBuffer encode(final RemotingConnection connection) + public ActiveMQBuffer encode(final RemotingConnection connection) { - HornetQBuffer buffer = message.getEncodedBuffer(); + ActiveMQBuffer buffer = message.getEncodedBuffer(); // Sanity check if (buffer.writerIndex() != message.getEndOfMessagePosition()) @@ -93,7 +93,7 @@ public class SessionSendMessage extends MessagePacket } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { // Buffer comes in after having read standard headers and positioned at Beginning of body part diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAAfterFailedMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAAfterFailedMessage.java index bae684afab..e1519dda32 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAAfterFailedMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAAfterFailedMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.utils.XidCodecSupport; @@ -55,13 +55,13 @@ public class SessionXAAfterFailedMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { XidCodecSupport.encodeXid(xid, buffer); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { xid = XidCodecSupport.decodeXid(buffer); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXACommitMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXACommitMessage.java index 42ca62004c..68224473c0 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXACommitMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXACommitMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.utils.XidCodecSupport; @@ -58,14 +58,14 @@ public class SessionXACommitMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { XidCodecSupport.encodeXid(xid, buffer); buffer.writeBoolean(onePhase); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { xid = XidCodecSupport.decodeXid(buffer); onePhase = buffer.readBoolean(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAEndMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAEndMessage.java index c51e77101f..ae1669e0e6 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAEndMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAEndMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.utils.XidCodecSupport; @@ -52,14 +52,14 @@ public class SessionXAEndMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { XidCodecSupport.encodeXid(xid, buffer); buffer.writeBoolean(failed); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { xid = XidCodecSupport.decodeXid(buffer); failed = buffer.readBoolean(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAForgetMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAForgetMessage.java index e8d2e90a99..b0e5cd7612 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAForgetMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAForgetMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.utils.XidCodecSupport; @@ -43,13 +43,13 @@ public class SessionXAForgetMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { XidCodecSupport.encodeXid(xid, buffer); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { xid = XidCodecSupport.decodeXid(buffer); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAGetInDoubtXidsResponseMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAGetInDoubtXidsResponseMessage.java index 51decb9b63..34832ff48e 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAGetInDoubtXidsResponseMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAGetInDoubtXidsResponseMessage.java @@ -17,7 +17,7 @@ import java.util.List; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.utils.XidCodecSupport; @@ -52,7 +52,7 @@ public class SessionXAGetInDoubtXidsResponseMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeInt(xids.size()); @@ -63,7 +63,7 @@ public class SessionXAGetInDoubtXidsResponseMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { int len = buffer.readInt(); xids = new ArrayList(len); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAGetTimeoutResponseMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAGetTimeoutResponseMessage.java index 5e1983ace5..48ed4be3fb 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAGetTimeoutResponseMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAGetTimeoutResponseMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -47,13 +47,13 @@ public class SessionXAGetTimeoutResponseMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeInt(timeoutSeconds); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { timeoutSeconds = buffer.readInt(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAJoinMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAJoinMessage.java index 1229a4705f..2d8f017d9b 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAJoinMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAJoinMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.utils.XidCodecSupport; @@ -44,13 +44,13 @@ public class SessionXAJoinMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { XidCodecSupport.encodeXid(xid, buffer); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { xid = XidCodecSupport.decodeXid(buffer); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAPrepareMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAPrepareMessage.java index 98f5707d7e..c75ab71578 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAPrepareMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAPrepareMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.utils.XidCodecSupport; @@ -46,13 +46,13 @@ public class SessionXAPrepareMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { XidCodecSupport.encodeXid(xid, buffer); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { xid = XidCodecSupport.decodeXid(buffer); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAResponseMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAResponseMessage.java index f0a530e076..43ea56ec34 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAResponseMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAResponseMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -66,7 +66,7 @@ public class SessionXAResponseMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeBoolean(error); buffer.writeInt(responseCode); @@ -74,7 +74,7 @@ public class SessionXAResponseMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { error = buffer.readBoolean(); responseCode = buffer.readInt(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAResumeMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAResumeMessage.java index ddfe9e2ef1..18c0e22309 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAResumeMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAResumeMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.utils.XidCodecSupport; @@ -46,13 +46,13 @@ public class SessionXAResumeMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { XidCodecSupport.encodeXid(xid, buffer); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { xid = XidCodecSupport.decodeXid(buffer); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXARollbackMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXARollbackMessage.java index 1195bf7a45..e772e3b0c2 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXARollbackMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXARollbackMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.utils.XidCodecSupport; @@ -47,13 +47,13 @@ public class SessionXARollbackMessage extends PacketImpl @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { XidCodecSupport.encodeXid(xid, buffer); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { xid = XidCodecSupport.decodeXid(buffer); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXASetTimeoutMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXASetTimeoutMessage.java index d266085a01..4a59599ba0 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXASetTimeoutMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXASetTimeoutMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -43,13 +43,13 @@ public class SessionXASetTimeoutMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeInt(timeoutSeconds); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { timeoutSeconds = buffer.readInt(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXASetTimeoutResponseMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXASetTimeoutResponseMessage.java index 5ef2256221..ca2cac9f4e 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXASetTimeoutResponseMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXASetTimeoutResponseMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -49,13 +49,13 @@ public class SessionXASetTimeoutResponseMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeBoolean(ok); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { ok = buffer.readBoolean(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAStartMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAStartMessage.java index 9491440813..409f37f2d6 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAStartMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SessionXAStartMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.utils.XidCodecSupport; @@ -54,13 +54,13 @@ public class SessionXAStartMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { XidCodecSupport.encodeXid(xid, buffer); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { xid = XidCodecSupport.decodeXid(buffer); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessage.java index e12ff30ae7..2bc589ce8f 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -56,13 +56,13 @@ public class SubscribeClusterTopologyUpdatesMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeBoolean(clusterConnection); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { clusterConnection = buffer.readBoolean(); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessageV2.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessageV2.java index 5e3a56f1f3..7a1fba4895 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessageV2.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessageV2.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; /** * @author Tim Fox @@ -40,7 +40,7 @@ public class SubscribeClusterTopologyUpdatesMessageV2 extends SubscribeClusterTo @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { super.encodeRest(buffer); buffer.writeInt(clientVersion); @@ -55,7 +55,7 @@ public class SubscribeClusterTopologyUpdatesMessageV2 extends SubscribeClusterTo } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { super.decodeRest(buffer); clientVersion = buffer.readInt(); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/FailureListener.java b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/FailureListener.java index cf5228085b..35e325eb2d 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/FailureListener.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/remoting/FailureListener.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.remoting; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; /** * A FailureListener notifies the user when a connection failure occurred. @@ -28,7 +28,7 @@ public interface FailureListener * @param exception exception which has caused the connection to fail * @param failedOver */ - void connectionFailed(HornetQException exception, boolean failedOver); + void connectionFailed(ActiveMQException exception, boolean failedOver); /** * Notifies that a connection has failed due to the specified exception. @@ -37,5 +37,5 @@ public interface FailureListener * @param failedOver * @param scaleDownTargetNodeID the ID of the node to which messages are scaling down */ - void connectionFailed(HornetQException exception, boolean failedOver, String scaleDownTargetNodeID); + void connectionFailed(ActiveMQException exception, boolean failedOver, String scaleDownTargetNodeID); } 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/HornetQChannelHandler.java index 543b925e70..c7e3fd6401 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/HornetQChannelHandler.java @@ -17,7 +17,7 @@ import io.netty.channel.Channel; import io.netty.channel.ChannelDuplexHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.group.ChannelGroup; -import org.apache.activemq.api.core.HornetQException; +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; @@ -96,9 +96,9 @@ public class HornetQChannelHandler extends ChannelDuplexHandler } // We don't want to log this - since it is normal for this to happen during failover/reconnect // and we don't want to spew out stack traces in that event - // The user has access to this exeception anyway via the HornetQException initial cause + // The user has access to this exeception anyway via the ActiveMQException initial cause - HornetQException me = HornetQClientMessageBundle.BUNDLE.nettyError(); + ActiveMQException me = HornetQClientMessageBundle.BUNDLE.nettyError(); me.initCause(cause); synchronized (listener) 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 fbfef29e1c..6dbf38a904 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 @@ -24,9 +24,9 @@ import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelPromise; import io.netty.channel.EventLoop; import io.netty.handler.ssl.SslHandler; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQInterruptedException; +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.buffers.impl.ChannelBufferWrapper; import org.apache.activemq.core.client.HornetQClientLogger; @@ -60,7 +60,7 @@ public class NettyConnection implements Connection private final boolean directDeliver; - private volatile HornetQBuffer batchBuffer; + private volatile ActiveMQBuffer batchBuffer; private final Map configuration; @@ -168,7 +168,7 @@ public class NettyConnection implements Connection listener.connectionDestroyed(getID()); } - public HornetQBuffer createBuffer(final int size) + public ActiveMQBuffer createBuffer(final int size) { return new ChannelBufferWrapper(channel.alloc().buffer(size)); } @@ -205,17 +205,17 @@ public class NettyConnection implements Connection } } - public void write(final HornetQBuffer buffer) + public void write(final ActiveMQBuffer buffer) { write(buffer, false, false); } - public void write(HornetQBuffer buffer, final boolean flush, final boolean batched) + public void write(ActiveMQBuffer buffer, final boolean flush, final boolean batched) { write(buffer, flush, batched, null); } - public void write(HornetQBuffer buffer, final boolean flush, final boolean batched, final ChannelFutureListener futureListener) + public void write(ActiveMQBuffer buffer, final boolean flush, final boolean batched, final ChannelFutureListener futureListener) { try @@ -228,7 +228,7 @@ public class NettyConnection implements Connection { // Lazily create batch buffer - batchBuffer = HornetQBuffers.dynamicBuffer(BATCHING_BUFFER_SIZE); + batchBuffer = ActiveMQBuffers.dynamicBuffer(BATCHING_BUFFER_SIZE); } if (batchBuffer != null) @@ -254,7 +254,7 @@ public class NettyConnection implements Connection { // Create a new buffer - batchBuffer = HornetQBuffers.dynamicBuffer(BATCHING_BUFFER_SIZE); + batchBuffer = ActiveMQBuffers.dynamicBuffer(BATCHING_BUFFER_SIZE); } } @@ -327,7 +327,7 @@ public class NettyConnection implements Connection } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } } @@ -339,7 +339,7 @@ public class NettyConnection implements Connection } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } 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 b4fa9c22ad..76ab10733b 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 @@ -96,7 +96,7 @@ import io.netty.util.ResourceLeakDetector; import io.netty.util.concurrent.Future; import io.netty.util.concurrent.GlobalEventExecutor; import org.apache.activemq.api.config.HornetQDefaultConfiguration; -import org.apache.activemq.api.core.HornetQException; +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.impl.ClientSessionFactoryImpl; @@ -1110,7 +1110,7 @@ public class NettyConnector extends AbstractConnector } } - public void connectionException(final Object connectionID, final HornetQException me) + public void connectionException(final Object connectionID, final ActiveMQException me) { // Execute on different thread to avoid deadlocks closeExecutor.execute(new Runnable() diff --git a/activemq-core-client/src/main/java/org/apache/activemq/reader/MapMessageUtil.java b/activemq-core-client/src/main/java/org/apache/activemq/reader/MapMessageUtil.java index ec7c43619f..d2a80a6bf4 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/reader/MapMessageUtil.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/reader/MapMessageUtil.java @@ -13,7 +13,7 @@ package org.apache.activemq.reader; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Message; import org.apache.activemq.utils.TypedProperties; @@ -29,7 +29,7 @@ public class MapMessageUtil extends MessageUtil */ public static void writeBodyMap(Message message, TypedProperties properties) { - HornetQBuffer buff = getBodyBuffer(message); + ActiveMQBuffer buff = getBodyBuffer(message); buff.resetWriterIndex(); properties.encode(buff); } @@ -49,7 +49,7 @@ public class MapMessageUtil extends MessageUtil */ public static void readBodyMap(Message message, TypedProperties map) { - HornetQBuffer buff = getBodyBuffer(message); + ActiveMQBuffer buff = getBodyBuffer(message); buff.resetReaderIndex(); map.decode(buff); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/reader/MessageUtil.java b/activemq-core-client/src/main/java/org/apache/activemq/reader/MessageUtil.java index 31727d134a..803b294845 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/reader/MessageUtil.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/reader/MessageUtil.java @@ -18,9 +18,9 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQPropertyConversionException; +import org.apache.activemq.api.core.ActiveMQBuffer; +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; @@ -54,7 +54,7 @@ public class MessageUtil - public static HornetQBuffer getBodyBuffer(Message message) + public static ActiveMQBuffer getBodyBuffer(Message message) { return message.getBodyBuffer(); } @@ -97,11 +97,11 @@ public class MessageUtil } - public static final void setJMSCorrelationIDAsBytes(Message message, final byte[] correlationID) throws HornetQException + public static final void setJMSCorrelationIDAsBytes(Message message, final byte[] correlationID) throws ActiveMQException { if (correlationID == null || correlationID.length == 0) { - throw new HornetQException("Please specify a non-zero length byte[]"); + throw new ActiveMQException("Please specify a non-zero length byte[]"); } message.putBytesProperty(CORRELATIONID_HEADER_NAME, correlationID); } @@ -124,7 +124,7 @@ public class MessageUtil { return message.getStringProperty(CORRELATIONID_HEADER_NAME); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { return null; } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/reader/StreamMessageUtil.java b/activemq-core-client/src/main/java/org/apache/activemq/reader/StreamMessageUtil.java index 3b4b022c34..e1300fd40f 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/reader/StreamMessageUtil.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/reader/StreamMessageUtil.java @@ -13,7 +13,7 @@ package org.apache.activemq.reader; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.Pair; import org.apache.activemq.utils.DataConstants; @@ -33,7 +33,7 @@ public class StreamMessageUtil extends MessageUtil */ public static boolean streamReadBoolean(Message message) { - HornetQBuffer buff = getBodyBuffer(message); + ActiveMQBuffer buff = getBodyBuffer(message); byte type = buff.readByte(); switch (type) @@ -51,7 +51,7 @@ public class StreamMessageUtil extends MessageUtil public static byte streamReadByte(Message message) { - HornetQBuffer buff = getBodyBuffer(message); + ActiveMQBuffer buff = getBodyBuffer(message); int index = buff.readerIndex(); try { @@ -77,7 +77,7 @@ public class StreamMessageUtil extends MessageUtil public static short streamReadShort(Message message) { - HornetQBuffer buff = getBodyBuffer(message); + ActiveMQBuffer buff = getBodyBuffer(message); byte type = buff.readByte(); switch (type) { @@ -95,7 +95,7 @@ public class StreamMessageUtil extends MessageUtil public static char streamReadChar(Message message) { - HornetQBuffer buff = getBodyBuffer(message); + ActiveMQBuffer buff = getBodyBuffer(message); byte type = buff.readByte(); switch (type) { @@ -119,7 +119,7 @@ public class StreamMessageUtil extends MessageUtil public static int streamReadInteger(Message message) { - HornetQBuffer buff = getBodyBuffer(message); + ActiveMQBuffer buff = getBodyBuffer(message); byte type = buff.readByte(); switch (type) { @@ -140,7 +140,7 @@ public class StreamMessageUtil extends MessageUtil public static long streamReadLong(Message message) { - HornetQBuffer buff = getBodyBuffer(message); + ActiveMQBuffer buff = getBodyBuffer(message); byte type = buff.readByte(); switch (type) { @@ -162,7 +162,7 @@ public class StreamMessageUtil extends MessageUtil public static float streamReadFloat(Message message) { - HornetQBuffer buff = getBodyBuffer(message); + ActiveMQBuffer buff = getBodyBuffer(message); byte type = buff.readByte(); switch (type) { @@ -179,7 +179,7 @@ public class StreamMessageUtil extends MessageUtil public static double streamReadDouble(Message message) { - HornetQBuffer buff = getBodyBuffer(message); + ActiveMQBuffer buff = getBodyBuffer(message); byte type = buff.readByte(); switch (type) { @@ -198,7 +198,7 @@ public class StreamMessageUtil extends MessageUtil public static String streamReadString(Message message) { - HornetQBuffer buff = getBodyBuffer(message); + ActiveMQBuffer buff = getBodyBuffer(message); byte type = buff.readByte(); switch (type) { @@ -234,7 +234,7 @@ public class StreamMessageUtil extends MessageUtil */ public static Pair streamReadBytes(Message message, int remainingBytes, byte[] value) { - HornetQBuffer buff = getBodyBuffer(message); + ActiveMQBuffer buff = getBodyBuffer(message); if (remainingBytes == -1) { @@ -262,7 +262,7 @@ public class StreamMessageUtil extends MessageUtil public static Object streamReadObject(Message message) { - HornetQBuffer buff = getBodyBuffer(message); + ActiveMQBuffer buff = getBodyBuffer(message); byte type = buff.readByte(); switch (type) diff --git a/activemq-core-client/src/main/java/org/apache/activemq/reader/TextMessageUtil.java b/activemq-core-client/src/main/java/org/apache/activemq/reader/TextMessageUtil.java index 39dda8c9a2..9341366540 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/reader/TextMessageUtil.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/reader/TextMessageUtil.java @@ -13,7 +13,7 @@ package org.apache.activemq.reader; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; @@ -29,7 +29,7 @@ public class TextMessageUtil extends MessageUtil */ public static void writeBodyText(Message message, SimpleString text) { - HornetQBuffer buff = getBodyBuffer(message); + ActiveMQBuffer buff = getBodyBuffer(message); buff.clear(); buff.writeNullableSimpleString(text); } @@ -39,7 +39,7 @@ public class TextMessageUtil extends MessageUtil */ public static SimpleString readBodyText(Message message) { - HornetQBuffer buff = getBodyBuffer(message); + ActiveMQBuffer buff = getBodyBuffer(message); buff.resetReaderIndex(); return buff.readNullableSimpleString(); } 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 5063991c31..28b3c90f22 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 @@ -18,9 +18,9 @@ import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.Executor; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQInterruptedException; +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.remoting.CloseListener; @@ -52,7 +52,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection return new ArrayList(failureListeners); } - protected void callFailureListeners(final HornetQException me, String scaleDownTargetNodeID) + protected void callFailureListeners(final ActiveMQException me, String scaleDownTargetNodeID) { final List listenersClone = new ArrayList(failureListeners); @@ -62,7 +62,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { listener.connectionFailed(me, false, scaleDownTargetNodeID); } - catch (HornetQInterruptedException interrupted) + catch (ActiveMQInterruptedException interrupted) { // this is an expected behaviour.. no warn or error here HornetQClientLogger.LOGGER.debug("thread interrupted", interrupted); @@ -179,7 +179,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection closeListeners.addAll(listeners); } - public HornetQBuffer createBuffer(final int size) + public ActiveMQBuffer createBuffer(final int size) { return transportConnection.createBuffer(size); } @@ -206,12 +206,12 @@ public abstract class AbstractRemotingConnection implements RemotingConnection /* * This can be called concurrently by more than one thread so needs to be locked */ - public void fail(final HornetQException me) + public void fail(final ActiveMQException me) { fail(me, null); } - public void bufferReceived(final Object connectionID, final HornetQBuffer buffer) + public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { dataReceived = true; } 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 578d744e34..95d7dc68e2 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 @@ -14,8 +14,8 @@ package org.apache.activemq.spi.core.protocol; import java.util.List; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.remoting.CloseListener; import org.apache.activemq.core.remoting.FailureListener; import org.apache.activemq.spi.core.remoting.BufferHandler; @@ -115,14 +115,14 @@ public interface RemotingConnection extends BufferHandler * @param size the size of buffer required * @return the buffer */ - HornetQBuffer createBuffer(int size); + ActiveMQBuffer createBuffer(int size); /** * called when the underlying connection fails. * * @param me the exception that caused the failure */ - void fail(HornetQException me); + void fail(ActiveMQException me); /** * called when the underlying connection fails. @@ -130,7 +130,7 @@ public interface RemotingConnection extends BufferHandler * @param me the exception that caused the failure * @param scaleDownTargetNodeID the ID of the node where scale down is targeted */ - void fail(HornetQException me, String scaleDownTargetNodeID); + void fail(ActiveMQException me, String scaleDownTargetNodeID); /** * destroys this connection. diff --git a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/BufferDecoder.java b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/BufferDecoder.java index 3c46adf014..a4c9ba399e 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/BufferDecoder.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/BufferDecoder.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.spi.core.remoting; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; /** * A BufferDecoder @@ -24,11 +24,11 @@ import org.apache.activemq.api.core.HornetQBuffer; public interface BufferDecoder { /** - * called by the remoting system prior to {@link org.apache.activemq.spi.core.remoting.BufferHandler#bufferReceived(Object, org.apache.activemq.api.core.HornetQBuffer)}. + * called by the remoting system prior to {@link org.apache.activemq.spi.core.remoting.BufferHandler#bufferReceived(Object, org.apache.activemq.api.core.ActiveMQBuffer)}. *

* The implementation should return true if there is enough data in the buffer to decode. otherwise false. * * @param buffer the buffer * @return true id the buffer can be decoded.. */ - int isReadyToHandle(HornetQBuffer buffer); + int isReadyToHandle(ActiveMQBuffer buffer); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/BufferHandler.java b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/BufferHandler.java index 398a84e24b..fdc63751a3 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/BufferHandler.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/BufferHandler.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.spi.core.remoting; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; /** * A BufferHandler that will handle buffers received by an acceptor. @@ -29,5 +29,5 @@ public interface BufferHandler * @param connectionID the connection the buffer was received on * @param buffer the buffer to decode */ - void bufferReceived(Object connectionID, HornetQBuffer buffer); + void bufferReceived(Object connectionID, ActiveMQBuffer buffer); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/ClientProtocolManager.java b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/ClientProtocolManager.java index 89227c67ce..c45fa8da4b 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/ClientProtocolManager.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/ClientProtocolManager.java @@ -17,7 +17,7 @@ import java.util.List; import java.util.concurrent.locks.Lock; import io.netty.channel.ChannelPipeline; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.spi.core.protocol.RemotingConnection; @@ -63,11 +63,11 @@ public interface ClientProtocolManager final boolean autoCommitAcks, final boolean preAcknowledge, int minLargeMessageSize, - int confirmationWindowSize) throws HornetQException; + int confirmationWindowSize) throws ActiveMQException; - boolean cleanupBeforeFailover(HornetQException cause); + boolean cleanupBeforeFailover(ActiveMQException cause); - boolean checkForFailover(String liveNodeID) throws HornetQException; + boolean checkForFailover(String liveNodeID) throws ActiveMQException; void setSessionFactory(ClientSessionFactory factory); 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 d9b4098772..ae2db0be8d 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 @@ -13,7 +13,7 @@ package org.apache.activemq.spi.core.remoting; import io.netty.channel.ChannelFutureListener; -import org.apache.activemq.api.core.HornetQBuffer; +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.spi.core.protocol.RemotingConnection; @@ -32,7 +32,7 @@ public interface Connection * @param size the size of buffer to create * @return the new buffer. */ - HornetQBuffer createBuffer(int size); + ActiveMQBuffer createBuffer(int size); RemotingConnection getProtocolConnection(); @@ -53,7 +53,7 @@ public interface Connection * @param flush whether to flush the buffers onto the wire * @param batched whether the packet is allowed to batched for better performance */ - void write(HornetQBuffer buffer, boolean flush, boolean batched); + void write(ActiveMQBuffer buffer, boolean flush, boolean batched); /** * writes the buffer to the connection and if flush is true returns only when the buffer has been physically written to the connection. @@ -62,14 +62,14 @@ public interface Connection * @param flush whether to flush the buffers onto the wire * @param batched whether the packet is allowed to batched for better performance */ - void write(HornetQBuffer buffer, boolean flush, boolean batched, ChannelFutureListener futureListener); + void write(ActiveMQBuffer buffer, boolean flush, boolean batched, ChannelFutureListener futureListener); /** * writes the buffer to the connection with no flushing or batching * * @param buffer the buffer to write */ - void write(HornetQBuffer buffer); + void write(ActiveMQBuffer buffer); /** 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 e158fae565..f079bcda97 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.spi.core.remoting; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.server.HornetQComponent; /** @@ -50,7 +50,7 @@ public interface ConnectionLifeCycleListener * @param connectionID the id of the connection. * @param me the exception. */ - void connectionException(Object connectionID, HornetQException me); + void connectionException(Object connectionID, ActiveMQException me); void connectionReadyForWrites(Object connectionID, boolean ready); } diff --git a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/SessionContext.java b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/SessionContext.java index da3c69d3af..26df3b0d58 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/SessionContext.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/spi/core/remoting/SessionContext.java @@ -18,7 +18,7 @@ import javax.transaction.xa.Xid; import java.util.HashMap; import java.util.concurrent.Executor; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; @@ -70,9 +70,9 @@ public abstract class SessionContext * * @param newConnection * @return true if it was possible to reattach - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - public abstract boolean reattachOnNewConnection(RemotingConnection newConnection) throws HornetQException; + public abstract boolean reattachOnNewConnection(RemotingConnection newConnection) throws ActiveMQException; public RemotingConnection getRemotingConnection() { @@ -80,7 +80,7 @@ public abstract class SessionContext } - public abstract void closeConsumer(ClientConsumer consumer) throws HornetQException; + public abstract void closeConsumer(ClientConsumer consumer) throws ActiveMQException; public abstract void sendConsumerCredits(ClientConsumer consumer, int credits); @@ -136,19 +136,19 @@ public abstract class SessionContext public abstract int getCreditsOnSendingFull(MessageInternal msgI); - public abstract void sendFullMessage(MessageInternal msgI, boolean sendBlocking, SendAcknowledgementHandler handler, SimpleString defaultAddress) throws HornetQException; + public abstract void sendFullMessage(MessageInternal msgI, boolean sendBlocking, SendAcknowledgementHandler handler, SimpleString defaultAddress) throws ActiveMQException; /** * it should return the number of credits (or bytes) used to send this packet * * @param msgI * @return - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - public abstract int sendInitialChunkOnLargeMessage(MessageInternal msgI) throws HornetQException; + public abstract int sendInitialChunkOnLargeMessage(MessageInternal msgI) throws ActiveMQException; - public abstract int sendLargeMessageChunk(MessageInternal msgI, long messageBodySize, boolean sendBlocking, boolean lastChunk, byte[] chunk, SendAcknowledgementHandler messageHandler) throws HornetQException; + public abstract int sendLargeMessageChunk(MessageInternal msgI, long messageBodySize, boolean sendBlocking, boolean lastChunk, byte[] chunk, SendAcknowledgementHandler messageHandler) throws ActiveMQException; public abstract void setSendAcknowledgementHandler(final SendAcknowledgementHandler handler); @@ -156,19 +156,19 @@ public abstract class SessionContext public abstract void createSharedQueue(SimpleString address, SimpleString queueName, SimpleString filterString, - boolean durable) throws HornetQException; + boolean durable) throws ActiveMQException; - public abstract void deleteQueue(SimpleString queueName) throws HornetQException; + public abstract void deleteQueue(SimpleString queueName) throws ActiveMQException; - public abstract void createQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable, boolean temp) throws HornetQException; + public abstract void createQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable, boolean temp) throws ActiveMQException; - public abstract ClientSession.QueueQuery queueQuery(SimpleString queueName) throws HornetQException; + public abstract ClientSession.QueueQuery queueQuery(SimpleString queueName) throws ActiveMQException; - public abstract void forceDelivery(ClientConsumer consumer, long sequence) throws HornetQException; + public abstract void forceDelivery(ClientConsumer consumer, long sequence) throws ActiveMQException; - public abstract ClientSession.AddressQuery addressQuery(final SimpleString address) throws HornetQException; + public abstract ClientSession.AddressQuery addressQuery(final SimpleString address) throws ActiveMQException; - public abstract void simpleCommit() throws HornetQException; + public abstract void simpleCommit() throws ActiveMQException; /** @@ -178,51 +178,51 @@ public abstract class SessionContext * this is because we only ACK after on the RA, We may review this if we always acked earlier. * * @param lastMessageAsDelivered - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - public abstract void simpleRollback(boolean lastMessageAsDelivered) throws HornetQException; + public abstract void simpleRollback(boolean lastMessageAsDelivered) throws ActiveMQException; - public abstract void sessionStart() throws HornetQException; + public abstract void sessionStart() throws ActiveMQException; - public abstract void sessionStop() throws HornetQException; + public abstract void sessionStop() throws ActiveMQException; - public abstract void sendACK(boolean individual, boolean block, final ClientConsumer consumer, final Message message) throws HornetQException; + public abstract void sendACK(boolean individual, boolean block, final ClientConsumer consumer, final Message message) throws ActiveMQException; - public abstract void expireMessage(final ClientConsumer consumer, Message message) throws HornetQException; + public abstract void expireMessage(final ClientConsumer consumer, Message message) throws ActiveMQException; - public abstract void sessionClose() throws HornetQException; + public abstract void sessionClose() throws ActiveMQException; - public abstract void addSessionMetadata(String key, String data) throws HornetQException; + public abstract void addSessionMetadata(String key, String data) throws ActiveMQException; - public abstract void addUniqueMetaData(String key, String data) throws HornetQException; + public abstract void addUniqueMetaData(String key, String data) throws ActiveMQException; public abstract void sendProducerCreditsMessage(final int credits, final SimpleString address); - public abstract void xaCommit(Xid xid, boolean onePhase) throws XAException, HornetQException; + public abstract void xaCommit(Xid xid, boolean onePhase) throws XAException, ActiveMQException; - public abstract void xaEnd(Xid xid, int flags) throws XAException, HornetQException; + public abstract void xaEnd(Xid xid, int flags) throws XAException, ActiveMQException; - public abstract void xaForget(Xid xid) throws XAException, HornetQException; + public abstract void xaForget(Xid xid) throws XAException, ActiveMQException; - public abstract int xaPrepare(Xid xid) throws XAException, HornetQException; + public abstract int xaPrepare(Xid xid) throws XAException, ActiveMQException; - public abstract Xid[] xaScan() throws HornetQException; + public abstract Xid[] xaScan() throws ActiveMQException; - public abstract void xaRollback(Xid xid, boolean wasStarted) throws HornetQException, XAException; + public abstract void xaRollback(Xid xid, boolean wasStarted) throws ActiveMQException, XAException; - public abstract void xaStart(Xid xid, int flags) throws XAException, HornetQException; + public abstract void xaStart(Xid xid, int flags) throws XAException, ActiveMQException; - public abstract boolean configureTransactionTimeout(int seconds) throws HornetQException; + public abstract boolean configureTransactionTimeout(int seconds) throws ActiveMQException; public abstract ClientConsumerInternal createConsumer(SimpleString queueName, SimpleString filterString, int windowSize, int maxRate, int ackBatchSize, boolean browseOnly, - Executor executor, Executor flowControlExecutor) throws HornetQException; + Executor executor, Executor flowControlExecutor) throws ActiveMQException; /** * Performs a round trip to the server requesting what is the current tx timeout on the session * * @return */ - public abstract int recoverSessionTimeout() throws HornetQException; + public abstract int recoverSessionTimeout() throws ActiveMQException; public abstract int getServerVersion(); @@ -233,14 +233,14 @@ public abstract class SessionContext final boolean autoCommitSends, final boolean autoCommitAcks, final boolean preAcknowledge, - final SimpleString defaultAddress) throws HornetQException; + final SimpleString defaultAddress) throws ActiveMQException; - public abstract void recreateConsumerOnServer(ClientConsumerInternal consumerInternal) throws HornetQException; + public abstract void recreateConsumerOnServer(ClientConsumerInternal consumerInternal) throws ActiveMQException; - public abstract void xaFailed(Xid xid) throws HornetQException; + public abstract void xaFailed(Xid xid) throws ActiveMQException; - public abstract void restartSession() throws HornetQException; + public abstract void restartSession() throws ActiveMQException; public abstract void resetMetadata(HashMap metaDataToSend); @@ -250,7 +250,7 @@ public abstract class SessionContext /** * Interrupt and return any blocked calls */ - public abstract void returnBlocking(HornetQException cause); + public abstract void returnBlocking(ActiveMQException cause); /** * it will lock the communication channel of the session avoiding anything to come while failover is happening. 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 c4b5f8ac24..ca741faa41 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.utils; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; /** @@ -44,18 +44,18 @@ public class BufferHelper return DataConstants.SIZE_INT + str.length() * 2; } - public static void writeAsNullableSimpleString(HornetQBuffer buffer, String str) + public static void writeAsNullableSimpleString(ActiveMQBuffer buffer, String str) { buffer.writeNullableSimpleString(SimpleString.toSimpleString(str)); } - public static String readNullableSimpleStringAsString(HornetQBuffer buffer) + public static String readNullableSimpleStringAsString(ActiveMQBuffer buffer) { SimpleString str = buffer.readNullableSimpleString(); return str != null ? str.toString() : null; } - public static void writeAsSimpleString(HornetQBuffer buffer, String str) + public static void writeAsSimpleString(ActiveMQBuffer buffer, String str) { buffer.writeSimpleString(new SimpleString(str)); } @@ -63,7 +63,7 @@ public class BufferHelper /** * @param buffer */ - public static void writeNullableBoolean(HornetQBuffer buffer, Boolean value) + public static void writeNullableBoolean(ActiveMQBuffer buffer, Boolean value) { buffer.writeBoolean(value != null); @@ -78,7 +78,7 @@ public class BufferHelper return DataConstants.SIZE_BOOLEAN + (value != null ? DataConstants.SIZE_BOOLEAN : 0); } - public static Boolean readNullableBoolean(HornetQBuffer buffer) + public static Boolean readNullableBoolean(ActiveMQBuffer buffer) { boolean isNotNull = buffer.readBoolean(); @@ -95,7 +95,7 @@ public class BufferHelper /** * @param buffer */ - public static void writeNullableLong(HornetQBuffer buffer, Long value) + public static void writeNullableLong(ActiveMQBuffer buffer, Long value) { buffer.writeBoolean(value != null); @@ -108,7 +108,7 @@ public class BufferHelper /** * @param buffer */ - public static void writeNullableDouble(HornetQBuffer buffer, Double value) + public static void writeNullableDouble(ActiveMQBuffer buffer, Double value) { buffer.writeBoolean(value != null); @@ -129,7 +129,7 @@ public class BufferHelper } - public static Long readNullableLong(HornetQBuffer buffer) + public static Long readNullableLong(ActiveMQBuffer buffer) { boolean isNotNull = buffer.readBoolean(); @@ -146,7 +146,7 @@ public class BufferHelper /** * @param buffer */ - public static void writeNullableInteger(HornetQBuffer buffer, Integer value) + public static void writeNullableInteger(ActiveMQBuffer buffer, Integer value) { buffer.writeBoolean(value != null); @@ -161,7 +161,7 @@ public class BufferHelper return DataConstants.SIZE_BOOLEAN + (value != null ? DataConstants.SIZE_INT : 0); } - public static Integer readNullableInteger(HornetQBuffer buffer) + public static Integer readNullableInteger(ActiveMQBuffer buffer) { boolean isNotNull = buffer.readBoolean(); @@ -175,7 +175,7 @@ public class BufferHelper } } - public static Double readNullableDouble(HornetQBuffer buffer) + public static Double readNullableDouble(ActiveMQBuffer buffer) { boolean isNotNull = buffer.readBoolean(); 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 f970cb0c08..90f3a89799 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.utils; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.HornetQClientMessageBundle; @@ -232,7 +232,7 @@ public class ConfigurationHelper { codec = PasswordMaskingUtil.getCodec(classImpl); } - catch (HornetQException e1) + catch (ActiveMQException e1) { throw HornetQClientMessageBundle.BUNDLE.failedToGetDecoder(e1); } 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/HornetQBufferInputStream.java index 690febc98e..a5ef9d253f 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/HornetQBufferInputStream.java @@ -15,7 +15,7 @@ package org.apache.activemq.utils; import java.io.IOException; import java.io.InputStream; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; /** * Used to send large messages @@ -33,7 +33,7 @@ public class HornetQBufferInputStream extends InputStream // Constants ----------------------------------------------------- // Attributes ---------------------------------------------------- - private HornetQBuffer bb; + private ActiveMQBuffer bb; // Static -------------------------------------------------------- @@ -41,7 +41,7 @@ public class HornetQBufferInputStream extends InputStream // Public -------------------------------------------------------- - public HornetQBufferInputStream(final HornetQBuffer paramByteBuffer) + public HornetQBufferInputStream(final ActiveMQBuffer paramByteBuffer) { bb = paramByteBuffer; } 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 9e26a6e47f..e6debde45a 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 @@ -15,7 +15,7 @@ package org.apache.activemq.utils; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.Executor; -import org.apache.activemq.api.core.HornetQInterruptedException; +import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.core.client.HornetQClientLogger; @@ -103,7 +103,7 @@ public final class OrderedExecutorFactory implements ExecutorFactory { task.run(); } - catch (HornetQInterruptedException e) + catch (ActiveMQInterruptedException e) { // This could happen during shutdowns. Nothing to be concerned about here HornetQClientLogger.LOGGER.debug("Interrupted Thread", e); diff --git a/activemq-core-client/src/main/java/org/apache/activemq/utils/XidCodecSupport.java b/activemq-core-client/src/main/java/org/apache/activemq/utils/XidCodecSupport.java index e186d1612f..07193d42a5 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/utils/XidCodecSupport.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/utils/XidCodecSupport.java @@ -14,7 +14,7 @@ package org.apache.activemq.utils; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.transaction.impl.XidImpl; /** @@ -31,7 +31,7 @@ public class XidCodecSupport // Static -------------------------------------------------------- - public static void encodeXid(final Xid xid, final HornetQBuffer out) + public static void encodeXid(final Xid xid, final ActiveMQBuffer out) { out.writeInt(xid.getFormatId()); out.writeInt(xid.getBranchQualifier().length); @@ -40,7 +40,7 @@ public class XidCodecSupport out.writeBytes(xid.getGlobalTransactionId()); } - public static Xid decodeXid(final HornetQBuffer in) + public static Xid decodeXid(final ActiveMQBuffer in) { int formatID = in.readInt(); byte[] bq = new byte[in.readInt()]; diff --git a/activemq-core-client/src/test/java/org/apache/activemq/tests/util/RandomUtil.java b/activemq-core-client/src/test/java/org/apache/activemq/tests/util/RandomUtil.java index aae7edad8e..169e6e6f43 100644 --- a/activemq-core-client/src/test/java/org/apache/activemq/tests/util/RandomUtil.java +++ b/activemq-core-client/src/test/java/org/apache/activemq/tests/util/RandomUtil.java @@ -16,8 +16,8 @@ import javax.transaction.xa.Xid; import java.util.Random; import java.util.UUID; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.transaction.impl.XidImpl; @@ -70,9 +70,9 @@ public final class RandomUtil } - public static HornetQBuffer randomBuffer(final int size, final long... data) + public static ActiveMQBuffer randomBuffer(final int size, final long... data) { - HornetQBuffer buffer = HornetQBuffers.fixedBuffer(size + 8 * data.length); + ActiveMQBuffer buffer = ActiveMQBuffers.fixedBuffer(size + 8 * data.length); for (long d : data) { diff --git a/activemq-core-client/src/test/java/org/apache/activemq/util/TypedPropertiesConversionTest.java b/activemq-core-client/src/test/java/org/apache/activemq/util/TypedPropertiesConversionTest.java index d83c158210..3e3e56f4a8 100644 --- a/activemq-core-client/src/test/java/org/apache/activemq/util/TypedPropertiesConversionTest.java +++ b/activemq-core-client/src/test/java/org/apache/activemq/util/TypedPropertiesConversionTest.java @@ -11,7 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.util; -import org.apache.activemq.api.core.HornetQPropertyConversionException; +import org.apache.activemq.api.core.ActiveMQPropertyConversionException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.utils.TypedProperties; @@ -82,7 +82,7 @@ public class TypedPropertiesConversionTest props.getBooleanProperty(key); Assert.fail(); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { } @@ -104,7 +104,7 @@ public class TypedPropertiesConversionTest props.getCharProperty(key); Assert.fail(); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { } @@ -136,7 +136,7 @@ public class TypedPropertiesConversionTest props.getByteProperty(key); Assert.fail(); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { } @@ -172,7 +172,7 @@ public class TypedPropertiesConversionTest props.getIntProperty(key); Assert.fail(); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { } @@ -216,7 +216,7 @@ public class TypedPropertiesConversionTest props.getLongProperty(key); Assert.fail(); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { } @@ -248,7 +248,7 @@ public class TypedPropertiesConversionTest props.getDoubleProperty(key); Assert.fail(); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { } @@ -281,7 +281,7 @@ public class TypedPropertiesConversionTest props.getFloatProperty(key); Assert.fail(); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { } @@ -318,7 +318,7 @@ public class TypedPropertiesConversionTest props.getShortProperty(key); Assert.fail(); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { } @@ -354,7 +354,7 @@ public class TypedPropertiesConversionTest props.getBytesProperty(key); Assert.fail(); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { } diff --git a/activemq-core-client/src/test/java/org/apache/activemq/util/TypedPropertiesTest.java b/activemq-core-client/src/test/java/org/apache/activemq/util/TypedPropertiesTest.java index 41ac49a820..e29cd25ab0 100644 --- a/activemq-core-client/src/test/java/org/apache/activemq/util/TypedPropertiesTest.java +++ b/activemq-core-client/src/test/java/org/apache/activemq/util/TypedPropertiesTest.java @@ -13,8 +13,8 @@ package org.apache.activemq.util; import java.util.Iterator; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.utils.TypedProperties; @@ -204,7 +204,7 @@ public class TypedPropertiesTest SimpleString keyToRemove = RandomUtil.randomSimpleString(); props.putSimpleStringProperty(keyToRemove, RandomUtil.randomSimpleString()); - HornetQBuffer buffer = HornetQBuffers.dynamicBuffer(1024); + ActiveMQBuffer buffer = ActiveMQBuffers.dynamicBuffer(1024); props.encode(buffer); Assert.assertEquals(props.getEncodeSize(), buffer.writerIndex()); @@ -228,7 +228,7 @@ public class TypedPropertiesTest { TypedProperties emptyProps = new TypedProperties(); - HornetQBuffer buffer = HornetQBuffers.dynamicBuffer(1024); + ActiveMQBuffer buffer = ActiveMQBuffers.dynamicBuffer(1024); emptyProps.encode(buffer); Assert.assertEquals(props.getEncodeSize(), buffer.writerIndex()); 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/HornetQBytesMessage.java index d2667ff31a..5213ffadd3 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/HornetQBytesMessage.java @@ -17,8 +17,8 @@ import javax.jms.JMSException; import javax.jms.MessageEOFException; import javax.jms.MessageFormatException; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +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.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession; @@ -367,7 +367,7 @@ public class HornetQBytesMessage extends HornetQMessage implements BytesMessage } @Override - public void doBeforeReceive() throws HornetQException + public void doBeforeReceive() throws ActiveMQException { bodyLength = message.getBodySize(); } @@ -412,7 +412,7 @@ public class HornetQBytesMessage extends HornetQMessage implements BytesMessage return HornetQBytesMessage.TYPE; } - private HornetQBuffer getBuffer() + private ActiveMQBuffer getBuffer() { return message.getBodyBuffer(); } 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/HornetQConnection.java index 1472a7cecc..6980131921 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/HornetQConnection.java @@ -32,8 +32,8 @@ import java.lang.ref.WeakReference; import java.util.HashSet; import java.util.Set; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; @@ -232,9 +232,9 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement { initialSession.addUniqueMetaData("jms-client-id", clientID); } - catch (HornetQException e) + catch (ActiveMQException e) { - if (e.getType() == HornetQExceptionType.DUPLICATE_METADATA) + if (e.getType() == ActiveMQExceptionType.DUPLICATE_METADATA) { throw new InvalidClientIDException("clientID=" + clientID + " was already set into another connection"); } @@ -245,7 +245,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement { this.addSessionMetaData(initialSession); } - catch (HornetQException e) + catch (ActiveMQException e) { JMSException ex = new JMSException("Internal error setting metadata jms-client-id"); ex.setLinkedException(e); @@ -362,7 +362,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement { initialSession.deleteQueue(queueName); } - catch (HornetQException ignore) + catch (ActiveMQException ignore) { // Exception on deleting queue shouldn't prevent close from completing } @@ -380,7 +380,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement closed = true; } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -678,7 +678,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement return jbs; } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -724,13 +724,13 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement initialSession.addFailureListener(listener); initialSession.addFailoverListener(failoverListener); } - catch (HornetQException me) + catch (ActiveMQException me) { throw JMSExceptionHelper.convertFromHornetQException(me); } } - private void addSessionMetaData(ClientSession session) throws HornetQException + private void addSessionMetaData(ClientSession session) throws ActiveMQException { session.addMetaData("jms-session", ""); if (clientID != null) @@ -762,7 +762,7 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement } @Override - public synchronized void connectionFailed(final HornetQException me, boolean failedOver) + public synchronized void connectionFailed(final ActiveMQException me, boolean failedOver) { if (me == null) { @@ -804,12 +804,12 @@ public class HornetQConnection extends HornetQConnectionForContextImpl implement } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } - public void beforeReconnect(final HornetQException me) + public void beforeReconnect(final ActiveMQException me) { } 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/HornetQJMSClientBundle.java index 7e76e630f6..e5a6c0bbb0 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/HornetQJMSClientBundle.java @@ -21,9 +21,9 @@ import javax.jms.JMSRuntimeException; import javax.jms.MessageNotReadableException; import javax.jms.MessageNotWriteableException; -import org.apache.activemq.api.core.HornetQIllegalStateException; -import org.apache.activemq.api.core.HornetQInvalidFilterExpressionException; -import org.apache.activemq.api.core.HornetQNonExistentQueueException; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQInvalidFilterExpressionException; +import org.apache.activemq.api.core.ActiveMQNonExistentQueueException; import org.apache.activemq.api.core.SimpleString; import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.Message; @@ -46,13 +46,13 @@ public interface HornetQJMSClientBundle HornetQJMSClientBundle BUNDLE = Messages.getBundle(HornetQJMSClientBundle.class); @Message(id = 129000, value = "Invalid filter: {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQInvalidFilterExpressionException invalidFilter(@Cause Throwable e, SimpleString filter); + ActiveMQInvalidFilterExpressionException invalidFilter(@Cause Throwable e, SimpleString filter); @Message(id = 129001, value = "Invalid Subscription Name. It is required to set the subscription name", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException invalidSubscriptionName(); + ActiveMQIllegalStateException invalidSubscriptionName(); @Message(id = 129002, value = "Destination {0} does not exist", format = Message.Format.MESSAGE_FORMAT) - HornetQNonExistentQueueException destinationDoesNotExist(SimpleString destination); + ActiveMQNonExistentQueueException destinationDoesNotExist(SimpleString destination); @Message(id = 129003, value = "name cannot be null", format = Message.Format.MESSAGE_FORMAT) IllegalArgumentException nameCannotBeNull(); 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/HornetQJMSProducer.java index 54f7c05647..86a5f7c5e3 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/HornetQJMSProducer.java @@ -33,7 +33,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; -import org.apache.activemq.api.core.HornetQPropertyConversionException; +import org.apache.activemq.api.core.ActiveMQPropertyConversionException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.utils.TypedProperties; @@ -497,7 +497,7 @@ public final class HornetQJMSProducer implements JMSProducer { TypedProperties.setObjectProperty(new SimpleString(name), value, properties); } - catch (HornetQPropertyConversionException hqe) + catch (ActiveMQPropertyConversionException hqe) { throw new MessageFormatRuntimeException(hqe.getMessage()); } @@ -536,7 +536,7 @@ public final class HornetQJMSProducer implements JMSProducer { return properties.getBooleanProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException ce) + catch (ActiveMQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } @@ -553,7 +553,7 @@ public final class HornetQJMSProducer implements JMSProducer { return properties.getByteProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException ce) + catch (ActiveMQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } @@ -566,7 +566,7 @@ public final class HornetQJMSProducer implements JMSProducer { return properties.getShortProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException ce) + catch (ActiveMQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } @@ -579,7 +579,7 @@ public final class HornetQJMSProducer implements JMSProducer { return properties.getIntProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException ce) + catch (ActiveMQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } @@ -592,7 +592,7 @@ public final class HornetQJMSProducer implements JMSProducer { return properties.getLongProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException ce) + catch (ActiveMQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } @@ -605,7 +605,7 @@ public final class HornetQJMSProducer implements JMSProducer { return properties.getFloatProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException ce) + catch (ActiveMQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } @@ -618,7 +618,7 @@ public final class HornetQJMSProducer implements JMSProducer { return properties.getDoubleProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException ce) + catch (ActiveMQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } @@ -634,7 +634,7 @@ public final class HornetQJMSProducer implements JMSProducer return null; return prop.toString(); } - catch (HornetQPropertyConversionException ce) + catch (ActiveMQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } @@ -657,7 +657,7 @@ public final class HornetQJMSProducer implements JMSProducer } return property; } - catch (HornetQPropertyConversionException ce) + catch (ActiveMQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } @@ -681,7 +681,7 @@ public final class HornetQJMSProducer implements JMSProducer } return propNames; } - catch (HornetQPropertyConversionException ce) + catch (ActiveMQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } 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/HornetQMapMessage.java index 6ee7b89343..635854b140 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/HornetQMapMessage.java @@ -20,8 +20,8 @@ import java.util.Enumeration; import java.util.HashSet; import java.util.Set; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQPropertyConversionException; +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.api.core.client.ClientMessage; @@ -201,7 +201,7 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag { TypedProperties.setObjectProperty(new SimpleString(name), value, map); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -214,7 +214,7 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag { return map.getBooleanProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -226,7 +226,7 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag { return map.getByteProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -238,7 +238,7 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag { return map.getShortProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -250,7 +250,7 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag { return map.getCharProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -262,7 +262,7 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag { return map.getIntProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -274,7 +274,7 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag { return map.getLongProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -286,7 +286,7 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag { return map.getFloatProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -298,7 +298,7 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag { return map.getDoubleProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -318,7 +318,7 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag return str.toString(); } } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -330,7 +330,7 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag { return map.getBytesProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -392,7 +392,7 @@ public final class HornetQMapMessage extends HornetQMessage implements MapMessag } @Override - public void doBeforeReceive() throws HornetQException + public void doBeforeReceive() throws ActiveMQException { super.doBeforeReceive(); 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/HornetQMessage.java index a01dcaa0f3..4f8038fdbf 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/HornetQMessage.java @@ -31,9 +31,9 @@ import javax.jms.Message; import javax.jms.MessageFormatException; import javax.jms.MessageNotWriteableException; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQPropertyConversionException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; +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; @@ -354,7 +354,7 @@ public class HornetQMessage implements javax.jms.Message { MessageUtil.setJMSCorrelationIDAsBytes(message, correlationID); } - catch (HornetQException e) + catch (ActiveMQException e) { JMSException ex = new JMSException(e.getMessage()); ex.initCause(e); @@ -543,7 +543,7 @@ public class HornetQMessage implements javax.jms.Message { return message.getBooleanProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -555,7 +555,7 @@ public class HornetQMessage implements javax.jms.Message { return message.getByteProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -567,7 +567,7 @@ public class HornetQMessage implements javax.jms.Message { return message.getShortProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -584,7 +584,7 @@ public class HornetQMessage implements javax.jms.Message { return message.getIntProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -601,7 +601,7 @@ public class HornetQMessage implements javax.jms.Message { return message.getLongProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -613,7 +613,7 @@ public class HornetQMessage implements javax.jms.Message { return message.getFloatProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -625,7 +625,7 @@ public class HornetQMessage implements javax.jms.Message { return message.getDoubleProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -649,7 +649,7 @@ public class HornetQMessage implements javax.jms.Message return message.getStringProperty(new SimpleString(name)); } } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -762,7 +762,7 @@ public class HornetQMessage implements javax.jms.Message { message.putObjectProperty(new SimpleString(name), value); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -781,7 +781,7 @@ public class HornetQMessage implements javax.jms.Message session.commit(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -892,11 +892,11 @@ public class HornetQMessage implements javax.jms.Message message.getBodyBuffer(); } - public void doBeforeReceive() throws HornetQException + public void doBeforeReceive() throws ActiveMQException { message.checkCompletion(); - HornetQBuffer body = message.getBodyBuffer(); + ActiveMQBuffer body = message.getBodyBuffer(); if (body != null) { @@ -932,7 +932,7 @@ public class HornetQMessage implements javax.jms.Message { message.setOutputStream(output); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -950,7 +950,7 @@ public class HornetQMessage implements javax.jms.Message { message.saveToOutputStream(output); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -963,7 +963,7 @@ public class HornetQMessage implements javax.jms.Message { return message.waitOutputStreamCompletion(timeWait); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } 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/HornetQMessageConsumer.java index 1d27026b67..48dbabb3aa 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/HornetQMessageConsumer.java @@ -22,7 +22,7 @@ import javax.jms.Session; import javax.jms.Topic; import javax.jms.TopicSubscriber; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -109,7 +109,7 @@ public final class HornetQMessageConsumer implements QueueReceiver, TopicSubscri { consumer.setMessageHandler(coreListener); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -144,7 +144,7 @@ public final class HornetQMessageConsumer implements QueueReceiver, TopicSubscri session.removeConsumer(this); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -242,7 +242,7 @@ public final class HornetQMessageConsumer implements QueueReceiver, TopicSubscri return jmsMsg; } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(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/HornetQMessageProducer.java index 3bb43c135b..6f083ab814 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/HornetQMessageProducer.java @@ -30,7 +30,7 @@ import javax.jms.TextMessage; import javax.jms.Topic; import javax.jms.TopicPublisher; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; @@ -175,7 +175,7 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top { clientProducer.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -418,7 +418,7 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top connection.addKnownDestination(address); } } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -524,7 +524,7 @@ public class HornetQMessageProducer implements MessageProducer, QueueSender, Top clientProducer.send(address, coreMessage); } } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } 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/HornetQObjectMessage.java index dfc8b10910..e4d98e476c 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/HornetQObjectMessage.java @@ -21,7 +21,7 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession; @@ -94,7 +94,7 @@ public class HornetQObjectMessage extends HornetQMessage implements ObjectMessag } @Override - public void doBeforeReceive() throws HornetQException + public void doBeforeReceive() throws ActiveMQException { super.doBeforeReceive(); try 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/HornetQQueueBrowser.java index 86c08c69a3..869d29953e 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/HornetQQueueBrowser.java @@ -19,7 +19,7 @@ import javax.jms.JMSException; import javax.jms.Queue; import javax.jms.QueueBrowser; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -70,7 +70,7 @@ public final class HornetQQueueBrowser implements QueueBrowser { consumer.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -87,7 +87,7 @@ public final class HornetQQueueBrowser implements QueueBrowser return new BrowserEnumeration(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -132,7 +132,7 @@ public final class HornetQQueueBrowser implements QueueBrowser { current = consumer.receiveImmediate(); } - catch (HornetQException e) + catch (ActiveMQException e) { return false; } 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/HornetQSession.java index 35b29d12b9..f37da08169 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/HornetQSession.java @@ -45,10 +45,10 @@ import javax.jms.TopicSubscriber; import javax.jms.TransactionInProgressException; import javax.transaction.xa.XAResource; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQQueueExistsException; import org.apache.activemq.selector.filter.FilterException; import org.apache.activemq.selector.SelectorParser; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQQueueExistsException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientProducer; @@ -219,7 +219,7 @@ public class HornetQSession implements QueueSession, TopicSession { session.commit(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -240,7 +240,7 @@ public class HornetQSession implements QueueSession, TopicSession { session.rollback(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -263,7 +263,7 @@ public class HornetQSession implements QueueSession, TopicSession connection.removeSession(this); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -281,7 +281,7 @@ public class HornetQSession implements QueueSession, TopicSession { session.rollback(true); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -332,7 +332,7 @@ public class HornetQSession implements QueueSession, TopicSession return new HornetQMessageProducer(connection, producer, jbd, session); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -399,7 +399,7 @@ public class HornetQSession implements QueueSession, TopicSession return queue; } } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -431,7 +431,7 @@ public class HornetQSession implements QueueSession, TopicSession return topic; } } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -641,7 +641,7 @@ public class HornetQSession implements QueueSession, TopicSession { session.createSharedQueue(dest.getSimpleAddress(), queueName, coreFilterString, true); } - catch (HornetQQueueExistsException ignored) + catch (ActiveMQQueueExistsException ignored) { // We ignore this because querying and then creating the queue wouldn't be idempotent // we could also add a parameter to ignore existence what would require a bigger work around to avoid @@ -666,7 +666,7 @@ public class HornetQSession implements QueueSession, TopicSession return jbc; } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -840,7 +840,7 @@ public class HornetQSession implements QueueSession, TopicSession return jbc; } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -904,7 +904,7 @@ public class HornetQSession implements QueueSession, TopicSession throw new InvalidDestinationException(jbq.getAddress() + " does not exist"); } } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -933,7 +933,7 @@ public class HornetQSession implements QueueSession, TopicSession return queue; } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -964,7 +964,7 @@ public class HornetQSession implements QueueSession, TopicSession return topic; } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -999,7 +999,7 @@ public class HornetQSession implements QueueSession, TopicSession session.deleteQueue(queueName); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -1122,7 +1122,7 @@ public class HornetQSession implements QueueSession, TopicSession connection.removeTemporaryQueue(address); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -1156,7 +1156,7 @@ public class HornetQSession implements QueueSession, TopicSession connection.removeTemporaryQueue(address); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -1168,7 +1168,7 @@ public class HornetQSession implements QueueSession, TopicSession { session.start(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -1180,7 +1180,7 @@ public class HornetQSession implements QueueSession, TopicSession { session.stop(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromHornetQException(e); } @@ -1201,7 +1201,7 @@ public class HornetQSession implements QueueSession, TopicSession { session.deleteQueue(queueName); } - catch (HornetQException ignore) + catch (ActiveMQException ignore) { // Exception on deleting queue shouldn't prevent close from completing } @@ -1220,7 +1220,7 @@ public class HornetQSession implements QueueSession, TopicSession } } - private HornetQQueue lookupQueue(final String queueName, boolean isTemporary) throws HornetQException + private HornetQQueue lookupQueue(final String queueName, boolean isTemporary) throws ActiveMQException { HornetQQueue queue; @@ -1245,7 +1245,7 @@ public class HornetQSession implements QueueSession, TopicSession } } - private HornetQTopic lookupTopic(final String topicName, final boolean isTemporary) throws HornetQException + private HornetQTopic lookupTopic(final String topicName, final boolean isTemporary) throws ActiveMQException { HornetQTopic topic; 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/HornetQStreamMessage.java index fbef34e29a..5274557130 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/HornetQStreamMessage.java @@ -17,7 +17,7 @@ import javax.jms.MessageEOFException; import javax.jms.MessageFormatException; import javax.jms.StreamMessage; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.client.ClientMessage; @@ -452,7 +452,7 @@ public final class HornetQStreamMessage extends HornetQMessage implements Stream reset(); } - private HornetQBuffer getBuffer() + private ActiveMQBuffer getBuffer() { return message.getBodyBuffer(); } 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/HornetQTextMessage.java index 90ffcc17b6..65bdb82a38 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/HornetQTextMessage.java @@ -15,7 +15,7 @@ package org.apache.activemq.jms.client; import javax.jms.JMSException; import javax.jms.TextMessage; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientMessage; @@ -123,7 +123,7 @@ public class HornetQTextMessage extends HornetQMessage implements TextMessage // HornetQRAMessage override ----------------------------------------- @Override - public void doBeforeReceive() throws HornetQException + public void doBeforeReceive() throws ActiveMQException { super.doBeforeReceive(); 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 2833d9e8c9..c61f48a11d 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 @@ -17,7 +17,7 @@ import javax.jms.InvalidSelectorException; import javax.jms.JMSException; import javax.jms.JMSSecurityException; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; /** * @@ -29,7 +29,7 @@ import org.apache.activemq.api.core.HornetQException; public final class JMSExceptionHelper { - public static JMSException convertFromHornetQException(final HornetQException me) + public static JMSException convertFromHornetQException(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 fa3a1cd8c8..1bbffc5463 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 @@ -15,7 +15,7 @@ package org.apache.activemq.jms.client; import javax.jms.MessageListener; import javax.jms.Session; -import org.apache.activemq.api.core.HornetQException; +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; @@ -91,7 +91,7 @@ public class JMSMessageListenerWrapper implements MessageHandler { message.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQJMSClientLogger.LOGGER.errorProcessingMessage(e); } @@ -141,7 +141,7 @@ public class JMSMessageListenerWrapper implements MessageHandler message.acknowledge(); } } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQJMSClientLogger.LOGGER.errorProcessingMessage(e); } 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 dee0db85cf..f04d59be51 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 @@ -45,8 +45,8 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQInterruptedException; +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; @@ -469,7 +469,7 @@ public final class JMSBridgeImpl implements JMSBridge } } - private void initPasswords() throws HornetQException + private void initPasswords() throws ActiveMQException { if (useMaskedPassword) { @@ -1932,7 +1932,7 @@ public final class JMSBridgeImpl implements JMSBridge { return; } - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } continue; } @@ -1973,7 +1973,7 @@ public final class JMSBridgeImpl implements JMSBridge { return; } - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } continue; } @@ -2197,7 +2197,7 @@ public final class JMSBridgeImpl implements JMSBridge { return; } - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } 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 5e878e5ad3..36394ed851 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 @@ -16,8 +16,8 @@ import javax.management.MBeanInfo; import javax.management.StandardMBean; import java.util.Map; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.FilterConstants; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.management.MessageCounterInfo; import org.apache.activemq.api.core.management.Operation; import org.apache.activemq.api.core.management.QueueControl; @@ -50,7 +50,7 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro /** * Returns null if the string is null or empty */ - public static String createFilterFromJMSSelector(final String selectorStr) throws HornetQException + public static String createFilterFromJMSSelector(final String selectorStr) throws ActiveMQException { return selectorStr == null || selectorStr.trim().length() == 0 ? null : SelectorTranslator.convertToHornetQFilterString(selectorStr); @@ -205,7 +205,7 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro } return jmsMessages; } - catch (HornetQException e) + catch (ActiveMQException e) { throw new IllegalStateException(e.getMessage()); } 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 095b1879fc..298071ce6c 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 @@ -20,7 +20,7 @@ import java.util.Map; import javax.management.MBeanInfo; import javax.management.StandardMBean; -import org.apache.activemq.api.core.HornetQException; +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; @@ -53,7 +53,7 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl // Static -------------------------------------------------------- - public static String createFilterFromJMSSelector(final String selectorStr) throws HornetQException + public static String createFilterFromJMSSelector(final String selectorStr) throws ActiveMQException { return selectorStr == null || selectorStr.trim().length() == 0 ? null : SelectorTranslator.convertToHornetQFilterString(selectorStr); diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/config/PersistedConnectionFactory.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/config/PersistedConnectionFactory.java index ded50a5dd8..40c357b30e 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/config/PersistedConnectionFactory.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/config/PersistedConnectionFactory.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.jms.persistence.config; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration; import org.apache.activemq.jms.server.config.impl.ConnectionFactoryConfigurationImpl; @@ -82,14 +82,14 @@ public class PersistedConnectionFactory implements EncodingSupport } @Override - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { config = new ConnectionFactoryConfigurationImpl(); config.decode(buffer); } @Override - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { config.encode(buffer); } diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/config/PersistedDestination.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/config/PersistedDestination.java index 25c728aa9d..a8c9ddf30f 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/config/PersistedDestination.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/config/PersistedDestination.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.jms.persistence.config; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.utils.BufferHelper; @@ -109,7 +109,7 @@ public class PersistedDestination implements EncodingSupport DataConstants.SIZE_BOOLEAN; } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeByte(type.getType()); buffer.writeSimpleString(SimpleString.toSimpleString(name)); @@ -117,7 +117,7 @@ public class PersistedDestination implements EncodingSupport buffer.writeBoolean(durable); } - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { type = PersistedType.getType(buffer.readByte()); name = buffer.readSimpleString().toString(); diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/config/PersistedJNDI.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/config/PersistedJNDI.java index fa45e5f049..615e6426a8 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/config/PersistedJNDI.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/persistence/config/PersistedJNDI.java @@ -15,7 +15,7 @@ package org.apache.activemq.jms.persistence.config; import java.util.ArrayList; import java.util.List; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.utils.BufferHelper; import org.apache.activemq.utils.DataConstants; @@ -61,7 +61,7 @@ public class PersistedJNDI implements EncodingSupport // Public -------------------------------------------------------- @Override - public void decode(HornetQBuffer buffer) + public void decode(ActiveMQBuffer buffer) { type = PersistedType.getType(buffer.readByte()); name = buffer.readSimpleString().toString(); @@ -75,7 +75,7 @@ public class PersistedJNDI implements EncodingSupport } @Override - public void encode(HornetQBuffer buffer) + public void encode(ActiveMQBuffer buffer) { buffer.writeByte(type.getType()); BufferHelper.writeAsSimpleString(buffer, name); 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 d233e39350..f3efc5cf6e 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 @@ -18,8 +18,8 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.Pair; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.journal.Journal; @@ -294,7 +294,7 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager { long id = record.id; - HornetQBuffer buffer = HornetQBuffers.wrappedBuffer(record.data); + ActiveMQBuffer buffer = ActiveMQBuffers.wrappedBuffer(record.data); byte rec = record.getUserRecordType(); 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/HornetQJMSServerBundle.java index a812b75b31..474c99035a 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/HornetQJMSServerBundle.java @@ -13,9 +13,9 @@ package org.apache.activemq.jms.server; -import org.apache.activemq.api.core.HornetQAddressExistsException; -import org.apache.activemq.api.core.HornetQIllegalStateException; -import org.apache.activemq.api.core.HornetQInternalErrorException; +import org.apache.activemq.api.core.ActiveMQAddressExistsException; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQInternalErrorException; import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.Message; import org.jboss.logging.annotations.MessageBundle; @@ -37,26 +37,26 @@ public interface HornetQJMSServerBundle HornetQJMSServerBundle BUNDLE = Messages.getBundle(HornetQJMSServerBundle.class); @Message(id = 129000, value = "Connection Factory {0} does not exist" , format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException cfDoesntExist(String name); + ActiveMQInternalErrorException cfDoesntExist(String name); @Message(id = 129001, value = "Invalid signature {0} parsing Connection Factory" , format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException invalidSignatureParsingCF(String sig); + ActiveMQInternalErrorException invalidSignatureParsingCF(String sig); @Message(id = 129002, value = "Invalid node {0} parsing Connection Factory", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException invalidNodeParsingCF(String name); + ActiveMQInternalErrorException invalidNodeParsingCF(String name); @Message(id = 129003, value = "Discovery Group ''{0}'' does not exist on main config", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException discoveryGroupDoesntExist(String name); + ActiveMQIllegalStateException discoveryGroupDoesntExist(String name); @Message(id = 129004, value = "No Connector name configured on create ConnectionFactory", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException noConnectorNameOnCF(); + ActiveMQIllegalStateException noConnectorNameOnCF(); @Message(id = 129005, value = "Connector ''{0}'' not found on the main configuration file" , format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException noConnectorNameConfiguredOnCF(String name); + ActiveMQIllegalStateException noConnectorNameConfiguredOnCF(String name); @Message(id = 129006, value = "JNDI {0} is already being used by another connection factory", format = Message.Format.MESSAGE_FORMAT) - HornetQAddressExistsException cfJndiExists(String name); + ActiveMQAddressExistsException cfJndiExists(String name); @Message(id = 129007, value = "Error decoding password using codec instance", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException errorDecodingPassword(@Cause Exception e); + ActiveMQIllegalStateException errorDecodingPassword(@Cause Exception e); } 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 b915817de8..fcda258a4e 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 @@ -15,7 +15,7 @@ package org.apache.activemq.jms.server.config.impl; import java.util.ArrayList; import java.util.List; -import org.apache.activemq.api.core.HornetQBuffer; +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.jms.JMSFactoryType; @@ -523,7 +523,7 @@ public class ConnectionFactoryConfigurationImpl implements ConnectionFactoryConf // Encoding Support Implementation -------------------------------------------------------------- @Override - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { persisted = true; @@ -611,7 +611,7 @@ public class ConnectionFactoryConfigurationImpl implements ConnectionFactoryConf } @Override - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { persisted = true; diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/config/impl/TransportConfigurationEncodingSupport.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/config/impl/TransportConfigurationEncodingSupport.java index 554fb1b25f..b3abd68fe4 100644 --- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/config/impl/TransportConfigurationEncodingSupport.java +++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/config/impl/TransportConfigurationEncodingSupport.java @@ -18,7 +18,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.utils.BufferHelper; @@ -33,7 +33,7 @@ import org.apache.activemq.utils.DataConstants; */ public class TransportConfigurationEncodingSupport { - public static List> decodeConfigs(HornetQBuffer buffer) + public static List> decodeConfigs(ActiveMQBuffer buffer) { int size = buffer.readInt(); List> configs = new ArrayList>(size); @@ -53,7 +53,7 @@ public class TransportConfigurationEncodingSupport return configs; } - public static TransportConfiguration decode(HornetQBuffer buffer) + public static TransportConfiguration decode(ActiveMQBuffer buffer) { String name = BufferHelper.readNullableSimpleStringAsString(buffer); String factoryClassName = buffer.readSimpleString().toString(); @@ -69,7 +69,7 @@ public class TransportConfigurationEncodingSupport return config; } - public static void encodeConfigs(HornetQBuffer buffer, + public static void encodeConfigs(ActiveMQBuffer buffer, List> configs) { buffer.writeInt(configs == null ? 0 : configs.size()); @@ -88,7 +88,7 @@ public class TransportConfigurationEncodingSupport } } - public static void encode(HornetQBuffer buffer, TransportConfiguration config) + public static void encode(ActiveMQBuffer buffer, TransportConfiguration config) { BufferHelper.writeAsNullableSimpleString(buffer, config.getName()); BufferHelper.writeAsSimpleString(buffer, config.getFactoryClassName()); 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 3a98aa947c..6293fe4838 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 @@ -19,7 +19,7 @@ import java.util.ArrayList; import java.util.List; import org.apache.activemq.api.config.HornetQDefaultConfiguration; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.client.HornetQClient; import org.apache.activemq.api.jms.JMSFactoryType; import org.apache.activemq.core.config.impl.Validators; @@ -422,7 +422,7 @@ public final class JMSServerConfigParserImpl implements JMSServerConfigParser return cfConfig; } - private JMSFactoryType resolveFactoryType(String fact, boolean isXA) throws HornetQException + private JMSFactoryType resolveFactoryType(String fact, boolean isXA) throws ActiveMQException { if ("".equals(fact)) { 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 51d7d75c02..b8b2d5f2dc 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 @@ -31,8 +31,8 @@ import java.util.Map.Entry; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.AddressControl; @@ -1398,9 +1398,9 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback /** * @param cfConfig * @return - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - protected HornetQConnectionFactory internalCreateCFPOJO(final ConnectionFactoryConfiguration cfConfig) throws HornetQException + protected HornetQConnectionFactory internalCreateCFPOJO(final ConnectionFactoryConfiguration cfConfig) throws ActiveMQException { HornetQConnectionFactory cf; if (cfConfig.getDiscoveryGroupName() != null) 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/HornetQXAResourceWrapper.java index fbcc8aa54d..293137b5e9 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/HornetQXAResourceWrapper.java @@ -18,9 +18,9 @@ import javax.transaction.xa.XAException; import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQNotConnectedException; +import org.apache.activemq.api.core.ActiveMQException; +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; @@ -251,9 +251,9 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe } } - public void connectionFailed(final HornetQException me, boolean failedOver) + public void connectionFailed(final ActiveMQException me, boolean failedOver) { - if (me.getType() == HornetQExceptionType.DISCONNECTED) + if (me.getType() == ActiveMQExceptionType.DISCONNECTED) { if (HornetQJMSServerLogger.LOGGER.isDebugEnabled()) { @@ -268,12 +268,12 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } - public void beforeReconnect(final HornetQException me) + public void beforeReconnect(final ActiveMQException me) { } @@ -429,7 +429,7 @@ public class HornetQXAResourceWrapper implements XAResource, SessionFailureListe return delegate; } HornetQJMSServerLogger.LOGGER.recoveryConnectFailed(Arrays.toString(xaRecoveryConfigs)); - throw new HornetQNotConnectedException(); + throw new ActiveMQNotConnectedException(); } /* (non-Javadoc) 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 d1cce428cf..751036168d 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 @@ -14,8 +14,8 @@ package org.apache.activemq.jms.server.recovery; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClusterTopologyListener; @@ -176,9 +176,9 @@ public class RecoveryDiscovery implements SessionFailureListener @Override - public void connectionFailed(HornetQException exception, boolean failedOver) + public void connectionFailed(ActiveMQException exception, boolean failedOver) { - if (exception.getType() == HornetQExceptionType.DISCONNECTED) + if (exception.getType() == ActiveMQExceptionType.DISCONNECTED) { HornetQJMSServerLogger.LOGGER.warn("being disconnected for server shutdown", exception); } @@ -192,13 +192,13 @@ public class RecoveryDiscovery implements SessionFailureListener } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } @Override - public void beforeReconnect(HornetQException exception) + public void beforeReconnect(ActiveMQException exception) { } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/asyncio/AsynchronousFile.java b/activemq-journal/src/main/java/org/apache/activemq/core/asyncio/AsynchronousFile.java index 8a12a99aa1..43e6b4dcf2 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/asyncio/AsynchronousFile.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/asyncio/AsynchronousFile.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.asyncio; import java.nio.ByteBuffer; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; /** * @@ -23,35 +23,35 @@ import org.apache.activemq.api.core.HornetQException; */ public interface AsynchronousFile { - void close() throws InterruptedException, HornetQException; + void close() throws InterruptedException, ActiveMQException; /** * * Note: If you are using a native Linux implementation, maxIO can't be higher than what's defined on /proc/sys/fs/aio-max-nr, or you would get an error * @param fileName * @param maxIO The number of max concurrent asynchronous IO operations. It has to be balanced between the size of your writes and the capacity of your disk. - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - void open(String fileName, int maxIO) throws HornetQException; + void open(String fileName, int maxIO) throws ActiveMQException; /** * Warning: This function will perform a synchronous IO, probably translating to a fstat call - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException * */ - long size() throws HornetQException; + long size() throws ActiveMQException; /** Any error will be reported on the callback interface */ void write(long position, long size, ByteBuffer directByteBuffer, AIOCallback aioCallback); /** * Performs an internal direct write. - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - void writeInternal(long positionToWrite, long size, ByteBuffer bytes) throws HornetQException; + void writeInternal(long positionToWrite, long size, ByteBuffer bytes) throws ActiveMQException; - void read(long position, long size, ByteBuffer directByteBuffer, AIOCallback aioCallback) throws HornetQException; + void read(long position, long size, ByteBuffer directByteBuffer, AIOCallback aioCallback) throws ActiveMQException; - void fill(long position, int blocks, long size, byte fillChar) throws HornetQException; + void fill(long position, int blocks, long size, byte fillChar) throws ActiveMQException; void setBufferCallback(BufferCallback callback); 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 8e94f1eb8f..f08753763f 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 @@ -24,8 +24,8 @@ import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantReadWriteLock; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.core.asyncio.AIOCallback; import org.apache.activemq.core.asyncio.AsynchronousFile; import org.apache.activemq.core.asyncio.BufferCallback; @@ -133,7 +133,7 @@ public class AsynchronousFileImpl implements AsynchronousFile static { - String[] libraries = new String[]{"HornetQAIO", "HornetQAIO64", "HornetQAIO32", "HornetQAIO_ia64"}; + String[] libraries = new String[]{"activemqAIO", "activemqAIO64", "activemqAIO32", "activemqAIO_ia64"}; for (String library : libraries) { @@ -220,7 +220,7 @@ public class AsynchronousFileImpl implements AsynchronousFile this(writeExecutor, pollerExecutor, null); } - public void open(final String fileName1, final int maxIOArgument) throws HornetQException + public void open(final String fileName1, final int maxIOArgument) throws ActiveMQException { writeLock.lock(); @@ -240,12 +240,12 @@ public class AsynchronousFileImpl implements AsynchronousFile { handler = Native.init(AsynchronousFileImpl.class, fileName1, this.maxIO, HornetQJournalLogger.LOGGER); } - catch (HornetQException e) + catch (ActiveMQException e) { - HornetQException ex = null; - if (e.getType() == HornetQExceptionType.NATIVE_ERROR_CANT_INITIALIZE_AIO) + ActiveMQException ex = null; + if (e.getType() == ActiveMQExceptionType.NATIVE_ERROR_CANT_INITIALIZE_AIO) { - ex = new HornetQException(e.getType(), + ex = new ActiveMQException(e.getType(), "Can't initialize AIO. Currently AIO in use = " + AsynchronousFileImpl.totalMaxIO.get() + ", trying to allocate more " + maxIOArgument, @@ -268,7 +268,7 @@ public class AsynchronousFileImpl implements AsynchronousFile } } - public void close() throws InterruptedException, HornetQException + public void close() throws InterruptedException, ActiveMQException { checkOpened(); @@ -308,13 +308,13 @@ public class AsynchronousFileImpl implements AsynchronousFile } - public void writeInternal(long positionToWrite, long size, ByteBuffer bytes) throws HornetQException + public void writeInternal(long positionToWrite, long size, ByteBuffer bytes) throws ActiveMQException { try { Native.writeInternal(handler, positionToWrite, size, bytes); } - catch (HornetQException e) + catch (ActiveMQException e) { fireExceptionListener(e.getType().getCode(), e.getMessage()); throw e; @@ -358,7 +358,7 @@ public class AsynchronousFileImpl implements AsynchronousFile { Native.write(AsynchronousFileImpl.this, handler, sequence, position, size, directByteBuffer, aioCallback); } - catch (HornetQException e) + catch (ActiveMQException e) { callbackError(aioCallback, sequence, directByteBuffer, e.getType().getCode(), e.getMessage()); } @@ -367,7 +367,7 @@ public class AsynchronousFileImpl implements AsynchronousFile callbackError(aioCallback, sequence, directByteBuffer, - HornetQExceptionType.INTERNAL_ERROR.getCode(), + ActiveMQExceptionType.INTERNAL_ERROR.getCode(), e.getMessage()); } } @@ -383,13 +383,13 @@ public class AsynchronousFileImpl implements AsynchronousFile { Native.write(this, handler, sequence, position, size, directByteBuffer, aioCallback); } - catch (HornetQException e) + catch (ActiveMQException e) { callbackError(aioCallback, sequence, directByteBuffer, e.getType().getCode(), e.getMessage()); } catch (RuntimeException e) { - callbackError(aioCallback, sequence, directByteBuffer, HornetQExceptionType.INTERNAL_ERROR.getCode(), e.getMessage()); + callbackError(aioCallback, sequence, directByteBuffer, ActiveMQExceptionType.INTERNAL_ERROR.getCode(), e.getMessage()); } } @@ -398,7 +398,7 @@ public class AsynchronousFileImpl implements AsynchronousFile public void read(final long position, final long size, final ByteBuffer directByteBuffer, - final AIOCallback aioPackage) throws HornetQException + final AIOCallback aioPackage) throws ActiveMQException { checkOpened(); if (poller == null) @@ -411,7 +411,7 @@ public class AsynchronousFileImpl implements AsynchronousFile { Native.read(this, handler, position, size, directByteBuffer, aioPackage); } - catch (HornetQException e) + catch (ActiveMQException e) { // Release only if an exception happened maxIOSemaphore.release(); @@ -427,20 +427,20 @@ public class AsynchronousFileImpl implements AsynchronousFile } } - public long size() throws HornetQException + public long size() throws ActiveMQException { checkOpened(); return Native.size0(handler); } - public void fill(final long position, final int blocks, final long size, final byte fillChar) throws HornetQException + public void fill(final long position, final int blocks, final long size, final byte fillChar) throws ActiveMQException { checkOpened(); try { Native.fill(handler, position, blocks, size, fillChar); } - catch (HornetQException e) + catch (ActiveMQException e) { fireExceptionListener(e.getType().getCode(), e.getMessage()); throw e; @@ -619,7 +619,7 @@ public class AsynchronousFileImpl implements AsynchronousFile HornetQJournalLogger.LOGGER.ioError(errorCode, errorMessage); if (ioExceptionListener != null) { - ioExceptionListener.onIOException(HornetQExceptionType.getType(errorCode).createException(errorMessage), errorMessage); + ioExceptionListener.onIOException(ActiveMQExceptionType.getType(errorCode).createException(errorMessage), errorMessage); } } @@ -668,10 +668,10 @@ public class AsynchronousFileImpl implements AsynchronousFile } /** - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException * @throws InterruptedException */ - private void stopPoller() throws HornetQException, InterruptedException + private void stopPoller() throws ActiveMQException, InterruptedException { Native.stopPoller(handler); // We need to make sure we won't call close until Poller is diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/EncodingSupport.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/EncodingSupport.java index a6f8d9bf62..44ff2616d1 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/EncodingSupport.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/EncodingSupport.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; /** * @@ -27,7 +27,7 @@ public interface EncodingSupport { int getEncodeSize(); - void encode(HornetQBuffer buffer); + void encode(ActiveMQBuffer buffer); - void decode(HornetQBuffer buffer); + void decode(ActiveMQBuffer buffer); } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/SequentialFile.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/SequentialFile.java index 7c8048ddd9..7eecbfdd43 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/SequentialFile.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/SequentialFile.java @@ -16,8 +16,8 @@ import java.io.File; import java.io.IOException; import java.nio.ByteBuffer; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.journal.impl.TimedBuffer; /** @@ -54,11 +54,11 @@ public interface SequentialFile void fill(int position, int size, byte fillCharacter) throws Exception; - void delete() throws IOException, InterruptedException, HornetQException; + void delete() throws IOException, InterruptedException, ActiveMQException; - void write(HornetQBuffer bytes, boolean sync, IOAsyncTask callback) throws Exception; + void write(ActiveMQBuffer bytes, boolean sync, IOAsyncTask callback) throws Exception; - void write(HornetQBuffer bytes, boolean sync) throws Exception; + void write(ActiveMQBuffer bytes, boolean sync) throws Exception; void write(EncodingSupport bytes, boolean sync, IOAsyncTask callback) throws Exception; diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AIOSequentialFile.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AIOSequentialFile.java index e18b84508b..6bf0e71a7d 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AIOSequentialFile.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AIOSequentialFile.java @@ -17,7 +17,7 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.util.concurrent.Executor; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.asyncio.AsynchronousFile; import org.apache.activemq.core.asyncio.BufferCallback; import org.apache.activemq.core.asyncio.IOExceptionListener; @@ -97,7 +97,7 @@ public class AIOSequentialFile extends AbstractSequentialFile implements IOExcep } @Override - public synchronized void close() throws IOException, InterruptedException, HornetQException + public synchronized void close() throws IOException, InterruptedException, ActiveMQException { if (!opened) { @@ -178,7 +178,7 @@ public class AIOSequentialFile extends AbstractSequentialFile implements IOExcep open(maxIO, true); } - public synchronized void open(final int maxIO, final boolean useExecutor) throws HornetQException + public synchronized void open(final int maxIO, final boolean useExecutor) throws ActiveMQException { opened = true; @@ -188,7 +188,7 @@ public class AIOSequentialFile extends AbstractSequentialFile implements IOExcep { aioFile.open(getFile().getAbsolutePath(), maxIO); } - catch (HornetQException e) + catch (ActiveMQException e) { factory.onIOError(e, e.getMessage(), this); throw e; @@ -206,7 +206,7 @@ public class AIOSequentialFile extends AbstractSequentialFile implements IOExcep aioFile.setBufferCallback(callback); } - public int read(final ByteBuffer bytes, final IOAsyncTask callback) throws HornetQException + public int read(final ByteBuffer bytes, final IOAsyncTask callback) throws ActiveMQException { int bytesToRead = bytes.limit(); @@ -292,7 +292,7 @@ public class AIOSequentialFile extends AbstractSequentialFile implements IOExcep aioFile.write(positionToWrite, bytesToWrite, bytes, callback); } - public void writeInternal(final ByteBuffer bytes) throws HornetQException + public void writeInternal(final ByteBuffer bytes) throws ActiveMQException { final int bytesToWrite = factory.calculateBlockSize(bytes.limit()); 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 a2f9e7e240..1313546324 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 @@ -20,7 +20,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQInterruptedException; +import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.core.asyncio.BufferCallback; import org.apache.activemq.core.asyncio.impl.AsynchronousFileImpl; import org.apache.activemq.core.journal.IOCriticalErrorListener; @@ -181,7 +181,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor { super.start(); - pollerExecutor = Executors.newCachedThreadPool(new HornetQThreadFactory("HornetQ-AIO-poller-pool" + System.identityHashCode(this), + pollerExecutor = Executors.newCachedThreadPool(new HornetQThreadFactory("ActiveMQ-AIO-poller-pool" + System.identityHashCode(this), true, AIOSequentialFileFactory.getThisClassLoader())); @@ -205,7 +205,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AbstractJournalUpdateTask.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AbstractJournalUpdateTask.java index 18d7b9b1f4..cbd89996a3 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AbstractJournalUpdateTask.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/AbstractJournalUpdateTask.java @@ -17,8 +17,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Set; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.Pair; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.journal.SequentialFileFactory; @@ -55,7 +55,7 @@ public abstract class AbstractJournalUpdateTask implements JournalReaderCallback protected long nextOrderingID; - private HornetQBuffer writingChannel; + private ActiveMQBuffer writingChannel; private final Set recordsSnapshot = new ConcurrentHashSet(); @@ -95,7 +95,7 @@ public abstract class AbstractJournalUpdateTask implements JournalReaderCallback JournalImpl.initFileHeader(fileFactory, controlFile, 0, 0); - HornetQBuffer filesToRename = HornetQBuffers.dynamicBuffer(1); + ActiveMQBuffer filesToRename = ActiveMQBuffers.dynamicBuffer(1); // DataFiles first @@ -150,7 +150,7 @@ public abstract class AbstractJournalUpdateTask implements JournalReaderCallback new ByteArrayEncoding(filesToRename.toByteBuffer() .array())); - HornetQBuffer renameBuffer = HornetQBuffers.dynamicBuffer(filesToRename.writerIndex()); + ActiveMQBuffer renameBuffer = ActiveMQBuffers.dynamicBuffer(filesToRename.writerIndex()); controlRecord.setFileID(0); @@ -208,7 +208,7 @@ public abstract class AbstractJournalUpdateTask implements JournalReaderCallback ByteBuffer bufferWrite = fileFactory.newBuffer(journal.getFileSize()); - writingChannel = HornetQBuffers.wrappedBuffer(bufferWrite); + writingChannel = ActiveMQBuffers.wrappedBuffer(bufferWrite); currentFile = filesRepository.takeFile(false, false, false, true); @@ -229,7 +229,7 @@ public abstract class AbstractJournalUpdateTask implements JournalReaderCallback /** * @return the writingChannel */ - protected HornetQBuffer getWritingChannel() + protected ActiveMQBuffer getWritingChannel() { return writingChannel; } 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 bbfd6264f9..aebefb7547 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 @@ -21,10 +21,10 @@ import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQIOErrorException; +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.ActiveMQIOErrorException; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.journal.SequentialFile; @@ -91,7 +91,7 @@ public abstract class AbstractSequentialFile implements SequentialFile return file.getName(); } - public final void delete() throws IOException, InterruptedException, HornetQException + public final void delete() throws IOException, InterruptedException, ActiveMQException { if (isOpen()) { @@ -137,7 +137,7 @@ public abstract class AbstractSequentialFile implements SequentialFile } catch (IOException e) { - factory.onIOError(new HornetQIOErrorException(e.getMessage(), e), e.getMessage(), this); + factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(), this); throw e; } } @@ -157,7 +157,7 @@ public abstract class AbstractSequentialFile implements SequentialFile } public final void renameTo(final String newFileName) throws IOException, InterruptedException, - HornetQException + ActiveMQException { try { @@ -165,7 +165,7 @@ public abstract class AbstractSequentialFile implements SequentialFile } catch (IOException e) { - factory.onIOError(new HornetQIOErrorException(e.getMessage(), e), e.getMessage(), this); + factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(), this); throw e; } @@ -183,9 +183,9 @@ public abstract class AbstractSequentialFile implements SequentialFile /** * @throws IOException we declare throwing IOException because sub-classes need to do it - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - public synchronized void close() throws IOException, InterruptedException, HornetQException + public synchronized void close() throws IOException, InterruptedException, ActiveMQException { final CountDownLatch donelatch = new CountDownLatch(1); @@ -234,7 +234,7 @@ public abstract class AbstractSequentialFile implements SequentialFile } - public void write(final HornetQBuffer bytes, final boolean sync, final IOAsyncTask callback) throws IOException + public void write(final ActiveMQBuffer bytes, final boolean sync, final IOAsyncTask callback) throws IOException { if (timedBuffer != null) { @@ -250,8 +250,8 @@ public abstract class AbstractSequentialFile implements SequentialFile } } - public void write(final HornetQBuffer bytes, final boolean sync) throws IOException, InterruptedException, - HornetQException + public void write(final ActiveMQBuffer bytes, final boolean sync) throws IOException, InterruptedException, + ActiveMQException { if (sync) { @@ -281,14 +281,14 @@ public abstract class AbstractSequentialFile implements SequentialFile // Because AIO will need a specific Buffer // And NIO will also need a whole buffer to perform the write - HornetQBuffer outBuffer = HornetQBuffers.wrappedBuffer(buffer); + ActiveMQBuffer outBuffer = ActiveMQBuffers.wrappedBuffer(buffer); bytes.encode(outBuffer); buffer.rewind(); writeDirect(buffer, sync, callback); } } - public void write(final EncodingSupport bytes, final boolean sync) throws InterruptedException, HornetQException + public void write(final EncodingSupport bytes, final boolean sync) throws InterruptedException, ActiveMQException { if (sync) { 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 312ab31484..bec510659c 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 @@ -24,7 +24,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQInterruptedException; +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; @@ -104,7 +104,7 @@ abstract class AbstractSequentialFileFactory implements SequentialFileFactory } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/FileWrapperJournal.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/FileWrapperJournal.java index 21e7241615..eb39764e40 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/FileWrapperJournal.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/FileWrapperJournal.java @@ -19,8 +19,8 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.ReentrantLock; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQUnsupportedPacketException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQUnsupportedPacketException; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.IOCompletion; import org.apache.activemq.core.journal.Journal; @@ -189,7 +189,7 @@ public final class FileWrapperJournal extends JournalBase writeRecord(prepareRecord, sync, callback); } - private int count(long txID) throws HornetQException + private int count(long txID) throws ActiveMQException { AtomicInteger defaultValue = new AtomicInteger(1); AtomicInteger count = transactions.putIfAbsent(Long.valueOf(txID), defaultValue); @@ -211,19 +211,19 @@ public final class FileWrapperJournal extends JournalBase @Override public void appendRollbackRecord(long txID, boolean sync, IOCompletion callback) throws Exception { - throw new HornetQUnsupportedPacketException(); + throw new ActiveMQUnsupportedPacketException(); } @Override public JournalLoadInformation load(LoaderCallback reloadManager) throws Exception { - throw new HornetQUnsupportedPacketException(); + throw new ActiveMQUnsupportedPacketException(); } @Override public JournalLoadInformation loadInternalOnly() throws Exception { - throw new HornetQUnsupportedPacketException(); + throw new ActiveMQUnsupportedPacketException(); } @Override @@ -236,13 +236,13 @@ public final class FileWrapperJournal extends JournalBase public JournalLoadInformation load(List committedRecords, List preparedTransactions, TransactionFailureCallback transactionFailure) throws Exception { - throw new HornetQUnsupportedPacketException(); + throw new ActiveMQUnsupportedPacketException(); } @Override public int getAlignment() throws Exception { - throw new HornetQUnsupportedPacketException(); + throw new ActiveMQUnsupportedPacketException(); } @Override diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalBase.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalBase.java index d746719329..c48f89faa2 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalBase.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalBase.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.IOCompletion; import org.apache.activemq.core.journal.Journal; @@ -194,12 +194,12 @@ abstract class JournalBase implements Journal private static NullEncoding instance = new NullEncoding(); - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { // no-op } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { // no-op } 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 0ff4c14b21..d582be112b 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 @@ -20,8 +20,8 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.Pair; import org.apache.activemq.core.journal.RecordInfo; import org.apache.activemq.core.journal.SequentialFile; @@ -90,7 +90,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ } else { - HornetQBuffer input = HornetQBuffers.wrappedBuffer(records.get(0).data); + ActiveMQBuffer input = ActiveMQBuffers.wrappedBuffer(records.get(0).data); int numberDataFiles = input.readInt(); 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 46fe900ef9..d5ba1cefee 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 @@ -39,8 +39,8 @@ import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantReadWriteLock; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.Pair; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.IOAsyncTask; @@ -318,11 +318,11 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal class MyRecord implements EncodingSupport { - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeBytes(bytes); } @@ -2723,7 +2723,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal // We don't need to release buffers while writing. ByteBuffer bb = fileFactory.newBuffer(JournalImpl.SIZE_HEADER); - HornetQBuffer buffer = HornetQBuffers.wrappedBuffer(bb); + ActiveMQBuffer buffer = ActiveMQBuffers.wrappedBuffer(bb); try { @@ -2750,7 +2750,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal * @param userVersion * @param fileID */ - public static void writeHeader(final HornetQBuffer buffer, final int userVersion, final long fileID) + public static void writeHeader(final ActiveMQBuffer buffer, final int userVersion, final long fileID) { buffer.writeInt(JournalImpl.FORMAT_VERSION); @@ -3031,7 +3031,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal return byteEncoder.getEncodeSize(); } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { byteEncoder.encode(buffer); } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalTransaction.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalTransaction.java index c049a4363e..5c4d73de14 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalTransaction.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/JournalTransaction.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.core.journal.impl.dataformat.JournalInternalRecord; /** @@ -209,7 +209,7 @@ public class JournalTransaction if (currentCallback.getErrorMessage() != null) { - throw HornetQExceptionType.createException(currentCallback.getErrorCode(), currentCallback.getErrorMessage()); + throw ActiveMQExceptionType.createException(currentCallback.getErrorCode(), currentCallback.getErrorMessage()); } currentCallback.countUp(); 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 4660161f4e..e8db83e50c 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 @@ -21,10 +21,10 @@ import java.util.concurrent.Executor; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQIOErrorException; -import org.apache.activemq.api.core.HornetQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; +import org.apache.activemq.api.core.ActiveMQIOErrorException; +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; @@ -107,7 +107,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile } catch (IOException e) { - factory.onIOError(new HornetQIOErrorException(e.getMessage(), e), e.getMessage(), this); + factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(), this); throw e; } @@ -138,7 +138,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile } catch (IOException e) { - factory.onIOError(new HornetQIOErrorException(e.getMessage(), e), e.getMessage(), this); + factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(), this); throw e; } @@ -154,7 +154,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile } @Override - public synchronized void close() throws IOException, InterruptedException, HornetQException + public synchronized void close() throws IOException, InterruptedException, ActiveMQException { super.close(); @@ -181,7 +181,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile } catch (IOException e) { - factory.onIOError(new HornetQIOErrorException(e.getMessage(), e), e.getMessage(), this); + factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(), this); throw e; } channel = null; @@ -197,13 +197,13 @@ public final class NIOSequentialFile extends AbstractSequentialFile } public synchronized int read(final ByteBuffer bytes, final IOAsyncTask callback) throws IOException, - HornetQIllegalStateException + ActiveMQIllegalStateException { try { if (channel == null) { - throw new HornetQIllegalStateException("File " + this.getFileName() + " has a null channel"); + throw new ActiveMQIllegalStateException("File " + this.getFileName() + " has a null channel"); } int bytesRead = channel.read(bytes); @@ -220,10 +220,10 @@ public final class NIOSequentialFile extends AbstractSequentialFile { if (callback != null) { - callback.onError(HornetQExceptionType.IO_ERROR.getCode(), e.getLocalizedMessage()); + callback.onError(ActiveMQExceptionType.IO_ERROR.getCode(), e.getLocalizedMessage()); } - factory.onIOError(new HornetQIOErrorException(e.getMessage(), e), e.getMessage(), this); + factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(), this); throw e; } @@ -239,7 +239,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile } catch (IOException e) { - factory.onIOError(new HornetQIOErrorException(e.getMessage(), e), e.getMessage(), this); + factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(), this); throw e; } } @@ -258,7 +258,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile } catch (IOException e) { - factory.onIOError(new HornetQIOErrorException(e.getMessage(), e), e.getMessage(), this); + factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(), this); throw e; } } @@ -273,7 +273,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile } catch (IOException e) { - factory.onIOError(new HornetQIOErrorException(e.getMessage(), e), e.getMessage(), this); + factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(), this); throw e; } } @@ -302,7 +302,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile } catch (Exception e) { - callback.onError(HornetQExceptionType.GENERIC_EXCEPTION.getCode(), e.getMessage()); + callback.onError(ActiveMQExceptionType.GENERIC_EXCEPTION.getCode(), e.getMessage()); } } @@ -326,13 +326,13 @@ public final class NIOSequentialFile extends AbstractSequentialFile return super.newBuffer(size, limit); } - private void internalWrite(final ByteBuffer bytes, final boolean sync, final IOAsyncTask callback) throws IOException, HornetQIOErrorException, InterruptedException + private void internalWrite(final ByteBuffer bytes, final boolean sync, final IOAsyncTask callback) throws IOException, ActiveMQIOErrorException, InterruptedException { if (!isOpen()) { if (callback != null) { - callback.onError(HornetQExceptionType.IO_ERROR.getCode(), "File not opened"); + callback.onError(ActiveMQExceptionType.IO_ERROR.getCode(), "File not opened"); } else { @@ -352,7 +352,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile } catch (IOException e) { - factory.onIOError(new HornetQIOErrorException(e.getMessage(), e), e.getMessage(), this); + factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(), this); } } else @@ -373,13 +373,13 @@ public final class NIOSequentialFile extends AbstractSequentialFile catch (IOException e) { HornetQJournalLogger.LOGGER.errorSubmittingWrite(e); - factory.onIOError(new HornetQIOErrorException(e.getMessage(), e), e.getMessage(), NIOSequentialFile.this); - callback.onError(HornetQExceptionType.IO_ERROR.getCode(), e.getMessage()); + 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); - callback.onError(HornetQExceptionType.IO_ERROR.getCode(), e.getMessage()); + callback.onError(ActiveMQExceptionType.IO_ERROR.getCode(), e.getMessage()); } } finally 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 b33512dc0b..5b17ddd2fe 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 @@ -15,8 +15,8 @@ package org.apache.activemq.core.journal.impl; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.journal.HornetQJournalLogger; /** @@ -57,7 +57,7 @@ public final class SimpleWaitIOCallback extends SyncIOCompletion } @Override - public void waitCompletion() throws InterruptedException, HornetQException + public void waitCompletion() throws InterruptedException, ActiveMQException { while (true) { @@ -67,19 +67,19 @@ public final class SimpleWaitIOCallback extends SyncIOCompletion if (errorMessage != null) { - throw HornetQExceptionType.createException(errorCode, errorMessage); + throw ActiveMQExceptionType.createException(errorCode, errorMessage); } return; } - public boolean waitCompletion(final long timeout) throws InterruptedException, HornetQException + public boolean waitCompletion(final long timeout) throws InterruptedException, ActiveMQException { boolean retValue = latch.await(timeout, TimeUnit.MILLISECONDS); if (errorMessage != null) { - throw HornetQExceptionType.createException(errorCode, errorMessage); + throw ActiveMQExceptionType.createException(errorCode, errorMessage); } return retValue; 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 2370518f14..50d71d1d36 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 @@ -21,9 +21,9 @@ import java.util.TimerTask; import java.util.concurrent.Semaphore; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQInterruptedException; +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.core.journal.EncodingSupport; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.journal.impl.dataformat.ByteArrayEncoding; @@ -55,7 +55,7 @@ public class TimedBuffer private final int bufferSize; - private final HornetQBuffer buffer; + private final ActiveMQBuffer buffer; private int bufferLimit = 0; @@ -110,7 +110,7 @@ public class TimedBuffer } // Setting the interval for nano-sleeps - buffer = HornetQBuffers.fixedBuffer(bufferSize); + buffer = ActiveMQBuffers.fixedBuffer(bufferSize); buffer.clear(); @@ -146,7 +146,7 @@ public class TimedBuffer } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } timerRunnable = new CheckTimer(); @@ -193,7 +193,7 @@ public class TimedBuffer } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } @@ -262,7 +262,7 @@ public class TimedBuffer } } - public synchronized void addBytes(final HornetQBuffer bytes, final boolean sync, final IOAsyncTask callback) + public synchronized void addBytes(final ActiveMQBuffer bytes, final boolean sync, final IOAsyncTask callback) { addBytes(new ByteArrayEncoding(bytes.toByteBuffer().array()), sync, callback); } @@ -447,7 +447,7 @@ public class TimedBuffer } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } } @@ -472,7 +472,7 @@ public class TimedBuffer } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } catch (Exception e) { @@ -535,7 +535,7 @@ public class TimedBuffer } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } spinning = false; diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/ByteArrayEncoding.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/ByteArrayEncoding.java index 1e3a3898f3..63f67c76e9 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/ByteArrayEncoding.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/ByteArrayEncoding.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; /** @@ -34,12 +34,12 @@ public class ByteArrayEncoding implements EncodingSupport // Public -------------------------------------------------------- - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { throw new IllegalStateException("operation not supported"); } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeBytes(data); } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecord.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecord.java index 05cafd9d05..c08ef69bd4 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecord.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecord.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.impl.JournalImpl; @@ -51,7 +51,7 @@ public class JournalAddRecord extends JournalInternalRecord } @Override - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { if (add) { diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecordTX.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecordTX.java index e565264f56..d04ec5e635 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecordTX.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecordTX.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.impl.JournalImpl; @@ -60,7 +60,7 @@ public class JournalAddRecordTX extends JournalInternalRecord } @Override - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { if (add) { diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalCompleteRecordTX.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalCompleteRecordTX.java index d59c5f4595..c3026099c9 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalCompleteRecordTX.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalCompleteRecordTX.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.impl.JournalImpl; @@ -55,7 +55,7 @@ public class JournalCompleteRecordTX extends JournalInternalRecord } @Override - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { if (txRecordType == TX_RECORD_TYPE.COMMIT) { diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecord.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecord.java index fc8cf1a889..dc03af5e4f 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecord.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecord.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.impl.JournalImpl; /** @@ -35,7 +35,7 @@ public class JournalDeleteRecord extends JournalInternalRecord this.id = id; } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeByte(JournalImpl.DELETE_RECORD); diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecordTX.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecordTX.java index 8f62b06333..149297c973 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecordTX.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecordTX.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.impl.JournalImpl; @@ -47,7 +47,7 @@ public class JournalDeleteRecordTX extends JournalInternalRecord } @Override - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeByte(JournalImpl.DELETE_RECORD_TX); diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalInternalRecord.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalInternalRecord.java index 36d8027d22..0dd05f0d06 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalInternalRecord.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalInternalRecord.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; /** @@ -39,7 +39,7 @@ public abstract class JournalInternalRecord implements EncodingSupport this.fileID = fileID; } - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { } diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalRollbackRecordTX.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalRollbackRecordTX.java index d8ba571f84..b97a8a75cf 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalRollbackRecordTX.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalRollbackRecordTX.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.impl.JournalImpl; /** @@ -32,7 +32,7 @@ public class JournalRollbackRecordTX extends JournalInternalRecord } @Override - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeByte(JournalImpl.ROLLBACK_RECORD); buffer.writeInt(fileID); diff --git a/activemq-journal/src/main/java/org/apache/activemq/journal/HornetQJournalBundle.java b/activemq-journal/src/main/java/org/apache/activemq/journal/HornetQJournalBundle.java index dfbcee61e9..39a2adf23e 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/journal/HornetQJournalBundle.java +++ b/activemq-journal/src/main/java/org/apache/activemq/journal/HornetQJournalBundle.java @@ -13,7 +13,7 @@ package org.apache.activemq.journal; -import org.apache.activemq.api.core.HornetQIOErrorException; +import org.apache.activemq.api.core.ActiveMQIOErrorException; import org.jboss.logging.annotations.Message; import org.jboss.logging.annotations.MessageBundle; import org.jboss.logging.Messages; @@ -34,15 +34,15 @@ public interface HornetQJournalBundle HornetQJournalBundle BUNDLE = Messages.getBundle(HornetQJournalBundle.class); @Message(id = 149000, value = "failed to rename file {0} to {1}", format = Message.Format.MESSAGE_FORMAT) - HornetQIOErrorException ioRenameFileError(String name, String newFileName); + ActiveMQIOErrorException ioRenameFileError(String name, String newFileName); @Message(id = 149001, value = "Journal data belong to a different version", format = Message.Format.MESSAGE_FORMAT) - HornetQIOErrorException journalDifferentVersion(); + ActiveMQIOErrorException journalDifferentVersion(); @Message(id = 149002, value = "Journal files version mismatch. You should export the data from the previous version and import it as explained on the user''s manual", format = Message.Format.MESSAGE_FORMAT) - HornetQIOErrorException journalFileMisMatch(); + ActiveMQIOErrorException journalFileMisMatch(); @Message(id = 149003, value = "File not opened", format = Message.Format.MESSAGE_FORMAT) - HornetQIOErrorException fileNotOpened(); + ActiveMQIOErrorException fileNotOpened(); } diff --git a/activemq-native/README b/activemq-native/README index 63404ef8d6..a40400f46e 100644 --- a/activemq-native/README +++ b/activemq-native/README @@ -37,7 +37,8 @@ if you are missing any dependencies, autoconf would tell you what you're missing COMPILED FILE -The produced file will be under ./src/.libs/libHornetQLibAIO.so +The produced file will be under the ./target/nar (example: ./target/nar/activemq-native-6.0.0-SNAPSHOT-amd64-Linux-gpp-jni/lib/amd64-Linux-gpp/jni/libactivemq-native-6.0.0-SNAPSHOT.so) +and you will have to rename it manually under ./bin following the appropriate pattern. DOCUMENTATION diff --git a/activemq-native/bin/libactivemqAIO64.so b/activemq-native/bin/libactivemqAIO64.so new file mode 100755 index 0000000000000000000000000000000000000000..86689f231925483658608eb57ea9c40ad522a05f GIT binary patch literal 51692 zcmeIbdtj8s^*{V5T%<0?l=WhP*knfYo$>~W&B!y3!QXEf zr!a47Bx}^&>E98MN+Fp6s$(2J+d@ntwepRb9wYF6nW}P0fT>({m&mW~vhs~e4Pu~6 zrfGsQQjpT;fNW}PI$iRqlz8bX{ZpWh?%Ug#9F=aD^{7;pyBy_6&#!waJenu#F9?Z#f6UzpLBf2CWCMp`TH>yXytfzZ z@VOozy4cuAH{){?J~Rxr;6qmsA98zg;al-hSGT;m4e9L)j7jeReHT7=<8u!_+wi#$ zpZoE70G}V=qpttL&2~i~{h_@75z?LbJcQ4~`24Q7=hmCOCu~~1Fg^QwZ*70!2R9wr zk^9dFR=#+_`1)riCN$7XW zti>bipItcX=i|S%{CCe!zqR}iPp8-SExv92xBg;xTK#o@pX9mYj*E6b_yg}k9PdJYIn!X+xG8%;^Elb^i(i)S8KaLmQGt$*Wzdkg+t_`{4>mp#3?=Euc5&OUy) z?}q;lJa)(9bH6|G=-k&ndhM^1f7SKL6(MvU&x=nb=BOw-A~*y=fbR$s+0ELb;{a(+JKV5n5r0@P} zd!PW_mGDY7jx`4JqO)CyPsc?=Ox>Mq7*pfmA087Q?}40n{G|!_e}v!{kKckit#RtT zG6DV~3dEE1Nm_jTF*G(_dv8gg&)*WX>kI_Bc=ev1K+drV_)kpGu0@zM@nFIf{#&$aB#su{a zCFsXZ3HaL+wD%tgvr3vsy66k;8l=%Jry9D-ZPoV#~3F>_^ zf&R2$i|23c3G}2n|4d_o@o~QB%*SP)CSzqrI4@*?Eta?ii@f8Ela0JPtc<|Ce7(YP zb%IeQ<=7>DEcmBF&UaS|K&?*>us#!v`3`~4ko@DYkR<;41_8Vy@dEf8=~K2^0H;bk zFj?@w;u3(&Hhw1Yb87^CKJ=q&3z~F>G08~x3pzt2hLiCVjM6SEBeb5S>v7;zZx1c% zaAk|c_?B#Mrfl!|5`S9ixm_xv+Vz%f@9LQLmZBd?eyOz2Y$+!dh9x^JE)_rt;wD|= z*#9ROwkARE6^U^L7*G{ocJ+00$-RmU4C%3t*va@9WYZysHGR{B4Hhzh$|=&ynpKmi%{0etI6F z>m_{1o;#K@X^zK1l%w`m%l2l8Y$JV~z-=-9L-v@8$It9$$taV>;GY_2-FpD?soq;; zzw}9dx3o_zUM|P)OJ#y_sEy)boAROLF!V2z*$|A-^Cy#QNvu69wKZ z<3_gRKS}D@5aXW@f}iG*Qi;PXe0`X}-)`b@eS*;~`%&@dNPpfHGw%KX2GVnn^z&RP ze~DimEO4x(!P-SD%*e4PrOZLk&*)Izvev`ywN z^CbT^Y5x;xa{<>Tw4bi?VP}eOwq`-A_CA!rAC|~C?{NwK29X%c;14t|vb(H|WJ)|N z+qF#^V1~qJ%YIxe`_YU`(mtc+Uns`*k^X#G%J~Q>;b}GjtdRH;S#KV zXT8VkF`PveCC)l`i+iodA8@x+loT}jyzUBDO`}`n#m{lpw!27xtI=}}7?-y>%cO*Y zMwj33_8ZRCD;6zZQDpbFIdc{ix*OdA_a%+K8dqbPyWU=!=UnHjS?8_|MDfipa5Xko z`8;(c?m&aDPGc+0$#$-5Vzj96ny5m#E8H8(11%o!+RBP$_R>phDK}?ce$izGK5wAK z*VyQ8Daf^#`_b6d6;&}g#C(3ff1|f{nWxcRkYg_^_m{@-P{C0WbEL%BjCqZ|wf3@7 z)pmb;g%;Jh{m^Zr#u=xQ!d!b>w1R~>jMO!jaz>1zGB;MG!fY;7Q53@t(G^uIU|IBL zyQ{|2mXosx_tb&Tz{X~`)8no8*@>%sbjcOvf%Dz%weIGC$LEE8NuP=;9VE?l8pb82 z@_?_UJdiWbS>*FOFKc#tn|yWda;MScZt}aM{b7+^Rd88tZEH)5yN)HS$jL?Tnt7<) zQ%(+t&W*}o1^m>fmva7!a=)uwBb2#xC56c=y&F8!a;|r0Fvf|Qc=J^{MTmhjW3^~8f6>tga{9<42)jZ(Q2cI2ge#`6Ff{}W7;}BAyOrVqC@~5! z2z<4!fZJ(~eKZh}CCcX{FTBCG!SG>-M?|$?CUE)PMiUEScQB(b_jPTf583rCZg-4I zGGfLQ5uq(7$KyBSK_vJ_^X6nXV=}O}xxE3u9(U2qwV0h4k13JU+~UrcE!K)OdYU{& zv(N8ocOq(G@UQh6jefUVxVPD!oOv5sJOOu+7ZWQ&gf5_|3<12Jrk&^-7jTJK&N7S= zni^|dwO8lYxtbvl#k?Duj8=c6+ucm&^|#hEQ7<9p`WpRq3;;1l!;n#ZrOkHpX|R61 zy0lV@V61Y?`Z5GWTAS?;_?k<3zSV?cAYggXV$^fXpkGCi=5-*;W5`%nik+i!F<<#T zai=Ma(#V{|rU)P+_?;M}?)gP<$o zPfUHIa^kbgP(O;>jMK3ds1ZH7gz)_pIeA!T#kj{JInMNs@U}KKURJY?)rwPuLwNME zsWGxnE1&1Y|8ka%Q#zqk3h`e#D0w(sO1Y;J9FJKH=hfmT-|F_tHiP##BuwvMKy?*G1szQi3sH)D~) zGqbjcran^Z(wrQyiDh>hZbC`bLJs0vVJ$0(`6Bl zG?u&CTuxuhTBoboRomcpx@rTSHh0r{XRQzBZuHc+5EfUs2z1gUL<@Wpy{OjbZF9E- zsC+pu45Gzj?!{tZOyYUcV))s%``QIojW~H$hBx+6{Qwu$EAwYAa zScZ(Lcw~AVQ!(~UwFVhe$$C#?Q&By3R+oWV##r?==>>xs$ z2o-Rw3I*qjEv6)c{!8Zn2vM}aXq!vq z(|dKv_@pwY$ff%vMw0NhUMk-cH#XhyN#zoRl61jGX%gNlq%_&E{D1O4vLdzYkJyu> z{b4IUr872Shwm8URJpNdLHqa0eA*)oWWNuijWebrpUSLfI>nf4@>`5gGc3c|Js~UKD13(8f87~_ zFOmE4yJGO0*9kd$V(?{hAG9|H@0Rr*jlmT?C~?|`ReSSPLpT9GoB&VTYNcZ6mB{;m zM5k-G+S?{PQ^W5fKwj#5JCZXEAL=W*)b}5;xcc5Y7SGb;-zG%xUx$W&N5e}syhg)U zX}Dd(8#KIJ!}r{3WeVHbhK^_5A#l=D$D1`dja*Xv8Pw$Hc)P|gzgp!29U9)H$=Rmi z>K#tX?$PjbKr1_|?@LHe9p9<(f0G2rYnO(ftw5v)H2h8t@7M5~HGDwBgVa^6 z;nX&DHE8(t3Pjqh;UNug*KpkrJ2ZT}#=k|wF+rPGw}wwLQTUaHS8I5WhELY;of?j> z9L;N&hIg8%VeHXx74s;&SHsnJ;DjI0@Z$-PSHFgzpg^Pp8ooor2Q@rH!^0YWnT8K* zc)o@o)$kiM+_=rk6!q;%8lI-%UJXyzaQTW0=VofSK7OqlezGPfOT%k5JX^z0(eOMC zZ`N>|hO2jfDBGdo>KzcmOEvr(1juWZhO6&>DXUt;?^n!78#Me@4R6+PtA@90_&N>m z(C~H*-=g7XXn41VpQ+*7G`v8=do=uR4d1EZ@|6tE-KF6VYW#aNe7c7BYWNHdKcL}3 z4e!@*`N|FF4rq9m#y_axbs8Sl@D2?h)^PRi17#o8@L3waal4f%^8X&b6Mxb){BjLX z*YI;SJX6DGYq(Xzw`zEnhSz9#wuaBq@H`EltKl{c&(?5?hnf{3AWTJO5{XWsO z1cTLpG*o5lvI|P&U(N5=~R_kd^6aMAH;Jl+N^2qG{?KGMFAu zG)=if!~a9=Pa@h%^dQq;RDz}{aHyZ@Pl=|fZ>X2)kBB~t=v_>|Pc%(YLp@BtMfBN3 zcQgGe(KJ;Jbuj%R(dQ7|%=A8@vxu%{`U#?GDj6ze`VpdO3K_C7{V>rq6%1uF{UFh^ ziMBF*AJOL#ozC>_L{n%VGMK)ZXbR~=!~f#`Cz?X}&>+*-5S>GGKhrHl=Mvq^^g5#F z5xtA)8lvYD-NW>1qA4T}bu(Q?^g^OLm|jlwBBGm_UP?5DxS?vM7ZXh(Y^ap!T%sv- z4cVBUMKp!1p=_qlB$`6ikd^6aL{o?wN@sd1(G;4745r5uO`&IK_@CVWMB9iSWcrH= z(6p2t>Sy{>qL&ig%k)P?(~@Us7t`+(T}X5f({B-NC%T*ISBYLmbO+Nf5>26gsF~?~ zL_3JCX8H-Di-;~|`Vpd+6K!MqVWKZ3I-BVSiKdV_WM%q3qUlj?D4prsiC#gp!Su~U zUq zbO+PRiC#%`Gt*0nUPW{@(~F6|g6LAFbBSI}w2kRmL|;jCHq&PkeHGDGrl%3ThUj#r zrxN{5q7A0U6YV5=_#fQ=L{}3%2-?w=nhwCxbzu^cO2^Ejj^Ljhoku5cNLuq8CYHid zF|mBQW@M1&5AeTP&it<;QT)#yO?CwLIiCIKVuz*Q@ygLwE}U@^7k)MH=^97y`H}aj ze8+|NqMXrsj-&I!k;`ybiTVN)QUCH{s}Wv&?07KSD|C*td5HRKR4&ooWl<&D3%#~J0a1&bCIvlJ# z>^zzjIIHt$a$xqMJje?>LN@4Q zKYD19q_UWrDXBcBPLUMq0_P;1>IO0B2tn0K)PK+s>)BWwJR1QA)*!NxqQ%2e{J<&vnbTi;}{GD_2CDu(Q`j%IrdCa-C@Y zM3xEgQfL@Y3bJTCD7NX$7F8E|O(=#2ckDt_9H9~*=$qinj^G<3{jy)KKRisC!Kbs( z^^V{#X_?>%c9B;V2RG9qq&V2sj^xJPfOX1Dd&iWSCEZhIR`yJpxn|dtneN^xGn@LS z%xoQ;GIP_gBY0OPSo=2T;V(Hx-{vK_qxr+pWrqicZzB$)4}iaVGRGPu{_3YCMnw-N{L2XLPi<@W!3 zrAcuswftL^mOHLLyoC%Ie7YTrn&2-3_`8=Dk^@ED0OI2XfrYWeE@(HL&Fh#E}Huc$$ciZC-^QEJc*mO znN)Ff-9>fEA@U7)aJMQB#)}YP51poo1U8GJZV(pj3y;ukNXWTy@IiS!QM9 zsj`=4Wq)Jirp`7i`@&&1na3~uQfu{gu7|zoS7eaR{aKptWU}uNdnn^Ul4H(qH0f~b z3!p|!XLOSaQ*t0Hs8GBD9t0Ao$g^Gh1{-U-n0|9=_iKS!OVdaM48B7rvSp*|1Y~_X;i= z%?%K?4NHY?2;7FjQHt4Pmy8-|qQTq5V6+UmDbj`P-6ZZX>Qdb_{z>$RG4xH5z0DDF zkbiBHL#(!+MWcK3x%GR&#u{A#R|(p~efGm#{GSAq5-@KFtDxFf9nZd>O6xZE3|di$ zRYm8~kyfri28p3xh>~D{T%Kp*3V}uJ{f^E}{l>;R$m$OwFxz`XR6cE(`*MIpboORC zLYa=P${ytRN?SA%Lsv;JhAtFha}B@_Bd-abzVMHk!QMm0c>wq5)DY=H@}Mo6R?;mZ zoLCfaYry;3Uojup4_iX^!xz}YQ?~wtqBhJhWjBYw8+)g0-U8@Jwi@?MU-(w^W#>OF zfuuthcOP29LxU9U3(ug6vE;>A5t?LZ0J^m=TtRLiTjZX)>0nKXdM{GY3 zEZL7~drx7IT5aERHvLmsT87CG`2{>cjLJ+rRqyTRUVSh89KoT~e-&EM88j+ip~N`nr~CXqpEp|Pr)re-Hj8TZvT(BA)<`wSq8igv z_FsFqSxZ!l?tniWjhd^Jr}Rc=;wMx?6ma~`Y+6Mgy@2<+VNP!Wit zMjpp;JYdiofF3d6C7y)sGr^(M=a!OPsp+@z9b0&^ z&<9ndnYGZf1$E(>)L~J!tu`x2)*C!iR8V79kR7Sur<}+7L*xT!^0VR7BTg~dl(_#a z&4h2TU!|s-65q`?o#IL=(z!oRj;{O)S}XR_5DGrMidSa8qiq3uP%-s0f%96p~&z%ES#*d+ z7X^<}Z@xleIL#glCR3HD8@3@a=LCQ1f*pLfX zA0{qUYZ@Z)fH`S=aEK?3&Q0OZrre1I+my{^c!B|GObPxTwP=g)hdz>v?`kwug!!9D za@S@8I4pN9cnS?6ySxo%T9xq{{dYrZ1(u=Ofw9na7nc((FHzSce8E-C5tYW$#i;o% z_-t=wLb0XgK z1auP~))!s@d1&d6E>taT2ch~@upHXAA8f;R8g!qAu#nAr1;YfVwZpt zisW5)H50%ONmrj{7$PPf>*(tRJaQ-nUEdSgCCD}x5AX=NHWML?`tPfpZkT*XM6F@5 zNcI9C1EI7fDVEH^XMQX+=iR{;$qW{}SP*bt|)pbutD&hl@e2 zr;eb`$QnGj>0iOtqbO}@&AomTp8T-GIMdN}VJ?C}c<4{4v@7GIMQB0Sg3~EJgi`A+ zKmre%_@R=smr6Z@;ctY02&=2-0QC$I$~caShzBY0lrCxwRsIXl2*>sd43l;``sXOr z#|Jf$Nob48+@GSDA~qt!!PXCWVy8zE=wgK~D2GS1j7gEY2nkhw5EReTcyz$@gGom` zZeK`k`znT~V6#KZ*l%BB*|bVVU3DmUXq<)v>qjRP2Vw2E9Gzc`1k#A_DzZ7!0O{7b z-x?ho#TMv5u=RCX$O^ss!mET*189eRv1v2Tm9;R z8DKaxC%SiX_~h? z7pd`^(G^n>)E^J)sSY!DwOju{ZHl{duv|DYLICC$W{bD0J>_v*c0D$U#tU6-)39lE$E_$(_IK7Np_1-o#kbNt)| z$m|ueIvgwL@#uTkl)jMsB$gf7Sc1beSofCO#)+?4ab&I;#J z5q(yO8dIT+36XqOTmLTPVy-5x*K8LSXRpaLwJ~LzBadeTbh7G*CGap91RcSyuH~E= z$+3b%%Sof0&P_*+z)7Mg?WLqizvG#!+Z?azsT5;L>|Ste?xNsd0*piVo_EN!B1TVy zY`Hs&nH9DbeP>7WKdj5 zIu%6f%9eFy)4nJ@Oa|mm=I3PHh=d1(gvX==OGHAJl#mrG;jw55YlMUiQo=K2a$&?g zDIw34a12}QP^+fEH$?FZW$}(kaT+ny2iDl)3n5=O%(Wuyl8G~UNWeHUjI!r!rAD#m z?;9bR%bBAE|TGfD!nHNND7vf!fGN6R>6ljG;|%x(Emd1dJw74#eIE z4fq>p434+N@K}UKvUS71#of>;BT#@gK=ZH4Un7>u`BiH8Rb%+=!SF+CDj}hy2U{)M zF#Nh99~+n092OpTywDmt0uEtg8dW>rqLz_@_+W6HCdy=d=L8In7sxfh^e}pH=yG;p z`vG%vRk8krSYMQ^*AeRs!HP;MGiBXBLfy0&ST#&Rk3MOa4ZFkw&(-g}o2!VP>G= zOCPOw`?cQ1eP8&gH)Zdlk7Vy&0d>PiNaxP|)!e7~-!vb7vh`&Je`|?w6PciY3Qc*P zK+{d@G|uVDcmv-+oBj0#I`z;=A^YnN{zl{IUNn_E@)vJtF+Qpuc41T6|LD?wLekFS zAP~{w9Hj-Xjqv?AXfb=x^yWYl4!|RO;gRqHZAboePo@2a?~I~$wqU=5PR+e z=AQdFsII=nQ9^L6@Jv#ZE}Y8*+HqGw>rup_i4jLtsP zLc@Ly5cSQ#3F7#mdQb_0?HB!mXS4H`Guw)k^?@mPC z9yASJ4lfjO?p~n-9E~Ea8Ia$9ojZ#9Z$JfK8XV)NXdQJPR2b?eN2bLSjX=aU#5I)S z)zbkP)a)?Kp+@rH`%yxA@E}!en&eehqc8jfGkhHnHXt;{gTDtWh4UbROtMP*MlKJ= z7%@V;%-br6uZwG|3 z-jF6o-k;Eva0jX&z14Requ1imdJnQn6d^|Gy%||T?{g!1HB{ELemWRiaAiMfZ_3 zvsGJJHukfa;p=$O6R(bH)k<_w_*49eZIvU+i|~amo+X~bklKZ65GTMOPK8S7{G&Y{W z++7*l@YSR_6aJG}`ktfZ5p8_0!CW+OC_p3ZdMGBF{XEGwo4to?>I?TU158Y2)>kzc zN3@jXH7k$M5Bp`ap{yKXosoLOCqdAm?`X3dJ$EPCP52@Uy9t|r2Zg#aZaTwiU^n5< zfE=Mz<7^~|2Ro4|mKS^D?=h=AWAmvVr8{)y)jp`7z^(ZgQJC1%8 zKPE`gfmqXEobXrYvRoRkcL|}bm{!z>4RrM`rS`1NCC%Ehj-i;YN|Zpu-~BIdGG=p$ zxNmIA{Wd(}n(Iitflw)(+bJB&^D>z;vVTZzLz}Q`#c^)I^~XXrnEe;jC%h*`dqhx? zvc=k|3jJ?x7uZlfY74t-!8fG{uM)w_)nasQfO0~qr=2Cbb`o@f8Q@0zNbu!v$qg3x zW%0if$zy&&jf8#zi9D)AIw4MujPRa?T?mSae zx-BBMNtUUE*h81ICL~j6Q~DAMLa%NLhv)@D+6@%7if^gKUd%(HKG=x&(p2ev2n~@% zaUK~-n;#E|R|NX?XWI@~6^dhywEvkpU>DI{m4AluDGH!CFI?YbBMFxC$iTd=NJI6+ zg<;BEesCR{Ph(a}OX9wO5bSqwMf_w%vk=eOM@2gz0*jB?8C?$^Vqdzqsg$fK5(OV`Sg))Ye>vZzI~JeZ`A0sH49_WU^Ryx z?<)U4^X_vtf^jB%wr}%%++~yZig%y$KswBKpKU~iw0EEBH3vsm7ZrEJfA=}^#-{8Cd+FNCzNH;#jxYR$ptt>Z`X>VTa3G zhcll2l9P^lv*PF~x1`mHrB;tm9=atY$`cYvoaE$_vP4ms`3hgFwbtde`n-)BtvCnN zY6>FZe$uz8wK3pnCIYG~$jKE-ql7i)a8PaxgLGOlPM1Sd-J&L$6_Fn&myR4Gm|G#R8F&hNqLn^qiJ3?mU63|5TOOJUG@VeTdz)8|@? z)-^Y~ajca!;PY9VT;7dVI+e-~c@+w1apPb-v^8r%cJ@r`1{|Hs_4-<@E^8aQrVbXa zt+Ce7sdlriFbhuIgq7&*Ox%>@uX3WZ=;+h{scDq9_;AR06In}~U8+jD>DWa&67WLi zE1;&33;1zTm9@o-=p!9P zW>zuIE}SdQE}W~*E}Tne7tVE2*Lr+&(OK$T&kL3pufutTbG?8g=P+I{v&v8k7y7(z z5M(Kw!)CUFV5>Me{r_OSMM9fKmv`-4an6~p3cIMN4Zoo{N+sdJQl~6Uk~ol!B-OcV zTGtvITrD^{7{)iacZ9?uuW&YT*q^o4@2;B-x1!S?**kDlrQfQb2Z-*&(e|!78l-g4 zpEY7Xk|^a+2!a!@^`e{6+a%Yz!4qh(7MA22D{yqGRh}*=`RTYitJm$WqakChq3|FI zgZipaV5p<`gcacZLRV|CYoohmvFs`mz4Dr0l)$9=-mCt8m zmRxQgGiMm)xZ-2z5F+GR?$CfE0>$3(GBV<%|2nH#*2+hP8d>q3UQ|Mq;#_l6=ATBypzH7HszR;=cO@%!A2>@h(#O z7u7v4j*M(U`WDiiNUd0F96-7ZX&C%%NYg;i!Nin>w3^Zs!}vX|caSc}5@{#qw#8V$ z^&@S=;^!#Rr?7If;`P(_k=l@^;nAiV>4|tw+Jf{VJOl4S8o(3&0MdQfY{C(3Mmlzd zXikk*1;kBb1NyL~L~LMEWk$ex$?iK@X(#U5FL> zJc!hWbO31s(iD6rxCQBSq*-Z(@fdyoi1c%$^e@9t#g}JWklu%MC(>*2W#Iv&`;mr` zzJ+ur^!c1{q_gp6LKrE%!I6gi*NMi$xC-CAr;o?0KuEKZejjNm(o^tGO9#?V@D9-~ zq*ok*-bf!sI*j!2VJvs>OnU#v&Oi^=X#>)uNVg!(`V8$tdOp$vNb8WU znuOmtMcR(^z~`tR=}mt}{YYO%I*9ZGq}!;zqj)m`sSW7>(iWsgk>>pa?E#+`X&%y@ zNR7$DpYinvUzTgi3`={u<&=rXq;=zoa5~Ua@#%d=_>wU>ec9y9Kkk%vrainH`(j&}3HBKoDEy|a*S*YlHXW_kMVrWE-z z^n6#Od?E5*#~7lvnDSRf^6QY_k9@YZvd?9a{2P&uIY+B+ zy=WU?ma`vn8o)Q30Hym{!9(?YfcyaRPt)^PiF~SOI@)s|`ga)jDgE$TCBxB~ob<;C zUorS<&<{%>FXb7H&)%7woSVdq+Q%_1npAR7CCd?K5TV|?lr1NQl2co!tC#HZ8Puct%X*%C* zp|j$vKz(;&uA$%FN*SlsyPW(b`67}^`cePV?kV$qi2$u+YJAkr8&U7z>mwrtRDt68 zwy-@~_j&CtYLecO&wT42+E28kK*unZF(R zbr_%ddj7Q${r4mPCgdlo{{!T2MgF(-@<|&_`6=V@`%lP!KPvwnGk-er>3h^f_ANyI z>&Q=J-#X-HVs5341Jl0R{BR@kv%VsKJM#08zgREdsE zf1EDAI3j;K@;%7U((`LY{&ZkrU{!gtZ?1##qV&8ec@O2b5kUcR%+!fZ?Ykl(=O>V}1NnzZ&fFL|??>c32082goOnFGj{Mt^ zpJ+TDL4G0p`8-{ZhKT$Vum+~_lqi2b@~e@btCw$zl&?U33-W)h=O^_t1KA;f{7kH| z6OGq9kw51v@*hJ!z0YjZ<$o(u|Le$~j(nQeO*BLuuLvZ?Y1PZPi;^B zg#}A;ObwfuXXO4fEYmJdean(ule*iIyfO7bOY&w5-TpI%?>I}^?9__nR=u=gjNCuT zl6F$+H!SA}+!z_L9KR5O;EI*|EXI=-+`UDA0H?1)`n2V(qV>bsl>e1H71Q-=$*Fgy z7`LXR;{K_xlh68`gZk#3>M}^LHmdvn^DVP4PCb}vDNB7SHMu%CSN%yqijgT$2^&PqL!yOv`Bt9=CjwWa&;yJ&=^VHz^hOhm$b)o=Hx9 zH%T(5G4IKi^o5&VvshlXAo~YNsrXl5kac*Xl5@M|g(OSZlG>A$e0NeR?)Q_Ndy-Rk zD>=Q)3psN=KebqPlAM29Qtx9q+c_`8GU+VqDoZ(Xc34vFs9|4jHdnQrA-p;OCS#Vmawt*t0D4I-@=H zUW;)jdBD%;&wsA}Sl~Yv_>TqtU$=nz-39eK3+i_j)bA*$-%U`zlQ32V)$b^bwcLOB z$7TVZWKe{D(}ONW({FO<^qVm>{YHqMPrva&*F=#RgL&d+lBCt|qT^pB@wF{v<@6Lm z8d)-(CR6o$8?@e}3y&^*efH&uk8bE#F1pklxQ7>U^h+e-+9flvl;mp--qxiHOFF*j z>u|d8C?>9ME2mfj@s)`+CS7WO6-#@*@Gmj=IxttH3QwOUXr<>KS-%uxsQSJf5&AdJ z6#V$soZEw^1-`IF&Gd=VApelGsz`zprfo94 zNv3zpbcalL%k+7f9+c^aGW}ep<9HJT-S})T!ncgJRyJfmVrn_bOyi5D@BjA=BM5eO{&qW%{8^KbPq^eAh_Vi87rb(}gl!CetdJ*2}a_ zrZ>s-Zkg_o>28@mFVllE{ZOW#%XHkuvVNHgD)JYWjdkaF>I|kD zT>b`QPTfW?N{TelB69E>hx{XK%q9sZ^6=t|iwelQ=Ei_Ahksab4u1L+_xLK-gFGMq zRM;GMgR{QH)#P?I)S;}RP(y94{9Rcm6vf*%EW_z)X>n~7GSvOLS`;KOVBoUqiqrREz|o~B)z<5YPy52`dRU2syp#G}fq`N;;1WUKOOUR9}@N5R6E zS}!Qtfg76BRCzUzskBNKQ2HxAl~$rW&5?>$^Q209WJRPueU$zZHtHm<%By)6&zXzFQKgDLpuFYe zDg33c=9Pb`b?&y1;K~w-`B(Xm0uJD23O=g5S_k*a^0EA}^y?@~`m6E>LRL_C_uy-m ze-pfVdG$MXgR*=FWonmIyQkX^@u4nO^{e$;brQP!VXAJ|YB{fZ%3PK=8)`|$mu z6#p^;ZcoE!89vHxDt=OYh*$rrN05Q*PW1pKNK(}>#d$3w88f+x+Zqh} zPBc_Jj>ab$D$YjZlMNL=qwy(*ii^>Bx*6}H@#72?&!X|EhKf_s`0S^ ziv10XF}htRgE1*if6;o5@Y0y|dcMSC_s3QOw`h8*@mbIKXggC_CHZPU4kTaq;;+RR z-Cuiv$7|P%3Ge}ybFwjC+D+;6XW&%tz*5}cY88p`8B)Sa3Iw3=6ci-<-Ex6DB>#Mg zt9`@_iPJy$w`hK%;>-=eOFErbiMc%h4oSUma1O*rvzUmzdC{ZrR$>Q z)4M&?UbP>pR*GoOE%|bY>dFa~6{G-S9tx`_x_`RR;6O7pX z;+>LT{XVR!cOP)FPi(yhn16Kqq3=Y`1pmkRLchmFVvNHiHx+oAO#mw-e!9eMvS0Q} zyh!4iQjQAuK8e5L5{#=Q|3kp3-W^K?pw@_3@Nik;`<5&Ff4I;UE>UlYxVoW=@P#SIJNghX@Kh_-V59+@Ac$& z32=I?CSJS#&iDkQd##W{?}X5mgMC`+#}ls-G`*WcR}JH%=UICHnfMDlg70{d7(WDl zhB3*=_6tDi@TBCgs}(rCGeg&37#H{Y->FzU$Lrsjz^UE=nh0=F9H*D?QvE?C~v`{iV}D%oF$CH@8DqYGS&KtcX# z$bDy}ey9Z$L*l6Y*~*q1=g>ym%9lruw!F+K)v zmG^p*h6On3X-NAomYF#cUn2ECRpNHw@${#EvPyRQc$r|NcVX#TFY);?`gBTscd_8( zcTjP=3pnZ1BlS_f{i?*vWIrl>4oNxRrG*eK`PgSBWuG;`A{u1EC|B>YXwd7w1oZ8zX+nXuzO_D!$+})Kx z{!W%N$@p1|5TMo-PbT0`pCt4tmHswc);kY4wfB)i0nj_+bgcr;@j>coWfboQGQT9W zBm|t=d##jD&&_mwkNGDUW%+`(i^OvE%(5 zbX+|DTne1(t*R7~)qcj6%s;`nQ_f$s4@y_3#HY&j|N845Jw#-Ux~z;( zFkUJXS^RG&aBBxndd9{p`i0YYa(*i1#IEaJkaB(@UN38&R@F|$T`6H1Y?_=r_{RWJt?OrW_+cbMC}^AFFGDLt&7tA!jLcv zUuOX)J#Uut&Uq3qlz43au4efYjN{#ck^T(=U$rd(f1nk=Oj&CvyTuu3a^jE%FU}>1138^_KIhs-UyZBLS%-gP?033a+YNk^jH3wfFZ|~$ zoHs8IlH)Kr=__yXb+r@UI=5^z#8=*RtxZiEQADGh^i6pbEBzyV9}4k71aoSen~i+> z=ljd>Pq&$Jt}YK0=Q*7oAAia2@i}prL^J(y)fpy5M?AO<=j!=6PNzTM3V3R{CO+~4 zl+WwL0S?YO9DP9lfSTxRkH>IcQheFc{9+Vot#KAPV=G==oP&zj;vaaUE~hwSz}ehp z&&?i<;;n(@D~i-{1Nn8XW*A&FAi9zST!2OWbR>nZ)lcm&g6R{8NX$$BM87iNX~gjo zZhzd;qZypb%JNI>PWy^N_=|8JabLI+FCEm+L37*Noy~Y5!so@m(+_NPwq;YllBG=} zUbbvmxxKKxeL41gqG+ zZO)weWY{X7r>?{uXz~^i0{{! zZl5|oVoW{Ap@+lVn2O;b5#a(=@?9cWseH7R#?l5A=vI^mV12){28YAUFG5g_=N09F z`L*buXs;McZFELVDMx0biO=te^^S5(6y<@OdCnr}av6>eYQn)YPX}LdIN2jy4-Q~o=GVPui|J6oMZtf-SKq1a6sSSvsm0wqf!%O^HbTFD_ z@NQ~_ES?f#TQJIyg`LEFpcA;O>yTA)SC+Gst2^O0KJ(o+z5(RgR} zoE+kgG);N0hKPWu@#M_op{l}-W`V}0vQmnkF{aJQMY!NoZRqeOF+4`~2#sfud2yy1tx5$(C(`7wB_V1!aYTIXJBJ9S-sw8x7je;gfotQC0B7 z4J#npxiC1RhhM9|(d}-IE<+=h&hm;zqa1M&T&5h|D4ard#`()|-VjfkVoAY0UW@qc zZ1v(OGsH`GU6hp}(=3Y>i8x0}8!)kJtWit1QO*oMr8v>(ce_Vf0#jgAOrefKpvn`0 zN_Y#koubv~pvK0tLq5f}sA(tKqGYFH^aI<0hsJ{F$p9-?eN2O;tlS?vfVj)6Vn&r5 zL(Q#N>9u)U0CF%W*Y-;F`?N@+Zv;o78GKX1>BeL zQ(Bq3UZ3imt8;VsEUMV^t;|KM8iKLrchvAq{B{HkTjcX{Sl3t^c@D)eiW9~mCTBi(q&e}KJt))> ziz6ALc4K9w~7rY1KnHi_9u6tF3KqX>r#HuZ#q>`Sk3oYfh6_S?Q>0f*P;8 z3%PyFfD{uCCiw&^k7ecK@#66sQy48y#S(+9KQC%GVP2zet){x4`_ieRz}4=JPC8tX z_YJfOK#fejHSh!)trbNP!^j}O9TjbPoU=&01pJU7BM7j z8#nNdMJhR|Y$j%*l>C*=Qa@T@;Dj98ls-8e^TT;*P<1{ViQDXC7i} zWK+x>{k%&dwmnEwv%40dyUKa<0=o#K)?E!oJ+DNg!~0mQ%g@cUArph?m=-+< z4X2y`VM>(!7qCW}<#|n-JQ=+y73J=zF?zU}Q*rD=8L$0STo8|na?2;$ zXe2SVEce-1tVsv#vN7ZIigUGhLsLvMX~G)g>S!L8PovCL>D_>3AvRU~txdG bin/ - libHornetQAIO32.so + libActiveMQAIO32.so @@ -59,7 +59,7 @@ bin/ - libHornetQAIO64.so + libActiveMQAIO64.so diff --git a/activemq-native/src/main/c/JNI_AsynchronousFileImpl.cpp b/activemq-native/src/main/c/JNI_AsynchronousFileImpl.cpp index c8bc16ebb6..178a398e83 100644 --- a/activemq-native/src/main/c/JNI_AsynchronousFileImpl.cpp +++ b/activemq-native/src/main/c/JNI_AsynchronousFileImpl.cpp @@ -21,7 +21,7 @@ #include #include -#include "org.apache.activemq6_core_libaio_Native.h" +#include "org_apache_activemq_core_libaio_Native.h" #include "JavaUtilities.h" @@ -48,7 +48,7 @@ inline AIOController * getController(JNIEnv *env, jobject & controllerAddress) * Method: openFile * Signature: (Ljava/lang/String;)I */ -JNIEXPORT jint JNICALL Java_org.apache.activemq6_core_libaio_Native_openFile +JNIEXPORT jint JNICALL Java_org_apache_activemq_core_libaio_Native_openFile (JNIEnv * env , jclass , jstring jstrFileName) { std::string fileName = convertJavaString(env, jstrFileName); @@ -61,7 +61,7 @@ JNIEXPORT jint JNICALL Java_org.apache.activemq6_core_libaio_Native_openFile * Method: closeFile * Signature: (I)V */ -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_closeFile +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_closeFile (JNIEnv * , jclass , jint handle) { close(handle); @@ -72,7 +72,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_closeFile * Method: flock * Signature: (I)Z */ -JNIEXPORT jboolean JNICALL Java_org.apache.activemq6_core_libaio_Native_flock +JNIEXPORT jboolean JNICALL Java_org_apache_activemq_core_libaio_Native_flock (JNIEnv * , jclass , jint handle) { return flock(handle, LOCK_EX | LOCK_NB) == 0; @@ -85,7 +85,7 @@ JNIEXPORT jboolean JNICALL Java_org.apache.activemq6_core_libaio_Native_flock * Method: init * Signature: (Ljava/lang/String;Ljava/lang/Class;)J */ -JNIEXPORT jobject JNICALL Java_org.apache.activemq6_core_libaio_Native_init +JNIEXPORT jobject JNICALL Java_org_apache_activemq_core_libaio_Native_init (JNIEnv * env, jclass, jclass controllerClazz, jstring jstrFileName, jint maxIO, jobject logger) { AIOController * controller = 0; @@ -94,14 +94,14 @@ JNIEXPORT jobject JNICALL Java_org.apache.activemq6_core_libaio_Native_init std::string fileName = convertJavaString(env, jstrFileName); controller = new AIOController(fileName, (int) maxIO); - controller->done = env->GetMethodID(controllerClazz,"callbackDone","(Lorg.apache.activemq/core/asyncio/AIOCallback;JLjava/nio/ByteBuffer;)V"); + controller->done = env->GetMethodID(controllerClazz,"callbackDone","(Lorg/apache/activemq/core/asyncio/AIOCallback;JLjava/nio/ByteBuffer;)V"); if (!controller->done) { throwException (env, -1, "can't get callbackDone method"); return 0; } - controller->error = env->GetMethodID(controllerClazz, "callbackError", "(Lorg.apache.activemq/core/asyncio/AIOCallback;JLjava/nio/ByteBuffer;ILjava/lang/String;)V"); + controller->error = env->GetMethodID(controllerClazz, "callbackError", "(Lorg/apache/activemq/core/asyncio/AIOCallback;JLjava/nio/ByteBuffer;ILjava/lang/String;)V"); if (!controller->done) { throwException (env, -1, "can't get callbackError method"); @@ -133,7 +133,7 @@ JNIEXPORT jobject JNICALL Java_org.apache.activemq6_core_libaio_Native_init * objThis here is passed as a parameter at the java layer. It used to be a JNI this and now it's a java static method where the intended reference is now passed as an argument */ -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_read +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_read (JNIEnv *env, jclass, jobject objThis, jobject controllerAddress, jlong position, jlong size, jobject jbuffer, jobject callback) { try @@ -165,7 +165,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_read // Fast memset on buffer -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_resetBuffer +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_resetBuffer (JNIEnv *env, jclass, jobject jbuffer, jint size) { void * buffer = env->GetDirectBufferAddress(jbuffer); @@ -180,7 +180,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_resetBuffer } -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_destroyBuffer +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_destroyBuffer (JNIEnv * env, jclass, jobject jbuffer) { if (jbuffer == 0) @@ -192,7 +192,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_destroyBuffe free(buffer); } -JNIEXPORT jobject JNICALL Java_org.apache.activemq6_core_libaio_Native_newNativeBuffer +JNIEXPORT jobject JNICALL Java_org_apache_activemq_core_libaio_Native_newNativeBuffer (JNIEnv * env, jclass, jlong size) { try @@ -230,7 +230,7 @@ JNIEXPORT jobject JNICALL Java_org.apache.activemq6_core_libaio_Native_newNative * objThis here is passed as a parameter at the java layer. It used to be a JNI this and now it's a java static method where the intended reference is now passed as an argument */ -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_write +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_write (JNIEnv *env, jclass, jobject objThis, jobject controllerAddress, jlong sequence, jlong position, jlong size, jobject jbuffer, jobject callback) { try @@ -255,7 +255,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_write } } -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_writeInternal +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_writeInternal (JNIEnv * env, jclass, jobject controllerAddress, jlong positionToWrite, jlong size, jobject jbuffer) { try @@ -278,7 +278,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_writeInterna } -JNIEXPORT void Java_org.apache.activemq6_core_libaio_Native_internalPollEvents +JNIEXPORT void Java_org_apache_activemq_core_libaio_Native_internalPollEvents (JNIEnv *env, jclass, jobject controllerAddress) { try @@ -292,7 +292,7 @@ JNIEXPORT void Java_org.apache.activemq6_core_libaio_Native_internalPollEvents } } -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_stopPoller +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_stopPoller (JNIEnv *env, jclass, jobject controllerAddress) { try @@ -306,7 +306,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_stopPoller } } -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_closeInternal +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_closeInternal (JNIEnv *env, jclass, jobject controllerAddress) { try @@ -322,7 +322,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_closeInterna } -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_fill +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_fill (JNIEnv * env, jclass, jobject controllerAddress, jlong position, jint blocks, jlong size, jbyte fillChar) { try @@ -341,7 +341,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_fill /** It does nothing... just return true to make sure it has all the binary dependencies */ -JNIEXPORT jint JNICALL Java_org.apache.activemq6_core_libaio_Native_getNativeVersion +JNIEXPORT jint JNICALL Java_org_apache_activemq_core_libaio_Native_getNativeVersion (JNIEnv *, jclass) { @@ -349,7 +349,7 @@ JNIEXPORT jint JNICALL Java_org.apache.activemq6_core_libaio_Native_getNativeVer } -JNIEXPORT jlong JNICALL Java_org.apache.activemq6_core_libaio_Native_size0 +JNIEXPORT jlong JNICALL Java_org_apache_activemq_core_libaio_Native_size0 (JNIEnv * env, jclass, jobject controllerAddress) { try diff --git a/activemq-native/src/main/c/JavaUtilities.cpp b/activemq-native/src/main/c/JavaUtilities.cpp index 700bad2c64..5065b21894 100644 --- a/activemq-native/src/main/c/JavaUtilities.cpp +++ b/activemq-native/src/main/c/JavaUtilities.cpp @@ -26,7 +26,7 @@ void throwRuntimeException(JNIEnv * env, const char * message) void throwException(JNIEnv * env, const int code, const char * message) { - jclass exceptionClass = env->FindClass("org.apache.activemq/api/core/HornetQException"); + jclass exceptionClass = env->FindClass("org/apache/activemq/api/core/ActiveMQException"); if (exceptionClass==NULL) { std::cerr << "Couldn't throw exception message:= " << message << "\n"; diff --git a/activemq-native/src/main/java/org/apache/activemq/core/libaio/Native.java b/activemq-native/src/main/java/org/apache/activemq/core/libaio/Native.java index 726339bfa1..79da4c3a1e 100644 --- a/activemq-native/src/main/java/org/apache/activemq/core/libaio/Native.java +++ b/activemq-native/src/main/java/org/apache/activemq/core/libaio/Native.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.libaio; import java.nio.ByteBuffer; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; /** * @author Clebert Suconic @@ -38,7 +38,7 @@ public class Native public static native void newInit(Class someClass); - public static native ByteBuffer init(Class controllerClass, String fileName, int maxIO, Object logger) throws HornetQException; + public static native ByteBuffer init(Class controllerClass, String fileName, int maxIO, Object logger) throws ActiveMQException; public static native long size0(ByteBuffer handle); @@ -47,17 +47,17 @@ public class Native long position, long size, ByteBuffer buffer, - Object aioPackageCallback) throws HornetQException; + Object aioPackageCallback) throws ActiveMQException; /** a direct write to the file without the use of libaio's submit. */ - public static native void writeInternal(ByteBuffer handle, long positionToWrite, long size, ByteBuffer bytes) throws HornetQException; + public static native void writeInternal(ByteBuffer handle, long positionToWrite, long size, ByteBuffer bytes) throws ActiveMQException; /** *This is using org.apache.activemq.core.asyncio.AIOCallback */ - public static native void read(Object thisObject, ByteBuffer handle, long position, long size, ByteBuffer buffer, Object aioPackageCallback) throws HornetQException; + public static native void read(Object thisObject, ByteBuffer handle, long position, long size, ByteBuffer buffer, Object aioPackageCallback) throws ActiveMQException; - public static native void fill(ByteBuffer handle, long position, int blocks, long size, byte fillChar) throws HornetQException; + public static native void fill(ByteBuffer handle, long position, int blocks, long size, byte fillChar) throws ActiveMQException; public static native void closeInternal(ByteBuffer handler); 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/HornetQProtonRemotingConnection.java index f8c5f51f9f..fec1eac3e0 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/HornetQProtonRemotingConnection.java @@ -15,8 +15,8 @@ package org.apache.activemq.core.protocol.proton; import java.util.concurrent.Executor; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +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.spi.core.protocol.AbstractRemotingConnection; import org.apache.activemq.spi.core.remoting.Connection; @@ -52,7 +52,7 @@ public class HornetQProtonRemotingConnection extends AbstractRemotingConnection /* * This can be called concurrently by more than one thread so needs to be locked */ - public void fail(final HornetQException me, String scaleDownTargetNodeID) + public void fail(final ActiveMQException me, String scaleDownTargetNodeID) { if (destroyed) { @@ -132,7 +132,7 @@ public class HornetQProtonRemotingConnection extends AbstractRemotingConnection } @Override - public void bufferReceived(Object connectionID, HornetQBuffer buffer) + public void bufferReceived(Object connectionID, ActiveMQBuffer buffer) { amqpConnection.inputBuffer(buffer.byteBuf()); super.bufferReceived(connectionID, buffer); 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 8fa332c02e..cf5bb9ac9b 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 @@ -16,7 +16,7 @@ package org.apache.activemq.core.protocol.proton; import java.util.concurrent.Executor; import io.netty.channel.ChannelPipeline; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.client.HornetQClient; import org.apache.activemq.core.protocol.proton.converter.ProtonMessageConverter; import org.apache.activemq.core.protocol.proton.plug.HornetQProtonConnectionCallback; @@ -94,7 +94,7 @@ public class ProtonProtocolManager implements ProtocolManager, NotificationListe } @Override - public void handleBuffer(RemotingConnection connection, HornetQBuffer buffer) + public void handleBuffer(RemotingConnection connection, ActiveMQBuffer buffer) { HornetQProtonRemotingConnection protonConnection = (HornetQProtonRemotingConnection)connection; @@ -114,7 +114,7 @@ public class ProtonProtocolManager implements ProtocolManager, NotificationListe } @Override - public void handshake(NettyServerConnection connection, HornetQBuffer buffer) + public void handshake(NettyServerConnection connection, ActiveMQBuffer buffer) { } 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 a757ca8f1b..36b9c96773 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 @@ -20,7 +20,7 @@ import java.util.Enumeration; import java.util.HashSet; import java.util.Set; -import org.apache.activemq.api.core.HornetQPropertyConversionException; +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.message.impl.MessageInternal; @@ -131,7 +131,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { TypedProperties.setObjectProperty(new SimpleString(name), value, map); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -143,7 +143,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getBooleanProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -155,7 +155,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getByteProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -167,7 +167,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getShortProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -179,7 +179,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getCharProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -191,7 +191,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getIntProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -203,7 +203,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getLongProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -215,7 +215,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getFloatProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -227,7 +227,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getDoubleProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -247,7 +247,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe return str.toString(); } } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -259,7 +259,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getBytesProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } 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 c90120f44c..ab2d2b41e2 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 @@ -20,7 +20,7 @@ import javax.jms.Message; import java.util.Collections; import java.util.Enumeration; -import org.apache.activemq.api.core.HornetQException; +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; @@ -87,7 +87,7 @@ public class ServerJMSMessage implements Message { MessageUtil.setJMSCorrelationIDAsBytes(message, correlationID); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new JMSException(e.getMessage()); } 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 fcd3debd6d..8c9ce31f21 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 @@ -17,7 +17,7 @@ import javax.jms.MessageEOFException; import javax.jms.MessageFormatException; import javax.jms.StreamMessage; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.Pair; import org.apache.activemq.core.message.impl.MessageInternal; @@ -394,7 +394,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St getBuffer().clear(); } - private HornetQBuffer getBuffer() + private ActiveMQBuffer getBuffer() { return message.getBodyBuffer(); } diff --git a/activemq-protocols/activemq-amqp-protocol/src/test/java/org/apache/activemq/core/protocol/proton/TestConversions.java b/activemq-protocols/activemq-amqp-protocol/src/test/java/org/apache/activemq/core/protocol/proton/TestConversions.java index b46a44d2cb..a03c2acb30 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/test/java/org/apache/activemq/core/protocol/proton/TestConversions.java +++ b/activemq-protocols/activemq-amqp-protocol/src/test/java/org/apache/activemq/core/protocol/proton/TestConversions.java @@ -21,6 +21,7 @@ import java.util.Map; import io.netty.buffer.ByteBuf; import io.netty.buffer.PooledByteBufAllocator; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.qpid.proton.amqp.Binary; import org.apache.qpid.proton.amqp.messaging.AmqpSequence; import org.apache.qpid.proton.amqp.messaging.AmqpValue; @@ -30,7 +31,6 @@ import org.apache.qpid.proton.jms.EncodedMessage; import org.apache.qpid.proton.message.Message; import org.apache.qpid.proton.message.ProtonJMessage; import org.apache.qpid.proton.message.impl.MessageImpl; -import org.apache.activemq.api.core.HornetQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.protocol.proton.converter.ProtonMessageConverter; @@ -260,7 +260,7 @@ public class TestConversions extends Assert } - class EmptyBuffer implements HornetQBuffer + class EmptyBuffer implements ActiveMQBuffer { @Override public ByteBuf byteBuf() @@ -407,19 +407,19 @@ public class TestConversions extends Assert } @Override - public void getBytes(int index, HornetQBuffer dst) + public void getBytes(int index, ActiveMQBuffer dst) { } @Override - public void getBytes(int index, HornetQBuffer dst, int length) + public void getBytes(int index, ActiveMQBuffer dst, int length) { } @Override - public void getBytes(int index, HornetQBuffer dst, int dstIndex, int length) + public void getBytes(int index, ActiveMQBuffer dst, int dstIndex, int length) { } @@ -485,19 +485,19 @@ public class TestConversions extends Assert } @Override - public void setBytes(int index, HornetQBuffer src) + public void setBytes(int index, ActiveMQBuffer src) { } @Override - public void setBytes(int index, HornetQBuffer src, int length) + public void setBytes(int index, ActiveMQBuffer src, int length) { } @Override - public void setBytes(int index, HornetQBuffer src, int srcIndex, int length) + public void setBytes(int index, ActiveMQBuffer src, int srcIndex, int length) { } @@ -635,31 +635,31 @@ public class TestConversions extends Assert } @Override - public HornetQBuffer readBytes(int length) + public ActiveMQBuffer readBytes(int length) { return null; } @Override - public HornetQBuffer readSlice(int length) + public ActiveMQBuffer readSlice(int length) { return null; } @Override - public void readBytes(HornetQBuffer dst) + public void readBytes(ActiveMQBuffer dst) { } @Override - public void readBytes(HornetQBuffer dst, int length) + public void readBytes(ActiveMQBuffer dst, int length) { } @Override - public void readBytes(HornetQBuffer dst, int dstIndex, int length) + public void readBytes(ActiveMQBuffer dst, int dstIndex, int length) { } @@ -767,13 +767,13 @@ public class TestConversions extends Assert } @Override - public void writeBytes(HornetQBuffer src, int length) + public void writeBytes(ActiveMQBuffer src, int length) { } @Override - public void writeBytes(HornetQBuffer src, int srcIndex, int length) + public void writeBytes(ActiveMQBuffer src, int srcIndex, int length) { } @@ -797,31 +797,31 @@ public class TestConversions extends Assert } @Override - public HornetQBuffer copy() + public ActiveMQBuffer copy() { return null; } @Override - public HornetQBuffer copy(int index, int length) + public ActiveMQBuffer copy(int index, int length) { return null; } @Override - public HornetQBuffer slice() + public ActiveMQBuffer slice() { return null; } @Override - public HornetQBuffer slice(int index, int length) + public ActiveMQBuffer slice(int index, int length) { return null; } @Override - public HornetQBuffer duplicate() + public ActiveMQBuffer duplicate() { return null; } diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/DataInputWrapper.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/DataInputWrapper.java index 6c260e9a06..87da62d514 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/DataInputWrapper.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/DataInputWrapper.java @@ -16,7 +16,7 @@ import java.io.DataInput; import java.io.IOException; import java.nio.ByteBuffer; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.utils.UTF8Util; import org.apache.activemq.utils.UTF8Util.StringUtilBuffer; @@ -66,7 +66,7 @@ public class DataInputWrapper implements DataInput internalBuffer.reset(); } - public void receiveData(HornetQBuffer buffer) + public void receiveData(ActiveMQBuffer buffer) { int newSize = buffer.readableBytes(); byte[] newData = new byte[newSize]; 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 e9b9c3aa5f..6005b3da4f 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 @@ -30,6 +30,10 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; import javax.jms.JMSSecurityException; import javax.jms.ResourceAllocationException; +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.ActiveMQSecurityException; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.BrokerInfo; @@ -75,10 +79,6 @@ import org.apache.activemq.thread.TaskRunnerFactory; import org.apache.activemq.transport.TransmitCallback; import org.apache.activemq.util.ByteSequence; import org.apache.activemq.wireformat.WireFormat; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQSecurityException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.openwire.amq.AMQBrokerStoppedException; import org.apache.activemq.core.protocol.openwire.amq.AMQConnectionContext; @@ -196,7 +196,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor } @Override - public void bufferReceived(Object connectionID, HornetQBuffer buffer) + public void bufferReceived(Object connectionID, ActiveMQBuffer buffer) { try { @@ -436,13 +436,13 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor } @Override - public HornetQBuffer createBuffer(int size) + public ActiveMQBuffer createBuffer(int size) { - return HornetQBuffers.dynamicBuffer(size); + return ActiveMQBuffers.dynamicBuffer(size); } @Override - public void fail(HornetQException me) + public void fail(ActiveMQException me) { HornetQServerLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType()); @@ -527,7 +527,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor { } - private void callFailureListeners(final HornetQException me) + private void callFailureListeners(final ActiveMQException me) { final List listenersClone = new ArrayList( failureListeners); @@ -586,7 +586,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor try { ByteSequence bytes = wireFormat.marshal(command); - HornetQBuffer buffer = OpenWireUtil.toHornetQBuffer(bytes); + ActiveMQBuffer buffer = OpenWireUtil.toHornetQBuffer(bytes); synchronized (sendLock) { getTransportConnection().write(buffer, false, false); @@ -1115,7 +1115,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor } catch (Exception e) { - if (e instanceof HornetQSecurityException) + if (e instanceof ActiveMQSecurityException) { resp = new ExceptionResponse(new JMSSecurityException(e.getMessage())); } @@ -1225,7 +1225,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor } catch (Exception e) { - if (e instanceof HornetQSecurityException) + if (e instanceof ActiveMQSecurityException) { resp = new ExceptionResponse(new JMSSecurityException(e.getMessage())); } @@ -1416,7 +1416,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor } catch (Exception e) { - if (e instanceof HornetQSecurityException) + if (e instanceof ActiveMQSecurityException) { resp = new ExceptionResponse(new JMSSecurityException(e.getMessage())); } @@ -1743,7 +1743,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor } @Override - public void fail(HornetQException e, String message) + public void fail(ActiveMQException e, String message) { destroy(); } diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireMessageConverter.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireMessageConverter.java index 74c5ce4be1..08d67ee73b 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireMessageConverter.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireMessageConverter.java @@ -24,6 +24,8 @@ import java.util.Map.Entry; import javax.jms.JMSException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQPropertyConversionException; import org.apache.activemq.command.ActiveMQBytesMessage; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQMapMessage; @@ -45,8 +47,6 @@ import org.apache.activemq.util.ByteSequence; import org.apache.activemq.util.MarshallingSupport; import org.apache.activemq.wireformat.WireFormat; import org.fusesource.hawtbuf.UTF8Buffer; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQPropertyConversionException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.openwire.amq.AMQConsumer; import org.apache.activemq.core.server.ServerMessage; @@ -118,7 +118,7 @@ public class OpenWireMessageConverter implements MessageConverter ByteSequence contents = messageSend.getContent(); if (contents != null) { - HornetQBuffer body = coreMessage.getBodyBuffer(); + ActiveMQBuffer body = coreMessage.getBodyBuffer(); switch (coreType) { case org.apache.activemq.api.core.Message.TEXT_TYPE: @@ -320,7 +320,7 @@ public class OpenWireMessageConverter implements MessageConverter { coreMessage.putObjectProperty(ent.getKey(), value); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { coreMessage.putStringProperty(ent.getKey(), value.toString()); } @@ -460,7 +460,7 @@ public class OpenWireMessageConverter implements MessageConverter } amqMsg.setBrokerInTime(brokerInTime); - HornetQBuffer buffer = coreMessage.getBodyBuffer(); + ActiveMQBuffer buffer = coreMessage.getBodyBuffer(); if (buffer != null) { buffer.resetReaderIndex(); 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 1bc5a40991..65a8d714fa 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 @@ -28,6 +28,7 @@ import javax.jms.InvalidClientIDException; import io.netty.channel.ChannelPipeline; import org.apache.activemq.advisory.AdvisorySupport; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.ActiveMQTopic; @@ -57,7 +58,6 @@ import org.apache.activemq.state.SessionState; import org.apache.activemq.util.IdGenerator; import org.apache.activemq.util.InetAddressUtil; import org.apache.activemq.util.LongSequenceGenerator; -import org.apache.activemq.api.core.HornetQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.protocol.openwire.amq.AMQConnectionContext; @@ -150,7 +150,7 @@ public class OpenWireProtocolManager implements ProtocolManager } @Override - public void handleBuffer(RemotingConnection connection, HornetQBuffer buffer) + public void handleBuffer(RemotingConnection connection, ActiveMQBuffer buffer) { } @@ -196,7 +196,7 @@ public class OpenWireProtocolManager implements ProtocolManager } @Override - public void handshake(NettyServerConnection connection, HornetQBuffer buffer) + public void handshake(NettyServerConnection connection, ActiveMQBuffer buffer) { // TODO Auto-generated method stub 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 cc5a6bb8b7..603c5c6eea 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 @@ -13,18 +13,18 @@ package org.apache.activemq.core.protocol.openwire; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.util.ByteSequence; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; import org.apache.activemq.api.core.SimpleString; public class OpenWireUtil { - public static HornetQBuffer toHornetQBuffer(ByteSequence bytes) + public static ActiveMQBuffer toHornetQBuffer(ByteSequence bytes) { - HornetQBuffer buffer = HornetQBuffers.fixedBuffer(bytes.length); + ActiveMQBuffer buffer = ActiveMQBuffers.fixedBuffer(bytes.length); buffer.writeBytes(bytes.data, bytes.offset, bytes.length); return buffer; 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 49b3450933..733faf6fe3 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 @@ -20,9 +20,9 @@ import java.util.Set; import java.util.StringTokenizer; import java.util.concurrent.CopyOnWriteArrayList; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; +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.core.protocol.stomp.v10.StompFrameHandlerV10; import org.apache.activemq.core.protocol.stomp.v12.StompFrameHandlerV12; @@ -93,7 +93,7 @@ public final class StompConnection implements RemotingConnection private int minLargeMessageSize; - public StompFrame decode(HornetQBuffer buffer) throws HornetQStompException + public StompFrame decode(ActiveMQBuffer buffer) throws HornetQStompException { StompFrame frame = null; try @@ -248,9 +248,9 @@ public final class StompConnection implements RemotingConnection } @Override - public HornetQBuffer createBuffer(int size) + public ActiveMQBuffer createBuffer(int size) { - return HornetQBuffers.dynamicBuffer(size); + return ActiveMQBuffers.dynamicBuffer(size); } public void destroy() @@ -285,7 +285,7 @@ public final class StompConnection implements RemotingConnection manager.cleanup(this); } - public void fail(final HornetQException me) + public void fail(final ActiveMQException me) { synchronized (failLock) { @@ -306,7 +306,7 @@ public final class StompConnection implements RemotingConnection internalClose(); } - public void fail(final HornetQException me, String scaleDownTargetNodeID) + public void fail(final ActiveMQException me, String scaleDownTargetNodeID) { fail(me); } @@ -352,7 +352,7 @@ public final class StompConnection implements RemotingConnection return destroyed; } - public void bufferReceived(Object connectionID, HornetQBuffer buffer) + public void bufferReceived(Object connectionID, ActiveMQBuffer buffer) { manager.handleBuffer(this, buffer); } @@ -387,7 +387,7 @@ public final class StompConnection implements RemotingConnection this.valid = valid; } - private void callFailureListeners(final HornetQException me) + private void callFailureListeners(final ActiveMQException me) { final List listenersClone = new ArrayList(failureListeners); @@ -792,7 +792,7 @@ public final class StompConnection implements RemotingConnection public void physicalSend(StompFrame frame) throws Exception { - HornetQBuffer buffer = frame.toHornetQBuffer(); + ActiveMQBuffer buffer = frame.toHornetQBuffer(); 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 fbeb2082d2..e7d15c228b 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 @@ -15,7 +15,7 @@ package org.apache.activemq.core.protocol.stomp; import java.util.HashMap; import java.util.Map; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE; @@ -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 HornetQBuffer buffer) throws HornetQStompException + public synchronized StompFrame decode(final ActiveMQBuffer buffer) throws HornetQStompException { int readable = buffer.readableBytes(); 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 5e978bf381..46aa639c19 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 @@ -17,8 +17,8 @@ import java.util.Arrays; import java.util.LinkedHashMap; import java.util.Map; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; /** * Represents all the data in a STOMP frame. @@ -38,7 +38,7 @@ public class StompFrame protected byte[] bytesBody; - protected HornetQBuffer buffer = null; + protected ActiveMQBuffer buffer = null; protected int size; @@ -97,17 +97,17 @@ public class StompFrame isPing = ping; } - public HornetQBuffer toHornetQBuffer() throws Exception + public ActiveMQBuffer toHornetQBuffer() throws Exception { if (buffer == null) { if (bytesBody != null) { - buffer = HornetQBuffers.dynamicBuffer(bytesBody.length + 512); + buffer = ActiveMQBuffers.dynamicBuffer(bytesBody.length + 512); } else { - buffer = HornetQBuffers.dynamicBuffer(512); + buffer = ActiveMQBuffers.dynamicBuffer(512); } if (isPing()) 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 afbf0c2bc4..9e1a0b4200 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 @@ -23,8 +23,8 @@ import java.util.concurrent.Executor; import io.netty.channel.ChannelPipeline; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQExceptionType; +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; @@ -137,7 +137,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener { } - public void handleBuffer(final RemotingConnection connection, final HornetQBuffer buffer) + public void handleBuffer(final RemotingConnection connection, final ActiveMQBuffer buffer) { StompConnection conn = (StompConnection) connection; @@ -185,7 +185,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener } @Override - public void handshake(NettyServerConnection connection, HornetQBuffer buffer) + public void handshake(NettyServerConnection connection, ActiveMQBuffer buffer) { //Todo move handshake to here } @@ -333,7 +333,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener HornetQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage); HornetQStompException e = new HornetQStompException("Error sending reply", - HornetQExceptionType.createException(errorCode, errorMessage)); + ActiveMQExceptionType.createException(errorCode, errorMessage)); StompFrame error = e.getFrame(); send(connection, error); 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 cdc0b3ff0a..30baf5647f 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 @@ -18,7 +18,7 @@ import java.util.Map.Entry; import java.util.concurrent.ConcurrentHashMap; import java.util.zip.Inflater; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; @@ -127,7 +127,7 @@ public class StompSession implements SessionCallback if (serverMessage.getBooleanProperty(Message.HDR_LARGE_COMPRESSED)) { //decompress - HornetQBuffer qbuff = newServerMessage.getBodyBuffer(); + ActiveMQBuffer qbuff = newServerMessage.getBodyBuffer(); int bytesToRead = qbuff.writerIndex() - MessageImpl.BODY_OFFSET; Inflater inflater = new Inflater(); inflater.setInput(qbuff.readBytes(bytesToRead).toByteBuffer().array()); 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 93a7c06df8..8057a18db3 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 @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.stomp; import java.nio.charset.StandardCharsets; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.message.impl.MessageImpl; @@ -58,7 +58,7 @@ public abstract class VersionedStompFrameHandler this.connection = connection; } - public StompFrame decode(HornetQBuffer buffer) throws HornetQStompException + public StompFrame decode(ActiveMQBuffer buffer) throws HornetQStompException { return decoder.decode(buffer); } @@ -349,7 +349,7 @@ public abstract class VersionedStompFrameHandler subscription.getID()); } - HornetQBuffer buffer = serverMessage.getBodyBufferCopy(); + ActiveMQBuffer buffer = serverMessage.getBodyBufferCopy(); int bodyPos = serverMessage.getEndOfBodyPosition() == -1 ? buffer .writerIndex() : serverMessage.getEndOfBodyPosition(); 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 e7e67b218a..2fef54e125 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 @@ -17,8 +17,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.core.protocol.stomp.Stomp; import org.apache.activemq.core.protocol.stomp.StompFrame; @@ -43,17 +43,17 @@ public class StompFrameV11 extends StompFrame } @Override - public HornetQBuffer toHornetQBuffer() throws Exception + public ActiveMQBuffer toHornetQBuffer() throws Exception { if (buffer == null) { if (bytesBody != null) { - buffer = HornetQBuffers.dynamicBuffer(bytesBody.length + 512); + buffer = ActiveMQBuffers.dynamicBuffer(bytesBody.length + 512); } else { - buffer = HornetQBuffers.dynamicBuffer(512); + buffer = ActiveMQBuffers.dynamicBuffer(512); } StringBuffer head = new StringBuffer(); 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 2f96e05d92..675423287c 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 @@ -17,8 +17,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.core.protocol.stomp.Stomp; import org.apache.activemq.core.protocol.stomp.StompFrame; @@ -43,17 +43,17 @@ public class StompFrameV12 extends StompFrame } @Override - public HornetQBuffer toHornetQBuffer() throws Exception + public ActiveMQBuffer toHornetQBuffer() throws Exception { if (buffer == null) { if (bytesBody != null) { - buffer = HornetQBuffers.dynamicBuffer(bytesBody.length + 512); + buffer = ActiveMQBuffers.dynamicBuffer(bytesBody.length + 512); } else { - buffer = HornetQBuffers.dynamicBuffer(512); + buffer = ActiveMQBuffers.dynamicBuffer(512); } StringBuffer head = new StringBuffer(); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRABundle.java b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRABundle.java index a88246955f..79979b7486 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRABundle.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRABundle.java @@ -13,7 +13,7 @@ package org.apache.activemq.ra; -import org.apache.activemq.api.core.HornetQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.Message; import org.jboss.logging.annotations.MessageBundle; @@ -42,7 +42,7 @@ public interface HornetQRABundle HornetQRABundle BUNDLE = Messages.getBundle(HornetQRABundle.class); @Message(id = 159000, value = "Error decoding password using codec instance", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException errorDecodingPassword(@Cause Exception e); + ActiveMQIllegalStateException errorDecodingPassword(@Cause Exception e); @Message(id = 159001, value = "MDB cannot be deployed as it has no Activation Spec. Please provide an Activation!", format = Message.Format.MESSAGE_FORMAT) NotSupportedException noActivationSpec(); diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAProperties.java b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAProperties.java index 1371069637..c0f1d9b178 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAProperties.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAProperties.java @@ -15,7 +15,7 @@ package org.apache.activemq.ra; import java.io.Serializable; import java.util.Hashtable; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.utils.DefaultSensitiveStringCodec; import org.apache.activemq.utils.PasswordMaskingUtil; import org.apache.activemq.utils.SensitiveDataCodec; @@ -300,7 +300,7 @@ public class HornetQRAProperties extends ConnectionFactoryProperties implements ", userName=" + userName + ", password=****]"; } - public synchronized void init() throws HornetQException + public synchronized void init() throws ActiveMQException { if (initialized) return; diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAXAResource.java b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAXAResource.java index fb9e51c776..773d065431 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAXAResource.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAXAResource.java @@ -16,7 +16,7 @@ import javax.transaction.xa.XAException; import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.client.impl.ClientSessionInternal; import org.apache.activemq.core.client.impl.HornetQXAResource; @@ -74,7 +74,7 @@ public class HornetQRAXAResource implements HornetQXAResource //this resets any tx stuff, we assume here that the tm and jca layer are well behaved when it comes to this sessionInternal.resetIfNeeded(); } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQRALogger.LOGGER.problemResettingXASession(); } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQResourceAdapter.java b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQResourceAdapter.java index 23a3b037cc..508c53347d 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQResourceAdapter.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQResourceAdapter.java @@ -34,9 +34,9 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.BroadcastEndpointFactoryConfiguration; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.JGroupsBroadcastGroupConfiguration; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration; @@ -161,7 +161,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable { setup(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new ResourceException("Unable to create activation", e); } @@ -255,7 +255,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable { setup(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new ResourceAdapterInternalException("Unable to create activation", e); } @@ -1777,7 +1777,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable /** * Setup the factory */ - protected void setup() throws HornetQException + protected void setup() throws ActiveMQException { raProperties.init(); defaultHornetQConnectionFactory = createHornetQConnectionFactory(raProperties); @@ -1798,7 +1798,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable { setup(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new ResourceException("Unable to create activation", e); } 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/HornetQActivation.java index 5cf31ebcd5..8bf12b67ca 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/HornetQActivation.java @@ -29,10 +29,10 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQNonExistentQueueException; -import org.apache.activemq.api.core.HornetQNotConnectedException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; +import org.apache.activemq.api.core.ActiveMQNonExistentQueueException; +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; @@ -723,11 +723,11 @@ public class HornetQActivation */ public void handleFailure(Throwable failure) { - if (failure instanceof HornetQException && ((HornetQException) failure).getType() == HornetQExceptionType.QUEUE_DOES_NOT_EXIST) + if (failure instanceof ActiveMQException && ((ActiveMQException) failure).getType() == ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST) { HornetQRALogger.LOGGER.awaitingTopicQueueCreation(getActivationSpec().getDestination()); } - else if (failure instanceof HornetQException && ((HornetQException) failure).getType() == HornetQExceptionType.NOT_CONNECTED) + else if (failure instanceof ActiveMQException && ((ActiveMQException) failure).getType() == ActiveMQExceptionType.NOT_CONNECTED) { HornetQRALogger.LOGGER.awaitingJMSServerCreation(); } @@ -771,17 +771,17 @@ public class HornetQActivation } catch (Throwable t) { - if (failure instanceof HornetQException && ((HornetQException) failure).getType() == HornetQExceptionType.QUEUE_DOES_NOT_EXIST) + if (failure instanceof ActiveMQException && ((ActiveMQException) failure).getType() == ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST) { - if (lastException == null || !(t instanceof HornetQNonExistentQueueException)) + if (lastException == null || !(t instanceof ActiveMQNonExistentQueueException)) { lastException = t; HornetQRALogger.LOGGER.awaitingTopicQueueCreation(getActivationSpec().getDestination()); } } - else if (failure instanceof HornetQException && ((HornetQException) failure).getType() == HornetQExceptionType.NOT_CONNECTED) + else if (failure instanceof ActiveMQException && ((ActiveMQException) failure).getType() == ActiveMQExceptionType.NOT_CONNECTED) { - if (lastException == null || !(t instanceof HornetQNotConnectedException)) + if (lastException == null || !(t instanceof ActiveMQNotConnectedException)) { lastException = t; HornetQRALogger.LOGGER.awaitingJMSServerCreation(); 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/HornetQMessageHandler.java index dc8efa004c..45933fc3ad 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/HornetQMessageHandler.java @@ -21,7 +21,7 @@ import javax.transaction.TransactionManager; import javax.transaction.xa.XAResource; import java.util.UUID; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession.QueueQuery; @@ -375,7 +375,7 @@ public class HornetQMessageHandler implements MessageHandler { session.rollback(); } - catch (HornetQException e2) + catch (ActiveMQException e2) { HornetQRALogger.LOGGER.warn("Unable to rollback", e2); return; @@ -403,7 +403,7 @@ public class HornetQMessageHandler implements MessageHandler { session.rollback(true); } - catch (HornetQException e1) + catch (ActiveMQException e1) { HornetQRALogger.LOGGER.unableToRollbackTX(); } @@ -415,7 +415,7 @@ public class HornetQMessageHandler implements MessageHandler { session.resetIfNeeded(); } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQRALogger.LOGGER.unableToResetSession(); } @@ -423,7 +423,7 @@ public class HornetQMessageHandler implements MessageHandler } - public void start() throws HornetQException + public void start() throws ActiveMQException { session.start(); } diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/HornetQRestLogger.java b/activemq-rest/src/main/java/org/apache/activemq/rest/HornetQRestLogger.java index 49f8db0c6d..c706deb7dd 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/HornetQRestLogger.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/HornetQRestLogger.java @@ -13,7 +13,7 @@ package org.apache.activemq.rest; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.rest.queue.push.xml.XmlLink; import org.jboss.logging.BasicLogger; import org.jboss.logging.Logger; @@ -81,5 +81,5 @@ public interface HornetQRestLogger extends BasicLogger @LogMessage(level = Logger.Level.ERROR) @Message(id = 184003, value = "Error deleting Subscriber queue", format = Message.Format.MESSAGE_FORMAT) - void errorDeletingSubscriberQueue(@Cause HornetQException e); + void errorDeletingSubscriberQueue(@Cause ActiveMQException e); } 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 d7a07121f1..c3cefd50d4 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 @@ -25,7 +25,7 @@ import javax.ws.rs.core.UriBuilder; import javax.ws.rs.core.UriInfo; import java.net.URI; -import org.apache.activemq.api.core.HornetQException; +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.ClientSession; @@ -44,7 +44,7 @@ public class AcknowledgedQueueConsumer extends QueueConsumer protected String startup = Long.toString(System.currentTimeMillis()); protected volatile Acknowledgement ack; - public AcknowledgedQueueConsumer(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector) throws HornetQException + public AcknowledgedQueueConsumer(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector) throws ActiveMQException { super(factory, destination, id, serviceManager, selector); autoAck = false; @@ -153,7 +153,7 @@ public class AcknowledgedQueueConsumer extends QueueConsumer //System.out.println("Acknowledge message: " + ack.getMessage()); ack.getMessage().acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new RuntimeException(e); } @@ -217,14 +217,14 @@ public class AcknowledgedQueueConsumer extends QueueConsumer { old.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { } try { oldSession.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { } } 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 775285d7af..9ad454667f 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 @@ -28,7 +28,7 @@ import javax.ws.rs.core.UriInfo; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.api.core.HornetQException; +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.util.TimeoutTask; @@ -177,7 +177,7 @@ public class ConsumersResource implements TimeoutTask.Callback return builder.build(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new RuntimeException(e); } @@ -192,7 +192,7 @@ public class ConsumersResource implements TimeoutTask.Callback serviceManager.getTimeoutTask().add(this, consumer.getId()); } - public QueueConsumer createConsumer(String selector) throws HornetQException + public QueueConsumer createConsumer(String selector) throws ActiveMQException { String genId = sessionCounter.getAndIncrement() + "-queue-" + destination + "-" + startup; QueueConsumer consumer = new QueueConsumer(sessionFactory, destination, genId, serviceManager, selector); @@ -200,7 +200,7 @@ public class ConsumersResource implements TimeoutTask.Callback return consumer; } - public QueueConsumer createAcknowledgedConsumer(String selector) throws HornetQException + public QueueConsumer createAcknowledgedConsumer(String selector) throws ActiveMQException { String genId = sessionCounter.getAndIncrement() + "-queue-" + destination + "-" + startup; QueueConsumer consumer = new AcknowledgedQueueConsumer(sessionFactory, destination, genId, serviceManager, selector); 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 3d6de80183..45e8effa5d 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 @@ -28,7 +28,7 @@ import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; @@ -94,7 +94,7 @@ public class PostMessage { pooled.session.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { } addPooled(); @@ -227,7 +227,7 @@ public class PostMessage } } - protected void addPooled() throws HornetQException + protected void addPooled() throws ActiveMQException { ClientSession session = sessionFactory.createSession(); ClientProducer producer = session.createProducer(destination); @@ -253,7 +253,7 @@ public class PostMessage { pooled.session.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new RuntimeException(e); } 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 dc61f08f3a..60fa2b7905 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.rest.queue; -import org.apache.activemq.api.core.HornetQException; +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; @@ -56,7 +56,7 @@ public class PostMessageDupsOk extends PostMessage { pooled.session.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { } addPooled(); 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 594928911a..618c57458f 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 @@ -24,7 +24,7 @@ import javax.ws.rs.core.UriBuilder; import javax.ws.rs.core.UriInfo; import java.net.URI; -import org.apache.activemq.api.core.HornetQException; +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.ClientSession; @@ -84,7 +84,7 @@ public class QueueConsumer lastPing = System.currentTimeMillis() + (offsetSecs * 1000); } - public QueueConsumer(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector) throws HornetQException + public QueueConsumer(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector) throws ActiveMQException { this.factory = factory; this.destination = destination; @@ -210,7 +210,7 @@ public class QueueConsumer } } - protected void createSession() throws HornetQException + protected void createSession() throws ActiveMQException { session = factory.createSession(true, true, 0); HornetQRestLogger.LOGGER.debug("Created session: " + session); 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 1d4c6f9f47..7de0945ee4 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 @@ -25,7 +25,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import org.apache.activemq.api.core.HornetQException; +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; @@ -145,7 +145,7 @@ public class QueueDestinationsResource { session.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { } } 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 6adf0c0587..b8671a4390 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.rest.queue.push; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; @@ -124,7 +124,7 @@ public class PushConsumer session.close(); } } - catch (HornetQException e) + catch (ActiveMQException e) { } 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 da19085209..04961ec3ed 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.rest.queue.push; -import org.apache.activemq.api.core.HornetQException; +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; @@ -39,7 +39,7 @@ public class PushConsumerMessageHandler implements MessageHandler clientMessage.acknowledge(); HornetQRestLogger.LOGGER.debug(this + ": acknowledged " + clientMessage); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new RuntimeException(e.getMessage(), e); } @@ -55,7 +55,7 @@ public class PushConsumerMessageHandler implements MessageHandler session.commit(); return; } - catch (HornetQException e) + catch (ActiveMQException e) { throw new RuntimeException(e); } @@ -66,7 +66,7 @@ public class PushConsumerMessageHandler implements MessageHandler { session.rollback(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new RuntimeException(e.getMessage(), e); } diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/AcknowledgedSubscriptionResource.java b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/AcknowledgedSubscriptionResource.java index 3a80a257b6..e8b8fc4888 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/AcknowledgedSubscriptionResource.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/AcknowledgedSubscriptionResource.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.rest.topic; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.rest.queue.AcknowledgedQueueConsumer; import org.apache.activemq.rest.queue.DestinationServiceManager; @@ -27,7 +27,7 @@ public class AcknowledgedSubscriptionResource extends AcknowledgedQueueConsumer private long timeout; private boolean deleteWhenIdle; - public AcknowledgedSubscriptionResource(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector, boolean durable, Long timeout) throws HornetQException + public AcknowledgedSubscriptionResource(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector, boolean durable, Long timeout) throws ActiveMQException { super(factory, destination, id, serviceManager, selector); this.timeout = timeout; 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 4787c016e0..82c17e2ff8 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.rest.topic; -import org.apache.activemq.api.core.HornetQException; +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; @@ -48,7 +48,7 @@ public class PushSubscription extends PushConsumer session.deleteQueue(subscriptionName); } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQRestLogger.LOGGER.errorDeletingSubscriberQueue(e); } @@ -59,7 +59,7 @@ public class PushSubscription extends PushConsumer if (session != null) session.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { } } 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 7015e6597d..d97e010c56 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.rest.topic; -import org.apache.activemq.api.core.HornetQException; +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; @@ -86,7 +86,7 @@ public class PushSubscriptionsResource } return session; } - catch (HornetQException e) + catch (ActiveMQException e) { throw new RuntimeException(e); } @@ -131,7 +131,7 @@ public class PushSubscriptionsResource { createSession.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { } } @@ -246,7 +246,7 @@ public class PushSubscriptionsResource session.deleteQueue(subscriptionName); } - catch (HornetQException e) + catch (ActiveMQException e) { } finally diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/SubscriptionResource.java b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/SubscriptionResource.java index 7051057cf9..5ecb410583 100644 --- a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/SubscriptionResource.java +++ b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/SubscriptionResource.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.rest.topic; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.rest.queue.DestinationServiceManager; import org.apache.activemq.rest.queue.QueueConsumer; @@ -27,7 +27,7 @@ public class SubscriptionResource extends QueueConsumer implements Subscription protected long timeout; private boolean deleteWhenIdle; - public SubscriptionResource(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector, boolean durable, long timeout) throws HornetQException + public SubscriptionResource(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector, boolean durable, long timeout) throws ActiveMQException { super(factory, destination, id, serviceManager, selector); this.durable = durable; 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 7f85fbc4cf..a501e294de 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 @@ -28,7 +28,7 @@ import javax.ws.rs.core.UriInfo; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.api.core.HornetQException; +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; @@ -245,7 +245,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback return builder.build(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new RuntimeException(e); } @@ -257,14 +257,14 @@ public class SubscriptionsResource implements TimeoutTask.Callback { session.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { } } } } - protected QueueConsumer createConsumer(boolean durable, boolean autoAck, String subscriptionName, String selector, long timeout, boolean deleteWhenIdle) throws HornetQException + protected QueueConsumer createConsumer(boolean durable, boolean autoAck, String subscriptionName, String selector, long timeout, boolean deleteWhenIdle) throws ActiveMQException { QueueConsumer consumer; if (autoAck) @@ -403,7 +403,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback ClientSession.QueueQuery query = session.queueQuery(new SimpleString(subscriptionId)); return query.isExists(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new RuntimeException(e); } @@ -415,7 +415,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback { session.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { } } @@ -432,7 +432,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback { tmp = createConsumer(true, autoAck, subscriptionId, null, consumerTimeoutSeconds * 1000, false); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new RuntimeException(e); } @@ -499,7 +499,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback session.deleteQueue(subscriptionName); } - catch (HornetQException e) + catch (ActiveMQException e) { } finally @@ -510,7 +510,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback { session.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { } } 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 ed769dc3f3..8a0168a2db 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 @@ -25,7 +25,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import org.apache.activemq.api.core.HornetQException; +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; @@ -135,7 +135,7 @@ public class TopicDestinationsResource { session.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { } } 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 10eeedffe9..056211d9d3 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.config; -import org.apache.activemq.api.core.HornetQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; import org.apache.activemq.core.config.ha.ColocatedPolicyConfiguration; import org.apache.activemq.core.config.ha.LiveOnlyPolicyConfiguration; import org.apache.activemq.core.config.ha.ReplicaPolicyConfiguration; @@ -38,7 +38,7 @@ public final class ConfigurationUtils // Utility class } - public static ClusterConnectionConfiguration getReplicationClusterConfiguration(Configuration conf, String replicationCluster) throws HornetQIllegalStateException + public static ClusterConnectionConfiguration getReplicationClusterConfiguration(Configuration conf, String replicationCluster) throws ActiveMQIllegalStateException { if (replicationCluster == null || replicationCluster.isEmpty()) return conf.getClusterConfigurations().get(0); @@ -47,10 +47,10 @@ public final class ConfigurationUtils if (replicationCluster.equals(clusterConf.getName())) return clusterConf; } - throw new HornetQIllegalStateException("Missing cluster-configuration for replication-clustername '" + replicationCluster + "'."); + throw new ActiveMQIllegalStateException("Missing cluster-configuration for replication-clustername '" + replicationCluster + "'."); } - public static HAPolicy getHAPolicy(HAPolicyConfiguration conf) throws HornetQIllegalStateException + public static HAPolicy getHAPolicy(HAPolicyConfiguration conf) throws ActiveMQIllegalStateException { if (conf == null) { 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 a05dccac41..87c47240fb 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 @@ -22,7 +22,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.apache.activemq.api.core.HornetQException; +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; @@ -298,7 +298,7 @@ public abstract class XmlDeployer implements Deployer return !newTextContent.equals(origTextContent); } - private String getName(Node node) throws HornetQException + private String getName(Node node) throws ActiveMQException { String name; @@ -315,7 +315,7 @@ public abstract class XmlDeployer implements Deployer } catch (NullPointerException e) { - throw new HornetQException("Could not find " + getKeyAttribute() + " in " + XMLUtil.elementToString(node)); + throw new ActiveMQException("Could not find " + getKeyAttribute() + " in " + XMLUtil.elementToString(node)); } } else 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 cf14c7b84e..ac2df63f92 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 @@ -12,12 +12,12 @@ */ package org.apache.activemq.core.filter.impl; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.selector.filter.BooleanExpression; import org.apache.activemq.selector.filter.FilterException; import org.apache.activemq.selector.filter.Filterable; import org.apache.activemq.selector.SelectorParser; import org.apache.activemq.api.core.FilterConstants; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.filter.Filter; import org.apache.activemq.core.server.HornetQMessageBundle; @@ -68,18 +68,18 @@ public class FilterImpl implements Filter /** * @return null if filterStr is null or an empty String and a valid filter else - * @throws HornetQException if the string does not correspond to a valid filter + * @throws org.apache.activemq.api.core.ActiveMQException if the string does not correspond to a valid filter */ - public static Filter createFilter(final String filterStr) throws HornetQException + public static Filter createFilter(final String filterStr) throws ActiveMQException { return FilterImpl.createFilter(SimpleString.toSimpleString(filterStr == null ? null : filterStr.trim())); } /** * @return null if filterStr is null or an empty String and a valid filter else - * @throws HornetQException if the string does not correspond to a valid filter + * @throws org.apache.activemq.api.core.ActiveMQException if the string does not correspond to a valid filter */ - public static Filter createFilter(final SimpleString filterStr) throws HornetQException + public static Filter createFilter(final SimpleString filterStr) throws ActiveMQException { if (filterStr == null || filterStr.length() == 0) { 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 ec8f38bf44..d021712108 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 @@ -19,7 +19,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.management.MessageCounterInfo; @@ -506,7 +506,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl iterator.close(); } } - catch (HornetQException e) + catch (ActiveMQException e) { throw new IllegalStateException(e.getMessage()); } @@ -613,7 +613,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { return queue.deleteReference(messageID); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new IllegalStateException(e.getMessage()); } @@ -670,7 +670,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl Filter filter = FilterImpl.createFilter(filterStr); return queue.expireReferences(filter); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new IllegalStateException(e.getMessage()); } 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 4f0dd1c300..883ef3b881 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 @@ -18,8 +18,8 @@ import java.util.List; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.journal.SequentialFileFactory; @@ -116,7 +116,7 @@ public final class Page implements Comparable size.set((int) file.size()); // Using direct buffer, as described on https://jira.jboss.org/browse/HORNETQ-467 ByteBuffer directBuffer = storage.allocateDirectBuffer((int) file.size()); - HornetQBuffer fileBuffer = null; + ActiveMQBuffer fileBuffer = null; try { @@ -125,7 +125,7 @@ public final class Page implements Comparable directBuffer.rewind(); - fileBuffer = HornetQBuffers.wrappedBuffer(directBuffer); + fileBuffer = ActiveMQBuffers.wrappedBuffer(directBuffer); fileBuffer.writerIndex(fileBuffer.capacity()); while (fileBuffer.readable()) @@ -198,7 +198,7 @@ public final class Page implements Comparable ByteBuffer buffer = fileFactory.newBuffer(message.getEncodeSize() + Page.SIZE_RECORD); - HornetQBuffer wrap = HornetQBuffers.wrappedBuffer(buffer); + ActiveMQBuffer wrap = ActiveMQBuffers.wrappedBuffer(buffer); wrap.clear(); wrap.writeByte(Page.START_BYTE); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PageSyncTimer.java b/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PageSyncTimer.java index e6e8d1edd6..e1d3eea36a 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PageSyncTimer.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PageSyncTimer.java @@ -17,7 +17,7 @@ import java.util.List; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.core.paging.PagingStore; import org.apache.activemq.core.persistence.OperationContext; @@ -97,7 +97,7 @@ final class PageSyncTimer { for (OperationContext ctx : pendingSyncsArray) { - ctx.onError(HornetQExceptionType.IO_ERROR.getCode(), e.getMessage()); + ctx.onError(ActiveMQExceptionType.IO_ERROR.getCode(), e.getMessage()); } } finally 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 172d919b84..dd172db65e 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 @@ -18,7 +18,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Pair; import org.apache.activemq.core.paging.PageTransactionInfo; import org.apache.activemq.core.paging.PagingManager; @@ -118,7 +118,7 @@ public final class PageTransactionInfoImpl implements PageTransactionInfo // EncodingSupport implementation - public synchronized void decode(final HornetQBuffer buffer) + public synchronized void decode(final ActiveMQBuffer buffer) { transactionID = buffer.readLong(); numberOfMessages.set(buffer.readInt()); @@ -126,7 +126,7 @@ public final class PageTransactionInfoImpl implements PageTransactionInfo committed = true; } - public synchronized void encode(final HornetQBuffer buffer) + public synchronized void encode(final ActiveMQBuffer buffer) { buffer.writeLong(transactionID); buffer.writeInt(numberOfPersistentMessages.get()); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagedMessageImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagedMessageImpl.java index a7c8b3f052..803a3018b0 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagedMessageImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/paging/impl/PagedMessageImpl.java @@ -14,8 +14,8 @@ package org.apache.activemq.core.paging.impl; import java.util.Arrays; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.core.paging.PagedMessage; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.server.LargeServerMessage; @@ -69,7 +69,7 @@ public class PagedMessageImpl implements PagedMessage if (largeMessageLazyData != null) { LargeServerMessage lgMessage = storage.createLargeMessage(); - HornetQBuffer buffer = HornetQBuffers.dynamicBuffer(largeMessageLazyData); + ActiveMQBuffer buffer = ActiveMQBuffers.dynamicBuffer(largeMessageLazyData); lgMessage.decodeHeadersAndProperties(buffer); lgMessage.incrementDelayDeletionCount(); lgMessage.setPaged(); @@ -90,7 +90,7 @@ public class PagedMessageImpl implements PagedMessage // EncodingSupport implementation -------------------------------- - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { transactionID = buffer.readLong(); @@ -123,7 +123,7 @@ public class PagedMessageImpl implements PagedMessage } } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeLong(transactionID); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/persistence/config/PersistedAddressSetting.java b/activemq-server/src/main/java/org/apache/activemq/core/persistence/config/PersistedAddressSetting.java index 374cbefb04..60dbb1131d 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/persistence/config/PersistedAddressSetting.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/persistence/config/PersistedAddressSetting.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.persistence.config; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.settings.impl.AddressSettings; @@ -97,7 +97,7 @@ public class PersistedAddressSetting implements EncodingSupport } @Override - public void decode(HornetQBuffer buffer) + public void decode(ActiveMQBuffer buffer) { addressMatch = buffer.readSimpleString(); @@ -106,7 +106,7 @@ public class PersistedAddressSetting implements EncodingSupport } @Override - public void encode(HornetQBuffer buffer) + public void encode(ActiveMQBuffer buffer) { buffer.writeSimpleString(addressMatch); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/persistence/config/PersistedRoles.java b/activemq-server/src/main/java/org/apache/activemq/core/persistence/config/PersistedRoles.java index 302b031c57..63aa578e4e 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/persistence/config/PersistedRoles.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/persistence/config/PersistedRoles.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.persistence.config; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.journal.EncodingSupport; @@ -164,7 +164,7 @@ public class PersistedRoles implements EncodingSupport } @Override - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeSimpleString(addressMatch); buffer.writeNullableSimpleString(sendRoles); @@ -190,7 +190,7 @@ public class PersistedRoles implements EncodingSupport } @Override - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { addressMatch = buffer.readSimpleString(); sendRoles = buffer.readNullableSimpleString(); 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 c3859a689a..07d6121c4c 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 @@ -14,7 +14,7 @@ package org.apache.activemq.core.persistence.impl.journal; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.api.core.HornetQBuffer; +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; @@ -56,7 +56,7 @@ public final class BatchingIDGenerator implements IDGenerator storeID(recordID, recordID); } - public void loadState(final long journalID, final HornetQBuffer buffer) + public void loadState(final long journalID, final ActiveMQBuffer buffer) { IDCounterEncoding encoding = new IDCounterEncoding(); @@ -131,12 +131,12 @@ public final class BatchingIDGenerator implements IDGenerator { } - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { id = buffer.readLong(); } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeLong(id); } 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 df660ae477..836b2be645 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 @@ -19,8 +19,8 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.Message; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.journal.EncodingSupport; @@ -455,7 +455,7 @@ public final class DescribeJournal { try { - return XidCodecSupport.decodeXid(HornetQBuffers.wrappedBuffer(data)); + return XidCodecSupport.decodeXid(ActiveMQBuffers.wrappedBuffer(data)); } catch (Exception e) { @@ -470,7 +470,7 @@ public final class DescribeJournal public static Object newObjectEncoding(RecordInfo info, JournalStorageManager storageManager) { - HornetQBuffer buffer = HornetQBuffers.wrappedBuffer(info.data); + ActiveMQBuffer buffer = ActiveMQBuffers.wrappedBuffer(info.data); long id = info.id; int rec = info.getUserRecordType(); 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 a170934936..039eca2ba8 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 @@ -41,11 +41,11 @@ import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.ReentrantReadWriteLock; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQIllegalStateException; -import org.apache.activemq.api.core.HornetQInternalErrorException; +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.ActiveMQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQInternalErrorException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; @@ -356,7 +356,7 @@ public class JournalStorageManager implements StorageManager * * @param replicationManager * @param pagingManager - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ @Override public void startReplication(ReplicationManager replicationManager, PagingManager pagingManager, String nodeID, @@ -393,7 +393,7 @@ public class JournalStorageManager implements StorageManager try { if (isReplicated()) - throw new HornetQIllegalStateException("already replicating"); + throw new ActiveMQIllegalStateException("already replicating"); replicator = replicationManager; // Establishes lock @@ -1562,7 +1562,7 @@ public class JournalStorageManager implements StorageManager RecordInfo record = records.get(reccount); byte[] data = record.data; - HornetQBuffer buff = HornetQBuffers.wrappedBuffer(data); + ActiveMQBuffer buff = ActiveMQBuffers.wrappedBuffer(data); byte recordType = record.getUserRecordType(); @@ -2160,7 +2160,7 @@ public class JournalStorageManager implements StorageManager { long id = record.id; - HornetQBuffer buffer = HornetQBuffers.wrappedBuffer(record.data); + ActiveMQBuffer buffer = ActiveMQBuffers.wrappedBuffer(record.data); byte rec = record.getUserRecordType(); @@ -2398,7 +2398,7 @@ public class JournalStorageManager implements StorageManager } // This should be accessed from this package only - void deleteLargeMessageFile(final LargeServerMessage largeServerMessage) throws HornetQException + void deleteLargeMessageFile(final LargeServerMessage largeServerMessage) throws ActiveMQException { if (largeServerMessage.getPendingRecordID() < 0) { @@ -2412,7 +2412,7 @@ public class JournalStorageManager implements StorageManager } catch (Exception e) { - throw new HornetQInternalErrorException(e.getMessage(), e); + throw new ActiveMQInternalErrorException(e.getMessage(), e); } } final SequentialFile file = largeServerMessage.getFile(); @@ -2529,7 +2529,7 @@ public class JournalStorageManager implements StorageManager * @return * @throws Exception */ - private LargeServerMessage parseLargeMessage(final Map messages, final HornetQBuffer buff) throws Exception + private LargeServerMessage parseLargeMessage(final Map messages, final ActiveMQBuffer buff) throws Exception { LargeServerMessage largeMessage = createLargeMessage(); @@ -2590,7 +2590,7 @@ public class JournalStorageManager implements StorageManager { byte[] data = record.data; - HornetQBuffer buff = HornetQBuffers.wrappedBuffer(data); + ActiveMQBuffer buff = ActiveMQBuffers.wrappedBuffer(data); byte recordType = record.getUserRecordType(); @@ -2756,7 +2756,7 @@ public class JournalStorageManager implements StorageManager if (data.length > 0) { - HornetQBuffer buff = HornetQBuffers.wrappedBuffer(data); + ActiveMQBuffer buff = ActiveMQBuffers.wrappedBuffer(data); byte b = buff.readByte(); switch (b) @@ -2891,15 +2891,15 @@ public class JournalStorageManager implements StorageManager XidEncoding(final byte[] data) { - xid = XidCodecSupport.decodeXid(HornetQBuffers.wrappedBuffer(data)); + xid = XidCodecSupport.decodeXid(ActiveMQBuffers.wrappedBuffer(data)); } - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { throw new IllegalStateException("Non Supported Operation"); } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { XidCodecSupport.encodeXid(xid, buffer); } @@ -2932,13 +2932,13 @@ public class JournalStorageManager implements StorageManager { } - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { xid = XidCodecSupport.decodeXid(buffer); isCommit = buffer.readBoolean(); } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { XidCodecSupport.encodeXid(xid, buffer); buffer.writeBoolean(isCommit); @@ -2974,13 +2974,13 @@ public class JournalStorageManager implements StorageManager return SimpleString.sizeofString(groupId) + SimpleString.sizeofString(clusterName); } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeSimpleString(groupId); buffer.writeSimpleString(clusterName); } - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { groupId = buffer.readSimpleString(); clusterName = buffer.readSimpleString(); @@ -3079,14 +3079,14 @@ public class JournalStorageManager implements StorageManager return name; } - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { name = buffer.readSimpleString(); address = buffer.readSimpleString(); filterString = buffer.readNullableSimpleString(); } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeSimpleString(name); buffer.writeSimpleString(address); @@ -3112,7 +3112,7 @@ public class JournalStorageManager implements StorageManager /* (non-Javadoc) * @see org.apache.activemq.core.journal.EncodingSupport#decode(org.apache.activemq.spi.core.remoting.HornetQBuffer) */ - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { message.decodeHeadersAndProperties(buffer); } @@ -3120,7 +3120,7 @@ public class JournalStorageManager implements StorageManager /* (non-Javadoc) * @see org.apache.activemq.core.journal.EncodingSupport#encode(org.apache.activemq.spi.core.remoting.HornetQBuffer) */ - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { message.encode(buffer); } @@ -3151,7 +3151,7 @@ public class JournalStorageManager implements StorageManager /* (non-Javadoc) * @see org.apache.activemq.core.journal.EncodingSupport#decode(org.apache.activemq.spi.core.remoting.HornetQBuffer) */ - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { largeMessageID = buffer.readLong(); } @@ -3159,7 +3159,7 @@ public class JournalStorageManager implements StorageManager /* (non-Javadoc) * @see org.apache.activemq.core.journal.EncodingSupport#encode(org.apache.activemq.spi.core.remoting.HornetQBuffer) */ - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeLong(largeMessageID); } @@ -3198,13 +3198,13 @@ public class JournalStorageManager implements StorageManager this.count = count; } - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { queueID = buffer.readLong(); count = buffer.readInt(); } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeLong(queueID); buffer.writeInt(count); @@ -3238,12 +3238,12 @@ public class JournalStorageManager implements StorageManager super(); } - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { queueID = buffer.readLong(); } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeLong(queueID); } @@ -3286,7 +3286,7 @@ public class JournalStorageManager implements StorageManager * @see org.apache.activemq.core.journal.EncodingSupport#encode(org.apache.activemq.api.core.HornetQBuffer) */ @Override - public void encode(HornetQBuffer buffer) + public void encode(ActiveMQBuffer buffer) { buffer.writeByte(recordType); buffer.writeLong(id); @@ -3296,7 +3296,7 @@ public class JournalStorageManager implements StorageManager * @see org.apache.activemq.core.journal.EncodingSupport#decode(org.apache.activemq.api.core.HornetQBuffer) */ @Override - public void decode(HornetQBuffer buffer) + public void decode(ActiveMQBuffer buffer) { recordType = buffer.readByte(); id = buffer.readLong(); @@ -3339,14 +3339,14 @@ public class JournalStorageManager implements StorageManager this.recods = records; } - public void decode(HornetQBuffer buffer) + public void decode(ActiveMQBuffer buffer) { this.pageTX = buffer.readLong(); this.recods = buffer.readInt(); } @Override - public void encode(HornetQBuffer buffer) + public void encode(ActiveMQBuffer buffer) { buffer.writeLong(pageTX); buffer.writeInt(recods); @@ -3391,14 +3391,14 @@ public class JournalStorageManager implements StorageManager } @Override - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { super.encode(buffer); buffer.writeLong(scheduledDeliveryTime); } @Override - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { super.decode(buffer); scheduledDeliveryTime = buffer.readLong(); @@ -3422,7 +3422,7 @@ public class JournalStorageManager implements StorageManager { } - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { address = buffer.readSimpleString(); @@ -3433,7 +3433,7 @@ public class JournalStorageManager implements StorageManager buffer.readBytes(duplID); } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeSimpleString(address); @@ -3530,14 +3530,14 @@ public class JournalStorageManager implements StorageManager } @Override - public void encode(HornetQBuffer buffer) + public void encode(ActiveMQBuffer buffer) { buffer.writeLong(queueID); buffer.writeLong(value); } @Override - public void decode(HornetQBuffer buffer) + public void decode(ActiveMQBuffer buffer) { queueID = buffer.readLong(); value = buffer.readLong(); @@ -3599,14 +3599,14 @@ public class JournalStorageManager implements StorageManager } @Override - public void encode(HornetQBuffer buffer) + public void encode(ActiveMQBuffer buffer) { buffer.writeLong(queueID); buffer.writeLong(pageID); } @Override - public void decode(HornetQBuffer buffer) + public void decode(ActiveMQBuffer buffer) { queueID = buffer.readLong(); pageID = buffer.readLong(); @@ -3643,13 +3643,13 @@ public class JournalStorageManager implements StorageManager return DataConstants.SIZE_LONG + DataConstants.SIZE_INT; } - public void encode(HornetQBuffer buffer) + public void encode(ActiveMQBuffer buffer) { buffer.writeLong(queueID); buffer.writeInt(value); } - public void decode(HornetQBuffer buffer) + public void decode(ActiveMQBuffer buffer) { queueID = buffer.readLong(); value = buffer.readInt(); @@ -3685,14 +3685,14 @@ public class JournalStorageManager implements StorageManager return DataConstants.SIZE_LONG + DataConstants.SIZE_LONG + DataConstants.SIZE_INT; } - public void encode(HornetQBuffer buffer) + public void encode(ActiveMQBuffer buffer) { buffer.writeLong(queueID); buffer.writeLong(position.getPageNr()); buffer.writeInt(position.getMessageNr()); } - public void decode(HornetQBuffer buffer) + public void decode(ActiveMQBuffer buffer) { queueID = buffer.readLong(); long pageNR = buffer.readLong(); @@ -3721,7 +3721,7 @@ public class JournalStorageManager implements StorageManager { byte[] data = record.data; - HornetQBuffer buff = HornetQBuffers.wrappedBuffer(data); + ActiveMQBuffer buff = ActiveMQBuffers.wrappedBuffer(data); try { @@ -3761,7 +3761,7 @@ public class JournalStorageManager implements StorageManager * @param buffer * @return */ - protected static PersistedRoles newSecurityRecord(long id, HornetQBuffer buffer) + protected static PersistedRoles newSecurityRecord(long id, ActiveMQBuffer buffer) { PersistedRoles roles = new PersistedRoles(); roles.decode(buffer); @@ -3774,7 +3774,7 @@ public class JournalStorageManager implements StorageManager * @param buffer * @return */ - static PersistedAddressSetting newAddressEncoding(long id, HornetQBuffer buffer) + static PersistedAddressSetting newAddressEncoding(long id, ActiveMQBuffer buffer) { PersistedAddressSetting setting = new PersistedAddressSetting(); setting.decode(buffer); @@ -3787,7 +3787,7 @@ public class JournalStorageManager implements StorageManager * @param buffer * @return */ - static GroupingEncoding newGroupEncoding(long id, HornetQBuffer buffer) + static GroupingEncoding newGroupEncoding(long id, ActiveMQBuffer buffer) { GroupingEncoding encoding = new GroupingEncoding(); encoding.decode(buffer); @@ -3800,7 +3800,7 @@ public class JournalStorageManager implements StorageManager * @param buffer * @return */ - protected static PersistentQueueBindingEncoding newBindingEncoding(long id, HornetQBuffer buffer) + protected static PersistentQueueBindingEncoding newBindingEncoding(long id, ActiveMQBuffer buffer) { PersistentQueueBindingEncoding bindingEncoding = new PersistentQueueBindingEncoding(); 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 ca0f5c481c..5781e65b8a 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 @@ -15,10 +15,10 @@ package org.apache.activemq.core.persistence.impl.journal; import java.nio.ByteBuffer; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQInternalErrorException; +import org.apache.activemq.api.core.ActiveMQBuffer; +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.api.core.Message; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.message.BodyEncoder; @@ -119,7 +119,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L bodySize += bytes.length; } - public void encodeBody(final HornetQBuffer bufferOut, final BodyEncoder context, final int size) + public void encodeBody(final ActiveMQBuffer bufferOut, final BodyEncoder context, final int size) { try { @@ -149,13 +149,13 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } @Override - public void encode(final HornetQBuffer buffer1) + public void encode(final ActiveMQBuffer buffer1) { super.encodeHeadersAndProperties(buffer1); } @Override - public void decode(final HornetQBuffer buffer1) + public void decode(final ActiveMQBuffer buffer1) { file = null; @@ -188,7 +188,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } @Override - public BodyEncoder getBodyEncoder() throws HornetQException + public BodyEncoder getBodyEncoder() throws ActiveMQException { validateFile(); return new DecodingContext(); @@ -361,7 +361,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } } - public SequentialFile getFile() throws HornetQException + public SequentialFile getFile() throws ActiveMQException { validateFile(); return file; @@ -389,7 +389,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L // Private ------------------------------------------------------- - private synchronized void validateFile() throws HornetQException + private synchronized void validateFile() throws ActiveMQException { try { @@ -410,7 +410,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L catch (Exception e) { // TODO: There is an IO_ERROR on trunk now, this should be used here instead - throw new HornetQInternalErrorException(e.getMessage(), e); + throw new ActiveMQInternalErrorException(e.getMessage(), e); } } @@ -448,7 +448,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L { private SequentialFile cFile; - public void open() throws HornetQException + public void open() throws ActiveMQException { try { @@ -461,11 +461,11 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } catch (Exception e) { - throw new HornetQException(HornetQExceptionType.INTERNAL_ERROR, e.getMessage(), e); + throw new ActiveMQException(ActiveMQExceptionType.INTERNAL_ERROR, e.getMessage(), e); } } - public void close() throws HornetQException + public void close() throws ActiveMQException { try { @@ -476,11 +476,11 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } catch (Exception e) { - throw new HornetQInternalErrorException(e.getMessage(), e); + throw new ActiveMQInternalErrorException(e.getMessage(), e); } } - public int encode(final ByteBuffer bufferRead) throws HornetQException + public int encode(final ByteBuffer bufferRead) throws ActiveMQException { try { @@ -488,11 +488,11 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } catch (Exception e) { - throw new HornetQInternalErrorException(e.getMessage(), e); + throw new ActiveMQInternalErrorException(e.getMessage(), e); } } - public int encode(final HornetQBuffer bufferOut, final int size) throws HornetQException + public int encode(final ActiveMQBuffer bufferOut, final int size) throws ActiveMQException { // This could maybe be optimized (maybe reading directly into bufferOut) ByteBuffer bufferRead = ByteBuffer.allocate(size); 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 0204230b80..25461f31cd 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 @@ -17,7 +17,7 @@ package org.apache.activemq.core.persistence.impl.journal; import java.nio.ByteBuffer; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.persistence.StorageManager; @@ -72,7 +72,7 @@ public final class LargeServerMessageInSync implements ReplicatedLargeMessage syncDone = true; } - public SequentialFile getSyncFile() throws HornetQException + public SequentialFile getSyncFile() throws ActiveMQException { return mainLM.getFile(); } 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 ce7938161c..8bdb709bfd 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 @@ -19,8 +19,8 @@ import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQException; +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; @@ -243,7 +243,7 @@ public class OperationContextImpl implements OperationContext { HornetQServerLogger.LOGGER.errorExecutingIOAsyncTask(e); executorsPending.decrementAndGet(); - task.onError(HornetQExceptionType.INTERNAL_ERROR.getCode(), + task.onError(ActiveMQExceptionType.INTERNAL_ERROR.getCode(), "It wasn't possible to complete IO operation - " + e.getMessage()); } } @@ -312,7 +312,7 @@ public class OperationContextImpl implements OperationContext } @Override - public boolean waitCompletion(final long timeout) throws InterruptedException, HornetQException + public boolean waitCompletion(final long timeout) throws InterruptedException, ActiveMQException { SimpleWaitIOCallback waitCallback = new SimpleWaitIOCallback(); executeOnCompletion(waitCallback); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/nullpm/NullStorageLargeServerMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/nullpm/NullStorageLargeServerMessage.java index 0c46c26b52..72ac31a855 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/nullpm/NullStorageLargeServerMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/persistence/impl/nullpm/NullStorageLargeServerMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.persistence.impl.nullpm; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.server.LargeServerMessage; import org.apache.activemq.core.server.impl.ServerMessageImpl; @@ -39,7 +39,7 @@ class NullStorageLargeServerMessage extends ServerMessageImpl implements LargeSe { if (buffer == null) { - buffer = HornetQBuffers.dynamicBuffer(bytes.length); + buffer = ActiveMQBuffers.dynamicBuffer(bytes.length); } // expand the buffer 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 440cafbe6d..59d5133290 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 @@ -27,10 +27,10 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; -import org.apache.activemq.api.core.HornetQAddressFullException; -import org.apache.activemq.api.core.HornetQDuplicateIdException; -import org.apache.activemq.api.core.HornetQInterruptedException; -import org.apache.activemq.api.core.HornetQNonExistentQueueException; +import org.apache.activemq.api.core.ActiveMQAddressFullException; +import org.apache.activemq.api.core.ActiveMQDuplicateIdException; +import org.apache.activemq.api.core.ActiveMQInterruptedException; +import org.apache.activemq.api.core.ActiveMQNonExistentQueueException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; @@ -498,7 +498,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding if (binding == null) { - throw new HornetQNonExistentQueueException(); + throw new ActiveMQNonExistentQueueException(); } if (addressManager.getBindingsForRoutingAddress(binding.getAddress()) == null) @@ -733,7 +733,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding { processRoute(message, context, direct); } - catch (HornetQAddressFullException e) + catch (ActiveMQAddressFullException e) { if (startedTX.get()) { @@ -1268,7 +1268,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding if (context.getTransaction() != null) { - context.getTransaction().markAsRollbackOnly(new HornetQDuplicateIdException()); + context.getTransaction().markAsRollbackOnly(new ActiveMQDuplicateIdException()); } message.decrementRefCount(); @@ -1313,7 +1313,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding if (context.getTransaction() != null) { - context.getTransaction().markAsRollbackOnly(new HornetQDuplicateIdException(warnMessage)); + context.getTransaction().markAsRollbackOnly(new ActiveMQDuplicateIdException(warnMessage)); } message.decrementRefCount(); @@ -1406,7 +1406,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding } catch (InterruptedException e1) { - throw new HornetQInterruptedException(e1); + throw new ActiveMQInterruptedException(e1); } if (!isStarted()) return; diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/ServerPacketDecoder.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/ServerPacketDecoder.java index 366aa3c2f8..1632711c76 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/ServerPacketDecoder.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/ServerPacketDecoder.java @@ -36,7 +36,7 @@ import static org.apache.activemq.core.protocol.core.impl.PacketImpl.SESS_SEND; import static org.apache.activemq.core.protocol.core.impl.PacketImpl.SESS_SEND_LARGE; import static org.apache.activemq.core.protocol.core.impl.PacketImpl.SCALEDOWN_ANNOUNCEMENT; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; 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.BackupRegistrationMessage; @@ -78,7 +78,7 @@ public class ServerPacketDecoder extends ClientPacketDecoder public static final ServerPacketDecoder INSTANCE = new ServerPacketDecoder(); @Override - public Packet decode(final HornetQBuffer in) + public Packet decode(final ActiveMQBuffer in) { final byte packetType = in.readByte(); 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 57ac895f44..02904272b6 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 @@ -51,9 +51,9 @@ import java.util.List; import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQInternalErrorException; +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.journal.IOAsyncTask; import org.apache.activemq.core.persistence.StorageManager; @@ -162,7 +162,7 @@ public class ServerSessionPacketHandler implements ChannelHandler return channel.getID(); } - public void connectionFailed(final HornetQException exception, boolean failedOver) + public void connectionFailed(final ActiveMQException exception, boolean failedOver) { HornetQServerLogger.LOGGER.clientConnectionFailed(session.getName()); @@ -547,7 +547,7 @@ public class ServerSessionPacketHandler implements ChannelHandler HornetQServerLogger.LOGGER.caughtXaException(e); } } - catch (HornetQException e) + catch (ActiveMQException e) { if (requiresResponse) { @@ -556,7 +556,7 @@ public class ServerSessionPacketHandler implements ChannelHandler } else { - if (e.getType() == HornetQExceptionType.QUEUE_EXISTS) + if (e.getType() == ActiveMQExceptionType.QUEUE_EXISTS) { HornetQServerLogger.LOGGER.debug("Caught exception", e); } @@ -571,7 +571,7 @@ public class ServerSessionPacketHandler implements ChannelHandler if (requiresResponse) { HornetQServerLogger.LOGGER.warn("Sending unexpected exception to the client", t); - HornetQException hqe = new HornetQInternalErrorException(); + ActiveMQException hqe = new ActiveMQInternalErrorException(); hqe.initCause(t); response = new HornetQExceptionMessage(hqe); } @@ -600,7 +600,7 @@ public class ServerSessionPacketHandler implements ChannelHandler { HornetQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage); - HornetQExceptionMessage exceptionMessage = new HornetQExceptionMessage( HornetQExceptionType.createException(errorCode, errorMessage)); + HornetQExceptionMessage exceptionMessage = new HornetQExceptionMessage( ActiveMQExceptionType.createException(errorCode, errorMessage)); doConfirmAndResponse(confirmPacket, exceptionMessage, flush, closeChannel); } 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 04209dc90f..956b67d218 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 @@ -20,7 +20,7 @@ import java.util.concurrent.Executor; import java.util.concurrent.RejectedExecutionException; import io.netty.channel.ChannelPipeline; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; @@ -141,7 +141,7 @@ class CoreProtocolManager implements ProtocolManager sessionHandlers.remove(name); } - public void handleBuffer(RemotingConnection connection, HornetQBuffer buffer) + public void handleBuffer(RemotingConnection connection, ActiveMQBuffer buffer) { } @@ -159,7 +159,7 @@ class CoreProtocolManager implements ProtocolManager } @Override - public void handshake(NettyServerConnection connection, HornetQBuffer buffer) + public void handshake(NettyServerConnection connection, ActiveMQBuffer buffer) { //if we are not an old client then handshake if (buffer.getByte(0) == 'H' && 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/HornetQPacketHandler.java index 33e89e6c12..231b2c60bd 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/HornetQPacketHandler.java @@ -12,9 +12,9 @@ */ package org.apache.activemq.core.protocol.core.impl; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQInternalErrorException; +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.api.core.SimpleString; import org.apache.activemq.core.protocol.core.Channel; import org.apache.activemq.core.protocol.core.ChannelHandler; @@ -142,7 +142,7 @@ public class HornetQPacketHandler implements ChannelHandler // XXX HORNETQ-720 Taylor commented out this test. Should be verified. /*if (!server.checkActivate()) { - throw new HornetQException(HornetQException.SESSION_CREATION_REJECTED, + throw new ActiveMQException(ActiveMQException.SESSION_CREATION_REJECTED, "Server will not accept create session requests"); }*/ @@ -189,12 +189,12 @@ public class HornetQPacketHandler implements ChannelHandler response = new CreateSessionResponseMessage(server.getVersion().getIncrementingVersion()); } - catch (HornetQException e) + catch (ActiveMQException e) { - if (e.getType() == HornetQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS) + if (e.getType() == ActiveMQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS) { incompatibleVersion = true; - HornetQServerLogger.LOGGER.debug("Sending HornetQException after Incompatible client", e); + HornetQServerLogger.LOGGER.debug("Sending ActiveMQException after Incompatible client", e); } else { @@ -207,7 +207,7 @@ public class HornetQPacketHandler implements ChannelHandler { HornetQServerLogger.LOGGER.failedToCreateSession(e); - response = new HornetQExceptionMessage(new HornetQInternalErrorException()); + response = new HornetQExceptionMessage(new ActiveMQInternalErrorException()); } // send the exception to the client and destroy @@ -274,7 +274,7 @@ public class HornetQPacketHandler implements ChannelHandler { HornetQServerLogger.LOGGER.failedToReattachSession(e); - response = new HornetQExceptionMessage(new HornetQInternalErrorException()); + response = new HornetQExceptionMessage(new ActiveMQInternalErrorException()); } channel1.send(response); 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 ae6bf6b33c..430b3f5f76 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -53,7 +53,7 @@ public final class BackupRegistrationMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeString(clusterUser); buffer.writeString(clusterPassword); @@ -62,7 +62,7 @@ public final class BackupRegistrationMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { clusterUser = buffer.readString(); clusterPassword = buffer.readString(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupReplicationStartFailedMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupReplicationStartFailedMessage.java index cc5d0e6652..fcf1c22973 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupReplicationStartFailedMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupReplicationStartFailedMessage.java @@ -15,7 +15,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import java.util.Collections; @@ -78,13 +78,13 @@ public final class BackupReplicationStartFailedMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeInt(problem.code); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { problem = getType(buffer.readInt()); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupRequestMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupRequestMessage.java index f2b77c8796..a6fbb472b3 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupRequestMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupRequestMessage.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -50,7 +50,7 @@ public class BackupRequestMessage extends PacketImpl } @Override - public void encodeRest(HornetQBuffer buffer) + public void encodeRest(ActiveMQBuffer buffer) { super.encodeRest(buffer); buffer.writeInt(backupSize); @@ -62,7 +62,7 @@ public class BackupRequestMessage extends PacketImpl } @Override - public void decodeRest(HornetQBuffer buffer) + public void decodeRest(ActiveMQBuffer buffer) { super.decodeRest(buffer); backupSize = buffer.readInt(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupResponseMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupResponseMessage.java index 1666dede51..0f08edfad6 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupResponseMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/BackupResponseMessage.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; public class BackupResponseMessage extends PacketImpl @@ -32,14 +32,14 @@ public class BackupResponseMessage extends PacketImpl } @Override - public void encodeRest(HornetQBuffer buffer) + public void encodeRest(ActiveMQBuffer buffer) { super.encodeRest(buffer); buffer.writeBoolean(backupStarted); } @Override - public void decodeRest(HornetQBuffer buffer) + public void decodeRest(ActiveMQBuffer buffer) { super.decodeRest(buffer); backupStarted = buffer.readBoolean(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterConnectMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterConnectMessage.java index 4203ed63ff..ebced289a6 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterConnectMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterConnectMessage.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; public class ClusterConnectMessage extends PacketImpl @@ -34,14 +34,14 @@ public class ClusterConnectMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeString(clusterUser); buffer.writeString(clusterPassword); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { clusterUser = buffer.readString(); clusterPassword = buffer.readString(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterConnectReplyMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterConnectReplyMessage.java index 25dafb8c29..4f0f52ca52 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterConnectReplyMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterConnectReplyMessage.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; public class ClusterConnectReplyMessage extends PacketImpl @@ -38,14 +38,14 @@ public class ClusterConnectReplyMessage extends PacketImpl } @Override - public void encodeRest(HornetQBuffer buffer) + public void encodeRest(ActiveMQBuffer buffer) { super.encodeRest(buffer); buffer.writeBoolean(authorized); } @Override - public void decodeRest(HornetQBuffer buffer) + public void decodeRest(ActiveMQBuffer buffer) { super.decodeRest(buffer); authorized = buffer.readBoolean(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/NodeAnnounceMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/NodeAnnounceMessage.java index 932af66691..e88d6b22a1 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/NodeAnnounceMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/NodeAnnounceMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -111,7 +111,7 @@ public class NodeAnnounceMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeString(nodeID); buffer.writeNullableString(backupGroupName); @@ -139,7 +139,7 @@ public class NodeAnnounceMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { this.nodeID = buffer.readString(); this.backupGroupName = buffer.readNullableString(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/QuorumVoteMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/QuorumVoteMessage.java index 9bcbd1ab4f..ee6a3a72b6 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/QuorumVoteMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/QuorumVoteMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.core.server.cluster.qourum.QuorumVoteHandler; @@ -24,7 +24,7 @@ public class QuorumVoteMessage extends PacketImpl private Vote vote; - private HornetQBuffer voteBuffer; + private ActiveMQBuffer voteBuffer; public QuorumVoteMessage() { @@ -39,7 +39,7 @@ public class QuorumVoteMessage extends PacketImpl } @Override - public void encodeRest(HornetQBuffer buffer) + public void encodeRest(ActiveMQBuffer buffer) { super.encodeRest(buffer); buffer.writeSimpleString(handler); @@ -47,7 +47,7 @@ public class QuorumVoteMessage extends PacketImpl } @Override - public void decodeRest(HornetQBuffer buffer) + public void decodeRest(ActiveMQBuffer buffer) { super.decodeRest(buffer); handler = buffer.readSimpleString(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/QuorumVoteReplyMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/QuorumVoteReplyMessage.java index fb4e63693d..7c7dd97394 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/QuorumVoteReplyMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/QuorumVoteReplyMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.core.server.cluster.qourum.QuorumVoteHandler; @@ -22,7 +22,7 @@ public class QuorumVoteReplyMessage extends PacketImpl { private SimpleString handler; private Vote vote; - private HornetQBuffer voteBuffer; + private ActiveMQBuffer voteBuffer; public QuorumVoteReplyMessage(SimpleString handler, Vote vote) { @@ -53,7 +53,7 @@ public class QuorumVoteReplyMessage extends PacketImpl } @Override - public void encodeRest(HornetQBuffer buffer) + public void encodeRest(ActiveMQBuffer buffer) { super.encodeRest(buffer); buffer.writeSimpleString(handler); @@ -61,7 +61,7 @@ public class QuorumVoteReplyMessage extends PacketImpl } @Override - public void decodeRest(HornetQBuffer buffer) + public void decodeRest(ActiveMQBuffer buffer) { super.decodeRest(buffer); handler = buffer.readSimpleString(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationAddMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationAddMessage.java index 7e9a119fd5..37b3f073b5 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationAddMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationAddMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import java.util.Arrays; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.core.replication.ReplicationManager.ADD_OPERATION_TYPE; @@ -57,7 +57,7 @@ public final class ReplicationAddMessage extends PacketImpl // Public -------------------------------------------------------- @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeByte(journalID); @@ -69,7 +69,7 @@ public final class ReplicationAddMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { journalID = buffer.readByte(); operation = ADD_OPERATION_TYPE.toOperation(buffer.readBoolean()); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationAddTXMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationAddTXMessage.java index 98e8d52a41..0fb400cb94 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationAddTXMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationAddTXMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import java.util.Arrays; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.core.replication.ReplicationManager.ADD_OPERATION_TYPE; @@ -67,7 +67,7 @@ public class ReplicationAddTXMessage extends PacketImpl // Public -------------------------------------------------------- @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeByte(journalID); buffer.writeBoolean(operation.toBoolean()); @@ -79,7 +79,7 @@ public class ReplicationAddTXMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { journalID = buffer.readByte(); operation = ADD_OPERATION_TYPE.toOperation(buffer.readBoolean()); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationCommitMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationCommitMessage.java index 86c2dea36e..5909e751c2 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationCommitMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationCommitMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -44,7 +44,7 @@ public final class ReplicationCommitMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeByte(journalID); buffer.writeBoolean(rollback); @@ -52,7 +52,7 @@ public final class ReplicationCommitMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { journalID = buffer.readByte(); rollback = buffer.readBoolean(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationDeleteMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationDeleteMessage.java index d0efd843c0..25e50acc5e 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationDeleteMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationDeleteMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -39,14 +39,14 @@ public final class ReplicationDeleteMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeByte(journalID); buffer.writeLong(id); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { journalID = buffer.readByte(); id = buffer.readLong(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationDeleteTXMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationDeleteTXMessage.java index e424dd1aca..1c7165cda8 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationDeleteTXMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationDeleteTXMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import java.util.Arrays; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -57,7 +57,7 @@ public class ReplicationDeleteTXMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeByte(journalID); buffer.writeLong(txId); @@ -67,7 +67,7 @@ public class ReplicationDeleteTXMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { journalID = buffer.readByte(); txId = buffer.readLong(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLargeMessageBeginMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLargeMessageBeginMessage.java index 0154b04d31..98fc95ffb3 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLargeMessageBeginMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLargeMessageBeginMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -39,13 +39,13 @@ public class ReplicationLargeMessageBeginMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeLong(messageId); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { messageId = buffer.readLong(); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLargeMessageEndMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLargeMessageEndMessage.java index 2daa96946a..66731ae940 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLargeMessageEndMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLargeMessageEndMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -39,13 +39,13 @@ public class ReplicationLargeMessageEndMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeLong(messageId); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { messageId = buffer.readLong(); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLargeMessageWriteMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLargeMessageWriteMessage.java index 286cfaafe5..880f065244 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLargeMessageWriteMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLargeMessageWriteMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import java.util.Arrays; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -47,7 +47,7 @@ public final class ReplicationLargeMessageWriteMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeLong(messageId); buffer.writeInt(body.length); @@ -55,7 +55,7 @@ public final class ReplicationLargeMessageWriteMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { messageId = buffer.readLong(); int size = buffer.readInt(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLiveIsStoppingMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLiveIsStoppingMessage.java index 1f3f8441a6..da6d4a0d97 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLiveIsStoppingMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationLiveIsStoppingMessage.java @@ -15,7 +15,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -64,13 +64,13 @@ public final class ReplicationLiveIsStoppingMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeInt(liveStopping.code); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { liveStopping = buffer.readInt() == 0 ? LiveStopping.STOP_CALLED : LiveStopping.FAIL_OVER; } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationPageEventMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationPageEventMessage.java index 8329a5dacc..5cdb08fa40 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationPageEventMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationPageEventMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -46,7 +46,7 @@ public class ReplicationPageEventMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeSimpleString(storeName); buffer.writeInt(pageNumber); @@ -54,7 +54,7 @@ public class ReplicationPageEventMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { storeName = buffer.readSimpleString(); pageNumber = buffer.readInt(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationPageWriteMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationPageWriteMessage.java index 1e8ac44166..f9673a0b13 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationPageWriteMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationPageWriteMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.paging.PagedMessage; import org.apache.activemq.core.paging.impl.PagedMessageImpl; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -47,14 +47,14 @@ public class ReplicationPageWriteMessage extends PacketImpl // Public -------------------------------------------------------- @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeInt(pageNumber); pagedMessage.encode(buffer); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { pageNumber = buffer.readInt(); pagedMessage = new PagedMessageImpl(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationPrepareMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationPrepareMessage.java index 37933541b3..9fc9479920 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationPrepareMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationPrepareMessage.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; import java.util.Arrays; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -50,7 +50,7 @@ public final class ReplicationPrepareMessage extends PacketImpl // Public -------------------------------------------------------- @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeByte(journalID); buffer.writeLong(txId); @@ -59,7 +59,7 @@ public final class ReplicationPrepareMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { journalID = buffer.readByte(); txId = buffer.readLong(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationStartSyncMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationStartSyncMessage.java index ec0e59cf37..e959fc7466 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationStartSyncMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationStartSyncMessage.java @@ -16,7 +16,7 @@ import java.security.InvalidParameterException; import java.util.Arrays; import java.util.List; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.impl.JournalFile; import org.apache.activemq.core.persistence.impl.journal.JournalStorageManager.JournalContent; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -115,7 +115,7 @@ public class ReplicationStartSyncMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeBoolean(synchronizationIsFinished); buffer.writeBoolean(allowsAutoFailBack); @@ -131,7 +131,7 @@ public class ReplicationStartSyncMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { synchronizationIsFinished = buffer.readBoolean(); allowsAutoFailBack = buffer.readBoolean(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationSyncFileMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationSyncFileMessage.java index 33797ec4c2..394e48319c 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationSyncFileMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ReplicationSyncFileMessage.java @@ -17,7 +17,7 @@ import java.util.Arrays; import java.util.EnumSet; import java.util.Set; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.persistence.impl.journal.JournalStorageManager.JournalContent; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -104,7 +104,7 @@ public final class ReplicationSyncFileMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeLong(fileId); if (fileId == -1) @@ -139,7 +139,7 @@ public final class ReplicationSyncFileMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { fileId = buffer.readLong(); switch (FileType.getFileType(buffer.readByte())) diff --git a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ScaleDownAnnounceMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ScaleDownAnnounceMessage.java index b6ee30b745..19040ae74a 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ScaleDownAnnounceMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ScaleDownAnnounceMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -34,14 +34,14 @@ public class ScaleDownAnnounceMessage extends PacketImpl } @Override - public void encodeRest(HornetQBuffer buffer) + public void encodeRest(ActiveMQBuffer buffer) { buffer.writeSimpleString(targetNodeId); buffer.writeSimpleString(scaledDownNodeId); } @Override - public void decodeRest(HornetQBuffer buffer) + public void decodeRest(ActiveMQBuffer buffer) { targetNodeId = buffer.readSimpleString(); scaledDownNodeId = buffer.readSimpleString(); 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 1bc936f365..c573cab55c 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 @@ -17,7 +17,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executor; -import org.apache.activemq.api.core.HornetQException; +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.management.CoreNotificationType; @@ -289,7 +289,7 @@ public final class InVMAcceptor implements Acceptor } } - public void connectionException(final Object connectionID, final HornetQException me) + public void connectionException(final Object connectionID, final ActiveMQException me) { listener.connectionException(connectionID, me); } 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 b411aa1a51..ec4ae0a818 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 @@ -20,9 +20,9 @@ import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.TimeUnit; import io.netty.channel.ChannelFutureListener; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQInterruptedException; +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; @@ -138,9 +138,9 @@ public class InVMConnection implements Connection } } - public HornetQBuffer createBuffer(final int size) + public ActiveMQBuffer createBuffer(final int size) { - return HornetQBuffers.dynamicBuffer(size); + return ActiveMQBuffers.dynamicBuffer(size); } public Object getID() @@ -152,19 +152,19 @@ public class InVMConnection implements Connection { } - public void write(final HornetQBuffer buffer) + public void write(final ActiveMQBuffer buffer) { write(buffer, false, false, null); } - public void write(final HornetQBuffer buffer, final boolean flush, final boolean batch) + public void write(final ActiveMQBuffer buffer, final boolean flush, final boolean batch) { write(buffer, flush, batch, null); } - public void write(final HornetQBuffer buffer, final boolean flush, final boolean batch, final ChannelFutureListener futureListener) + public void write(final ActiveMQBuffer buffer, final boolean flush, final boolean batch, final ChannelFutureListener futureListener) { - final HornetQBuffer copied = buffer.copy(0, buffer.capacity()); + final ActiveMQBuffer copied = buffer.copy(0, buffer.capacity()); copied.setIndex(buffer.readerIndex(), buffer.writerIndex()); @@ -227,7 +227,7 @@ public class InVMConnection implements Connection } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } } 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 4c9e243d8c..d5f9480d65 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 @@ -19,7 +19,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executor; -import org.apache.activemq.api.core.HornetQException; +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; @@ -239,7 +239,7 @@ public class InVMConnector extends AbstractConnector } } - public void connectionException(final Object connectionID, final HornetQException me) + public void connectionException(final Object connectionID, final ActiveMQException me) { // Execute on different thread to avoid deadlocks closeExecutor.execute(new Runnable() 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 614e19ad31..be36072635 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 @@ -51,7 +51,7 @@ import io.netty.util.concurrent.GenericFutureListener; import io.netty.util.concurrent.GlobalEventExecutor; import org.apache.activemq.api.config.HornetQDefaultConfiguration; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.CoreNotificationType; @@ -729,7 +729,7 @@ public class NettyAcceptor implements Acceptor } } - public void connectionException(final Object connectionID, final HornetQException me) + public void connectionException(final Object connectionID, final ActiveMQException me) { // Execute on different thread to avoid deadlocks new Thread() diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyServerConnection.java b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyServerConnection.java index c49a4dabfa..5278472eaa 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyServerConnection.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyServerConnection.java @@ -15,7 +15,7 @@ package org.apache.activemq.core.remoting.impl.netty; import java.util.Map; import io.netty.channel.Channel; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.buffers.impl.ChannelBufferWrapper; import org.apache.activemq.spi.core.remoting.ConnectionLifeCycleListener; @@ -30,7 +30,7 @@ public class NettyServerConnection extends NettyConnection } @Override - public HornetQBuffer createBuffer(int size) + public ActiveMQBuffer createBuffer(int size) { return new ChannelBufferWrapper(channel.alloc().directBuffer(size), true); } 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 fc1c1b64a0..7fd9a46533 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 @@ -31,9 +31,9 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQInterruptedException; +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.api.core.TransportConfiguration; import org.apache.activemq.core.config.Configuration; @@ -589,7 +589,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } } - public void connectionException(final Object connectionID, final HornetQException me) + public void connectionException(final Object connectionID, final ActiveMQException me) { // We DO NOT call fail on connection exception, otherwise in event of real connection failure, the // connection will be failed, the session will be closed and won't be able to reconnect @@ -652,7 +652,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle private final class DelegatingBufferHandler implements BufferHandler { - public void bufferReceived(final Object connectionID, final HornetQBuffer buffer) + public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { ConnectionEntry conn = connections.get(connectionID); @@ -698,7 +698,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } } 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 c39e05e1e8..a65ac05210 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 @@ -27,7 +27,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.journal.IOCriticalErrorListener; @@ -234,7 +234,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone HornetQServerLogger.LOGGER.invalidPacketForReplication(packet); } } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQServerLogger.LOGGER.errorHandlingReplicationPacket(e, packet); response = new HornetQExceptionMessage(e); @@ -259,9 +259,9 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone /** * @param packet - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - private void handleLiveStopping(ReplicationLiveIsStoppingMessage packet) throws HornetQException + private void handleLiveStopping(ReplicationLiveIsStoppingMessage packet) throws ActiveMQException { activation.remoteFailOver(packet.isFinalMessage()); } @@ -395,7 +395,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone this.channel = channel; } - public void compareJournalInformation(final JournalLoadInformation[] journalInformation) throws HornetQException + public void compareJournalInformation(final JournalLoadInformation[] journalInformation) throws ActiveMQException { if (!activation.isRemoteBackupUpToDate()) { 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 cccde8f47c..ced14b102c 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 @@ -22,9 +22,9 @@ import java.util.Queue; import java.util.Set; import java.util.concurrent.ConcurrentLinkedQueue; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.SessionFailureListener; @@ -60,7 +60,6 @@ import org.apache.activemq.core.server.HornetQComponent; import org.apache.activemq.core.server.HornetQServerLogger; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.utils.ExecutorFactory; -import org.omg.CORBA.portable.ResponseHandler; /** * Manages replication tasks on the live server (that is the live server side of a "remote backup" @@ -263,7 +262,7 @@ public final class ReplicationManager implements HornetQComponent } @Override - public synchronized void start() throws HornetQException + public synchronized void start() throws ActiveMQException { if (started) { @@ -413,9 +412,9 @@ public final class ReplicationManager implements HornetQComponent private final class ReplicatedSessionFailureListener implements SessionFailureListener { @Override - public void connectionFailed(final HornetQException me, boolean failedOver) + public void connectionFailed(final ActiveMQException me, boolean failedOver) { - if (me.getType() == HornetQExceptionType.DISCONNECTED) + if (me.getType() == ActiveMQExceptionType.DISCONNECTED) { // Backup has shut down - no need to log a stack trace HornetQServerLogger.LOGGER.replicationStopOnBackupShutdown(); @@ -436,12 +435,12 @@ public final class ReplicationManager implements HornetQComponent } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } - public void beforeReconnect(final HornetQException me) + public void beforeReconnect(final ActiveMQException me) { } } @@ -462,11 +461,11 @@ public final class ReplicationManager implements HornetQComponent { static final NullEncoding instance = new NullEncoding(); - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { } @@ -479,7 +478,7 @@ public final class ReplicationManager implements HornetQComponent /** * Sends the whole content of the file to be duplicated. * - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException * @throws Exception */ public void syncJournalFile(JournalFile jf, JournalContent content) throws Exception @@ -594,10 +593,10 @@ public final class ReplicationManager implements HornetQComponent * * @param datafiles * @param contentType - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ public void sendStartSyncMessage(JournalFile[] datafiles, JournalContent contentType, String nodeID, - boolean allowsAutoFailBack) throws HornetQException + boolean allowsAutoFailBack) throws ActiveMQException { if (enabled) sendReplicatePacket(new ReplicationStartSyncMessage(datafiles, contentType, nodeID, allowsAutoFailBack)); 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/HornetQMessageBundle.java index a90e82e501..cd530c3fcc 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/HornetQMessageBundle.java @@ -13,23 +13,23 @@ package org.apache.activemq.core.server; +import org.apache.activemq.api.core.ActiveMQAddressFullException; +import org.apache.activemq.api.core.ActiveMQClusterSecurityException; +import org.apache.activemq.api.core.ActiveMQConnectionTimedOutException; +import org.apache.activemq.api.core.ActiveMQDisconnectedException; +import org.apache.activemq.api.core.ActiveMQDuplicateMetaDataException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQIOErrorException; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQIncompatibleClientServerException; +import org.apache.activemq.api.core.ActiveMQInternalErrorException; +import org.apache.activemq.api.core.ActiveMQInvalidFilterExpressionException; +import org.apache.activemq.api.core.ActiveMQInvalidTransientQueueUseException; +import org.apache.activemq.api.core.ActiveMQNonExistentQueueException; +import org.apache.activemq.api.core.ActiveMQQueueExistsException; +import org.apache.activemq.api.core.ActiveMQSecurityException; +import org.apache.activemq.api.core.ActiveMQSessionCreationException; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; -import org.apache.activemq.api.core.HornetQAddressFullException; -import org.apache.activemq.api.core.HornetQClusterSecurityException; -import org.apache.activemq.api.core.HornetQConnectionTimedOutException; -import org.apache.activemq.api.core.HornetQDisconnectedException; -import org.apache.activemq.api.core.HornetQDuplicateMetaDataException; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQIOErrorException; -import org.apache.activemq.api.core.HornetQIllegalStateException; -import org.apache.activemq.api.core.HornetQIncompatibleClientServerException; -import org.apache.activemq.api.core.HornetQInternalErrorException; -import org.apache.activemq.api.core.HornetQInvalidFilterExpressionException; -import org.apache.activemq.api.core.HornetQInvalidTransientQueueUseException; -import org.apache.activemq.api.core.HornetQNonExistentQueueException; -import org.apache.activemq.api.core.HornetQQueueExistsException; -import org.apache.activemq.api.core.HornetQSecurityException; -import org.apache.activemq.api.core.HornetQSessionCreationException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.postoffice.Binding; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationSyncFileMessage; @@ -73,31 +73,31 @@ public interface HornetQMessageBundle String serverDescribe(String identity, String describe); @Message(id = 119005, value = "connections for {0} closed by management", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException connectionsClosedByManagement(String ipAddress); + ActiveMQInternalErrorException connectionsClosedByManagement(String ipAddress); @Message(id = 119006, value = "journals are not JournalImpl. You can''t set a replicator!", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException notJournalImpl(); + ActiveMQInternalErrorException notJournalImpl(); @Message(id = 119007, value = "unhandled error during replication", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException replicationUnhandledError(@Cause Exception e); + ActiveMQInternalErrorException replicationUnhandledError(@Cause Exception e); @Message(id = 119008, value = "Live Node contains more journals than the backup node. Probably a version match error", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException replicationTooManyJournals(); + ActiveMQInternalErrorException replicationTooManyJournals(); @Message(id = 119009, value = "Unhandled file type {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException replicationUnhandledFileType(ReplicationSyncFileMessage.FileType fileType); + ActiveMQInternalErrorException replicationUnhandledFileType(ReplicationSyncFileMessage.FileType fileType); @Message(id = 119010, value = "Remote Backup can not be up-to-date!", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException replicationBackupUpToDate(); + ActiveMQInternalErrorException replicationBackupUpToDate(); @Message(id = 119011, value = "unhandled data type!", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException replicationUnhandledDataType(); + ActiveMQInternalErrorException replicationUnhandledDataType(); @Message(id = 119012, value = "No binding for divert {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException noBindingForDivert(SimpleString name); + ActiveMQInternalErrorException noBindingForDivert(SimpleString name); @Message(id = 119013, value = "Binding {0} is not a divert", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException bindingNotDivert(SimpleString name); + ActiveMQInternalErrorException bindingNotDivert(SimpleString name); @Message(id = 119014, value = "Did not receive data from {0}. It is likely the client has exited or crashed without " @@ -106,70 +106,70 @@ public interface HornetQMessageBundle "You also might have configured connection-ttl and client-failure-check-period incorrectly. " + "Please check user manual for more information." + " The connection will now be closed.", format = Message.Format.MESSAGE_FORMAT) - HornetQConnectionTimedOutException clientExited(String remoteAddress); + ActiveMQConnectionTimedOutException clientExited(String remoteAddress); @Message(id = 119015, value = "Timeout on waiting I/O completion", format = Message.Format.MESSAGE_FORMAT) - HornetQIOErrorException ioTimeout(); + ActiveMQIOErrorException ioTimeout(); @Message(id = 119016, value = "queue {0} has been removed cannot deliver message, queues should not be removed when grouping is used", format = Message.Format.MESSAGE_FORMAT) - HornetQNonExistentQueueException groupingQueueRemoved(SimpleString chosenClusterName); + ActiveMQNonExistentQueueException groupingQueueRemoved(SimpleString chosenClusterName); @Message(id = 119017, value = "Queue {0} does not exist", format = Message.Format.MESSAGE_FORMAT) - HornetQNonExistentQueueException noSuchQueue(SimpleString queueName); + ActiveMQNonExistentQueueException noSuchQueue(SimpleString queueName); @Message(id = 119018, value = "Binding already exists {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQQueueExistsException bindingAlreadyExists(Binding binding); + ActiveMQQueueExistsException bindingAlreadyExists(Binding binding); @Message(id = 119019, value = "Queue already exists {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQQueueExistsException queueAlreadyExists(SimpleString queueName); + ActiveMQQueueExistsException queueAlreadyExists(SimpleString queueName); @Message(id = 119020, value = "Invalid filter: {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQInvalidFilterExpressionException invalidFilter(@Cause Throwable e, SimpleString filter); + ActiveMQInvalidFilterExpressionException invalidFilter(@Cause Throwable e, SimpleString filter); @Message(id = 119021, value = "MessageId was not assigned to Message", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException messageIdNotAssigned(); + ActiveMQIllegalStateException messageIdNotAssigned(); @Message(id = 119022, value = "Cannot compare journals if not in sync!", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException journalsNotInSync(); + ActiveMQIllegalStateException journalsNotInSync(); @Message(id = 119023, value = "Connected server is not a backup server", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException serverNotBackupServer(); + ActiveMQIllegalStateException serverNotBackupServer(); @Message(id = 119024, value = "Backup replication server is already connected to another server", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException alreadyHaveReplicationServer(); + ActiveMQIllegalStateException alreadyHaveReplicationServer(); @Message(id = 119025, value = "Cannot delete queue {0} on binding {1} - it has consumers = {2}", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException cannotDeleteQueue(SimpleString name, SimpleString queueName, String s); + ActiveMQIllegalStateException cannotDeleteQueue(SimpleString name, SimpleString queueName, String s); @Message(id = 119026, value = "Backup Server was not yet in sync with live", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException backupServerNotInSync(); + ActiveMQIllegalStateException backupServerNotInSync(); @Message(id = 119027, value = "Could not find reference on consumer ID={0}, messageId = {1} queue = {2}", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException consumerNoReference(Long id, Long messageID, SimpleString name); + ActiveMQIllegalStateException consumerNoReference(Long id, Long messageID, SimpleString name); @Message(id = 119028, value = "Consumer {0} doesn''t exist on the server", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException consumerDoesntExist(long consumerID); + ActiveMQIllegalStateException consumerDoesntExist(long consumerID); @Message(id = 119029, value = "No address configured on the Server''s Session", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException noAddress(); + ActiveMQIllegalStateException noAddress(); @Message(id = 119030, value = "large-message not initialized on server", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException largeMessageNotInitialised(); + ActiveMQIllegalStateException largeMessageNotInitialised(); @Message(id = 119031, value = "Unable to validate user: {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQSecurityException unableToValidateUser(String user); + ActiveMQSecurityException unableToValidateUser(String user); @Message(id = 119032, value = "User: {0} does not have permission=''{1}'' on address {2}", format = Message.Format.MESSAGE_FORMAT) - HornetQSecurityException userNoPermissions(String username, CheckType checkType, String saddress); + ActiveMQSecurityException userNoPermissions(String username, CheckType checkType, String saddress); @Message(id = 119033, value = "Server and client versions incompatible", format = Message.Format.MESSAGE_FORMAT) - HornetQIncompatibleClientServerException incompatibleClientServer(); + ActiveMQIncompatibleClientServerException incompatibleClientServer(); @Message(id = 119034, value = "Server not started", format = Message.Format.MESSAGE_FORMAT) - HornetQSessionCreationException serverNotStarted(); + ActiveMQSessionCreationException serverNotStarted(); @Message(id = 119035, value = "Metadata {0}={1} had been set already", format = Message.Format.MESSAGE_FORMAT) - HornetQDuplicateMetaDataException duplicateMetadata(String key, String data); + ActiveMQDuplicateMetaDataException duplicateMetadata(String key, String data); @Message(id = 119036, value = "Invalid type: {0}", format = Message.Format.MESSAGE_FORMAT) IllegalArgumentException invalidType(Object type); @@ -307,7 +307,7 @@ public interface HornetQMessageBundle * Exception used on on {@link org.apache.activemq.core.server.impl.HornetQServerImpl#destroyConnectionWithSessionMetadata(String, String)} */ @Message(id = 119078, value = "Disconnected per admin''s request on {0}={1}", format = Message.Format.MESSAGE_FORMAT) - HornetQDisconnectedException destroyConnectionWithSessionMetadataSendException(String key, String value); + ActiveMQDisconnectedException destroyConnectionWithSessionMetadataSendException(String key, String value); /** * Message used on on {@link org.apache.activemq.core.server.impl.HornetQServerImpl#destroyConnectionWithSessionMetadata(String, String)} @@ -316,25 +316,25 @@ public interface HornetQMessageBundle String destroyConnectionWithSessionMetadataNoSessionFound(String key, String value); @Message(id = 119080, value = "Invalid Page IO, PagingManager was stopped or closed", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException invalidPageIO(); + ActiveMQIllegalStateException invalidPageIO(); @Message(id = 119081, value = "No Discovery Group configuration named {0} found", format = Message.Format.MESSAGE_FORMAT) - HornetQException noDiscoveryGroupFound(DiscoveryGroupConfiguration dg); + ActiveMQException noDiscoveryGroupFound(DiscoveryGroupConfiguration dg); @Message(id = 119082, value = "Queue {0} already exists on another subscription", format = Message.Format.MESSAGE_FORMAT) - HornetQInvalidTransientQueueUseException queueSubscriptionBelongsToDifferentAddress(SimpleString queueName); + ActiveMQInvalidTransientQueueUseException queueSubscriptionBelongsToDifferentAddress(SimpleString queueName); @Message(id = 119083, value = "Queue {0} has a different filter than requested", format = Message.Format.MESSAGE_FORMAT) - HornetQInvalidTransientQueueUseException queueSubscriptionBelongsToDifferentFilter(SimpleString queueName); + ActiveMQInvalidTransientQueueUseException queueSubscriptionBelongsToDifferentFilter(SimpleString queueName); @Message(id = 119085, value = "Classpath lacks a protocol-manager for protocol {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQException noProtocolManagerFound(String protocol); + ActiveMQException noProtocolManagerFound(String protocol); // this code has to match with version 2.3.x as it's used on integration tests at Wildfly and JBoss EAP @Message(id = 119099, value = "Unable to authenticate cluster user: {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQClusterSecurityException unableToValidateClusterUser(String user); + ActiveMQClusterSecurityException unableToValidateClusterUser(String user); @Message(id = 119100, value = "Trying to move a journal file that refers to a file instead of a directory: {0}", @@ -346,26 +346,26 @@ public interface HornetQMessageBundle IllegalStateException couldNotMoveJournal(File dir); @Message(id = 119102, value = "Address \"{0}\" is full.", format = Message.Format.MESSAGE_FORMAT) - HornetQAddressFullException addressIsFull(String addressName); + ActiveMQAddressFullException addressIsFull(String addressName); @Message(id = 119103, value = "No Connectors or Discovery Groups configured for Scale Down", format = Message.Format.MESSAGE_FORMAT) - HornetQException noConfigurationFoundForScaleDown(); + ActiveMQException noConfigurationFoundForScaleDown(); @Message(id = 119104, value = "Server is stopping. Message grouping not allowed", format = Message.Format.MESSAGE_FORMAT) - HornetQException groupWhileStopping(); + ActiveMQException groupWhileStopping(); @Message(id = 119105, value = "Server will not accept create session request since scale down has not occurred", format = Message.Format.MESSAGE_FORMAT) - HornetQSessionCreationException sessionNotFailedOver(); + ActiveMQSessionCreationException sessionNotFailedOver(); @Message(id = 119106, value = "Invalid slow consumer policy type {0}", format = Message.Format.MESSAGE_FORMAT) IllegalArgumentException invalidSlowConsumerPolicyType(String val); @Message(id = 119107, value = "consumer connections for address {0} closed by management", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException consumerConnectionsClosedByManagement(String address); + ActiveMQInternalErrorException consumerConnectionsClosedByManagement(String address); @Message(id = 119108, value = "connections for user {0} closed by management", format = Message.Format.MESSAGE_FORMAT) - HornetQInternalErrorException connectionsForUserClosedByManagement(String userName); + ActiveMQInternalErrorException connectionsForUserClosedByManagement(String userName); @Message(id = 119109, value = "unsupported HA Policy Configuration {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException unsupportedHAPolicyConfiguration(Object o); + ActiveMQIllegalStateException unsupportedHAPolicyConfiguration(Object o); } 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/HornetQServerLogger.java index 9a6b1a05df..1647d03e23 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/HornetQServerLogger.java @@ -40,7 +40,7 @@ import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; import io.netty.channel.Channel; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.client.impl.ServerLocatorInternal; @@ -577,7 +577,7 @@ public interface HornetQServerLogger extends BasicLogger @LogMessage(level = Logger.Level.WARN) @Message(id = 222067, value = "Connection failure has been detected: {0} [code={1}]", format = Message.Format.MESSAGE_FORMAT) - void connectionFailureDetected(String message, HornetQExceptionType type); + void connectionFailureDetected(String message, ActiveMQExceptionType type); @LogMessage(level = Logger.Level.WARN) @Message(id = 222069, value = "error cleaning up stomp connection", format = Message.Format.MESSAGE_FORMAT) diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/LargeServerMessage.java b/activemq-server/src/main/java/org/apache/activemq/core/server/LargeServerMessage.java index 6e4bce894d..c43e5631c2 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/LargeServerMessage.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/LargeServerMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.server; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.replication.ReplicatedLargeMessage; @@ -47,7 +47,7 @@ public interface LargeServerMessage extends ServerMessage, ReplicatedLargeMessag /** * @return - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - SequentialFile getFile() throws HornetQException; + SequentialFile getFile() throws ActiveMQException; } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/LiveNodeLocator.java b/activemq-server/src/main/java/org/apache/activemq/core/server/LiveNodeLocator.java index 2adbfcdf1a..6d3985c02e 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/LiveNodeLocator.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/LiveNodeLocator.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.server; -import org.apache.activemq.api.core.HornetQException; +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.ClusterTopologyListener; @@ -48,12 +48,12 @@ public abstract class LiveNodeLocator implements ClusterTopologyListener /** * Locates a possible live server in a cluster with a timeout */ - public abstract void locateNode(long timeout) throws HornetQException; + public abstract void locateNode(long timeout) throws ActiveMQException; /** * Locates a possible live server in a cluster */ - public abstract void locateNode() throws HornetQException; + public abstract void locateNode() throws ActiveMQException; /** * Returns the current connector @@ -86,7 +86,7 @@ public abstract class LiveNodeLocator implements ClusterTopologyListener /** * connects to the cluster */ - public void connectToCluster(ServerLocatorInternal serverLocator) throws HornetQException + public void connectToCluster(ServerLocatorInternal serverLocator) throws ActiveMQException { serverLocator.connect(); } 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 20dc50a15a..5828bdf263 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 @@ -18,7 +18,7 @@ import java.io.RandomAccessFile; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; -import org.apache.activemq.api.core.HornetQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.utils.UUID; import org.apache.activemq.utils.UUIDGenerator; @@ -83,7 +83,7 @@ public abstract class NodeManager implements HornetQComponent } } - public abstract SimpleString readNodeId() throws HornetQIllegalStateException, IOException; + public abstract SimpleString readNodeId() throws ActiveMQIllegalStateException, IOException; public UUID getUUID() { 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 ed1d004f48..ccd4805f88 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 @@ -14,7 +14,7 @@ package org.apache.activemq.core.server.cluster; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; @@ -67,9 +67,9 @@ public class ClusterControl implements AutoCloseable * authorise this cluster control so it can communicate with the cluster, it will set the cluster channel on a successful * authentication. * - * @throws HornetQException if authorisation wasn't successful. + * @throws org.apache.activemq.api.core.ActiveMQException if authorisation wasn't successful. */ - public void authorize() throws HornetQException + public void authorize() throws ActiveMQException { CoreRemotingConnection connection = (CoreRemotingConnection)sessionFactory.getConnection(); @@ -90,16 +90,16 @@ public class ClusterControl implements AutoCloseable * @param attemptingFailBack if {@code true} then this server wants to trigger a fail-back when * up-to-date, that is it wants to take over the role of 'live' from the current 'live' * server. - * @throws org.apache.activemq.api.core.HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - public void announceReplicatingBackupToLive(final boolean attemptingFailBack, String replicationClusterName) throws HornetQException + public void announceReplicatingBackupToLive(final boolean attemptingFailBack, String replicationClusterName) throws ActiveMQException { ClusterConnectionConfiguration config = ConfigurationUtils.getReplicationClusterConfiguration(server.getConfiguration(), replicationClusterName); if (config == null) { HornetQServerLogger.LOGGER.announceBackupNoClusterConnections(); - throw new HornetQException("lacking cluster connection"); + throw new ActiveMQException("lacking cluster connection"); } TransportConfiguration connector = server.getConfiguration().getConnectorConfigurations().get(config.getConnectorName()); @@ -107,7 +107,7 @@ public class ClusterControl implements AutoCloseable if (connector == null) { HornetQServerLogger.LOGGER.announceBackupNoConnector(config.getConnectorName()); - throw new HornetQException("lacking cluster connection"); + throw new ActiveMQException("lacking cluster connection"); } clusterChannel.send(new BackupRegistrationMessage(connector, clusterUser, clusterPassword, attemptingFailBack)); @@ -174,7 +174,7 @@ public class ClusterControl implements AutoCloseable replyMessage.decodeRest(voteHandler); return replyMessage.getVote(); } - catch (HornetQException e) + catch (ActiveMQException e) { return null; } @@ -193,7 +193,7 @@ public class ClusterControl implements AutoCloseable { packet = (BackupResponseMessage) clusterChannel.sendBlocking(backupRequestMessage, PacketImpl.BACKUP_REQUEST_RESPONSE); } - catch (HornetQException e) + catch (ActiveMQException e) { return false; } 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 39accdc620..383678881a 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 @@ -20,8 +20,8 @@ import java.util.concurrent.Executor; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; @@ -444,7 +444,7 @@ public class ClusterController implements HornetQComponent replicationClusterConnectedLatch.countDown(); } } - catch (HornetQException e) + catch (ActiveMQException e) { if (!started) return; 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 150701b682..3ecdbaa015 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 @@ -24,10 +24,10 @@ import java.util.Set; import java.util.concurrent.Executor; import java.util.concurrent.ScheduledExecutorService; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.BroadcastGroupConfiguration; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -591,13 +591,13 @@ public final class ClusterManager implements HornetQComponent } @Override - public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException + public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.EXCEPTION) { HornetQExceptionMessage msg = (HornetQExceptionMessage) packet; - final HornetQException exception = msg.getException(); - if (exception.getType() == HornetQExceptionType.CLUSTER_SECURITY_EXCEPTION) + final ActiveMQException exception = msg.getException(); + if (exception.getType() == ActiveMQExceptionType.CLUSTER_SECURITY_EXCEPTION) { HornetQServerLogger.LOGGER.clusterManagerAuthenticationError(exception.getMessage()); executor.execute(new Runnable() 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 b186a7f4e9..dfb6f5720f 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 @@ -12,8 +12,8 @@ */ 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.HornetQException; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.HornetQClient; import org.apache.activemq.core.client.impl.ServerLocatorInternal; @@ -110,7 +110,7 @@ public class ScaleDownPolicy this.enabled = enabled; } - public static ServerLocatorInternal getScaleDownConnector(ScaleDownPolicy scaleDownPolicy, HornetQServer hornetQServer) throws HornetQException + public static ServerLocatorInternal getScaleDownConnector(ScaleDownPolicy scaleDownPolicy, HornetQServer hornetQServer) throws ActiveMQException { if (!scaleDownPolicy.getConnectors().isEmpty()) { 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 be427be29c..93af434426 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 @@ -22,8 +22,8 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -619,12 +619,12 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled // no op } - public void connectionFailed(final HornetQException me, boolean failedOver) + public void connectionFailed(final ActiveMQException me, boolean failedOver) { connectionFailed(me, failedOver, null); } - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { HornetQServerLogger.LOGGER.bridgeConnectionFailed(me, failedOver); @@ -689,12 +689,12 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled tryScheduleRetryReconnect(me.getType()); } - protected void tryScheduleRetryReconnect(final HornetQExceptionType type) + protected void tryScheduleRetryReconnect(final ActiveMQExceptionType type) { scheduleRetryConnect(); } - public void beforeReconnect(final HornetQException exception) + public void beforeReconnect(final ActiveMQException exception) { // log.warn(name + "::Connection failed before reconnect ", exception); // fail(false); @@ -722,7 +722,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled queue.deliverAsync(); } } - catch (final HornetQException e) + catch (final ActiveMQException e) { unsetLargeMessageDelivery(); HornetQServerLogger.LOGGER.bridgeUnableToSendMessage(e, ref); @@ -754,7 +754,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled { producer.send(dest, message); } - catch (final HornetQException e) + catch (final ActiveMQException e) { HornetQServerLogger.LOGGER.bridgeUnableToSendMessage(e, ref); @@ -996,10 +996,10 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled keepConnecting = false; return; } - catch (HornetQException e) + catch (ActiveMQException e) { // the session was created while its server was starting, retry it: - if (e.getType() == HornetQExceptionType.SESSION_CREATION_REJECTED) + if (e.getType() == ActiveMQExceptionType.SESSION_CREATION_REJECTED) { HornetQServerLogger.LOGGER.errorStartingBridge(name); @@ -1185,7 +1185,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled session.close(); session = null; } - catch (HornetQException dontcare) + catch (ActiveMQException dontcare) { } } 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 639f8b2a1d..33e8faeeaa 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 @@ -18,10 +18,10 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.BroadcastEndpoint; import org.apache.activemq.api.core.BroadcastEndpointFactory; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.CoreNotificationType; @@ -197,7 +197,7 @@ public class BroadcastGroupImpl implements BroadcastGroup, Runnable public synchronized void broadcastConnectors() throws Exception { - HornetQBuffer buff = HornetQBuffers.dynamicBuffer(4096); + ActiveMQBuffer buff = ActiveMQBuffers.dynamicBuffer(4096); buff.writeString(nodeManager.getNodeId().toString()); 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 9dc8503f39..9d43f5892f 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 @@ -19,8 +19,8 @@ import java.util.Set; import java.util.concurrent.Executor; import java.util.concurrent.ScheduledExecutorService; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -233,7 +233,7 @@ public class ClusterConnectionBridge extends BridgeImpl notifConsumer = null; } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQServerLogger.LOGGER.errorClosingConsumer(e); } @@ -384,7 +384,7 @@ public class ClusterConnectionBridge extends BridgeImpl } @Override - protected void tryScheduleRetryReconnect(final HornetQExceptionType type) + protected void tryScheduleRetryReconnect(final ActiveMQExceptionType type) { scheduleRetryConnect(); } 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 4dc8b00b65..eb13e7e2a0 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 @@ -25,8 +25,8 @@ import java.util.concurrent.Executor; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -526,7 +526,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn false, localMember.getLive(), localMember.getBackup()); } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQServerLogger.LOGGER.clusterControlAuthfailure(); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/BooleanVote.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/BooleanVote.java index f76cfe423b..6d6aff0885 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/BooleanVote.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/BooleanVote.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.server.cluster.qourum; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import java.util.Map; @@ -46,13 +46,13 @@ public final class BooleanVote extends Vote } @Override - public void encode(HornetQBuffer buff) + public void encode(ActiveMQBuffer buff) { buff.writeBoolean(vote); } @Override - public void decode(HornetQBuffer buff) + public void decode(ActiveMQBuffer buff) { vote = buff.readBoolean(); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/QuorumVoteHandler.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/QuorumVoteHandler.java index 9158d634ac..c10e621bc6 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/QuorumVoteHandler.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/QuorumVoteHandler.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.server.cluster.qourum; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; /** @@ -33,5 +33,5 @@ public interface QuorumVoteHandler */ SimpleString getQuorumName(); - Vote decode(HornetQBuffer voteBuffer); + Vote decode(ActiveMQBuffer voteBuffer); } 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 38fcffda0b..2285b5adfd 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 @@ -17,8 +17,8 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.client.impl.Topology; import org.apache.activemq.core.persistence.StorageManager; @@ -105,9 +105,9 @@ public class SharedNothingBackupQuorum implements Quorum, FailureListener sessionFactory.connect(RECONNECT_ATTEMPTS, false); return; } - catch (HornetQException e) + catch (ActiveMQException e) { - if (e.getType() != HornetQExceptionType.NOT_CONNECTED) + if (e.getType() != ActiveMQExceptionType.NOT_CONNECTED) HornetQServerLogger.LOGGER.errorReConnecting(e); } } @@ -157,13 +157,13 @@ public class SharedNothingBackupQuorum implements Quorum, FailureListener * if the connection to our replicated live goes down then decide on an action */ @Override - public void connectionFailed(HornetQException exception, boolean failedOver) + public void connectionFailed(ActiveMQException exception, boolean failedOver) { decideOnAction(sessionFactory.getServerLocator().getTopology()); } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/Vote.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/Vote.java index f781ec6ad4..a4e847d262 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/Vote.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/qourum/Vote.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.server.cluster.qourum; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import java.util.HashMap; import java.util.Map; @@ -31,9 +31,9 @@ public abstract class Vote } - public abstract void encode(final HornetQBuffer buff); + public abstract void encode(final ActiveMQBuffer buff); - public abstract void decode(final HornetQBuffer buff); + public abstract void decode(final ActiveMQBuffer buff); //whether or note we should ask the target server for an answer or decide ourselves, for instance if we couldn't //connect to the node in the first place. public abstract boolean isRequestServerVote(); 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 b69a5ab005..4d1e874a6a 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.server.impl; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.paging.PagingManager; import org.apache.activemq.core.persistence.StorageManager; @@ -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 HornetQException + public JournalLoader createJournalLoader(PostOffice postOffice, PagingManager pagingManager, StorageManager storageManager, QueueFactory queueFactory, NodeManager nodeManager, ManagementService managementService, GroupingHandler groupingHandler, Configuration configuration, HornetQServer parentServer) throws ActiveMQException { return new PostOfficeJournalLoader(postOffice, pagingManager, 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 ec38067046..1d0bb8252e 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 @@ -21,7 +21,7 @@ import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import org.apache.activemq.api.core.HornetQException; +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; @@ -51,13 +51,13 @@ public class AnyLiveNodeLocatorForReplication extends LiveNodeLocator } @Override - public void locateNode() throws HornetQException + public void locateNode() throws ActiveMQException { locateNode(-1L); } @Override - public void locateNode(long timeout) throws HornetQException + public void locateNode(long timeout) throws ActiveMQException { //first time try 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 c7be0dbe93..d2d463b293 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 @@ -21,7 +21,7 @@ import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import org.apache.activemq.api.core.HornetQException; +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; @@ -52,13 +52,13 @@ public class AnyLiveNodeLocatorForScaleDown extends LiveNodeLocator } @Override - public void locateNode() throws HornetQException + public void locateNode() throws ActiveMQException { locateNode(-1L); } @Override - public void locateNode(long timeout) throws HornetQException + public void locateNode(long timeout) throws ActiveMQException { try { @@ -71,7 +71,7 @@ public class AnyLiveNodeLocatorForScaleDown extends LiveNodeLocator { if (!condition.await(timeout, TimeUnit.MILLISECONDS)) { - throw new HornetQException("Timeout elapsed while waiting for cluster node"); + throw new ActiveMQException("Timeout elapsed while waiting for cluster node"); } } else 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 73eebd4838..cfc9169444 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.server.impl; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.client.impl.Topology; @@ -174,7 +174,7 @@ public class ColocatedActivation extends LiveActivation } @Override - public Vote decode(HornetQBuffer voteBuffer) + public Vote decode(ActiveMQBuffer voteBuffer) { RequestBackupVote requestBackupVote = new RequestBackupVote(); requestBackupVote.decode(voteBuffer); @@ -301,7 +301,7 @@ public class ColocatedActivation extends LiveActivation } @Override - public void encode(HornetQBuffer buff) + public void encode(ActiveMQBuffer buff) { buff.writeInt(backupsSize); buff.writeNullableString(nodeID); @@ -309,7 +309,7 @@ public class ColocatedActivation extends LiveActivation } @Override - public void decode(HornetQBuffer buff) + public void decode(ActiveMQBuffer buff) { backupsSize = buff.readInt(); nodeID = buff.readNullableString(); 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 cfa7f211e3..0a18b1aa6f 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 @@ -16,7 +16,7 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.FileLock; -import org.apache.activemq.api.core.HornetQIllegalStateException; +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.NodeManager; @@ -257,13 +257,13 @@ public class FileLockNodeManager extends NodeManager } @Override - public final SimpleString readNodeId() throws HornetQIllegalStateException, IOException + public final SimpleString readNodeId() throws ActiveMQIllegalStateException, IOException { ByteBuffer id = ByteBuffer.allocateDirect(16); int read = channel.read(id, 3); if (read != 16) { - throw new HornetQIllegalStateException("live server did not write id to file"); + throw new ActiveMQIllegalStateException("live server did not write id to file"); } byte[] bytes = new byte[16]; id.position(0); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/InVMNodeManager.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/InVMNodeManager.java index 0e7ef7bd7e..a65f1d5c9f 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/InVMNodeManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/InVMNodeManager.java @@ -20,7 +20,7 @@ import static org.apache.activemq.core.server.impl.InVMNodeManager.State.PAUSED; import java.io.IOException; import java.util.concurrent.Semaphore; -import org.apache.activemq.api.core.HornetQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.server.NodeManager; import org.apache.activemq.utils.UUIDGenerator; @@ -157,7 +157,7 @@ public final class InVMNodeManager extends NodeManager } @Override - public SimpleString readNodeId() throws HornetQIllegalStateException, IOException + public SimpleString readNodeId() throws ActiveMQIllegalStateException, IOException { return getNodeId(); } 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 c79fd318bc..a352f7c845 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.server.impl; -import org.apache.activemq.api.core.HornetQException; +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; @@ -168,7 +168,7 @@ public class LiveOnlyActivation extends Activation } else { - throw new HornetQException("Unable to connect to server for scale-down"); + throw new ActiveMQException("Unable to connect to server for scale-down"); } } catch (Exception e) diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/NamedLiveNodeLocatorForReplication.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/NamedLiveNodeLocatorForReplication.java index 16683d8ec7..67eb291e00 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/NamedLiveNodeLocatorForReplication.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/NamedLiveNodeLocatorForReplication.java @@ -18,7 +18,7 @@ import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import org.apache.activemq.api.core.HornetQException; +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; @@ -47,13 +47,13 @@ public class NamedLiveNodeLocatorForReplication extends LiveNodeLocator } @Override - public void locateNode() throws HornetQException + public void locateNode() throws ActiveMQException { locateNode(-1L); } @Override - public void locateNode(long timeout) throws HornetQException + public void locateNode(long timeout) throws ActiveMQException { try { 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 7e67be952f..bd963a62ef 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 @@ -21,7 +21,7 @@ import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import org.apache.activemq.api.core.HornetQException; +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; @@ -54,13 +54,13 @@ public class NamedLiveNodeLocatorForScaleDown extends LiveNodeLocator } @Override - public void locateNode() throws HornetQException + public void locateNode() throws ActiveMQException { locateNode(-1L); } @Override - public void locateNode(long timeout) throws HornetQException + public void locateNode(long timeout) throws ActiveMQException { try { @@ -73,7 +73,7 @@ public class NamedLiveNodeLocatorForScaleDown extends LiveNodeLocator { if (!condition.await(timeout, TimeUnit.MILLISECONDS)) { - throw new HornetQException("Timeout elapsed while waiting for cluster node"); + throw new ActiveMQException("Timeout elapsed while waiting for cluster node"); } } else diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/NamedNodeIdNodeLocator.java b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/NamedNodeIdNodeLocator.java index efe73ed013..c109574c44 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/impl/NamedNodeIdNodeLocator.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/impl/NamedNodeIdNodeLocator.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.server.impl; -import org.apache.activemq.api.core.HornetQException; +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; @@ -33,13 +33,13 @@ public class NamedNodeIdNodeLocator extends LiveNodeLocator @Override - public void locateNode(long timeout) throws HornetQException + public void locateNode(long timeout) throws ActiveMQException { //noop } @Override - public void locateNode() throws HornetQException + public void locateNode() throws ActiveMQException { //noop } 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 ab41397a8a..eedcdf0eb9 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 @@ -15,8 +15,8 @@ */ package org.apache.activemq.core.server.impl; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQInternalErrorException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQInternalErrorException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -45,7 +45,7 @@ final class ReplicationError implements Interceptor } @Override - public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException + public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { if (packet.getType() != PacketImpl.BACKUP_REGISTRATION_FAILED) return true; @@ -68,7 +68,7 @@ final class ReplicationError implements Interceptor return false; } - private void failed() throws HornetQInternalErrorException + private void failed() throws ActiveMQInternalErrorException { HornetQServerLogger.LOGGER.errorRegisteringBackup(); nodeLocator.notifyRegistrationFailed(false); 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 a68533ab72..16ba90841d 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 @@ -23,10 +23,10 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQIllegalStateException; +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.ActiveMQIllegalStateException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.management.CoreNotificationType; import org.apache.activemq.api.core.management.ManagementHelper; @@ -781,7 +781,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener tx.commit(); } } - catch (HornetQException e) + catch (ActiveMQException e) { if (startedTransaction) { @@ -796,7 +796,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener catch (Throwable e) { HornetQServerLogger.LOGGER.errorAckingMessage((Exception) e); - HornetQException hqex = new HornetQIllegalStateException(e.getMessage()); + ActiveMQException hqex = new ActiveMQIllegalStateException(e.getMessage()); if (startedTransaction) { tx.rollback(); @@ -1122,7 +1122,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener localChunkLen = (int) Math.min(sizePendingLargeMessage - positionPendingLargeMessage, minLargeMessageSize); - HornetQBuffer bodyBuffer = HornetQBuffers.fixedBuffer(localChunkLen); + ActiveMQBuffer bodyBuffer = ActiveMQBuffers.fixedBuffer(localChunkLen); context.encode(bodyBuffer, localChunkLen); 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 44871cb3c1..29d1b2d7bd 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 @@ -38,8 +38,8 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQNonExistentQueueException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQNonExistentQueueException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; @@ -625,7 +625,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { server.destroyQueue(bindingName, null, false); } - catch (HornetQException e) + catch (ActiveMQException e) { // that's fine.. it can happen due to queue already been deleted HornetQServerLogger.LOGGER.debug(e.getMessage(), e); @@ -637,13 +637,13 @@ public class ServerSessionImpl implements ServerSession, FailureListener } } - public void connectionFailed(HornetQException exception, boolean failedOver) + public void connectionFailed(ActiveMQException exception, boolean failedOver) { run(); } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } @@ -667,7 +667,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener if (binding == null || binding.getType() != BindingType.LOCAL_QUEUE) { - throw new HornetQNonExistentQueueException(); + throw new ActiveMQNonExistentQueueException(); } server.destroyQueue(queueToDelete, this, true); @@ -1224,7 +1224,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { tx = newTransaction(xid); - tx.markAsRollbackOnly(new HornetQException("Can't commit as a Failover happened during the operation")); + tx.markAsRollbackOnly(new ActiveMQException("Can't commit as a Failover happened during the operation")); if (isTrace) { @@ -1682,7 +1682,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener // -------------------------------------------------------------------- @Override - public void connectionFailed(final HornetQException me, boolean failedOver) + public void connectionFailed(final ActiveMQException me, boolean failedOver) { try { @@ -1699,7 +1699,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } @@ -1738,7 +1738,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { securityStore.check(message.getAddress(), CheckType.MANAGE, this); } - catch (HornetQException e) + catch (ActiveMQException e) { if (!autoCommitSends) { @@ -1822,7 +1822,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { securityStore.check(msg.getAddress(), CheckType.SEND, this); } - catch (HornetQException e) + catch (ActiveMQException e) { if (!autoCommitSends && tx != null) { 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 f84aa61064..682d183316 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 @@ -12,8 +12,8 @@ */ package org.apache.activemq.core.server.impl; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQInternalErrorException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQInternalErrorException; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.TopologyMember; @@ -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 HornetQException + public JournalLoader createJournalLoader(PostOffice postOffice, PagingManager pagingManager, StorageManager storageManager, QueueFactory queueFactory, NodeManager nodeManager, ManagementService managementService, GroupingHandler groupingHandler, Configuration configuration, HornetQServer parentServer) throws ActiveMQException { if (replicaPolicy.getScaleDownPolicy() != null) { @@ -425,15 +425,15 @@ public final class SharedNothingBackupActivation extends Activation } /** - * @throws org.apache.activemq.api.core.HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - public void remoteFailOver(ReplicationLiveIsStoppingMessage.LiveStopping finalMessage) throws HornetQException + public void remoteFailOver(ReplicationLiveIsStoppingMessage.LiveStopping finalMessage) throws ActiveMQException { HornetQServerLogger.LOGGER.trace("Remote fail-over, got message=" + finalMessage + ", backupUpToDate=" + backupUpToDate); if (!hornetQServer.getHAPolicy().isBackup() || hornetQServer.getHAPolicy().isSharedStore()) { - throw new HornetQInternalErrorException(); + throw new ActiveMQInternalErrorException(); } if (!backupUpToDate) 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 8621912d5e..7bad256673 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 @@ -12,10 +12,10 @@ */ package org.apache.activemq.core.server.impl; +import org.apache.activemq.api.core.ActiveMQAlreadyReplicatingException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; -import org.apache.activemq.api.core.HornetQAlreadyReplicatingException; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQIllegalStateException; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -131,11 +131,11 @@ public class SharedNothingLiveActivation extends LiveActivation startReplication(channel.getConnection(), clusterConnection, getPair(msg.getConnector(), true), msg.isFailBackRequest()); } - catch (HornetQAlreadyReplicatingException are) + catch (ActiveMQAlreadyReplicatingException are) { channel.send(new BackupReplicationStartFailedMessage(BackupReplicationStartFailedMessage.BackupRegistrationProblem.ALREADY_REPLICATING)); } - catch (HornetQException e) + catch (ActiveMQException e) { channel.send(new BackupReplicationStartFailedMessage(BackupReplicationStartFailedMessage.BackupRegistrationProblem.EXCEPTION)); } @@ -145,16 +145,16 @@ public class SharedNothingLiveActivation extends LiveActivation } public void startReplication(CoreRemotingConnection rc, final ClusterConnection clusterConnection, - final Pair pair, final boolean isFailBackRequest) throws HornetQException + final Pair pair, final boolean isFailBackRequest) throws ActiveMQException { if (replicationManager != null) { - throw new HornetQAlreadyReplicatingException(); + throw new ActiveMQAlreadyReplicatingException(); } if (!hornetQServer.isStarted()) { - throw new HornetQIllegalStateException(); + throw new ActiveMQIllegalStateException(); } synchronized (replicationLock) @@ -162,7 +162,7 @@ public class SharedNothingLiveActivation extends LiveActivation if (replicationManager != null) { - throw new HornetQAlreadyReplicatingException(); + throw new ActiveMQAlreadyReplicatingException(); } ReplicationFailureListener listener = new ReplicationFailureListener(); rc.addCloseListener(listener); @@ -256,13 +256,13 @@ public class SharedNothingLiveActivation extends LiveActivation { @Override - public void connectionFailed(HornetQException exception, boolean failedOver) + public void connectionFailed(ActiveMQException exception, boolean failedOver) { connectionClosed(); } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } @@ -313,7 +313,7 @@ public class SharedNothingLiveActivation extends LiveActivation { nodeId0 = hornetQServer.getNodeManager().readNodeId(); } - catch (HornetQIllegalStateException e) + catch (ActiveMQIllegalStateException e) { nodeId0 = null; } @@ -405,7 +405,7 @@ public class SharedNothingLiveActivation extends LiveActivation } } - private ServerLocatorInternal getLocator(ClusterConnectionConfiguration config) throws HornetQException + private ServerLocatorInternal getLocator(ClusterConnectionConfiguration config) throws ActiveMQException { ServerLocatorInternal locator; if (config.getDiscoveryGroupName() != 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 02b4f6841e..8c902cd3a7 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.server.impl; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.paging.PagingManager; import org.apache.activemq.core.persistence.StorageManager; @@ -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 HornetQException + public JournalLoader createJournalLoader(PostOffice postOffice, PagingManager pagingManager, StorageManager storageManager, QueueFactory queueFactory, NodeManager nodeManager, ManagementService managementService, GroupingHandler groupingHandler, Configuration configuration, HornetQServer parentServer) throws ActiveMQException { if (sharedStoreSlavePolicy.getScaleDownPolicy() != 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 7c1d7dbd04..3cf3566ab0 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.server.impl; -import org.apache.activemq.api.core.HornetQException; +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; @@ -44,7 +44,7 @@ public class TransientQueueManagerImpl implements TransientQueueManager { server.destroyQueue(queueName, null, false); } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQServerLogger.LOGGER.warn("Error on deleting queue " + queueName + ", " + e.getMessage(), e); } diff --git a/activemq-server/src/main/java/org/apache/activemq/core/settings/impl/AddressSettings.java b/activemq-server/src/main/java/org/apache/activemq/core/settings/impl/AddressSettings.java index a88b2092fb..315b116754 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/settings/impl/AddressSettings.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/settings/impl/AddressSettings.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.settings.impl; import java.io.Serializable; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.settings.Mergeable; @@ -397,7 +397,7 @@ public class AddressSettings implements Mergeable, Serializable } @Override - public void decode(HornetQBuffer buffer) + public void decode(ActiveMQBuffer buffer) { SimpleString policyStr = buffer.readNullableSimpleString(); @@ -482,7 +482,7 @@ public class AddressSettings implements Mergeable, Serializable } @Override - public void encode(HornetQBuffer buffer) + public void encode(ActiveMQBuffer buffer) { buffer.writeNullableSimpleString(addressFullMessagePolicy != null ? new SimpleString(addressFullMessagePolicy.toString()) : null); 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 9fd5379380..09d3d96f1a 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 @@ -16,7 +16,7 @@ import java.util.List; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.impl.RefsOperation; @@ -53,7 +53,7 @@ public interface Transaction void setState(State state); - void markAsRollbackOnly(HornetQException exception); + void markAsRollbackOnly(ActiveMQException exception); long getCreateTime(); diff --git a/activemq-server/src/main/java/org/apache/activemq/core/transaction/impl/TransactionImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/transaction/impl/TransactionImpl.java index 4e9fcb6667..b6ba3bef66 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/transaction/impl/TransactionImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/transaction/impl/TransactionImpl.java @@ -31,7 +31,7 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.server.HornetQServerLogger; @@ -63,7 +63,7 @@ public class TransactionImpl implements Transaction private volatile State state = State.ACTIVE; - private HornetQException exception; + private ActiveMQException exception; private final Object timeoutLock = new Object(); @@ -385,7 +385,7 @@ public class TransactionImpl implements Transaction return xid; } - public void markAsRollbackOnly(final HornetQException exception1) + public void markAsRollbackOnly(final ActiveMQException exception1) { if (HornetQServerLogger.LOGGER.isDebugEnabled()) { diff --git a/activemq-server/src/main/java/org/apache/activemq/spi/core/protocol/ProtocolManager.java b/activemq-server/src/main/java/org/apache/activemq/spi/core/protocol/ProtocolManager.java index 5c3d1bc25f..594257ae98 100644 --- a/activemq-server/src/main/java/org/apache/activemq/spi/core/protocol/ProtocolManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/spi/core/protocol/ProtocolManager.java @@ -13,7 +13,7 @@ package org.apache.activemq.spi.core.protocol; import io.netty.channel.ChannelPipeline; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.remoting.impl.netty.NettyServerConnection; import org.apache.activemq.spi.core.remoting.Acceptor; import org.apache.activemq.spi.core.remoting.Connection; @@ -29,7 +29,7 @@ public interface ProtocolManager void removeHandler(final String name); - void handleBuffer(RemotingConnection connection, HornetQBuffer buffer); + void handleBuffer(RemotingConnection connection, ActiveMQBuffer buffer); void addChannelHandlers(ChannelPipeline pipeline); @@ -42,5 +42,5 @@ public interface ProtocolManager */ MessageConverter getConverter(); - void handshake(NettyServerConnection connection, HornetQBuffer buffer); + void handshake(NettyServerConnection connection, ActiveMQBuffer buffer); } 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 9722a6c689..693c0161e1 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 @@ -12,8 +12,8 @@ */ package org.apache.activemq.core.filter.impl; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQInvalidFilterExpressionException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQInvalidFilterExpressionException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.filter.Filter; import org.apache.activemq.core.server.ServerMessage; @@ -734,11 +734,11 @@ public class FilterTest extends SilentTestCase filter = FilterImpl.createFilter(filterString); Assert.fail("Should throw exception"); } - catch (HornetQInvalidFilterExpressionException ife) + catch (ActiveMQInvalidFilterExpressionException ife) { //pass } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid exception type:" + e.getType()); } @@ -751,11 +751,11 @@ public class FilterTest extends SilentTestCase filter = FilterImpl.createFilter(filterString); Assert.fail("Should throw exception"); } - catch (HornetQInvalidFilterExpressionException ife) + catch (ActiveMQInvalidFilterExpressionException ife) { //pass } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid exception type:" + e.getType()); } 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 109aede456..7be2bf17d0 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 @@ -28,9 +28,9 @@ import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQPropertyConversionException; +import org.apache.activemq.api.core.ActiveMQBuffer; +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.filter.Filter; @@ -461,19 +461,19 @@ public class ScheduledDeliveryHandlerTest extends Assert } @Override - public void encode(HornetQBuffer buffer) + public void encode(ActiveMQBuffer buffer) { } @Override - public void decode(HornetQBuffer buffer) + public void decode(ActiveMQBuffer buffer) { } @Override - public void decodeFromBuffer(HornetQBuffer buffer) + public void decodeFromBuffer(ActiveMQBuffer buffer) { } @@ -515,7 +515,7 @@ public class ScheduledDeliveryHandlerTest extends Assert } @Override - public HornetQBuffer getEncodedBuffer() + public ActiveMQBuffer getEncodedBuffer() { return null; } @@ -527,25 +527,25 @@ public class ScheduledDeliveryHandlerTest extends Assert } @Override - public HornetQBuffer getWholeBuffer() + public ActiveMQBuffer getWholeBuffer() { return null; } @Override - public void encodeHeadersAndProperties(HornetQBuffer buffer) + public void encodeHeadersAndProperties(ActiveMQBuffer buffer) { } @Override - public void decodeHeadersAndProperties(HornetQBuffer buffer) + public void decodeHeadersAndProperties(ActiveMQBuffer buffer) { } @Override - public BodyEncoder getBodyEncoder() throws HornetQException + public BodyEncoder getBodyEncoder() throws ActiveMQException { return null; } @@ -665,13 +665,13 @@ public class ScheduledDeliveryHandlerTest extends Assert } @Override - public HornetQBuffer getBodyBuffer() + public ActiveMQBuffer getBodyBuffer() { return null; } @Override - public HornetQBuffer getBodyBufferCopy() + public ActiveMQBuffer getBodyBufferCopy() { return null; } @@ -797,13 +797,13 @@ public class ScheduledDeliveryHandlerTest extends Assert } @Override - public Message putObjectProperty(SimpleString key, Object value) throws HornetQPropertyConversionException + public Message putObjectProperty(SimpleString key, Object value) throws ActiveMQPropertyConversionException { return null; } @Override - public Message putObjectProperty(String key, Object value) throws HornetQPropertyConversionException + public Message putObjectProperty(String key, Object value) throws ActiveMQPropertyConversionException { return null; } @@ -833,61 +833,61 @@ public class ScheduledDeliveryHandlerTest extends Assert } @Override - public Boolean getBooleanProperty(SimpleString key) throws HornetQPropertyConversionException + public Boolean getBooleanProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public Boolean getBooleanProperty(String key) throws HornetQPropertyConversionException + public Boolean getBooleanProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public Byte getByteProperty(SimpleString key) throws HornetQPropertyConversionException + public Byte getByteProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public Byte getByteProperty(String key) throws HornetQPropertyConversionException + public Byte getByteProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public Double getDoubleProperty(SimpleString key) throws HornetQPropertyConversionException + public Double getDoubleProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public Double getDoubleProperty(String key) throws HornetQPropertyConversionException + public Double getDoubleProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public Integer getIntProperty(SimpleString key) throws HornetQPropertyConversionException + public Integer getIntProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public Integer getIntProperty(String key) throws HornetQPropertyConversionException + public Integer getIntProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public Long getLongProperty(SimpleString key) throws HornetQPropertyConversionException + public Long getLongProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public Long getLongProperty(String key) throws HornetQPropertyConversionException + public Long getLongProperty(String key) throws ActiveMQPropertyConversionException { return null; } @@ -905,61 +905,61 @@ public class ScheduledDeliveryHandlerTest extends Assert } @Override - public Short getShortProperty(SimpleString key) throws HornetQPropertyConversionException + public Short getShortProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public Short getShortProperty(String key) throws HornetQPropertyConversionException + public Short getShortProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public Float getFloatProperty(SimpleString key) throws HornetQPropertyConversionException + public Float getFloatProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public Float getFloatProperty(String key) throws HornetQPropertyConversionException + public Float getFloatProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public String getStringProperty(SimpleString key) throws HornetQPropertyConversionException + public String getStringProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public String getStringProperty(String key) throws HornetQPropertyConversionException + public String getStringProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public SimpleString getSimpleStringProperty(SimpleString key) throws HornetQPropertyConversionException + public SimpleString getSimpleStringProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public SimpleString getSimpleStringProperty(String key) throws HornetQPropertyConversionException + public SimpleString getSimpleStringProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public byte[] getBytesProperty(SimpleString key) throws HornetQPropertyConversionException + public byte[] getBytesProperty(SimpleString key) throws ActiveMQPropertyConversionException { return new byte[0]; } @Override - public byte[] getBytesProperty(String key) throws HornetQPropertyConversionException + public byte[] getBytesProperty(String key) throws ActiveMQPropertyConversionException { return new byte[0]; } diff --git a/activemq-server/src/test/java/org/apache/activemq/tests/util/CountDownSessionFailureListener.java b/activemq-server/src/test/java/org/apache/activemq/tests/util/CountDownSessionFailureListener.java index b33ea7cbeb..9452acd38b 100644 --- a/activemq-server/src/test/java/org/apache/activemq/tests/util/CountDownSessionFailureListener.java +++ b/activemq-server/src/test/java/org/apache/activemq/tests/util/CountDownSessionFailureListener.java @@ -14,7 +14,7 @@ package org.apache.activemq.tests.util; import java.util.concurrent.CountDownLatch; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.SessionFailureListener; @@ -41,13 +41,13 @@ public final class CountDownSessionFailureListener implements SessionFailureList } @Override - public void connectionFailed(HornetQException exception, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(ActiveMQException exception, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(exception, failedOver); } @Override - public void connectionFailed(HornetQException exception, boolean failedOver) + public void connectionFailed(ActiveMQException exception, boolean failedOver) { latch.countDown(); session.removeFailureListener(this); @@ -60,7 +60,7 @@ public final class CountDownSessionFailureListener implements SessionFailureList } @Override - public void beforeReconnect(HornetQException exception) + public void beforeReconnect(ActiveMQException exception) { // No-op } 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 eec023643c..6d277f1766 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 @@ -23,7 +23,7 @@ import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; +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; @@ -871,7 +871,7 @@ public abstract class ServiceTestBase extends UnitTestCase * @throws Exception */ public final void - sendMessages(ClientSession session, ClientProducer producer, int numMessages) throws HornetQException + sendMessages(ClientSession session, ClientProducer producer, int numMessages) throws ActiveMQException { for (int i = 0; i < numMessages; i++) { @@ -880,7 +880,7 @@ public abstract class ServiceTestBase extends UnitTestCase } protected final ClientMessage - createMessage(ClientSession session, int counter, boolean durable) throws HornetQException + createMessage(ClientSession session, int counter, boolean durable) throws ActiveMQException { ClientMessage message = session.createMessage(durable); setBody(counter, message); @@ -890,7 +890,7 @@ public abstract class ServiceTestBase extends UnitTestCase } protected final void - receiveMessages(ClientConsumer consumer, final int start, final int msgCount, final boolean ack) throws HornetQException + receiveMessages(ClientConsumer consumer, final int start, final int msgCount, final boolean ack) throws ActiveMQException { for (int i = start; i < msgCount; i++) { 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 c0edcffbfe..f8deae8f3a 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 @@ -49,9 +49,9 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -586,7 +586,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase } } - public static void assertEqualsBuffers(final int size, final HornetQBuffer expected, final HornetQBuffer actual) + public static void assertEqualsBuffers(final int size, final ActiveMQBuffer expected, final ActiveMQBuffer actual) { // assertEquals(expected.length, actual.length); expected.readerIndex(0); @@ -883,7 +883,7 @@ public abstract class UnitTestCase extends CoreUnitTestCase return testDir1 + "/temp"; } - protected static void expectHornetQException(final String message, final HornetQExceptionType errorCode, final HornetQAction action) + protected static void expectHornetQException(final String message, final ActiveMQExceptionType errorCode, final HornetQAction action) { try { @@ -892,14 +892,14 @@ public abstract class UnitTestCase extends CoreUnitTestCase } catch (Exception e) { - Assert.assertTrue(e instanceof HornetQException); - Assert.assertEquals(errorCode, ((HornetQException) e).getType()); + Assert.assertTrue(e instanceof ActiveMQException); + Assert.assertEquals(errorCode, ((ActiveMQException) e).getType()); } } - protected static void expectHornetQException(final HornetQExceptionType errorCode, final HornetQAction action) + protected static void expectHornetQException(final ActiveMQExceptionType errorCode, final HornetQAction action) { - UnitTestCase.expectHornetQException("must throw a HornetQException with the expected errorCode: " + errorCode, + UnitTestCase.expectHornetQException("must throw a ActiveMQException with the expected errorCode: " + errorCode, errorCode, action); } 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 d05260bde1..c7f1ce2dc2 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 @@ -24,8 +24,8 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.config.impl.ConfigurationImpl; import org.apache.activemq.core.journal.PreparedTransactionInfo; @@ -257,7 +257,7 @@ public class PrintPages // NO_UCD (unused code) { byte[] data = record.data; - HornetQBuffer buff = HornetQBuffers.wrappedBuffer(data); + ActiveMQBuffer buff = ActiveMQBuffers.wrappedBuffer(data); if (record.userRecordType == JournalRecordIds.ACKNOWLEDGE_CURSOR) { 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 409741d10a..03a6bd6a63 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 @@ -33,9 +33,9 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; +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.Message; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; @@ -251,7 +251,7 @@ public final class XmlDataExporter { byte[] data = info.data; - HornetQBuffer buff = HornetQBuffers.wrappedBuffer(data); + ActiveMQBuffer buff = ActiveMQBuffers.wrappedBuffer(data); Object o = DescribeJournal.newObjectEncoding(info, storageManager); if (info.getUserRecordType() == JournalRecordIds.ADD_MESSAGE) @@ -369,7 +369,7 @@ public final class XmlDataExporter { long id = record.id; - HornetQBuffer buffer = HornetQBuffers.wrappedBuffer(record.data); + ActiveMQBuffer buffer = ActiveMQBuffers.wrappedBuffer(record.data); byte rec = record.getUserRecordType(); @@ -898,14 +898,14 @@ public final class XmlDataExporter { bufferSize = remainder; } - HornetQBuffer buffer = HornetQBuffers.fixedBuffer(bufferSize.intValue()); + ActiveMQBuffer buffer = ActiveMQBuffers.fixedBuffer(bufferSize.intValue()); encoder.encode(buffer, bufferSize.intValue()); xmlWriter.writeCData(encode(buffer.toByteBuffer().array())); totalBytesWritten += bufferSize; } encoder.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); } @@ -917,7 +917,7 @@ public final class XmlDataExporter { encoder.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); } diff --git a/activemq6-native/bin/libHornetQAIO32.so b/activemq6-native/bin/libHornetQAIO32.so deleted file mode 100755 index 15d4b47a874aa5f22beb38074afc43476fc0237b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 44803 zcmeIb4}4U`)jvF&KN2KB#Lz}XT`?jch9m?CiW*232m}ZuK}2*}k_}nhWJ7ktzlstT zlo+EZ{;mH|5wW$8wj!cM8w>@s)}o^FSZY&?x)`jnjY!p+-}gH+clYkihRXAM-uL}{ z-cK(~&OI|{&YU^t%$d1!_uhM>qiB-NW)sE{FX9EUwhSS101vEDB{{+_dWoUp9C4N` zH|PnkTdqwVcdAGyhKb!SU@+G4#6YI0@gsDgnSxlZ$CdO}??|S+4pS*JX z$!pVJd;HQlLnpUxcA@MFBso8S}l?! z8K?wKd`H?XFw}q+$}$0IA`%Y=(qyDUq-jVqkY*zB zn1wVOsgwwgGNd_3R}#T7R{{C=D*T;?bhXaA7La}Cu@H%hUPJ^(l>)+};bIN11FS~! zA=M()A@T4d)gvuMf(wb2NY^95G-5T<8l)f+59mqUgmg2~dL$l=NKHs^GjTi81|%ML zC?M_x+^Em3;4Wm`tuyZdycg*{q@N-^gtQ6CI3Cp}j{|N-dP3t*0&dmkPXWH!vg!8o zo=bVA*Mq-&{g#^4RrAKAWIpu4=GU^nedNj|_TsB%wrqcC;|Hf4D{A_~q#Nfo&N;8BYsslUnfiyl>9?2cz2uH1Kl$9@y!*|H zdFS~nzCQ2N?anV|H9z)Ld&`LNcb$=6Tyxd7KYzISwS@z&`+88H7yA0U9=X#0n{)Wy5f!{wx1Vmd3(~!>n=FGWAB=O_v+Pc_osD@eRe_D-kZ}t?0tA=*PLD(x5aO| za`dlm-g0os+(8%HzyHHoEl*9|zi<0XJ1bf|8~gv)xX4m%kT($(Cp4*j=B#71}vH{noj2mR|Gx zZy$Ml;6Fcn_o9b3b$~gN_}@$fVQo&;C4WDZe?%sEweB(_I$+J1z2EYr(&_ zw4Y(A@9PucPx(Hyw7=a#f161j(tlyXDc?{_{f8{|*I4A)W2ryOQa;mC{|}b_O|{@% zmiCvJ^lOKFKe6y@?Tbu(us^q2$^(}2dUjGDq_45G_l|}BRf~T;W0Cid1~WkNyV*kT zwD5n!LSJOU2jhH{g+Jr_(JUc~0SAjdVld?U4JO9(fe!%Q59903SweU<{xA4L0S0NN zrvDb>XVV>OZE%`6LwtqtIvf1JLe_sD`r0xU<5J_7f&P-I0_!E!-m(5dJdVlqb6vg$ z{C~eth=IV*6Me;1z_;DT^#Soz@k`(dX#ZSY{}Hs8hW5tk`o)m{BQ#F=DE|v+?;fPJE=0YdC{NMln<4LY&=>hrU(W$w3LI*c_-{dPw#SR;*YE-XN+r)6=x2key+fd% zKL+a~E#LcS=s~9t!!-RN`i}!~UgHm={#@wyGL1h0{>k8P*!NQK8IJ|?xyYwJZ#WI> zi90}yBL%%YANjdx->~m0w092LgNmfS`aqw@(B4{&kA}a024i2T`Mn8!ojN7rU!MWb z1%5y1*C!&$v>Er*wIM?U~9~Lh%ENus%aRn!$p9PO9QhmLf6bd)FNMCAPv z?adh_#K*e+YV^-+&q~mLjsCr&%cnsf&%(b4184v5fP6c`_B}&9i1Mw#(M`-xh!5zu z*`9Z!pu%MTpThukCV#sc_;D<*hiLx4LVsUHf6+zRzy0Xn?x||6%=TBHUlo~%8M=Hd z`m=RX#6Rx_ZXVBe@ZSOc#`wF+qR%JcZ#TiYjd*Yk^pU#27=L}m4vT&Ap#QDt54tV= zi`P#NXGQ$e3wh1)uOH-1fxPs0+G~LYzYqF;ey$LQb@^22YrsSyF4y>bXfNFq51&B8 ze*!)N<1uEWiG!PJh5v7jQa-v(i)J5zfNW>COswoqLhTA8^-|PS5xHYTTu+gULPb+6>)~E@EGxL2lfjXbp>#obs zc9i&`ka?wZEF~l!H^IN6rhJme>(0+|%r5a4TWDCZ8^s#cQU2N#bA6uZY z6>dLdTVbM%(MUnIV`;R21z9qu!dom0EQ0D%t4IZzvQlZGg&eF)=gffiVe#dzg`TBZ zSz~cdBRc~tYTZsxO{LF4suF9>+CWvE+g0H#ch!`;y_B&eFwVWa++7>+_-deTidQ?b)_WWt1Ag)jdB+H{LY!R?wV>}g}cNls@>IoceD$Qbr=oIEHAIGt8-T<^<-tk z*x@oX?kS;U6Emho6Xz_e zas`xxP*P5XE8tStxFTQqb#nYezr|Uj4F{;M54e{*10ovtf|$K9)j|im*NP&M;z#qT zuj$T7_b1ombGqy5e06ek!h>=by8NDUgg}M@{B^sk3(Jw8RbJ()a|Y^Mo`4@Zl^Ukz zyEz>ME(v)3h285QD8NG%f1km+)afW0?W7@?LrK`x57IELP)Lj$s zn?o$Rxd@Y$%(v9Ys;zTR&^hw{q`rf3ij`tMdfh zg*BLGF-@5nES`;6UC9|Hy2a75hLv(QMhR!ig|71JCRDg;!4K7HmMs?bey`hIOZEEe z7gp0s2)aJ6-+=+3rfeuO%2uX{Er-$ihqYy@H5SS$!6HD1fJkpM{Q+NXv7A~>Ofe9! z+NcwivS*O5w9w>rKuavB)s?K%Q8uO~zbEF5gi#uqZ=@;$hzNcs2B|xz5KbJ9t(JT> zYLtT`bSXV{(>a2in!&o2u&r*HMq}Ly!XepeRAcaVuc6$0MpiCXSQbwhtA~_X=QZ_S z@63gZrC2el$Y>qC7+M}#p_Pns;=i6OW7O`EE2H@j;2N_RVV%TiFsznXWhc-~P6bxB zX0^~tF?fvi)i@ZcO{8A6SSXA|j{YOyS#77sTWx)v+qu+J7pQk}1%yRXj0ROfcMhf% zG#9Y{e)&Av9e|m!^pKOVY57bW8LQ2#ERd-Mc42{|c&u}=T+LyUf|;WT$Dz>zPaXJ8 zToG_jtgoze*Ex!pE;kcpXM>w2k^~bfD(c*Rzoqf$QJj^HpdodfkA)mYQH`s{SL)$P zeqPonltotM;YIT7h)0U4uB9%guWnI>tJYOs<<4-G2RuvN)l0@W%YD$d*R#-t5IDod zTqh?SuG`6bY`L#ysk<&f1|@P45X~R+EEWbQ$6wA+vVoHlt5U97PO6HUcjsm0$eA=e z!G*h^R**7mxp8rXdAYnw`{6=doz>`^lWLQ5!pZ3a)^`V#vz%N-J){3ms@AxdDQo{v zDyy03q_h$>k)K>IJ$m}*%%~P0Cs#i*tDamv>88fo@f$|~CixpGp`EyM52$l^KHQ{@+3M05<%>hRg3a$M+y$;wr}(^=zohT<3xcjLv``a zGuNTLQ^WzC7Z`RYc3|VgpEW&y%YzJYT*L1)6nalPLBk{s(=|*1w2j1GvW96I4${!B z;RwP-xSvIcecBwtyVX4t+Zk%_oRIg(2*(rNiTzc=o3T$$xIl;^LI-}^LWs@g(Cz3I z;9Ykpd@l1nLVU-3!1=^Wg;+p{K2;H7Uzhi~Y{S$ZH(@Pt>=y?JFTn3q2=Bu0R0wau zeH+5-@Y@tZFYccbUXOMO3vus2!}|!!aj%JRx)7TP&%^IZG<=#6oBlfppTh5>C@1!i zTL`hIyqge)*hh#x=r;)a3$dRN&UJtg_Z1Ej4iw@L;aNho5&E#dPMD8-p@jHhPX}QQ zeoIA&{rBU9xDT*_`WlBl@(u99E8w?;_rZ>Y*jG;@oF>E|!fN<5AwoksA@;h55+Znv zAcSXS5@PV@5Uz$@37cR?Li8(-us7^Uh_M;L_t z2v@;R2;s9;gxE~?5}pqG5vIa^giqk!BjHTgk#Gy_NQktSa3btT*Z?~c;>Qvj2+Lqk z!XM*a8DSdiNa%tc2^YhTglEEU2nXSJX@qCP{)G5((KbTpcn9G*urFa1>`Pb=`x4?N z%|1dq>`RF8u%B=<>`OQp_9evqsY8UDU|+)XVPC>@_&wne*qN{qb|$lY>`#~l`x9ov z{)D4oe?rVHIfM_u{)D4pe?m9xPl)@m1%%6Be?p9bBEqq-KOx3hDdB^#KjC`VpAh$5 z77$K?{Rzuqf5J;(f5J;)f5P#wKOy{kIpO87Kj8}4pKvPdPq-EKC-lJngvGdT6+D_0 zy5bZe8d{x;a9cCj($&?qt|gEd`T)uc?oPV86;Oz-=Mwn$@g#}y41-ktGVVwls&qY` zLY&1%_DdX2DXN%xge1dC64(W{g?O#;z`8!OZ+b4Da2bOejo8P;?GL_ zLE?7enn76f23IA+lUtv&y)BL z;&X{-N_;2r1;p(VZy{bqJVoNWiPsVr5~pgbmJ{#zj{Sdw_-f*95~r%G))U_^@dLy+ z5O0wmfDPSaHFAYLo+qr_W?FOWD*Rke?J zvBW!x?hk)e;{{JePQ_#77X% zBfdc5nZ&0MFP3-?@nYh663-<*mw2Yc#}i*b+%EAv;#I^`B+fhBRkg&0#HSEnPQ2qA zIsS>SCf+9TV&dzG@0WNf@eRaVBtDn;eZ-%Y_N^h;)5cyZu_;E?-Q_wZE_HyATSHTBB-n{WX{2jKxxgz~& z@c1dqdf_DX>T6n?g8M;epgC<%g7HBto}85iu&}X;BnP_zvf^%VqIfG zdT1wLXe_e#$d+wd(#B)WJF(ipZ*bVZUXtI1nqSk#WK>%Bc3@yraJOREr&;F7UMUVo z&PPe*2HC&h(bUjxRB32EjFoMZBdKZQQIs~%PHId6wl^=CE#a)W*xuwwL6?$&03Zh$OJqNyyku@oAI<_1HV zjk{Q03~^D`SOmGJcLF3CG_QP3p>rTK^+-MJL^m2*4`C%NIVVH9ADek-=Fh_wqk5Yf zS|e*drfWuNFxXn-E8U01D%?7@Gz?a#*A*hAd7|Cmn;zgQ)Xit-WAZ4baA#?C( z8l@9Wd2^e}lG&}MvLtEd*9<$PheC*(4XsJw*6g4zRgKjQ#7$+LsFd7PmI9DuVbLzd z8;;t+-RYM0RzHXlXrX@%BTwluJrs~_-gOQ22upP|IcU1Q@R>X`3zz^v9kX{=qDvGC zJt$7aN#)+W6j_K9Tw}(DbX4Kd3(& zBOb9QQW|WLnpuS^?PK7+Umqm>ZC`iLCzd%l7N4sESS<2^{-N&!K_L^4{1Z_J98cqq_i;{-c7jPL*(`;;u3KoW8 z_vW$hq=*ENU`q-)-`lB`4x<);U{Br@(gj;m4aXqWY04{tEhEgi->RN*pcfaRQgbn4 zR5%Jf#3_K83HaNTS7Z$IccHj-E&cCqS=$mQfIS$|LYvS4wOOFFnZ#y(hl0kO^iTyG z55kFQlcc6#NS!6H?4Ti-?96arsF}1KL7W^W=79smfAt@z`zpj}Wc-0Jh$Sm#%QG3D ze#LrPk{{umlGKULvVKrJVeGD#4`2sdf;p|u{IRE;smTeXPML^S)U7&N-d-k z`_jNh5c{ivNvHVu?@^)tLewJBImm85vvH4PA_;dQN2&5v^unY`IU8lbz74H2=1N79 z!E_}LPv8EM^m-nU)Iw6*6*cBN5d8_3l6vmHy(Kco&`Nosx6oii>zCN%km8Jx!N+lk z)$UQvU|iacOod-_gdzJ12y0mF)K_2`tm$NFQqvUaZgNDz#25#Rcyh|+#KLjGH4d4) z#Bt&1&})Gsyu3&I@Kl8JT^}Xd_T#kCakL5l1r|j096SsVM;?`w$Zd3ltTnJ&I2>Gc zSgfdQb{uRfJ8X>mRUITGsF2p9)XtwL6nfDg8^>D)_xEa9R7M7^JGY|_<}C9h{Z=Z2tGguL`>MZ9}r=Trs6!tLFYtSPlN6ql&z zTYKYmd*_?lGt?_i&|Uy#VFyZ;4phHhH5#L%TR?5;Xe(XC(ot-$$&TKPvYs^kEz6Vz zGtnKj1{?xK26x+|qx>DnY-s%@HvfB+t6z7yE{Y+SVSq1a%pRt?aw%6@6J~p*`Bby! zzrqEJMFFpZ85J<$t%#)!1>AIkhQ0}V6bJHmpLb*I(Tq!DFuwQ%j2}gr4)9n>UC9L_ z_bx((P*Ovy2b=zwr}JQ<&}1mSaa}6I#q<0tFB)EAL~Z=K@vVRSyh)ZdBGTb%?A2Z0 zoC`l}8plQP61XG-9GCN0NvGm8x$$~j@Niw2jHL@=K@%h7pr!$hDSI7GlvmKav6kJ$H3Hp^(MktAD(4x<*|6$xC$et{5AmrK9(r#vsplQk zV?gPLvYrgQ24zq{3NC9y_q0T|({9_L{=hE_;TA84vS&@GNR4!{I75igP2 zFmM^;IDk_%lsiwr<;-q~bGn=g+V;x(Av%V&U(*yk1ktcMM95g zf^VQ{QY-^S_|gDdL{LWpxu8eXM(B3Xsr{kQ1=u)k*mZQ8vico6Q6l&KWOTt^5?21b z_p58W$X?U<$R?AT$%01*h1Q@q4XuwUPLyKSCrWP{VXp9IqTJ)*#d&ivcylk2+oK^j zB&LqJ1Ju2AFRal%9^U<)RII#|3Zh1Pg3e=eaU7t>8~+~srYj&RmeB7|&xj_XC~j!|JMKw>Dd`^7GDOL%r-hIIO8b3Eve(fLPoaC=0lilLQq@Pt)Fp-N zSTb7CDh^BALDN_Mw>E_IQvJ=KixT1(rGgOsq!3E= z(7g2Uc~XLvN&*rMLx$%3{YNIpmDD37b&;ahO4tFe?E}MhZq$uE3c(}SxU%-&P}I=c zPxltuma9iOipr&EynNPsmZ_l@N!>O@=|)n$jIJu4P075m5Z>RsOVVzWwCUVF#U%l@ zq{=$6&wW()=2>F^V9{kA0Fe#M)W%tAV>7LhLjq%9klryWvo~^cE2;krWk)L;iw6ab zU0B(-0aAi&E$v2g8`SD3sM2IRW3&0ezZe}d?D0CJY-s&#a(EoP2+imo)R?K|xEUY% zsic2N(f5BLZ%`$+n55vfDec%PgB7}(GT9OAhg|l8kG|jq4fpb%f`P zVp_ZY1D53i8LFznDL2h1jb7A!{AXlInSXc>4;Vc}Z}-ddEd-%Gfx*XKWe&| zA{j^SD8!yF;4h)Cze97oUU8@qa>s!#?bng}C)dOL4XqDqij8547_N9)xY_Usyj<44 zR@J6yR!J+#@chw-R?kh5)S0?14jz*QPlxN$2*%AHZP@RmGa(xT%S8P#J!(~w2n=8y zY!xMNXGh&h!Tu(7Bkyf+sbde_3#qXGUBJDL&SvA@N%*eP`agjguLwHXg;OC2*CXNm zVfZ2Q9|IK^f|BTYbPnsYGr}30RfeS8ilMA`b&NqfP)aZw640l>tw0V5Z9^F!{*GD= ztph+pd-9q@lNLfCY|PxHHw3{_ui#o_jkbK$P#1>Hjswl|h8luWxOYFpGE4T3j*Cvp zjj1QlndVgovB0QBL!p~sTJCbneIYrHadqQD#m4%>x<)H&1UuC=SaNeP=N*(r=2V!0 z-TD`mgrRv@E(;E0P$Sq}h>Lnntz1=Fn&hvbU9~UyJ9vL{aDgHN`{!b^e>lP(-V7|Ty<@T|i?G4Kf;1@x zn_ki$?UzSuYaq3yqz`Z0!IpBlkNPHcT|{+Zm>i&eZ~G&VjwAA>z~08P-Mnai{R5c4 zez&n`lI~auIwM0?EMvugVuU3$?rPlM_&RStpWS|1lGNCgbL2oNr<`NUh8mNY9h!mg z5Cwx~F#NQ6V+yUOFJb5)>}?}#ccex-^dVz=SWz!9QNOOKuO_vz>t8m)Xsdt%>}Bwb zY`}5eC`-`RM)yK4wKwcN`dLMN22F(`aCo26XJw1th|7B+qx6-IC%j-M<; z5z6G`a{PU^rtjcmZb%Qk2iY51kKuQkLA)r3Y}e{xZDCtYwsw7;qnmmS?BuTqB=bHH zFU(vo5tm8!_kw-X^pwWwFivXYbZh|ZZ(4Pru|xV;<2S*NMDP8$6M<;HA$H>((4UIt z_@OH1B>qwjeUd9B%BgNP$Z=K=g(Bj}`@8AQ!52&n_sL39Nskx|+w+>rFs2R}LxGH` z#W&xhGhoE*Zz|*TMyn;mm5kW^u(ZYDruxGOC7$3nw!m33h`dKjOHcWZV-B1;H5@^B zLNA$0bw-DXuhEPO5v#zseWS6~HKuBBXdwFA&^mfN_0dy&7~1G)X>yEcbZ`WkV#N^( ziy+3anrV#R&UcylZ)3$ZknG6iGFG5=j!}COdubW{*|O(5qnkNfX6`UX|F!J99R0LF zlVgV({X31(A8iQJ*ngMea_pmr`+nfq|0SG4kNs_G?B9-@rs>;ajr{~#T3U2C)g{Ni zJ$yDt`a#-*I37^o3RDp-OyTrUsQ7p(_vs%*a%_&pbYyk z4UEW`CIf!Dl%P{;H{Hk_Nw=4`PEQ!{?}L{g*+7Mtfp;5z6D33E(H>&vRp8oQ5pnh- zsIFAgpF+UdduezD&B@>Tbc91r%(WnM!Gt!haE!_Y?jfm-r-j|qOR7TOtLjQihs zP9nPZLu5nfeJ6fe)f`!y-iD=8`$Ej>j}c{405=sL90(E3EKRnS$kq3(iSfP5+FgY*-rnpcq(7W8@6gP@&NSJp5OOX*?^mIy-O6fnOIi>UoX6e5s zGe|%3-%3B7>wl}7kE2VWAXr<}TpT(_N`JYOeyH4UY2z*7vcpZ-D}ghYr8kxxTF-@& zd8{0#l#b5+uV4;R9$()X++*iT0V5}c8!p{f3je_EE7`|ys9@PgJGv9L(CNC5({qym`VIf^x07v+dm8ud>N*$w`=;HCanm>4*-_vT z?(7gUM8nszSk4mR0d86FUJsYC%x1%)nhpI7X!~u()+9!dyjm?l3y6PsVx`-@_p_L8 z*tqQvykd;(d&_*TlfwJnH@*p(ji1DvaNj$!mtCs&gp8|wwJ#nizy8GKtJlgnN=NG9 zSCp@*-)RozB8nq9@(axMcVY8g|Bg|wHKKNWy57=tu^{Hf#p?S=Z~WfG_?ag($l|<& z$R^C!P;o=+kKs;glOwX2>>JjQX)kl1BoE;!qUK-%-8w>l8FVh!dU7Gnun;M;F*=x* zl{ujsC8I|qBMuf5aVHu!RQycS=?WtJ`50C)gkIfHV3yFjKUI}CL4Ie$X5*uS5JbQABUUFj&JsI#%=CBxE(TR^pZwT595k zO%nRVTUiNY5B133C}Ok8@eg8?pn9HmYp|MqP&99&ZOKjj##dj0N@l%4)toZv~2JJRIXp5jL^PrXa>{fWt zzW(|T8MJ6JGA7fy4Fc{UM#^*kO?htY-#g3ECa;gS!>t-x-^*m+#dyW2<@n1B;Dy(PmM=Y@(GNdC?k(IY=F3FO$F)cp?E3s`4Ab4Ys3jU zPZCP(bfS4T|?{FBVji_SZ8@JjliSs_8MQn?y0c{syu%Cb$CM) zURft!QF6&;c9HL@xsauvfJeUZ(2n_2)silX@Q+c-S6(n%_DWSi8+>II-oQ}fSs5;) z%>F80y|==Sx2^a+c-@m7FT{g_NCIUQdGKZ`yQfmAx*9KwaVO8^xjZ$(^y;eU7v7*7qDa1##x7qhW?$s4ao6F!X%%+a zqJIR;tX}A4SMS9{|7hMyUtKkbTnp)I5IpAVgSx+bXlPNax8scD+i^y^Xfuy*BrK7y z+q`sY(PF$2XJiesBd_|obl4nWNL7GWCjp^4@NSQ=u*|lr*K*b)6eIi%xJo84tmKB#4=YM-arS{3aNX%v9(6Ik9v8Gz25Jx z7y(D&ON6A|@d_lr-TZzT7zQs(byaZ4@x3wjh|(yV=EHy@Uj_#Q!j9x?U*-u^*$bvm z5Hs*fF1vnPji%>oPwX{rcLfK5eIW-s-Xw?0z)m!@ysL1!2V6>O3cYLC0 zIk*`@Pt^eqFO99Rhb!CVyQjp^*j69Uh>PvPFn?K@VT+L^P*-1$7lYb|4asI}uU0u6zJ_r+XEoP8fK(0{JF@^5{ycUqJ?fw~{NWdfV zfP7BxIN(s^Pr-Vj7|;t?f$~oQ*8?uZ+|!YWa?Cn|a387)tA--LUt!U6JzyK)Ccu7J zJ?;iPhKr0&z!|vMOYeo(#^c($81NvrNY(n6bYfZG691O6RwE1(_s$=(2T0G5Jp z5nw0an}Gb>!;f&gY&>8A-~zx80dEC-2lwW70P=?vhX5x5@`3aU!1aKS0X_}5A80 z_`nxkU0%Rnc64>|b=mX2?CRPF82@+34Y&)?-WRXw{s;6A_za*I@WD>d1O5ZB1u*3+ z=m&CV0uF*)#em}hR|C!m+zEI+;D>+@0v-X}37B>adh3VJ*8si&c>mXE7jV{bwA&xA zYyd0(+zr@yvC}B_|~C zVNg5r1|f+S@PXfmeo2%1B~R_&Cy=mQTyf^5!?V)|vpf$egv*U{0mX!VN$cV!_D#I{ zx8S1dBipvJxJYvE^+3Z=AUz+O01a-JhyOZpDbe}nmn zpMOa3b)zpb_lr8aJ^^;b6;=WGTXZna%o~?qq6oB?V2#RndBFulX&cJ_P$BsHFn47M}wi%WL5t-l*_1f0tdk}n=gJuf#ayThMr^iG5rBeE^ zEOykX0^eKTg>G;j?kmUY48@q^@K(_L1~fbm)67-lFa=ppqx{H0%ug)GLAn;?y$9cn z6+`SOZ$tS3Jr2S=En|ScWBD6sPUJ5`L3125OTp93C$3t_&$hV!D29A%tTZbkG_|1l zFVIY}(A=o?OFnmj=55gQBoBRO2WSp~=6*9DBOcuvi5H|j4BDxPUyMg#*$rA#EV83G z1#6$v5sOY_ryS7m=3Fd0F|QQmeB`00Igy`PI8pgsx}3fime;HNfc&?id=U7LHRnKzlyU!*t*`&t!A1;kJV&s?VTVq-mI644PL#!_TuMJYZ_m z7(@>XJC!WPhccG5~EJ2`&dmysQ3WuSug6F<&Dz{up>JcG=s6Gy~avY zssxt(0L|5);paROX2xi{EV^yh$w8e)tcCdrqJ&Fh)cI|69onc0buPsEn4e8b7-g!X z=950MhB7ZchKbjJfxa)+$xq=t;e0E7+{1?LNV^-fw-~hjPfXhZ+Fn>^ze2v>B1%R3 z#B*l8gD^$j58A_|{j?kHe;c&)*Ug~i@7@6-JSV9R$^N6@Qj~vAUN4w<8DqRH;udz$ zbb|gk=ub4p(=a$L`n2aUo{REBpY=S(=l+}W<+^+bXHlYg+ zZ|D+Z!dTN%H!Yy+hp{>g=V2PR;=^)Y)1>uKZfBij_z(J7$a8ZWdCHF|3x7e@44Pc{ zmzgGhBs|OHR~=~Up^*B8bi$P;nWZ1bVU?}cKz6WM4xYns4R#_M@Oo=LXxNW%yLvuk z-cFR)LPv6}LH1x=en0!-en}Hr`@sqD8nZ52(&cdzg#&Ke^}s+|-${u###ba>7ynZm zmee<@Z+4RIf%9xU*;ds zWn40KU%WVKOWYkVn&J|lix)qSi`yJ8o|EUV#4-O+TpVaVh*vfGT>Gc^eF@@sn(6uH zJRbLag7_Zv3F7|v)JIShpLj=txHTaW=Q~c0tk2+&YueEd$y`o1KCI-alv&+Ri zz-5%>fzh^$Mkaod7+;Y1L1KJK;%kZVRf#Vo#xMOv0`Q+FvS>YD0NHX%&Uc9dZnesL zChHBeojvXqTUT8CFX9s0_(Xh-h?KbIl(c8tPAk6G_N6U;Z5-78 zT3jM7J5;&d;N{o=J;yi3CGL%jhhA~s83$g!iBH59i=yp3gYBMeOUbSMnJxZh8hmYB z;x7$W;(#oN@7T{SwoSu(Q|`4TUV*whd&u7$&d+w+7J&X~TVg5bZj8ABj)v=3}pUD)#H=VK4Yv>_s52rz8Eg?j^Wv`N4-l zYrr2|(L`vjYn*d#$~_JHw}1s2mT1V=f-|45^TskveufisCoT$cy#>HmZ=VIo{bfwY zA_;xunvDyyufFf{aV^O?i=R-$<+(VH0ioX*)#nGf=Xg5lkiPHg@*Tv*FMb5$V|&=T_pLn-dsBe8Z2f=r*lDuudqeSgOQd5+ zr(nVUBcvfnV~{2x%|WU}T8eZN(mhC9khUZ3L3$7A6QpBErwm7Zq#;OSkR~C`L8?Sr zigXjwJxE)Swj=F9dJpLnq+>{@T!i{aLy*QGO+uQ3REe|{=_aImkhUOgN7{q*9?~aB z$B<4Lf%-^8kj5ZQLYjkAiL?~yCZv0iwjgas+Jp2S(kDpAkWRT6^^t}kjX|1(GzX~? zX(`f8NcSLZLE4VA2kAYePmqowor2AwA0Z7v8iO$7qR^~YS(Al^jI>i-G`4{Ix*%|&7)dAN+z(AdX zRmK_az`8RQ)zoJ!toL{;F7{LiiB-A$RU)HeMGa~y7^qVv_%@9ET!kdlh!bV_od)UE zNv$^^GUT^dGVpOIoa3gW2Sq;lMTHD^m9w(WRqb|GRiLJUfj_>-pze%1AtrtrB6&Dn zb#<;4iidH&xEvM9OtxF+lQO!hJ>_8HLwop>A%##4;tLKUquf_rjW3xQ8vOT=7B54>m@{m}U zbc`=dj4Q@LS{_r77$Zo>_`p<(LZe;gGnFARrtq9`g{cMShFpX^Dv)|3k&bbRiE+u` zN4g}WY9xb>ag2%ajdbXa@^Of-Sx;I9s8TQK&3x1sO!U^LkJJkb-FP(AU(}W z`Y`Ao25#`%R0Z229ZEK+R3C_KHPKyPkA5M25rf}LpzDW3y>dS4#I<9re(XUxTtw1w zo=UnQ(iXC%?g-yTqI~3+47%hV=-xNcrGPF4bWbDCIFj_qVL+OR{5VhS1RWbN^g&44 z&sDafyB&1cx+p-NagdJb??{GxoHxa4_!cwtVbFaG+@RZV2WT2pJ7zkb+d#zjDc^md zyAO1BoEr!E@!+Q(@L%q?5+@x(eE47)(`iWLWgNRf*PjLYFir_g<`iph25%VXY~)Wx zV!QNJjv+I@ZTG;wTpZ}b;Ah}w$XLWf?kNB==J4R>UwAOK@ZjfOcrb?Wh}YI(tWdae zc*X>UtAWR{uW+^E;22l9vcB=z@_5+`HD*;gBY+y43hyIvu|R=%x!O`=O_leR1sqcf z?47T93u)>qnzVG;j{|u4FBU1FF)q2{9EB%RYBk3ay5dCbxph&D9d-kFL}g^ zAE^`iAC7prT7!?le-tk7GKW7iA1_yns!WxiDSgGrNx=Ku7y>xnc-XMY6!gV*kmCF&35c^#+J z2VKO5h{Ew?94zmRh8{Gvmj--6wh%u75%~`R{znr&8u)$rxKFRk-N1SM!1Xfe*wOi5a@YbW9B!=#4pJ- zcn$fsS@=1wjqp1Y^t?tg^Rt`ynZ$$4Uv^yz`sLc6ZHU~3z|H<)=!TH=Whkfrss5&k zCBXMPRlK5pR{)ps62Jz3y&X8`M$)tV3E=b}9yXCCehJ*TW~2RI0e+W>Ki|V{=Kmq^ zag$Yj^6La{j2|1u&%b~l&BFaHkPJq7c0BwmGxFK_X~3ItqltdV&(PNcPXqlpjXwZ< zJp5^}uKyx%<2Vf`@0;)e!2f2!zqjB6*>Qc4ewYQ%2Y%`lwQi$4PT+G!3Gp##iF<)> zgZ&uk&Vzo|0N)M&<9deu`vvfirYZfC{(a!aVaLfQ7W^9%PI>w<eyp8!D3YS-=Mr;g{#oGwaU-ZXB#10RHUN5&J!EDc=WtF7$^kN_qZb zDz_u=UnZRVCaNh1XKYX1kKO=#F!ItKi&0*T{yhVn{aa(9zu$sC1w1YnV;%#M^1lh( z?4O?kKQLB^i)DL#gbjwDI38;hO`ie$H?a5lx_mwzLmzg)rNHwht92*&KL@-3`oIv7 z@*M)640+Gdcn9$3=i_b^8wBTOc2Xw4}ch_}k#mnU(!t z0sIo^*WiCAaN{7qUje@d<*ZNo-&xB40{lV5lVQ4iz^VA%76vDO2SfSB12+!(SB(iL z{~Lj?oD|`IH}LzfQr7~k|GJ5u^$!8RZlRL@Ja}n4@I2Tz1!c7FH^4W+9}|GnALH~A z0x0Bx9V~c0@Y~C9J+1Xs4}8ExAugBneMB?x9f;580%!l9wA6nM_&Ml5?^Uw=Yv5kU z!+D$XoQe~(zYPYy6!Q0%<$c9y66%BU-2(jT+4zmCmgg1VpFltKFY^Bj@bNj2N9*?# z4Ah~f{-4Q#s}J(awcu9*Pldl-fHLyqN9bl}2{8>g^}QN+0R90NmgP@a>hA#l2Ivia z@OPJAV{&{&*B{UieV-5i(|9iMV#vpp6ZJ6-xN%Uv`M_tO{!=(-`%RYehfFx_|7#P@ z`Uij?hkb_Noc%cl+?cOYXn!hNAEZyU;Mpde{1=&U(yt-zz`h*-`9AhhvsOA6#Rzd^jCdALKvNf_s2JG!y(Z{hh#bG5#69*#2`C`U4jH zE8rEGn1evi_Rd15%<{GVk@j)|e;niSbKvCHXsS>79|gYS z4xHeizPA8RU0{sIzTzd|Tj9S({5}ADIrtm#_;cXKL4LjYM;|;LV!_8+aNd?ohrb&B zSZ65@0ymGBt(NjVz>6{7`Fl3@uN}B~y!BI;08%1WEdg$x-+aLTg!V_EjP|)3cpc(_ z5f66(f4PJ=JT-sdcg{kL0KK#i21c$)-y?xX{5MUE;lR-c+b_1@OMoAPf38It+rJt3 zcnszsaPr><+#KJ358OPTeggc7Ig#;q_CVd3tS^Myg5PMt?*(p-AOB@49}FI^n{dj1 zn7C;?{R_A`9`(m1)Wcbk`DzI81e1NI0XME62jKc~7VzIAo{}x+gT=rPn&Nd6aI=0M z1^&hrk@eF1z|HfoD6b3n1NhW-MmfITIyHZ`v#7A7)ak^-Ep_dPUj*#HG+p}oa!sy&f2Ap z?9A@D*rJ`lCzmGS0Tx}oBv6Fv9-rKc#RtFffLtyAxGF>#Qy+JB&dbSi@-w#qPq`FL zKE?;kSL4KkX-@g+X*^9rJk#S5&dEhHCr&6rmHLIwLT7ZtQ)d+B>j$SMRJdxPa3xQ4 zogS!=t=RFYIbXe>-6@3XdtlKsEuT9o3wXSE3eN41S-U%dbJFYy(;ZI7i~{(JavpVF za3!{yD>I<=<;$J5*aY|0;Nhdd3g=RMhuK-Fz8I|gH*?aY5=W`Cbi%|U2e~ZI9g~4) z!ko3`&OlXt&2Gb??I~9JPvr0Z7DU62Zl@?l_kkgHHXIBn(1y{|OFugF} z{Bh;192#Mc&r_kkWpDc6d~vt0H(Q?f%+GR^_+jNA{6Tnp)Y-yfto~ZLV|MuS>rv8W zF^nzH^xGFm9{L$0OK*?f>x=isx;@}t-#KCj>5 zi6+Ah5BV%x6si0WJf1OJ?g>Ql`DteMCbzqP7Gye>qAV93;=V5ZR)XYZ-{Sp6`o zStE2(XROD`oO~3~sh+WOs>juwm3(j$uCu5bqfma5nqE3}sdKiDYw`==2x`uG72aZt zqGW8MXpv_yN6WEq634rEcJb2L#j$!+S`sUFMo9qL@H-dc0n(g8M6~V(l5IrPOAF}_ zbw^u>*}l4xK-MT{Avn&2U90h!X^HdXK8>!uPCqzU?XLE_O~%a>HLe<8DIT2d$w&p+ zu<=P*MFv;HJ7-TT@mu>f!}u0^b~ZkZUVw)s%L7Wj2^AH1a#DRCT|L!Gv8*~R=;rkF zPpj8S!JUPr(-EtUNewZEvs|hE=6gxN>o0_cv&!*Rc4wdt4+#4U%N>r{)H+Ov(C_0w zaa9+VmpUCKqn#L*(Y>knd)@BZXmgg%=_ZWSZZ>AL@RNo4*$z($Jrkq2dxt9P-0o);v2c^K$~Hzt&6;RLhpjA+KiqV50E)PO)+p(l;fF&bbaEV=oEON)(m7WN zX@edt5HqY`%oJOK=knrQ=VIj%C8M19FEwZQQC1fGNCox60!Q&!=VJMgD2xS4dIr8%I z=gyrlvCzqRrIPD2YiFW{iR{Tqg&*iuO%HSQt$BX{0iZ6rmC}-k$zZ_JIVQ9Q4_f01 zaEsz~9F1n9W?*OuVa|ofp-c4)eNtja4ZUce8jCKK;8AboC5H9JO~P~0a)MKf1vz<_ zV}%1B!P^rMQ{5F&%7&kY>td~;9&$I07V8?Q+k%TxHp)2gPZh&38AcVTF_)FAVyN;Z zBan8Fw^DTuFzYti{a@&_#=Xq^0KU{{5r&S`7-9e>_2`imh*mmCW|#P_aY#A2B{*3; zh4WvOn@G#l)?@jy)KeFzcX_R585b7J2p^UfI6+W6!+u%gU_d=_t_Zl*5x)L3lT23bdM?C7BokJnps|6Usva@P@~E09UOSk9>QtNg&hjFyJvAN!*rC_x5%V1zcxf< zZjs~I@DRL^q#Umdf~00aL#6y;7tY)1n7w z&ax_3KxzuZHm1>K8(`?fYM{I-s-5t1Nnhic##ok+*KOuej~#>M+%kyDGljdH$?kxf zuk?f$UJVMb-|e;xG1Gbl+Ke5=rRWQBnOGA;c<3Uc{jAJLm@yfb3X8;Tv=e(m!IXAV zvtW1MM?0~!ucw5pQ3zv^ZL;vFn;ls&Q_}FnF&3KadAV10a;_$0?#Wfb<(*q!?9mMi zySbrT{zMTX%TU14U>%m-cbuX;kNS$5WaONBQW1oEDC*J$ysX!i^7?^|SPP^@PO2S` zehm-jFm*X6hvCWk%qT3atZIsWl~-h3WeaCn%`&VUu}9*sujWN&e!g>*+98y)RBsEF_+2HAm>2ocMu67TL|`5@+J~(>WqMmF;MRa0oo;<82|tP diff --git a/activemq6-native/bin/libHornetQAIO64.so b/activemq6-native/bin/libHornetQAIO64.so deleted file mode 100755 index a86fdd33740a434b35d42dacaa095db41176fe8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 51969 zcmeIbdtj8s)j$4hE)YQ=B51rXh!`x5Nk|}|VnVX8!31J17*V=xk_`za*_hpgKt-bg zbPdsXEv;Hpil_73V{A4Z|mgG|@@zPcF7k?GqcegM(D%~mTQK>3-Daw(a-}F*?7R&mg z*`-xhpiqSHDE-NVM zyODkmpB?yoADKMO zJa==$w9TvMC#K$aWan>wwC$r^>7UaBGRE5G;2$A=z&_pza~ zb|!uP?aNp8?0w>nBjY|P?09LZyuReJ5k*Dv^9Dng`SN}Ed!RfCo zeQImP&kA;(bK+3%4S(=IcE>Nz|KZ3l&VTi9uf9L|@y-t>-?y;*inf98CygxFvv#ES z#-z87d-utaRpak?EVlcy%tvqB_4}*KPd}~ar_1{e?|tIQs-D_Aru?j~`|6CiqaTgm zc;64kKfdq0mK%Td=i9IO)8qB?@^f#y`WM%2n)Jwui*A1I7jM)~zXWyHF8%0NHSw1n zyyl)4o;jocLDwC#Umd?`Mnd!68+YAt>7*rVUf=nfoLSq;&(GTX#K~)84&J$J=-HQ7 zzVl@2XVWiUp7;EcOONebQ@Zl0tr^wpe)RDxGf(?o!8NU~$1d9S@G86euP+CmysTx- zfBoyN-+k-8?vMWR_)b3!lc-m$ah!2eR(STEh)*YkLrgu0;XXA2{_*(8_^Xf;iQg54 ze=mYxBz_y}v`47-iYWL$P#}^VG&Lfgg2qN_?|o79nH|LrsnO&|k&_gK|D-7GT8c?C zQoFLF=<{ThdefuG&xyic0REZySg)f|`f))N|M^iAe*dJ%?RqjwyWWi==h`Ut`A!r$ z4N>HL6&G0_@5IP>Gn^+|4B|3Eq-t<5{dCS;@AnsDMr>Ec1F-0e0^*q`%E-G%NDd#Bu4B6fp4M3 z7%p1Z(DerEKhYRkCg|BBF)o69s`o;nypldj?81>RaO==~xwY9N1x zG0o`SZf7J(;xnZDx8$N&)w>CDsNR0rzbba^l==rMg@7KZKdp6%za~fE%5IlO>ECSN zq)(63NAWL~@;`D5InsQ_xu}Qu4asj8*~U)Tf%^B)O#(po@%0Od|3l(%559g4Ig$ME zaoCUa&!z_iT&Rh!Rp>{qSNe(4^Gzvd_fo;<1Wnf)i9$|tqo6ZIV!VlQO7a(%3E%|D z|3m2~<+7n_`SqaGXO`4Q`S}I1-kLli=VICK*P??GjU*#gjyqYcaW?Wvf4j6B)Z=Tj z)N>|v9Ilr{V*G^T)kNb!p#YR$O_Y98B>m(T$?uo^+Y1CRU$*N-+3)4$0#|;ODfw3| zm;6%yze)aUCI7Wj{t!~K+v+6(NR{}BuqU-^t!!7a#Ltp`o^A0HYWGw;el|8rMw#S; ze`A1W5~>C&D%SUXVVcn;{Y3Hq3^!Eohh9-$jo&LIKGY!abdea3 zO23^Z?U^U>K55Ura$M6hK3yB-`2Ff)K_3u_u|W1?ob1Q>62D90*7$Fi`rIk?`L^U= z13ObZY-aPTgpFAk_9F%ynlyi5K z{%V{o+Pk7cFjAbQ>j>;X@=N7-pDAD?0e(pKnN}x&Y>7W3_5W_I08W(nXT09S{3snn z#qGby@%5lfF#c868!O}Fg-(H=0zK&3F8$d$k1Ue@aKPdZ_rN~n4~=sDGgXK&43}$N zy|=;T^Shh;E|=k|u5G9_T=}Jit}0KHXI-t&?`bM6%&qe_cuL(BbsmuyImcDm>Lvm1 zy4p=(T;Ad;mJ)L7+&-VjXSi0cSg?FWzN4YVm6n<3sq^?f%j&!p?z&=6wWBD@wccB? z-c#uhajI{59Sxjjbpx)wRB!(fqtkhO4Y$Lv2G9D)lwjqkh-A)>c=e zr^)9fjr<#3EvaFG(^q&ll=z!!8`hPTE_D=LQc1aK^K$Z6=6W0aP2RdXPg8EXqr?Y; ztS((;$sy*2Ilhezl}l^uJh^F(;u2qxg@+1`l9(nXS~KR=dDl6LiMP;s4rMy%wRGM#Lhv?E(D`0)}c&odjwk0iX0q&`j zUH*-Y9#?HcwbwyhCDxLS{+cF_yUJDRZm9Isk&Y$)g`U<*Pouxq+W>QudZnv$a1@hh zN{QdwRN_yY=gRl`Tq_$r4fWnCPl?N@_tg75;V!hmp(Mbu~A5S{vcoo+^?SE+3Lb#a0{& zNiQg&>bd7i-1(IblOPx@P>f(!lx~zpqw7GluIF5&Evg-D-RaY;CH#)cZVUuXy; zWmLKSZb2<9@K#>M;~(}dO3PFZP~YtLw7UF8I9&&3YK2w`4IEu6jD^(?m($!ZT9Rx} zR;}0NX=?H|@#usHWmUL+wUr2g6bkUyLPWv@w64LZ^LaeNz0LNd&D+pa>-Xe0V4lS^ zr3LmnS zZ=KJ90U)Mq7&5G{w23W)qV+ecODnYi#wx)gK!$)&Yg2uGZ(|Wpt(s5_1gtiijB0Kf z^efHRybffEg|xbobvjDN)a0v;I3r<{hUObKg&z^Y=fWWMWaPt%&Dd(e#i$Vuj?g9S zILhV-a$*J>l|yxn0##+BGR%-{?Nl{*N0$(8z9KCPD=dpAERaJ=w|PTzUERux^{iHe zA{?#57ejTS6~gtDA*-DT0gz z-UbJSYK^r{EEe)3v7`M6c-Fp?VCNZSps}X$6EuQiKXc#%KxJ3Yr$M|9<(r z%;QHlW9h+@u(o`rK2odAv^21Z1$KU(qiBI^J+J04Nuis=7#E__yxJznTe8vbS<+lx z?P+opweV6-NlQ?7Ek@v^Ier**t@Q_!i^BP!cC})CLCI~ zlk5eR-i8)Wlb-~X@FE~wKIU0048|s(XDF^2r?8lb#$=VS ziF|CWtd-M0&5UC4F}CudS#@mX*iF^iV{ApMYwPO9Rsus<^v5bZljC7;Y^8lzPJ}(b zFI=_%kYLc}oaTLzS^C zH`g^UCDka%UxEi_S87T|=r+w*1~}K1o|2xDY2=od=Pb#0rKQXhaCtcjW{AzE7<`#7 z2Hz~B|L9V*z-VJjF@7ug)%P#~^3^8y zf4e&DOe=h{+*jRU!Dq{T^KJ`%V7-vH+k#&!_dWMm@N8Lc(1I(vN8+^Ys`k*ShQm?t zz9@Kq6nr2Go*>^lP`&G^LU|=>xI=+RlQjH$8m`{!k(^WUQTzSsy@nN6@4KydvL^pd zO}7`?^Zjfc)exlc(QztLwf3Xqb8@GONu`Onj9T( z)%fMBOD@o+;kRjWc4)Zz?k8n;YxudKm7Udl6Vg-1cWeA|YoEjzdo=tUM#P`P8h*Ei z_i6Yo8s4wr@>Lb*4rut*8h=p3+cZ2uzV{*hFVXPqD0rfV%U6F~DoMjvYI5uvezt}u zN5Qi+e7VM7uHg@9_*$*s>7TLh9_&d4E>y&s^Ntif0l+fX?V7Vi&cflbZR(W zd74*|hGXI~uW}8i7^JSX8cuCfSB-{mQ6SPr4Zl^xTQyww!!`|{pz+_N;h50Pt4qTt znJB);t>JDB@7D0i8opb@@v73i_GtKxCTbY_G+f0z%I?wd>oxwv8m``bQg)w)Pt*AO zHT)+UKA_>#H9V-{mumQshUaSdu!e8daN{;RQ`EO7Yj}c&H)wdGhRavI zhToy#jT&y(@Kz1KO2gYUe3ORXq~S9(yi3DpYWNNf*Vjwk8oop0->u>5-+fT_9u5Do z#=lR)XK8qkhO6&JQ1)RB@6`DFG+ZuiIk#WKlQsSU4fkkxP{VJ~@F5MKqv69Eex8OK zx7(Q_|9?Qk6EwU;!xJ_9TN<9E;d3?IuHju8o~+@O8lI}*DH@)o;pc03wuYx_xKqP_ zsNqE#UZdgV8lJA2D4X@Gg+cmsV!{=#utA^jA;cXgzzlPtW;oCL5OT#lXe20c- zYIwJX*J=1}4OibWqU=2y?$r4AX?T`~_h`7j4m_;k>N~PjtWU!iX>$5C`~nRh(C`a2 zJgDIpY50(aFV^s34Zl{y4Y{5n|Cf)5oSUHG1sZ>%hW}Kx{v7tL{BBUhv_GXK9T4>Og~CAEineWnSO|9T0#tVG5rA1 zClTGo^bd$WndnBQZzr0j^1-!C-%K=3;e$m?-#|1yY7b^Jy@_a=vIkR{ZX%kdr z>xrhRcrcOa3ZiKW9yFL;~Y04UGWBOF0&n3E%>8V5~6TOz{2}IMBGFZfP4AC@| z3}!R^Ss7@W5(ZP5{*dUoMBADE8`0k;I+5vjh^7!fXfS<*XbSCvLtk+J6HOs~aDeIO zh)yHAkLd$MrxV@7^bE<&^4IKbQ94OvIgx;uP2&9)nFpi6+}~r8Z?+* zO*Dm|!J*H&|B22fdVuNWMCTCQ$Mh1Smk`~<^dh2jiQdC>I?;JVcQbt+(X=!g>|%N* z(MySLWBOF0ml55_^i-m03K(3=^aP^wi7sL~hUn!)XEXg-DdD!4eCweW@Hxo@u#la$`Zy=hMaD&-QZzB2% zqEne}BKk_A?M$yHdJWNuOji*79ik1UR}<|bdgx!=|3t4PdH}SuGkz@qXXi!5NXndZ zhMj@GINOIOZ-`m*EGC#ci^K%;;hK>Fnm@olNAS(e$h(gp~}Et{KupIn+xnla1FXFSOYcJ9E$G& zqwSy1R@0R-<*Y4GnWnglQo(5W&w_GquN2CiScdYa0*0)SzBPlFLBL=!{#197c+8b{ zXJ9j0);ts_JLc?g3_Clfe@KNpixZuJL`HhEDJUC!-`SeoQ3%E|Fgk|NpkM}K$#0&O z(o!KU2x$WWG`6s>I^cNI+3Ogl;!~b>yxBf%^Phu1*Nwx>Jo#u|`*4i^?DpYU|J-k@g~T^V>ra5W}{ z7|`h6eWX}01}tU^5|ur`i8f{@(IVnhK@?H(A(Ag-55kRp^Q^L@C@D<%@QQE~w)bR{ zGW*bpTxa`$4PuXHvA~N)Yd~_4Q;jMV*LkD4&~HLDG`VdL8sqFJ1cKfPyyy(PG14d7 zb^Wm+$_zY}jJ|gU{)-j}&Oj&mQ$b)WEk6nZovlc=^!V*l<~Z7>%qi@eGN-J2%A7TO zrp)p5Oqo;PH)T%qz?3Mn);?~2#YFbXD1bRcCajGhft}56&&e1nm~>J7tCd~Z&-`7u(}%EV$-)%sV@V~ zA2|bMaLU4gf`Fr+%=JVzRNapcEYchFeL`wDhC9kW3KUJFyXxNTL=wz*Q^g&O3K{GH zaEr15+}nu*_x-p}HXZ1jRr=M(kt((Qw<;}hUVrQ+GHKwcRxE4+|K-Qu{j`vL8qF|* zGtt1n0cYpdHp=BuG4koiNc&U7ccl4rnd5BlNpyB*9>fZQ%u;|-M;CN#C8kgN0bGGH z&cL(b-2W-L&mqmjZ8~|0rwl z84(>q(DetYg;%T*qpbvi3!y=T8uV^|pzt*($B*e}Tw>RPSJ2s;O@<)5(mmOO??W*y zh<4japG!WX>L>_tkG9hNp|&}X@g!0S+8IfQQQnQ~VT2H{0d)4&RztZY8L5DUHiza^o8w}S(0 z;`rL-c8~|09q|kJ4mG?TtfC^+4B4!m;C*5*jJJPDHkFn^?~lXm6krri9Ymd%%B+JqRA8b5F?v*%HAHqMPs@K!ggT!&;@}zFhq(lpX`y*;|n2shZvH!!SxjJ zIviajZUA+uj+*c*^ocQ8DYADsJDlWWJLEvC>|@dB;2duMez37dg>aXEBiQRW#>GD; zn3RBlJFqgUe8u_9JMpxJW8a`vhFEE|505l+1u|3&J|aqj0djf1i6{gXar8OcH}@GE zt01c{fB^027SZ{HA@0q764Bn1^04|nN@`~s|5}gUSEb;UkcSXPB!aHV(f_D zX4Y34s_%N%1*U|Zeg_MR)#7i-KJ5pcGB!~>$>JD~#}Qg1&;tqF<}ehaSPXOYYxe#l zIyqdidq@Kg^>@wE>|G@k`}-1Qh+pv?8zRVgR7HYW3q6TYhkijyhgo`&SwTHjpjsX) zD%fsTusT%1jiLh5A0juR?au_y3b{y-8o?^3=n@|xxFdd%DKQ}=F_R>=AIy?g%PFPR zWDgCfz*FVCcKa{deZ!jH$w_B65LEsPv)+Z9UBR_Qp zUjC=^XJX~eg`6D-KwC+4Mg8kMfx>j*+N zb`kK0+^&7|G2`0VQYhkcE1o7;=gvvX&NhrERER$hX1IRyv5!DsE64FKY5cLl>cP4H zRY;^YR2vV=_~UX^AHR`JcihKukn(gQw(Ww8j*(*A6rL42%lggfWdBi~PTDsIKb~?Y zN6}(D?SM3<1b&ZNwB>pG-*_d~xpgfXDkgxnBv}9)usbtnLp`#~UNGZHM6msIP_572 zrve;i2b`UEksvu!?4qtmFhj&M9qb+GCa~UM3*^By&f@k_Q2hJFW=l_n74icI$slh- zenH^RGGw!+q)jWE56ktVtXw`S>vCRyklg2roGZl|;lJ-uN4Wm~DUS+@`1^nBQ6Jki zkLrgdEgt0|JGO*x}fCoU^wF z@W|0PM4Rr=enP6bq(Bgot2YtK+^F^ILfH_7EfKwj#4_@6=wry)q&N7Xh|)vOUVhQi z>-d7QkK)-X{^u9MELeX9o_Qi2n1~mh7kSS@JXudB=YU8d3`?EPNtXdP`cyac3!j`;UW0QUr>GL^bZ%HEuEPQC}MQPUvmKx_|t316ms@csizSO zjNpT?zkGIw)rX-JKGWw=5%Jh1Vuh%+qwEXhAJ-S*83UH%_)Z&K=I$0n7_pHV3^c#X zQ$0PsK$jpXO7|Vp&k5BTi$g~;f%Gz)FGj)mMec~>r5!hMwKCLLlsN}Wgca;!oFb`IY$v1+JF}GMu z)w~;$@*kuh>Zjd|qJ*Q>vSo6VF9xUCT3PQVS%Rl5=y9sfBU`c!JXVWLB@MuT9x2#< zFx6@im=`-eq8q=nP;WkMavBTWffVd!cxlI-z*za`|lJk zdV^P@Sr%R%MV$FIXR4j(Y_6XqX&avfSpIf660s%!JS@UWFGMN6@0dP0OSdbUNY(QI zp?eIbqGZ9zJD)UQ2#0f;JEDEKw-Y|)mu1ga2Z~Zdkv7q^N5}LBIcO9E5<<|jSN;^% zVdk#*BH$5Pj1q~$mAMhqMsrCUPWfeaYBjc%CJ1e_?MHDJA4dvM94Q+v=vabQ(W{K* zP=?at1o3IceM^$F1Do9)7v~3_VSft#{%x`sEW`HWjntL_O-HgjOci?E03#e1n@JtO zIw$@96m62YSGX+9)*CeFK0te713Wpf=$}z-c*Oye)<--5Iht>S&ciPMyMB} z%?pb$E`#4EjXS3wNh4p%{1zbCyDAe2+W4d?=ikl?IaEZS7s5tf$MhMYd{*1?HYLWa zDXbiHs1Y`2zj+f)4YkW0G3?kpBcPk1INQL0kHIA93U+rb=RNel%&{ZYa-OH0_RYhF z|75{HdoKyn^LX~^`pvUb&f?d6>RA=zN$hZNeD0(Ppb!{`?`!@@#uah853=Q+E@oF) zSM=U-Xr5fMp|SU%f!Jy}U9I8(-9+81w%6}L$kLwtn!_7EDR5w>v zH^Plp%}ABirP7uvJ#G5sCTNV%SqbSEwqTQ>ZBK*=NtQyAtwNrnz6xn_hY<3glt4&x zn2;so~?KEyPAYcg@i^aVP2R78b#D4cB_Pih-@gDH4hgXtEX`AOWje zzz6`LEn9>GhB3q`2bE+&A%3@w0dzzRq2IxpZ1Uh$P-gJ>5ww~1Qgg1%StB3FSE(Vo z7DIF&hA0|W1__1T*rwTmA=(A`*aF3tv+&19xLKql;0|neqv|hz&prwTp$feG3{htK zgVQj2enTz;CMT2`tY9Z}95%OU73*`v`kZ7vgIE^`R#Z}!B zeL9=bGz6|r$G*bAGx>ob6bSAE_u%d9KEKWnV2S>A@UDLHi9swPqxi(TTm$>W9M+0` z;>^%(ELtu`JB@g)yTM3az}?M-@?mrCZgiUL?)Tum!Rx7t_JeD=lXJdfJ~ySJe}m}X z0ranUMT!+$Xl7po)p>zIvs5#E#{sV;r@xCA-ew2h2=PZx?r^;3tUIn9Xe{C;yg|Blx~+xbe!-6Vu&81mZNO(7Z3m1;#{nYR>$MX2En zsK$}zC1J{-vttbm-hb4OwZ6@NhKLI9@K9k7IG3HFH+Ysz$HO9M`~d2}N9%iZnc4Ta z$NK=7iTfT^%D(>_DiuS$4K*CS5iX!MzjMYs#$RA1)fhL2-$~S7v1uMQ%=hC>y4kO8 zD58&DyBwtfv~Kj+^)V{Pu36Cqe55tPk?K08t7`Oj!>~{Wc)Yv@_`UiiFKlHXMeDIR% zmxsB2pl}bO^KL}vZd3-xhyRIKc%sk&z6ZF&4BA(sap*Z3YW*re(|C!SqV?QQ(7kLF zUW9P~Xw63KLn&T`9hQObX$U)7uRHZ5Ha?rCm=(bH7i5~wS>ME|TOros)YG9+a1Z{F zQOYgva!{RIA9HupgvirDqNtHffDl%M7NE^yKj*<$q4`xbIbXr9%o=wSKaJ1?9`9Vb zH@JxzzKPyF5XyQ(njDO4(7(Z9{2{&7+mzAk`f$C=MU9d4{t}{u-ap12VhU**Bz{xx zBV4*Scz_wciQWmL^?ndt5X>H<-rb@`*g7nf)A!^N{_&1u%NB~4)EoM;2B8r_O|hHuiU^jAjp#!F~ua6Kegd&7xAg-WFt;RQ0DN}j}^+Jmi;n`m`I zVZ`*SeL{y|-jw~k^4TLCjJ^Z;Bt{5U366e;xjOjlWz}Uvs9ttiCYj3YvUAyRy}>Ep zxN&6=YH_s>(cWMus-VWHh>vy+qg_M$GGKYJ0vJ7iQqZ6%Ax6y+){^=NANdW%ZK#eX zr1s4N#>N@U-8sDrFPqKj(TD1tz0cAjini3(V0xkn4 z19Eo6AD)E-Qhn*w>jM8VMVboy^jUFd#xJho%Y7An}*Nu$qn&{kia~#pQRbwf;5wbzjU^Ryx ze`D_dnQvmJA{ZyZXM4A1;4YQCS9}vY3#8NhCU!Pa9ojds>5CN3&Q2=sjQmaP(D%2U zU=pti-RS6$y&_wn%^45Tqm7{APn1$ckxL<#I0GLBzT&rugSVl}G56u$`Dy>G&vM40 zfn$^G4PL*!w!!YNsrA{f!fBs4{+N%uTZC8Ax$cH@DYw>N%cp1CaaP@2ySLeI_g34f zu+!a8h4ZL=l9SG_v*QRZkEGR+tM*#2JU>iGl;=K@ILXOJeu<(m_vPMZJC0(udmHLD z+HsJn-4sN^eWY)FbDh7okqD@gnU*e;MhUy+bW?5&gLITLj?6<-J)$O=6_OtzmyS;( zm|GC6tMNA1RoQWRpRX3jhuU$#GK@rQFjxVOUxh)dg}Li- z_@H|oTG!ac8si|}98*uh7*XwPvyX`IL znkrbhvcg_L2ldUh!z?&96jrLlk$AW%%qe%Fv*_$sKdEUHHF%1|2Tc^f<+ z$W%B_&TI(5c5xK^|76AaLY+Ey!@Bdud2PBb?4+VPBZ5xChow@!P-tiX}5c6nN&Qq5t1^BvU(RYF&qCdGCYlTlay@;#+ zOU>i*P{tfue4ZYnggk2=DsWJs@H;^UNBnp}mEA0C=QB`^;*ex41@kHVc{3&0v76ru!Beo z_6gWMEr!y60`^0eu$ZbxJbQ zDtfJg^an^AksdDwn5#sx^}C#tHDu04H`1T}19~Cd_x{L88`8$1k&)dG(LGM%&;c#^l7MlarQDnYbaL&A9l~3(lK2 zYbF&Wo;-Z|d&L^j$eEnDEhcx;xT_#Y<|8p|n~Dm!hVl1!PO%%O>Ge=uhf)3+q;a34 zBb1DoCxsB;RL_6lQ*k(YJMT{$6Vy!fPAN(ACqgAFF^i7$e*p}yF=yckY9(fM!J~#T^7pUPW2<7`$XAbWhnnY zkbfua)U20}X*BD99{Gb`lYb2Pr$at>oRYsr$frIa`DY@(7x!`Pa6rYgY+E04# zME>k3`BYC8^5-I-epV=MqotlHA$_)k?@Y`U^NFwB!Z$a>H!TkG@L113|E6p}ZJR4} zMwRRb^fP#iFz3+E%Ec|wYFYVf303VW}_*8+BnRy$bTm+|Bq&V2J*jyaqSGt55>V!88wB7csaUnTM>#$Ad0FOW|^HyD?z)sx>DyFIQwKK71S!3LUO z{FmGk+Zne#zI|Nm8)_htAD)gOHVbRC8r++0h!G8?{0os^hy2xH`DI)u+2IS+w+s37 z^J{SvwfZQQq=}kHuUU}uIM#ghZ#?2+HNKEudz4-zw-o&OSo6`(t;UVSg>)miJo||F zbPf1Yu@`cSG$shWyj<#c=-ej?y9aEOxC~C_?h>cs8JK zX2cb1deXRkEF>obYyQ39bL#bI>%davzlHor_NKL+ANk#|2i}^8T_Yp5iNCPL{L+Sh zpMg8$6)OS@=5vwzLbldpT-)u#KeCXYdjni|5mKg8x!+FtkK8!Z!$g- z69b;@Qp&{YU&Q_-&Ui?YXJ2$j%u{hjAU6J2amJ5hr|yh1UX6{vGtRg*E*|$iV`H0W zf7*6?jB%ILF5I?g)w%J_#=O(rMmf?}YQa4VZF4Vo} z+q&Wa+!s%IH;=>jRGuGq!58rc;t%!4y~o>8c8=|g%wO8xiiz!ti9Z|@yB}?iiTyGL z%zd%(@5e~yM&>=kmNZ>1vpH6^hSw*I-+iiPeVuQB$?wHuSW8!iDJCe0K zHojNMnx$l&U;6`F>>iT!r45dtWW{m*blaq}?d7%-M44T-cn30%O(cCs-3eTLk+13jDx3>88z;`l!if!`Q7jCiHu0zHvw)m^5c06lRp73Y_W-gAu4(9&8&A5}$pR=p8Pyg?q|FyvXTHya(7EnJ0p?>;7{nUf{X$SRF4(g{H z#@f1IhkdL?{+IuMzych^A%}i;gf2zrS?CfAO+RCz^V83e&~>~>jGOqO*}#t&i%b24 zJN_9HUpLAAK26feGCftM>L)>Hy+{|9+I)Td)rgmF=o~P*FthNrj~8L|V=3aI{c^e{ zh{Sk9>W3v6Ur92>>Q7uk=-y~~0?Gf90Ncz|7GJQ{`pU89^ zZ|>qu%$Wcs>H-;?PlG9Aa87N}pQvt>G8 zrb}hIN~YB^ZIS6VncgkaT{7J((?c?SU8e8J^b?tmyFi%jB$>{Z>3o?kmFX&(R?Dm&$aNOsi$uBGYX$y<4WcWV%G8rb}hIN~YB^ZIS6VncgkaT{7J((?c?SU8e8J^b?tm z!@EYhPLk%^Q`6GZ(oz@NlZ){l*y;8Q{M%V`=!e20@TR7wS$XFnxTW|u*8ANRNc~MBtx{|0 zo!>~|UrbEFPq^Y9uVZVG=jGo$OYzjWs+-*P9#>5j$|?#q;8)Ycdt(;m)hzjvLYeq_?x4s^~HypC~|J~hbC{D3m z%{zEPZOHnx9m83YRn|s`6^yRA~a9Md_k? ziAR-BA`n+LJ|tU}SM#t+)w~N9zSR0c(N5gZ9H`2xc~7OQWC5kW;!|lE%F~>xXf>~@ zv|Cn0`qM}0FJYrf;;Ouw$5pE4aaF%6uiD>WDX-QADpl(UDo<+>Yx!1S)I_yzQR^m^ zo{BvEqBiK44}@NR4|OOmmGV1X0r6kio#szrT?->U!3vb?f?TchAq=^4r}Qh>Go+b!k0TLhy@>AM;FWv#y(nbdy8=G-W_Rk~d* z7zJ$hpCpZkaHE%hjSPZIrJpIm0%jkSx12nQzmxG%{-xH%H+2ZEWRaMEmH#Nz>rerYMMesarxhbW-*l*LE+Pb?}YS*n`UJM7GwD$C2^tcs5se+ej0`lp&4;zpG( zx8TG}mrCieNY%|5^3P4OetP$>Ulx+(SX`Xh?e~gOJMb^H={f@+CqBwy3>6o{ z@kBG;h2tj}DxQVoQw{Cb%^g{4LFk; z-&$@gp3c>{)nNGLDTW%4;kb2H7UL<-_+UimqkGy9u^FS=bqeqpth}uKl_K%5-?ssl zBXR5g+GW6Pnx1NWRx>`@&JXRlRRrF6vYD;`IjWul7T&_4ZlnrGJI+b@i@|Qtzhq;q|^L>s9-&)_T=X z+p6{^AV_~*y;V`_o!<~%@2QYO{iXJMt@RFA+6y%!)_Vcu*syZxlj|i>3*PrLK6<=R zekA?Nm_IarReP_Ndai90l4*@Z*GA?a9S3fea;)S19>%8`LD?=L1@Gr1zxv5rRqp}d zWFKq2hnatLym}e5t5&g6^z5AI2HJwiv_Sk;%7;`wO#=GC7v(wo@@aul(-i- z$zQ!h0BW7k37qDB>-961V?_<)KotDg2Zt7_9#_5btG|J_IWwzwWl6Xt5 z06vho1NaQg3+ktl)jI16;MCr|s|6!or1P~+%K5_;g2s*pU-W%uyS&$vr=#GnvK*aL z+|$=drXt!~=h?plpMhQQMxWqQZKtolsC!)+eUCa)zg!%JzXUk7H@j3wnI?tRGyg>6 zBewvgIgI;R{wYS09Pi3*yCwfLY5zPa=b*&nt`q=$2Z^q~GcNA+zvHo(kJPRiz)8>D zR|#(Ahec8N8>8TNNjc@RL0Pi$p98n+ipcxtqR5$oO&9VXL+&ptea-<+dbUV=_DVSy z0gu$KQpP757s?5NzMDzcMu}U;@9k0K?3DZ`NjbBH7-PT0pOk)kmc)+%x66Ay8HYeb z`e#WyFOr$(OMI4W*Xa_^1x|71hcyEDqr~eNmxPvVll;4v3eag2=?;kxEfciT{~?KQ zFAz9?*A%yJ04F{BrJl;?|0VGYW&bKYr{Y0@^xQ%V9$fPA&Y*uiJ5xYmf3ISEqR}Pg zD1ElDoG?}Z9-K(X~k8)y0CA;oB$%PW^tTTvvQsWE*wNF9|KVMe@(|3h*VF z_atx{zunRfNfLia@>|F6U!%zXjO9!+{vqwG)(MlaaF1lS3dScID=I{V^qoh#?gmcn zS|t5*u7HilB|rbT8!-AVIbCl7=lEmk#}Aob@aTU}m?Y#^OZoIXP1o7L$^M^ZGs(}` zbhk+IH(e!g<!jKCMpB*&;FC22T2~-ELhiu zza+FIVY1LOQOe&Z^A-S)G``B1UlSm28-SCYhZ+QsF7YnliQ03JDtRyPNb+9>9x0wo zh66F)j)09Fz{zf@opwf&B>srxFO_!Y z?=B+mWyU3wmV6QgPfQf;de9}9={vx5Ed);bm&*7*Q^3Y*$v>?~0QB8`y1Ez__xj&Q zqTsJcIbX^3>H%43SmM_CVgfqFt_zm;rvN8Ct@G5kfs@_3q`yHdUl#(We!NA-+hY>1 zW?T|laxHN3lbSp18j2qSVELi_5GDV6z)7DtIqv4mQjah{o`0o2sStgS)TiRlH7rM9`roc7_#Vb58i7i|-6QosBJu5Rf!9c36R@Ns zKe1c<kTRAK!c#aE%9NATl?LpZ1Vg3&G?bcO2g$^o?GlH$S)~%x$uw3n>_1k@o&GI zT>g3&&Ua|Qkp>YUm#fO_T36?-aM!u2@NbiSE_ZXQfw#{%#Q=u`q|8s7w*ZnOFuCY8 zxp>9x!kg-*jfQwlUe#P*zY#?=%0+M2!&vE`_j^%@&oD@-#N(`M_3DDOESGB?{zW$a z!Me*`>91|^xEfm=>8YbpyyDNHlLD6FABoH2CH?{wul4eq{93OI2Uj%GA9s~uQgobz z2UTUHxm-TK+h1GBs`2p}pu7z(92ViK!Z8cu@rK#}~2mXa?8P z;+#T<%dsL4{vw=5+~-|}FDg{0!0N57u10)`!rOp<;P2n)YDuMjCBvCES-Es+iKEn2 znzN+9K~hQ!b4`g=KCi2Wk0>#e$knC!mUAhjxV+0(60%fu=DEMRvvJ!eF)8fUXZ=~W2pAXT>wYsXV$Z9SAZVnVKiKuXiAI{_F5D-iJY4cq95V{hl>(t|HmJ*jSruIrVk|$_1xEs8sIA123 zdGpfIJ7bd1@lH8c@g*g`@Rqq;m91_U4ti;=wYU??sF9GKzRcs#!|5TFexYYhRTYjB z@o7WOXq17uz8SJOY+B8=!fO7!NZvlG2MTN@1VC4$GsTH9(R3yWvRTv z(;c-XWE_;gN-agvoK!sE!?7BL`mCMV$GRogHoyb10@2 zd-wn;b8g9n&x?^L<|;MStiU7)6-J8PawEEK>p>5FVv^ za^X@O9K@5ESRJst(2-TH<^~)~hFI&VvUZVK7K;mUB9t~ht&5&fYpGEq0ZvZQtj_20 zTovAQoiqzg;u4>A=(4M=vW#ardK;UuK540K@;AHdtbMW2tXf4Wiwv3{NCDMp zX$#S7au(g__lTL)QPffw#*~?d@$L64<7cj7PqjYBj>%da^;J|v73pbwn3eT}EOYg$ z;zoF|gdwV1X-OaMA7j#l&Z8^hM>(ibiitYf8W_+tMKYB#;)&Bbc7%A4LeWO^vdIeTi8T1A12n+adi_)MIwvM=f z&Zxq|Mhk}I91$1V-Ugn-G}by^nPAvQXa~fkWv~O7%L%jRg*sv(D5J6b>N*~At!~dF zd-T$0Ob)?M-TKH_U@En;va-3U$x|hUPAGBY9q(cb!(ZPj+8OJ09vP_TZ$!N}SVaQA92%O7lad#Ndq zGaykV9(=;rmZZid;SQLwp~mfJ`(nu((N(w(2y|g$uB-{G$6UC{=R9qg^4d)e)3l6b z9>18P*Mu!?c>W$!+vq4=@jwMx)~ykKBnr2_e8>;)0Mf%+mi=Q)s?;`MPZ7@; zG{K68O(TLcxK=l8sJGaO=BzO;=;mR?H_F~+4I8kM#r}-1xt^YLa&xhvg-C_wg~uYc zbGTue8%8@O3YPfXC5{N271o}EsnuK>8r5t=>Y>r*w&)|DCCy<*dv*~QUi_F!UR)As bQ0qfAlb0t5D`~Fv9Hr$Jh1KO~ZTNox+M(1# diff --git a/docs/user-manual/en/ha.xml b/docs/user-manual/en/ha.xml index f6772f4d93..b1f35574cc 100644 --- a/docs/user-manual/en/ha.xml +++ b/docs/user-manual/en/ha.xml @@ -841,14 +841,14 @@ To prevent this, HornetQ will unblock any blocking calls that were in progress at the time of failover by making them throw a javax.jms.JMSException (if using JMS), or a HornetQException with error code HornetQException.UNBLOCKED. It is up to the client code to catch + >ActiveMQException with error code ActiveMQException.UNBLOCKED. It is up to the client code to catch this exception and retry any operations if desired. If the method being unblocked is a call to commit(), or prepare(), then the transaction will be automatically rolled back and HornetQ will throw a javax.jms.TransactionRolledBackException (if using JMS), or a - HornetQException with error code HornetQException.TRANSACTION_ROLLED_BACK if using the core + ActiveMQException with error code ActiveMQException.TRANSACTION_ROLLED_BACK if using the core API.

@@ -859,8 +859,8 @@ Consequently the transaction will be marked as rollback-only, and any subsequent attempt to commit it will throw a javax.jms.TransactionRolledBackException (if using JMS), or a - HornetQException with error code HornetQException.TRANSACTION_ROLLED_BACK if using the core + ActiveMQException with error code ActiveMQException.TRANSACTION_ROLLED_BACK if using the core API. 2 phase commit diff --git a/docs/user-manual/en/intercepting-operations.xml b/docs/user-manual/en/intercepting-operations.xml index e09cd3c538..f87423026c 100644 --- a/docs/user-manual/en/intercepting-operations.xml +++ b/docs/user-manual/en/intercepting-operations.xml @@ -39,7 +39,7 @@ package org.apache.activemq.api.core.interceptor; public interface Interceptor { - boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException; + boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException; } The returned boolean value is important: @@ -79,7 +79,7 @@ public interface Interceptor packet is aborted which means that no other interceptors are be called and the packet is not be processed further by the client. Typically this process happens transparently to the client (i.e. it has no idea if a packet was aborted or not). However, in the case of an outgoing packet - that is sent in a blocking fashion a HornetQException will + that is sent in a blocking fashion a ActiveMQException will be thrown to the caller. The exception is thrown because blocking sends provide reliability and it is considered an error for them not to succeed. Blocking sends occurs when, for example, an application invokes setBlockOnNonDurableSend(true) or @@ -87,7 +87,7 @@ public interface Interceptor application is using a JMS connection factory retrieved from JNDI that has either block-on-durable-send or block-on-non-durable-send set to true. Blocking is also used for packets dealing with transactions (e.g. - commit, roll-back, etc.). The HornetQException thrown will contain the name + commit, roll-back, etc.). The ActiveMQException thrown will contain the name of the interceptor that returned false. As on the server, the client interceptor classes (and their dependencies) must be added to the classpath to be properly instantiated and invoked. diff --git a/docs/user-manual/zh/ha.xml b/docs/user-manual/zh/ha.xml index ec954bb3e5..d86c8fcebe 100644 --- a/docs/user-manual/zh/ha.xml +++ b/docs/user-manual/zh/ha.xml @@ -218,13 +218,13 @@ 因此客户端可能永远也不会得到响应,也就可能一直阻塞在那里。 为了防止这种情况的发生,HornetQ在失效备援时会解除所有的阻塞调用,同时抛出一个 javax.jms.JMSException异常(如果是JMS)或HornetQException异常。异常的错误代码是HornetQException.UNBLOCKED。客户端需要自行处理这个异常,并且进行 + >ActiveMQException异常。异常的错误代码是ActiveMQException.UNBLOCKED。客户端需要自行处理这个异常,并且进行 必要的操作重试。 如果被解除阻塞的调用是commit()或者prepare(),那么这个事务会被自动地回滚,并且HornetQ 会抛出一个javax.jms.TransactionRolledBackException(如果是JMS) - 或都是一个HornetQException,错误代码为 HornetQException.TRANSACTION_ROLLED_BACK(如果是核心接口)。 + 或都是一个ActiveMQException,错误代码为 ActiveMQException.TRANSACTION_ROLLED_BACK(如果是核心接口)。
事务的失效备援处理 @@ -232,8 +232,8 @@ 能保证发出的消息或通知没有丢失。 因此这个事务就会被标记为只回滚,任何尝试提交的操作都会抛出一个javax.jms.TransactionRolledBackException异常(如果是JMS),或者是一 - 个HornetQException的异常,错误代码为HornetQException.TRANSACTION_ROLLED_BACK(如果是核心接口)。 + 个ActiveMQException的异常,错误代码为ActiveMQException.TRANSACTION_ROLLED_BACK(如果是核心接口)。 客户端需要自行处理这些异常,进行必要的回滚处理。注意这里不需要人工将会话进行回滚-此时它已经 被回滚了。用户可以通过同一个会话重试该事务操作。 HornetQ发布包中包括了一个完整的例子来展示如何处理这种情况。参见 diff --git a/docs/user-manual/zh/intercepting-operations.xml b/docs/user-manual/zh/intercepting-operations.xml index 04e5750d5e..1878bc730b 100644 --- a/docs/user-manual/zh/intercepting-operations.xml +++ b/docs/user-manual/zh/intercepting-operations.xml @@ -32,7 +32,7 @@ package org.apache.activemq.api.core.interceptor; public interface Interceptor { boolean intercept(Packet packet, RemotingConnection connection) - throws HornetQException; + throws ActiveMQException; } 它的方法的返回值是很重要的: diff --git a/examples/jms/interceptor/readme.html b/examples/jms/interceptor/readme.html index c662489423..4ded622db1 100644 --- a/examples/jms/interceptor/readme.html +++ b/examples/jms/interceptor/readme.html @@ -16,7 +16,7 @@ public interface Interceptor { - boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException; + boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException; } @@ -129,7 +129,7 @@ public class SimpleInterceptor implements Interceptor { - public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException + public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { System.out.println("SimpleInterceptor gets called!"); System.out.println("Packet: " + packet.getClass().getName()); diff --git a/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/SimpleInterceptor.java b/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/SimpleInterceptor.java index 51b4e76a8e..095e1e563b 100644 --- a/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/SimpleInterceptor.java +++ b/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/SimpleInterceptor.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.jms.example; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; @@ -28,7 +28,7 @@ import org.apache.activemq.spi.core.protocol.RemotingConnection; public class SimpleInterceptor implements Interceptor { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { System.out.println("SimpleInterceptor gets called!"); System.out.println("Packet: " + packet.getClass().getName()); 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/HornetQAeroGearBundle.java index b760e273d2..e9e9136bef 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/HornetQAeroGearBundle.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.integration.aerogear; -import org.apache.activemq.api.core.HornetQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; import org.jboss.logging.annotations.Message; import org.jboss.logging.annotations.MessageBundle; import org.jboss.logging.Messages; @@ -33,14 +33,14 @@ public interface HornetQAeroGearBundle HornetQAeroGearBundle BUNDLE = Messages.getBundle(HornetQAeroGearBundle.class); @Message(id = 239000, value = "endpoint can not be null", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException endpointNull(); + ActiveMQIllegalStateException endpointNull(); @Message(id = 239001, value = "application-id can not be null", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException applicationIdNull(); + ActiveMQIllegalStateException applicationIdNull(); @Message(id = 239002, value = "master-secret can not be null", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException masterSecretNull(); + ActiveMQIllegalStateException masterSecretNull(); @Message(id = 239003, value = "{0}: queue {1} not found", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException noQueue(String connectorName, String queueName); + ActiveMQIllegalStateException noQueue(String connectorName, String queueName); } 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 9f01cf49ef..0742f673b9 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 @@ -15,7 +15,7 @@ package org.apache.activemq.integration.vertx; import java.util.Map; import java.util.concurrent.ScheduledExecutorService; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.Binding; @@ -179,7 +179,7 @@ public class IncomingVertxEventHandler implements ConnectorService } } - private void manualEncodeVertxMessageBody(HornetQBuffer bodyBuffer, Object body, int type) + private void manualEncodeVertxMessageBody(ActiveMQBuffer bodyBuffer, Object body, int type) { switch (type) { 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 4092b246cc..6860304653 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 @@ -16,7 +16,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ScheduledExecutorService; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.filter.Filter; import org.apache.activemq.core.persistence.StorageManager; @@ -220,7 +220,7 @@ public class OutgoingVertxEventHandler implements Consumer, ConnectorService private Object extractMessageBody(ServerMessage message, Integer type) throws Exception { Object vertxMsgBody = null; - HornetQBuffer bodyBuffer = message.getBodyBuffer(); + ActiveMQBuffer bodyBuffer = message.getBodyBuffer(); switch (type) { case VertxConstants.TYPE_PING: diff --git a/pom.xml b/pom.xml index 014063ba22..8a4ae733f6 100644 --- a/pom.xml +++ b/pom.xml @@ -72,11 +72,11 @@ Also see: http://youtrack.jetbrains.com/issue/IDEA-125696 --> - -Djava.util.logging.manager=org.jboss.logmanager.LogManager + -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dlogging.configuration=file:${hornetq.basedir}/tests/config/logging.properties - -Djava.library.path=${hornetq.basedir}/hornetq-native/bin/ -Djgroups.bind_addr=localhost + -Djava.library.path=${hornetq.basedir}/activemq-native/bin/ -Djgroups.bind_addr=localhost -Djava.net.preferIPv4Stack=true - + ${project.basedir} false false @@ -743,7 +743,7 @@ true alphabetical false - ${hornetq-surefire-argline} + ${activemq-surefire-argline} diff --git a/tests/byteman-tests/pom.xml b/tests/byteman-tests/pom.xml index 0d57ce25b0..221f085c4d 100644 --- a/tests/byteman-tests/pom.xml +++ b/tests/byteman-tests/pom.xml @@ -218,9 +218,9 @@ true --> false - + - ${hornetq-surefire-argline} -noverify + ${activemq-surefire-argline} -noverify 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 dd78991372..f2c0672817 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 @@ -17,9 +17,9 @@ import javax.transaction.xa.XAException; import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQTransactionOutcomeUnknownException; -import org.apache.activemq.api.core.HornetQTransactionRolledBackException; -import org.apache.activemq.api.core.HornetQUnBlockedException; +import org.apache.activemq.api.core.ActiveMQTransactionOutcomeUnknownException; +import org.apache.activemq.api.core.ActiveMQTransactionRolledBackException; +import org.apache.activemq.api.core.ActiveMQUnBlockedException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -77,7 +77,7 @@ public class BMFailoverTest extends FailoverTestBase } private static boolean stopped = false; - public static void stopAndThrow() throws HornetQUnBlockedException + public static void stopAndThrow() throws ActiveMQUnBlockedException { if (!stopped) { @@ -326,7 +326,7 @@ public class BMFailoverTest extends FailoverTestBase session.commit(); fail("should have thrown an exception"); } - catch (HornetQTransactionOutcomeUnknownException e) + catch (ActiveMQTransactionOutcomeUnknownException e) { //pass } @@ -378,11 +378,11 @@ public class BMFailoverTest extends FailoverTestBase session.commit(); fail("should have thrown an exception"); } - catch (HornetQTransactionOutcomeUnknownException e) + catch (ActiveMQTransactionOutcomeUnknownException e) { //pass } - catch (HornetQTransactionRolledBackException e1) + catch (ActiveMQTransactionRolledBackException e1) { //pass } 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 f5b3b7d3ca..508fcfd2dd 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 @@ -15,7 +15,7 @@ package org.apache.activemq.byteman.tests; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQNonExistentQueueException; +import org.apache.activemq.api.core.ActiveMQNonExistentQueueException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.management.ManagementHelper; @@ -105,7 +105,7 @@ public class ClusteredGroupingTest extends ClusterTestBase { sendWithProperty(0, "queues.testaddress", 1, true, Message.HDR_GROUP_ID, new SimpleString("id1")); } - catch (HornetQNonExistentQueueException e) + catch (ActiveMQNonExistentQueueException e) { fail("did not handle removal of queue"); } @@ -188,7 +188,7 @@ public class ClusteredGroupingTest extends ClusterTestBase { sendWithProperty(1, "queues.testaddress", 1, true, Message.HDR_GROUP_ID, new SimpleString("id1")); } - catch (HornetQNonExistentQueueException e) + catch (ActiveMQNonExistentQueueException e) { fail("did not handle removal of queue"); } @@ -273,7 +273,7 @@ public class ClusteredGroupingTest extends ClusterTestBase { sendWithProperty(0, "queues.testaddress", 1, true, Message.HDR_GROUP_ID, new SimpleString("id1")); } - catch (HornetQNonExistentQueueException e) + catch (ActiveMQNonExistentQueueException e) { fail("did not handle removal of queue"); } @@ -366,7 +366,7 @@ public class ClusteredGroupingTest extends ClusterTestBase { sendWithProperty(0, "queues.testaddress", 1, true, Message.HDR_GROUP_ID, new SimpleString("id1")); } - catch (HornetQNonExistentQueueException e) + catch (ActiveMQNonExistentQueueException e) { fail("did not handle removal of queue"); } 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 f4212384cf..07c7594c5f 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 @@ -21,7 +21,7 @@ import javax.jms.Queue; import javax.jms.Session; import javax.jms.TextMessage; -import org.apache.activemq.api.core.HornetQNotConnectedException; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.apache.activemq.jms.client.HornetQConnectionFactory; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.tests.util.JMSTestBase; @@ -151,7 +151,7 @@ public class GroupingTest extends JMSTestBase } pause = true; - rc.fail(new HornetQNotConnectedException()); + rc.fail(new ActiveMQNotConnectedException()); pause = false; for (int j = 0; j < 10000; j++) diff --git a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/MessageCopyTest.java b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/MessageCopyTest.java index fc32ddbae1..ded0be2c44 100644 --- a/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/MessageCopyTest.java +++ b/tests/byteman-tests/src/test/java/org/apache/activemq/byteman/tests/MessageCopyTest.java @@ -16,7 +16,7 @@ import java.util.ArrayList; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionSendMessage; import org.apache.activemq.core.server.impl.ServerMessageImpl; @@ -148,7 +148,7 @@ public class MessageCopyTest try { SessionSendMessage ssm = new SessionSendMessage(msg); - HornetQBuffer buf = ssm.encode(null); + ActiveMQBuffer buf = ssm.encode(null); System.out.println("reading at buf = " + buf); simulateRead(buf); } @@ -190,7 +190,7 @@ public class MessageCopyTest Assert.assertEquals(0, errors.get()); } - private void simulateRead(HornetQBuffer buf) + private void simulateRead(ActiveMQBuffer buf) { buf.setIndex(buf.capacity() / 2, buf.capacity() / 2); diff --git a/tests/concurrent-tests/pom.xml b/tests/concurrent-tests/pom.xml index 481876e74b..44cebc401a 100644 --- a/tests/concurrent-tests/pom.xml +++ b/tests/concurrent-tests/pom.xml @@ -88,7 +88,7 @@ **/*Test.java - ${hornetq-surefire-argline} + ${activemq-surefire-argline} diff --git a/tests/integration-tests/pom.xml b/tests/integration-tests/pom.xml index 10448c2279..34f60b50e7 100644 --- a/tests/integration-tests/pom.xml +++ b/tests/integration-tests/pom.xml @@ -256,7 +256,7 @@ **/ReplicatedJMSFailoverTest.java org.apache.activemq/tests/util/*.java - -Djgroups.bind_addr=::1 ${hornetq-surefire-argline} + -Djgroups.bind_addr=::1 ${activemq-surefire-argline} 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 7775729c1d..f174a1d8da 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 @@ -16,8 +16,8 @@ import javax.transaction.xa.XAException; import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQDuplicateIdException; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQDuplicateIdException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -752,11 +752,11 @@ public class DuplicateDetectionTest extends ServiceTestBase { session.commit(); } - catch (HornetQDuplicateIdException die) + catch (ActiveMQDuplicateIdException die) { session.rollback(); } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -1902,11 +1902,11 @@ public class DuplicateDetectionTest extends ServiceTestBase { session.commit(); } - catch (HornetQDuplicateIdException die) + catch (ActiveMQDuplicateIdException die) { session.rollback(); } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -1922,11 +1922,11 @@ public class DuplicateDetectionTest extends ServiceTestBase { session.commit(); } - catch (HornetQDuplicateIdException die) + catch (ActiveMQDuplicateIdException die) { session.rollback(); } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } 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 8f4c826a86..a57347698a 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 @@ -12,8 +12,8 @@ */ package org.apache.activemq.tests.integration; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; @@ -72,7 +72,7 @@ public class InterceptorTest extends ServiceTestBase private class MyInterceptor1 implements Interceptor { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { @@ -90,7 +90,7 @@ public class InterceptorTest extends ServiceTestBase private class InterceptUserOnCreateQueue implements Interceptor { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.CREATE_QUEUE) { @@ -125,7 +125,7 @@ public class InterceptorTest extends ServiceTestBase private class InterceptUserOnCreateConsumer implements Interceptor { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_CREATECONSUMER) { @@ -160,7 +160,7 @@ public class InterceptorTest extends ServiceTestBase private class MyOutgoingInterceptor1 implements Interceptor { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_RECEIVE_MSG) { @@ -178,7 +178,7 @@ public class InterceptorTest extends ServiceTestBase private class MyInterceptor2 implements Interceptor { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { @@ -192,7 +192,7 @@ public class InterceptorTest extends ServiceTestBase private class MyOutgoingInterceptor2 implements Interceptor { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (isForceDeliveryResponse(packet)) { @@ -210,7 +210,7 @@ public class InterceptorTest extends ServiceTestBase private class MyInterceptor3 implements Interceptor { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_RECEIVE_MSG) { @@ -228,7 +228,7 @@ public class InterceptorTest extends ServiceTestBase private class MyOutgoingInterceptor3 implements Interceptor { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { @@ -246,7 +246,7 @@ public class InterceptorTest extends ServiceTestBase private class MyInterceptor4 implements Interceptor { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (isForceDeliveryResponse(packet)) { @@ -265,7 +265,7 @@ public class InterceptorTest extends ServiceTestBase private class MyOutgoingInterceptor4 implements Interceptor { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (isForceDeliveryResponse(packet)) { @@ -331,7 +331,7 @@ public class InterceptorTest extends ServiceTestBase this.wasCalled = wasCalled; } - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { @@ -384,7 +384,7 @@ public class InterceptorTest extends ServiceTestBase this.wasCalled = wasCalled; } - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (isForceDeliveryResponse(packet)) @@ -835,10 +835,10 @@ public class InterceptorTest extends ServiceTestBase producer.send(message); Assert.fail(); } - catch (HornetQException e) + catch (ActiveMQException e) { // expected exception - Assert.assertTrue(e.getType().getCode() == HornetQExceptionType.INTERCEPTOR_REJECTED_PACKET.getCode()); + Assert.assertTrue(e.getType().getCode() == ActiveMQExceptionType.INTERCEPTOR_REJECTED_PACKET.getCode()); } } 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 3725966534..c12ee960f0 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 @@ -17,9 +17,9 @@ import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQPropertyConversionException; +import org.apache.activemq.api.core.ActiveMQBuffer; +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.api.core.client.ClientConsumer; @@ -159,13 +159,13 @@ public class AcknowledgeTest extends ServiceTestBase { message.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { try { session.close(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { e1.printStackTrace(); } @@ -302,13 +302,13 @@ public class AcknowledgeTest extends ServiceTestBase { message.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { try { session.close(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { e1.printStackTrace(); } @@ -341,37 +341,37 @@ public class AcknowledgeTest extends ServiceTestBase } @Override - public ClientMessage receive() throws HornetQException + public ClientMessage receive() throws ActiveMQException { return null; } @Override - public ClientMessage receive(long timeout) throws HornetQException + public ClientMessage receive(long timeout) throws ActiveMQException { return null; } @Override - public ClientMessage receiveImmediate() throws HornetQException + public ClientMessage receiveImmediate() throws ActiveMQException { return null; } @Override - public MessageHandler getMessageHandler() throws HornetQException + public MessageHandler getMessageHandler() throws ActiveMQException { return null; } @Override - public FakeConsumerWithID setMessageHandler(MessageHandler handler) throws HornetQException + public FakeConsumerWithID setMessageHandler(MessageHandler handler) throws ActiveMQException { return this; } @Override - public void close() throws HornetQException + public void close() throws ActiveMQException { } @@ -502,13 +502,13 @@ public class AcknowledgeTest extends ServiceTestBase } @Override - public HornetQBuffer getBodyBuffer() + public ActiveMQBuffer getBodyBuffer() { return null; } @Override - public HornetQBuffer getBodyBufferCopy() + public ActiveMQBuffer getBodyBufferCopy() { return null; } @@ -634,13 +634,13 @@ public class AcknowledgeTest extends ServiceTestBase } @Override - public Message putObjectProperty(SimpleString key, Object value) throws HornetQPropertyConversionException + public Message putObjectProperty(SimpleString key, Object value) throws ActiveMQPropertyConversionException { return null; } @Override - public Message putObjectProperty(String key, Object value) throws HornetQPropertyConversionException + public Message putObjectProperty(String key, Object value) throws ActiveMQPropertyConversionException { return null; } @@ -670,61 +670,61 @@ public class AcknowledgeTest extends ServiceTestBase } @Override - public Boolean getBooleanProperty(SimpleString key) throws HornetQPropertyConversionException + public Boolean getBooleanProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public Boolean getBooleanProperty(String key) throws HornetQPropertyConversionException + public Boolean getBooleanProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public Byte getByteProperty(SimpleString key) throws HornetQPropertyConversionException + public Byte getByteProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public Byte getByteProperty(String key) throws HornetQPropertyConversionException + public Byte getByteProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public Double getDoubleProperty(SimpleString key) throws HornetQPropertyConversionException + public Double getDoubleProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public Double getDoubleProperty(String key) throws HornetQPropertyConversionException + public Double getDoubleProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public Integer getIntProperty(SimpleString key) throws HornetQPropertyConversionException + public Integer getIntProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public Integer getIntProperty(String key) throws HornetQPropertyConversionException + public Integer getIntProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public Long getLongProperty(SimpleString key) throws HornetQPropertyConversionException + public Long getLongProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public Long getLongProperty(String key) throws HornetQPropertyConversionException + public Long getLongProperty(String key) throws ActiveMQPropertyConversionException { return null; } @@ -742,61 +742,61 @@ public class AcknowledgeTest extends ServiceTestBase } @Override - public Short getShortProperty(SimpleString key) throws HornetQPropertyConversionException + public Short getShortProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public Short getShortProperty(String key) throws HornetQPropertyConversionException + public Short getShortProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public Float getFloatProperty(SimpleString key) throws HornetQPropertyConversionException + public Float getFloatProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public Float getFloatProperty(String key) throws HornetQPropertyConversionException + public Float getFloatProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public String getStringProperty(SimpleString key) throws HornetQPropertyConversionException + public String getStringProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public String getStringProperty(String key) throws HornetQPropertyConversionException + public String getStringProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public SimpleString getSimpleStringProperty(SimpleString key) throws HornetQPropertyConversionException + public SimpleString getSimpleStringProperty(SimpleString key) throws ActiveMQPropertyConversionException { return null; } @Override - public SimpleString getSimpleStringProperty(String key) throws HornetQPropertyConversionException + public SimpleString getSimpleStringProperty(String key) throws ActiveMQPropertyConversionException { return null; } @Override - public byte[] getBytesProperty(SimpleString key) throws HornetQPropertyConversionException + public byte[] getBytesProperty(SimpleString key) throws ActiveMQPropertyConversionException { return new byte[0]; } @Override - public byte[] getBytesProperty(String key) throws HornetQPropertyConversionException + public byte[] getBytesProperty(String key) throws ActiveMQPropertyConversionException { return new byte[0]; } 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 001993eeef..fff8bd6b5b 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 @@ -14,7 +14,7 @@ package org.apache.activemq.tests.integration.client; import java.util.concurrent.CountDownLatch; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -219,7 +219,7 @@ public class AutogroupIdTest extends ServiceTestBase { message.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); } 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 01ca85bd62..f75edae68b 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 @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.client; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -192,13 +192,13 @@ public class CommitRollbackTest extends ServiceTestBase { message.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { try { session.close(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { e1.printStackTrace(); } @@ -276,13 +276,13 @@ public class CommitRollbackTest extends ServiceTestBase { message.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { try { session.close(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { e1.printStackTrace(); } 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 948b4bba92..49117cfaaa 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 @@ -15,8 +15,8 @@ package org.apache.activemq.tests.integration.client; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -71,25 +71,25 @@ public class ConsumerCloseTest extends ServiceTestBase Assert.assertTrue(consumer.isClosed()); - UnitTestCase.expectHornetQException(HornetQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { consumer.receive(); } }); - UnitTestCase.expectHornetQException(HornetQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { consumer.receiveImmediate(); } }); - UnitTestCase.expectHornetQException(HornetQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { consumer.setMessageHandler(new MessageHandler() { 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 135995482f..948bb2388c 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 @@ -19,8 +19,8 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; @@ -279,7 +279,7 @@ public class ConsumerTest extends ServiceTestBase final CountDownLatch latch = new CountDownLatch(numMessages); server.getRemotingService().addIncomingInterceptor(new Interceptor() { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_ACKNOWLEDGE) { @@ -302,7 +302,7 @@ public class ConsumerTest extends ServiceTestBase { message.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); } @@ -403,11 +403,11 @@ public class ConsumerTest extends ServiceTestBase consumer.receiveImmediate(); Assert.fail("Should throw exception"); } - catch (HornetQIllegalStateException ise) + catch (ActiveMQIllegalStateException ise) { //ok } - catch (HornetQException me) + catch (ActiveMQException me) { Assert.fail("Wrong exception code"); } 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 8528c11eff..865bd94aba 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 @@ -12,11 +12,11 @@ */ package org.apache.activemq.tests.integration.client; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.junit.Test; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -115,7 +115,7 @@ public class CoreClientTest extends ServiceTestBase { ClientMessage message2 = consumer.receive(); - HornetQBuffer buffer = message2.getBodyBuffer(); + ActiveMQBuffer buffer = message2.getBodyBuffer(); Assert.assertEquals("testINVMCoreClient", buffer.readString()); 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 f90d37802c..901df4f747 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 @@ -14,8 +14,8 @@ package org.apache.activemq.tests.integration.client; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQQueueExistsException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQQueueExistsException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; @@ -66,11 +66,11 @@ public class CreateQueueIdempotentTest extends ServiceTestBase session.createQueue(QUEUE, QUEUE, null, true); fail("Expected exception, queue already exists"); } - catch (HornetQQueueExistsException qee) + catch (ActiveMQQueueExistsException qee) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -150,7 +150,7 @@ public class CreateQueueIdempotentTest extends ServiceTestBase session.createQueue(QUEUE, QUEUE, null, true); queuesCreated.incrementAndGet(); } - catch (HornetQQueueExistsException qne) + catch (ActiveMQQueueExistsException qne) { failedAttempts.incrementAndGet(); } @@ -170,7 +170,7 @@ public class CreateQueueIdempotentTest extends ServiceTestBase { session.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); } 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 c8c0efe47d..a51f2f1bb4 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 @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.client; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Before; import org.junit.Test; @@ -22,7 +23,6 @@ import java.util.concurrent.TimeUnit; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -206,7 +206,7 @@ public class DeadLetterAddressTest extends ServiceTestBase { clientSession.rollback(true); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } 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 05169a5103..52a7203844 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 @@ -16,7 +16,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -178,7 +178,7 @@ public class DeliveryOrderTest extends ServiceTestBase { message.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); } 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 134ac2a79f..c804a5670f 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 @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.client; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.junit.Before; import org.junit.After; @@ -21,7 +22,6 @@ import javax.jms.ExceptionListener; import javax.jms.JMSException; import javax.jms.Session; -import org.apache.activemq.api.core.HornetQNotConnectedException; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.jms.HornetQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; @@ -162,7 +162,7 @@ public class FailureDeadlockTest extends ServiceTestBase @Override public void run() { - conn.fail(new HornetQNotConnectedException("blah")); + conn.fail(new ActiveMQNotConnectedException("blah")); } } @@ -179,7 +179,7 @@ public class FailureDeadlockTest extends ServiceTestBase Session sess1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); RemotingConnection rc1 = ((ClientSessionInternal)((HornetQSession)sess1).getCoreSession()).getConnection(); - rc1.fail(new HornetQNotConnectedException( "blah")); + rc1.fail(new ActiveMQNotConnectedException( "blah")); try { 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 52b811f68b..1efff8146f 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 @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.client; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.ServerConsumer; import org.junit.Before; @@ -29,7 +30,6 @@ import java.util.concurrent.TimeUnit; import javax.management.MBeanServer; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; @@ -441,7 +441,7 @@ public class HangConsumerTest extends ServiceTestBase Assert.assertTrue(hangInt.reusableLatch.await(10, TimeUnit.SECONDS)); - hangInt.pendingException = new HornetQException(); + hangInt.pendingException = new ActiveMQException(); hangInt.open(); @@ -676,7 +676,7 @@ public class HangConsumerTest extends ServiceTestBase ReusableLatch reusableLatch = new ReusableLatch(1); - volatile HornetQException pendingException = null; + volatile ActiveMQException pendingException = null; public void close() throws Exception { @@ -689,7 +689,7 @@ public class HangConsumerTest extends ServiceTestBase } @Override - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet instanceof SessionReceiveMessage) { @@ -709,7 +709,7 @@ public class HangConsumerTest extends ServiceTestBase if (pendingException != null) { - HornetQException exToThrow = pendingException; + ActiveMQException exToThrow = pendingException; pendingException = null; throw exToThrow; } 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/HornetQCrashTest.java index beb8746e68..3738ede7fd 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/HornetQCrashTest.java @@ -11,13 +11,13 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.client; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Before; import org.junit.Test; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.TransportConfiguration; @@ -109,7 +109,7 @@ public class HornetQCrashTest extends UnitTestCase this.server = server; } - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { HornetQCrashTest.log.info("AckInterceptor.intercept " + packet); 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 d078813eaf..c8ea15746b 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 @@ -16,8 +16,8 @@ import java.io.FileOutputStream; import java.io.InputStream; import java.util.Properties; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQIncompatibleClientServerException; +import org.apache.activemq.api.core.ActiveMQException; +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; @@ -178,11 +178,11 @@ public class IncompatibleVersionTest extends ServiceTestBase channel1.sendBlocking(request, PacketImpl.CREATESESSION_RESP); fail(); } - catch (HornetQIncompatibleClientServerException icsv) + catch (ActiveMQIncompatibleClientServerException icsv) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } 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 61d6dd9287..4ae348a671 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 @@ -22,7 +22,7 @@ import java.util.concurrent.Executor; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; @@ -192,7 +192,7 @@ public class InterruptedLargeMessageTest extends LargeMessageTestBase msg.checkCompletion(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); expectedErrors.incrementAndGet(); @@ -754,7 +754,7 @@ public class InterruptedLargeMessageTest extends LargeMessageTestBase private static CountDownLatch latch = new CountDownLatch(1); @Override - public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException + public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { if (packet instanceof SessionContinuationMessage) { 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 8e2737a57f..5ef31a0f5e 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 @@ -22,7 +22,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; @@ -343,7 +343,7 @@ public class LargeMessageTest extends LargeMessageTestBase { message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); 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 6baf4614a0..844543a4bc 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 @@ -12,9 +12,9 @@ */ package org.apache.activemq.tests.integration.client; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQNonExistentQueueException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; +import org.apache.activemq.api.core.ActiveMQNonExistentQueueException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientProducer; @@ -75,11 +75,11 @@ public class MessageDurabilityTest extends ServiceTestBase { session.createConsumer(queue); } - catch (HornetQNonExistentQueueException neqe) + catch (ActiveMQNonExistentQueueException neqe) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -151,9 +151,9 @@ public class MessageDurabilityTest extends ServiceTestBase session.start(); - UnitTestCase.expectHornetQException(HornetQExceptionType.QUEUE_DOES_NOT_EXIST, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { session.createConsumer(queue); } @@ -179,9 +179,9 @@ public class MessageDurabilityTest extends ServiceTestBase restart(); session.start(); - UnitTestCase.expectHornetQException(HornetQExceptionType.QUEUE_DOES_NOT_EXIST, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { session.createConsumer(queue); } 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 b44539ba05..99c4daec65 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 @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.client; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Before; import org.junit.Test; @@ -21,7 +22,6 @@ import java.util.concurrent.TimeUnit; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -165,7 +165,7 @@ public class MessageGroupingConnectionFactoryTest extends UnitTestCase { message.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { // ignore } 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 7a436376c6..07f22a2d0e 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 @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.client; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Assume; import org.junit.Before; @@ -25,7 +26,6 @@ import javax.transaction.xa.Xid; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -651,7 +651,7 @@ public class MessageGroupingTest extends UnitTestCase { message.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { // ignore } 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 3faec6c962..9864ae80e5 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 @@ -12,12 +12,12 @@ */ package org.apache.activemq.tests.integration.client; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Test; import java.util.HashMap; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -107,9 +107,9 @@ public class MultipleThreadFilterOneTest extends ServiceTestBase } /** - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - private void sendMessages(int msgs) throws HornetQException + private void sendMessages(int msgs) throws ActiveMQException { ClientProducer producer = prodSession.createProducer(ADDRESS); 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 d9604e29a2..927a61a9e0 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 @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.client; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Before; import org.junit.After; @@ -18,7 +19,6 @@ import org.junit.Test; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -101,7 +101,7 @@ public class NewDeadLetterAddressTest extends UnitTestCase { clientSession.close(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { // } 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 009b55f930..2d0c0d6cdc 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 @@ -23,7 +23,7 @@ import java.nio.ByteBuffer; import java.util.HashMap; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -134,7 +134,7 @@ public class PagingOrderTest extends ServiceTestBase { ClientMessage message = session.createMessage(persistentMessages); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -283,7 +283,7 @@ public class PagingOrderTest extends ServiceTestBase { ClientMessage message = session.createMessage(persistentMessages); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -432,7 +432,7 @@ public class PagingOrderTest extends ServiceTestBase { ClientMessage message = session.createMessage(persistentMessages); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -511,7 +511,7 @@ public class PagingOrderTest extends ServiceTestBase { ClientMessage message = session.createMessage(persistentMessages); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -611,7 +611,7 @@ public class PagingOrderTest extends ServiceTestBase { ClientMessage message = session.createMessage(persistentMessages); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); 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 2e9f0c4957..75d6c877a5 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 @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.client; import java.nio.ByteBuffer; import java.util.HashMap; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; @@ -96,7 +96,7 @@ public class PagingSyncTest extends ServiceTestBase { ClientMessage message = session.createMessage(persistentMessages); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); 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 5f1a745012..90d55ecc41 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 @@ -29,9 +29,9 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; @@ -155,7 +155,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -183,7 +183,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -296,7 +296,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -422,7 +422,7 @@ public class PagingTest extends ServiceTestBase message.putIntProperty("count", i); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -512,7 +512,7 @@ public class PagingTest extends ServiceTestBase message.putIntProperty("count", i); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -659,7 +659,7 @@ public class PagingTest extends ServiceTestBase message.putIntProperty("tst-count", i); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -785,7 +785,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -961,7 +961,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -1169,7 +1169,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -1251,7 +1251,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -1382,7 +1382,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -1490,7 +1490,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -1606,7 +1606,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -1793,7 +1793,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -1939,7 +1939,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(persistentMessages); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -2136,7 +2136,7 @@ public class PagingTest extends ServiceTestBase } message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -2363,7 +2363,7 @@ public class PagingTest extends ServiceTestBase } message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -2527,7 +2527,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(persistentMessages); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -2596,7 +2596,7 @@ public class PagingTest extends ServiceTestBase session.close(); } - private void assertBodiesEqual(final byte[] body, final HornetQBuffer buffer) + private void assertBodiesEqual(final byte[] body, final ActiveMQBuffer buffer) { byte[] other = new byte[body.length]; @@ -3367,7 +3367,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); for (int j = 1; j <= numberOfIntegers; j++) { @@ -3426,7 +3426,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); for (int j = 1; j <= numberOfIntegers; j++) { @@ -3512,7 +3512,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(true); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(new byte[1024]); @@ -4275,7 +4275,7 @@ public class PagingTest extends ServiceTestBase { sessionConsumer.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); errors.incrementAndGet(); @@ -4295,7 +4295,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(persistentMessages); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -4379,7 +4379,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(persistentMessages); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -4481,7 +4481,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(persistentMessages); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -4602,7 +4602,7 @@ public class PagingTest extends ServiceTestBase ClientMessage message = session.createMessage(persistentMessages); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(new byte[1024]); @@ -4699,7 +4699,7 @@ public class PagingTest extends ServiceTestBase { message = session.createMessage(persistentMessages); - HornetQBuffer bodyLocal = message.getBodyBuffer(); + ActiveMQBuffer bodyLocal = message.getBodyBuffer(); bodyLocal.writeBytes(body); @@ -5451,20 +5451,20 @@ public class PagingTest extends ServiceTestBase */ private void validateExceptionOnSending(ClientProducer producer, ClientMessage message) { - HornetQException expected = null; + ActiveMQException expected = null; try { // after the address is full this send should fail (since the address full policy is FAIL) producer.send(message); } - catch (HornetQException e) + catch (ActiveMQException e) { expected = e; } assertNotNull(expected); - assertEquals(HornetQExceptionType.ADDRESS_FULL, expected.getType()); + assertEquals(ActiveMQExceptionType.ADDRESS_FULL, expected.getType()); } 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 a63ba53997..d4074f0362 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 @@ -11,14 +11,14 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.client; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.junit.Before; import org.junit.Test; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; @@ -54,9 +54,9 @@ public class ProducerCloseTest extends ServiceTestBase Assert.assertTrue(producer.isClosed()); - UnitTestCase.expectHornetQException(HornetQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { producer.send(session.createMessage(false)); } 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 131b6e4a88..ff6d15b7fc 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 @@ -19,7 +19,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; -import org.apache.activemq.api.core.HornetQObjectClosedException; +import org.apache.activemq.api.core.ActiveMQObjectClosedException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -428,7 +428,7 @@ public class ProducerFlowControlTest extends ServiceTestBase producer.send(message); } } - catch (HornetQObjectClosedException expected) + catch (ActiveMQObjectClosedException expected) { } 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 20906f48ac..2976127647 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 @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.client; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; +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.api.core.client.ClientConsumer; @@ -61,7 +61,7 @@ public class ProducerTest extends ServiceTestBase final CountDownLatch latch = new CountDownLatch(1); server.getRemotingService().addIncomingInterceptor(new Interceptor() { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { 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 e8fc3bab50..60716eb50e 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 @@ -12,9 +12,9 @@ */ package org.apache.activemq.tests.integration.client; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQIllegalStateException; -import org.apache.activemq.api.core.HornetQObjectClosedException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQObjectClosedException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -99,11 +99,11 @@ public class ReceiveTest extends ServiceTestBase cc.receive(); Assert.fail("should throw exception"); } - catch (HornetQObjectClosedException oce) + catch (ActiveMQObjectClosedException oce) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -130,11 +130,11 @@ public class ReceiveTest extends ServiceTestBase cc.receive(); Assert.fail("should throw exception"); } - catch (HornetQIllegalStateException ise) + catch (ActiveMQIllegalStateException ise) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } 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 c17095b46b..537b70418a 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 @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.client; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -368,7 +368,7 @@ public class RedeliveryConsumerTest extends ServiceTestBase { session.createQueue(ADDRESS, ADDRESS, true); } - catch (HornetQException expected) + catch (ActiveMQException expected) { // in case of restart } 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 17847c7c8c..75dcda4926 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 @@ -12,8 +12,8 @@ */ package org.apache.activemq.tests.integration.client; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -216,7 +216,7 @@ public class RequestorTest extends ServiceTestBase }; UnitTestCase.expectHornetQException("ClientRequestor's session must not be closed", - HornetQExceptionType.OBJECT_CLOSED, + ActiveMQExceptionType.OBJECT_CLOSED, hornetQAction); } @@ -260,7 +260,7 @@ public class RequestorTest extends ServiceTestBase }; UnitTestCase.expectHornetQException("can not send a request on a closed ClientRequestor", - HornetQExceptionType.OBJECT_CLOSED, hornetQAction); + ActiveMQExceptionType.OBJECT_CLOSED, hornetQAction); } @Override @@ -316,7 +316,7 @@ public class RequestorTest extends ServiceTestBase replyProducer.send(reply); request.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); } 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 8b4e10caa2..0ee579d0a9 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.tests.integration.client; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -85,7 +85,7 @@ public class SelfExpandingBufferTest extends ServiceTestBase ClientMessage msg = session.createMessage(true); - HornetQBuffer buffer = msg.getBodyBuffer(); + ActiveMQBuffer buffer = msg.getBodyBuffer(); SelfExpandingBufferTest.log.info("buffer is " + buffer); 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 4e0bdbb293..b6e0951daa 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 @@ -15,8 +15,8 @@ package org.apache.activemq.tests.integration.client; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQNotConnectedException; +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.ServerLocator; @@ -115,14 +115,14 @@ public class ServerLocatorConnectTest extends ServiceTestBase { csf = locator.connect(); } - catch (HornetQNotConnectedException nce) + catch (ActiveMQNotConnectedException nce) { //ok } catch (Exception e) { - assertTrue(e instanceof HornetQException); - fail("Invalid Exception type:" + ((HornetQException) e).getType()); + assertTrue(e instanceof ActiveMQException); + fail("Invalid Exception type:" + ((ActiveMQException) e).getType()); } assertNull(csf); locator.close(); 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 4f93bc4d32..ea8d4cd256 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 @@ -11,6 +11,8 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.client; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.junit.Before; import org.junit.After; @@ -21,8 +23,6 @@ import javax.transaction.xa.XAResource; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -72,25 +72,25 @@ public class SessionCloseTest extends UnitTestCase Assert.assertTrue(session.isClosed()); - UnitTestCase.expectHornetQException(HornetQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { session.createProducer(); } }); - UnitTestCase.expectHornetQException(HornetQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { session.createConsumer(RandomUtil.randomSimpleString()); } }); - UnitTestCase.expectHornetQException(HornetQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { session.createQueue(RandomUtil.randomSimpleString(), RandomUtil.randomSimpleString(), @@ -98,57 +98,57 @@ public class SessionCloseTest extends UnitTestCase } }); - UnitTestCase.expectHornetQException(HornetQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { session.createTemporaryQueue(RandomUtil.randomSimpleString(), RandomUtil.randomSimpleString()); } }); - UnitTestCase.expectHornetQException(HornetQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { session.start(); } }); - UnitTestCase.expectHornetQException(HornetQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { session.stop(); } }); - UnitTestCase.expectHornetQException(HornetQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { session.commit(); } }); - UnitTestCase.expectHornetQException(HornetQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { session.rollback(); } }); - UnitTestCase.expectHornetQException(HornetQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { session.queueQuery(RandomUtil.randomSimpleString()); } }); - UnitTestCase.expectHornetQException(HornetQExceptionType.OBJECT_CLOSED, new HornetQAction() + UnitTestCase.expectHornetQException(ActiveMQExceptionType.OBJECT_CLOSED, new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { session.addressQuery(RandomUtil.randomSimpleString()); } 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 abcc827906..49d4c58ebf 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 @@ -12,9 +12,9 @@ */ package org.apache.activemq.tests.integration.client; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQNotConnectedException; -import org.apache.activemq.api.core.HornetQObjectClosedException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; +import org.apache.activemq.api.core.ActiveMQObjectClosedException; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientProducer; @@ -62,7 +62,7 @@ public class SessionClosedOnRemotingConnectionFailureTest extends ServiceTestBas RemotingConnection connection = ((ClientSessionInternal) session).getConnection(); - connection.fail(new HornetQNotConnectedException()); + connection.fail(new ActiveMQNotConnectedException()); Assert.assertTrue(session.isClosed()); @@ -78,11 +78,11 @@ public class SessionClosedOnRemotingConnectionFailureTest extends ServiceTestBas Assert.fail("Should throw exception"); } - catch (HornetQObjectClosedException oce) + catch (ActiveMQObjectClosedException oce) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -93,11 +93,11 @@ public class SessionClosedOnRemotingConnectionFailureTest extends ServiceTestBas Assert.fail("Should throw exception"); } - catch (HornetQObjectClosedException oce) + catch (ActiveMQObjectClosedException oce) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } 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 f25d134642..4387f548c5 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 @@ -12,8 +12,8 @@ */ package org.apache.activemq.tests.integration.client; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQNonExistentQueueException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQNonExistentQueueException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ServerLocator; @@ -139,11 +139,11 @@ public class SessionCreateAndDeleteQueueTest extends ServiceTestBase session.deleteQueue(queueName); Assert.fail("should throw exception"); } - catch (HornetQNonExistentQueueException neqe) + catch (ActiveMQNonExistentQueueException neqe) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } 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 d46f69b32b..76773f6ce1 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 @@ -12,9 +12,9 @@ */ package org.apache.activemq.tests.integration.client; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQInvalidFilterExpressionException; -import org.apache.activemq.api.core.HornetQNonExistentQueueException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQInvalidFilterExpressionException; +import org.apache.activemq.api.core.ActiveMQNonExistentQueueException; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; @@ -69,11 +69,11 @@ public class SessionCreateConsumerTest extends ServiceTestBase clientSession.createConsumer(queueName); Assert.fail("should throw exception"); } - catch (HornetQNonExistentQueueException neqe) + catch (ActiveMQNonExistentQueueException neqe) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -96,11 +96,11 @@ public class SessionCreateConsumerTest extends ServiceTestBase clientSession.createConsumer(queueName, "this is not valid filter"); Assert.fail("should throw exception"); } - catch (HornetQInvalidFilterExpressionException ifee) + catch (ActiveMQInvalidFilterExpressionException ifee) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } 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 6b7956d613..1d0d7ecbee 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 @@ -12,8 +12,8 @@ */ package org.apache.activemq.tests.integration.client; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQObjectClosedException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQObjectClosedException; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; @@ -79,11 +79,11 @@ public class SessionCreateProducerTest extends ServiceTestBase clientSession.createProducer(); Assert.fail("should throw exception"); } - catch (HornetQObjectClosedException oce) + catch (ActiveMQObjectClosedException oce) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } 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 285f13a832..0a68b28c70 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 @@ -15,8 +15,8 @@ package org.apache.activemq.tests.integration.client; import java.util.List; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQInternalErrorException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQInternalErrorException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -88,18 +88,18 @@ public class SessionTest extends ServiceTestBase boolean called = false; @Override - public void connectionFailed(final HornetQException me, boolean failedOver) + public void connectionFailed(final ActiveMQException me, boolean failedOver) { called = true; } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } - public void beforeReconnect(final HornetQException me) + public void beforeReconnect(final ActiveMQException me) { } } @@ -142,7 +142,7 @@ public class SessionTest extends ServiceTestBase RemotingConnection rc = clientSession.getConnection(); - rc.fail(new HornetQInternalErrorException()); + rc.fail(new ActiveMQInternalErrorException()); clientSession.close(); 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 d7499a9d35..bfcdad112d 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 @@ -19,9 +19,9 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; import org.apache.activemq.api.config.HornetQDefaultConfiguration; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQObjectClosedException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; +import org.apache.activemq.api.core.ActiveMQObjectClosedException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -120,9 +120,9 @@ public class SlowConsumerTest extends ServiceTestBase consumer.receiveImmediate(); fail(); } - catch (HornetQObjectClosedException e) + catch (ActiveMQObjectClosedException e) { - assertEquals(e.getType(), HornetQExceptionType.OBJECT_CLOSED); + assertEquals(e.getType(), ActiveMQExceptionType.OBJECT_CLOSED); } } @@ -184,7 +184,7 @@ public class SlowConsumerTest extends ServiceTestBase { message.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); } @@ -260,7 +260,7 @@ public class SlowConsumerTest extends ServiceTestBase producer.send(m); messagesProduced.incrementAndGet(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); return; @@ -353,9 +353,9 @@ public class SlowConsumerTest extends ServiceTestBase consumer.receiveImmediate(); fail(); } - catch (HornetQObjectClosedException e) + catch (ActiveMQObjectClosedException e) { - assertEquals(e.getType(), HornetQExceptionType.OBJECT_CLOSED); + assertEquals(e.getType(), ActiveMQExceptionType.OBJECT_CLOSED); } } } 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 ad5239460c..dd344eeba2 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 @@ -17,12 +17,12 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQDisconnectedException; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQIOErrorException; -import org.apache.activemq.api.core.HornetQInternalErrorException; -import org.apache.activemq.api.core.HornetQNonExistentQueueException; +import org.apache.activemq.api.core.ActiveMQDisconnectedException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; +import org.apache.activemq.api.core.ActiveMQIOErrorException; +import org.apache.activemq.api.core.ActiveMQInternalErrorException; +import org.apache.activemq.api.core.ActiveMQNonExistentQueueException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; @@ -219,11 +219,11 @@ public class TemporaryQueueTest extends SingleServerTestBase session.createConsumer(queue); Assert.fail("temp queue must not exist after the remoting connection is closed"); } - catch (HornetQNonExistentQueueException neqe) + catch (ActiveMQNonExistentQueueException neqe) { //ol } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -367,7 +367,7 @@ public class TemporaryQueueTest extends SingleServerTestBase RemotingConnectionImpl conn = (RemotingConnectionImpl) ((ClientSessionInternal) session).getConnection(); - conn.fail(new HornetQIOErrorException()); + conn.fail(new ActiveMQIOErrorException()); prod.send(session.createMessage(false)); session.commit(); @@ -513,7 +513,7 @@ public class TemporaryQueueTest extends SingleServerTestBase server.getRemotingService().addIncomingInterceptor(new Interceptor() { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.PING) { @@ -544,7 +544,7 @@ public class TemporaryQueueTest extends SingleServerTestBase } }); - ((ClientSessionInternal) session).getConnection().fail(new HornetQInternalErrorException("simulate a client failure")); + ((ClientSessionInternal) session).getConnection().fail(new ActiveMQInternalErrorException("simulate a client failure")); // let some time for the server to clean the connections Assert.assertTrue("server has not closed the connection", @@ -571,14 +571,14 @@ public class TemporaryQueueTest extends SingleServerTestBase HornetQAction hornetQAction = new HornetQAction() { - public void run() throws HornetQException + public void run() throws ActiveMQException { session.createConsumer(queue); } }; UnitTestCase.expectHornetQException("temp queue must not exist after the server detected the client crash", - HornetQExceptionType.QUEUE_DOES_NOT_EXIST, hornetQAction); + ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST, hornetQAction); session.close(); @@ -663,7 +663,7 @@ public class TemporaryQueueTest extends SingleServerTestBase { System.out.println("Failing session"); ServerSessionImpl impl = (ServerSessionImpl) sessionIterator; - impl.getRemotingConnection().fail(new HornetQDisconnectedException("failure e")); + impl.getRemotingConnection().fail(new ActiveMQDisconnectedException("failure e")); } } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TransientQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TransientQueueTest.java index 99dda29000..852496b8c2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TransientQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/TransientQueueTest.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.tests.integration.client; -import org.apache.activemq.api.core.HornetQInvalidTransientQueueUseException; +import org.apache.activemq.api.core.ActiveMQInvalidTransientQueueUseException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -169,7 +169,7 @@ public class TransientQueueTest extends SingleServerTestBase // There's already a queue with that name, we are supposed to throw an exception session2.createSharedQueue(address2, queue, false); } - catch (HornetQInvalidTransientQueueUseException e) + catch (ActiveMQInvalidTransientQueueUseException e) { exHappened = true; } @@ -184,7 +184,7 @@ public class TransientQueueTest extends SingleServerTestBase // There's already a queue with that name, we are supposed to throw an exception session2.createSharedQueue(address, queue, SimpleString.toSimpleString("a=1"), false); } - catch (HornetQInvalidTransientQueueUseException e) + catch (ActiveMQInvalidTransientQueueUseException e) { exHappened = true; } @@ -206,7 +206,7 @@ public class TransientQueueTest extends SingleServerTestBase // There's already a queue with that name, we are supposed to throw an exception session2.createSharedQueue(address, queue, SimpleString.toSimpleString("q=2"), false); } - catch (HornetQInvalidTransientQueueUseException e) + catch (ActiveMQInvalidTransientQueueUseException e) { exHappened = true; } @@ -220,7 +220,7 @@ public class TransientQueueTest extends SingleServerTestBase // There's already a queue with that name, we are supposed to throw an exception session2.createSharedQueue(address, queue, false); } - catch (HornetQInvalidTransientQueueUseException e) + catch (ActiveMQInvalidTransientQueueUseException e) { exHappened = true; } 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 750be82817..85fcbec365 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 @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.client; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Before; import org.junit.After; @@ -18,7 +19,6 @@ import org.junit.Test; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -811,7 +811,7 @@ public class WildCardRoutingTest extends UnitTestCase { clientSession.close(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { // } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/DummyInterceptor.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/DummyInterceptor.java index c4e07cad8c..595f246cfe 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/DummyInterceptor.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/DummyInterceptor.java @@ -14,9 +14,9 @@ package org.apache.activemq.tests.integration.clientcrash; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQInternalErrorException; import org.apache.activemq.api.core.Interceptor; -import org.apache.activemq.api.core.HornetQInternalErrorException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionReceiveMessage; @@ -46,13 +46,13 @@ public class DummyInterceptor implements Interceptor syncCounter.set(0); } - public boolean intercept(final Packet packet, final RemotingConnection conn) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection conn) throws ActiveMQException { log.debug("DummyFilter packet = " + packet.getClass().getName()); syncCounter.addAndGet(1); if (sendException) { - throw new HornetQInternalErrorException(); + throw new ActiveMQInternalErrorException(); } if (changeMessage) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/DummyInterceptorB.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/DummyInterceptorB.java index 45d722b81b..9f59a4ab99 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/DummyInterceptorB.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/clientcrash/DummyInterceptorB.java @@ -14,7 +14,7 @@ package org.apache.activemq.tests.integration.clientcrash; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.spi.core.protocol.RemotingConnection; @@ -42,7 +42,7 @@ public class DummyInterceptorB implements Interceptor DummyInterceptorB.syncCounter.set(0); } - public boolean intercept(final Packet packet, final RemotingConnection conn) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection conn) throws ActiveMQException { DummyInterceptorB.syncCounter.addAndGet(1); log.debug("DummyFilter packet = " + packet); 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 b11567c7f5..1b0434fedd 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 @@ -12,7 +12,7 @@ */ package org.apache.activemq.tests.integration.cluster; -import org.apache.activemq.api.core.HornetQClusterSecurityException; +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.core.client.impl.ClientSessionFactoryInternal; @@ -90,7 +90,7 @@ public class ClusterControllerTest extends ClusterTestBase } catch (Exception e) { - assertTrue("should throw HornetQClusterSecurityException", e instanceof HornetQClusterSecurityException); + assertTrue("should throw HornetQClusterSecurityException", e instanceof ActiveMQClusterSecurityException); } } } 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 f3fcc1190d..70ea277058 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 @@ -17,9 +17,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQNotConnectedException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -420,10 +420,10 @@ public class BridgeReconnectTest extends BridgeTestBase RemotingConnection forwardingConnection = getForwardingConnection(bridge); InVMConnector.failOnCreateConnection = true; InVMConnector.numberOfFailures = reconnectAttempts - 1; - forwardingConnection.fail(new HornetQNotConnectedException()); + forwardingConnection.fail(new ActiveMQNotConnectedException()); forwardingConnection = getForwardingConnection(bridge); - forwardingConnection.fail(new HornetQNotConnectedException()); + forwardingConnection.fail(new ActiveMQNotConnectedException()); final ManagementService managementService = server0.getManagementService(); QueueControl coreQueueControl = (QueueControl) managementService.getResource(ResourceNames.CORE_QUEUE + queueName); @@ -642,7 +642,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; @@ -680,7 +680,7 @@ public class BridgeReconnectTest extends BridgeTestBase forwardingConnection = ((BridgeImpl) bridge).getForwardingConnection(); InVMConnector.failOnCreateConnection = true; InVMConnector.numberOfFailures = reconnectAttempts - 1; - forwardingConnection.fail(new HornetQException(HornetQExceptionType.UNBLOCKED)); + forwardingConnection.fail(new ActiveMQException(ActiveMQExceptionType.UNBLOCKED)); for (int i = 0; i < numMessages; i++) { @@ -776,7 +776,7 @@ public class BridgeReconnectTest extends BridgeTestBase if (i == 50) { - forwardingConnection.fail(new HornetQException(HornetQExceptionType.UNBLOCKED)); + forwardingConnection.fail(new ActiveMQException(ActiveMQExceptionType.UNBLOCKED)); } } 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 d491493545..88e82dc4fa 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 @@ -23,8 +23,8 @@ import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +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.api.core.TransportConfiguration; @@ -300,7 +300,7 @@ public class BridgeTest extends ServiceTestBase latch = new CountDownLatch(numberOfIgnores); } - public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException + public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { if (ignoreSends && packet instanceof SessionSendMessage || ignoreSends && packet instanceof SessionSendLargeMessage || @@ -1553,7 +1553,7 @@ public class BridgeTest extends ServiceTestBase static int count = 0; @Override - public synchronized boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException + public synchronized boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { if (packet instanceof SessionSendMessage && count == 1000) @@ -1705,7 +1705,7 @@ public class BridgeTest extends ServiceTestBase Assert.assertEquals(i, message.getObjectProperty(propKey)); - HornetQBuffer buff = message.getBodyBuffer(); + ActiveMQBuffer buff = message.getBodyBuffer(); for (int posMsg = 0; posMsg < LARGE_MESSAGE_SIZE; posMsg++) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/SimpleTransformer.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/SimpleTransformer.java index d8ea441067..efb63fe4f5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/SimpleTransformer.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/SimpleTransformer.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.tests.integration.cluster.bridge; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.server.cluster.Transformer; @@ -41,7 +41,7 @@ public class SimpleTransformer implements Transformer message.putStringProperty(new SimpleString("wibble"), new SimpleString("bong")); // Change the body - HornetQBuffer buffer = message.getBodyBuffer(); + ActiveMQBuffer buffer = message.getBodyBuffer(); buffer.readerIndex(0); 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 a33582d09a..cb2f24346f 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 @@ -28,9 +28,9 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import org.apache.activemq.api.config.HornetQDefaultConfiguration; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.BroadcastGroupConfiguration; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -242,7 +242,7 @@ public abstract class ClusterTestBase extends ServiceTestBase { consumer.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { // ignore } @@ -253,7 +253,7 @@ public abstract class ClusterTestBase extends ServiceTestBase { session.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { // ignore } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusteredGroupingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusteredGroupingTest.java index 92fec81b1c..96f1a7943e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusteredGroupingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusteredGroupingTest.java @@ -21,7 +21,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; @@ -654,7 +654,7 @@ public class ClusteredGroupingTest extends ClusterTestBase totalMessageProduced.incrementAndGet(); messageCount++; } - catch (HornetQException e) + catch (ActiveMQException e) { IntegrationTestLogger.LOGGER.warn("Producer thread threw exception while sending messages to " + targetServer + ": " + e.getMessage()); // in case of a failure we change the group to make possible errors more likely @@ -777,7 +777,7 @@ public class ClusteredGroupingTest extends ClusterTestBase m.acknowledge(); IntegrationTestLogger.LOGGER.trace("Consumed message " + m.getStringProperty(Message.HDR_DUPLICATE_DETECTION_ID) + " from server " + targetServer + ". Total consumed: " + totalMessagesConsumed.incrementAndGet()); } - catch (HornetQException e) + catch (ActiveMQException e) { errors.incrementAndGet(); IntegrationTestLogger.LOGGER.warn("Consumer thread threw exception while receiving messages from server " + targetServer + ".: " + e.getMessage()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/AsynchronousFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/AsynchronousFailoverTest.java index b214c4e1a4..17a2c55663 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/AsynchronousFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/AsynchronousFailoverTest.java @@ -15,11 +15,11 @@ package org.apache.activemq.tests.integration.cluster.failover; import java.util.ArrayList; import java.util.List; -import org.apache.activemq.api.core.HornetQDuplicateIdException; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQTransactionOutcomeUnknownException; -import org.apache.activemq.api.core.HornetQTransactionRolledBackException; -import org.apache.activemq.api.core.HornetQUnBlockedException; +import org.apache.activemq.api.core.ActiveMQDuplicateIdException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQTransactionOutcomeUnknownException; +import org.apache.activemq.api.core.ActiveMQTransactionRolledBackException; +import org.apache.activemq.api.core.ActiveMQUnBlockedException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -286,7 +286,7 @@ public class AsynchronousFailoverTest extends FailoverTestBase retry = false; } - catch (HornetQUnBlockedException ube) + catch (ActiveMQUnBlockedException ube) { AsynchronousFailoverTest.log.info("exception when sending message with counter " + i); @@ -295,7 +295,7 @@ public class AsynchronousFailoverTest extends FailoverTestBase retry = true; } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -314,14 +314,14 @@ public class AsynchronousFailoverTest extends FailoverTestBase retry = false; } - catch (HornetQUnBlockedException ube) + catch (ActiveMQUnBlockedException ube) { AsynchronousFailoverTest.log.info("exception when creating consumer"); retry = true; } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -432,30 +432,30 @@ public class AsynchronousFailoverTest extends FailoverTestBase retry = false; } - catch (HornetQDuplicateIdException die) + catch (ActiveMQDuplicateIdException die) { logAndSystemOut("#test duplicate id rejected on sending"); break; } - catch (HornetQTransactionRolledBackException trbe) + catch (ActiveMQTransactionRolledBackException trbe) { log.info("#test transaction rollback retrying on sending"); // OK retry = true; } - catch (HornetQUnBlockedException ube) + catch (ActiveMQUnBlockedException ube) { log.info("#test transaction rollback retrying on sending"); // OK retry = true; } - catch (HornetQTransactionOutcomeUnknownException toue) + catch (ActiveMQTransactionOutcomeUnknownException toue) { log.info("#test transaction rollback retrying on sending"); // OK retry = true; } - catch (HornetQException e) + catch (ActiveMQException e) { log.info("#test Exception " + e, e); throw e; @@ -515,13 +515,13 @@ public class AsynchronousFailoverTest extends FailoverTestBase { session.commit(); } - catch (HornetQTransactionRolledBackException trbe) + catch (ActiveMQTransactionRolledBackException trbe) { //we know the tx has been rolled back so we just consume again retry = true; continue; } - catch (HornetQException e) + catch (ActiveMQException e) { // This could eventually happen // We will get rid of this when we implement 2 phase commit on failover @@ -561,7 +561,7 @@ public class AsynchronousFailoverTest extends FailoverTestBase retry = false; blocked = false; } - catch (HornetQTransactionRolledBackException trbe) + catch (ActiveMQTransactionRolledBackException trbe) { logAndSystemOut("Transaction rolled back with " + msgs.size(), trbe); // TODO: https://jira.jboss.org/jira/browse/HORNETQ-369 @@ -570,7 +570,7 @@ public class AsynchronousFailoverTest extends FailoverTestBase blocked = true; retry = true; } - catch (HornetQTransactionOutcomeUnknownException tou) + catch (ActiveMQTransactionOutcomeUnknownException tou) { logAndSystemOut("Transaction rolled back with " + msgs.size(), tou); // TODO: https://jira.jboss.org/jira/browse/HORNETQ-369 @@ -579,7 +579,7 @@ public class AsynchronousFailoverTest extends FailoverTestBase blocked = true; retry = true; } - catch (HornetQUnBlockedException ube) + catch (ActiveMQUnBlockedException ube) { logAndSystemOut("Unblocked with " + msgs.size(), ube); // TODO: https://jira.jboss.org/jira/browse/HORNETQ-369 @@ -587,7 +587,7 @@ public class AsynchronousFailoverTest extends FailoverTestBase blocked = true; retry = true; } - catch (HornetQException e) + catch (ActiveMQException e) { logAndSystemOut(e.getMessage(), e); throw e; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupAuthenticationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupAuthenticationTest.java index ffa8cd9478..4cf92abf09 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupAuthenticationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupAuthenticationTest.java @@ -14,6 +14,7 @@ * */ package org.apache.activemq.tests.integration.cluster.failover; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Before; import org.junit.Test; @@ -22,7 +23,6 @@ import java.util.Arrays; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.protocol.core.Packet; @@ -85,7 +85,7 @@ public class BackupAuthenticationTest extends FailoverTestBase { @Override - public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException + public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.BACKUP_REGISTRATION) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupSyncJournalTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupSyncJournalTest.java index 2904c9af56..a899db7f9e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupSyncJournalTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupSyncJournalTest.java @@ -20,7 +20,7 @@ import java.util.HashSet; import java.util.Set; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; +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; @@ -194,7 +194,7 @@ public class BackupSyncJournalTest extends FailoverTestBase assertNoMoreMessages(); } - protected void assertNoMoreMessages() throws HornetQException + protected void assertNoMoreMessages() throws ActiveMQException { session.start(); ClientConsumer consumer = session.createConsumer(FailoverTestBase.ADDRESS); @@ -370,7 +370,7 @@ public class BackupSyncJournalTest extends FailoverTestBase backupServer.getServer().waitForActivation(5, TimeUnit.SECONDS); } - protected void createProducerSendSomeMessages() throws HornetQException + protected void createProducerSendSomeMessages() throws ActiveMQException { session = addClientSession(sessionFactory.createSession(true, true)); session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true); @@ -381,7 +381,7 @@ public class BackupSyncJournalTest extends FailoverTestBase session.commit(); } - protected void receiveMsgsInRange(int start, int end) throws HornetQException + protected void receiveMsgsInRange(int start, int end) throws ActiveMQException { session.start(); ClientConsumer consumer = addClientConsumer(session.createConsumer(FailoverTestBase.ADDRESS)); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupSyncLargeMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupSyncLargeMessageTest.java index 903ec51c52..21efc7508f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupSyncLargeMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/BackupSyncLargeMessageTest.java @@ -12,6 +12,8 @@ */ package org.apache.activemq.tests.integration.cluster.failover; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Test; import java.io.File; @@ -24,8 +26,6 @@ import java.util.concurrent.atomic.AtomicBoolean; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; @@ -144,7 +144,7 @@ public class BackupSyncLargeMessageTest extends BackupSyncJournalTest sendMessages(session, producer, 20); session.commit(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); caughtException.set(true); @@ -165,7 +165,7 @@ public class BackupSyncLargeMessageTest extends BackupSyncJournalTest session.start(); ClientConsumer consumer = session.createConsumer(FailoverTestBase.ADDRESS); ClientMessage msg = consumer.receive(2000); - HornetQBuffer buffer = msg.getBodyBuffer(); + ActiveMQBuffer buffer = msg.getBodyBuffer(); for (int j = 0; j < largeMessageSize; j++) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/DelayInterceptor.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/DelayInterceptor.java index 3feb721f91..6f8f62123c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/DelayInterceptor.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/DelayInterceptor.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.tests.integration.cluster.failover; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -27,7 +27,7 @@ import org.apache.activemq.spi.core.protocol.RemotingConnection; */ public class DelayInterceptor implements Interceptor { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/DelayInterceptor2.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/DelayInterceptor2.java index 3a013835b3..45b601297c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/DelayInterceptor2.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/DelayInterceptor2.java @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.cluster.failover; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -34,7 +34,7 @@ public class DelayInterceptor2 implements Interceptor private final CountDownLatch latch = new CountDownLatch(1); - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.NULL_RESPONSE && loseResponse) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/DelayInterceptor3.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/DelayInterceptor3.java index d2fb386d54..00dbcf08af 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/DelayInterceptor3.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/DelayInterceptor3.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.tests.integration.cluster.failover; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -28,7 +28,7 @@ import org.apache.activemq.spi.core.protocol.RemotingConnection; public class DelayInterceptor3 implements Interceptor { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_COMMIT) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverOnFlowControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverOnFlowControlTest.java index 20bb72b640..c8fa258d21 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverOnFlowControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/FailoverOnFlowControlTest.java @@ -12,12 +12,12 @@ */ package org.apache.activemq.tests.integration.cluster.failover; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Test; import java.util.ArrayList; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientMessage; @@ -58,7 +58,7 @@ public class FailoverOnFlowControlTest extends FailoverTestBase Interceptor interceptorClient = new Interceptor() { AtomicInteger count = new AtomicInteger(0); - public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException + public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { log.debug("Intercept..." + packet.getClass().getName()); 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 e3cbbc8c5f..ecf982bf03 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 @@ -23,12 +23,12 @@ import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQDuplicateIdException; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQObjectClosedException; -import org.apache.activemq.api.core.HornetQTransactionOutcomeUnknownException; -import org.apache.activemq.api.core.HornetQTransactionRolledBackException; +import org.apache.activemq.api.core.ActiveMQDuplicateIdException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; +import org.apache.activemq.api.core.ActiveMQObjectClosedException; +import org.apache.activemq.api.core.ActiveMQTransactionOutcomeUnknownException; +import org.apache.activemq.api.core.ActiveMQTransactionRolledBackException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; @@ -159,7 +159,7 @@ public class FailoverTest extends FailoverTestBase if (!producer.isClosed()) producer.send(message); } - catch (HornetQException e1) + catch (ActiveMQException e1) { e1.printStackTrace(); } @@ -238,7 +238,7 @@ public class FailoverTest extends FailoverTestBase message.getIntProperty("counter")); message.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); return; @@ -320,7 +320,7 @@ public class FailoverTest extends FailoverTestBase message.getIntProperty("counter")); message.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); continue; @@ -361,11 +361,11 @@ public class FailoverTest extends FailoverTestBase } return msg; } - catch (HornetQObjectClosedException oce) + catch (ActiveMQObjectClosedException oce) { throw new RuntimeException(oce); } - catch (HornetQException ignored) + catch (ActiveMQException ignored) { // retry ignored.printStackTrace(); @@ -764,9 +764,9 @@ public class FailoverTest extends FailoverTestBase /** * @param consumer - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - private void assertNoMoreMessages(ClientConsumer consumer) throws HornetQException + private void assertNoMoreMessages(ClientConsumer consumer) throws ActiveMQException { ClientMessage msg = consumer.receiveImmediate(); assertNull("there should be no more messages to receive! " + msg, msg); @@ -821,11 +821,11 @@ public class FailoverTest extends FailoverTestBase session.commit(); fail("session must have rolled back on failover"); } - catch (HornetQTransactionRolledBackException trbe) + catch (ActiveMQTransactionRolledBackException trbe) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -915,11 +915,11 @@ public class FailoverTest extends FailoverTestBase Assert.fail("Should throw exception"); } - catch (HornetQTransactionRolledBackException trbe) + catch (ActiveMQTransactionRolledBackException trbe) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -960,11 +960,11 @@ public class FailoverTest extends FailoverTestBase Assert.fail("Should throw exception"); } - catch (HornetQTransactionRolledBackException trbe) + catch (ActiveMQTransactionRolledBackException trbe) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -1096,11 +1096,11 @@ public class FailoverTest extends FailoverTestBase Assert.fail("Should throw exception"); } - catch (HornetQTransactionRolledBackException trbe) + catch (ActiveMQTransactionRolledBackException trbe) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -1702,7 +1702,7 @@ public class FailoverTest extends FailoverTestBase receiveDurableMessages(consumer); } - protected void receiveDurableMessages(ClientConsumer consumer) throws HornetQException + protected void receiveDurableMessages(ClientConsumer consumer) throws ActiveMQException { // During failover non-persistent messages may disappear but in certain cases they may survive. // For that reason the test is validating all the messages but being permissive with non-persistent messages @@ -1788,7 +1788,7 @@ public class FailoverTest extends FailoverTestBase receiveMessages(consumer, NUM_MESSAGES, NUM_MESSAGES * 2, true); } - protected void receiveMessages(ClientConsumer consumer) throws HornetQException + protected void receiveMessages(ClientConsumer consumer) throws ActiveMQException { receiveMessages(consumer, 0, NUM_MESSAGES, true); } @@ -1880,13 +1880,13 @@ public class FailoverTest extends FailoverTestBase { producer.send(message); } - catch (HornetQException e1) + catch (ActiveMQException e1) { this.e = e1; } } - volatile HornetQException e; + volatile ActiveMQException e; } Sender sender = new Sender(); @@ -1901,9 +1901,9 @@ public class FailoverTest extends FailoverTestBase Assert.assertNotNull(sender.e.getCause()); - Assert.assertEquals(sender.e.getType(), HornetQExceptionType.UNBLOCKED); + Assert.assertEquals(sender.e.getType(), ActiveMQExceptionType.UNBLOCKED); - Assert.assertEquals(((HornetQException)sender.e.getCause()).getType(), HornetQExceptionType.DISCONNECTED); + Assert.assertEquals(((ActiveMQException)sender.e.getCause()).getType(), ActiveMQExceptionType.DISCONNECTED); session.close(); } @@ -1957,7 +1957,7 @@ public class FailoverTest extends FailoverTestBase session.commit(); } - catch (HornetQTransactionRolledBackException trbe) + catch (ActiveMQTransactionRolledBackException trbe) { // Ok - now we retry the commit after removing the interceptor @@ -1969,12 +1969,12 @@ public class FailoverTest extends FailoverTestBase failed = false; } - catch (HornetQException e2) + catch (ActiveMQException e2) { throw new RuntimeException(e2); } } - catch (HornetQTransactionOutcomeUnknownException toue) + catch (ActiveMQTransactionOutcomeUnknownException toue) { // Ok - now we retry the commit after removing the interceptor @@ -1986,12 +1986,12 @@ public class FailoverTest extends FailoverTestBase failed = false; } - catch (HornetQException e2) + catch (ActiveMQException e2) { throw new RuntimeException(e2); } } - catch (HornetQException e) + catch (ActiveMQException e) { //ignore } @@ -2047,11 +2047,11 @@ public class FailoverTest extends FailoverTestBase session2.commit(); fail("expecting DUPLICATE_ID_REJECTED exception"); } - catch (HornetQDuplicateIdException dide) + catch (ActiveMQDuplicateIdException dide) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -2097,7 +2097,7 @@ public class FailoverTest extends FailoverTestBase session.commit(); } - catch (HornetQTransactionRolledBackException trbe) + catch (ActiveMQTransactionRolledBackException trbe) { // Ok - now we retry the commit after removing the interceptor @@ -2109,11 +2109,11 @@ public class FailoverTest extends FailoverTestBase failed = false; } - catch (HornetQException e2) + catch (ActiveMQException e2) { } } - catch (HornetQTransactionOutcomeUnknownException toue) + catch (ActiveMQTransactionOutcomeUnknownException toue) { // Ok - now we retry the commit after removing the interceptor @@ -2125,11 +2125,11 @@ public class FailoverTest extends FailoverTestBase failed = false; } - catch (HornetQException e2) + catch (ActiveMQException e2) { } } - catch (HornetQException e) + catch (ActiveMQException e) { //ignore } 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 5a69e6a750..ee0e37b53f 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 @@ -19,7 +19,7 @@ import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientMessage; @@ -160,7 +160,7 @@ public abstract class FailoverTestBase extends ServiceTestBase */ protected static void assertLargeMessageBody(final int i, final ClientMessage message) { - HornetQBuffer buffer = message.getBodyBuffer(); + ActiveMQBuffer buffer = message.getBodyBuffer(); for (int j = 0; j < LARGE_MESSAGE_SIZE; j++) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/NettyAsynchronousReattachTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/NettyAsynchronousReattachTest.java index 062a26f4f2..9e56a67deb 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/NettyAsynchronousReattachTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/NettyAsynchronousReattachTest.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.tests.integration.cluster.failover; -import org.apache.activemq.api.core.HornetQNotConnectedException; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.core.client.impl.ClientSessionInternal; import org.apache.activemq.tests.integration.IntegrationTestLogger; @@ -36,7 +36,7 @@ public class NettyAsynchronousReattachTest extends NettyAsynchronousFailoverTest { log.debug("Crashing session " + session); ClientSessionInternal internalSession = (ClientSessionInternal) session; - internalSession.getConnection().fail(new HornetQNotConnectedException("oops")); + internalSession.getConnection().fail(new ActiveMQNotConnectedException("oops")); } } } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ReplicatedDistributionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ReplicatedDistributionTest.java index d1344c5f1d..2b1831c475 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ReplicatedDistributionTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ReplicatedDistributionTest.java @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.cluster.failover; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQNotConnectedException; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -175,7 +175,7 @@ public class ReplicatedDistributionTest extends ClusterTestBase RemotingConnection conn = ((ClientSessionInternal) session).getConnection(); // Simulate failure on connection - conn.fail(new HornetQNotConnectedException()); + conn.fail(new ActiveMQNotConnectedException()); // Wait to be informed of failure 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 6e6f15ad54..2cf415794b 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 @@ -12,8 +12,8 @@ */ package org.apache.activemq.tests.integration.cluster.failover.remote; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQNotConnectedException; +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.ServerLocator; @@ -38,11 +38,11 @@ public class FailoverWithSharedStoreTest extends ClusterTestBase createSessionFactory(locator); fail(); } - catch (HornetQNotConnectedException nce) + catch (ActiveMQNotConnectedException nce) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } 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 231ee66380..40d3b8e653 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 @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.cluster.reattach; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Before; import org.junit.After; @@ -25,7 +26,6 @@ import java.util.concurrent.TimeUnit; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -1436,7 +1436,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt { message.acknowledge(); } - catch (HornetQException me) + catch (ActiveMQException me) { log.error("Failed to process", me); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/MultiThreadReattachSupportTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/MultiThreadReattachSupportTestBase.java index c59d5c1c6f..a2faf13bc0 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/MultiThreadReattachSupportTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/reattach/MultiThreadReattachSupportTestBase.java @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.cluster.reattach; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.junit.Before; import org.junit.After; @@ -21,7 +22,6 @@ import java.util.TimerTask; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQNotConnectedException; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; @@ -251,7 +251,7 @@ public abstract class MultiThreadReattachSupportTestBase extends ServiceTestBase } else { - conn.fail(new HornetQNotConnectedException("blah")); + conn.fail(new ActiveMQNotConnectedException("blah")); } log.info("** Fail complete"); 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 6d92a51b0d..feb733b8c8 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 @@ -12,6 +12,7 @@ */ package org.apache.activemq.tests.integration.cluster.reattach; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.junit.Test; import java.util.HashSet; @@ -22,7 +23,6 @@ import java.util.concurrent.TimeUnit; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQNotConnectedException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -117,7 +117,7 @@ public class OrderReattachTest extends ServiceTestBase // True means... fail session if (poll) { - conn.fail(new HornetQNotConnectedException("poop")); + conn.fail(new ActiveMQNotConnectedException("poop")); } else { 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 ad24339f9b..c3b0789aa2 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 @@ -20,8 +20,8 @@ import java.util.TimerTask; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQNotConnectedException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -352,7 +352,7 @@ public class RandomReattachTest extends UnitTestCase { message.acknowledge(); } - catch (HornetQException me) + catch (ActiveMQException me) { RandomReattachTest.log.error("Failed to process", me); } @@ -601,7 +601,7 @@ public class RandomReattachTest extends UnitTestCase { message.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); throw new RuntimeException(e.getMessage(), e); @@ -1529,7 +1529,7 @@ public class RandomReattachTest extends UnitTestCase { RandomReattachTest.log.info("** Failing connection"); - session.getConnection().fail(new HornetQNotConnectedException("oops")); + session.getConnection().fail(new ActiveMQNotConnectedException("oops")); RandomReattachTest.log.info("** Fail complete"); 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 c4e154fab1..a137d7e602 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 @@ -17,10 +17,10 @@ import java.util.TimerTask; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQNotConnectedException; -import org.apache.activemq.api.core.HornetQObjectClosedException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; +import org.apache.activemq.api.core.ActiveMQObjectClosedException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; @@ -106,7 +106,7 @@ public class ReattachTest extends ServiceTestBase RemotingConnection conn = ((ClientSessionInternal) session).getConnection(); - conn.fail(new HornetQNotConnectedException()); + conn.fail(new ActiveMQNotConnectedException()); session.start(); @@ -160,7 +160,7 @@ public class ReattachTest extends ServiceTestBase Interceptor intercept = new Interceptor() { - public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException + public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { System.out.println("Intercept..." + packet.getClass().getName()); @@ -172,7 +172,7 @@ public class ReattachTest extends ServiceTestBase if (count.incrementAndGet() == 2) { System.out.println("Failing"); - connection.fail(new HornetQException(HornetQExceptionType.UNSUPPORTED_PACKET, "bye")); + connection.fail(new ActiveMQException(ActiveMQExceptionType.UNSUPPORTED_PACKET, "bye")); return false; } } @@ -273,7 +273,7 @@ public class ReattachTest extends ServiceTestBase t.start(); - conn.fail(new HornetQNotConnectedException()); + conn.fail(new ActiveMQNotConnectedException()); session.start(); @@ -328,18 +328,18 @@ public class ReattachTest extends ServiceTestBase volatile boolean failed; @Override - public void connectionFailed(final HornetQException me, boolean failedOver) + public void connectionFailed(final ActiveMQException me, boolean failedOver) { failed = true; } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } - public void beforeReconnect(final HornetQException exception) + public void beforeReconnect(final ActiveMQException exception) { } } @@ -388,13 +388,13 @@ public class ReattachTest extends ServiceTestBase { } - conn2.fail(new HornetQNotConnectedException("Did not receive pong from server")); + conn2.fail(new ActiveMQNotConnectedException("Did not receive pong from server")); } }; t.start(); - conn.fail(new HornetQNotConnectedException()); + conn.fail(new ActiveMQNotConnectedException()); Assert.assertTrue(listener.failed); @@ -488,7 +488,7 @@ public class ReattachTest extends ServiceTestBase t.start(); - conn.fail(new HornetQNotConnectedException()); + conn.fail(new ActiveMQNotConnectedException()); // Should throw exception since didn't reconnect @@ -498,11 +498,11 @@ public class ReattachTest extends ServiceTestBase Assert.fail("Should throw exception"); } - catch (HornetQObjectClosedException oce) + catch (ActiveMQObjectClosedException oce) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -589,7 +589,7 @@ public class ReattachTest extends ServiceTestBase { try { - connFailure.fail(new HornetQNotConnectedException()); + connFailure.fail(new ActiveMQNotConnectedException()); } catch (Exception e) { @@ -754,7 +754,7 @@ public class ReattachTest extends ServiceTestBase InVMConnector.failOnCreateConnection = false; - conn.fail(new HornetQNotConnectedException()); + conn.fail(new ActiveMQNotConnectedException()); Thread t = new Thread() { @@ -792,9 +792,9 @@ public class ReattachTest extends ServiceTestBase // // fail("Should throw exception"); // } - // catch (HornetQException e) + // catch (ActiveMQException e) // { - // assertEquals(HornetQException.OBJECT_CLOSED, e.getCode()); + // assertEquals(ActiveMQException.OBJECT_CLOSED, e.getCode()); // } session.close(); @@ -846,7 +846,7 @@ public class ReattachTest extends ServiceTestBase RemotingConnection conn = ((ClientSessionInternal) session).getConnection(); - conn.fail(new HornetQNotConnectedException()); + conn.fail(new ActiveMQNotConnectedException()); session.start(); @@ -933,7 +933,7 @@ public class ReattachTest extends ServiceTestBase t.start(); - conn.fail(new HornetQNotConnectedException()); + conn.fail(new ActiveMQNotConnectedException()); session.start(); @@ -1009,7 +1009,7 @@ public class ReattachTest extends ServiceTestBase long start = System.currentTimeMillis(); - conn.fail(new HornetQNotConnectedException()); + conn.fail(new ActiveMQNotConnectedException()); session.start(); @@ -1088,7 +1088,7 @@ public class ReattachTest extends ServiceTestBase long start = System.currentTimeMillis(); - conn.fail(new HornetQNotConnectedException()); + conn.fail(new ActiveMQNotConnectedException()); session.start(); 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 69ace38a7b..2d7f70682c 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 @@ -17,10 +17,10 @@ import java.util.List; import java.util.Map; import java.util.concurrent.CountDownLatch; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQObjectClosedException; -import org.apache.activemq.api.core.HornetQUnBlockedException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; +import org.apache.activemq.api.core.ActiveMQObjectClosedException; +import org.apache.activemq.api.core.ActiveMQUnBlockedException; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientProducer; import org.apache.activemq.api.core.client.ClientSession; @@ -175,12 +175,12 @@ public abstract class TopologyClusterTestBase extends ClusterTestBase session.deleteQueue(rand); return session; } - catch (HornetQObjectClosedException oce) + catch (ActiveMQObjectClosedException oce) { ClientSessionFactory sf = createSessionFactory(locator); return sf.createSession(); } - catch (HornetQUnBlockedException obe) + catch (ActiveMQUnBlockedException obe) { ClientSessionFactory sf = createSessionFactory(locator); return sf.createSession(); @@ -378,9 +378,9 @@ public abstract class TopologyClusterTestBase extends ClusterTestBase session = checkSessionOrReconnect(session, locator); fail(); } - catch (HornetQException expected) + catch (ActiveMQException expected) { - assertEquals(HornetQExceptionType.NOT_CONNECTED, expected.getType()); + assertEquals(ActiveMQExceptionType.NOT_CONNECTED, expected.getType()); } } 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 cd00f34c50..25ee09e085 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 @@ -17,7 +17,7 @@ package org.apache.activemq.tests.integration.cluster.util; import java.util.concurrent.locks.Lock; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.core.protocol.core.Channel; import org.apache.activemq.core.protocol.core.ChannelHandler; @@ -92,7 +92,7 @@ public class BackupSyncDelay implements Interceptor } @Override - public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException + public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.BACKUP_REGISTRATION) { @@ -252,7 +252,7 @@ public class BackupSyncDelay implements Interceptor } @Override - public Packet sendBlocking(Packet packet, byte expected) throws HornetQException + public Packet sendBlocking(Packet packet, byte expected) throws ActiveMQException { throw new UnsupportedOperationException(); } 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 546c17aa6a..69697f2ddd 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 @@ -30,9 +30,9 @@ import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; import org.apache.activemq.api.core.BroadcastEndpoint; import org.apache.activemq.api.core.BroadcastEndpointFactory; -import org.apache.activemq.api.core.HornetQIllegalStateException; import org.apache.activemq.api.core.JGroupsBroadcastGroupConfiguration; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -1396,7 +1396,7 @@ public class DiscoveryTest extends UnitTestCase } @Override - public SimpleString readNodeId() throws HornetQIllegalStateException, IOException + public SimpleString readNodeId() throws ActiveMQIllegalStateException, IOException { return null; } 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 6fcaeeb777..b1e832d0fd 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 @@ -23,7 +23,7 @@ import java.util.concurrent.TimeUnit; import com.arjuna.ats.arjuna.coordinator.TransactionReaper; import com.arjuna.ats.arjuna.coordinator.TxControl; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -238,7 +238,7 @@ public abstract class ClusteredBridgeTestBase extends ServiceTestBase return destFactory; } - public void sendMessages(String queueName, int num) throws HornetQException + public void sendMessages(String queueName, int num) throws ActiveMQException { ClientSession session = sessionFactory.createSession(); ClientProducer producer = session.createProducer("jms.queue." + queueName); @@ -252,7 +252,7 @@ public abstract class ClusteredBridgeTestBase extends ServiceTestBase session.close(); } - public void receiveMessages(String queueName, int num, boolean checkDup) throws HornetQException + public void receiveMessages(String queueName, int num, boolean checkDup) throws ActiveMQException { ClientSession session = sessionFactory.createSession(); session.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/JMSBridgeClusteredTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/JMSBridgeClusteredTest.java index a1fa2e5cec..dae8c16656 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/JMSBridgeClusteredTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/bridge/JMSBridgeClusteredTest.java @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.jms.bridge; import javax.transaction.TransactionManager; import com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.jms.bridge.ConnectionFactoryFactory; import org.apache.activemq.jms.bridge.DestinationFactory; import org.apache.activemq.jms.bridge.QualityOfServiceMode; @@ -233,31 +233,31 @@ public class JMSBridgeClusteredTest extends ClusteredBridgeTestBase } } - private void sendMessages(ServerGroup server, String queueName, int num) throws HornetQException + private void sendMessages(ServerGroup server, String queueName, int num) throws ActiveMQException { server.sendMessages(queueName, num); } - private void receiveMessages(ServerGroup server, String queueName, int num, boolean checkDup) throws HornetQException + private void receiveMessages(ServerGroup server, String queueName, int num, boolean checkDup) throws ActiveMQException { try { server.receiveMessages(queueName, num, checkDup); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); throw e; } } - private void receiveMessages(ServerGroup server, String queueName, int num) throws HornetQException + private void receiveMessages(ServerGroup server, String queueName, int num) throws ActiveMQException { try { server.receiveMessages(queueName, num, false); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); throw e; 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 2aca0ad8a9..4a2a0cbcb5 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 @@ -21,7 +21,7 @@ import javax.jms.Queue; import javax.jms.Session; import javax.jms.TextMessage; -import org.apache.activemq.api.core.HornetQNotConnectedException; +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; @@ -248,7 +248,7 @@ public class GroupingTest extends JMSTestBase //consume all msgs from 2nd first consumer // ClientSession hqs = ((HornetQSession) session).getCoreSession(); // ((DelegatingSession) hqs).getChannel().close(); - rc.fail(new HornetQNotConnectedException()); + rc.fail(new ActiveMQNotConnectedException()); for (int j = 0; j < 10; j++) { TextMessage tm = (TextMessage)consumer2.receive(10000); 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 4f41749770..7602f7800e 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 @@ -12,6 +12,7 @@ */ package org.apache.activemq.tests.integration.jms.client; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.junit.Test; import java.util.ArrayList; @@ -27,7 +28,6 @@ import javax.jms.Session; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQNotConnectedException; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.HornetQClient; import org.apache.activemq.api.jms.JMSFactoryType; @@ -126,7 +126,7 @@ public class SessionClosedOnRemotingConnectionFailureTest extends JMSTestBase RemotingConnection connection = ((ClientSessionInternal)((HornetQSession)session).getCoreSession()).getConnection(); - connection.fail(new HornetQNotConnectedException()); + connection.fail(new ActiveMQNotConnectedException()); // Now try and use the producer @@ -138,7 +138,7 @@ public class SessionClosedOnRemotingConnectionFailureTest extends JMSTestBase } catch (JMSException e) { - // assertEquals(HornetQException.OBJECT_CLOSED, e.getCode()); + // assertEquals(ActiveMQException.OBJECT_CLOSED, e.getCode()); } try @@ -149,7 +149,7 @@ public class SessionClosedOnRemotingConnectionFailureTest extends JMSTestBase } catch (JMSException e) { - // assertEquals(HornetQException.OBJECT_CLOSED, e.getCode()); + // assertEquals(ActiveMQException.OBJECT_CLOSED, e.getCode()); } session.close(); 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 d501a93899..7beb44b08f 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 @@ -12,8 +12,8 @@ */ package org.apache.activemq.tests.integration.jms.cluster; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQNotConnectedException; +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.JMSFactoryType; @@ -438,18 +438,18 @@ public class BindingsClusterTest extends JMSClusteredTestBase forwardingConnection.addFailureListener(new FailureListener() { @Override - public void connectionFailed(HornetQException exception, boolean failedOver) + public void connectionFailed(ActiveMQException exception, boolean failedOver) { latch.countDown(); } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } }); - forwardingConnection.fail(new HornetQNotConnectedException()); + forwardingConnection.fail(new ActiveMQNotConnectedException()); assertTrue(latch.await(5000, TimeUnit.MILLISECONDS)); } } 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 6cd456d15d..b220b2eabc 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 @@ -28,7 +28,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; -import org.apache.activemq.api.core.HornetQException; +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.api.core.TransportConfiguration; @@ -365,7 +365,7 @@ public class JMSFailoverTest extends ServiceTestBase int count = 0; @Override - public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException + public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { if (packet instanceof SessionReceiveContinuationMessage) 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 f38bf31375..f39a1e69e0 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 @@ -11,6 +11,8 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.jms.cluster; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.junit.Before; import org.junit.After; @@ -31,8 +33,6 @@ import javax.jms.Topic; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQNotConnectedException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; @@ -140,7 +140,7 @@ public class JMSReconnectTest extends UnitTestCase Thread.sleep(2000); - HornetQException me = new HornetQNotConnectedException(); + ActiveMQException me = new ActiveMQNotConnectedException(); coreConn.fail(me); 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 9be32811a5..3c23a02e23 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 @@ -11,6 +11,9 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.jms.connection; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; +import org.apache.activemq.api.core.ActiveMQInternalErrorException; import org.junit.Before; import org.junit.After; @@ -23,9 +26,6 @@ import javax.jms.Session; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQInternalErrorException; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.jms.HornetQJMSClient; @@ -78,7 +78,7 @@ public class CloseDestroyedConnectionTest extends JMSTestBase } @Test - public void testClosingTemporaryTopicDeletesQueue() throws JMSException, HornetQException + public void testClosingTemporaryTopicDeletesQueue() throws JMSException, ActiveMQException { conn = cf.createConnection(); @@ -98,9 +98,9 @@ public class CloseDestroyedConnectionTest extends JMSTestBase cs.createConsumer(address); fail("the address from the TemporaryTopic still exists!"); } - catch (HornetQException e) + catch (ActiveMQException e) { - assertEquals("expecting 'queue does not exist'", HornetQExceptionType.QUEUE_DOES_NOT_EXIST, e.getType()); + assertEquals("expecting 'queue does not exist'", ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST, e.getType()); } } @@ -142,7 +142,7 @@ public class CloseDestroyedConnectionTest extends JMSTestBase RemotingConnection rc = sessi.getConnection(); - rc.fail(new HornetQInternalErrorException()); + rc.fail(new ActiveMQInternalErrorException()); // Now close the connection 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 860da7d58a..d70f5d2b3f 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 @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.jms.connection; +import org.apache.activemq.api.core.ActiveMQInternalErrorException; import org.junit.Before; import org.junit.After; @@ -26,7 +27,6 @@ import javax.jms.Session; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQInternalErrorException; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.jms.HornetQJMSClient; import org.apache.activemq.api.jms.JMSFactoryType; @@ -120,7 +120,7 @@ public class ExceptionListenerTest extends UnitTestCase ClientSessionInternal coreSession = (ClientSessionInternal)((HornetQConnection)conn).getInitialSession(); - coreSession.getConnection().fail(new HornetQInternalErrorException("blah")); + coreSession.getConnection().fail(new ActiveMQInternalErrorException("blah")); latch.await(5, TimeUnit.SECONDS); @@ -153,13 +153,13 @@ public class ExceptionListenerTest extends UnitTestCase ClientSessionInternal coreSession3 = (ClientSessionInternal)((HornetQSession)sess3).getCoreSession(); - coreSession0.getConnection().fail(new HornetQInternalErrorException("blah")); + coreSession0.getConnection().fail(new ActiveMQInternalErrorException("blah")); - coreSession1.getConnection().fail(new HornetQInternalErrorException("blah")); + coreSession1.getConnection().fail(new ActiveMQInternalErrorException("blah")); - coreSession2.getConnection().fail(new HornetQInternalErrorException("blah")); + coreSession2.getConnection().fail(new ActiveMQInternalErrorException("blah")); - coreSession3.getConnection().fail(new HornetQInternalErrorException("blah")); + coreSession3.getConnection().fail(new ActiveMQInternalErrorException("blah")); latch.await(5, TimeUnit.SECONDS); // Listener should only be called once even if all sessions connections die 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 d9ee5608f6..2017487d9d 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 @@ -35,7 +35,7 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.apache.activemq.api.config.HornetQDefaultConfiguration; -import org.apache.activemq.api.core.HornetQObjectClosedException; +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; @@ -351,7 +351,7 @@ public class JMSServerControlTest extends ManagementTestBase } catch (javax.jms.IllegalStateException e) { - assertTrue(e.getCause() instanceof HornetQObjectClosedException); + assertTrue(e.getCause() instanceof ActiveMQObjectClosedException); } } finally @@ -513,7 +513,7 @@ public class JMSServerControlTest extends ManagementTestBase } catch (javax.jms.IllegalStateException e) { - assertTrue(e.getCause() instanceof HornetQObjectClosedException); + assertTrue(e.getCause() instanceof ActiveMQObjectClosedException); } } finally @@ -564,7 +564,7 @@ public class JMSServerControlTest extends ManagementTestBase } catch (javax.jms.IllegalStateException e) { - assertTrue(e.getCause() instanceof HornetQObjectClosedException); + assertTrue(e.getCause() instanceof ActiveMQObjectClosedException); } } finally 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 2089e5f62b..b5c5bb375e 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 @@ -31,8 +31,8 @@ import javax.management.NotificationListener; import java.util.Collection; import java.util.Set; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ServerLocator; @@ -222,18 +222,18 @@ public class JMSUtil class MyListener implements SessionFailureListener { @Override - public void connectionFailed(final HornetQException me, boolean failedOver) + public void connectionFailed(final ActiveMQException me, boolean failedOver) { latch.countDown(); } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } - public void beforeReconnect(HornetQException exception) + public void beforeReconnect(ActiveMQException exception) { System.out.println("MyListener.beforeReconnect"); } 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 ac1927fb4b..0e241c8414 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 @@ -15,7 +15,7 @@ import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.IOCompletion; import org.apache.activemq.core.journal.Journal; @@ -214,7 +214,7 @@ public class JournalPerfTuneTest extends UnitTestCase this.bytes = bytes; } - public void decode(HornetQBuffer buffer) + public void decode(ActiveMQBuffer buffer) { int length = buffer.readInt(); @@ -223,7 +223,7 @@ public class JournalPerfTuneTest extends UnitTestCase buffer.readBytes(bytes); } - public void encode(HornetQBuffer buffer) + public void encode(ActiveMQBuffer buffer) { buffer.writeInt(bytes.length); 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 6f6b66c589..e20dcbfaa9 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 @@ -23,9 +23,9 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; +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.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; @@ -333,7 +333,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase else { - HornetQBuffer buffer = message.getBodyBuffer(); + ActiveMQBuffer buffer = message.getBodyBuffer(); buffer.resetReaderIndex(); for (long b = 0; b < numberOfBytes; b++) { @@ -455,7 +455,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase } else { - HornetQBuffer buffer = message.getBodyBuffer(); + ActiveMQBuffer buffer = message.getBodyBuffer(); buffer.resetReaderIndex(); for (long b = 0; b < numberOfBytes; b++) @@ -532,7 +532,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase * @param producer * @throws FileNotFoundException * @throws IOException - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ private void sendMessages(final int numberOfMessages, final long numberOfBytes, @@ -578,9 +578,9 @@ public abstract class LargeMessageTestBase extends ServiceTestBase } } - protected HornetQBuffer createLargeBuffer(final int numberOfIntegers) + protected ActiveMQBuffer createLargeBuffer(final int numberOfIntegers) { - HornetQBuffer body = HornetQBuffers.fixedBuffer(DataConstants.SIZE_INT * numberOfIntegers); + ActiveMQBuffer body = ActiveMQBuffers.fixedBuffer(DataConstants.SIZE_INT * numberOfIntegers); for (int i = 0; i < numberOfIntegers; i++) { @@ -619,11 +619,11 @@ public abstract class LargeMessageTestBase extends ServiceTestBase * @param session * @param queueToRead * @param numberOfBytes - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException * @throws FileNotFoundException * @throws IOException */ - protected void readMessage(final ClientSession session, final SimpleString queueToRead, final int numberOfBytes) throws HornetQException, + protected void readMessage(final ClientSession session, final SimpleString queueToRead, final int numberOfBytes) throws ActiveMQException, IOException { session.start(); 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 2de534e782..0bfecabf6e 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 @@ -12,12 +12,12 @@ */ package org.apache.activemq.tests.integration.management; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Test; import java.util.HashMap; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; @@ -97,7 +97,7 @@ public class AcceptorControlTest extends ManagementTestBase sf.createSession(false, true, true); Assert.fail("acceptor must not accept connections when stopped accepting"); } - catch (HornetQException e) + catch (ActiveMQException e) { } @@ -120,7 +120,7 @@ public class AcceptorControlTest extends ManagementTestBase sf.createSession(false, true, true); Assert.fail("acceptor must not accept connections when stopped accepting"); } - catch (HornetQException e) + catch (ActiveMQException e) { } 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 487f34bd1b..26a5743961 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 @@ -14,7 +14,7 @@ package org.apache.activemq.tests.integration.management; import java.nio.ByteBuffer; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -272,7 +272,7 @@ public class ManagementWithPagingServerTest extends ManagementTestBase for (int i = 0; i < num; i++) { ClientMessage message = session1.createMessage(true); - HornetQBuffer buffer = message.getBodyBuffer(); + ActiveMQBuffer buffer = message.getBodyBuffer(); buffer.writeBytes(body); producer.send(message); try 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 a63f693dd8..a4ade5b214 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 @@ -13,7 +13,7 @@ package org.apache.activemq.tests.integration.management; import org.apache.activemq.api.config.HornetQDefaultConfiguration; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -291,7 +291,7 @@ public class NotificationTest extends UnitTestCase // Private ------------------------------------------------------- - private static void flush(final ClientConsumer notifConsumer) throws HornetQException + private static void flush(final ClientConsumer notifConsumer) throws ActiveMQException { ClientMessage message = null; do 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 f7a9fbf5f2..c652d97f46 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 @@ -19,7 +19,7 @@ import java.util.concurrent.TimeUnit; import javax.management.Notification; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -437,7 +437,7 @@ public class QueueControlTest extends ManagementTestBase { message.acknowledge(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { e1.printStackTrace(); } 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 ce020c82b4..f87780ea89 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 @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.management; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Before; import org.junit.After; @@ -25,7 +26,6 @@ import java.util.Set; import org.junit.Assert; import org.apache.activemq.api.config.HornetQDefaultConfiguration; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -197,7 +197,7 @@ public class SecurityNotificationTest extends UnitTestCase // Private ------------------------------------------------------- - private static void flush(final ClientConsumer notifConsumer) throws HornetQException + private static void flush(final ClientConsumer notifConsumer) throws ActiveMQException { ClientMessage message = null; do 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 36a7c865b9..c8170adc35 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 @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.persistence; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; +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.api.core.client.ClientSession; @@ -102,7 +102,7 @@ public class DeleteQueueRestartTest extends ServiceTestBase session.close(); count.countDown(); } - catch (HornetQException e) + catch (ActiveMQException e) { } } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/JMSConnectionFactoryConfigurationStorageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/JMSConnectionFactoryConfigurationStorageTest.java index c8bd2cfc01..8ac4a07a6b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/JMSConnectionFactoryConfigurationStorageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/JMSConnectionFactoryConfigurationStorageTest.java @@ -17,8 +17,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.Pair; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; import org.apache.activemq.jms.persistence.config.PersistedConnectionFactory; @@ -123,7 +123,7 @@ public class JMSConnectionFactoryConfigurationStorageTest extends StorageManager int size = config.getEncodeSize(); - HornetQBuffer buffer = HornetQBuffers.fixedBuffer(size); + ActiveMQBuffer buffer = ActiveMQBuffers.fixedBuffer(size); config.encode(buffer); @@ -133,7 +133,7 @@ public class JMSConnectionFactoryConfigurationStorageTest extends StorageManager size = persistedCF.getEncodeSize(); - buffer = HornetQBuffers.fixedBuffer(size); + buffer = ActiveMQBuffers.fixedBuffer(size); persistedCF.encode(buffer); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/TransportConfigurationEncodingSupportTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/TransportConfigurationEncodingSupportTest.java index cc9eb8fa1a..6d6ce8222f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/TransportConfigurationEncodingSupportTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/TransportConfigurationEncodingSupportTest.java @@ -12,6 +12,8 @@ */ package org.apache.activemq.tests.integration.persistence; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.junit.Test; import java.util.ArrayList; @@ -19,8 +21,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory; import org.apache.activemq.core.remoting.impl.netty.TransportConstants; @@ -58,7 +58,7 @@ public class TransportConfigurationEncodingSupportTest extends Assert params.put(TransportConstants.HOST_PROP_NAME, RandomUtil.randomString()); TransportConfiguration config = new TransportConfiguration(NettyConnectorFactory.class.getName(), params); - HornetQBuffer buffer = HornetQBuffers.fixedBuffer(TransportConfigurationEncodingSupport.getEncodeSize(config)); + ActiveMQBuffer buffer = ActiveMQBuffers.fixedBuffer(TransportConfigurationEncodingSupport.getEncodeSize(config)); TransportConfigurationEncodingSupport.encode(buffer, config); assertEquals(buffer.capacity(), buffer.writerIndex()); @@ -93,7 +93,7 @@ public class TransportConfigurationEncodingSupportTest extends Assert connectorConfigs.add(new Pair(live1, backup1)); connectorConfigs.add(new Pair(live2, null)); - HornetQBuffer buffer = HornetQBuffers.fixedBuffer(TransportConfigurationEncodingSupport.getEncodeSize(connectorConfigs)); + ActiveMQBuffer buffer = ActiveMQBuffers.fixedBuffer(TransportConfigurationEncodingSupport.getEncodeSize(connectorConfigs)); TransportConfigurationEncodingSupport.encodeConfigs(buffer, connectorConfigs); assertEquals(buffer.capacity(), buffer.writerIndex()); 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/HornetQMessageHandlerTest.java index 219a6f2bbb..ef8fd35772 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/HornetQMessageHandlerTest.java @@ -20,7 +20,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; @@ -217,18 +217,18 @@ public class HornetQMessageHandlerTest extends HornetQRATestBase { @Override - public void connectionFailed(HornetQException exception, boolean failedOver) + public void connectionFailed(ActiveMQException exception, boolean failedOver) { } @Override - public void connectionFailed(HornetQException exception, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(ActiveMQException exception, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(exception, failedOver); } @Override - public void beforeReconnect(HornetQException exception) + public void beforeReconnect(ActiveMQException exception) { failedLatch.countDown(); } 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 1da57bf3f9..b038748656 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 @@ -12,6 +12,7 @@ */ package org.apache.activemq.tests.integration.remoting; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.protocol.core.impl.wireformat.Ping; import org.junit.Before; @@ -23,7 +24,6 @@ import java.util.concurrent.TimeUnit; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; @@ -78,26 +78,26 @@ public class PingTest extends ServiceTestBase class Listener implements SessionFailureListener { - volatile HornetQException me; + volatile ActiveMQException me; @Override - public void connectionFailed(final HornetQException me, boolean failedOver) + public void connectionFailed(final ActiveMQException me, boolean failedOver) { this.me = me; } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } - public HornetQException getException() + public ActiveMQException getException() { return me; } - public void beforeReconnect(final HornetQException exception) + public void beforeReconnect(final ActiveMQException exception) { } } @@ -235,7 +235,7 @@ public class PingTest extends ServiceTestBase final CountDownLatch unwantedPings = new CountDownLatch(2); server.getRemotingService().addIncomingInterceptor(new Interceptor() { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.PING) { @@ -358,7 +358,7 @@ public class PingTest extends ServiceTestBase server.getRemotingService().addIncomingInterceptor(new Interceptor() { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.PING) { @@ -383,18 +383,18 @@ public class PingTest extends ServiceTestBase SessionFailureListener clientListener = new SessionFailureListener() { @Override - public void connectionFailed(final HornetQException me, boolean failedOver) + public void connectionFailed(final ActiveMQException me, boolean failedOver) { clientLatch.countDown(); } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } - public void beforeReconnect(final HornetQException exception) + public void beforeReconnect(final ActiveMQException exception) { } }; 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 de6fba0bb6..959d05e939 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 @@ -12,6 +12,7 @@ */ package org.apache.activemq.tests.integration.remoting; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Test; import java.util.ArrayList; @@ -21,7 +22,6 @@ import java.util.concurrent.atomic.AtomicInteger; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.client.SessionFailureListener; @@ -82,19 +82,19 @@ public class ReconnectTest extends ServiceTestBase session.addFailureListener(new SessionFailureListener() { @Override - public void connectionFailed(final HornetQException me, boolean failedOver) + public void connectionFailed(final ActiveMQException me, boolean failedOver) { count.incrementAndGet(); latch.countDown(); } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } - public void beforeReconnect(final HornetQException exception) + public void beforeReconnect(final ActiveMQException exception) { } @@ -181,18 +181,18 @@ public class ReconnectTest extends ServiceTestBase { @Override - public void connectionFailed(HornetQException exception, boolean failedOver) + public void connectionFailed(ActiveMQException exception, boolean failedOver) { } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } @Override - public void beforeReconnect(HornetQException exception) + public void beforeReconnect(ActiveMQException exception) { latchCommit.countDown(); threadToBeInterrupted.add(Thread.currentThread()); @@ -210,19 +210,19 @@ public class ReconnectTest extends ServiceTestBase session.addFailureListener(new SessionFailureListener() { - public void connectionFailed(final HornetQException me, boolean failedOver) + public void connectionFailed(final ActiveMQException me, boolean failedOver) { count.incrementAndGet(); latch.countDown(); } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } - public void beforeReconnect(final HornetQException exception) + public void beforeReconnect(final ActiveMQException exception) { } @@ -239,7 +239,7 @@ public class ReconnectTest extends ServiceTestBase { session.commit(); } - catch (HornetQException e) + catch (ActiveMQException e) { e.printStackTrace(); } 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 98ce1336d1..fa5430423c 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 @@ -27,11 +27,11 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import org.apache.activemq.api.config.HornetQDefaultConfiguration; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQNotConnectedException; +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.ActiveMQExceptionType; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -185,11 +185,11 @@ public final class ReplicationTest extends ServiceTestBase manager.start(); Assert.fail("Exception was expected"); } - catch (HornetQNotConnectedException nce) + catch (ActiveMQNotConnectedException nce) { // ok } - catch (HornetQException expected) + catch (ActiveMQException expected) { fail("Invalid Exception type:" + expected.getType()); } @@ -261,7 +261,7 @@ public final class ReplicationTest extends ServiceTestBase serverMsg.setMessageID(500); serverMsg.setAddress(new SimpleString("tttt")); - HornetQBuffer buffer = HornetQBuffers.dynamicBuffer(100); + ActiveMQBuffer buffer = ActiveMQBuffers.dynamicBuffer(100); serverMsg.encodeHeadersAndProperties(buffer); manager.largeMessageBegin(500); @@ -336,7 +336,7 @@ public final class ReplicationTest extends ServiceTestBase String msg = "I'm an exception"; - ctx.onError(HornetQExceptionType.UNBLOCKED.getCode(), msg); + ctx.onError(ActiveMQExceptionType.UNBLOCKED.getCode(), msg); final AtomicInteger lastError = new AtomicInteger(0); @@ -527,11 +527,11 @@ public final class ReplicationTest extends ServiceTestBase class FakeData implements EncodingSupport { - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeBytes(new byte[5]); } @@ -605,7 +605,7 @@ public final class ReplicationTest extends ServiceTestBase { static AtomicBoolean value = new AtomicBoolean(true); - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { return TestInterceptor.value.get(); } 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 1c21b750a6..f3d62656cf 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 @@ -28,8 +28,8 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQSecurityException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQSecurityException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -93,7 +93,7 @@ public class SecurityTest extends ServiceTestBase session.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { Assert.fail("should not throw exception"); } @@ -122,11 +122,11 @@ public class SecurityTest extends ServiceTestBase cf.createSession(false, true, true); Assert.fail("should throw exception"); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -146,11 +146,11 @@ public class SecurityTest extends ServiceTestBase cf.createSession("newuser", "awrongpass", false, true, true, false, -1); Assert.fail("should not throw exception"); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -171,7 +171,7 @@ public class SecurityTest extends ServiceTestBase session.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { Assert.fail("should not throw exception"); } @@ -217,11 +217,11 @@ public class SecurityTest extends ServiceTestBase session.createQueue(SecurityTest.addressA, SecurityTest.queueA, true); Assert.fail("should throw exception"); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -269,11 +269,11 @@ public class SecurityTest extends ServiceTestBase session.deleteQueue(SecurityTest.queueA); Assert.fail("should throw exception"); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -321,11 +321,11 @@ public class SecurityTest extends ServiceTestBase session.createQueue(SecurityTest.addressA, SecurityTest.queueA, false); Assert.fail("should throw exception"); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -373,11 +373,11 @@ public class SecurityTest extends ServiceTestBase session.deleteQueue(SecurityTest.queueA); Assert.fail("should throw exception"); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -442,7 +442,7 @@ public class SecurityTest extends ServiceTestBase { cp.send(session.createMessage(true)); } - catch (HornetQException e) + catch (ActiveMQException e) { failed = true; } @@ -474,11 +474,11 @@ public class SecurityTest extends ServiceTestBase { cp.send(session.createMessage(false)); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -567,11 +567,11 @@ public class SecurityTest extends ServiceTestBase { session.createConsumer(SecurityTest.queueA); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -612,11 +612,11 @@ public class SecurityTest extends ServiceTestBase { session.createConsumer(SecurityTest.queueA); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -669,11 +669,11 @@ public class SecurityTest extends ServiceTestBase { session.createConsumer(SecurityTest.queueA); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -691,11 +691,11 @@ public class SecurityTest extends ServiceTestBase { session.createConsumer(SecurityTest.queueA); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -742,11 +742,11 @@ public class SecurityTest extends ServiceTestBase { session.createConsumer(SecurityTest.queueA); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -769,7 +769,7 @@ public class SecurityTest extends ServiceTestBase sendingSession.commit(); Assert.fail("Expected exception"); } - catch (HornetQException e) + catch (ActiveMQException e) { // I would expect the commit to fail, since there were failures registered } @@ -852,11 +852,11 @@ public class SecurityTest extends ServiceTestBase { cp.send(session.createMessage(false)); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -923,7 +923,7 @@ public class SecurityTest extends ServiceTestBase session.close(); } - catch (HornetQException e) + catch (ActiveMQException e) { Assert.fail("should not throw exception"); } @@ -958,11 +958,11 @@ public class SecurityTest extends ServiceTestBase cf.createSession(false, true, true); Assert.fail("should not throw exception"); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -1028,11 +1028,11 @@ public class SecurityTest extends ServiceTestBase factory.createSession(false, true, true); Assert.fail("should throw exception"); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -1043,11 +1043,11 @@ public class SecurityTest extends ServiceTestBase billConnection = factory.createSession("bill", "hornetq1", false, true, true, false, -1); Assert.fail("should throw exception"); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -1167,11 +1167,11 @@ public class SecurityTest extends ServiceTestBase factory.createSession(false, true, true); Assert.fail("should throw exception"); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -1182,11 +1182,11 @@ public class SecurityTest extends ServiceTestBase billConnection = factory.createSession("bill", "hornetq1", false, true, true, false, -1); Assert.fail("should throw exception"); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -1272,7 +1272,7 @@ public class SecurityTest extends ServiceTestBase prod.send(m); Assert.fail("should throw exception"); } - catch (HornetQException e) + catch (ActiveMQException e) { // pass } @@ -1303,7 +1303,7 @@ public class SecurityTest extends ServiceTestBase prod.send(m); Assert.fail("should throw exception"); } - catch (HornetQException e) + catch (ActiveMQException e) { // pass } @@ -1316,7 +1316,7 @@ public class SecurityTest extends ServiceTestBase connection.createConsumer(queue); Assert.fail("should throw exception"); } - catch (HornetQException e) + catch (ActiveMQException e) { // pass } @@ -1339,11 +1339,11 @@ public class SecurityTest extends ServiceTestBase connection.createConsumer(queue); Assert.fail("should throw exception"); } - catch (HornetQSecurityException se) + catch (ActiveMQSecurityException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } 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 4f3c9ce3f4..4a4d26a827 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 @@ -19,7 +19,7 @@ import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import org.apache.activemq.api.core.HornetQException; +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.ClientProducer; @@ -83,7 +83,7 @@ public class AddressFullLoggingTest extends ServiceTestBase ExecutorService executor = Executors.newFixedThreadPool(1); Callable sendMessageTask = new Callable() { - public Object call() throws HornetQException + public Object call() throws ActiveMQException { producer.send(message); return null; 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 24b79cc695..b8c47a03d3 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 @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.server; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Before; import org.junit.After; @@ -23,7 +24,6 @@ import java.util.concurrent.TimeUnit; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -294,7 +294,7 @@ public class ExpiryRunnerTest extends UnitTestCase { clientSession.close(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { // } 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 808e31d8c6..e25ca46589 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 @@ -15,7 +15,7 @@ package org.apache.activemq.tests.integration.server; import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -177,7 +177,7 @@ public class LVQRecoveryTest extends ServiceTestBase { clientSession.close(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { // } @@ -188,7 +188,7 @@ public class LVQRecoveryTest extends ServiceTestBase { clientSessionXa.close(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { // } 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 70427f98a2..ba08b158b2 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 @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.integration.server; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.server.Queue; import org.junit.Before; import org.junit.After; @@ -19,7 +20,6 @@ import org.junit.Test; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -621,7 +621,7 @@ public class LVQTest extends UnitTestCase { clientSession.close(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { // } @@ -633,7 +633,7 @@ public class LVQTest extends UnitTestCase { clientSessionTxReceives.close(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { // } @@ -645,7 +645,7 @@ public class LVQTest extends UnitTestCase { clientSessionTxSends.close(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { // } 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 d6392cc0a6..74fc5fbc0e 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 @@ -15,8 +15,8 @@ package org.apache.activemq.tests.integration.server; import java.util.ArrayList; import java.util.List; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQQueueExistsException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQQueueExistsException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -96,11 +96,11 @@ public class PredefinedQueueTest extends ServiceTestBase Assert.fail("Should throw exception"); } - catch (HornetQQueueExistsException se) + catch (ActiveMQQueueExistsException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -110,11 +110,11 @@ public class PredefinedQueueTest extends ServiceTestBase Assert.fail("Should throw exception"); } - catch (HornetQQueueExistsException se) + catch (ActiveMQQueueExistsException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -124,11 +124,11 @@ public class PredefinedQueueTest extends ServiceTestBase Assert.fail("Should throw exception"); } - catch (HornetQQueueExistsException se) + catch (ActiveMQQueueExistsException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } 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 7a7e903723..8a631e8357 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 @@ -19,9 +19,9 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; -import org.apache.activemq.api.core.HornetQConnectionTimedOutException; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQNotConnectedException; +import org.apache.activemq.api.core.ActiveMQConnectionTimedOutException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; @@ -135,7 +135,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase createSessionFactory(locator); Assert.fail(); } - catch (HornetQNotConnectedException e) + catch (ActiveMQNotConnectedException e) { Assert.assertTrue(true); } @@ -156,7 +156,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase createSessionFactory(locator); Assert.fail(); } - catch (HornetQNotConnectedException e) + catch (ActiveMQNotConnectedException e) { Assert.assertTrue(true); } @@ -179,7 +179,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase createSessionFactory(locator); Assert.fail(); } - catch (HornetQNotConnectedException e) + catch (ActiveMQNotConnectedException e) { Assert.assertTrue(true); } @@ -201,7 +201,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase createSessionFactory(locator); Assert.fail(); } - catch (HornetQNotConnectedException e) + catch (ActiveMQNotConnectedException e) { Assert.assertTrue(true); } @@ -222,7 +222,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase createSessionFactory(locator); Assert.fail(); } - catch (HornetQNotConnectedException e) + catch (ActiveMQNotConnectedException e) { Assert.assertTrue(true); } @@ -244,7 +244,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase createSessionFactory(locator); Assert.fail(); } - catch (HornetQNotConnectedException e) + catch (ActiveMQNotConnectedException e) { Assert.assertTrue(true); } @@ -267,7 +267,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase createSessionFactory(locator); Assert.fail(); } - catch (HornetQNotConnectedException e) + catch (ActiveMQNotConnectedException e) { Assert.assertTrue(true); } @@ -292,7 +292,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase { sf = createSessionFactory(locator); } - catch (HornetQNotConnectedException e) + catch (ActiveMQNotConnectedException e) { Assert.fail(); } @@ -330,7 +330,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase { sf = createSessionFactory(locator); } - catch (HornetQNotConnectedException e) + catch (ActiveMQNotConnectedException e) { Assert.fail(); } @@ -369,7 +369,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase sf = createSessionFactory(locator); Assert.assertTrue(true); } - catch (HornetQNotConnectedException e) + catch (ActiveMQNotConnectedException e) { Assert.fail(); } @@ -407,7 +407,7 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase sf = createSessionFactory(locator); Assert.assertTrue(true); } - catch (HornetQNotConnectedException e) + catch (ActiveMQNotConnectedException e) { Assert.fail(); } @@ -479,11 +479,11 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase createSessionFactory(locator); Assert.fail(); } - catch (HornetQNotConnectedException se) + catch (ActiveMQNotConnectedException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -504,11 +504,11 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase ClientSessionFactory sf = createSessionFactory(locator); Assert.fail(); } - catch (HornetQNotConnectedException se) + catch (ActiveMQNotConnectedException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -528,11 +528,11 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase ClientSessionFactory sf = createSessionFactory(locator); Assert.fail(); } - catch (HornetQNotConnectedException se) + catch (ActiveMQNotConnectedException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } @@ -552,15 +552,15 @@ public class CoreClientOverOneWaySSLTest extends ServiceTestBase createSessionFactory(locator); fail("expecting exception"); } - catch (HornetQNotConnectedException se) + catch (ActiveMQNotConnectedException se) { //ok } - catch (HornetQConnectionTimedOutException ctoe) + catch (ActiveMQConnectionTimedOutException ctoe) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } 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 58c8c050be..3d6211bb96 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 @@ -19,8 +19,8 @@ import java.util.HashMap; import java.util.Map; import io.netty.handler.ssl.SslHandler; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQNotConnectedException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; @@ -100,7 +100,7 @@ public class CoreClientOverTwoWaySSLTest extends ServiceTestBase private class MyInterceptor implements Interceptor { - public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { @@ -171,11 +171,11 @@ public class CoreClientOverTwoWaySSLTest extends ServiceTestBase createSessionFactory(locator); Assert.fail(); } - catch (HornetQNotConnectedException se) + catch (ActiveMQNotConnectedException se) { //ok } - catch (HornetQException e) + catch (ActiveMQException e) { fail("Invalid Exception type:" + e.getType()); } 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 d41d2417f1..702d71284d 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 @@ -29,9 +29,9 @@ import io.netty.handler.codec.http.FullHttpResponse; import io.netty.handler.codec.http.HttpRequest; import io.netty.handler.codec.http.HttpRequestDecoder; import io.netty.handler.codec.http.HttpResponseEncoder; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQNotConnectedException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; +import org.apache.activemq.api.core.ActiveMQNotConnectedException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; @@ -184,8 +184,8 @@ public class NettyConnectorWithHTTPUpgradeTest extends UnitTestCase // make sure we failed *before* the HTTP hand-shake timeout elapsed (which is hard-coded to 30 seconds, see org.apache.activemq.core.remoting.impl.netty.NettyConnector.HttpUpgradeHandler.awaitHandshake()) assertTrue((System.currentTimeMillis() - start) < 30000); assertNotNull(e); - assertTrue(e instanceof HornetQNotConnectedException); - assertTrue(((HornetQException) e).getType() == HornetQExceptionType.NOT_CONNECTED); + assertTrue(e instanceof ActiveMQNotConnectedException); + assertTrue(((ActiveMQException) e).getType() == ActiveMQExceptionType.NOT_CONNECTED); } private void startWebServer(int port) throws InterruptedException 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/HornetQVertxUnitTest.java index 7cfb975867..8ff284d9e2 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/HornetQVertxUnitTest.java @@ -14,7 +14,7 @@ package org.apache.activemq.tests.integration.vertx; import java.util.HashMap; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -201,7 +201,7 @@ public class HornetQVertxUnitTest extends ServiceTestBase vertxType = msg.getIntProperty(VertxConstants.VERTX_MESSAGE_TYPE); assertEquals(VertxConstants.TYPE_BUFFER, vertxType); - HornetQBuffer hqBuf = msg.getBodyBuffer(); + ActiveMQBuffer hqBuf = msg.getBodyBuffer(); int len = hqBuf.readInt(); System.out.println("==== len is: " + len); assertEquals(content.length, len); 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 d39ba4783d..ce7ca0a995 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 @@ -20,7 +20,7 @@ import javax.management.MBeanServerFactory; import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -111,7 +111,7 @@ public class BasicXaRecoveryTest extends ServiceTestBase { clientSession.close(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { // } 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 dfb863bd4d..9ab3c8e146 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 @@ -20,7 +20,7 @@ import java.util.Map; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -665,7 +665,7 @@ public class BasicXaTest extends ServiceTestBase } /** - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException * @throws XAException */ protected void multipleQueuesInternalTest(final boolean createQueues, @@ -956,7 +956,7 @@ public class BasicXaTest extends ServiceTestBase { message.acknowledge(); } - catch (HornetQException e) + catch (ActiveMQException e) { BasicXaTest.log.error("Failed to process message", e); } @@ -973,7 +973,7 @@ public class BasicXaTest extends ServiceTestBase { session.close(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { // } 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 89e03b6663..53012a53f1 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 @@ -22,7 +22,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; +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.api.core.TransportConfiguration; @@ -110,7 +110,7 @@ public class XaTimeoutTest extends UnitTestCase { clientSession.close(); } - catch (HornetQException e1) + catch (ActiveMQException e1) { // } @@ -714,7 +714,7 @@ public class XaTimeoutTest extends UnitTestCase * @see org.apache.activemq.api.core.Interceptor#intercept(org.apache.activemq.core.protocol.core.Packet, org.apache.activemq.spi.core.protocol.RemotingConnection) */ @Override - public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException + public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { if (packet instanceof SessionXAStartMessage) { 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 6f3735634b..77f0a129d2 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 @@ -21,9 +21,9 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; +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.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; @@ -354,7 +354,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase else { - HornetQBuffer buffer = message.getBodyBuffer(); + ActiveMQBuffer buffer = message.getBodyBuffer(); buffer.resetReaderIndex(); for (long b = 0; b < numberOfBytes; b++) { @@ -476,7 +476,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase } else { - HornetQBuffer buffer = message.getBodyBuffer(); + ActiveMQBuffer buffer = message.getBodyBuffer(); buffer.resetReaderIndex(); for (long b = 0; b < numberOfBytes; b++) @@ -553,7 +553,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase * @param producer * @throws FileNotFoundException * @throws IOException - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ private void sendMessages(final int numberOfMessages, final long numberOfBytes, @@ -599,9 +599,9 @@ public abstract class LargeMessageTestBase extends ServiceTestBase } } - protected HornetQBuffer createLargeBuffer(final int numberOfIntegers) + protected ActiveMQBuffer createLargeBuffer(final int numberOfIntegers) { - HornetQBuffer body = HornetQBuffers.fixedBuffer(DataConstants.SIZE_INT * numberOfIntegers); + ActiveMQBuffer body = ActiveMQBuffers.fixedBuffer(DataConstants.SIZE_INT * numberOfIntegers); for (int i = 0; i < numberOfIntegers; i++) { @@ -640,11 +640,11 @@ public abstract class LargeMessageTestBase extends ServiceTestBase * @param session * @param queueToRead * @param numberOfBytes - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException * @throws FileNotFoundException * @throws IOException */ - protected void readMessage(final ClientSession session, final SimpleString queueToRead, final int numberOfBytes) throws HornetQException, + protected void readMessage(final ClientSession session, final SimpleString queueToRead, final int numberOfBytes) throws ActiveMQException, IOException { session.start(); diff --git a/tests/jms-tests/pom.xml b/tests/jms-tests/pom.xml index 9c4401e698..6be5488b81 100644 --- a/tests/jms-tests/pom.xml +++ b/tests/jms-tests/pom.xml @@ -151,7 +151,7 @@ org.apache.activemq/jms/tests/stress/*.java org.apache.activemq/jms/tests/manual/** - ${hornetq-surefire-argline} + ${activemq-surefire-argline} 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 af5e4ad95a..47194cbdac 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 @@ -34,8 +34,8 @@ import javax.transaction.xa.XAException; import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -977,20 +977,20 @@ public class MessageHeaderTest extends MessageHeaderTestBase class FakeSession implements ClientSession { - public ClientConsumer createConsumer(final SimpleString queueName, final boolean browseOnly) throws HornetQException + public ClientConsumer createConsumer(final SimpleString queueName, final boolean browseOnly) throws ActiveMQException { // TODO Auto-generated method stub return null; } - public ClientConsumer createConsumer(final String queueName, final boolean browseOnly) throws HornetQException + public ClientConsumer createConsumer(final String queueName, final boolean browseOnly) throws ActiveMQException { // TODO Auto-generated method stub return null; } - public void createQueue(final String address, final String queueName) throws HornetQException + public void createQueue(final String address, final String queueName) throws ActiveMQException { // TODO Auto-generated method stub @@ -1006,88 +1006,88 @@ public class MessageHeaderTest extends MessageHeaderTestBase public void createQueue(final SimpleString address, final SimpleString queueName, final SimpleString filterString, - final boolean durable) throws HornetQException + final boolean durable) throws ActiveMQException { } - public void createQueue(final SimpleString address, final SimpleString queueName, final boolean durable) throws HornetQException + public void createQueue(final SimpleString address, final SimpleString queueName, final boolean durable) throws ActiveMQException { } @Override - public void createSharedQueue(SimpleString address, SimpleString queueName, boolean durable) throws HornetQException + public void createSharedQueue(SimpleString address, SimpleString queueName, boolean durable) throws ActiveMQException { } @Override - public void createSharedQueue(SimpleString address, SimpleString queueName, SimpleString filter, boolean durable) throws HornetQException + public void createSharedQueue(SimpleString address, SimpleString queueName, SimpleString filter, boolean durable) throws ActiveMQException { } - public void createQueue(final String address, final String queueName, final boolean durable) throws HornetQException + public void createQueue(final String address, final String queueName, final boolean durable) throws ActiveMQException { } public void createQueue(final SimpleString address, final SimpleString queueName, final boolean durable, - final boolean temporary) throws HornetQException + final boolean temporary) throws ActiveMQException { } public void createQueue(final String address, final String queueName, final boolean durable, - final boolean temporary) throws HornetQException + final boolean temporary) throws ActiveMQException { } public void createQueue(final String address, final String queueName, final String filterString, - final boolean durable) throws HornetQException + final boolean durable) throws ActiveMQException { } - public void createTemporaryQueue(final SimpleString address, final SimpleString queueName) throws HornetQException + public void createTemporaryQueue(final SimpleString address, final SimpleString queueName) throws ActiveMQException { } - public void createTemporaryQueue(final String address, final String queueName) throws HornetQException + public void createTemporaryQueue(final String address, final String queueName) throws ActiveMQException { } public void createTemporaryQueue(final SimpleString address, final SimpleString queueName, - final SimpleString filter) throws HornetQException + final SimpleString filter) throws ActiveMQException { } - public void createTemporaryQueue(final String address, final String queueName, final String filter) throws HornetQException + public void createTemporaryQueue(final String address, final String queueName, final String filter) throws ActiveMQException { } - public void deleteQueue(final SimpleString queueName) throws HornetQException + public void deleteQueue(final SimpleString queueName) throws ActiveMQException { } - public void deleteQueue(final String queueName) throws HornetQException + public void deleteQueue(final String queueName) throws ActiveMQException { } - public ClientConsumer createConsumer(final SimpleString queueName) throws HornetQException + public ClientConsumer createConsumer(final SimpleString queueName) throws ActiveMQException { return null; } - public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString) throws HornetQException + public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString) throws ActiveMQException { return null; } public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString, - final boolean browseOnly) throws HornetQException + final boolean browseOnly) throws ActiveMQException { return null; } @@ -1096,22 +1096,22 @@ public class MessageHeaderTest extends MessageHeaderTestBase final SimpleString filterString, final int windowSize, final int maxRate, - final boolean browseOnly) throws HornetQException + final boolean browseOnly) throws ActiveMQException { return null; } - public ClientConsumer createConsumer(final String queueName) throws HornetQException + public ClientConsumer createConsumer(final String queueName) throws ActiveMQException { return null; } - public ClientConsumer createConsumer(final String queueName, final String filterString) throws HornetQException + public ClientConsumer createConsumer(final String queueName, final String filterString) throws ActiveMQException { return null; } - public ClientConsumer createConsumer(final String queueName, final String filterString, final boolean browseOnly) throws HornetQException + public ClientConsumer createConsumer(final String queueName, final String filterString, final boolean browseOnly) throws ActiveMQException { return null; } @@ -1120,19 +1120,19 @@ public class MessageHeaderTest extends MessageHeaderTestBase final String filterString, final int windowSize, final int maxRate, - final boolean browseOnly) throws HornetQException + final boolean browseOnly) throws ActiveMQException { return null; } - public ClientConsumer createFileConsumer(final File directory, final SimpleString queueName) throws HornetQException + public ClientConsumer createFileConsumer(final File directory, final SimpleString queueName) throws ActiveMQException { return null; } public ClientConsumer createFileConsumer(final File directory, final SimpleString queueName, - final SimpleString filterString) throws HornetQException + final SimpleString filterString) throws ActiveMQException { return null; } @@ -1140,7 +1140,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase public ClientConsumer createFileConsumer(final File directory, final SimpleString queueName, final SimpleString filterString, - final boolean browseOnly) throws HornetQException + final boolean browseOnly) throws ActiveMQException { return null; } @@ -1150,17 +1150,17 @@ public class MessageHeaderTest extends MessageHeaderTestBase final SimpleString filterString, final int windowSize, final int maxRate, - final boolean browseOnly) throws HornetQException + final boolean browseOnly) throws ActiveMQException { return null; } - public ClientConsumer createFileConsumer(final File directory, final String queueName) throws HornetQException + public ClientConsumer createFileConsumer(final File directory, final String queueName) throws ActiveMQException { return null; } - public ClientConsumer createFileConsumer(final File directory, final String queueName, final String filterString) throws HornetQException + public ClientConsumer createFileConsumer(final File directory, final String queueName, final String filterString) throws ActiveMQException { return null; } @@ -1168,7 +1168,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase public ClientConsumer createFileConsumer(final File directory, final String queueName, final String filterString, - final boolean browseOnly) throws HornetQException + final boolean browseOnly) throws ActiveMQException { return null; } @@ -1178,22 +1178,22 @@ public class MessageHeaderTest extends MessageHeaderTestBase final String filterString, final int windowSize, final int maxRate, - final boolean browseOnly) throws HornetQException + final boolean browseOnly) throws ActiveMQException { return null; } - public ClientProducer createProducer() throws HornetQException + public ClientProducer createProducer() throws ActiveMQException { return null; } - public ClientProducer createProducer(final SimpleString address) throws HornetQException + public ClientProducer createProducer(final SimpleString address) throws ActiveMQException { return null; } - public ClientProducer createProducer(final SimpleString address, final int rate) throws HornetQException + public ClientProducer createProducer(final SimpleString address, final int rate) throws ActiveMQException { return null; } @@ -1201,17 +1201,17 @@ public class MessageHeaderTest extends MessageHeaderTestBase public ClientProducer createProducer(final SimpleString address, final int maxRate, final boolean blockOnNonDurableSend, - final boolean blockOnDurableSend) throws HornetQException + final boolean blockOnDurableSend) throws ActiveMQException { return null; } - public ClientProducer createProducer(final String address) throws HornetQException + public ClientProducer createProducer(final String address) throws ActiveMQException { return null; } - public ClientProducer createProducer(final String address, final int rate) throws HornetQException + public ClientProducer createProducer(final String address, final int rate) throws ActiveMQException { return null; } @@ -1219,17 +1219,17 @@ public class MessageHeaderTest extends MessageHeaderTestBase public ClientProducer createProducer(final String address, final int maxRate, final boolean blockOnNonDurableSend, - final boolean blockOnDurableSend) throws HornetQException + final boolean blockOnDurableSend) throws ActiveMQException { return null; } - public QueueQuery queueQuery(final SimpleString queueName) throws HornetQException + public QueueQuery queueQuery(final SimpleString queueName) throws ActiveMQException { return null; } - public AddressQuery addressQuery(final SimpleString address) throws HornetQException + public AddressQuery addressQuery(final SimpleString address) throws ActiveMQException { return null; } @@ -1239,7 +1239,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase return null; } - public void commit() throws HornetQException + public void commit() throws ActiveMQException { } @@ -1249,15 +1249,15 @@ public class MessageHeaderTest extends MessageHeaderTestBase return false; } - public void rollback() throws HornetQException + public void rollback() throws ActiveMQException { } - public void rollback(final boolean considerLastMessageAsDelivered) throws HornetQException + public void rollback(final boolean considerLastMessageAsDelivered) throws ActiveMQException { } - public void close() throws HornetQException + public void close() throws ActiveMQException { } @@ -1305,12 +1305,12 @@ public class MessageHeaderTest extends MessageHeaderTestBase return message; } - public FakeSession start() throws HornetQException + public FakeSession start() throws ActiveMQException { return this; } - public void stop() throws HornetQException + public void stop() throws ActiveMQException { } @@ -1390,7 +1390,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase /* (non-Javadoc) * @see org.apache.activemq.api.core.client.ClientSession#createBuffer(byte[]) */ - public HornetQBuffer createBuffer(final byte[] bytes) + public ActiveMQBuffer createBuffer(final byte[] bytes) { // TODO Auto-generated method stub return null; @@ -1399,7 +1399,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase /* (non-Javadoc) * @see org.apache.activemq.api.core.client.ClientSession#createBuffer(int) */ - public HornetQBuffer createBuffer(final int size) + public ActiveMQBuffer createBuffer(final int size) { // TODO Auto-generated method stub return null; @@ -1421,7 +1421,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase /* (non-Javadoc) * @see org.apache.activemq.api.core.client.ClientSession#createQueue(org.apache.activemq.utils.SimpleString, org.apache.activemq.utils.SimpleString) */ - public void createQueue(SimpleString address, SimpleString queueName) throws HornetQException + public void createQueue(SimpleString address, SimpleString queueName) throws ActiveMQException { // TODO Auto-generated method stub @@ -1439,7 +1439,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase /* (non-Javadoc) * @see org.apache.activemq.api.core.client.ClientSession#addMetaData(java.lang.String, java.lang.String) */ - public void addMetaData(String key, String data) throws HornetQException + public void addMetaData(String key, String data) throws ActiveMQException { // TODO Auto-generated method stub @@ -1448,7 +1448,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase /* (non-Javadoc) * @see org.apache.activemq.api.core.client.ClientSession#addUniqueMetaData(java.lang.String, java.lang.String) */ - public void addUniqueMetaData(String key, String data) throws HornetQException + public void addUniqueMetaData(String key, String data) throws ActiveMQException { // TODO Auto-generated method stub diff --git a/tests/joram-tests/pom.xml b/tests/joram-tests/pom.xml index fee5078e72..8636ffebd4 100644 --- a/tests/joram-tests/pom.xml +++ b/tests/joram-tests/pom.xml @@ -111,7 +111,7 @@ maven-surefire-plugin ${skipJoramTests} - ${hornetq-surefire-argline} + ${activemq-surefire-argline} org/objectweb/** diff --git a/tests/performance-tests/pom.xml b/tests/performance-tests/pom.xml index e96fe420dd..5c66b12784 100644 --- a/tests/performance-tests/pom.xml +++ b/tests/performance-tests/pom.xml @@ -117,7 +117,7 @@ **/*Test.java - ${hornetq-surefire-argline} + ${activemq-surefire-argline} 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 befd1adac2..d17c4a0b93 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 @@ -14,7 +14,7 @@ package org.apache.activemq.tests.performance.paging; import java.util.HashMap; import java.util.concurrent.CountDownLatch; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientProducer; @@ -181,12 +181,12 @@ public class MeasurePagingMultiThreadTest extends ServiceTestBase * @param nMessages * @param messageSize * @param factory - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ private void sendInitialBatch(final SimpleString adr, final int nMessages, final int messageSize, - final ClientSessionFactory factory) throws HornetQException + final ClientSessionFactory factory) throws ActiveMQException { ClientSession session = factory.createSession(false, true, true); ClientProducer producer = session.createProducer(adr); @@ -201,9 +201,9 @@ public class MeasurePagingMultiThreadTest extends ServiceTestBase * @param nMessages * @param producer * @param msg - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - private void sendMessages(final int nMessages, final ClientProducer producer, final ClientMessage msg) throws HornetQException + private void sendMessages(final int nMessages, final ClientProducer producer, final ClientMessage msg) throws ActiveMQException { for (int i = 0; i < nMessages; i++) { @@ -214,9 +214,9 @@ public class MeasurePagingMultiThreadTest extends ServiceTestBase /** * @param factory * @param adr - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - private void createDestination(final ClientSessionFactory factory, final SimpleString adr) throws HornetQException + private void createDestination(final ClientSessionFactory factory, final SimpleString adr) throws ActiveMQException { { ClientSession session = factory.createSession(false, false, false); diff --git a/tests/pom.xml b/tests/pom.xml index 7cbb8d2c0c..598bbc5714 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -30,7 +30,7 @@ maven-surefire-plugin ${skipUnitTests} - ${hornetq-surefire-argline} + ${activemq-surefire-argline} **/ManifestTest.java diff --git a/tests/soak-tests/pom.xml b/tests/soak-tests/pom.xml index 937366b9c8..9742f88c30 100644 --- a/tests/soak-tests/pom.xml +++ b/tests/soak-tests/pom.xml @@ -136,7 +136,7 @@ **/*Test.java - ${hornetq-surefire-argline} + ${activemq-surefire-argline} diff --git a/tests/stress-tests/pom.xml b/tests/stress-tests/pom.xml index 9690f17e22..d9b896f7c9 100644 --- a/tests/stress-tests/pom.xml +++ b/tests/stress-tests/pom.xml @@ -136,7 +136,7 @@ **/*Test.java - ${hornetq-surefire-argline} + ${activemq-surefire-argline} 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 979b4318af..18e4411c6b 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 @@ -104,7 +104,7 @@ public class JournalRestartStressTest extends ServiceTestBase /** * @param sf * @param NMSGS - * @throws HornetQException + * @throws ActiveMQException * @throws InterruptedException * @throws Throwable */ 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 43dfce3321..d1adb294da 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 @@ -19,7 +19,7 @@ import java.util.List; import java.util.concurrent.CountDownLatch; import org.apache.activemq.api.config.HornetQDefaultConfiguration; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -146,7 +146,7 @@ public class NIOMultiThreadCompactorStressTest extends ServiceTestBase /** * @param xid - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ private void addEmptyTransaction(final Xid xid) throws Exception { @@ -264,9 +264,9 @@ public class NIOMultiThreadCompactorStressTest extends ServiceTestBase /** * @param numberOfMessagesExpected * @param queue - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - private void drainQueue(final int numberOfMessagesExpected, final SimpleString queue) throws HornetQException + private void drainQueue(final int numberOfMessagesExpected, final SimpleString queue) throws ActiveMQException { ClientSession sess = sf.createSession(true, true); @@ -292,9 +292,9 @@ public class NIOMultiThreadCompactorStressTest extends ServiceTestBase } /** - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - private void addBogusData(final int nmessages, final String queue) throws HornetQException + private void addBogusData(final int nmessages, final String queue) throws ActiveMQException { ClientSession session = sf.createSession(false, false); try 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 12eeb3ee80..f65d26bf6e 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 @@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.filter.Filter; @@ -422,7 +422,7 @@ public class PageCursorStressTest extends ServiceTestBase // if (i % 100 == 0) System.out.println("read/written " + i); - HornetQBuffer buffer = RandomUtil.randomBuffer(messageSize, i + 1L); + ActiveMQBuffer buffer = RandomUtil.randomBuffer(messageSize, i + 1L); ServerMessage msg = new ServerMessageImpl(i, buffer.writerIndex()); msg.putIntProperty("key", i); @@ -457,7 +457,7 @@ public class PageCursorStressTest extends ServiceTestBase if (i >= NUM_MESSAGES) { - HornetQBuffer buffer = RandomUtil.randomBuffer(messageSize, i + 1L); + ActiveMQBuffer buffer = RandomUtil.randomBuffer(messageSize, i + 1L); ServerMessage msg = new ServerMessageImpl(i, buffer.writerIndex()); msg.putIntProperty("key", i); @@ -489,7 +489,7 @@ public class PageCursorStressTest extends ServiceTestBase if (i >= NUM_MESSAGES * 2 - 1) { - HornetQBuffer buffer = RandomUtil.randomBuffer(messageSize, i + 1L); + ActiveMQBuffer buffer = RandomUtil.randomBuffer(messageSize, i + 1L); ServerMessage msg = new ServerMessageImpl(i, buffer.writerIndex()); msg.putIntProperty("key", i + 1); @@ -585,7 +585,7 @@ public class PageCursorStressTest extends ServiceTestBase for (int i = 0; i < MSGS_TX; i++) { //System.out.println("Sending " + count); - HornetQBuffer buffer = RandomUtil.randomBuffer(messageSize, count); + ActiveMQBuffer buffer = RandomUtil.randomBuffer(messageSize, count); ServerMessage msg = new ServerMessageImpl(i, buffer.writerIndex()); msg.putIntProperty("key", count++); @@ -829,7 +829,7 @@ public class PageCursorStressTest extends ServiceTestBase { if (i % 100 == 0) System.out.println("Paged " + i); - HornetQBuffer buffer = RandomUtil.randomBuffer(messageSize, i + 1L); + ActiveMQBuffer buffer = RandomUtil.randomBuffer(messageSize, i + 1L); ServerMessage msg = new ServerMessageImpl(i, buffer.writerIndex()); msg.putIntProperty("key", i); @@ -953,7 +953,7 @@ public class PageCursorStressTest extends ServiceTestBase for (int i = start; i < start + NUM_MESSAGES; i++) { - HornetQBuffer buffer = RandomUtil.randomBuffer(messageSize, i + 1L); + ActiveMQBuffer buffer = RandomUtil.randomBuffer(messageSize, i + 1L); ServerMessage msg = new ServerMessageImpl(storage.generateID(), buffer.writerIndex()); msg.getBodyBuffer().writeBytes(buffer, 0, buffer.writerIndex()); msg.putIntProperty("key", i); 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 cebc1d8ebb..fcad42d483 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 @@ -14,7 +14,7 @@ package org.apache.activemq.tests.stress.paging; import java.util.HashMap; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientMessage; @@ -239,7 +239,7 @@ public class PageStressTest extends ServiceTestBase } - private int readMessages(final ClientSession session, final ClientConsumer consumer, final SimpleString queue) throws HornetQException + private int readMessages(final ClientSession session, final ClientConsumer consumer, final SimpleString queue) throws ActiveMQException { session.start(); int msgs = 0; 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 105f7f4d0f..7999829694 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 @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.stress.remote; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Before; import org.junit.Test; @@ -18,7 +19,6 @@ import org.junit.Test; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSession; @@ -85,7 +85,7 @@ public class PingStressTest extends ServiceTestBase Interceptor noPongInterceptor = new Interceptor() { - public boolean intercept(final Packet packet, final RemotingConnection conn) throws HornetQException + public boolean intercept(final Packet packet, final RemotingConnection conn) throws ActiveMQException { PingStressTest.log.info("In interceptor, packet is " + packet.getType()); if (packet.getType() == PacketImpl.PING) diff --git a/tests/timing-tests/pom.xml b/tests/timing-tests/pom.xml index 249162580f..70427482c8 100644 --- a/tests/timing-tests/pom.xml +++ b/tests/timing-tests/pom.xml @@ -111,7 +111,7 @@ maven-surefire-plugin ${skipTimingTests} - ${hornetq-surefire-argline} + ${activemq-surefire-argline} diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/tests/timing/util/UTF8Test.java b/tests/timing-tests/src/test/java/org/apache/activemq/tests/timing/util/UTF8Test.java index 66b4ce6988..be534be368 100644 --- a/tests/timing-tests/src/test/java/org/apache/activemq/tests/timing/util/UTF8Test.java +++ b/tests/timing-tests/src/test/java/org/apache/activemq/tests/timing/util/UTF8Test.java @@ -11,14 +11,14 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.timing.util; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.junit.After; import org.junit.Test; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; import org.apache.activemq.tests.util.UnitTestCase; import org.apache.activemq.utils.UTF8Util; @@ -51,7 +51,7 @@ public class UTF8Test extends UnitTestCase @Test public void testWriteUTF() throws Exception { - HornetQBuffer buffer = HornetQBuffers.fixedBuffer(10 * 1024); + ActiveMQBuffer buffer = ActiveMQBuffers.fixedBuffer(10 * 1024); long start = System.currentTimeMillis(); @@ -77,7 +77,7 @@ public class UTF8Test extends UnitTestCase @Test public void testReadUTF() throws Exception { - HornetQBuffer buffer = HornetQBuffers.fixedBuffer(10 * 1024); + ActiveMQBuffer buffer = ActiveMQBuffers.fixedBuffer(10 * 1024); buffer.writeUTF(str); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/asyncio/AIOTestBase.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/asyncio/AIOTestBase.java index cd120df1fb..a3d8902dcc 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/asyncio/AIOTestBase.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/asyncio/AIOTestBase.java @@ -17,7 +17,7 @@ import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.asyncio.AIOCallback; import org.apache.activemq.core.asyncio.impl.AsynchronousFileImpl; import org.apache.activemq.tests.util.UnitTestCase; @@ -71,7 +71,7 @@ public abstract class AIOTestBase extends UnitTestCase } - protected void preAlloc(final AsynchronousFileImpl controller, final long size) throws HornetQException + protected void preAlloc(final AsynchronousFileImpl controller, final long size) throws ActiveMQException { controller.fill(0L, 1, size, (byte)0); } 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 e067708932..336cf12f11 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 @@ -29,7 +29,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.asyncio.AIOCallback; import org.apache.activemq.core.asyncio.BufferCallback; import org.apache.activemq.core.asyncio.impl.AsynchronousFileImpl; @@ -92,7 +92,7 @@ public class AsynchronousFileTest extends AIOTestBase public void setUp() throws Exception { super.setUp(); - pollerExecutor = Executors.newCachedThreadPool(new HornetQThreadFactory("HornetQ-AIO-poller-pool" + System.identityHashCode(this), + pollerExecutor = Executors.newCachedThreadPool(new HornetQThreadFactory("ActiveMQ-AIO-poller-pool" + System.identityHashCode(this), false, this.getClass().getClassLoader())); executor = Executors.newSingleThreadExecutor(); @@ -127,7 +127,7 @@ public class AsynchronousFileTest extends AIOTestBase public void testOpenClose() throws Exception { controller = new AsynchronousFileImpl(executor, pollerExecutor); - for (int i = 0; i < 1000; i++) + for (int i = 0; i < 100; i++) { controller.open(fileName, 10000); controller.close(); @@ -192,7 +192,7 @@ public class AsynchronousFileTest extends AIOTestBase public void testFileNonExistent() throws Exception { controller = new AsynchronousFileImpl(executor, pollerExecutor); - for (int i = 0; i < 1000; i++) + for (int i = 0; i < 100; i++) { try { @@ -415,7 +415,7 @@ public class AsynchronousFileTest extends AIOTestBase Assert.fail("An exception was supposed to be thrown"); } - catch (HornetQException ignored) + catch (ActiveMQException ignored) { System.out.println(ignored); } 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 92c3c5f12d..7eef77d8f7 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 @@ -20,7 +20,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.core.asyncio.AIOCallback; import org.apache.activemq.core.asyncio.impl.AsynchronousFileImpl; import org.apache.activemq.core.journal.impl.AIOSequentialFileFactory; @@ -72,7 +72,7 @@ public class MultiThreadAsynchronousFileTest extends AIOTestBase public void setUp() throws Exception { super.setUp(); - pollerExecutor = Executors.newCachedThreadPool(new HornetQThreadFactory("HornetQ-AIO-poller-pool" + System.identityHashCode(this), + pollerExecutor = Executors.newCachedThreadPool(new HornetQThreadFactory("ActiveMQ-AIO-poller-pool" + System.identityHashCode(this), false, this.getClass().getClassLoader())); executor = Executors.newSingleThreadExecutor(); } @@ -313,7 +313,7 @@ public class MultiThreadAsynchronousFileTest extends AIOTestBase } catch (Exception e) { - callback.onError(HornetQExceptionType.GENERIC_EXCEPTION.getCode(), e.toString()); + callback.onError(ActiveMQExceptionType.GENERIC_EXCEPTION.getCode(), e.toString()); e.printStackTrace(); } } 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 7ad1c8c674..6408259102 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 @@ -26,9 +26,9 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; +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.api.core.client.ClientMessage; import org.apache.activemq.api.core.client.ClientSession; @@ -146,7 +146,7 @@ public class LargeMessageBufferTest extends UnitTestCase { LargeMessageControllerImpl buffer = create15BytesSample(); - HornetQBuffer dstBuffer = HornetQBuffers.fixedBuffer(20); + ActiveMQBuffer dstBuffer = ActiveMQBuffers.fixedBuffer(20); dstBuffer.setIndex(0, 5); @@ -235,7 +235,7 @@ public class LargeMessageBufferTest extends UnitTestCase @Test public void testReadData() throws Exception { - HornetQBuffer dynamic = HornetQBuffers.dynamicBuffer(1); + ActiveMQBuffer dynamic = ActiveMQBuffers.dynamicBuffer(1); String str1 = RandomUtil.randomString(); String str2 = RandomUtil.randomString(); @@ -265,7 +265,7 @@ public class LargeMessageBufferTest extends UnitTestCase { clearDataRecreateServerDirs(); - HornetQBuffer dynamic = HornetQBuffers.dynamicBuffer(1); + ActiveMQBuffer dynamic = ActiveMQBuffers.dynamicBuffer(1); String str1 = RandomUtil.randomString(); String str2 = RandomUtil.randomString(); @@ -564,7 +564,7 @@ public class LargeMessageBufferTest extends UnitTestCase outBuffer.waitCompletion(0); fail("supposed to throw an exception"); } - catch (HornetQException e) + catch (ActiveMQException e) { } @@ -658,7 +658,7 @@ public class LargeMessageBufferTest extends UnitTestCase byteArray[i] = getSamplebyte(i); } - HornetQBuffer splitbuffer = splitBuffer(3, byteArray); + ActiveMQBuffer splitbuffer = splitBuffer(3, byteArray); HornetQBufferInputStream is = new HornetQBufferInputStream(splitbuffer); @@ -779,7 +779,7 @@ public class LargeMessageBufferTest extends UnitTestCase } - public void close() throws HornetQException + public void close() throws ActiveMQException { } @@ -788,7 +788,7 @@ public class LargeMessageBufferTest extends UnitTestCase return null; } - public MessageHandler getMessageHandler() throws HornetQException + public MessageHandler getMessageHandler() throws ActiveMQException { return null; } @@ -798,40 +798,40 @@ public class LargeMessageBufferTest extends UnitTestCase return false; } - public ClientMessage receive() throws HornetQException + public ClientMessage receive() throws ActiveMQException { return null; } - public ClientMessage receive(final long timeout) throws HornetQException + public ClientMessage receive(final long timeout) throws ActiveMQException { return null; } - public ClientMessage receiveImmediate() throws HornetQException + public ClientMessage receiveImmediate() throws ActiveMQException { return null; } - public FakeConsumerInternal setMessageHandler(final MessageHandler handler) throws HornetQException + public FakeConsumerInternal setMessageHandler(final MessageHandler handler) throws ActiveMQException { return this; } - public void acknowledge(final ClientMessage message) throws HornetQException + public void acknowledge(final ClientMessage message) throws ActiveMQException { } @Override - public void individualAcknowledge(ClientMessage message) throws HornetQException + public void individualAcknowledge(ClientMessage message) throws ActiveMQException { } - public void cleanUp() throws HornetQException + public void cleanUp() throws ActiveMQException { } - public void clear(boolean waitForOnMessage) throws HornetQException + public void clear(boolean waitForOnMessage) throws ActiveMQException { } @@ -839,11 +839,11 @@ public class LargeMessageBufferTest extends UnitTestCase { } - public void flowControl(final int messageBytes, final boolean discountSlowConsumer) throws HornetQException + public void flowControl(final int messageBytes, final boolean discountSlowConsumer) throws ActiveMQException { } - public void flushAcks() throws HornetQException + public void flushAcks() throws ActiveMQException { } @@ -904,13 +904,13 @@ public class LargeMessageBufferTest extends UnitTestCase } - public void stop() throws HornetQException + public void stop() throws ActiveMQException { } - public void stop(boolean waitForOnMessage) throws HornetQException + public void stop(boolean waitForOnMessage) throws ActiveMQException { } @@ -931,7 +931,7 @@ public class LargeMessageBufferTest extends UnitTestCase /* (non-Javadoc) * @see org.apache.activemq.core.client.impl.ClientConsumerInternal#prepareForClose() */ - public Thread prepareForClose(FutureLatch future) throws HornetQException + public Thread prepareForClose(FutureLatch future) throws ActiveMQException { return null; } 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 b031704e23..32b5d341c2 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 @@ -15,8 +15,8 @@ package org.apache.activemq.tests.unit.core.journal.impl; import java.nio.ByteBuffer; import java.util.List; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQIOErrorException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQIOErrorException; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.RecordInfo; import org.apache.activemq.core.journal.SequentialFile; @@ -252,11 +252,11 @@ public abstract class JournalImplTestUnit extends JournalImplTestBase { load(); } - catch (HornetQIOErrorException ioe) + catch (ActiveMQIOErrorException ioe) { exceptionHappened = true; } - catch (HornetQException e) + catch (ActiveMQException e) { fail("invalid exception type:" + e.getType()); } 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 f790051f5a..c54e9b0fbb 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 @@ -11,6 +11,8 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.unit.core.journal.impl; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.junit.Before; import org.junit.After; @@ -24,8 +26,6 @@ import java.util.UUID; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; import org.apache.activemq.core.asyncio.impl.AsynchronousFileImpl; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.journal.SequentialFileFactory; @@ -225,15 +225,15 @@ public abstract class SequentialFileFactoryTestBase extends UnitTestCase String s1 = "aardvark"; byte[] bytes1 = s1.getBytes(StandardCharsets.UTF_8); - HornetQBuffer bb1 = wrapBuffer(bytes1); + ActiveMQBuffer bb1 = wrapBuffer(bytes1); String s2 = "hippopotamus"; byte[] bytes2 = s2.getBytes(StandardCharsets.UTF_8); - HornetQBuffer bb2 = wrapBuffer(bytes2); + ActiveMQBuffer bb2 = wrapBuffer(bytes2); String s3 = "echidna"; byte[] bytes3 = s3.getBytes(StandardCharsets.UTF_8); - HornetQBuffer bb3 = wrapBuffer(bytes3); + ActiveMQBuffer bb3 = wrapBuffer(bytes3); long initialPos = sf.position(); sf.write(bb1, true); @@ -410,9 +410,9 @@ public abstract class SequentialFileFactoryTestBase extends UnitTestCase // Private --------------------------------- - private HornetQBuffer wrapBuffer(final byte[] bytes) + private ActiveMQBuffer wrapBuffer(final byte[] bytes) { - return HornetQBuffers.wrappedBuffer(bytes); + return ActiveMQBuffers.wrappedBuffer(bytes); } protected void checkFill(final SequentialFile file, final int pos, final int size, final byte fillChar) throws Exception diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/TimedBufferTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/TimedBufferTest.java index d7301b7cdc..7a065f33b1 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/TimedBufferTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/TimedBufferTest.java @@ -12,6 +12,8 @@ */ package org.apache.activemq.tests.unit.core.journal.impl; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.junit.Test; import java.nio.ByteBuffer; @@ -23,8 +25,6 @@ import java.util.concurrent.atomic.AtomicInteger; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.journal.impl.TimedBuffer; import org.apache.activemq.core.journal.impl.TimedBufferObserver; @@ -110,7 +110,7 @@ public class TimedBufferTest extends UnitTestCase bytes[j] = UnitTestCase.getSamplebyte(x++); } - HornetQBuffer buff = HornetQBuffers.wrappedBuffer(bytes); + ActiveMQBuffer buff = ActiveMQBuffers.wrappedBuffer(bytes); timedBuffer.checkSize(10); timedBuffer.addBytes(buff, false, dummyCallback); @@ -184,7 +184,7 @@ public class TimedBufferTest extends UnitTestCase bytes[j] = UnitTestCase.getSamplebyte(x++); } - HornetQBuffer buff = HornetQBuffers.wrappedBuffer(bytes); + ActiveMQBuffer buff = ActiveMQBuffers.wrappedBuffer(bytes); timedBuffer.checkSize(10); timedBuffer.addBytes(buff, false, dummyCallback); @@ -199,7 +199,7 @@ public class TimedBufferTest extends UnitTestCase bytes[j] = UnitTestCase.getSamplebyte(x++); } - buff = HornetQBuffers.wrappedBuffer(bytes); + buff = ActiveMQBuffers.wrappedBuffer(bytes); timedBuffer.checkSize(10); timedBuffer.addBytes(buff, true, dummyCallback); @@ -297,7 +297,7 @@ public class TimedBufferTest extends UnitTestCase bytes[j] = UnitTestCase.getSamplebyte(x++); } - HornetQBuffer buff = HornetQBuffers.wrappedBuffer(bytes); + ActiveMQBuffer buff = ActiveMQBuffers.wrappedBuffer(bytes); timedBuffer.checkSize(10); timedBuffer.addBytes(buff, true, dummyCallback); @@ -384,7 +384,7 @@ public class TimedBufferTest extends UnitTestCase bytes[j] = UnitTestCase.getSamplebyte(x++); } - HornetQBuffer buff = HornetQBuffers.wrappedBuffer(bytes); + ActiveMQBuffer buff = ActiveMQBuffers.wrappedBuffer(bytes); timedBuffer.checkSize(10); timedBuffer.addBytes(buff, true, dummyCallback); 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 0b992caae4..276b0a632e 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 @@ -20,9 +20,9 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.core.asyncio.BufferCallback; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.IOAsyncTask; @@ -251,7 +251,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory if (sendError) { - callback.onError(HornetQExceptionType.UNSUPPORTED_PACKET.getCode(), "Fake aio error"); + callback.onError(ActiveMQExceptionType.UNSUPPORTED_PACKET.getCode(), "Fake aio error"); } else { @@ -271,7 +271,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory catch (Throwable e) { e.printStackTrace(); - callback.onError(HornetQExceptionType.GENERIC_EXCEPTION.getCode(), e.getMessage()); + callback.onError(ActiveMQExceptionType.GENERIC_EXCEPTION.getCode(), e.getMessage()); } } } @@ -603,7 +603,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) */ - public void write(final HornetQBuffer bytes, final boolean sync, final IOAsyncTask callback) throws Exception + public void write(final ActiveMQBuffer bytes, final boolean sync, final IOAsyncTask callback) throws Exception { bytes.writerIndex(bytes.capacity()); bytes.readerIndex(0); @@ -614,7 +614,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory /* (non-Javadoc) * @see org.apache.activemq.core.journal.SequentialFile#write(org.apache.activemq.spi.core.remoting.HornetQBuffer, boolean) */ - public void write(final HornetQBuffer bytes, final boolean sync) throws Exception + public void write(final ActiveMQBuffer bytes, final boolean sync) throws Exception { bytes.writerIndex(bytes.capacity()); bytes.readerIndex(0); @@ -627,7 +627,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory public void write(final EncodingSupport bytes, final boolean sync, final IOAsyncTask callback) throws Exception { ByteBuffer buffer = newBuffer(bytes.getEncodeSize()); - HornetQBuffer outbuffer = HornetQBuffers.wrappedBuffer(buffer); + ActiveMQBuffer outbuffer = ActiveMQBuffers.wrappedBuffer(buffer); bytes.encode(outbuffer); write(outbuffer, sync, callback); } @@ -638,7 +638,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory public void write(final EncodingSupport bytes, final boolean sync) throws Exception { ByteBuffer buffer = newBuffer(bytes.getEncodeSize()); - HornetQBuffer outbuffer = HornetQBuffers.wrappedBuffer(buffer); + ActiveMQBuffer outbuffer = ActiveMQBuffers.wrappedBuffer(buffer); bytes.encode(outbuffer); write(outbuffer, sync); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/fakes/SimpleEncoding.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/fakes/SimpleEncoding.java index 6d44a9eb65..95db73338a 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/fakes/SimpleEncoding.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/journal/impl/fakes/SimpleEncoding.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.tests.unit.core.journal.impl.fakes; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; /** @@ -41,13 +41,13 @@ public class SimpleEncoding implements EncodingSupport } // Public -------------------------------------------------------- - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { throw new UnsupportedOperationException(); } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { for (int i = 0; i < size; i++) { diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/message/impl/MessageImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/message/impl/MessageImplTest.java index 0373445f0b..4537f83754 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/message/impl/MessageImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/message/impl/MessageImplTest.java @@ -16,7 +16,7 @@ import java.util.ArrayList; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.client.impl.ClientMessageImpl; @@ -311,7 +311,7 @@ public class MessageImplTest extends UnitTestCase try { SessionSendMessage ssm = new SessionSendMessage(msg); - HornetQBuffer buf = ssm.encode(null); + ActiveMQBuffer buf = ssm.encode(null); simulateRead(buf); } catch (Throwable e) @@ -353,7 +353,7 @@ public class MessageImplTest extends UnitTestCase } - private void simulateRead(HornetQBuffer buf) + private void simulateRead(ActiveMQBuffer buf) { buf.setIndex(buf.capacity() / 2, buf.capacity() / 2); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/paging/impl/PageTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/paging/impl/PageTest.java index 86f0998235..ebe6a0e07a 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/paging/impl/PageTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/paging/impl/PageTest.java @@ -16,7 +16,7 @@ import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.journal.SequentialFileFactory; @@ -94,7 +94,7 @@ public class PageTest extends UnitTestCase SimpleString simpleDestination = new SimpleString("Test"); - ArrayList buffers = addPageElements(simpleDestination, impl, numberOfElements); + ArrayList buffers = addPageElements(simpleDestination, impl, numberOfElements); impl.sync(); impl.close(); @@ -141,7 +141,7 @@ public class PageTest extends UnitTestCase SimpleString simpleDestination = new SimpleString("Test"); - ArrayList buffers = addPageElements(simpleDestination, impl, numberOfElements); + ArrayList buffers = addPageElements(simpleDestination, impl, numberOfElements); impl.sync(); @@ -207,11 +207,11 @@ public class PageTest extends UnitTestCase * @return * @throws Exception */ - protected ArrayList addPageElements(final SimpleString simpleDestination, + protected ArrayList addPageElements(final SimpleString simpleDestination, final Page page, final int numberOfElements) throws Exception { - ArrayList buffers = new ArrayList(); + ArrayList buffers = new ArrayList(); int initialNumberOfMessages = page.getNumberOfMessages(); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/paging/impl/PagingStoreImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/paging/impl/PagingStoreImplTest.java index ca272f3a00..563b15909c 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/paging/impl/PagingStoreImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/paging/impl/PagingStoreImplTest.java @@ -26,8 +26,8 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.journal.SequentialFile; import org.apache.activemq.core.journal.SequentialFileFactory; @@ -89,7 +89,7 @@ public class PagingStoreImplTest extends UnitTestCase Assert.assertEquals(nr1, trans.getNumberOfMessages()); - HornetQBuffer buffer = HornetQBuffers.fixedBuffer(trans.getEncodeSize()); + ActiveMQBuffer buffer = ActiveMQBuffers.fixedBuffer(trans.getEncodeSize()); trans.encode(buffer); @@ -156,9 +156,9 @@ public class PagingStoreImplTest extends UnitTestCase Assert.assertEquals(1, storeImpl.getNumberOfPages()); - List buffers = new ArrayList(); + List buffers = new ArrayList(); - HornetQBuffer buffer = createRandomBuffer(0, 10); + ActiveMQBuffer buffer = createRandomBuffer(0, 10); buffers.add(buffer); SimpleString destination = new SimpleString("test"); @@ -208,14 +208,14 @@ public class PagingStoreImplTest extends UnitTestCase storeImpl.startPaging(); - List buffers = new ArrayList(); + List buffers = new ArrayList(); int numMessages = 10; for (int i = 0; i < numMessages; i++) { - HornetQBuffer buffer = createRandomBuffer(i + 1L, 10); + ActiveMQBuffer buffer = createRandomBuffer(i + 1L, 10); buffers.add(buffer); @@ -247,8 +247,8 @@ public class PagingStoreImplTest extends UnitTestCase for (int i = 0; i < numMessages; i++) { - HornetQBuffer horn1 = buffers.get(i); - HornetQBuffer horn2 = msg.get(i).getMessage().getBodyBuffer(); + ActiveMQBuffer horn1 = buffers.get(i); + ActiveMQBuffer horn2 = msg.get(i).getMessage().getBodyBuffer(); horn1.resetReaderIndex(); horn2.resetReaderIndex(); for (int j = 0; j < horn1.writerIndex(); j++) @@ -283,12 +283,12 @@ public class PagingStoreImplTest extends UnitTestCase Assert.assertEquals(1, store.getNumberOfPages()); - List buffers = new ArrayList(); + List buffers = new ArrayList(); for (int i = 0; i < 10; i++) { - HornetQBuffer buffer = createRandomBuffer(i + 1L, 10); + ActiveMQBuffer buffer = createRandomBuffer(i + 1L, 10); buffers.add(buffer); @@ -856,7 +856,7 @@ public class PagingStoreImplTest extends UnitTestCase } private ServerMessage createMessage(final long id, final PagingStore store, final SimpleString destination, - final HornetQBuffer buffer) + final ActiveMQBuffer buffer) { ServerMessage msg = new ServerMessageImpl(id, 50 + buffer.capacity()); @@ -872,7 +872,7 @@ public class PagingStoreImplTest extends UnitTestCase return msg; } - protected HornetQBuffer createRandomBuffer(final long id, final int size) + protected ActiveMQBuffer createRandomBuffer(final long id, final int size) { return RandomUtil.randomBuffer(size, id); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/persistence/impl/BatchIDGeneratorUnitTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/persistence/impl/BatchIDGeneratorUnitTest.java index 5c70c513db..7f8fffcb7d 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/persistence/impl/BatchIDGeneratorUnitTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/persistence/impl/BatchIDGeneratorUnitTest.java @@ -13,8 +13,8 @@ package org.apache.activemq.tests.unit.core.persistence.impl; import java.util.ArrayList; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.core.journal.Journal; import org.apache.activemq.core.journal.PreparedTransactionInfo; import org.apache.activemq.core.journal.RecordInfo; @@ -137,7 +137,7 @@ public class BatchIDGeneratorUnitTest extends UnitTestCase { if (record.userRecordType == JournalRecordIds.ID_COUNTER_RECORD) { - HornetQBuffer buffer = HornetQBuffers.wrappedBuffer(record.data); + ActiveMQBuffer buffer = ActiveMQBuffers.wrappedBuffer(record.data); batch.loadState(record.id, buffer); } } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/persistence/impl/OperationContextUnitTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/persistence/impl/OperationContextUnitTest.java index d30c267896..1cb35b6f8c 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/persistence/impl/OperationContextUnitTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/persistence/impl/OperationContextUnitTest.java @@ -18,7 +18,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.persistence.impl.journal.OperationContextImpl; import org.apache.activemq.tests.util.UnitTestCase; @@ -203,7 +203,7 @@ public class OperationContextUnitTest extends UnitTestCase // We use a latch instead of forcing a sleep here Assert.assertTrue(latch.await(5, TimeUnit.SECONDS)); - context.onError(HornetQExceptionType.UNSUPPORTED_PACKET.getCode(), "Poop happens!"); + context.onError(ActiveMQExceptionType.UNSUPPORTED_PACKET.getCode(), "Poop happens!"); t.join(); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/postoffice/impl/BindingsImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/postoffice/impl/BindingsImplTest.java index ec9d7801a6..af3d26d5be 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/postoffice/impl/BindingsImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/postoffice/impl/BindingsImplTest.java @@ -12,6 +12,7 @@ */ package org.apache.activemq.tests.unit.core.postoffice.impl; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.server.impl.RefsOperation; import org.junit.Test; @@ -21,7 +22,6 @@ import java.util.Set; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.filter.Filter; import org.apache.activemq.core.postoffice.Binding; @@ -178,7 +178,7 @@ public class BindingsImplTest extends UnitTestCase return null; } - public void markAsRollbackOnly(final HornetQException exception) + public void markAsRollbackOnly(final ActiveMQException exception) { } 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/HornetQBufferTestBase.java index 65ab1e9616..e7258ba158 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/HornetQBufferTestBase.java @@ -11,6 +11,7 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.unit.core.remoting; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.junit.Before; import org.junit.After; @@ -18,7 +19,6 @@ import org.junit.Test; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.UnitTestCase; @@ -39,7 +39,7 @@ public abstract class HornetQBufferTestBase extends UnitTestCase // Public -------------------------------------------------------- - private HornetQBuffer wrapper; + private ActiveMQBuffer wrapper; @Override @Before @@ -59,7 +59,7 @@ public abstract class HornetQBufferTestBase extends UnitTestCase super.tearDown(); } - protected abstract HornetQBuffer createBuffer(); + protected abstract ActiveMQBuffer createBuffer(); @Test public void testNullString() throws Exception 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 852d6a3cb1..c0408e4cce 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 @@ -12,8 +12,8 @@ */ package org.apache.activemq.tests.unit.core.remoting.impl.netty; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.tests.unit.core.remoting.HornetQBufferTestBase; /** @@ -39,9 +39,9 @@ public class ChannelBufferWrapper2Test extends HornetQBufferTestBase // BufferWrapperBase overrides ----------------------------------- @Override - protected HornetQBuffer createBuffer() + protected ActiveMQBuffer createBuffer() { - return HornetQBuffers.dynamicBuffer(512); + return ActiveMQBuffers.dynamicBuffer(512); } // Package protected --------------------------------------------- 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 5f62f26cdb..b9df0a7911 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 @@ -17,8 +17,8 @@ import java.util.Map; import java.util.concurrent.Executors; import org.apache.activemq.api.config.HornetQDefaultConfiguration; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +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; @@ -46,7 +46,7 @@ public class NettyAcceptorFactoryTest extends UnitTestCase BufferHandler handler = new BufferHandler() { - public void bufferReceived(final Object connectionID, final HornetQBuffer buffer) + public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -54,7 +54,7 @@ public class NettyAcceptorFactoryTest extends UnitTestCase ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { - public void connectionException(final Object connectionID, final HornetQException me) + public void connectionException(final Object connectionID, final ActiveMQException me) { } 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 0633820dbc..0b3214e7d3 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 @@ -19,8 +19,8 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import org.apache.activemq.api.config.HornetQDefaultConfiguration; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +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; @@ -73,7 +73,7 @@ public class NettyAcceptorTest extends UnitTestCase BufferHandler handler = new BufferHandler() { - public void bufferReceived(final Object connectionID, final HornetQBuffer buffer) + public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -82,7 +82,7 @@ public class NettyAcceptorTest extends UnitTestCase ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { - public void connectionException(final Object connectionID, final HornetQException me) + public void connectionException(final Object connectionID, final ActiveMQException me) { } 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 a221f3b6d8..cdcd09216a 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 @@ -19,9 +19,9 @@ import java.util.Map; import io.netty.channel.Channel; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.channel.embedded.EmbeddedChannel; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; +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.spi.core.remoting.Connection; @@ -51,7 +51,7 @@ public class NettyConnectionTest extends UnitTestCase @Test public void testWrite() throws Exception { - HornetQBuffer buff = HornetQBuffers.wrappedBuffer(ByteBuffer.allocate(128)); + ActiveMQBuffer buff = ActiveMQBuffers.wrappedBuffer(ByteBuffer.allocate(128)); EmbeddedChannel channel = createChannel(); Assert.assertEquals(0, channel.outboundMessages().size()); @@ -70,7 +70,7 @@ public class NettyConnectionTest extends UnitTestCase final int size = 1234; - HornetQBuffer buff = conn.createBuffer(size); + ActiveMQBuffer buff = conn.createBuffer(size); buff.writeByte((byte) 0x00); // Netty buffer does lazy initialization. Assert.assertEquals(size, buff.capacity()); @@ -94,7 +94,7 @@ public class NettyConnectionTest extends UnitTestCase } - public void connectionException(final Object connectionID, final HornetQException me) + public void connectionException(final Object connectionID, final ActiveMQException me) { } 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 7d24a02f90..13c00ee4ea 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 @@ -12,6 +12,8 @@ */ package org.apache.activemq.tests.unit.core.remoting.impl.netty; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; import org.junit.Test; import java.util.HashMap; @@ -20,8 +22,6 @@ import java.util.concurrent.Executors; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; 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; @@ -41,14 +41,14 @@ public class NettyConnectorTest extends UnitTestCase { BufferHandler handler = new BufferHandler() { - public void bufferReceived(final Object connectionID, final HornetQBuffer buffer) + public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; Map params = new HashMap(); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { - public void connectionException(final Object connectionID, final HornetQException me) + public void connectionException(final Object connectionID, final ActiveMQException me) { } @@ -82,14 +82,14 @@ public class NettyConnectorTest extends UnitTestCase { BufferHandler handler = new BufferHandler() { - public void bufferReceived(final Object connectionID, final HornetQBuffer buffer) + public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; Map params = new HashMap(); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { - public void connectionException(final Object connectionID, final HornetQException me) + public void connectionException(final Object connectionID, final ActiveMQException me) { } @@ -143,7 +143,7 @@ public class NettyConnectorTest extends UnitTestCase { BufferHandler handler = new BufferHandler() { - public void bufferReceived(final Object connectionID, final HornetQBuffer buffer) + public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -155,7 +155,7 @@ public class NettyConnectorTest extends UnitTestCase params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "bad password"); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { - public void connectionException(final Object connectionID, final HornetQException me) + public void connectionException(final Object connectionID, final ActiveMQException me) { } @@ -194,7 +194,7 @@ public class NettyConnectorTest extends UnitTestCase { BufferHandler handler = new BufferHandler() { - public void bufferReceived(final Object connectionID, final HornetQBuffer buffer) + public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -206,7 +206,7 @@ public class NettyConnectorTest extends UnitTestCase params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "bad password"); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { - public void connectionException(final Object connectionID, final HornetQException me) + public void connectionException(final Object connectionID, final ActiveMQException me) { } @@ -252,7 +252,7 @@ public class NettyConnectorTest extends UnitTestCase { BufferHandler handler = new BufferHandler() { - public void bufferReceived(final Object connectionID, final HornetQBuffer buffer) + public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -261,7 +261,7 @@ public class NettyConnectorTest extends UnitTestCase params.put(TransportConstants.ENABLED_CIPHER_SUITES_PROP_NAME, "myBadCipherSuite"); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { - public void connectionException(final Object connectionID, final HornetQException me) + public void connectionException(final Object connectionID, final ActiveMQException me) { } @@ -297,7 +297,7 @@ public class NettyConnectorTest extends UnitTestCase { BufferHandler handler = new BufferHandler() { - public void bufferReceived(final Object connectionID, final HornetQBuffer buffer) + public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -306,7 +306,7 @@ public class NettyConnectorTest extends UnitTestCase params.put(TransportConstants.ENABLED_PROTOCOLS_PROP_NAME, "myBadProtocol"); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { - public void connectionException(final Object connectionID, final HornetQException me) + public void connectionException(final Object connectionID, final ActiveMQException me) { } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/server/impl/fake/FakeInterceptor.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/server/impl/fake/FakeInterceptor.java index 2ecb401992..d0b2603a4c 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/server/impl/fake/FakeInterceptor.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/remoting/server/impl/fake/FakeInterceptor.java @@ -13,7 +13,7 @@ package org.apache.activemq.tests.unit.core.remoting.server.impl.fake; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.spi.core.protocol.RemotingConnection; @@ -26,7 +26,7 @@ public class FakeInterceptor implements Interceptor { @Override - public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException + public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { return false; } 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 32c375d2e6..d853fc4dc3 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 @@ -12,9 +12,9 @@ */ package org.apache.activemq.tests.unit.jms.client; -import static org.apache.activemq.api.core.HornetQExceptionType.CONNECTION_TIMEDOUT; -import static org.apache.activemq.api.core.HornetQExceptionType.GENERIC_EXCEPTION; -import static org.apache.activemq.api.core.HornetQExceptionType.INVALID_FILTER_EXPRESSION; +import static org.apache.activemq.api.core.ActiveMQExceptionType.CONNECTION_TIMEDOUT; +import static org.apache.activemq.api.core.ActiveMQExceptionType.GENERIC_EXCEPTION; +import static org.apache.activemq.api.core.ActiveMQExceptionType.INVALID_FILTER_EXPRESSION; import javax.jms.IllegalStateException; import javax.jms.InvalidDestinationException; @@ -22,8 +22,8 @@ import javax.jms.InvalidSelectorException; import javax.jms.JMSException; import javax.jms.JMSSecurityException; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.jms.client.JMSExceptionHelper; import org.apache.activemq.tests.util.UnitTestCase; import org.junit.Assert; @@ -55,13 +55,13 @@ public class JMSExceptionHelperTest extends UnitTestCase @Test public void testILLEGAL_STATE() throws Exception { - doConvertException(HornetQExceptionType.ILLEGAL_STATE, IllegalStateException.class); + doConvertException(ActiveMQExceptionType.ILLEGAL_STATE, IllegalStateException.class); } @Test public void testINTERNAL_ERROR() throws Exception { - doConvertException(HornetQExceptionType.INTERNAL_ERROR, JMSException.class); + doConvertException(ActiveMQExceptionType.INTERNAL_ERROR, JMSException.class); } @Test @@ -73,37 +73,37 @@ public class JMSExceptionHelperTest extends UnitTestCase @Test public void testNOT_CONNECTED() throws Exception { - doConvertException(HornetQExceptionType.NOT_CONNECTED, JMSException.class); + doConvertException(ActiveMQExceptionType.NOT_CONNECTED, JMSException.class); } @Test public void testOBJECT_CLOSED() throws Exception { - doConvertException(HornetQExceptionType.OBJECT_CLOSED, IllegalStateException.class); + doConvertException(ActiveMQExceptionType.OBJECT_CLOSED, IllegalStateException.class); } @Test public void testQUEUE_DOES_NOT_EXIST() throws Exception { - doConvertException(HornetQExceptionType.QUEUE_DOES_NOT_EXIST, InvalidDestinationException.class); + doConvertException(ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST, InvalidDestinationException.class); } @Test public void testQUEUE_EXISTS() throws Exception { - doConvertException(HornetQExceptionType.QUEUE_EXISTS, InvalidDestinationException.class); + doConvertException(ActiveMQExceptionType.QUEUE_EXISTS, InvalidDestinationException.class); } @Test public void testSECURITY_EXCEPTION() throws Exception { - doConvertException(HornetQExceptionType.SECURITY_EXCEPTION, JMSSecurityException.class); + doConvertException(ActiveMQExceptionType.SECURITY_EXCEPTION, JMSSecurityException.class); } @Test public void testUNSUPPORTED_PACKET() throws Exception { - doConvertException(HornetQExceptionType.UNSUPPORTED_PACKET, IllegalStateException.class); + doConvertException(ActiveMQExceptionType.UNSUPPORTED_PACKET, IllegalStateException.class); } @Test @@ -112,10 +112,10 @@ public class JMSExceptionHelperTest extends UnitTestCase doConvertException(GENERIC_EXCEPTION, JMSException.class); } - private void doConvertException(final HornetQExceptionType errorCode, + private void doConvertException(final ActiveMQExceptionType errorCode, final Class expectedException) { - HornetQException me = new HornetQException(errorCode); + ActiveMQException me = new ActiveMQException(errorCode); Exception e = JMSExceptionHelper.convertFromHornetQException(me); Assert.assertNotNull(e); Assert.assertTrue(e.getClass().isAssignableFrom(expectedException)); 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/HornetQBufferInputStreamTest.java index 10c800d6de..fea11b0819 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/HornetQBufferInputStreamTest.java @@ -12,8 +12,8 @@ */ package org.apache.activemq.tests.unit.util; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +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.junit.Test; @@ -35,7 +35,7 @@ public class HornetQBufferInputStreamTest extends UnitTestCase bytes[i] = getSamplebyte(i); } - HornetQBuffer buffer = HornetQBuffers.wrappedBuffer(bytes); + ActiveMQBuffer buffer = ActiveMQBuffers.wrappedBuffer(bytes); HornetQBufferInputStream is = new HornetQBufferInputStream(buffer); // First read byte per byte diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/UTF8Test.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/UTF8Test.java index 5724762d08..85af592aee 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/UTF8Test.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/UTF8Test.java @@ -11,6 +11,8 @@ * permissions and limitations under the License. */ package org.apache.activemq.tests.unit.util; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.junit.After; import org.junit.Test; @@ -23,8 +25,6 @@ import java.nio.ByteBuffer; import org.junit.Assert; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; import org.apache.activemq.tests.util.RandomUtil; import org.apache.activemq.tests.util.UnitTestCase; import org.apache.activemq.utils.DataConstants; @@ -46,7 +46,7 @@ public class UTF8Test extends UnitTestCase @Test public void testValidateUTF() throws Exception { - HornetQBuffer buffer = HornetQBuffers.fixedBuffer(60 * 1024); + ActiveMQBuffer buffer = ActiveMQBuffers.fixedBuffer(60 * 1024); byte[] bytes = new byte[20000]; @@ -78,16 +78,16 @@ public class UTF8Test extends UnitTestCase // The maximum size the encoded UTF string would reach is str.length * 3 (look at the UTF8 implementation) testValidateUTFOnDataInputStream(str, - HornetQBuffers.wrappedBuffer(ByteBuffer.allocate(str.length() * 3 + - DataConstants.SIZE_SHORT))); + ActiveMQBuffers.wrappedBuffer(ByteBuffer.allocate(str.length() * 3 + + DataConstants.SIZE_SHORT))); - testValidateUTFOnDataInputStream(str, HornetQBuffers.dynamicBuffer(100)); + testValidateUTFOnDataInputStream(str, ActiveMQBuffers.dynamicBuffer(100)); - testValidateUTFOnDataInputStream(str, HornetQBuffers.fixedBuffer(100 * 1024)); + testValidateUTFOnDataInputStream(str, ActiveMQBuffers.fixedBuffer(100 * 1024)); } } - private void testValidateUTFOnDataInputStream(final String str, final HornetQBuffer wrap) throws Exception + private void testValidateUTFOnDataInputStream(final String str, final ActiveMQBuffer wrap) throws Exception { UTF8Util.saveUTF(wrap, str); @@ -102,7 +102,7 @@ public class UTF8Test extends UnitTestCase outData.writeUTF(str); - HornetQBuffer buffer = HornetQBuffers.wrappedBuffer(byteOut.toByteArray()); + ActiveMQBuffer buffer = ActiveMQBuffers.wrappedBuffer(byteOut.toByteArray()); newStr = UTF8Util.readUTF(buffer); @@ -122,7 +122,7 @@ public class UTF8Test extends UnitTestCase String str = new String(chars); - HornetQBuffer buffer = HornetQBuffers.fixedBuffer(0xffff + 4); + ActiveMQBuffer buffer = ActiveMQBuffers.fixedBuffer(0xffff + 4); try {