From 8bf987b134bd827b93ed8157b323bc3bd2d8a82e Mon Sep 17 00:00:00 2001 From: Bosanac Dejan Date: Thu, 10 Feb 2011 14:24:01 +0000 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-3177 - use slf4j instead of jcl git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1069405 13f79535-47bb-0310-9956-ffa450edef68 --- activemq-all/pom.xml | 2 +- activemq-camel/pom.xml | 9 +- .../camel/component/CamelEndpointLoader.java | 6 +- .../camel/component/JournalEndpoint.java | 6 +- .../apache/activemq/camel/AMQ2611Test.java | 6 +- .../apache/activemq/camel/CamelJmsTest.java | 8 +- .../activemq/camel/CamelRedeliveryTest.java | 8 +- .../camel/CamelVMTransportRoutingTest.java | 6 +- .../apache/activemq/camel/JmsJdbcXATest.java | 6 +- .../apache/activemq/camel/SetHeaderTest.java | 8 +- .../component/ActiveMQJmsHeaderRouteTest.java | 8 +- ...tiveMQReplyToHeaderUsingConverterTest.java | 8 +- .../AutoExposeQueuesInCamelTest.java | 8 +- ...RequestReplyUsingJmsReplyToHeaderTest.java | 8 +- .../org/apache/activemq/simple/Producer.java | 6 +- activemq-core/pom.xml | 13 +- .../apache/activemq/ActiveMQConnection.java | 6 +- .../activemq/ActiveMQMessageConsumer.java | 6 +- .../activemq/ActiveMQPrefetchPolicy.java | 6 +- .../org/apache/activemq/ActiveMQSession.java | 6 +- .../activemq/ActiveMQSessionExecutor.java | 6 +- .../org/apache/activemq/AdvisoryConsumer.java | 6 +- .../apache/activemq/TransactionContext.java | 6 +- .../activemq/advisory/AdvisoryBroker.java | 6 +- .../advisory/ConsumerEventSource.java | 6 +- .../activemq/advisory/DestinationSource.java | 8 +- .../advisory/ProducerEventSource.java | 6 +- .../activemq/broker/BrokerPluginSupport.java | 6 +- .../activemq/broker/BrokerRegistry.java | 6 +- .../apache/activemq/broker/BrokerService.java | 10 +- .../broker/ProducerBrokerExchange.java | 6 +- .../activemq/broker/TransactionBroker.java | 6 +- .../activemq/broker/TransportConnection.java | 10 +- .../activemq/broker/TransportConnector.java | 6 +- .../broker/TransportStatusDetector.java | 6 +- .../broker/cluster/ConnectionSplitBroker.java | 6 +- .../activemq/broker/ft/MasterBroker.java | 6 +- .../activemq/broker/ft/MasterConnector.java | 6 +- .../jmx/AbortSlowConsumerStrategyView.java | 6 +- .../activemq/broker/jmx/AnnotatedMBean.java | 6 +- .../activemq/broker/jmx/DestinationView.java | 6 +- .../broker/jmx/ManagedRegionBroker.java | 6 +- .../jmx/ManagedTransportConnection.java | 6 +- .../broker/jmx/ManagementContext.java | 6 +- .../broker/region/AbstractRegion.java | 6 +- .../broker/region/AbstractSubscription.java | 6 +- .../broker/region/AbstractTempRegion.java | 6 +- .../broker/region/BaseDestination.java | 4 +- .../region/DurableTopicSubscription.java | 6 +- .../broker/region/PrefetchSubscription.java | 6 +- .../apache/activemq/broker/region/Queue.java | 12 +- .../broker/region/QueueDispatchSelector.java | 6 +- .../broker/region/QueueSubscription.java | 6 +- .../activemq/broker/region/RegionBroker.java | 8 +- .../activemq/broker/region/TempQueue.java | 6 +- .../broker/region/TempQueueRegion.java | 6 +- .../broker/region/TempTopicRegion.java | 6 +- .../apache/activemq/broker/region/Topic.java | 8 +- .../activemq/broker/region/TopicRegion.java | 6 +- .../broker/region/TopicSubscription.java | 6 +- .../region/cursors/AbstractStoreCursor.java | 6 +- .../cursors/FilePendingMessageCursor.java | 6 +- .../region/cursors/QueueStorePrefetch.java | 6 +- .../cursors/StoreDurableSubscriberCursor.java | 6 +- .../region/cursors/StoreQueueCursor.java | 6 +- .../region/cursors/TopicStorePrefetch.java | 6 +- .../policy/AbortSlowConsumerStrategy.java | 6 +- .../policy/AbstractDeadLetterStrategy.java | 6 +- .../broker/region/policy/PolicyEntry.java | 6 +- .../policy/PriorityNetworkDispatchPolicy.java | 6 +- .../QueryBasedSubscriptionRecoveryPolicy.java | 6 +- .../policy/RoundRobinDispatchPolicy.java | 6 +- .../broker/region/virtual/MirroredQueue.java | 8 +- .../broker/scheduler/JobSchedulerImpl.java | 6 +- .../broker/scheduler/JobSchedulerStore.java | 6 +- .../broker/scheduler/SchedulerBroker.java | 6 +- .../activemq/broker/util/CommandAgent.java | 6 +- .../broker/util/CommandMessageListener.java | 6 +- .../activemq/broker/util/DefaultAuditLog.java | 6 +- .../broker/util/LoggingBrokerPlugin.java | 22 +- .../broker/util/TimeStampingBrokerPlugin.java | 6 +- .../broker/util/TraceBrokerPathPlugin.java | 6 +- .../broker/util/UDPTraceBrokerPlugin.java | 6 +- .../view/DotFileInterceptorSupport.java | 6 +- .../command/ActiveMQTempDestination.java | 6 +- .../activemq/command/NetworkBridgeFilter.java | 6 +- .../activemq/filter/XPathExpression.java | 6 +- .../activemq/jndi/JNDIReferenceFactory.java | 6 +- .../apache/activemq/jndi/ReadOnlyContext.java | 6 +- .../kaha/impl/IndexRootContainer.java | 6 +- .../apache/activemq/kaha/impl/KahaStore.java | 6 +- .../kaha/impl/async/AsyncDataManager.java | 6 +- .../impl/async/ReadOnlyAsyncDataManager.java | 6 +- .../impl/container/BaseContainerImpl.java | 6 +- .../impl/container/ListContainerImpl.java | 6 +- .../kaha/impl/container/MapContainerImpl.java | 6 +- .../kaha/impl/data/DataManagerImpl.java | 6 +- .../kaha/impl/index/IndexManager.java | 6 +- .../activemq/kaha/impl/index/VMIndex.java | 6 +- .../kaha/impl/index/hash/HashIndex.java | 6 +- .../kaha/impl/index/hash/HashPage.java | 6 +- .../kaha/impl/index/tree/TreeIndex.java | 6 +- .../kaha/impl/index/tree/TreePage.java | 10 +- .../management/JMSEndpointStatsImpl.java | 6 +- .../memory/CacheEvictionUsageListener.java | 6 +- .../memory/list/SimpleMessageList.java | 6 +- .../CompositeDemandForwardingBridge.java | 6 +- .../activemq/network/ConduitBridge.java | 6 +- .../network/DemandForwardingBridge.java | 6 +- .../DemandForwardingBridgeSupport.java | 6 +- .../activemq/network/DemandSubscription.java | 6 +- .../network/DiscoveryNetworkConnector.java | 6 +- .../network/DurableConduitBridge.java | 6 +- .../activemq/network/ForwardingBridge.java | 6 +- .../network/LdapNetworkConnector.java | 6 +- .../network/MBeanNetworkListener.java | 6 +- .../activemq/network/NetworkConnector.java | 6 +- .../network/jms/DestinationBridge.java | 6 +- .../activemq/network/jms/JmsConnector.java | 6 +- .../network/jms/JmsQueueConnector.java | 6 +- .../network/jms/JmsTopicConnector.java | 6 +- .../activemq/plugin/DiscardingDLQBroker.java | 6 +- .../plugin/DiscardingDLQBrokerPlugin.java | 6 +- .../plugin/ForcePersistencyModeBroker.java | 6 +- .../ForcePersistencyModeBrokerPlugin.java | 6 +- .../activemq/plugin/StatisticsBroker.java | 6 +- .../plugin/StatisticsBrokerPlugin.java | 6 +- .../activemq/proxy/ProxyConnection.java | 6 +- .../apache/activemq/proxy/ProxyConnector.java | 6 +- .../security/LDAPAuthorizationMap.java | 12 +- .../state/ConnectionStateTracker.java | 6 +- .../activemq/store/amq/AMQMessageStore.java | 6 +- .../store/amq/AMQPersistenceAdapter.java | 6 +- .../store/amq/AMQTopicMessageStore.java | 6 +- .../store/amq/RecoveryListenerAdapter.java | 6 +- .../store/jdbc/DefaultDatabaseLocker.java | 6 +- .../activemq/store/jdbc/JDBCMessageStore.java | 6 +- .../store/jdbc/JDBCPersistenceAdapter.java | 6 +- .../store/jdbc/JDBCTopicMessageStore.java | 6 +- .../store/jdbc/TransactionContext.java | 6 +- .../jdbc/adapter/DefaultJDBCAdapter.java | 6 +- .../jdbc/adapter/TransactDatabaseLocker.java | 6 +- .../store/journal/JournalMessageStore.java | 6 +- .../journal/JournalPersistenceAdapter.java | 6 +- .../JournalPersistenceAdapterFactory.java | 6 +- .../journal/JournalTopicMessageStore.java | 6 +- .../kahadaptor/KahaPersistenceAdapter.java | 6 +- .../store/kahadaptor/KahaReferenceStore.java | 6 +- .../kahadaptor/KahaReferenceStoreAdapter.java | 6 +- .../kahadaptor/KahaTopicReferenceStore.java | 6 +- .../store/kahadaptor/KahaTransaction.java | 4 +- .../kahadaptor/KahaTransactionStore.java | 6 +- .../activemq/store/kahadb/KahaDBStore.java | 6 +- .../store/kahadb/KahaDBTransactionStore.java | 6 +- .../store/kahadb/MessageDatabase.java | 6 +- .../store/kahadb/TempMessageDatabase.java | 6 +- .../store/kahadb/plist/PListStore.java | 6 +- .../memory/MemoryPersistenceAdapter.java | 6 +- .../transaction/LocalTransaction.java | 8 +- .../activemq/transaction/Transaction.java | 4 +- .../activemq/transaction/XATransaction.java | 8 +- .../activemq/transport/CommandJoiner.java | 6 +- .../activemq/transport/FutureResponse.java | 6 +- .../activemq/transport/InactivityMonitor.java | 6 +- .../apache/activemq/transport/LogWriter.java | 16 +- .../transport/ResponseCorrelator.java | 6 +- .../activemq/transport/TransportLogger.java | 6 +- .../transport/TransportLoggerFactory.java | 14 +- .../transport/TransportLoggerView.java | 6 +- .../TransportServerThreadSupport.java | 6 +- .../activemq/transport/TransportSupport.java | 6 +- .../transport/WireFormatNegotiator.java | 6 +- .../transport/WriteTimeoutFilter.java | 6 +- .../discovery/DiscoveryTransport.java | 6 +- .../multicast/MulticastDiscoveryAgent.java | 6 +- .../MulticastDiscoveryAgentFactory.java | 6 +- .../rendezvous/RendezvousDiscoveryAgent.java | 6 +- .../simple/SimpleDiscoveryAgent.java | 6 +- .../transport/failover/FailoverTransport.java | 6 +- .../transport/fanout/FanoutTransport.java | 6 +- .../transport/logwriters/CustomLogWriter.java | 16 +- .../logwriters/DefaultLogWriter.java | 16 +- .../multicast/MulticastTransport.java | 6 +- .../activemq/transport/nio/NIOTransport.java | 2 +- .../reliable/DefaultReplayBuffer.java | 6 +- .../transport/reliable/ReliableTransport.java | 6 +- .../transport/stomp/ProtocolConverter.java | 6 +- .../transport/stomp/StompTransportFilter.java | 6 +- .../transport/tcp/SslTransportFactory.java | 6 +- .../activemq/transport/tcp/TcpTransport.java | 6 +- .../transport/tcp/TcpTransportFactory.java | 6 +- .../transport/tcp/TcpTransportServer.java | 6 +- .../transport/udp/CommandDatagramChannel.java | 6 +- .../transport/udp/CommandDatagramSocket.java | 6 +- .../activemq/transport/udp/UdpTransport.java | 6 +- .../transport/udp/UdpTransportFactory.java | 6 +- .../transport/udp/UdpTransportServer.java | 6 +- .../transport/vm/VMTransportFactory.java | 6 +- .../java/org/apache/activemq/usage/Usage.java | 6 +- .../util/DefaultIOExceptionHandler.java | 8 +- .../org/apache/activemq/util/IdGenerator.java | 6 +- .../apache/activemq/util/LogWriterFinder.java | 6 +- .../apache/activemq/util/ServiceStopper.java | 6 +- .../apache/activemq/util/ServiceSupport.java | 6 +- .../apache/activemq/util/ThreadTracker.java | 6 +- .../activemq/util/TransactionTemplate.java | 6 +- .../apache/activemq/util/osgi/Activator.java | 8 +- .../activemq/xbean/BrokerFactoryBean.java | 4 +- .../activemq/xbean/XBeanBrokerFactory.java | 6 +- .../activemq/xbean/XBeanBrokerService.java | 6 +- .../ActiveMQConnectionFactoryTest.java | 6 +- .../activemq/ActiveMQInputStreamTest.java | 172 ++--- .../ActiveMQXAConnectionFactoryTest.java | 6 +- .../apache/activemq/AutoFailTestSupport.java | 7 +- .../activemq/CombinationTestSupport.java | 6 +- ...umerButDontStartConnectionWarningTest.java | 6 +- .../org/apache/activemq/JMSConsumerTest.java | 6 +- .../JMSDurableTopicRedeliverTest.java | 6 +- .../org/apache/activemq/JmsBenchmark.java | 6 +- .../JmsDurableTopicSendReceiveTest.java | 6 +- ...veTwoConnectionsStartBeforeBrokerTest.java | 6 +- ...JmsQueueSendReceiveTwoConnectionsTest.java | 4 +- .../activemq/JmsQueueTransactionTest.java | 6 +- .../activemq/JmsRollbackRedeliveryTest.java | 6 +- .../activemq/JmsSendReceiveTestSupport.java | 6 +- ...sSendReceiveWithMessageExpirationTest.java | 6 +- .../activemq/JmsTopicRedeliverTest.java | 6 +- .../activemq/JmsTopicRequestReplyTest.java | 6 +- .../apache/activemq/JmsTopicSelectorTest.java | 6 +- .../activemq/JmsTopicSendReceiveTest.java | 6 +- .../activemq/JmsTransactionTestSupport.java | 6 +- .../activemq/LargeMessageTestSupport.java | 6 +- .../apache/activemq/LargeStreamletTest.java | 6 +- .../org/apache/activemq/LoadTestBurnIn.java | 6 +- .../apache/activemq/MessageEvictionTest.java | 6 +- .../MessageListenerRedeliveryTest.java | 6 +- .../OnePrefetchAsyncConsumerTest.java | 8 +- .../PerDestinationStoreLimitTest.java | 6 +- .../activemq/ProducerFlowControlTest.java | 6 +- .../ReconnectWithSameClientIDTest.java | 6 +- .../apache/activemq/SpringTestSupport.java | 4 +- .../java/org/apache/activemq/TestSupport.java | 4 +- .../activemq/ZeroPrefetchConsumerTest.java | 6 +- .../advisory/ConsumerListenerTest.java | 6 +- .../advisory/DestinationListenerTest.java | 8 +- .../MasterSlaveTempQueueMemoryTest.java | 6 +- .../advisory/ProducerListenerTest.java | 6 +- .../activemq/advisory/TempDestDeleteTest.java | 6 +- .../activemq/blob/FilesystemBlobTest.java | 210 +++--- .../activemq/broker/BrokerBenchmark.java | 6 +- .../broker/NioQueueSubscriptionTest.java | 6 +- .../apache/activemq/broker/SpringTest.java | 6 +- .../ft/DbRestartJDBCQueueMasterSlaveTest.java | 6 +- .../MasterSlaveProducerFlowControlTest.java | 6 +- .../broker/ft/MasterSlaveSlaveDieTest.java | 8 +- .../broker/ft/QueueMasterSlaveTest.java | 6 +- .../apache/activemq/broker/jmx/MBeanTest.java | 6 +- .../apache/activemq/broker/jmx/PurgeTest.java | 6 +- .../broker/policy/AbortSlowConsumerTest.java | 6 +- .../broker/policy/DeadLetterTest.java | 6 +- .../broker/policy/DeadLetterTestSupport.java | 6 +- .../policy/IndividualDeadLetterTest.java | 6 +- .../IndividualDeadLetterViaXmlTest.java | 6 +- .../policy/MessageListenerDeadLetterTest.java | 10 +- .../broker/policy/NoRetryDeadLetterTest.java | 6 +- .../region/QueueDuplicatesFromStoreTest.java | 8 +- .../broker/region/QueuePurgeTest.java | 6 +- .../broker/region/cursors/CursorSupport.java | 10 +- .../region/cursors/NegativeQueueTest.java | 8 +- .../broker/region/group/MessageGroupTest.java | 6 +- .../scheduler/JobSchedulerManagementTest.java | 6 +- .../activemq/broker/store/LoadTester.java | 6 +- .../broker/util/PluginBrokerTest.java | 6 +- .../broker/virtual/CompositeQueueTest.java | 6 +- .../broker/virtual/MirroredQueueTest.java | 8 +- .../virtual/VirtualTopicSelectorTest.java | 8 +- .../org/apache/activemq/bugs/AMQ1866.java | 6 +- .../org/apache/activemq/bugs/AMQ1893Test.java | 8 +- .../org/apache/activemq/bugs/AMQ2021Test.java | 6 +- .../org/apache/activemq/bugs/AMQ2084Test.java | 6 +- .../org/apache/activemq/bugs/AMQ2102Test.java | 8 +- .../org/apache/activemq/bugs/AMQ2149Test.java | 6 +- .../org/apache/activemq/bugs/AMQ2183Test.java | 6 +- .../org/apache/activemq/bugs/AMQ2314Test.java | 6 +- .../org/apache/activemq/bugs/AMQ2356Test.java | 6 +- .../org/apache/activemq/bugs/AMQ2413Test.java | 10 +- .../org/apache/activemq/bugs/AMQ2439Test.java | 6 +- .../org/apache/activemq/bugs/AMQ2580Test.java | 6 +- .../bugs/AMQ2584ConcurrentDlqTest.java | 6 +- .../org/apache/activemq/bugs/AMQ2584Test.java | 8 +- .../org/apache/activemq/bugs/AMQ2645Test.java | 8 +- .../org/apache/activemq/bugs/AMQ2751Test.java | 6 +- .../org/apache/activemq/bugs/AMQ2832Test.java | 6 +- .../org/apache/activemq/bugs/AMQ2870Test.java | 8 +- .../org/apache/activemq/bugs/AMQ3120Test.java | 6 +- .../org/apache/activemq/bugs/AMQ3145Test.java | 8 +- .../bugs/ConnectionPerMessageTest.java | 8 +- .../activemq/bugs/DataFileNotDeletedTest.java | 6 +- .../activemq/bugs/DurableConsumerTest.java | 6 +- .../bugs/JmsDurableTopicSlowReceiveTest.java | 6 +- .../apache/activemq/bugs/JmsTimeoutTest.java | 8 +- .../activemq/bugs/MissingDataFileTest.java | 8 +- .../activemq/bugs/OutOfOrderTestCase.java | 8 +- .../bugs/QueueWorkerPrefetchTest.java | 6 +- .../activemq/bugs/SlowConsumerTest.java | 6 +- .../bugs/TempStorageBlockedBrokerTest.java | 6 +- .../bugs/TransactionNotStartedErrorTest.java | 8 +- .../bugs/VerifySteadyEnqueueRate.java | 7 +- .../command/ActiveMQMapMessageTest.java | 6 +- .../activemq/command/ActiveMQMessageTest.java | 6 +- .../activemq/command/MessageSendTest.java | 6 +- .../activemq/config/BrokerPropertiesTest.java | 6 +- .../apache/activemq/config/ConfigTest.java | 6 +- .../activemq/demo/DefaultQueueSender.java | 6 +- .../apache/activemq/demo/SimpleProducer.java | 6 +- .../activemq/demo/SimpleQueueReceiver.java | 6 +- .../activemq/demo/SimpleQueueSender.java | 6 +- .../filter/BadDummyPolicyConfigTest.java | 6 +- .../activemq/jndi/InitialContextTest.java | 6 +- .../java/org/apache/activemq/kaha/Loader.java | 6 +- .../activemq/kaha/MapContainerTest.java | 6 +- .../org/apache/activemq/kaha/VolumeTest.java | 6 +- .../kaha/impl/async/JournalImplTest.java | 8 +- .../kaha/impl/async/LocationTest.java | 8 +- .../org/apache/activemq/load/LoadClient.java | 6 +- .../org/apache/activemq/load/LoadTest.java | 6 +- .../activemq/memory/MemoryPropertyTest.java | 6 +- .../buffer/MemoryBufferTestSupport.java | 6 +- .../BrokerNetworkWithStuckMessagesTest.java | 6 +- .../network/DuplexNetworkMBeanTest.java | 8 +- .../network/FailoverStaticNetworkTest.java | 8 +- .../network/NetworkBrokerDetachTest.java | 6 +- .../NetworkConnectionsCleanedupTest.java | 6 +- .../activemq/network/NetworkFailoverTest.java | 6 +- .../activemq/network/NetworkLoadTest.java | 672 +++++++++--------- .../network/NetworkReconnectTest.java | 6 +- .../SSHTunnelNetworkReconnectTest.java | 6 +- .../activemq/network/SimpleNetworkTest.java | 6 +- .../activemq/network/jms/QueueBridgeTest.java | 6 +- .../network/jms/TopicBridgeSpringTest.java | 6 +- .../DataFileGeneratorTestSupport.java | 6 +- .../NumberRangesWhileMarshallingTest.java | 6 +- .../activemq/perf/ConnectionChurnTest.java | 6 +- .../perf/InactiveDurableTopicTest.java | 6 +- .../activemq/perf/InactiveQueueTest.java | 6 +- .../activemq/perf/MemoryAllocationTest.java | 6 +- .../activemq/perf/NetworkedSyncTest.java | 16 +- .../perf/NumberOfDestinationsTest.java | 6 +- .../apache/activemq/perf/PerfConsumer.java | 6 +- .../perf/QueueConnectionMemoryTest.java | 6 +- .../activemq/perf/SimpleNetworkTest.java | 6 +- .../apache/activemq/perf/SimpleTopicTest.java | 6 +- .../apache/activemq/perf/SlowConsumer.java | 6 +- .../plugin/BrokerStatisticsPluginTest.java | 8 +- .../activemq/security/SecurityJMXTest.java | 6 +- .../security/SimpleAnonymousPluginTest.java | 6 +- .../SimpleAuthenticationPluginTest.java | 6 +- .../SimpleSecurityBrokerSystemTest.java | 6 +- .../activemq/security/XBeanSecurityTest.java | 6 +- .../activemq/selector/SelectorParserTest.java | 6 +- ...iveMQConnectionFactoryFactoryBeanTest.java | 6 +- .../apache/activemq/spring/ConsumerBean.java | 6 +- .../activemq/spring/SpringConsumer.java | 6 +- .../activemq/spring/SpringProducer.java | 6 +- .../activemq/spring/SpringTestSupport.java | 6 +- .../activemq/store/MessagePriorityTest.java | 6 +- .../apache/activemq/store/StoreOrderTest.java | 8 +- .../store/jdbc/BrokenPersistenceAdapter.java | 6 +- .../store/jdbc/JDBCCommitExceptionTest.java | 6 +- .../store/jdbc/JDBCMessagePriorityTest.java | 6 +- .../store/jdbc/JDBCStoreOrderTest.java | 8 +- .../store/jdbc/JDBCXACommitExceptionTest.java | 6 +- .../store/kahadb/KahaDBVersionTest.java | 8 +- .../activemq/store/kahadb/NoSpaceIOTest.java | 6 +- .../kahadb/perf/KahaBulkLoadingTest.java | 6 +- .../test/JmsSendReceiveTestSupport.java | 6 +- .../test/JmsTopicSendReceiveTest.java | 6 +- ...eceiveWithEmbeddedBrokerAndUserIDTest.java | 6 +- ...opicSendReceiveWithTwoConnectionsTest.java | 6 +- .../TemporaryDestinationToFromNameTest.java | 6 +- .../org/apache/activemq/test/TestSupport.java | 6 +- .../message/NestedMapAndListPropertyTest.java | 6 +- .../test/message/NestedMapMessageTest.java | 6 +- .../test/retroactive/DummyMessageQuery.java | 6 +- ...ConsumerTestWithSimpleMessageListTest.java | 6 +- ...troactiveConsumerWithMessageQueryTest.java | 6 +- .../CloseRollbackRedeliveryQueueTest.java | 6 +- ...elegatingTransactionalMessageListener.java | 6 +- ...RollbacksWhileConsumingLargeQueueTest.java | 6 +- .../activemq/thread/TaskRunnerTest.java | 6 +- .../transport/SoWriteTimeoutTest.java | 6 +- .../activemq/transport/TopicClusterTest.java | 6 +- .../DiscoveryNetworkReconnectTest.java | 6 +- .../DiscoveryTransportBrokerTest.java | 6 +- .../DiscoveryTransportNoBrokerTest.java | 6 +- .../transport/failover/BadConnectionTest.java | 6 +- ...FailoverConsumerOutstandingCommitTest.java | 6 +- .../failover/FailoverConsumerTest.java | 6 +- .../FailoverConsumerUnconsumedTest.java | 6 +- .../failover/FailoverPrefetchZeroTest.java | 6 +- .../failover/FailoverTransactionTest.java | 6 +- .../failover/FailoverTransportBrokerTest.java | 6 +- .../transport/failover/ReconnectTest.java | 6 +- .../fanout/FanoutTransportBrokerTest.java | 6 +- .../multicast/MulticastTransportTest.java | 6 +- .../transport/peer/PeerTransportTest.java | 6 +- .../reliable/ReliableTransportTest.java | 6 +- .../UnreliableCommandDatagramChannel.java | 6 +- .../UnreliableCommandDatagramSocket.java | 6 +- .../reliable/UnreliableUdpTransportTest.java | 6 +- .../transport/stomp/StompAdvisoryTest.java | 26 +- .../stomp/StompSubscriptionRemoveTest.java | 6 +- .../activemq/transport/stomp/StompTest.java | 6 +- .../transport/tcp/InactivityMonitorTest.java | 8 +- .../transport/tcp/ServerSocketTstFactory.java | 6 +- .../transport/tcp/SocketTstFactory.java | 6 +- .../transport/tcp/SslBrokerServiceTest.java | 6 +- .../tcp/SslContextNBrokerServiceTest.java | 6 +- .../tcp/SslTransportFactoryTest.java | 6 +- .../tcp/TcpFaultyTransportFactory.java | 6 +- .../transport/tcp/TransportUriTest.java | 6 +- .../tcp/WireformatNegociationTest.java | 6 +- .../transport/udp/UdpTestSupport.java | 6 +- .../transport/udp/UdpTransportTest.java | 6 +- .../udp/UdpTransportUsingServerTest.java | 6 +- .../apache/activemq/usecases/AMQ2927Test.java | 8 +- .../usecases/AdvisoryTopicDeletionTest.java | 6 +- .../usecases/BrowseOverNetworkTest.java | 6 +- .../usecases/CompositeConsumeTest.java | 6 +- .../usecases/CompositePublishTest.java | 6 +- ...ConcurrentProducerDurableConsumerTest.java | 6 +- .../usecases/ConsumeQueuePrefetchTest.java | 6 +- .../usecases/ConsumeTopicPrefetchTest.java | 6 +- .../CreateLotsOfTemporaryQueuesTest.java | 6 +- .../DispatchMultipleConsumersTest.java | 6 +- ...rableConsumerCloseAndReconnectTcpTest.java | 6 +- .../DurableConsumerCloseAndReconnectTest.java | 6 +- .../usecases/DurableSubProcessTest.java | 8 +- .../DurableSubscriptionOfflineTest.java | 6 +- .../usecases/ExpiredMessagesTest.java | 6 +- .../ExpiredMessagesWithNoConsumerTest.java | 6 +- .../usecases/JdbcDurableSubDupTest.java | 6 +- .../usecases/MessageGroupCloseTest.java | 8 +- .../usecases/MessageGroupDelayedTest.java | 6 +- .../usecases/MessageGroupNewConsumerTest.java | 6 +- .../usecases/MessageReroutingTest.java | 6 +- .../MultiBrokersMultiClientsTest.java | 6 +- .../usecases/NetworkOfTwentyBrokersTest.java | 6 +- .../NewConsumerCreatesDestinationTest.java | 6 +- .../NoDuplicateOnTopicNetworkTest.java | 8 +- .../ObjectMessageNotSerializableTest.java | 6 +- ...QueueConsumedMessageInTransactionTest.java | 10 +- ...ueConsumedMessageUsingActivemqXMLTest.java | 6 +- .../PublishOnTopicConsumedMessageTest.java | 6 +- ...icConsumerMessageUsingActivemqXMLTest.java | 6 +- .../usecases/QueueDuplicatesTest.java | 6 +- .../activemq/usecases/QueueRepeaterTest.java | 10 +- .../SubscribeClosePublishThenConsumeTest.java | 6 +- .../apache/activemq/usecases/TestSupport.java | 6 +- .../usecases/ThreeBrokerQueueNetworkTest.java | 6 +- .../ThreeBrokerStompTemporaryQueueTest.java | 8 +- .../ThreeBrokerVirtualTopicNetworkTest.java | 8 +- .../TopicProducerFlowControlTest.java | 6 +- .../activemq/usecases/TopicRedeliverTest.java | 6 +- .../TransactionRollbackOrderTest.java | 10 +- .../activemq/usecases/TransactionTest.java | 10 +- .../TwoBrokerNetworkLoadBalanceTest.java | 6 +- .../TwoBrokerQueueClientsReconnectTest.java | 6 +- .../TwoBrokerTopicSendReceiveTest.java | 6 +- .../apache/activemq/util/ConsumerThread.java | 6 +- .../apache/activemq/util/LRUCacheTest.java | 6 +- .../apache/activemq/util/MessageIdList.java | 6 +- .../apache/activemq/util/ProducerThread.java | 6 +- .../org/apache/activemq/util/SocketProxy.java | 6 +- .../xbean/ConnectorXBeanConfigTest.java | 6 +- .../ManagementContextXBeanConfigTest.java | 6 +- .../MultipleTestsWithEmbeddedBrokerTest.java | 6 +- ...ultipleTestsWithSpringFactoryBeanTest.java | 6 +- .../activemq/xbean/XBeanConfigTest.java | 6 +- activemq-fileserver/pom.xml | 16 +- .../activemq/util/FilenameGuardFilter.java | 6 +- .../org/apache/activemq/util/RestFilter.java | 6 +- .../apache/activemq/util/HttpTestSupport.java | 6 +- activemq-jaas/pom.xml | 8 +- .../activemq/jaas/CertificateLoginModule.java | 6 +- .../activemq/jaas/GuestLoginModule.java | 8 +- .../apache/activemq/jaas/LDAPLoginModule.java | 10 +- .../activemq/jaas/PropertiesLoginModule.java | 6 +- activemq-optional/pom.xml | 7 +- .../http/DiscoveryRegistryServlet.java | 6 +- .../discovery/http/HTTPDiscoveryAgent.java | 6 +- .../transport/http/HttpClientTransport.java | 6 +- .../transport/http/HttpTransport.java | 6 +- .../transport/http/HttpTransportFactory.java | 6 +- .../transport/http/HttpTunnelServlet.java | 6 +- .../org/apache/activemq/bugs/AMQ2764Test.java | 6 +- .../http/HttpClientReconnectTest.java | 11 +- .../transport/http/WaitForJettyListener.java | 6 +- .../xstream/XStreamWireFormatTest.java | 6 +- activemq-pool/pom.xml | 9 +- .../pool/ActiveMQResourceManager.java | 6 +- .../pool/PooledConnectionFactory.java | 6 +- .../apache/activemq/pool/PooledSession.java | 6 +- .../ConnectionFailureEvictsFromPoolTest.java | 6 +- activemq-ra/pom.xml | 5 + .../ra/ActiveMQConnectionFactory.java | 6 +- .../ra/ActiveMQConnectionSupport.java | 6 +- .../activemq/ra/ActiveMQEndpointWorker.java | 6 +- .../ra/ActiveMQManagedConnection.java | 6 +- .../ra/ActiveMQManagedConnectionFactory.java | 4 +- .../activemq/ra/MessageEndpointProxy.java | 6 +- .../apache/activemq/ra/ServerSessionImpl.java | 6 +- .../activemq/ra/ServerSessionPoolImpl.java | 6 +- .../activemq/ra/SimpleConnectionManager.java | 6 +- .../activemq/ra/ConnectionManagerAdapter.java | 6 +- .../ra/FailoverManagedClusterTest.java | 6 +- activemq-rar/pom.xml | 5 + activemq-spring/pom.xml | 11 +- .../activemq/hooks/SpringContextHook.java | 6 +- .../pool/PooledConnectionFactoryBean.java | 6 +- .../org/apache/activemq/spring/Listener.java | 6 +- .../apache/activemq/spring/ListenerTest.java | 6 +- .../spring/ParallelXATransactionTest.java | 6 +- .../activemq/usecases/AMQDeadlockTest3.java | 6 +- .../usecases/AMQDeadlockTestW4Brokers.java | 6 +- .../java/org/apache/bugs/AMQ1730Test.java | 6 +- .../java/org/apache/bugs/LoadBalanceTest.java | 6 +- .../org/apache/activemq/tool/JMSMemtest.java | 6 +- .../activemq/tool/MemMessageIdList.java | 6 +- .../apache/activemq/tool/ReportGenerator.java | 6 +- .../activemq/tool/AbstractJmsClient.java | 6 +- .../tool/AbstractJmsClientSystem.java | 6 +- .../activemq/tool/JmsConsumerClient.java | 6 +- .../activemq/tool/JmsProducerClient.java | 6 +- .../tool/properties/ReflectionUtil.java | 10 +- .../tool/reports/XmlFilePerfReportWriter.java | 6 +- .../tool/reports/plugins/CpuReportPlugin.java | 6 +- .../spi/ClassLoaderSPIConnectionFactory.java | 6 +- .../activemq/web/WebConsoleStarter.java | 6 +- .../activemq/web/controller/CopyMessage.java | 6 +- .../activemq/web/controller/DeleteJob.java | 6 +- .../web/controller/DeleteMessage.java | 6 +- .../activemq/web/controller/MoveMessage.java | 6 +- .../BindingBeanNameUrlHandlerMapping.java | 6 +- activemq-web-demo/pom.xml | 6 + .../org/apache/activemq/web/AjaxTest.java | 6 +- .../apache/activemq/web/JettyTestSupport.java | 6 +- .../org/apache/activemq/web/RestTest.java | 6 +- .../org/apache/activemq/web/AjaxListener.java | 6 +- .../apache/activemq/web/AjaxWebClient.java | 6 +- .../org/apache/activemq/web/AuditFilter.java | 6 +- .../activemq/web/MessageListenerServlet.java | 6 +- .../apache/activemq/web/MessageServlet.java | 6 +- .../activemq/web/MessageServletSupport.java | 6 +- .../activemq/web/RemoteJMXBrokerFacade.java | 6 +- .../apache/activemq/web/SessionListener.java | 6 +- .../org/apache/activemq/web/WebClient.java | 6 +- activemq-xmpp/pom.xml | 5 + .../transport/xmpp/ProtocolConverter.java | 6 +- .../transport/xmpp/XmppTransport.java | 6 +- .../transport/xmpp/XmppWireFormat.java | 4 +- assembly/pom.xml | 6 +- assembly/src/main/descriptors/common-bin.xml | 6 +- .../config/BrokerXmlConfigStartTest.java | 6 +- kahadb/pom.xml | 29 +- .../org/apache/kahadb/index/BTreeIndex.java | 6 +- .../org/apache/kahadb/index/HashIndex.java | 6 +- .../org/apache/kahadb/journal/Journal.java | 6 +- .../java/org/apache/kahadb/page/PageFile.java | 6 +- pom.xml | 14 +- 570 files changed, 2379 insertions(+), 2359 deletions(-) diff --git a/activemq-all/pom.xml b/activemq-all/pom.xml index c7b331c4e5..c4e14a8c09 100644 --- a/activemq-all/pom.xml +++ b/activemq-all/pom.xml @@ -83,7 +83,7 @@ org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec org.apache.geronimo.specs:geronimo-annotation_1.0_spec - commons-logging:commons-logging-api + org.slf4j:slf4j-api diff --git a/activemq-camel/pom.xml b/activemq-camel/pom.xml index 110395b5b6..f94b62cac1 100755 --- a/activemq-camel/pom.xml +++ b/activemq-camel/pom.xml @@ -60,8 +60,8 @@ - commons-logging - commons-logging-api + org.slf4j + slf4j-api org.apache.camel @@ -157,6 +157,11 @@ true test + + org.slf4j + slf4j-log4j12 + test + log4j log4j diff --git a/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java b/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java index b3d01692d5..cd5257e959 100644 --- a/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java +++ b/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java @@ -37,8 +37,8 @@ import org.apache.camel.Endpoint; import org.apache.camel.component.jms.JmsEndpoint; import org.apache.camel.component.jms.JmsQueueEndpoint; import org.apache.camel.util.ObjectHelper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A helper bean which populates a {@link CamelContext} with ActiveMQ Queue endpoints @@ -47,7 +47,7 @@ import org.apache.commons.logging.LogFactory; * @org.apache.xbean.XBean */ public class CamelEndpointLoader implements CamelContextAware { - private static final transient Log LOG = LogFactory.getLog(CamelEndpointLoader.class); + private static final transient Logger LOG = LoggerFactory.getLogger(CamelEndpointLoader.class); private CamelContext camelContext; private EnhancedConnection connection; private ConnectionFactory connectionFactory; diff --git a/activemq-camel/src/main/java/org/apache/activemq/camel/component/JournalEndpoint.java b/activemq-camel/src/main/java/org/apache/activemq/camel/component/JournalEndpoint.java index 7c4baf0268..2e92f476bb 100644 --- a/activemq-camel/src/main/java/org/apache/activemq/camel/component/JournalEndpoint.java +++ b/activemq-camel/src/main/java/org/apache/activemq/camel/component/JournalEndpoint.java @@ -36,12 +36,12 @@ import org.apache.camel.impl.DefaultConsumer; import org.apache.camel.impl.DefaultEndpoint; import org.apache.camel.impl.DefaultExchange; import org.apache.camel.impl.DefaultProducer; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class JournalEndpoint extends DefaultEndpoint { - private static final transient Log LOG = LogFactory.getLog(JournalEndpoint.class); + private static final transient Logger LOG = LoggerFactory.getLogger(JournalEndpoint.class); private final File directory; private final AtomicReference consumer = new AtomicReference(); diff --git a/activemq-camel/src/test/java/org/apache/activemq/camel/AMQ2611Test.java b/activemq-camel/src/test/java/org/apache/activemq/camel/AMQ2611Test.java index 7bce5a9688..71d3835588 100644 --- a/activemq-camel/src/test/java/org/apache/activemq/camel/AMQ2611Test.java +++ b/activemq-camel/src/test/java/org/apache/activemq/camel/AMQ2611Test.java @@ -28,8 +28,8 @@ import org.apache.camel.CamelContext; import org.apache.camel.ProducerTemplate; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class AMQ2611Test extends TestCase { @@ -37,7 +37,7 @@ public class AMQ2611Test extends TestCase { private static final String QUEUE_NAME = "test.queue"; - private static final Log log = LogFactory.getLog(AMQ2611Test.class); + private static final Logger log = LoggerFactory.getLogger(AMQ2611Test.class); private BrokerService brokerService = null; diff --git a/activemq-camel/src/test/java/org/apache/activemq/camel/CamelJmsTest.java b/activemq-camel/src/test/java/org/apache/activemq/camel/CamelJmsTest.java index 48f6b1c287..0b9f6c9cd6 100644 --- a/activemq-camel/src/test/java/org/apache/activemq/camel/CamelJmsTest.java +++ b/activemq-camel/src/test/java/org/apache/activemq/camel/CamelJmsTest.java @@ -32,8 +32,8 @@ import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.ProducerTemplate; import org.apache.camel.impl.DefaultProducerTemplate; import org.apache.camel.spring.SpringTestSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.support.ClassPathXmlApplicationContext; /** @@ -41,7 +41,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; */ public class CamelJmsTest extends SpringTestSupport { - private static final Log LOG = LogFactory.getLog(CamelJmsTest.class); + private static final Logger LOG = LoggerFactory.getLogger(CamelJmsTest.class); protected String expectedBody = "world!"; @@ -102,4 +102,4 @@ public class CamelJmsTest extends SpringTestSupport { protected ClassPathXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("org/apache/activemq/camel/spring.xml"); } -} \ No newline at end of file +} diff --git a/activemq-camel/src/test/java/org/apache/activemq/camel/CamelRedeliveryTest.java b/activemq-camel/src/test/java/org/apache/activemq/camel/CamelRedeliveryTest.java index c3f0582271..34826485c8 100644 --- a/activemq-camel/src/test/java/org/apache/activemq/camel/CamelRedeliveryTest.java +++ b/activemq-camel/src/test/java/org/apache/activemq/camel/CamelRedeliveryTest.java @@ -27,8 +27,8 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.RedeliveryPolicy; import org.apache.activemq.command.ActiveMQQueue; import org.apache.camel.CamelContext; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests; @@ -38,7 +38,7 @@ import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTest */ @ContextConfiguration public class CamelRedeliveryTest extends AbstractJUnit38SpringContextTests { - private static final transient Log LOG = LogFactory.getLog(CamelRedeliveryTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(CamelRedeliveryTest.class); @Autowired protected CamelContext camelContext; @@ -83,4 +83,4 @@ public class CamelRedeliveryTest extends AbstractJUnit38SpringContextTests { // came from camel assertTrue("redelivery marker header set, so came from camel", m.getBooleanProperty("CamelRedeliveryMarker")); } -} \ No newline at end of file +} diff --git a/activemq-camel/src/test/java/org/apache/activemq/camel/CamelVMTransportRoutingTest.java b/activemq-camel/src/test/java/org/apache/activemq/camel/CamelVMTransportRoutingTest.java index 225926aaa2..02cba905d7 100644 --- a/activemq-camel/src/test/java/org/apache/activemq/camel/CamelVMTransportRoutingTest.java +++ b/activemq-camel/src/test/java/org/apache/activemq/camel/CamelVMTransportRoutingTest.java @@ -34,14 +34,14 @@ import org.apache.activemq.util.ThreadTracker; import org.apache.camel.CamelContext; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.Assert; // see: https://issues.apache.org/activemq/browse/AMQ-2966 public class CamelVMTransportRoutingTest extends TestCase { - private static final Log log = LogFactory.getLog(CamelVMTransportRoutingTest.class); + private static final Logger log = LoggerFactory.getLogger(CamelVMTransportRoutingTest.class); private BrokerService broker = null; private TransportConnector connector = null; diff --git a/activemq-camel/src/test/java/org/apache/activemq/camel/JmsJdbcXATest.java b/activemq-camel/src/test/java/org/apache/activemq/camel/JmsJdbcXATest.java index 98fc07b886..1f57b2c133 100644 --- a/activemq-camel/src/test/java/org/apache/activemq/camel/JmsJdbcXATest.java +++ b/activemq-camel/src/test/java/org/apache/activemq/camel/JmsJdbcXATest.java @@ -33,8 +33,8 @@ import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.TransactionId; import org.apache.activemq.util.Wait; import org.apache.camel.spring.SpringTestSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.enhydra.jdbc.pool.StandardXAPoolDataSource; import org.springframework.context.support.AbstractXmlApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -43,7 +43,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; * shows broker heuristic rollback (no prepare memory), hence duplicate message delivery */ public class JmsJdbcXATest extends SpringTestSupport { - private static final Log LOG = LogFactory.getLog(JmsJdbcXATest.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsJdbcXATest.class); BrokerService broker = null; public java.sql.Connection initDb() throws Exception { diff --git a/activemq-camel/src/test/java/org/apache/activemq/camel/SetHeaderTest.java b/activemq-camel/src/test/java/org/apache/activemq/camel/SetHeaderTest.java index 96081d35e5..c187f9ceab 100644 --- a/activemq-camel/src/test/java/org/apache/activemq/camel/SetHeaderTest.java +++ b/activemq-camel/src/test/java/org/apache/activemq/camel/SetHeaderTest.java @@ -24,8 +24,8 @@ import org.apache.camel.EndpointInject; import org.apache.camel.CamelContext; import org.apache.camel.Exchange; import org.apache.camel.util.ObjectHelper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests; import org.springframework.beans.factory.annotation.Autowired; @@ -35,7 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired; */ @ContextConfiguration public class SetHeaderTest extends AbstractJUnit38SpringContextTests { - private static final transient Log LOG = LogFactory.getLog(SetHeaderTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(SetHeaderTest.class); @Autowired protected CamelContext camelContext; @@ -57,4 +57,4 @@ public class SetHeaderTest extends AbstractJUnit38SpringContextTests { LOG.debug("Received: body: " + body + " of type: " + ObjectHelper.className(body) + " on: " + exchange); } } -} \ No newline at end of file +} diff --git a/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQJmsHeaderRouteTest.java b/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQJmsHeaderRouteTest.java index 7d9fc99eac..34648a6be6 100644 --- a/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQJmsHeaderRouteTest.java +++ b/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQJmsHeaderRouteTest.java @@ -33,14 +33,14 @@ import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.jms.JmsMessage; import org.apache.camel.component.mock.AssertionClause; import org.apache.camel.component.mock.MockEndpoint; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class ActiveMQJmsHeaderRouteTest extends ContextTestSupport { - private static final transient Log LOG = LogFactory.getLog(ActiveMQJmsHeaderRouteTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(ActiveMQJmsHeaderRouteTest.class); protected Object expectedBody = ""; protected ActiveMQQueue replyQueue = new ActiveMQQueue("test.reply.queue"); @@ -97,4 +97,4 @@ public class ActiveMQJmsHeaderRouteTest extends ContextTestSupport { } }; } -} \ No newline at end of file +} diff --git a/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQReplyToHeaderUsingConverterTest.java b/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQReplyToHeaderUsingConverterTest.java index d2fc56aeca..4afa795575 100644 --- a/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQReplyToHeaderUsingConverterTest.java +++ b/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQReplyToHeaderUsingConverterTest.java @@ -32,14 +32,14 @@ import org.apache.camel.Message; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.AssertionClause; import org.apache.camel.component.mock.MockEndpoint; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class ActiveMQReplyToHeaderUsingConverterTest extends ContextTestSupport { - private static final transient Log LOG = LogFactory.getLog(ActiveMQReplyToHeaderUsingConverterTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(ActiveMQReplyToHeaderUsingConverterTest.class); protected Object expectedBody = ""; protected String replyQueueName = "queue://test.my.reply.queue"; protected String correlationID = "ABC-123"; @@ -107,4 +107,4 @@ public class ActiveMQReplyToHeaderUsingConverterTest extends ContextTestSupport } }; } -} \ No newline at end of file +} diff --git a/activemq-camel/src/test/java/org/apache/activemq/camel/component/AutoExposeQueuesInCamelTest.java b/activemq-camel/src/test/java/org/apache/activemq/camel/component/AutoExposeQueuesInCamelTest.java index f712d4af1b..18f34fb34d 100644 --- a/activemq-camel/src/test/java/org/apache/activemq/camel/component/AutoExposeQueuesInCamelTest.java +++ b/activemq-camel/src/test/java/org/apache/activemq/camel/component/AutoExposeQueuesInCamelTest.java @@ -30,8 +30,8 @@ import org.apache.camel.Endpoint; import org.apache.camel.impl.DefaultCamelContext; import org.apache.camel.spi.BrowsableEndpoint; import org.apache.camel.util.CamelContextHelper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Shows that we can see the queues inside ActiveMQ via Camel @@ -40,7 +40,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class AutoExposeQueuesInCamelTest extends EmbeddedBrokerTestSupport { - private static final transient Log LOG = LogFactory.getLog(AutoExposeQueuesInCamelTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(AutoExposeQueuesInCamelTest.class); protected ActiveMQQueue sampleQueue = new ActiveMQQueue("foo.bar"); protected ActiveMQTopic sampleTopic = new ActiveMQTopic("cheese"); @@ -101,4 +101,4 @@ public class AutoExposeQueuesInCamelTest extends EmbeddedBrokerTestSupport { return broker; } -} \ No newline at end of file +} diff --git a/activemq-camel/src/test/java/org/apache/activemq/camel/component/InvokeRequestReplyUsingJmsReplyToHeaderTest.java b/activemq-camel/src/test/java/org/apache/activemq/camel/component/InvokeRequestReplyUsingJmsReplyToHeaderTest.java index eb7b22d777..1d8de3ab31 100644 --- a/activemq-camel/src/test/java/org/apache/activemq/camel/component/InvokeRequestReplyUsingJmsReplyToHeaderTest.java +++ b/activemq-camel/src/test/java/org/apache/activemq/camel/component/InvokeRequestReplyUsingJmsReplyToHeaderTest.java @@ -39,14 +39,14 @@ import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.jms.JmsConstants; import org.apache.camel.component.mock.AssertionClause; import org.apache.camel.component.mock.MockEndpoint; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class InvokeRequestReplyUsingJmsReplyToHeaderTest extends ContextTestSupport { - private static final transient Log LOG = LogFactory.getLog(ActiveMQReplyToHeaderUsingConverterTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(ActiveMQReplyToHeaderUsingConverterTest.class); protected String replyQueueName = "queue://test.reply"; protected Object correlationID = "ABC-123"; protected Object groupID = "GROUP-XYZ"; @@ -154,4 +154,4 @@ public class InvokeRequestReplyUsingJmsReplyToHeaderTest extends ContextTestSupp return headers; } } -} \ No newline at end of file +} diff --git a/activemq-console/src/test/java/org/apache/activemq/simple/Producer.java b/activemq-console/src/test/java/org/apache/activemq/simple/Producer.java index 2f75d9f962..e1323248f6 100644 --- a/activemq-console/src/test/java/org/apache/activemq/simple/Producer.java +++ b/activemq-console/src/test/java/org/apache/activemq/simple/Producer.java @@ -35,12 +35,12 @@ import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public final class Producer { - private static final Log LOG = LogFactory.getLog(Producer.class); + private static final Logger LOG = LoggerFactory.getLogger(Producer.class); private Producer() { } diff --git a/activemq-core/pom.xml b/activemq-core/pom.xml index c435825d5c..ea9488fdd7 100755 --- a/activemq-core/pom.xml +++ b/activemq-core/pom.xml @@ -65,8 +65,8 @@ - commons-logging - commons-logging-api + org.slf4j + slf4j-api org.apache.geronimo.specs @@ -193,8 +193,8 @@ test - commons-logging - commons-logging + org.slf4j + slf4j-log4j12 test @@ -268,11 +268,6 @@ 1.0.0 test - - org.slf4j - slf4j-log4j12 - test - org.jmock jmock-junit4 diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java index d157c46e5f..101440c2a4 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java @@ -97,8 +97,8 @@ import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.JMSExceptionSupport; import org.apache.activemq.util.LongSequenceGenerator; import org.apache.activemq.util.ServiceSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ActiveMQConnection implements Connection, TopicConnection, QueueConnection, StatsCapable, Closeable, StreamConnection, TransportListener, EnhancedConnection { @@ -106,7 +106,7 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon public static final String DEFAULT_PASSWORD = ActiveMQConnectionFactory.DEFAULT_PASSWORD; public static final String DEFAULT_BROKER_URL = ActiveMQConnectionFactory.DEFAULT_BROKER_URL; - private static final Log LOG = LogFactory.getLog(ActiveMQConnection.class); + private static final Logger LOG = LoggerFactory.getLogger(ActiveMQConnection.class); private static final IdGenerator CONNECTION_ID_GENERATOR = new IdGenerator(); public final ConcurrentHashMap activeTempDestinations = new ConcurrentHashMap(); diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java index 2d598a72da..329d9b929d 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java @@ -59,8 +59,8 @@ import org.apache.activemq.transaction.Synchronization; import org.apache.activemq.util.Callback; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.JMSExceptionSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A client uses a MessageConsumer object to receive messages @@ -108,7 +108,7 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC } } - private static final Log LOG = LogFactory.getLog(ActiveMQMessageConsumer.class); + private static final Logger LOG = LoggerFactory.getLogger(ActiveMQMessageConsumer.class); protected final Scheduler scheduler; protected final ActiveMQSession session; protected final ConsumerInfo info; diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQPrefetchPolicy.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQPrefetchPolicy.java index bae9993ce3..b790dea087 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQPrefetchPolicy.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQPrefetchPolicy.java @@ -17,8 +17,8 @@ package org.apache.activemq; import java.io.Serializable; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Defines the prefetch message policies for different types of consumers @@ -35,7 +35,7 @@ public class ActiveMQPrefetchPolicy extends Object implements Serializable { public static final int DEFAULT_INPUT_STREAM_PREFETCH=100; public static final int DEFAULT_TOPIC_PREFETCH = MAX_PREFETCH_SIZE; - private static final Log LOG = LogFactory.getLog(ActiveMQPrefetchPolicy.class); + private static final Logger LOG = LoggerFactory.getLogger(ActiveMQPrefetchPolicy.class); private int queuePrefetch; private int queueBrowserPrefetch; diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java index fe54fcd76e..82e560cfce 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java @@ -88,8 +88,8 @@ import org.apache.activemq.transaction.Synchronization; import org.apache.activemq.usage.MemoryUsage; import org.apache.activemq.util.Callback; import org.apache.activemq.util.LongSequenceGenerator; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** *

@@ -196,7 +196,7 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta void afterDelivery(ActiveMQSession session, Message msg); } - private static final Log LOG = LogFactory.getLog(ActiveMQSession.class); + private static final Logger LOG = LoggerFactory.getLogger(ActiveMQSession.class); private final Scheduler scheduler; private final ThreadPoolExecutor connectionExecutor; diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java index 2fdca37499..bc8e6f1621 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java @@ -24,8 +24,8 @@ import org.apache.activemq.command.MessageDispatch; import org.apache.activemq.thread.Task; import org.apache.activemq.thread.TaskRunner; import org.apache.activemq.util.JMSExceptionSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A utility class used by the Session for dispatching messages asynchronously @@ -35,7 +35,7 @@ import org.apache.commons.logging.LogFactory; * @see javax.jms.Session */ public class ActiveMQSessionExecutor implements Task { - private static final Log LOG = LogFactory.getLog(ActiveMQSessionExecutor.class); + private static final Logger LOG = LoggerFactory.getLogger(ActiveMQSessionExecutor.class); private final ActiveMQSession session; private final MessageDispatchChannel messageQueue; diff --git a/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java b/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java index a537d9ab41..0a61c8ae3e 100755 --- a/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java +++ b/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java @@ -27,11 +27,11 @@ import org.apache.activemq.command.DataStructure; import org.apache.activemq.command.DestinationInfo; import org.apache.activemq.command.MessageAck; import org.apache.activemq.command.MessageDispatch; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class AdvisoryConsumer implements ActiveMQDispatcher { - private static final transient Log LOG = LogFactory.getLog(AdvisoryConsumer.class); + private static final transient Logger LOG = LoggerFactory.getLogger(AdvisoryConsumer.class); int deliveredCounter; diff --git a/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java b/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java index 4136d791de..cd5b1ae2c4 100755 --- a/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java +++ b/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java @@ -42,8 +42,8 @@ import org.apache.activemq.command.XATransactionId; import org.apache.activemq.transaction.Synchronization; import org.apache.activemq.util.JMSExceptionSupport; import org.apache.activemq.util.LongSequenceGenerator; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A TransactionContext provides the means to control a JMS transaction. It @@ -65,7 +65,7 @@ import org.apache.commons.logging.LogFactory; */ public class TransactionContext implements XAResource { - private static final Log LOG = LogFactory.getLog(TransactionContext.class); + private static final Logger LOG = LoggerFactory.getLogger(TransactionContext.class); // XATransactionId -> ArrayList of TransactionContext objects private final static ConcurrentHashMap> ENDED_XA_TRANSACTION_CONTEXTS = new ConcurrentHashMap>(); diff --git a/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java b/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java index b676dfbc34..2f116a0ec9 100755 --- a/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java @@ -34,8 +34,8 @@ import org.apache.activemq.state.ProducerState; import org.apache.activemq.usage.Usage; import org.apache.activemq.util.IdGenerator; import org.apache.activemq.util.LongSequenceGenerator; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This broker filter handles tracking the state of the broker for purposes of @@ -45,7 +45,7 @@ import org.apache.commons.logging.LogFactory; */ public class AdvisoryBroker extends BrokerFilter { - private static final Log LOG = LogFactory.getLog(AdvisoryBroker.class); + private static final Logger LOG = LoggerFactory.getLogger(AdvisoryBroker.class); private static final IdGenerator ID_GENERATOR = new IdGenerator(); protected final ConcurrentHashMap connections = new ConcurrentHashMap(); diff --git a/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEventSource.java b/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEventSource.java index 93deffd1af..6b331febba 100644 --- a/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEventSource.java +++ b/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEventSource.java @@ -34,8 +34,8 @@ import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.command.ConsumerId; import org.apache.activemq.command.ConsumerInfo; import org.apache.activemq.command.RemoveInfo; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * An object which can be used to listen to the number of active consumers @@ -44,7 +44,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class ConsumerEventSource implements Service, MessageListener { - private static final Log LOG = LogFactory.getLog(ConsumerEventSource.class); + private static final Logger LOG = LoggerFactory.getLogger(ConsumerEventSource.class); private final Connection connection; private final ActiveMQDestination destination; diff --git a/activemq-core/src/main/java/org/apache/activemq/advisory/DestinationSource.java b/activemq-core/src/main/java/org/apache/activemq/advisory/DestinationSource.java index 0f3b906b24..6b9ab9675b 100644 --- a/activemq-core/src/main/java/org/apache/activemq/advisory/DestinationSource.java +++ b/activemq-core/src/main/java/org/apache/activemq/advisory/DestinationSource.java @@ -35,8 +35,8 @@ import org.apache.activemq.command.ActiveMQTempQueue; import org.apache.activemq.command.ActiveMQTempTopic; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.command.DestinationInfo; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A helper class which keeps track of the Destinations available in a broker and allows you to listen to them @@ -45,7 +45,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class DestinationSource implements MessageListener { - private static final Log LOG = LogFactory.getLog(ConsumerEventSource.class); + private static final Logger LOG = LoggerFactory.getLogger(ConsumerEventSource.class); private AtomicBoolean started = new AtomicBoolean(false); private final Connection connection; private Session session; @@ -189,4 +189,4 @@ public class DestinationSource implements MessageListener { listener.onDestinationEvent(event); } } -} \ No newline at end of file +} diff --git a/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEventSource.java b/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEventSource.java index 2ca45d7404..3a02437229 100644 --- a/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEventSource.java +++ b/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEventSource.java @@ -34,8 +34,8 @@ import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.command.ProducerId; import org.apache.activemq.command.ProducerInfo; import org.apache.activemq.command.RemoveInfo; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * An object which can be used to listen to the number of active consumers @@ -44,7 +44,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 359679 $ */ public class ProducerEventSource implements Service, MessageListener { - private static final Log LOG = LogFactory.getLog(ProducerEventSource.class); + private static final Logger LOG = LoggerFactory.getLogger(ProducerEventSource.class); private final Connection connection; private final ActiveMQDestination destination; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerPluginSupport.java b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerPluginSupport.java index d2ff04efb5..ade726b91c 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerPluginSupport.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerPluginSupport.java @@ -16,8 +16,8 @@ */ package org.apache.activemq.broker; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A useful base class for implementing broker plugins. @@ -25,7 +25,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public abstract class BrokerPluginSupport extends MutableBrokerFilter implements BrokerPlugin { - private static final Log LOG = LogFactory.getLog(BrokerPluginSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(BrokerPluginSupport.class); public BrokerPluginSupport() { super(null); } diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerRegistry.java b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerRegistry.java index f9ada38e1d..e49a6d57a0 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerRegistry.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerRegistry.java @@ -20,15 +20,15 @@ import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.Map; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.3 $ */ public class BrokerRegistry { - private static final Log LOG = LogFactory.getLog(BrokerRegistry.class); + private static final Logger LOG = LoggerFactory.getLogger(BrokerRegistry.class); private static final BrokerRegistry INSTANCE = new BrokerRegistry(); private final Object mutex = new Object(); diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java index 0fb7b1e0b1..add9dc4515 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java @@ -92,8 +92,8 @@ import org.apache.activemq.transport.TransportServer; import org.apache.activemq.transport.vm.VMTransportFactory; import org.apache.activemq.usage.SystemUsage; import org.apache.activemq.util.*; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Manages the lifecycle of an ActiveMQ Broker. A BrokerService consists of a * number of transport connectors, network connectors and a bunch of properties @@ -107,7 +107,7 @@ public class BrokerService implements Service { public static final String DEFAULT_PORT = "61616"; public static final String LOCAL_HOST_NAME; public static final String DEFAULT_BROKER_NAME = "localhost"; - private static final Log LOG = LogFactory.getLog(BrokerService.class); + private static final Logger LOG = LoggerFactory.getLogger(BrokerService.class); private static final long serialVersionUID = 7353129142305630237L; private boolean useJmx = true; private boolean enableStatistics = true; @@ -412,7 +412,7 @@ public class BrokerService implements Service { public void masterFailed() { if (shutdownOnMasterFailure) { - LOG.fatal("The Master has failed ... shutting down"); + LOG.error("The Master has failed ... shutting down"); try { stop(); } catch (Exception e) { @@ -893,7 +893,7 @@ public class BrokerService implements Service { } return systemUsage; } catch (IOException e) { - LOG.fatal("Cannot create SystemUsage", e); + LOG.error("Cannot create SystemUsage", e); throw new RuntimeException("Fatally failed to create SystemUsage" + e.getMessage()); } } diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/ProducerBrokerExchange.java b/activemq-core/src/main/java/org/apache/activemq/broker/ProducerBrokerExchange.java index eff6bd225e..c33eb641fd 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/ProducerBrokerExchange.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/ProducerBrokerExchange.java @@ -20,8 +20,8 @@ import org.apache.activemq.broker.region.Destination; import org.apache.activemq.broker.region.Region; import org.apache.activemq.command.Message; import org.apache.activemq.state.ProducerState; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Holds internal state in the broker for a MessageProducer @@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFactory; */ public class ProducerBrokerExchange { - private static final Log LOG = LogFactory.getLog(ProducerBrokerExchange.class); + private static final Logger LOG = LoggerFactory.getLogger(ProducerBrokerExchange.class); private ConnectionContext connectionContext; private Destination regionDestination; private Region region; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java b/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java index d2c1bf5da1..c4995f74d7 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java @@ -40,8 +40,8 @@ import org.apache.activemq.transaction.Transaction; import org.apache.activemq.transaction.XATransaction; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.WrappedException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This broker filter handles the transaction related operations in the Broker @@ -51,7 +51,7 @@ import org.apache.commons.logging.LogFactory; */ public class TransactionBroker extends BrokerFilter { - private static final Log LOG = LogFactory.getLog(TransactionBroker.class); + private static final Logger LOG = LoggerFactory.getLogger(TransactionBroker.class); // The prepared XA transactions. private TransactionStore transactionStore; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java b/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java index f335495b0e..330a39e0ee 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java @@ -94,17 +94,17 @@ import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.MarshallingSupport; import org.apache.activemq.util.ServiceSupport; import org.apache.activemq.util.URISupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import static org.apache.activemq.thread.DefaultThreadPools.getDefaultTaskRunnerFactory; /** * @version $Revision: 1.8 $ */ public class TransportConnection implements Connection, Task, CommandVisitor { - private static final Log LOG = LogFactory.getLog(TransportConnection.class); - private static final Log TRANSPORTLOG = LogFactory.getLog(TransportConnection.class.getName() + ".Transport"); - private static final Log SERVICELOG = LogFactory.getLog(TransportConnection.class.getName() + ".Service"); + private static final Logger LOG = LoggerFactory.getLogger(TransportConnection.class); + private static final Logger TRANSPORTLOG = LoggerFactory.getLogger(TransportConnection.class.getName() + ".Transport"); + private static final Logger SERVICELOG = LoggerFactory.getLogger(TransportConnection.class.getName() + ".Service"); // Keeps track of the broker and connector that created this connection. protected final Broker broker; protected final TransportConnector connector; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java b/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java index 56d1b2f77e..9e01c04985 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java @@ -40,8 +40,8 @@ import org.apache.activemq.transport.discovery.DiscoveryAgent; import org.apache.activemq.transport.discovery.DiscoveryAgentFactory; import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.util.ServiceSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @org.apache.xbean.XBean @@ -49,7 +49,7 @@ import org.apache.commons.logging.LogFactory; */ public class TransportConnector implements Connector, BrokerServiceAware { - final Log LOG = LogFactory.getLog(TransportConnector.class); + final Logger LOG = LoggerFactory.getLogger(TransportConnector.class); protected CopyOnWriteArrayList connections = new CopyOnWriteArrayList(); protected TransportStatusDetector statusDector; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java b/activemq-core/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java index 41ad06ec1a..2600f44cd4 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java @@ -23,8 +23,8 @@ import java.util.concurrent.atomic.AtomicBoolean; import org.apache.activemq.Service; import org.apache.activemq.ThreadPriorities; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Used to provide information on the status of the Connection @@ -32,7 +32,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.5 $ */ public class TransportStatusDetector implements Service, Runnable { - private static final Log LOG = LogFactory.getLog(TransportStatusDetector.class); + private static final Logger LOG = LoggerFactory.getLogger(TransportStatusDetector.class); private TransportConnector connector; private Set collectionCandidates = new CopyOnWriteArraySet(); private AtomicBoolean started = new AtomicBoolean(false); diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java b/activemq-core/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java index 8ec9c35543..c14b1739e4 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java @@ -26,8 +26,8 @@ import org.apache.activemq.broker.region.Subscription; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ConsumerId; import org.apache.activemq.command.ConsumerInfo; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Monitors for client connections that may fail to another broker - but this @@ -37,7 +37,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class ConnectionSplitBroker extends BrokerFilter{ - private static final Log LOG = LogFactory.getLog(ConnectionSplitBroker.class); + private static final Logger LOG = LoggerFactory.getLogger(ConnectionSplitBroker.class); private ListnetworkConsumerList = new ArrayList(); public ConnectionSplitBroker(Broker next) { super(next); diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterBroker.java b/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterBroker.java index 46f437123e..da15d1229d 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterBroker.java @@ -48,8 +48,8 @@ import org.apache.activemq.command.TransactionInfo; import org.apache.activemq.transport.MutexTransport; import org.apache.activemq.transport.ResponseCorrelator; import org.apache.activemq.transport.Transport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * The Message Broker which passes messages to a slave @@ -58,7 +58,7 @@ import org.apache.commons.logging.LogFactory; */ public class MasterBroker extends InsertableMutableBrokerFilter { - private static final Log LOG = LogFactory.getLog(MasterBroker.class); + private static final Logger LOG = LoggerFactory.getLogger(MasterBroker.class); private Transport slave; private AtomicBoolean started = new AtomicBoolean(false); diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java b/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java index 038b22292c..e7a2c35fef 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java @@ -43,8 +43,8 @@ import org.apache.activemq.transport.TransportFactory; import org.apache.activemq.util.IdGenerator; import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.util.ServiceSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Connects a Slave Broker to a Master when using > primitives = new HashMap>(); - private static final Log LOG = LogFactory.getLog("org.apache.activemq.audit"); + private static final Logger LOG = LoggerFactory.getLogger("org.apache.activemq.audit"); private static boolean audit; private static AuditLogService auditLog; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java index 6a1cc0ad94..830f0dd301 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java @@ -48,11 +48,11 @@ import org.apache.activemq.command.Message; import org.apache.activemq.filter.BooleanExpression; import org.apache.activemq.filter.MessageEvaluationContext; import org.apache.activemq.selector.SelectorParser; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class DestinationView implements DestinationViewMBean { - private static final Log LOG = LogFactory.getLog(DestinationViewMBean.class); + private static final Logger LOG = LoggerFactory.getLogger(DestinationViewMBean.class); protected final Destination destination; protected final ManagedRegionBroker broker; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java index 4a1ba20f39..6df655e13b 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java @@ -71,11 +71,11 @@ import org.apache.activemq.usage.SystemUsage; import org.apache.activemq.util.JMXSupport; import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.util.SubscriptionKey; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ManagedRegionBroker extends RegionBroker { - private static final Log LOG = LogFactory.getLog(ManagedRegionBroker.class); + private static final Logger LOG = LoggerFactory.getLogger(ManagedRegionBroker.class); private final ManagementContext managementContext; private final ObjectName brokerObjectName; private final Map topics = new ConcurrentHashMap(); diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java index 4bd01b469d..1228bb5527 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java @@ -25,8 +25,8 @@ import org.apache.activemq.thread.TaskRunnerFactory; import org.apache.activemq.transport.Transport; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.JMXSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.Hashtable; import javax.management.ObjectName; @@ -37,7 +37,7 @@ import javax.management.ObjectName; * @version $Revision: 1.1 $ */ public class ManagedTransportConnection extends TransportConnection { - private static final Log LOG = LogFactory.getLog(ManagedTransportConnection.class); + private static final Logger LOG = LoggerFactory.getLogger(ManagedTransportConnection.class); private final ManagementContext managementContext; private final ObjectName connectorName; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java index 928a5def66..3a95d3ff56 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java @@ -17,8 +17,8 @@ package org.apache.activemq.broker.jmx; import org.apache.activemq.Service; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.management.*; import javax.management.remote.JMXConnectorServer; @@ -46,7 +46,7 @@ public class ManagementContext implements Service { * Default activemq domain */ public static final String DEFAULT_DOMAIN = "org.apache.activemq"; - private static final Log LOG = LogFactory.getLog(ManagementContext.class); + private static final Logger LOG = LoggerFactory.getLogger(ManagementContext.class); private MBeanServer beanServer; private String jmxDomainName = DEFAULT_DOMAIN; private boolean useMBeanServer = true; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java index f03e50c577..4b6d98ff81 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java @@ -44,15 +44,15 @@ import org.apache.activemq.filter.DestinationMap; import org.apache.activemq.security.SecurityContext; import org.apache.activemq.thread.TaskRunnerFactory; import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.14 $ */ public abstract class AbstractRegion implements Region { - private static final Log LOG = LogFactory.getLog(AbstractRegion.class); + private static final Logger LOG = LoggerFactory.getLogger(AbstractRegion.class); protected final Map destinations = new ConcurrentHashMap(); protected final DestinationMap destinationMap = new DestinationMap(); diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractSubscription.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractSubscription.java index e3e1c1a418..581784e8fc 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractSubscription.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractSubscription.java @@ -34,12 +34,12 @@ import org.apache.activemq.filter.LogicExpression; import org.apache.activemq.filter.MessageEvaluationContext; import org.apache.activemq.filter.NoLocalExpression; import org.apache.activemq.selector.SelectorParser; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public abstract class AbstractSubscription implements Subscription { - private static final Log LOG = LogFactory.getLog(AbstractSubscription.class); + private static final Logger LOG = LoggerFactory.getLogger(AbstractSubscription.class); protected Broker broker; protected ConnectionContext context; protected ConsumerInfo info; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractTempRegion.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractTempRegion.java index c106b10779..7469c90c24 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractTempRegion.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractTempRegion.java @@ -27,14 +27,14 @@ import org.apache.activemq.broker.ConnectionContext; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.thread.TaskRunnerFactory; import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * */ public abstract class AbstractTempRegion extends AbstractRegion { - private static final Log LOG = LogFactory.getLog(TempQueueRegion.class); + private static final Logger LOG = LoggerFactory.getLogger(TempQueueRegion.class); private Map cachedDestinations = new HashMap(); private final boolean doCacheTempDestinations; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/BaseDestination.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/BaseDestination.java index 39488d632d..cd22c6003d 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/BaseDestination.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/BaseDestination.java @@ -35,7 +35,7 @@ import org.apache.activemq.store.MessageStore; import org.apache.activemq.usage.MemoryUsage; import org.apache.activemq.usage.SystemUsage; import org.apache.activemq.usage.Usage; -import org.apache.commons.logging.Log; +import org.slf4j.Logger; /** * @version $Revision: 1.12 $ @@ -600,7 +600,7 @@ public abstract class BaseDestination implements Destination { } } - protected abstract Log getLog(); + protected abstract Logger getLog(); public void setSlowConsumerStrategy(SlowConsumerStrategy slowConsumerStrategy) { this.slowConsumerStrategy = slowConsumerStrategy; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/DurableTopicSubscription.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/DurableTopicSubscription.java index 83fafca35b..091ad523a5 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/DurableTopicSubscription.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/DurableTopicSubscription.java @@ -40,12 +40,12 @@ import org.apache.activemq.usage.SystemUsage; import org.apache.activemq.usage.Usage; import org.apache.activemq.usage.UsageListener; import org.apache.activemq.util.SubscriptionKey; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class DurableTopicSubscription extends PrefetchSubscription implements UsageListener { - private static final Log LOG = LogFactory.getLog(DurableTopicSubscription.class); + private static final Logger LOG = LoggerFactory.getLogger(DurableTopicSubscription.class); private final ConcurrentHashMap redeliveredMessages = new ConcurrentHashMap(); private final ConcurrentHashMap destinations = new ConcurrentHashMap(); private final SubscriptionKey subscriptionKey; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java index 54c758f64e..9e2b4cc6bc 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java @@ -41,8 +41,8 @@ import org.apache.activemq.command.Response; import org.apache.activemq.thread.Scheduler; import org.apache.activemq.transaction.Synchronization; import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A subscription that honors the pre-fetch option of the ConsumerInfo. @@ -51,7 +51,7 @@ import org.apache.commons.logging.LogFactory; */ public abstract class PrefetchSubscription extends AbstractSubscription { - private static final Log LOG = LogFactory.getLog(PrefetchSubscription.class); + private static final Logger LOG = LoggerFactory.getLogger(PrefetchSubscription.class); protected final Scheduler scheduler; protected PendingMessageCursor pending; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java index 9e5f34b791..185d2150ac 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java @@ -71,8 +71,8 @@ import org.apache.activemq.transaction.Synchronization; import org.apache.activemq.usage.Usage; import org.apache.activemq.usage.UsageListener; import org.apache.activemq.util.BrokerSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * The Queue is a List of MessageEntry objects that are dispatched to matching @@ -81,7 +81,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.28 $ */ public class Queue extends BaseDestination implements Task, UsageListener { - protected static final Log LOG = LogFactory.getLog(Queue.class); + protected static final Logger LOG = LoggerFactory.getLogger(Queue.class); protected final TaskRunnerFactory taskFactory; protected TaskRunner taskRunner; private final ReentrantReadWriteLock consumersLock = new ReentrantReadWriteLock(); @@ -294,7 +294,7 @@ public class Queue extends BaseDestination implements Task, UsageListener { try { messages.addMessageLast(message); } catch (Exception e) { - LOG.fatal("Failed to add message to cursor", e); + LOG.error("Failed to add message to cursor", e); } }finally { messagesLock.writeLock().unlock(); @@ -1405,7 +1405,7 @@ public class Queue extends BaseDestination implements Task, UsageListener { } } } catch (Exception e) { - LOG.error(e); + LOG.error(e.toString()); } } @@ -2057,7 +2057,7 @@ public class Queue extends BaseDestination implements Task, UsageListener { } @Override - protected Log getLog() { + protected Logger getLog() { return LOG; } } diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueDispatchSelector.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueDispatchSelector.java index 481c0f206a..47908296dc 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueDispatchSelector.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueDispatchSelector.java @@ -27,8 +27,8 @@ import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.ConsumerId; import org.apache.activemq.command.Message; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Queue dispatch policy that determines if a message can be sent to a subscription @@ -37,7 +37,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class QueueDispatchSelector extends SimpleDispatchSelector { - private static final Log LOG = LogFactory.getLog(QueueDispatchSelector.class); + private static final Logger LOG = LoggerFactory.getLogger(QueueDispatchSelector.class); private Subscription exclusiveConsumer; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java index eb95d381f7..40a4f70e1f 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java @@ -27,12 +27,12 @@ import org.apache.activemq.command.ConsumerInfo; import org.apache.activemq.command.Message; import org.apache.activemq.command.MessageAck; import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class QueueSubscription extends PrefetchSubscription implements LockOwner { - private static final Log LOG = LogFactory.getLog(QueueSubscription.class); + private static final Logger LOG = LoggerFactory.getLogger(QueueSubscription.class); public QueueSubscription(Broker broker, SystemUsage usageManager, ConnectionContext context, ConsumerInfo info) throws InvalidSelectorException { super(broker,usageManager, context, info); diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java index 5328b1569c..761131db50 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java @@ -67,8 +67,8 @@ import org.apache.activemq.util.IdGenerator; import org.apache.activemq.util.InetAddressUtil; import org.apache.activemq.util.LongSequenceGenerator; import org.apache.activemq.util.ServiceStopper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Routes Broker operations to the correct messaging regions for processing. @@ -77,7 +77,7 @@ import org.apache.commons.logging.LogFactory; */ public class RegionBroker extends EmptyBroker { public static final String ORIGINAL_EXPIRATION = "originalExpiration"; - private static final Log LOG = LogFactory.getLog(RegionBroker.class); + private static final Logger LOG = LoggerFactory.getLogger(RegionBroker.class); private static final IdGenerator BROKER_ID_GENERATOR = new IdGenerator(); protected final DestinationStatistics destinationStatistics = new DestinationStatistics(); @@ -861,7 +861,7 @@ public class RegionBroker extends EmptyBroker { try { return getBrokerService().getBroker(); } catch (Exception e) { - LOG.fatal("Trying to get Root Broker " + e); + LOG.error("Trying to get Root Broker " + e); throw new RuntimeException("The broker from the BrokerService should not throw an exception"); } } diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueue.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueue.java index 4c3b82b374..3c50f7a02f 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueue.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueue.java @@ -24,8 +24,8 @@ import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQTempDestination; import org.apache.activemq.store.MessageStore; import org.apache.activemq.thread.TaskRunnerFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * The Queue is a List of MessageEntry objects that are dispatched to matching @@ -34,7 +34,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.28 $ */ public class TempQueue extends Queue{ - private static final Log LOG = LogFactory.getLog(TempQueue.class); + private static final Logger LOG = LoggerFactory.getLogger(TempQueue.class); private final ActiveMQTempDestination tempDest; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueueRegion.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueueRegion.java index 1eb1612ffc..1ab34fd5ef 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueueRegion.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueueRegion.java @@ -26,14 +26,14 @@ import org.apache.activemq.command.ConsumerInfo; import org.apache.activemq.command.MessageDispatchNotification; import org.apache.activemq.thread.TaskRunnerFactory; import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.7 $ */ public class TempQueueRegion extends AbstractTempRegion { - private static final Log LOG = LogFactory.getLog(TempQueueRegion.class); + private static final Logger LOG = LoggerFactory.getLogger(TempQueueRegion.class); private final BrokerService brokerService; public TempQueueRegion(RegionBroker broker, BrokerService brokerService, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopicRegion.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopicRegion.java index 9ce31efffd..12933ad92c 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopicRegion.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopicRegion.java @@ -24,15 +24,15 @@ import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ConsumerInfo; import org.apache.activemq.thread.TaskRunnerFactory; import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.7 $ */ public class TempTopicRegion extends AbstractTempRegion { - private static final Log LOG = LogFactory.getLog(TempTopicRegion.class); + private static final Logger LOG = LoggerFactory.getLogger(TempTopicRegion.class); public TempTopicRegion(RegionBroker broker, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) { diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java index 0a4d533674..d5fa89589b 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java @@ -52,8 +52,8 @@ import org.apache.activemq.thread.TaskRunnerFactory; import org.apache.activemq.thread.Valve; import org.apache.activemq.transaction.Synchronization; import org.apache.activemq.util.SubscriptionKey; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * The Topic is a destination that sends a copy of a message to every active @@ -62,7 +62,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.21 $ */ public class Topic extends BaseDestination implements Task { - protected static final Log LOG = LogFactory.getLog(Topic.class); + protected static final Logger LOG = LoggerFactory.getLogger(Topic.class); private final TopicMessageStore topicStore; protected final CopyOnWriteArrayList consumers = new CopyOnWriteArrayList(); protected final Valve dispatchValve = new Valve(true); @@ -662,7 +662,7 @@ public class Topic extends BaseDestination implements Task { } @Override - protected Log getLog() { + protected Logger getLog() { return LOG; } diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicRegion.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicRegion.java index a29829b859..44fc5876b9 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicRegion.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicRegion.java @@ -38,14 +38,14 @@ import org.apache.activemq.thread.TaskRunnerFactory; import org.apache.activemq.usage.SystemUsage; import org.apache.activemq.util.LongSequenceGenerator; import org.apache.activemq.util.SubscriptionKey; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.12 $ */ public class TopicRegion extends AbstractRegion { - private static final Log LOG = LogFactory.getLog(TopicRegion.class); + private static final Logger LOG = LoggerFactory.getLogger(TopicRegion.class); protected final ConcurrentHashMap durableSubscriptions = new ConcurrentHashMap(); private final LongSequenceGenerator recoveredDurableSubIdGenerator = new LongSequenceGenerator(); private final SessionId recoveredDurableSubSessionId = new SessionId(new ConnectionId("OFFLINE"), recoveredDurableSubIdGenerator.getNextSequenceId()); diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java index 5a876f8660..2fe405a1f2 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java @@ -38,12 +38,12 @@ import org.apache.activemq.command.MessagePull; import org.apache.activemq.command.Response; import org.apache.activemq.transaction.Synchronization; import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class TopicSubscription extends AbstractSubscription { - private static final Log LOG = LogFactory.getLog(TopicSubscription.class); + private static final Logger LOG = LoggerFactory.getLogger(TopicSubscription.class); private static final AtomicLong CURSOR_NAME_COUNTER = new AtomicLong(0); protected PendingMessageCursor matched; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java index d6edbbca62..8bd9f43365 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java @@ -22,15 +22,15 @@ import org.apache.activemq.broker.region.MessageReference; import org.apache.activemq.command.Message; import org.apache.activemq.command.MessageId; import org.apache.activemq.store.MessageRecoveryListener; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Store based cursor * */ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor implements MessageRecoveryListener { - private static final Log LOG = LogFactory.getLog(AbstractStoreCursor.class); + private static final Logger LOG = LoggerFactory.getLogger(AbstractStoreCursor.class); protected final Destination regionDestination; private final PendingList batchList; private Iterator iterator = null; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java index 55b2201573..2b4d812a54 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java @@ -36,8 +36,8 @@ import org.apache.activemq.usage.SystemUsage; import org.apache.activemq.usage.Usage; import org.apache.activemq.usage.UsageListener; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.kahadb.util.ByteSequence; /** @@ -47,7 +47,7 @@ import org.apache.kahadb.util.ByteSequence; * @version $Revision$ */ public class FilePendingMessageCursor extends AbstractPendingMessageCursor implements UsageListener { - static final Log LOG = LogFactory.getLog(FilePendingMessageCursor.class); + static final Logger LOG = LoggerFactory.getLogger(FilePendingMessageCursor.class); private static final AtomicLong NAME_COUNT = new AtomicLong(); protected Broker broker; private final PListStore store; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/QueueStorePrefetch.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/QueueStorePrefetch.java index 77ee08c91b..c607782f43 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/QueueStorePrefetch.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/QueueStorePrefetch.java @@ -21,8 +21,8 @@ import org.apache.activemq.broker.region.Queue; import org.apache.activemq.command.Message; import org.apache.activemq.command.MessageId; import org.apache.activemq.store.MessageStore; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * persist pending messages pending message (messages awaiting dispatch to a @@ -31,7 +31,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 474985 $ */ class QueueStorePrefetch extends AbstractStoreCursor { - private static final Log LOG = LogFactory.getLog(QueueStorePrefetch.class); + private static final Logger LOG = LoggerFactory.getLogger(QueueStorePrefetch.class); private final MessageStore store; /** diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java index 1f6379d5f6..8d67195147 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java @@ -30,8 +30,8 @@ import org.apache.activemq.broker.region.Subscription; import org.apache.activemq.broker.region.Topic; import org.apache.activemq.command.Message; import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * persist pending messages pending message (messages awaiting dispatch to a @@ -41,7 +41,7 @@ import org.apache.commons.logging.LogFactory; */ public class StoreDurableSubscriberCursor extends AbstractPendingMessageCursor { - private static final Log LOG = LogFactory.getLog(StoreDurableSubscriberCursor.class); + private static final Logger LOG = LoggerFactory.getLogger(StoreDurableSubscriberCursor.class); private static final int UNKNOWN = -1; private final String clientId; private final String subscriberName; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreQueueCursor.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreQueueCursor.java index eea0cd346f..73c5a720e7 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreQueueCursor.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreQueueCursor.java @@ -21,8 +21,8 @@ import org.apache.activemq.broker.region.MessageReference; import org.apache.activemq.broker.region.Queue; import org.apache.activemq.command.Message; import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Store based Cursor for Queues @@ -31,7 +31,7 @@ import org.apache.commons.logging.LogFactory; */ public class StoreQueueCursor extends AbstractPendingMessageCursor { - private static final Log LOG = LogFactory.getLog(StoreQueueCursor.class); + private static final Logger LOG = LoggerFactory.getLogger(StoreQueueCursor.class); private final Broker broker; private int pendingCount; private final Queue queue; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java index 800e8268c0..7280291f61 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java @@ -23,8 +23,8 @@ import org.apache.activemq.command.MessageId; import org.apache.activemq.filter.MessageEvaluationContext; import org.apache.activemq.filter.NonCachedMessageEvaluationContext; import org.apache.activemq.store.TopicMessageStore; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * persist pendingCount messages pendingCount message (messages awaiting disptach @@ -33,7 +33,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ class TopicStorePrefetch extends AbstractStoreCursor { - private static final Log LOG = LogFactory.getLog(TopicStorePrefetch.class); + private static final Logger LOG = LoggerFactory.getLogger(TopicStorePrefetch.class); private final TopicMessageStore store; private final String clientId; private final String subscriberName; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowConsumerStrategy.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowConsumerStrategy.java index 61390deb22..05bd573005 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowConsumerStrategy.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowConsumerStrategy.java @@ -29,8 +29,8 @@ import org.apache.activemq.broker.region.Subscription; import org.apache.activemq.command.ConsumerControl; import org.apache.activemq.thread.Scheduler; import org.apache.activemq.transport.InactivityIOException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Abort slow consumers when they reach the configured threshold of slowness, default is slow for 30 seconds @@ -39,7 +39,7 @@ import org.apache.commons.logging.LogFactory; */ public class AbortSlowConsumerStrategy implements SlowConsumerStrategy, Runnable { - private static final Log LOG = LogFactory.getLog(AbortSlowConsumerStrategy.class); + private static final Logger LOG = LoggerFactory.getLogger(AbortSlowConsumerStrategy.class); private String name = "AbortSlowConsumerStrategy@" + hashCode(); private Scheduler scheduler; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java index 7e98931dc3..2ab82b90c0 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java @@ -18,8 +18,8 @@ package org.apache.activemq.broker.region.policy; import org.apache.activemq.ActiveMQMessageAudit; import org.apache.activemq.command.Message; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A strategy for choosing which destination is used for dead letter queue @@ -28,7 +28,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 426366 $ */ public abstract class AbstractDeadLetterStrategy implements DeadLetterStrategy { - private static final Log LOG = LogFactory.getLog(AbstractDeadLetterStrategy.class); + private static final Logger LOG = LoggerFactory.getLogger(AbstractDeadLetterStrategy.class); private boolean processNonPersistent = false; private boolean processExpired = true; private ActiveMQMessageAudit audit = new ActiveMQMessageAudit(); diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java index c62f2738bb..9fe3a825ba 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java @@ -31,8 +31,8 @@ import org.apache.activemq.broker.region.group.MessageGroupHashBucketFactory; import org.apache.activemq.broker.region.group.MessageGroupMapFactory; import org.apache.activemq.filter.DestinationMapEntry; import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Represents an entry in a {@link PolicyMap} for assigning policies to a @@ -43,7 +43,7 @@ import org.apache.commons.logging.LogFactory; */ public class PolicyEntry extends DestinationMapEntry { - private static final Log LOG = LogFactory.getLog(PolicyEntry.class); + private static final Logger LOG = LoggerFactory.getLogger(PolicyEntry.class); private DispatchPolicy dispatchPolicy; private SubscriptionRecoveryPolicy subscriptionRecoveryPolicy; private boolean sendAdvisoryIfNoConsumers; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PriorityNetworkDispatchPolicy.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PriorityNetworkDispatchPolicy.java index d2008df94d..79b61956bd 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PriorityNetworkDispatchPolicy.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PriorityNetworkDispatchPolicy.java @@ -25,8 +25,8 @@ import org.apache.activemq.broker.region.Subscription; import org.apache.activemq.command.ConsumerId; import org.apache.activemq.command.ConsumerInfo; import org.apache.activemq.filter.MessageEvaluationContext; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * dispatch policy that ignores lower priority duplicate network consumers, @@ -36,7 +36,7 @@ import org.apache.commons.logging.LogFactory; */ public class PriorityNetworkDispatchPolicy extends SimpleDispatchPolicy { - private static final Log LOG = LogFactory.getLog(PriorityNetworkDispatchPolicy.class); + private static final Logger LOG = LoggerFactory.getLogger(PriorityNetworkDispatchPolicy.class); @Override public boolean dispatch(MessageReference node, MessageEvaluationContext msgContext, diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java index 15a17dcd38..11f4884e1a 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java @@ -34,8 +34,8 @@ import org.apache.activemq.command.MessageId; import org.apache.activemq.command.ProducerId; import org.apache.activemq.command.SessionId; import org.apache.activemq.util.IdGenerator; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This implementation of {@link SubscriptionRecoveryPolicy} will perform a user @@ -46,7 +46,7 @@ import org.apache.commons.logging.LogFactory; */ public class QueryBasedSubscriptionRecoveryPolicy implements SubscriptionRecoveryPolicy { - private static final Log LOG = LogFactory.getLog(QueryBasedSubscriptionRecoveryPolicy.class); + private static final Logger LOG = LoggerFactory.getLogger(QueryBasedSubscriptionRecoveryPolicy.class); private MessageQuery query; private final AtomicLong messageSequence = new AtomicLong(0); diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java index cf8b1d38c4..13a2e23a8f 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java @@ -21,8 +21,8 @@ import java.util.List; import org.apache.activemq.broker.region.MessageReference; import org.apache.activemq.broker.region.Subscription; import org.apache.activemq.filter.MessageEvaluationContext; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Simple dispatch policy that sends a message to every subscription that @@ -32,7 +32,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class RoundRobinDispatchPolicy implements DispatchPolicy { - static final Log LOG = LogFactory.getLog(RoundRobinDispatchPolicy.class); + static final Logger LOG = LoggerFactory.getLogger(RoundRobinDispatchPolicy.class); /** * @param node diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/MirroredQueue.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/MirroredQueue.java index 3998b76601..ff1acab391 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/MirroredQueue.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/MirroredQueue.java @@ -25,8 +25,8 @@ import org.apache.activemq.broker.region.DestinationInterceptor; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.command.Message; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Creates Mirrored @@ -36,7 +36,7 @@ import org.apache.commons.logging.LogFactory; * @org.apache.xbean.XBean */ public class MirroredQueue implements DestinationInterceptor, BrokerServiceAware { - private static final transient Log LOG = LogFactory.getLog(MirroredQueue.class); + private static final transient Logger LOG = LoggerFactory.getLogger(MirroredQueue.class); private String prefix = "VirtualTopic.Mirror."; private String postfix = ""; private boolean copyMessage = true; @@ -143,4 +143,4 @@ public class MirroredQueue implements DestinationInterceptor, BrokerServiceAware return new ActiveMQTopic(prefix + original.getPhysicalName() + postfix); } -} \ No newline at end of file +} diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerImpl.java b/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerImpl.java index 8c840b0f85..8f5755a20b 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerImpl.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerImpl.java @@ -31,8 +31,8 @@ import javax.jms.MessageFormatException; import org.apache.activemq.util.IdGenerator; import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.util.ServiceSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.kahadb.index.BTreeIndex; import org.apache.kahadb.journal.Location; import org.apache.kahadb.page.Transaction; @@ -41,7 +41,7 @@ import org.apache.kahadb.util.LongMarshaller; import org.apache.kahadb.util.VariableMarshaller; class JobSchedulerImpl extends ServiceSupport implements Runnable, JobScheduler { - private static final Log LOG = LogFactory.getLog(JobSchedulerImpl.class); + private static final Logger LOG = LoggerFactory.getLogger(JobSchedulerImpl.class); final JobSchedulerStore store; private final AtomicBoolean running = new AtomicBoolean(); private String name; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java b/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java index 2600c4bc2f..9b71835f1b 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java @@ -31,8 +31,8 @@ import java.util.Map.Entry; import org.apache.activemq.util.IOHelper; import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.util.ServiceSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.kahadb.index.BTreeIndex; import org.apache.kahadb.journal.Journal; import org.apache.kahadb.journal.Location; @@ -46,7 +46,7 @@ import org.apache.kahadb.util.StringMarshaller; import org.apache.kahadb.util.VariableMarshaller; public class JobSchedulerStore extends ServiceSupport { - static final Log LOG = LogFactory.getLog(JobSchedulerStore.class); + static final Logger LOG = LoggerFactory.getLogger(JobSchedulerStore.class); private static final int DATABASE_LOCKED_WAIT_DELAY = 10 * 1000; public static final int CLOSED_STATE = 1; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/SchedulerBroker.java b/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/SchedulerBroker.java index 27f707e3af..6fa08cd27d 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/SchedulerBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/SchedulerBroker.java @@ -37,12 +37,12 @@ import org.apache.activemq.util.IdGenerator; import org.apache.activemq.util.LongSequenceGenerator; import org.apache.activemq.util.TypeConversionSupport; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.kahadb.util.ByteSequence; public class SchedulerBroker extends BrokerFilter implements JobListener { - private static final Log LOG = LogFactory.getLog(SchedulerBroker.class); + private static final Logger LOG = LoggerFactory.getLogger(SchedulerBroker.class); private static final IdGenerator ID_GENERATOR = new IdGenerator(); private final LongSequenceGenerator messageIdGenerator = new LongSequenceGenerator(); private final AtomicBoolean started = new AtomicBoolean(); diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java b/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java index e270a39163..e07933630d 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java @@ -29,8 +29,8 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.Service; import org.apache.activemq.advisory.AdvisorySupport; import org.apache.activemq.util.ServiceStopper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * An agent which listens to commands on a JMS destination @@ -39,7 +39,7 @@ import org.apache.commons.logging.LogFactory; * @org.apache.xbean.XBean */ public class CommandAgent implements Service, ExceptionListener { - private static final Log LOG = LogFactory.getLog(CommandAgent.class); + private static final Logger LOG = LoggerFactory.getLogger(CommandAgent.class); private String brokerUrl = "vm://localhost"; private String username; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandMessageListener.java b/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandMessageListener.java index 7b0c4c5079..89f3fb2a4a 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandMessageListener.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandMessageListener.java @@ -28,14 +28,14 @@ import javax.jms.TextMessage; import org.apache.activemq.command.ActiveMQTextMessage; import org.apache.activemq.util.FactoryFinder; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: $ */ public class CommandMessageListener implements MessageListener { - private static final Log LOG = LogFactory.getLog(CommandMessageListener.class); + private static final Logger LOG = LoggerFactory.getLogger(CommandMessageListener.class); private Session session; private MessageProducer producer; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/util/DefaultAuditLog.java b/activemq-core/src/main/java/org/apache/activemq/broker/util/DefaultAuditLog.java index a63ecda248..d047fc0185 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/util/DefaultAuditLog.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/util/DefaultAuditLog.java @@ -16,12 +16,12 @@ */ package org.apache.activemq.broker.util; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class DefaultAuditLog implements AuditLog { - private static final Log LOG = LogFactory.getLog("org.apache.activemq.audit"); + private static final Logger LOG = LoggerFactory.getLogger("org.apache.activemq.audit"); public void log(AuditLogEntry entry) { LOG.info(entry.toString()); diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java b/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java index 0d2a7a1bb8..c7a1752276 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java @@ -42,8 +42,8 @@ import org.apache.activemq.command.Response; import org.apache.activemq.command.SessionInfo; import org.apache.activemq.command.TransactionId; import org.apache.activemq.usage.Usage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A simple Broker intercepter which allows you to enable/disable logging. @@ -53,7 +53,7 @@ import org.apache.commons.logging.LogFactory; public class LoggingBrokerPlugin extends BrokerPluginSupport { - private static final Log LOG = LogFactory.getLog(LoggingBrokerPlugin.class); + private static final Logger LOG = LoggerFactory.getLogger(LoggingBrokerPlugin.class); private boolean logAll = false; private boolean logMessageEvents = false; @@ -78,7 +78,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport { } /** - * Log all Events that go through the Plugin + * Logger all Events that go through the Plugin */ public void setLogAll(boolean logAll) { this.logAll = logAll; @@ -89,7 +89,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport { } /** - * Log Events that are related to message processing + * Logger Events that are related to message processing */ public void setLogMessageEvents(boolean logMessageEvents) { this.logMessageEvents = logMessageEvents; @@ -100,7 +100,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport { } /** - * Log Events that are related to connections and sessions + * Logger Events that are related to connections and sessions */ public void setLogConnectionEvents(boolean logConnectionEvents) { this.logConnectionEvents = logConnectionEvents; @@ -111,7 +111,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport { } /** - * Log Events that are related to transaction processing + * Logger Events that are related to transaction processing */ public void setLogTransactionEvents(boolean logTransactionEvents) { this.logTransactionEvents = logTransactionEvents; @@ -122,7 +122,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport { } /** - * Log Events that are related to Consumers + * Logger Events that are related to Consumers */ public void setLogConsumerEvents(boolean logConsumerEvents) { this.logConsumerEvents = logConsumerEvents; @@ -133,7 +133,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport { } /** - * Log Events that are related to Producers + * Logger Events that are related to Producers */ public void setLogProducerEvents(boolean logProducerEvents) { this.logProducerEvents = logProducerEvents; @@ -144,7 +144,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport { } /** - * Log Events that are normally internal to the broker + * Logger Events that are normally internal to the broker */ public void setLogInternalEvents(boolean logInternalEvents) { this.logInternalEvents = logInternalEvents; @@ -558,7 +558,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport { buf.append(") Session("); buf.append(subs.getConsumerInfo().getConsumerId().getSessionId()); buf.append(")"); - LOG.info(buf); + LOG.info(buf.toString()); } super.slowConsumer(context, destination, subs); } diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java b/activemq-core/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java index 4df1a653e6..a28992efab 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java @@ -19,8 +19,8 @@ package org.apache.activemq.broker.util; import org.apache.activemq.broker.BrokerPluginSupport; import org.apache.activemq.broker.ProducerBrokerExchange; import org.apache.activemq.command.Message; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A Broker interceptor which updates a JMS Client's timestamp on the message @@ -45,7 +45,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class TimeStampingBrokerPlugin extends BrokerPluginSupport { - private static final Log LOG = LogFactory.getLog(TimeStampingBrokerPlugin.class); + private static final Logger LOG = LoggerFactory.getLogger(TimeStampingBrokerPlugin.class); /** * variable which (when non-zero) is used to override * the expiration date for messages that arrive with diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/util/TraceBrokerPathPlugin.java b/activemq-core/src/main/java/org/apache/activemq/broker/util/TraceBrokerPathPlugin.java index fb8c4169a0..fe57ffd660 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/util/TraceBrokerPathPlugin.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/util/TraceBrokerPathPlugin.java @@ -21,8 +21,8 @@ import java.util.Map; import org.apache.activemq.broker.BrokerPluginSupport; import org.apache.activemq.command.MessageDispatch; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * The TraceBrokerPathPlugin can be used in a network of Brokers. Each Broker @@ -38,7 +38,7 @@ import org.apache.commons.logging.LogFactory; public class TraceBrokerPathPlugin extends BrokerPluginSupport { private String stampProperty = "BrokerPath"; - private static final Log LOG = LogFactory.getLog(TraceBrokerPathPlugin.class); + private static final Logger LOG = LoggerFactory.getLogger(TraceBrokerPathPlugin.class); public String getStampProperty() { return stampProperty; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/util/UDPTraceBrokerPlugin.java b/activemq-core/src/main/java/org/apache/activemq/broker/util/UDPTraceBrokerPlugin.java index 9e87c5d9b8..19eb5e1924 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/util/UDPTraceBrokerPlugin.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/util/UDPTraceBrokerPlugin.java @@ -55,8 +55,8 @@ import org.apache.activemq.util.ByteArrayOutputStream; import org.apache.activemq.util.ByteSequence; import org.apache.activemq.wireformat.WireFormat; import org.apache.activemq.wireformat.WireFormatFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A Broker interceptor which allows you to trace all operations to a UDP @@ -67,7 +67,7 @@ import org.apache.commons.logging.LogFactory; */ public class UDPTraceBrokerPlugin extends BrokerPluginSupport { - private static final Log LOG = LogFactory.getLog(UDPTraceBrokerPlugin.class); + private static final Logger LOG = LoggerFactory.getLogger(UDPTraceBrokerPlugin.class); protected WireFormat wireFormat; protected WireFormatFactory wireFormatFactory; protected int maxTraceDatagramSize = 1024 * 4; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java b/activemq-core/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java index 3b6d3d3123..2b586197a7 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java @@ -21,8 +21,8 @@ import java.io.PrintWriter; import org.apache.activemq.broker.Broker; import org.apache.activemq.broker.BrokerFilter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Useful base class @@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: $ */ public abstract class DotFileInterceptorSupport extends BrokerFilter { - private final Log log = LogFactory.getLog(DotFileInterceptorSupport.class); + private final Logger log = LoggerFactory.getLogger(DotFileInterceptorSupport.class); private String file; diff --git a/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempDestination.java b/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempDestination.java index 6a75bc1954..46b6eee7ec 100755 --- a/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempDestination.java +++ b/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempDestination.java @@ -18,8 +18,8 @@ package org.apache.activemq.command; import javax.jms.JMSException; import org.apache.activemq.ActiveMQConnection; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @openwire:marshaller @@ -27,7 +27,7 @@ import org.apache.commons.logging.LogFactory; */ public abstract class ActiveMQTempDestination extends ActiveMQDestination { - private static final Log LOG = LogFactory.getLog(ActiveMQTempDestination.class); + private static final Logger LOG = LoggerFactory.getLogger(ActiveMQTempDestination.class); protected transient ActiveMQConnection connection; protected transient String connectionId; protected transient int sequenceId; diff --git a/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java b/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java index eeea643a6c..b1bd7082ec 100644 --- a/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java +++ b/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java @@ -24,8 +24,8 @@ import javax.jms.JMSException; import org.apache.activemq.filter.BooleanExpression; import org.apache.activemq.filter.MessageEvaluationContext; import org.apache.activemq.util.JMSExceptionSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @openwire:marshaller code="91" @@ -34,7 +34,7 @@ import org.apache.commons.logging.LogFactory; public class NetworkBridgeFilter implements DataStructure, BooleanExpression { public static final byte DATA_STRUCTURE_TYPE = CommandTypes.NETWORK_BRIDGE_FILTER; - static final Log LOG = LogFactory.getLog(NetworkBridgeFilter.class); + static final Logger LOG = LoggerFactory.getLogger(NetworkBridgeFilter.class); private BrokerId networkBrokerId; private int networkTTL; diff --git a/activemq-core/src/main/java/org/apache/activemq/filter/XPathExpression.java b/activemq-core/src/main/java/org/apache/activemq/filter/XPathExpression.java index c3f1e0c381..ac723d6c58 100755 --- a/activemq-core/src/main/java/org/apache/activemq/filter/XPathExpression.java +++ b/activemq-core/src/main/java/org/apache/activemq/filter/XPathExpression.java @@ -24,15 +24,15 @@ import javax.jms.JMSException; import org.apache.activemq.command.Message; import org.apache.activemq.util.JMSExceptionSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Used to evaluate an XPath Expression in a JMS selector. */ public final class XPathExpression implements BooleanExpression { - private static final Log LOG = LogFactory.getLog(XPathExpression.class); + private static final Logger LOG = LoggerFactory.getLogger(XPathExpression.class); private static final String EVALUATOR_SYSTEM_PROPERTY = "org.apache.activemq.XPathEvaluatorClassName"; private static final String DEFAULT_EVALUATOR_CLASS_NAME = XalanXPathEvaluator.class.getName(); diff --git a/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIReferenceFactory.java b/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIReferenceFactory.java index 0a0c14d840..9d7c11ed61 100644 --- a/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIReferenceFactory.java +++ b/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIReferenceFactory.java @@ -27,8 +27,8 @@ import javax.naming.Reference; import javax.naming.StringRefAddr; import javax.naming.spi.ObjectFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Converts objects implementing JNDIStorable into a property fields so they can @@ -36,7 +36,7 @@ import org.apache.commons.logging.LogFactory; */ public class JNDIReferenceFactory implements ObjectFactory { - static Log log = LogFactory.getLog(JNDIReferenceFactory.class); + static Logger log = LoggerFactory.getLogger(JNDIReferenceFactory.class); /** * This will be called by a JNDIprovider when a Reference is retrieved from diff --git a/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java b/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java index 6d5a9b7538..8a10ed2600 100755 --- a/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java +++ b/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java @@ -37,8 +37,8 @@ import javax.naming.NotContextException; import javax.naming.OperationNotSupportedException; import javax.naming.Reference; import javax.naming.spi.NamingManager; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A read-only Context

This version assumes it and all its subcontext are @@ -62,7 +62,7 @@ import org.apache.commons.logging.LogFactory; */ @SuppressWarnings("unchecked") public class ReadOnlyContext implements Context, Serializable { - private static final Log LOG = LogFactory.getLog(ReadOnlyContext.class); + private static final Logger LOG = LoggerFactory.getLogger(ReadOnlyContext.class); public static final String SEPARATOR = "/"; protected static final NameParser NAME_PARSER = new NameParserImpl(); private static final long serialVersionUID = -5754338187296859149L; diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/IndexRootContainer.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/IndexRootContainer.java index ceca95d4fd..4bf2914d1c 100755 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/IndexRootContainer.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/IndexRootContainer.java @@ -30,8 +30,8 @@ import org.apache.activemq.kaha.StoreLocation; import org.apache.activemq.kaha.impl.data.Item; import org.apache.activemq.kaha.impl.index.IndexItem; import org.apache.activemq.kaha.impl.index.IndexManager; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A container of roots for other Containers @@ -42,7 +42,7 @@ import org.apache.commons.logging.LogFactory; class IndexRootContainer { protected static final Marshaller ROOT_MARSHALLER = Store.OBJECT_MARSHALLER; - private static final Log LOG = LogFactory.getLog(IndexRootContainer.class); + private static final Logger LOG = LoggerFactory.getLogger(IndexRootContainer.class); protected IndexItem root; protected IndexManager indexManager; diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java index 215f927c0a..13a24e3b63 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java @@ -44,8 +44,8 @@ import org.apache.activemq.kaha.impl.index.IndexItem; import org.apache.activemq.kaha.impl.index.IndexManager; import org.apache.activemq.kaha.impl.index.RedoStoreIndexItem; import org.apache.activemq.util.IOHelper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Store Implementation @@ -64,7 +64,7 @@ public class KahaStore implements Store { //according to the String javadoc, all constant strings are interned so this will be the same object throughout the vm //and we can use it as a monitor for the lockset. private final static String LOCKSET_MONITOR = PROPERTY_PREFIX + ".Lock.Monitor"; - private static final Log LOG = LogFactory.getLog(KahaStore.class); + private static final Logger LOG = LoggerFactory.getLogger(KahaStore.class); private final File directory; private final String mode; diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java index ab9ca24c16..273563254d 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java @@ -40,8 +40,8 @@ import org.apache.activemq.kaha.impl.async.DataFileAppender.WriteKey; import org.apache.activemq.thread.Scheduler; import org.apache.activemq.util.ByteSequence; import org.apache.activemq.util.IOHelper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @@ -73,7 +73,7 @@ public class AsyncDataManager { public static final int DEFAULT_CLEANUP_INTERVAL = 1000 * 30; public static final int PREFERED_DIFF = 1024 * 512; - private static final Log LOG = LogFactory.getLog(AsyncDataManager.class); + private static final Logger LOG = LoggerFactory.getLogger(AsyncDataManager.class); protected Scheduler scheduler; protected final Map inflightWrites = new ConcurrentHashMap(); diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/ReadOnlyAsyncDataManager.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/ReadOnlyAsyncDataManager.java index 5b67b70cd3..cbc167499c 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/ReadOnlyAsyncDataManager.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/ReadOnlyAsyncDataManager.java @@ -25,8 +25,8 @@ import java.util.List; import org.apache.activemq.thread.Scheduler; import org.apache.activemq.util.ByteSequence; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * An AsyncDataManager that works in read only mode against multiple data directories. @@ -34,7 +34,7 @@ import org.apache.commons.logging.LogFactory; */ public class ReadOnlyAsyncDataManager extends AsyncDataManager { - private static final Log LOG = LogFactory.getLog(ReadOnlyAsyncDataManager.class); + private static final Logger LOG = LoggerFactory.getLogger(ReadOnlyAsyncDataManager.class); private final ArrayList dirs; public ReadOnlyAsyncDataManager(final ArrayList dirs) { diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/BaseContainerImpl.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/BaseContainerImpl.java index 1bbab91608..3ce8542584 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/BaseContainerImpl.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/BaseContainerImpl.java @@ -30,8 +30,8 @@ import org.apache.activemq.kaha.impl.index.IndexItem; import org.apache.activemq.kaha.impl.index.IndexLinkedList; import org.apache.activemq.kaha.impl.index.IndexManager; import org.apache.activemq.kaha.impl.index.VMIndexLinkedList; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Implementation of a ListContainer @@ -40,7 +40,7 @@ import org.apache.commons.logging.LogFactory; */ public abstract class BaseContainerImpl { - private static final Log LOG = LogFactory.getLog(BaseContainerImpl.class); + private static final Logger LOG = LoggerFactory.getLogger(BaseContainerImpl.class); protected IndexItem root; protected IndexLinkedList indexList; protected IndexManager indexManager; diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java index fcaa268c11..0e77f083d2 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java @@ -34,8 +34,8 @@ import org.apache.activemq.kaha.impl.DataManager; import org.apache.activemq.kaha.impl.data.Item; import org.apache.activemq.kaha.impl.index.IndexItem; import org.apache.activemq.kaha.impl.index.IndexManager; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Implementation of a ListContainer @@ -44,7 +44,7 @@ import org.apache.commons.logging.LogFactory; */ public class ListContainerImpl extends BaseContainerImpl implements ListContainer { - private static final Log LOG = LogFactory.getLog(ListContainerImpl.class); + private static final Logger LOG = LoggerFactory.getLogger(ListContainerImpl.class); protected Marshaller marshaller = Store.OBJECT_MARSHALLER; public ListContainerImpl(ContainerId id, IndexItem root, IndexManager indexManager, diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/MapContainerImpl.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/MapContainerImpl.java index 0fd702123d..4caea04258 100755 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/MapContainerImpl.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/MapContainerImpl.java @@ -40,8 +40,8 @@ import org.apache.activemq.kaha.impl.index.IndexManager; import org.apache.activemq.kaha.impl.index.VMIndex; import org.apache.activemq.kaha.impl.index.hash.HashIndex; import org.apache.activemq.util.IOHelper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Implementation of a MapContainer @@ -50,7 +50,7 @@ import org.apache.commons.logging.LogFactory; */ public final class MapContainerImpl extends BaseContainerImpl implements MapContainer { - private static final Log LOG = LogFactory.getLog(MapContainerImpl.class); + private static final Logger LOG = LoggerFactory.getLogger(MapContainerImpl.class); protected Index index; protected Marshaller keyMarshaller = Store.OBJECT_MARSHALLER; protected Marshaller valueMarshaller = Store.OBJECT_MARSHALLER; diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataManagerImpl.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataManagerImpl.java index e6daae6e93..cffe1cbe88 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataManagerImpl.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataManagerImpl.java @@ -32,8 +32,8 @@ import org.apache.activemq.kaha.impl.DataManager; import org.apache.activemq.kaha.impl.index.RedoStoreIndexItem; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.IOHelper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Manages DataFiles @@ -47,7 +47,7 @@ public final class DataManagerImpl implements DataManager { public static final byte REDO_ITEM_TYPE = 2; public static final long MAX_FILE_LENGTH = 1024 * 1024 * 32; - private static final Log LOG = LogFactory.getLog(DataManagerImpl.class); + private static final Logger LOG = LoggerFactory.getLogger(DataManagerImpl.class); private static final String NAME_PREFIX = "data-"; private final File directory; diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java index 16c738820f..647cb8c3b7 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java @@ -24,8 +24,8 @@ import java.util.concurrent.atomic.AtomicLong; import org.apache.activemq.kaha.impl.DataManager; import org.apache.activemq.util.IOHelper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Optimized Store reader @@ -35,7 +35,7 @@ import org.apache.commons.logging.LogFactory; public final class IndexManager { public static final String NAME_PREFIX = "index-"; - private static final Log LOG = LogFactory.getLog(IndexManager.class); + private static final Logger LOG = LoggerFactory.getLogger(IndexManager.class); private final String name; private File directory; private File file; diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/VMIndex.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/VMIndex.java index aca8de8634..b1d6ff1cf1 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/VMIndex.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/VMIndex.java @@ -23,8 +23,8 @@ import java.util.Map; import org.apache.activemq.kaha.IndexMBean; import org.apache.activemq.kaha.Marshaller; import org.apache.activemq.kaha.StoreEntry; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Index implementation using a HashMap @@ -32,7 +32,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.2 $ */ public class VMIndex implements Index, IndexMBean { - private static final Log LOG = LogFactory.getLog(VMIndex.class); + private static final Logger LOG = LoggerFactory.getLogger(VMIndex.class); private IndexManager indexManager; private Map map = new HashMap(); diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndex.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndex.java index 1ea30d95d5..34a743cafc 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndex.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndex.java @@ -30,8 +30,8 @@ import org.apache.activemq.util.DataByteArrayInputStream; import org.apache.activemq.util.DataByteArrayOutputStream; import org.apache.activemq.util.IOHelper; import org.apache.activemq.util.LRUCache; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * BTree implementation @@ -46,7 +46,7 @@ public class HashIndex implements Index, HashIndexMBean { public static final int DEFAULT_LOAD_FACTOR; private static final int LOW_WATER_MARK=1024*16; private static final String NAME_PREFIX = "hash-index-"; - private static final Log LOG = LogFactory.getLog(HashIndex.class); + private static final Logger LOG = LoggerFactory.getLogger(HashIndex.class); private final String name; private File directory; private File file; diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashPage.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashPage.java index 21029a97b4..29dd734c0a 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashPage.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashPage.java @@ -23,8 +23,8 @@ import java.util.ArrayList; import java.util.List; import org.apache.activemq.kaha.Marshaller; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A Page within a HashPage @@ -33,7 +33,7 @@ import org.apache.commons.logging.LogFactory; */ class HashPage { static final int PAGE_HEADER_SIZE = 17; - private static final transient Log LOG = LogFactory.getLog(HashPage.class); + private static final transient Logger LOG = LoggerFactory.getLogger(HashPage.class); private int maximumEntries; private long id; diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeIndex.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeIndex.java index f2ab270b33..15ee19cb86 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeIndex.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeIndex.java @@ -28,8 +28,8 @@ import org.apache.activemq.util.DataByteArrayInputStream; import org.apache.activemq.util.DataByteArrayOutputStream; import org.apache.activemq.util.IOHelper; import org.apache.activemq.util.LRUCache; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * BTree implementation @@ -41,7 +41,7 @@ public class TreeIndex implements Index { private static final String NAME_PREFIX = "tree-index-"; private static final int DEFAULT_PAGE_SIZE; private static final int DEFAULT_KEY_SIZE; - private static final Log LOG = LogFactory.getLog(TreeIndex.class); + private static final Logger LOG = LoggerFactory.getLogger(TreeIndex.class); private final String name; private File directory; private File file; diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePage.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePage.java index 5fda6f101f..ade058972b 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePage.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePage.java @@ -25,8 +25,8 @@ import java.util.List; import java.util.Set; import org.apache.activemq.kaha.Marshaller; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Page in a BTree @@ -36,7 +36,7 @@ import org.apache.commons.logging.LogFactory; class TreePage { static final int PAGE_HEADER_SIZE = 18; - private static final transient Log LOG = LogFactory.getLog(TreePage.class); + private static final transient Logger LOG = LoggerFactory.getLogger(TreePage.class); static enum Flavour { LESS, MORE @@ -743,11 +743,11 @@ class TreePage { } protected void dump() throws IOException { - LOG.info(this); + LOG.info(this.toString()); Set set = new HashSet(); for (TreeEntry entry : treeEntries) { if (entry != null) { - LOG.info(entry); + LOG.info(entry.toString()); set.add(entry.getPrevPageId()); set.add(entry.getNextPageId()); } diff --git a/activemq-core/src/main/java/org/apache/activemq/management/JMSEndpointStatsImpl.java b/activemq-core/src/main/java/org/apache/activemq/management/JMSEndpointStatsImpl.java index cc692efe79..2e2a2d00df 100755 --- a/activemq-core/src/main/java/org/apache/activemq/management/JMSEndpointStatsImpl.java +++ b/activemq-core/src/main/java/org/apache/activemq/management/JMSEndpointStatsImpl.java @@ -22,8 +22,8 @@ import javax.jms.MessageProducer; import javax.jms.Session; import org.apache.activemq.util.IndentPrinter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Statistics for a JMS endpoint, typically a MessageProducer or MessageConsumer @@ -33,7 +33,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.3 $ */ public class JMSEndpointStatsImpl extends StatsImpl { - private static final Log LOG = LogFactory.getLog(JMSEndpointStatsImpl.class); + private static final Logger LOG = LoggerFactory.getLogger(JMSEndpointStatsImpl.class); protected CountStatisticImpl messageCount; protected CountStatisticImpl pendingMessageCount; diff --git a/activemq-core/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java b/activemq-core/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java index de3eb5e4f5..53a3316097 100755 --- a/activemq-core/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java +++ b/activemq-core/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java @@ -26,12 +26,12 @@ import org.apache.activemq.thread.TaskRunner; import org.apache.activemq.thread.TaskRunnerFactory; import org.apache.activemq.usage.Usage; import org.apache.activemq.usage.UsageListener; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class CacheEvictionUsageListener implements UsageListener { - private static final Log LOG = LogFactory.getLog(CacheEvictionUsageListener.class); + private static final Logger LOG = LoggerFactory.getLogger(CacheEvictionUsageListener.class); private final List evictors = new CopyOnWriteArrayList(); private final int usageHighMark; diff --git a/activemq-core/src/main/java/org/apache/activemq/memory/list/SimpleMessageList.java b/activemq-core/src/main/java/org/apache/activemq/memory/list/SimpleMessageList.java index 751f281156..a49da3a2b4 100644 --- a/activemq-core/src/main/java/org/apache/activemq/memory/list/SimpleMessageList.java +++ b/activemq-core/src/main/java/org/apache/activemq/memory/list/SimpleMessageList.java @@ -24,8 +24,8 @@ import org.apache.activemq.broker.region.MessageReference; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.Message; import org.apache.activemq.filter.DestinationFilter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A simple fixed size {@link MessageList} where there is a single, fixed size @@ -36,7 +36,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.1 $ */ public class SimpleMessageList implements MessageList { - private static final Log LOG = LogFactory.getLog(SimpleMessageList.class); + private static final Logger LOG = LoggerFactory.getLogger(SimpleMessageList.class); private final LinkedList list = new LinkedList(); private int maximumSize = 100 * 64 * 1024; private int size; diff --git a/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java b/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java index a9fc6566aa..e44450483c 100644 --- a/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java @@ -26,8 +26,8 @@ import org.apache.activemq.command.Endpoint; import org.apache.activemq.command.NetworkBridgeFilter; import org.apache.activemq.transport.Transport; import org.apache.activemq.util.ServiceSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A demand forwarding bridge which works with multicast style transports where @@ -38,7 +38,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class CompositeDemandForwardingBridge extends DemandForwardingBridgeSupport { - private static final Log LOG = LogFactory.getLog(CompositeDemandForwardingBridge.class); + private static final Logger LOG = LoggerFactory.getLogger(CompositeDemandForwardingBridge.class); protected final BrokerId remoteBrokerPath[] = new BrokerId[] {null}; protected Object brokerInfoMutex = new Object(); diff --git a/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java b/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java index 26f4462c43..9b1db6f5f8 100644 --- a/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java @@ -26,8 +26,8 @@ import org.apache.activemq.command.ConsumerId; import org.apache.activemq.command.ConsumerInfo; import org.apache.activemq.filter.DestinationFilter; import org.apache.activemq.transport.Transport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Consolidates subscriptions @@ -35,7 +35,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.1 $ */ public class ConduitBridge extends DemandForwardingBridge { - private static final Log LOG = LogFactory.getLog(ConduitBridge.class); + private static final Logger LOG = LoggerFactory.getLogger(ConduitBridge.class); /** * Constructor diff --git a/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java b/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java index b84c196a06..ef41e55921 100755 --- a/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java @@ -25,8 +25,8 @@ import org.apache.activemq.command.ConsumerInfo; import org.apache.activemq.command.NetworkBridgeFilter; import org.apache.activemq.transport.Transport; import org.apache.activemq.util.ServiceSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Forwards messages from the local broker to the remote broker based on demand. @@ -36,7 +36,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class DemandForwardingBridge extends DemandForwardingBridgeSupport { - private static final Log LOG = LogFactory.getLog(DemandForwardingBridge.class); + private static final Logger LOG = LoggerFactory.getLogger(DemandForwardingBridge.class); protected final BrokerId remoteBrokerPath[] = new BrokerId[] {null}; protected Object brokerInfoMutex = new Object(); diff --git a/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java b/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java index 318947e564..148e64de1c 100644 --- a/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java @@ -81,8 +81,8 @@ import org.apache.activemq.util.LongSequenceGenerator; import org.apache.activemq.util.MarshallingSupport; import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.util.ServiceSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A useful base class for implementing demand forwarding bridges. @@ -90,7 +90,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, BrokerServiceAware { - private static final Log LOG = LogFactory.getLog(DemandForwardingBridgeSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(DemandForwardingBridgeSupport.class); private final TaskRunnerFactory asyncTaskRunner = DefaultThreadPools.getDefaultTaskRunnerFactory(); protected static final String DURABLE_SUB_PREFIX = "NC-DS_"; protected final Transport localBroker; diff --git a/activemq-core/src/main/java/org/apache/activemq/network/DemandSubscription.java b/activemq-core/src/main/java/org/apache/activemq/network/DemandSubscription.java index b5ccf9dcf5..7c5f3b97e0 100644 --- a/activemq-core/src/main/java/org/apache/activemq/network/DemandSubscription.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/DemandSubscription.java @@ -23,8 +23,8 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.activemq.command.ConsumerId; import org.apache.activemq.command.ConsumerInfo; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Represents a network bridge interface @@ -32,7 +32,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.1 $ */ public class DemandSubscription { - private static final Log LOG = LogFactory.getLog(DemandSubscription.class); + private static final Logger LOG = LoggerFactory.getLogger(DemandSubscription.class); private final ConsumerInfo remoteInfo; private final ConsumerInfo localInfo; diff --git a/activemq-core/src/main/java/org/apache/activemq/network/DiscoveryNetworkConnector.java b/activemq-core/src/main/java/org/apache/activemq/network/DiscoveryNetworkConnector.java index 18fc08e7dd..cf22024f14 100644 --- a/activemq-core/src/main/java/org/apache/activemq/network/DiscoveryNetworkConnector.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/DiscoveryNetworkConnector.java @@ -37,8 +37,8 @@ import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.util.ServiceSupport; import org.apache.activemq.util.URISupport; import org.apache.activemq.util.URISupport.CompositeData; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.management.ObjectName; @@ -50,7 +50,7 @@ import javax.management.ObjectName; * @version $Revision$ */ public class DiscoveryNetworkConnector extends NetworkConnector implements DiscoveryListener { - private static final Log LOG = LogFactory.getLog(DiscoveryNetworkConnector.class); + private static final Logger LOG = LoggerFactory.getLogger(DiscoveryNetworkConnector.class); private DiscoveryAgent discoveryAgent; diff --git a/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java b/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java index 19b70c53e7..30ba101a95 100644 --- a/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java @@ -24,8 +24,8 @@ import org.apache.activemq.command.ConsumerId; import org.apache.activemq.command.ConsumerInfo; import org.apache.activemq.filter.DestinationFilter; import org.apache.activemq.transport.Transport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Consolidates subscriptions @@ -33,7 +33,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.1 $ */ public class DurableConduitBridge extends ConduitBridge { - private static final Log LOG = LogFactory.getLog(DurableConduitBridge.class); + private static final Logger LOG = LoggerFactory.getLogger(DurableConduitBridge.class); /** * Constructor diff --git a/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java b/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java index d08d23f5ec..4deaec9ad9 100755 --- a/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java @@ -43,8 +43,8 @@ import org.apache.activemq.transport.Transport; import org.apache.activemq.util.IdGenerator; import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.util.ServiceSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Forwards all messages from the local broker to the remote broker. @@ -56,7 +56,7 @@ import org.apache.commons.logging.LogFactory; public class ForwardingBridge implements Service { private static final IdGenerator ID_GENERATOR = new IdGenerator(); - private static final Log LOG = LogFactory.getLog(ForwardingBridge.class); + private static final Logger LOG = LoggerFactory.getLogger(ForwardingBridge.class); final AtomicLong enqueueCounter = new AtomicLong(); final AtomicLong dequeueCounter = new AtomicLong(); diff --git a/activemq-core/src/main/java/org/apache/activemq/network/LdapNetworkConnector.java b/activemq-core/src/main/java/org/apache/activemq/network/LdapNetworkConnector.java index 3734dbcd64..cce0110ea6 100644 --- a/activemq-core/src/main/java/org/apache/activemq/network/LdapNetworkConnector.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/LdapNetworkConnector.java @@ -38,8 +38,8 @@ import javax.naming.event.ObjectChangeListener; import org.apache.activemq.util.URISupport; import org.apache.activemq.util.URISupport.CompositeData; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * class to create dynamic network connectors listed in an directory @@ -58,7 +58,7 @@ public class LdapNetworkConnector implements NamespaceChangeListener, ObjectChangeListener { - private static final Log LOG = LogFactory.getLog(LdapNetworkConnector.class); + private static final Logger LOG = LoggerFactory.getLogger(LdapNetworkConnector.class); // force returned entries to implement the ipHost and ipService object classes (RFC 2307) private static final String REQUIRED_OBJECT_CLASS_FILTER = "(&(objectClass=ipHost)(objectClass=ipService))"; diff --git a/activemq-core/src/main/java/org/apache/activemq/network/MBeanNetworkListener.java b/activemq-core/src/main/java/org/apache/activemq/network/MBeanNetworkListener.java index c4977760ab..59f650fadc 100644 --- a/activemq-core/src/main/java/org/apache/activemq/network/MBeanNetworkListener.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/MBeanNetworkListener.java @@ -21,8 +21,8 @@ import org.apache.activemq.broker.jmx.AnnotatedMBean; import org.apache.activemq.broker.jmx.NetworkBridgeView; import org.apache.activemq.broker.jmx.NetworkBridgeViewMBean; import org.apache.activemq.util.JMXSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; @@ -31,7 +31,7 @@ import java.util.Map; public class MBeanNetworkListener implements NetworkBridgeListener { - private static final Log LOG = LogFactory.getLog(MBeanNetworkListener.class); + private static final Logger LOG = LoggerFactory.getLogger(MBeanNetworkListener.class); BrokerService brokerService; ObjectName connectorName; diff --git a/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java b/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java index 7cf1e6f470..b80e7645fc 100644 --- a/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java @@ -42,15 +42,15 @@ import org.apache.activemq.transport.TransportFactory; import org.apache.activemq.util.JMXSupport; import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.util.ServiceSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public abstract class NetworkConnector extends NetworkBridgeConfiguration implements Service { - private static final Log LOG = LogFactory.getLog(NetworkConnector.class); + private static final Logger LOG = LoggerFactory.getLogger(NetworkConnector.class); protected URI localURI; protected ConnectionFilter connectionFilter; protected ConcurrentHashMap bridges = new ConcurrentHashMap(); diff --git a/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java b/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java index d4977264e4..4121154387 100755 --- a/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java @@ -26,8 +26,8 @@ import javax.jms.MessageListener; import javax.jms.MessageProducer; import javax.naming.NamingException; import org.apache.activemq.Service; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A Destination bridge is used to bridge between to different JMS systems @@ -35,7 +35,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.1.1.1 $ */ public abstract class DestinationBridge implements Service, MessageListener { - private static final Log LOG = LogFactory.getLog(DestinationBridge.class); + private static final Logger LOG = LoggerFactory.getLogger(DestinationBridge.class); protected MessageConsumer consumer; protected AtomicBoolean started = new AtomicBoolean(false); protected JmsMesageConvertor jmsMessageConvertor; diff --git a/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsConnector.java b/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsConnector.java index b4d321f46b..d84b5e426a 100755 --- a/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsConnector.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsConnector.java @@ -31,8 +31,8 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.Service; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.util.LRUCache; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.jndi.JndiTemplate; /** @@ -45,7 +45,7 @@ import org.springframework.jndi.JndiTemplate; public abstract class JmsConnector implements Service { private static int nextId; - private static final Log LOG = LogFactory.getLog(JmsConnector.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsConnector.class); protected JndiTemplate jndiLocalTemplate; protected JndiTemplate jndiOutboundTemplate; diff --git a/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsQueueConnector.java b/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsQueueConnector.java index 44a22dc47a..06f8687cbf 100755 --- a/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsQueueConnector.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsQueueConnector.java @@ -26,8 +26,8 @@ import javax.jms.QueueSession; import javax.jms.Session; import javax.naming.NamingException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A Bridge to other JMS Queue providers @@ -37,7 +37,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.1.1.1 $ */ public class JmsQueueConnector extends JmsConnector { - private static final Log LOG = LogFactory.getLog(JmsQueueConnector.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsQueueConnector.class); private String outboundQueueConnectionFactoryName; private String localConnectionFactoryName; private QueueConnectionFactory outboundQueueConnectionFactory; diff --git a/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsTopicConnector.java b/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsTopicConnector.java index 2e98747f9b..d10dd37f45 100755 --- a/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsTopicConnector.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsTopicConnector.java @@ -26,8 +26,8 @@ import javax.jms.TopicConnectionFactory; import javax.jms.TopicSession; import javax.naming.NamingException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A Bridge to other JMS Topic providers @@ -37,7 +37,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.1.1.1 $ */ public class JmsTopicConnector extends JmsConnector { - private static final Log LOG = LogFactory.getLog(JmsTopicConnector.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsTopicConnector.class); private String outboundTopicConnectionFactoryName; private String localConnectionFactoryName; private TopicConnectionFactory outboundTopicConnectionFactory; diff --git a/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBroker.java b/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBroker.java index f6ca62d202..7e841e99d3 100644 --- a/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBroker.java @@ -23,15 +23,15 @@ import org.apache.activemq.broker.ConnectionContext; import org.apache.activemq.broker.region.MessageReference; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.Message; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author Filip Hanik * @version 1.0 */ public class DiscardingDLQBroker extends BrokerFilter { - public static Log log = LogFactory.getLog(DiscardingDLQBroker.class); + public static Logger log = LoggerFactory.getLogger(DiscardingDLQBroker.class); private boolean dropTemporaryTopics = true; private boolean dropTemporaryQueues = true; private boolean dropAll = true; diff --git a/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBrokerPlugin.java b/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBrokerPlugin.java index e67a07725b..ef45788e5c 100644 --- a/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBrokerPlugin.java +++ b/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBrokerPlugin.java @@ -22,8 +22,8 @@ import java.util.regex.Pattern; import org.apache.activemq.broker.Broker; import org.apache.activemq.broker.BrokerPlugin; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author Filip Hanik @@ -34,7 +34,7 @@ public class DiscardingDLQBrokerPlugin implements BrokerPlugin { public DiscardingDLQBrokerPlugin() { } - public static Log log = LogFactory.getLog(DiscardingDLQBrokerPlugin.class); + public static Logger log = LoggerFactory.getLogger(DiscardingDLQBrokerPlugin.class); private boolean dropTemporaryTopics = true; private boolean dropTemporaryQueues = true; private boolean dropAll = true; diff --git a/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBroker.java b/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBroker.java index 43a807bf12..249ed00beb 100644 --- a/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBroker.java @@ -21,8 +21,8 @@ import org.apache.activemq.broker.Broker; import org.apache.activemq.broker.BrokerFilter; import org.apache.activemq.broker.ProducerBrokerExchange; import org.apache.activemq.command.Message; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** @@ -33,7 +33,7 @@ import org.apache.commons.logging.LogFactory; * @org.apache.xbean.XBean element="forcePersistencyModeBroker" */ public class ForcePersistencyModeBroker extends BrokerFilter{ - public static Log log = LogFactory.getLog(ForcePersistencyModeBroker.class); + public static Logger log = LoggerFactory.getLogger(ForcePersistencyModeBroker.class); private boolean persistence = false; /** diff --git a/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBrokerPlugin.java b/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBrokerPlugin.java index 7ee24e1eb8..2393a403d0 100644 --- a/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBrokerPlugin.java +++ b/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBrokerPlugin.java @@ -19,8 +19,8 @@ package org.apache.activemq.plugin; import org.apache.activemq.broker.Broker; import org.apache.activemq.broker.BrokerPlugin; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** @@ -31,7 +31,7 @@ import org.apache.commons.logging.LogFactory; * @org.apache.xbean.XBean element="forcePersistencyModeBrokerPlugin" */ public class ForcePersistencyModeBrokerPlugin implements BrokerPlugin { - private static Log LOG = LogFactory.getLog(ForcePersistencyModeBrokerPlugin.class); + private static Logger LOG = LoggerFactory.getLogger(ForcePersistencyModeBrokerPlugin.class); private boolean persistenceFlag = false; /** diff --git a/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java b/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java index 1d10778d7c..c5df8d9ddf 100644 --- a/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java @@ -35,8 +35,8 @@ import org.apache.activemq.state.ProducerState; import org.apache.activemq.usage.SystemUsage; import org.apache.activemq.util.IdGenerator; import org.apache.activemq.util.LongSequenceGenerator; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.File; import java.net.URI; import java.util.Set; @@ -47,7 +47,7 @@ import java.util.Set; * */ public class StatisticsBroker extends BrokerFilter { - private static Log LOG = LogFactory.getLog(StatisticsBroker.class); + private static Logger LOG = LoggerFactory.getLogger(StatisticsBroker.class); static final String STATS_DESTINATION_PREFIX = "ActiveMQ.Statistics.Destination"; static final String STATS_BROKER_PREFIX = "ActiveMQ.Statistics.Broker"; private static final IdGenerator ID_GENERATOR = new IdGenerator(); diff --git a/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBrokerPlugin.java b/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBrokerPlugin.java index eeb6a505ed..a78af2026b 100644 --- a/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBrokerPlugin.java +++ b/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBrokerPlugin.java @@ -18,8 +18,8 @@ package org.apache.activemq.plugin; import org.apache.activemq.broker.Broker; import org.apache.activemq.broker.BrokerPlugin; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A StatisticsBrokerPlugin @@ -35,7 +35,7 @@ import org.apache.commons.logging.LogFactory; * */ public class StatisticsBrokerPlugin implements BrokerPlugin { - private static Log LOG = LogFactory.getLog(StatisticsBrokerPlugin.class); + private static Logger LOG = LoggerFactory.getLogger(StatisticsBrokerPlugin.class); /** * @param broker * @return the plug-in diff --git a/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnection.java b/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnection.java index 16f5230040..c7da81ac8f 100644 --- a/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnection.java +++ b/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnection.java @@ -26,12 +26,12 @@ import org.apache.activemq.transport.DefaultTransportListener; import org.apache.activemq.transport.Transport; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.ServiceStopper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; class ProxyConnection implements Service { - private static final Log LOG = LogFactory.getLog(ProxyConnection.class); + private static final Logger LOG = LoggerFactory.getLogger(ProxyConnection.class); private final Transport localTransport; private final Transport remoteTransport; diff --git a/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnector.java b/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnector.java index f1c15a5383..96d5e25f4f 100644 --- a/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnector.java +++ b/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnector.java @@ -29,8 +29,8 @@ import org.apache.activemq.transport.TransportFactory; import org.apache.activemq.transport.TransportFilter; import org.apache.activemq.transport.TransportServer; import org.apache.activemq.util.ServiceStopper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @org.apache.xbean.XBean @@ -39,7 +39,7 @@ import org.apache.commons.logging.LogFactory; */ public class ProxyConnector implements Service { - private static final Log LOG = LogFactory.getLog(ProxyConnector.class); + private static final Logger LOG = LoggerFactory.getLogger(ProxyConnector.class); private TransportServer server; private URI bind; private URI remote; diff --git a/activemq-core/src/main/java/org/apache/activemq/security/LDAPAuthorizationMap.java b/activemq-core/src/main/java/org/apache/activemq/security/LDAPAuthorizationMap.java index 647602eeb1..74a22659ec 100755 --- a/activemq-core/src/main/java/org/apache/activemq/security/LDAPAuthorizationMap.java +++ b/activemq-core/src/main/java/org/apache/activemq/security/LDAPAuthorizationMap.java @@ -36,8 +36,8 @@ import javax.naming.directory.SearchResult; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.jaas.GroupPrincipal; import org.apache.activemq.jaas.LDAPLoginModule; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * An {@link AuthorizationMap} which uses LDAP @@ -66,7 +66,7 @@ public class LDAPAuthorizationMap implements AuthorizationMap { public static final String WRITE_BASE = "writeBAse"; public static final String WRITE_ATTRIBUTE = "writeAttribute"; - private static final Log LOG = LogFactory.getLog(LDAPLoginModule.class); + private static final Logger LOG = LoggerFactory.getLogger(LDAPLoginModule.class); private String initialContextFactory; private String connectionURL; @@ -307,7 +307,7 @@ public class LDAPAuthorizationMap implements AuthorizationMap { try { context = open(); } catch (NamingException e) { - LOG.error(e); + LOG.error(e.toString()); return new HashSet(); } @@ -356,7 +356,7 @@ public class LDAPAuthorizationMap implements AuthorizationMap { } return roles; } catch (NamingException e) { - LOG.error(e); + LOG.error(e.toString()); return new HashSet(); } } @@ -400,7 +400,7 @@ public class LDAPAuthorizationMap implements AuthorizationMap { context = new InitialDirContext(env); } catch (NamingException e) { - LOG.error(e); + LOG.error(e.toString()); throw e; } return context; diff --git a/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java b/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java index aa9319ef21..8d7d896901 100755 --- a/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java +++ b/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java @@ -47,8 +47,8 @@ import org.apache.activemq.command.SessionInfo; import org.apache.activemq.command.TransactionInfo; import org.apache.activemq.transport.Transport; import org.apache.activemq.util.IOExceptionSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Tracks the state of a connection so a newly established transport can be @@ -57,7 +57,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class ConnectionStateTracker extends CommandVisitorAdapter { - private static final Log LOG = LogFactory.getLog(ConnectionStateTracker.class); + private static final Logger LOG = LoggerFactory.getLogger(ConnectionStateTracker.class); private static final Tracked TRACKED_RESPONSE_MARKER = new Tracked(null); diff --git a/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java b/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java index 2ce84738e0..e691e02d49 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java @@ -51,8 +51,8 @@ import org.apache.activemq.transaction.Synchronization; import org.apache.activemq.usage.MemoryUsage; import org.apache.activemq.util.Callback; import org.apache.activemq.util.TransactionTemplate; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A MessageStore that uses a Journal to store it's messages. @@ -60,7 +60,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.14 $ */ public class AMQMessageStore extends AbstractMessageStore { - private static final Log LOG = LogFactory.getLog(AMQMessageStore.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQMessageStore.class); protected final AMQPersistenceAdapter peristenceAdapter; protected final AMQTransactionStore transactionStore; protected final ReferenceStore referenceStore; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java b/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java index 9dd43226b5..eebbb6ba55 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java @@ -70,8 +70,8 @@ import org.apache.activemq.util.ByteSequence; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.IOHelper; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** @@ -84,7 +84,7 @@ import org.apache.commons.logging.LogFactory; */ public class AMQPersistenceAdapter implements PersistenceAdapter, UsageListener, BrokerServiceAware { - private static final Log LOG = LogFactory.getLog(AMQPersistenceAdapter.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQPersistenceAdapter.class); private Scheduler scheduler; private final ConcurrentHashMap queues = new ConcurrentHashMap(); private final ConcurrentHashMap topics = new ConcurrentHashMap(); diff --git a/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTopicMessageStore.java b/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTopicMessageStore.java index 3b8bb25c03..9a8d4aa891 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTopicMessageStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTopicMessageStore.java @@ -35,8 +35,8 @@ import org.apache.activemq.store.TopicReferenceStore; import org.apache.activemq.transaction.Synchronization; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.SubscriptionKey; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A MessageStore that uses a Journal to store it's messages. @@ -45,7 +45,7 @@ import org.apache.commons.logging.LogFactory; */ public class AMQTopicMessageStore extends AMQMessageStore implements TopicMessageStore { - private static final Log LOG = LogFactory.getLog(AMQTopicMessageStore.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQTopicMessageStore.class); private TopicReferenceStore topicReferenceStore; public AMQTopicMessageStore(AMQPersistenceAdapter adapter,TopicReferenceStore topicReferenceStore, ActiveMQTopic destinationName) { super(adapter, topicReferenceStore, destinationName); diff --git a/activemq-core/src/main/java/org/apache/activemq/store/amq/RecoveryListenerAdapter.java b/activemq-core/src/main/java/org/apache/activemq/store/amq/RecoveryListenerAdapter.java index 4b5cfa24d8..8a41a10566 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/amq/RecoveryListenerAdapter.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/amq/RecoveryListenerAdapter.java @@ -20,12 +20,12 @@ import org.apache.activemq.command.Message; import org.apache.activemq.command.MessageId; import org.apache.activemq.store.MessageRecoveryListener; import org.apache.activemq.store.MessageStore; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; final class RecoveryListenerAdapter implements MessageRecoveryListener { - private static final Log LOG = LogFactory.getLog(RecoveryListenerAdapter.class); + private static final Logger LOG = LoggerFactory.getLogger(RecoveryListenerAdapter.class); private final MessageStore store; private final MessageRecoveryListener listener; private int count; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java index ec4301f2c0..019248f787 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java @@ -24,8 +24,8 @@ import java.sql.SQLException; import javax.sql.DataSource; import org.apache.activemq.util.Handler; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Represents an exclusive lock on a database to avoid multiple brokers running @@ -36,7 +36,7 @@ import org.apache.commons.logging.LogFactory; */ public class DefaultDatabaseLocker implements DatabaseLocker { public static final long DEFAULT_LOCK_ACQUIRE_SLEEP_INTERVAL = 1000; - private static final Log LOG = LogFactory.getLog(DefaultDatabaseLocker.class); + private static final Logger LOG = LoggerFactory.getLogger(DefaultDatabaseLocker.class); protected DataSource dataSource; protected Statements statements; protected long lockAcquireSleepInterval = DEFAULT_LOCK_ACQUIRE_SLEEP_INTERVAL; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java index c707823388..adeab5bd1c 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java @@ -32,15 +32,15 @@ import org.apache.activemq.util.ByteSequence; import org.apache.activemq.util.ByteSequenceData; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.10 $ */ public class JDBCMessageStore extends AbstractMessageStore { - private static final Log LOG = LogFactory.getLog(JDBCMessageStore.class); + private static final Logger LOG = LoggerFactory.getLogger(JDBCMessageStore.class); protected final WireFormat wireFormat; protected final JDBCAdapter adapter; protected final JDBCPersistenceAdapter persistenceAdapter; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java index 9192fb2164..88f76eec17 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java @@ -51,8 +51,8 @@ import org.apache.activemq.util.FactoryFinder; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.LongSequenceGenerator; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A {@link PersistenceAdapter} implementation using JDBC for persistence @@ -69,7 +69,7 @@ import org.apache.commons.logging.LogFactory; public class JDBCPersistenceAdapter extends DataSourceSupport implements PersistenceAdapter, BrokerServiceAware { - private static final Log LOG = LogFactory.getLog(JDBCPersistenceAdapter.class); + private static final Logger LOG = LoggerFactory.getLogger(JDBCPersistenceAdapter.class); private static FactoryFinder adapterFactoryFinder = new FactoryFinder( "META-INF/services/org/apache/activemq/store/jdbc/"); private static FactoryFinder lockFactoryFinder = new FactoryFinder( diff --git a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCTopicMessageStore.java b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCTopicMessageStore.java index bf4df92a6c..f4a92cc062 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCTopicMessageStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCTopicMessageStore.java @@ -35,15 +35,15 @@ import org.apache.activemq.store.TopicMessageStore; import org.apache.activemq.util.ByteSequence; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.6 $ */ public class JDBCTopicMessageStore extends JDBCMessageStore implements TopicMessageStore { - private static final Log LOG = LogFactory.getLog(JDBCTopicMessageStore.class); + private static final Logger LOG = LoggerFactory.getLogger(JDBCTopicMessageStore.class); private Map subscriberLastRecoveredMap = new ConcurrentHashMap(); public JDBCTopicMessageStore(JDBCPersistenceAdapter persistenceAdapter, JDBCAdapter adapter, WireFormat wireFormat, ActiveMQTopic topic, ActiveMQMessageAudit audit) { diff --git a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java index 93a2e71a1b..8da54a00b2 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java @@ -25,8 +25,8 @@ import java.sql.Statement; import javax.sql.DataSource; import org.apache.activemq.util.IOExceptionSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Helps keep track of the current transaction/JDBC connection. @@ -35,7 +35,7 @@ import org.apache.commons.logging.LogFactory; */ public class TransactionContext { - private static final Log LOG = LogFactory.getLog(TransactionContext.class); + private static final Logger LOG = LoggerFactory.getLogger(TransactionContext.class); private final DataSource dataSource; private Connection connection; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DefaultJDBCAdapter.java b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DefaultJDBCAdapter.java index 0be3180771..0824a3fc63 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DefaultJDBCAdapter.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DefaultJDBCAdapter.java @@ -38,8 +38,8 @@ import org.apache.activemq.store.jdbc.JDBCMessageRecoveryListener; import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter; import org.apache.activemq.store.jdbc.Statements; import org.apache.activemq.store.jdbc.TransactionContext; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Implements all the default JDBC operations that are used by the JDBCPersistenceAdapter.

sub-classing is @@ -55,7 +55,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.10 $ */ public class DefaultJDBCAdapter implements JDBCAdapter { - private static final Log LOG = LogFactory.getLog(DefaultJDBCAdapter.class); + private static final Logger LOG = LoggerFactory.getLogger(DefaultJDBCAdapter.class); public static final int MAX_ROWS = 10000; protected Statements statements; protected boolean batchStatments = true; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactDatabaseLocker.java b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactDatabaseLocker.java index decf0b94c6..a2895b8deb 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactDatabaseLocker.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactDatabaseLocker.java @@ -23,8 +23,8 @@ import java.sql.SQLException; import org.apache.activemq.store.jdbc.DefaultDatabaseLocker; import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Represents an exclusive lock on a database to avoid multiple brokers running @@ -34,7 +34,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class TransactDatabaseLocker extends DefaultDatabaseLocker { - private static final Log LOG = LogFactory.getLog(TransactDatabaseLocker.class); + private static final Logger LOG = LoggerFactory.getLogger(TransactDatabaseLocker.class); public TransactDatabaseLocker() { } diff --git a/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalMessageStore.java b/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalMessageStore.java index b419a44050..ca7c151146 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalMessageStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalMessageStore.java @@ -43,8 +43,8 @@ import org.apache.activemq.usage.MemoryUsage; import org.apache.activemq.usage.SystemUsage; import org.apache.activemq.util.Callback; import org.apache.activemq.util.TransactionTemplate; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A MessageStore that uses a Journal to store it's messages. @@ -53,7 +53,7 @@ import org.apache.commons.logging.LogFactory; */ public class JournalMessageStore extends AbstractMessageStore { - private static final Log LOG = LogFactory.getLog(JournalMessageStore.class); + private static final Logger LOG = LoggerFactory.getLogger(JournalMessageStore.class); protected final JournalPersistenceAdapter peristenceAdapter; protected final JournalTransactionStore transactionStore; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java b/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java index c763ea7a57..c51c05db4f 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java @@ -70,8 +70,8 @@ import org.apache.activemq.usage.UsageListener; import org.apache.activemq.util.ByteSequence; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * An implementation of {@link PersistenceAdapter} designed for use with a @@ -86,7 +86,7 @@ public class JournalPersistenceAdapter implements PersistenceAdapter, JournalEve private BrokerService brokerService; protected Scheduler scheduler; - private static final Log LOG = LogFactory.getLog(JournalPersistenceAdapter.class); + private static final Logger LOG = LoggerFactory.getLogger(JournalPersistenceAdapter.class); private Journal journal; private PersistenceAdapter longTermPersistence; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java b/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java index 2d9fc4b7ce..cabacf076f 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java @@ -29,8 +29,8 @@ import org.apache.activemq.store.jdbc.JDBCAdapter; import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter; import org.apache.activemq.store.jdbc.Statements; import org.apache.activemq.thread.TaskRunnerFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Factory class that can create PersistenceAdapter objects. @@ -42,7 +42,7 @@ public class JournalPersistenceAdapterFactory extends DataSourceSupport implemen private static final int JOURNAL_LOCKED_WAIT_DELAY = 10 * 1000; - private static final Log LOG = LogFactory.getLog(JournalPersistenceAdapterFactory.class); + private static final Logger LOG = LoggerFactory.getLogger(JournalPersistenceAdapterFactory.class); private int journalLogFileSize = 1024 * 1024 * 20; private int journalLogFiles = 2; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTopicMessageStore.java b/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTopicMessageStore.java index 08479ca199..6247695eba 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTopicMessageStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTopicMessageStore.java @@ -33,8 +33,8 @@ import org.apache.activemq.store.TopicMessageStore; import org.apache.activemq.transaction.Synchronization; import org.apache.activemq.util.Callback; import org.apache.activemq.util.SubscriptionKey; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A MessageStore that uses a Journal to store it's messages. @@ -43,7 +43,7 @@ import org.apache.commons.logging.LogFactory; */ public class JournalTopicMessageStore extends JournalMessageStore implements TopicMessageStore { - private static final Log LOG = LogFactory.getLog(JournalTopicMessageStore.class); + private static final Logger LOG = LoggerFactory.getLogger(JournalTopicMessageStore.class); private TopicMessageStore longTermStore; private HashMap ackedLastAckLocations = new HashMap(); diff --git a/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java b/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java index 85b67ec381..dbbc7b9c04 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java @@ -50,8 +50,8 @@ import org.apache.activemq.store.TopicMessageStore; import org.apache.activemq.store.TransactionStore; import org.apache.activemq.usage.SystemUsage; import org.apache.activemq.util.IOHelper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @org.apache.xbean.XBean @@ -60,7 +60,7 @@ import org.apache.commons.logging.LogFactory; public class KahaPersistenceAdapter implements PersistenceAdapter, BrokerServiceAware { private static final int STORE_LOCKED_WAIT_DELAY = 10 * 1000; - private static final Log LOG = LogFactory.getLog(KahaPersistenceAdapter.class); + private static final Logger LOG = LoggerFactory.getLogger(KahaPersistenceAdapter.class); private static final String PREPARED_TRANSACTIONS_NAME = "PreparedTransactions"; protected OpenWireFormat wireFormat = new OpenWireFormat(); diff --git a/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStore.java b/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStore.java index 82c4a9c8ab..e7392039c9 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStore.java @@ -34,8 +34,8 @@ import org.apache.activemq.kaha.StoreEntry; import org.apache.activemq.store.AbstractMessageStore; import org.apache.activemq.store.MessageRecoveryListener; import org.apache.activemq.store.ReferenceStore; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author rajdavies @@ -43,7 +43,7 @@ import org.apache.commons.logging.LogFactory; */ public class KahaReferenceStore extends AbstractMessageStore implements ReferenceStore { - private static final Log LOG = LogFactory.getLog(KahaReferenceStore.class); + private static final Logger LOG = LoggerFactory.getLogger(KahaReferenceStore.class); protected final MapContainer messageContainer; protected KahaReferenceStoreAdapter adapter; // keep track of dispatched messages so that duplicate sends that follow a successful diff --git a/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java b/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java index 5437ef81c9..5c8efe429c 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java @@ -48,14 +48,14 @@ import org.apache.activemq.store.TopicMessageStore; import org.apache.activemq.store.TopicReferenceStore; import org.apache.activemq.store.amq.AMQTx; import org.apache.activemq.util.IOHelper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class KahaReferenceStoreAdapter extends KahaPersistenceAdapter implements ReferenceStoreAdapter { - private static final Log LOG = LogFactory.getLog(KahaReferenceStoreAdapter.class); + private static final Logger LOG = LoggerFactory.getLogger(KahaReferenceStoreAdapter.class); private static final String STORE_STATE = "store-state"; private static final String QUEUE_DATA = "queue-data"; private static final String INDEX_VERSION_NAME = "INDEX_VERSION"; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java b/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java index d84a80b1d5..39a4816e0b 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java @@ -38,11 +38,11 @@ import org.apache.activemq.kaha.Store; import org.apache.activemq.kaha.StoreEntry; import org.apache.activemq.store.MessageRecoveryListener; import org.apache.activemq.store.TopicReferenceStore; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class KahaTopicReferenceStore extends KahaReferenceStore implements TopicReferenceStore { - private static final Log LOG = LogFactory.getLog(KahaTopicReferenceStore.class); + private static final Logger LOG = LoggerFactory.getLogger(KahaTopicReferenceStore.class); protected ListContainer ackContainer; protected Map subscriberMessages = new ConcurrentHashMap(); private MapContainer subscriberContainer; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransaction.java b/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransaction.java index 464b185d50..68fa48d033 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransaction.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransaction.java @@ -24,8 +24,8 @@ import org.apache.activemq.command.BaseCommand; import org.apache.activemq.command.Message; import org.apache.activemq.command.MessageAck; import org.apache.activemq.store.MessageStore; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Stores a messages/acknowledgements for a transaction diff --git a/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransactionStore.java b/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransactionStore.java index aa35abd5aa..e78495b677 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransactionStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransactionStore.java @@ -36,8 +36,8 @@ import org.apache.activemq.store.ProxyTopicMessageStore; import org.apache.activemq.store.TopicMessageStore; import org.apache.activemq.store.TransactionRecoveryListener; import org.apache.activemq.store.TransactionStore; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Provides a TransactionStore implementation that can create transaction aware @@ -46,7 +46,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.4 $ */ public class KahaTransactionStore implements TransactionStore, BrokerServiceAware { - private static final Log LOG = LogFactory.getLog(KahaTransactionStore.class); + private static final Logger LOG = LoggerFactory.getLogger(KahaTransactionStore.class); private final Map transactions = new ConcurrentHashMap(); private final Map prepared; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java b/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java index ff52de1f35..c0ed3a97df 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java @@ -78,13 +78,13 @@ import org.apache.activemq.usage.SystemUsage; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.kahadb.journal.Location; import org.apache.kahadb.page.Transaction; public class KahaDBStore extends MessageDatabase implements PersistenceAdapter { - static final Log LOG = LogFactory.getLog(KahaDBStore.class); + static final Logger LOG = LoggerFactory.getLogger(KahaDBStore.class); private static final int MAX_ASYNC_JOBS = 10000; public static final String PROPERTY_CANCELED_TASK_MOD_METRIC = "org.apache.activemq.store.kahadb.CANCELED_TASK_MOD_METRIC"; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBTransactionStore.java b/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBTransactionStore.java index 2b605bf4ad..3d83439c5a 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBTransactionStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBTransactionStore.java @@ -49,8 +49,8 @@ import org.apache.activemq.store.kahadb.data.KahaPrepareCommand; import org.apache.activemq.store.kahadb.data.KahaRollbackCommand; import org.apache.activemq.store.kahadb.data.KahaTransactionInfo; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Provides a TransactionStore implementation that can create transaction aware @@ -59,7 +59,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.4 $ */ public class KahaDBTransactionStore implements TransactionStore { - static final Log LOG = LogFactory.getLog(KahaDBTransactionStore.class); + static final Logger LOG = LoggerFactory.getLogger(KahaDBTransactionStore.class); ConcurrentHashMap inflightTransactions = new ConcurrentHashMap(); private final WireFormat wireFormat = new OpenWireFormat(); private final KahaDBStore theStore; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java b/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java index 231db7e940..721fc7906a 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java @@ -61,8 +61,8 @@ import org.apache.activemq.util.Callback; import org.apache.activemq.util.IOHelper; import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.util.ServiceSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.kahadb.index.BTreeIndex; import org.apache.kahadb.index.BTreeVisitor; import org.apache.kahadb.journal.DataFile; @@ -93,7 +93,7 @@ public class MessageDatabase extends ServiceSupport implements BrokerServiceAwar static { UNMATCHED = new Buffer(new byte[]{}); } - private static final Log LOG = LogFactory.getLog(MessageDatabase.class); + private static final Logger LOG = LoggerFactory.getLogger(MessageDatabase.class); private static final int DEFAULT_DATABASE_LOCKED_WAIT_DELAY = 10 * 1000; static final int CLOSED_STATE = 1; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/TempMessageDatabase.java b/activemq-core/src/main/java/org/apache/activemq/store/kahadb/TempMessageDatabase.java index 4f525f1731..0a2bc7c17a 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/TempMessageDatabase.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/kahadb/TempMessageDatabase.java @@ -39,8 +39,8 @@ import org.apache.activemq.store.kahadb.data.KahaRemoveDestinationCommand; import org.apache.activemq.store.kahadb.data.KahaRemoveMessageCommand; import org.apache.activemq.store.kahadb.data.KahaSubscriptionCommand; import org.apache.activemq.util.ByteSequence; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.kahadb.index.BTreeIndex; import org.apache.kahadb.page.PageFile; import org.apache.kahadb.page.Transaction; @@ -51,7 +51,7 @@ import org.apache.kahadb.util.VariableMarshaller; public class TempMessageDatabase { - private static final Log LOG = LogFactory.getLog(TempMessageDatabase.class); + private static final Logger LOG = LoggerFactory.getLogger(TempMessageDatabase.class); public static final int CLOSED_STATE = 1; public static final int OPEN_STATE = 2; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/PListStore.java b/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/PListStore.java index 2bb5e46298..e89fae2cb2 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/PListStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/PListStore.java @@ -31,8 +31,8 @@ import java.util.Map.Entry; import org.apache.activemq.util.IOHelper; import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.util.ServiceSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.kahadb.index.BTreeIndex; import org.apache.kahadb.journal.Journal; import org.apache.kahadb.journal.Location; @@ -49,7 +49,7 @@ import org.apache.kahadb.util.VariableMarshaller; * @org.apache.xbean.XBean */ public class PListStore extends ServiceSupport { - static final Log LOG = LogFactory.getLog(PListStore.class); + static final Logger LOG = LoggerFactory.getLogger(PListStore.class); private static final int DATABASE_LOCKED_WAIT_DELAY = 10 * 1000; static final int CLOSED_STATE = 1; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java b/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java index 70ee3d4586..0340b8eff2 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java @@ -34,15 +34,15 @@ import org.apache.activemq.store.ProxyMessageStore; import org.apache.activemq.store.TopicMessageStore; import org.apache.activemq.store.TransactionStore; import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @org.apache.xbean.XBean * @version $Revision: 1.4 $ */ public class MemoryPersistenceAdapter implements PersistenceAdapter { - private static final Log LOG = LogFactory.getLog(MemoryPersistenceAdapter.class); + private static final Logger LOG = LoggerFactory.getLogger(MemoryPersistenceAdapter.class); MemoryTransactionStore transactionStore; ConcurrentHashMap topics = new ConcurrentHashMap(); diff --git a/activemq-core/src/main/java/org/apache/activemq/transaction/LocalTransaction.java b/activemq-core/src/main/java/org/apache/activemq/transaction/LocalTransaction.java index 6c052012e4..924106cd04 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transaction/LocalTransaction.java +++ b/activemq-core/src/main/java/org/apache/activemq/transaction/LocalTransaction.java @@ -22,15 +22,15 @@ import org.apache.activemq.broker.ConnectionContext; import org.apache.activemq.command.LocalTransactionId; import org.apache.activemq.command.TransactionId; import org.apache.activemq.store.TransactionStore; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.3 $ */ public class LocalTransaction extends Transaction { - private static final Log LOG = LogFactory.getLog(LocalTransaction.class); + private static final Logger LOG = LoggerFactory.getLogger(LocalTransaction.class); private final TransactionStore transactionStore; private final LocalTransactionId xid; @@ -120,7 +120,7 @@ public class LocalTransaction extends Transaction { } @Override - public Log getLog() { + public Logger getLog() { return LOG; } } diff --git a/activemq-core/src/main/java/org/apache/activemq/transaction/Transaction.java b/activemq-core/src/main/java/org/apache/activemq/transaction/Transaction.java index 8fcf47b9ce..b9ab34d1c8 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transaction/Transaction.java +++ b/activemq-core/src/main/java/org/apache/activemq/transaction/Transaction.java @@ -26,7 +26,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.FutureTask; import javax.transaction.xa.XAException; import org.apache.activemq.command.TransactionId; -import org.apache.commons.logging.Log; +import org.slf4j.Logger; /** * Keeps track of all the actions the need to be done when a transaction does a @@ -131,7 +131,7 @@ public abstract class Transaction { public abstract TransactionId getTransactionId(); - public abstract Log getLog(); + public abstract Logger getLog(); public boolean isPrepared() { return getState() == PREPARED_STATE; diff --git a/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java b/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java index 9fc3966240..f7f56e136d 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java +++ b/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java @@ -24,15 +24,15 @@ import org.apache.activemq.command.ConnectionId; import org.apache.activemq.command.TransactionId; import org.apache.activemq.command.XATransactionId; import org.apache.activemq.store.TransactionStore; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.4 $ */ public class XATransaction extends Transaction { - private static final Log LOG = LogFactory.getLog(XATransaction.class); + private static final Logger LOG = LoggerFactory.getLogger(XATransaction.class); private final TransactionStore transactionStore; private final XATransactionId xid; @@ -212,7 +212,7 @@ public class XATransaction extends Transaction { } @Override - public Log getLog() { + public Logger getLog() { return LOG; } } diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java b/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java index 7d5a6208b5..31ab1b219b 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java @@ -25,8 +25,8 @@ import org.apache.activemq.command.LastPartialCommand; import org.apache.activemq.command.PartialCommand; import org.apache.activemq.openwire.OpenWireFormat; import org.apache.activemq.util.ByteArrayInputStream; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Joins together of partial commands which were split into individual chunks of @@ -35,7 +35,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class CommandJoiner extends TransportFilter { - private static final Log LOG = LogFactory.getLog(CommandJoiner.class); + private static final Logger LOG = LoggerFactory.getLogger(CommandJoiner.class); private ByteArrayOutputStream out = new ByteArrayOutputStream(); private OpenWireFormat wireFormat; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java b/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java index a5c2300090..ba4bd67522 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java @@ -22,11 +22,11 @@ import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.TimeUnit; import org.apache.activemq.command.Response; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class FutureResponse { - private static final Log LOG = LogFactory.getLog(FutureResponse.class); + private static final Logger LOG = LoggerFactory.getLogger(FutureResponse.class); private final ResponseCallback responseCallback; private final ArrayBlockingQueue responseSlot = new ArrayBlockingQueue(1); diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java b/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java index 27f01df7ad..fb7355f04a 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java @@ -29,8 +29,8 @@ import org.apache.activemq.command.KeepAliveInfo; import org.apache.activemq.command.WireFormatInfo; import org.apache.activemq.thread.SchedulerTimerTask; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Used to make sure that commands are arriving periodically from the peer of @@ -40,7 +40,7 @@ import org.apache.commons.logging.LogFactory; */ public class InactivityMonitor extends TransportFilter { - private static final Log LOG = LogFactory.getLog(InactivityMonitor.class); + private static final Logger LOG = LoggerFactory.getLogger(InactivityMonitor.class); private static ThreadPoolExecutor ASYNC_TASKS; private static int CHECKER_COUNTER; private static long DEFAULT_CHECK_TIME_MILLS = 30000; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/LogWriter.java b/activemq-core/src/main/java/org/apache/activemq/transport/LogWriter.java index 2386517950..ddad293de4 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/LogWriter.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/LogWriter.java @@ -18,7 +18,7 @@ package org.apache.activemq.transport; import java.io.IOException; -import org.apache.commons.logging.Log; +import org.slf4j.Logger; /** * Interface for classes that will be called by the TransportLogger @@ -38,48 +38,48 @@ public interface LogWriter { * Writes a header message to the log. * @param log The log to be written to. */ - public void initialMessage(Log log); + public void initialMessage(Logger log); /** * Writes a message to a log when a request command is sent. * @param log The log to be written to. * @param command The command to be logged. */ - public void logRequest (Log log, Object command); + public void logRequest (Logger log, Object command); /** * Writes a message to a log when a response command is received. * @param log The log to be written to. * @param command The command to be logged. */ - public void logResponse (Log log, Object response); + public void logResponse (Logger log, Object response); /** * Writes a message to a log when an asynchronous equest command is sent. * @param log The log to be written to. * @param command The command to be logged. */ - public void logAsyncRequest (Log log, Object command); + public void logAsyncRequest (Logger log, Object command); /** * Writes a message to a log when message is sent. * @param log The log to be written to. * @param command The command to be logged. */ - public void logOneWay (Log log, Object command); + public void logOneWay (Logger log, Object command); /** * Writes a message to a log when message is received. * @param log The log to be written to. * @param command The command to be logged. */ - public void logReceivedCommand (Log log, Object command); + public void logReceivedCommand (Logger log, Object command); /** * Writes a message to a log when an exception is received. * @param log The log to be written to. * @param command The command to be logged. */ - public void logReceivedException (Log log, IOException error); + public void logReceivedException (Logger log, IOException error); } diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java b/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java index 4a593a7632..6e3516ee62 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java @@ -26,8 +26,8 @@ import org.apache.activemq.command.Command; import org.apache.activemq.command.ExceptionResponse; import org.apache.activemq.command.Response; import org.apache.activemq.util.IntSequenceGenerator; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Adds the incrementing sequence number to commands along with performing the @@ -38,7 +38,7 @@ import org.apache.commons.logging.LogFactory; */ public class ResponseCorrelator extends TransportFilter { - private static final Log LOG = LogFactory.getLog(ResponseCorrelator.class); + private static final Logger LOG = LoggerFactory.getLogger(ResponseCorrelator.class); private final Map requestMap = new HashMap(); private IntSequenceGenerator sequenceGenerator; private final boolean debug = LOG.isDebugEnabled(); diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/TransportLogger.java b/activemq-core/src/main/java/org/apache/activemq/transport/TransportLogger.java index d267a8ff76..3f599567de 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/TransportLogger.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/TransportLogger.java @@ -18,7 +18,7 @@ package org.apache.activemq.transport; import java.io.IOException; -import org.apache.commons.logging.Log; +import org.slf4j.Logger; /** * This TransportFilter implementation writes output to a log @@ -30,12 +30,12 @@ import org.apache.commons.logging.Log; */ public class TransportLogger extends TransportFilter { - private final Log log; + private final Logger log; private boolean logging; private final LogWriter logWriter; private TransportLoggerView view; - public TransportLogger(Transport next, Log log, boolean startLogging, LogWriter logWriter) { + public TransportLogger(Transport next, Logger log, boolean startLogging, LogWriter logWriter) { // Changed constructor to pass the implementation of the LogWriter interface // that will be used to write the messages. super(next); diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerFactory.java b/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerFactory.java index 4c409eba2e..88a579ed2d 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerFactory.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerFactory.java @@ -20,8 +20,8 @@ import org.apache.activemq.broker.jmx.AnnotatedMBean; import org.apache.activemq.broker.jmx.ManagementContext; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.LogWriterFinder; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import javax.management.ObjectName; @@ -38,7 +38,7 @@ import javax.management.ObjectName; */ public class TransportLoggerFactory { - private static final Log LOG = LogFactory.getLog(TransportLoggerFactory.class); + private static final Logger LOG = LoggerFactory.getLogger(TransportLoggerFactory.class); private static TransportLoggerFactory instance; private static int lastId=0; @@ -119,7 +119,7 @@ public class TransportLoggerFactory { * @return A TransportLogger object. * @throws IOException */ - public TransportLogger createTransportLogger(Transport next, Log log) throws IOException { + public TransportLogger createTransportLogger(Transport next, Logger log) throws IOException { return createTransportLogger(next, getNextId(), log, defaultLogWriterName, defaultDynamicManagement, defaultInitialBehavior, defaultJmxPort); } @@ -156,7 +156,7 @@ public class TransportLoggerFactory { * @return A TransportLogger object. * @throws IOException */ - public TransportLogger createTransportLogger(Transport next, int id, Log log, + public TransportLogger createTransportLogger(Transport next, int id, Logger log, String logWriterName, boolean dynamicManagement, boolean startLogging, int jmxport) throws IOException { try { LogWriter logWriter = logWriterFinder.newInstance(logWriterName); @@ -180,8 +180,8 @@ public class TransportLoggerFactory { return ++lastId; } - private static Log createLog(int id) { - return LogFactory.getLog(TransportLogger.class.getName()+".Connection:" + id); + private static Logger createLog(int id) { + return LoggerFactory.getLogger(TransportLogger.class.getName()+".Connection:" + id); } /** diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerView.java b/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerView.java index 78257c8f3e..8affa64c2c 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerView.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerView.java @@ -26,8 +26,8 @@ import javax.management.ObjectName; import org.apache.activemq.broker.jmx.AnnotatedMBean; import org.apache.activemq.broker.jmx.ManagementContext; import org.apache.activemq.util.JMXSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Class implementing the TransportLoggerViewMBean interface. @@ -42,7 +42,7 @@ import org.apache.commons.logging.LogFactory; */ public class TransportLoggerView implements TransportLoggerViewMBean { - private static final Log log = LogFactory.getLog(TransportLoggerView.class); + private static final Logger log = LoggerFactory.getLogger(TransportLoggerView.class); /** * Set with the TransportLoggerViews objects created. diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java b/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java index 012e7a90b6..a5aa003e0e 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java @@ -20,8 +20,8 @@ import java.net.URI; import org.apache.activemq.ThreadPriorities; import org.apache.activemq.util.ServiceStopper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A useful base class for implementations of {@link TransportServer} which uses @@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.1 $ */ public abstract class TransportServerThreadSupport extends TransportServerSupport implements Runnable { - private static final Log LOG = LogFactory.getLog(TransportServerThreadSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(TransportServerThreadSupport.class); private boolean daemon = true; private boolean joinOnStop = true; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java b/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java index b209bc6fcc..d0f74a4b1e 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java @@ -19,8 +19,8 @@ package org.apache.activemq.transport; import java.io.IOException; import java.net.URI; import org.apache.activemq.util.ServiceSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A useful base class for transport implementations. @@ -28,7 +28,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.1 $ */ public abstract class TransportSupport extends ServiceSupport implements Transport { - private static final Log LOG = LogFactory.getLog(TransportSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(TransportSupport.class); TransportListener transportListener; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java b/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java index 9b8738f3b0..c86c6ed46b 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java @@ -27,15 +27,15 @@ import org.apache.activemq.command.Command; import org.apache.activemq.command.WireFormatInfo; import org.apache.activemq.openwire.OpenWireFormat; import org.apache.activemq.util.IOExceptionSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Negotiates the wire format with a new connection */ public class WireFormatNegotiator extends TransportFilter { - private static final Log LOG = LogFactory.getLog(WireFormatNegotiator.class); + private static final Logger LOG = LoggerFactory.getLogger(WireFormatNegotiator.class); private OpenWireFormat wireFormat; private final int minimumVersion; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/WriteTimeoutFilter.java b/activemq-core/src/main/java/org/apache/activemq/transport/WriteTimeoutFilter.java index 2766d36908..620ef2a386 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/WriteTimeoutFilter.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/WriteTimeoutFilter.java @@ -27,8 +27,8 @@ import java.util.concurrent.locks.ReentrantLock; import org.apache.activemq.transport.tcp.TcpBufferedOutputStream; import org.apache.activemq.transport.tcp.TimeStampStream; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This filter implements write timeouts for socket write operations. @@ -56,7 +56,7 @@ import org.apache.commons.logging.LogFactory; */ public class WriteTimeoutFilter extends TransportFilter { - private static final Log LOG = LogFactory.getLog(WriteTimeoutFilter.class); + private static final Logger LOG = LoggerFactory.getLogger(WriteTimeoutFilter.class); protected static ConcurrentLinkedQueue writers = new ConcurrentLinkedQueue(); protected static AtomicInteger messageCounter = new AtomicInteger(0); protected static TimeoutThread timeoutThread = new TimeoutThread(); diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java b/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java index f590c35c84..c51451cc29 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java @@ -25,8 +25,8 @@ import org.apache.activemq.transport.CompositeTransport; import org.apache.activemq.transport.TransportFilter; import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.util.URISupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A {@link ReliableTransportChannel} which uses a {@link DiscoveryAgent} to @@ -36,7 +36,7 @@ import org.apache.commons.logging.LogFactory; */ public class DiscoveryTransport extends TransportFilter implements DiscoveryListener { - private static final Log LOG = LogFactory.getLog(DiscoveryTransport.class); + private static final Logger LOG = LoggerFactory.getLogger(DiscoveryTransport.class); private final CompositeTransport next; private DiscoveryAgent discoveryAgent; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java b/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java index 465d735631..155f570ca7 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java @@ -39,8 +39,8 @@ import java.util.concurrent.atomic.AtomicBoolean; import org.apache.activemq.command.DiscoveryEvent; import org.apache.activemq.transport.discovery.DiscoveryAgent; import org.apache.activemq.transport.discovery.DiscoveryListener; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A {@link DiscoveryAgent} using a multicast address and heartbeat packets @@ -55,7 +55,7 @@ public class MulticastDiscoveryAgent implements DiscoveryAgent, Runnable { public static final String DEFAULT_HOST_IP = System.getProperty("activemq.partition.discovery", "239.255.2.3"); public static final int DEFAULT_PORT = 6155; - private static final Log LOG = LogFactory.getLog(MulticastDiscoveryAgent.class); + private static final Logger LOG = LoggerFactory.getLogger(MulticastDiscoveryAgent.class); private static final String TYPE_SUFFIX = "ActiveMQ-4."; private static final String ALIVE = "alive."; private static final String DEAD = "dead."; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java b/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java index 8b3392b876..2375e90420 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java @@ -25,12 +25,12 @@ import org.apache.activemq.transport.discovery.DiscoveryAgentFactory; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.URISupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class MulticastDiscoveryAgentFactory extends DiscoveryAgentFactory { - private static final Log LOG = LogFactory.getLog(MulticastDiscoveryAgentFactory.class); + private static final Logger LOG = LoggerFactory.getLogger(MulticastDiscoveryAgentFactory.class); protected DiscoveryAgent doCreateDiscoveryAgent(URI uri) throws IOException { diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/RendezvousDiscoveryAgent.java b/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/RendezvousDiscoveryAgent.java index 459ecc573b..34b7a4234d 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/RendezvousDiscoveryAgent.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/RendezvousDiscoveryAgent.java @@ -34,8 +34,8 @@ import org.apache.activemq.transport.discovery.DiscoveryAgent; import org.apache.activemq.transport.discovery.DiscoveryListener; import org.apache.activemq.util.JMSExceptionSupport; import org.apache.activemq.util.MapHelper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A {@link DiscoveryAgent} using Zeroconf @@ -44,7 +44,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class RendezvousDiscoveryAgent implements DiscoveryAgent, ServiceListener { - private static final Log LOG = LogFactory.getLog(RendezvousDiscoveryAgent.class); + private static final Logger LOG = LoggerFactory.getLogger(RendezvousDiscoveryAgent.class); private static final String TYPE_SUFFIX = "ActiveMQ-4."; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/SimpleDiscoveryAgent.java b/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/SimpleDiscoveryAgent.java index 00ac8cb7e1..00cb403ca3 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/SimpleDiscoveryAgent.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/SimpleDiscoveryAgent.java @@ -28,8 +28,8 @@ import org.apache.activemq.command.DiscoveryEvent; import org.apache.activemq.thread.DefaultThreadPools; import org.apache.activemq.transport.discovery.DiscoveryAgent; import org.apache.activemq.transport.discovery.DiscoveryListener; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A simple DiscoveryAgent that allows static configuration of the discovered @@ -39,7 +39,7 @@ import org.apache.commons.logging.LogFactory; */ public class SimpleDiscoveryAgent implements DiscoveryAgent { - private final static Log LOG = LogFactory.getLog(SimpleDiscoveryAgent.class); + private final static Logger LOG = LoggerFactory.getLogger(SimpleDiscoveryAgent.class); private long initialReconnectDelay = 1000; private long maxReconnectDelay = 1000 * 30; private long backOffMultiplier = 2; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java b/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java index 5be05330f1..79bff5e8ac 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java @@ -57,8 +57,8 @@ import org.apache.activemq.transport.TransportFactory; import org.apache.activemq.transport.TransportListener; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.ServiceSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** @@ -69,7 +69,7 @@ import org.apache.commons.logging.LogFactory; */ public class FailoverTransport implements CompositeTransport { - private static final Log LOG = LogFactory.getLog(FailoverTransport.class); + private static final Logger LOG = LoggerFactory.getLogger(FailoverTransport.class); private static final int DEFAULT_INITIAL_RECONNECT_DELAY = 10; private TransportListener transportListener; private boolean disposed; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java b/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java index f0efb71f3a..dff662c894 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java @@ -43,8 +43,8 @@ import org.apache.activemq.transport.TransportListener; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.util.ServiceSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A Transport that fans out a connection to multiple brokers. @@ -53,7 +53,7 @@ import org.apache.commons.logging.LogFactory; */ public class FanoutTransport implements CompositeTransport { - private static final Log LOG = LogFactory.getLog(FanoutTransport.class); + private static final Logger LOG = LoggerFactory.getLogger(FanoutTransport.class); private TransportListener transportListener; private boolean disposed; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/logwriters/CustomLogWriter.java b/activemq-core/src/main/java/org/apache/activemq/transport/logwriters/CustomLogWriter.java index c9b4ec6130..c4473c4f1e 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/logwriters/CustomLogWriter.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/logwriters/CustomLogWriter.java @@ -27,7 +27,7 @@ import org.apache.activemq.command.ProducerAck; import org.apache.activemq.command.ProducerId; import org.apache.activemq.command.WireFormatInfo; import org.apache.activemq.transport.LogWriter; -import org.apache.commons.logging.Log; +import org.slf4j.Logger; /** * Custom implementation of LogWriter interface. @@ -38,37 +38,37 @@ import org.apache.commons.logging.Log; public class CustomLogWriter implements LogWriter { // doc comment inherited from LogWriter - public void initialMessage(Log log) { + public void initialMessage(Logger log) { } // doc comment inherited from LogWriter - public void logRequest (Log log, Object command) { + public void logRequest (Logger log, Object command) { log.debug("$$ SENDREQ: " + CustomLogWriter.commandToString(command)); } // doc comment inherited from LogWriter - public void logResponse (Log log, Object response) { + public void logResponse (Logger log, Object response) { log.debug("$$ GOT_RESPONSE: "+response); } // doc comment inherited from LogWriter - public void logAsyncRequest (Log log, Object command) { + public void logAsyncRequest (Logger log, Object command) { log.debug("$$ SENDING_ASNYC_REQUEST: "+command); } // doc comment inherited from LogWriter - public void logOneWay (Log log, Object command) { + public void logOneWay (Logger log, Object command) { log.debug("$$ SENDING: " + CustomLogWriter.commandToString(command)); } // doc comment inherited from LogWriter - public void logReceivedCommand (Log log, Object command) { + public void logReceivedCommand (Logger log, Object command) { log.debug("$$ RECEIVED: " + CustomLogWriter.commandToString(command)); } // doc comment inherited from LogWriter - public void logReceivedException (Log log, IOException error) { + public void logReceivedException (Logger log, IOException error) { log.debug("$$ RECEIVED_EXCEPTION: "+error, error); } diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/logwriters/DefaultLogWriter.java b/activemq-core/src/main/java/org/apache/activemq/transport/logwriters/DefaultLogWriter.java index 2741e2ee45..3feef23987 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/logwriters/DefaultLogWriter.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/logwriters/DefaultLogWriter.java @@ -19,7 +19,7 @@ package org.apache.activemq.transport.logwriters; import java.io.IOException; import org.apache.activemq.transport.LogWriter; -import org.apache.commons.logging.Log; +import org.slf4j.Logger; /** * Implementation of LogWriter interface to keep ActiveMQ's @@ -31,37 +31,37 @@ import org.apache.commons.logging.Log; public class DefaultLogWriter implements LogWriter { // doc comment inherited from LogWriter - public void initialMessage(Log log) { + public void initialMessage(Logger log) { // Default log writer does nothing here } // doc comment inherited from LogWriter - public void logRequest (Log log, Object command) { + public void logRequest (Logger log, Object command) { log.debug("SENDING REQUEST: "+command); } // doc comment inherited from LogWriter - public void logResponse (Log log, Object response) { + public void logResponse (Logger log, Object response) { log.debug("GOT RESPONSE: "+response); } // doc comment inherited from LogWriter - public void logAsyncRequest (Log log, Object command) { + public void logAsyncRequest (Logger log, Object command) { log.debug("SENDING ASNYC REQUEST: "+command); } // doc comment inherited from LogWriter - public void logOneWay (Log log, Object command) { + public void logOneWay (Logger log, Object command) { log.debug("SENDING: "+command); } // doc comment inherited from LogWriter - public void logReceivedCommand (Log log, Object command) { + public void logReceivedCommand (Logger log, Object command) { log.debug("RECEIVED: " + command); } // doc comment inherited from LogWriter - public void logReceivedException (Log log, IOException error) { + public void logReceivedException (Logger log, IOException error) { log.debug("RECEIVED Exception: "+error, error); } diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransport.java b/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransport.java index 063f2dc5f7..dc67d99ef6 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransport.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransport.java @@ -32,8 +32,8 @@ import org.apache.activemq.transport.udp.CommandDatagramSocket; import org.apache.activemq.transport.udp.DatagramHeaderMarshaller; import org.apache.activemq.transport.udp.UdpTransport; import org.apache.activemq.util.ServiceStopper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A multicast based transport. @@ -42,7 +42,7 @@ import org.apache.commons.logging.LogFactory; */ public class MulticastTransport extends UdpTransport { - private static final Log LOG = LogFactory.getLog(MulticastTransport.class); + private static final Logger LOG = LoggerFactory.getLogger(MulticastTransport.class); private static final int DEFAULT_IDLE_TIME = 5000; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransport.java b/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransport.java index c6384dd9fe..f77c61916d 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransport.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransport.java @@ -43,7 +43,7 @@ import org.apache.activemq.wireformat.WireFormat; */ public class NIOTransport extends TcpTransport { - // private static final Log log = LogFactory.getLog(NIOTransport.class); + // private static final Logger log = LoggerFactory.getLogger(NIOTransport.class); private SocketChannel channel; private SelectorSelection selection; private ByteBuffer inputBuffer; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/reliable/DefaultReplayBuffer.java b/activemq-core/src/main/java/org/apache/activemq/transport/reliable/DefaultReplayBuffer.java index 69bf345d7d..a84fa98a20 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/reliable/DefaultReplayBuffer.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/reliable/DefaultReplayBuffer.java @@ -20,8 +20,8 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @@ -29,7 +29,7 @@ import org.apache.commons.logging.LogFactory; */ public class DefaultReplayBuffer implements ReplayBuffer { - private static final Log LOG = LogFactory.getLog(DefaultReplayBuffer.class); + private static final Logger LOG = LoggerFactory.getLogger(DefaultReplayBuffer.class); private final int size; private ReplayBufferListener listener; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReliableTransport.java b/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReliableTransport.java index 4e3ef907bc..f14be3f4f4 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReliableTransport.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReliableTransport.java @@ -28,8 +28,8 @@ import org.apache.activemq.transport.FutureResponse; import org.apache.activemq.transport.ResponseCorrelator; import org.apache.activemq.transport.Transport; import org.apache.activemq.transport.udp.UdpTransport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This interceptor deals with out of order commands together with being able to @@ -38,7 +38,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class ReliableTransport extends ResponseCorrelator { - private static final Log LOG = LogFactory.getLog(ReliableTransport.class); + private static final Logger LOG = LoggerFactory.getLogger(ReliableTransport.class); private ReplayStrategy replayStrategy; private SortedSet commands = new TreeSet(new CommandIdComparator()); diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java index e8dbc132d4..b98b89f445 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java @@ -60,8 +60,8 @@ import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.IdGenerator; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.LongSequenceGenerator; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationContextAware; /** @@ -69,7 +69,7 @@ import org.springframework.context.ApplicationContextAware; */ public class ProtocolConverter { - private static final Log LOG = LogFactory.getLog(ProtocolConverter.class); + private static final Logger LOG = LoggerFactory.getLogger(ProtocolConverter.class); private static final IdGenerator CONNECTION_ID_GENERATOR = new IdGenerator(); diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java index fe3261703a..7ed9983d3c 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java @@ -28,8 +28,8 @@ import org.apache.activemq.transport.TransportFilter; import org.apache.activemq.transport.TransportListener; import org.apache.activemq.transport.tcp.SslTransport; import org.apache.activemq.util.IOExceptionSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * The StompTransportFilter normally sits on top of a TcpTransport that has been @@ -40,7 +40,7 @@ import org.apache.commons.logging.LogFactory; * @author chirino */ public class StompTransportFilter extends TransportFilter implements StompTransport { - private static final Log LOG = LogFactory.getLog(StompTransportFilter.class); + private static final Logger LOG = LoggerFactory.getLogger(StompTransportFilter.class); private final ProtocolConverter protocolConverter; private final FrameTranslator frameTranslator; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java b/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java index a022047818..76be8c65d0 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java @@ -49,8 +49,8 @@ import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.URISupport; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * An implementation of the TcpTransportFactory using SSL. The major @@ -64,7 +64,7 @@ import org.apache.commons.logging.LogFactory; */ public class SslTransportFactory extends TcpTransportFactory { // The log this uses., - private static final Log LOG = LogFactory.getLog(SslTransportFactory.class); + private static final Logger LOG = LoggerFactory.getLogger(SslTransportFactory.class); /** * Overriding to use SslTransportServer and allow for proper reflection. diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java b/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java index 27771bb2c0..39980cd731 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java @@ -44,8 +44,8 @@ import org.apache.activemq.util.InetAddressUtil; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import static org.apache.activemq.thread.DefaultThreadPools.getDefaultTaskRunnerFactory; @@ -57,7 +57,7 @@ import static org.apache.activemq.thread.DefaultThreadPools.getDefaultTaskRunner * @version $Revision$ */ public class TcpTransport extends TransportThreadSupport implements Transport, Service, Runnable { - private static final Log LOG = LogFactory.getLog(TcpTransport.class); + private static final Logger LOG = LoggerFactory.getLogger(TcpTransport.class); protected final URI remoteLocation; protected final URI localLocation; protected final WireFormat wireFormat; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java b/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java index 9f9ed8f692..ba9bd0e68b 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java @@ -37,15 +37,15 @@ import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.URISupport; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (logging improvement modifications) * @version $Revision$ */ public class TcpTransportFactory extends TransportFactory { - private static final Log LOG = LogFactory.getLog(TcpTransportFactory.class); + private static final Logger LOG = LoggerFactory.getLogger(TcpTransportFactory.class); public TransportServer doBind(final URI location) throws IOException { try { diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java b/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java index 8a3e249974..9ddc0b3b21 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java @@ -50,8 +50,8 @@ import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.util.ServiceSupport; import org.apache.activemq.wireformat.WireFormat; import org.apache.activemq.wireformat.WireFormatFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A TCP based implementation of {@link TransportServer} @@ -62,7 +62,7 @@ import org.apache.commons.logging.LogFactory; public class TcpTransportServer extends TransportServerThreadSupport implements ServiceListener{ - private static final Log LOG = LogFactory.getLog(TcpTransportServer.class); + private static final Logger LOG = LoggerFactory.getLogger(TcpTransportServer.class); protected ServerSocket serverSocket; protected int backlog = 5000; protected WireFormatFactory wireFormatFactory = new OpenWireFormatFactory(); diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramChannel.java b/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramChannel.java index d060b46ef5..3d2471d135 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramChannel.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramChannel.java @@ -32,8 +32,8 @@ import org.apache.activemq.openwire.OpenWireFormat; import org.apache.activemq.transport.reliable.ReplayBuffer; import org.apache.activemq.util.ByteArrayInputStream; import org.apache.activemq.util.ByteArrayOutputStream; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A strategy for reading datagrams and de-fragmenting them together. @@ -42,7 +42,7 @@ import org.apache.commons.logging.LogFactory; */ public class CommandDatagramChannel extends CommandChannelSupport { - private static final Log LOG = LogFactory.getLog(CommandDatagramChannel.class); + private static final Logger LOG = LoggerFactory.getLogger(CommandDatagramChannel.class); private DatagramChannel channel; private ByteBufferPool bufferPool; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramSocket.java b/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramSocket.java index 0158523688..3d6d7fe9b7 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramSocket.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramSocket.java @@ -32,8 +32,8 @@ import org.apache.activemq.openwire.OpenWireFormat; import org.apache.activemq.transport.reliable.ReplayBuffer; import org.apache.activemq.util.ByteArrayInputStream; import org.apache.activemq.util.ByteArrayOutputStream; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A strategy for reading datagrams and de-fragmenting them together. @@ -42,7 +42,7 @@ import org.apache.commons.logging.LogFactory; */ public class CommandDatagramSocket extends CommandChannelSupport { - private static final Log LOG = LogFactory.getLog(CommandDatagramSocket.class); + private static final Logger LOG = LoggerFactory.getLogger(CommandDatagramSocket.class); private DatagramSocket channel; private Object readLock = new Object(); diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java b/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java index e7664f74e0..56dc0ddc86 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java @@ -42,8 +42,8 @@ import org.apache.activemq.transport.reliable.Replayer; import org.apache.activemq.util.InetAddressUtil; import org.apache.activemq.util.IntSequenceGenerator; import org.apache.activemq.util.ServiceStopper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * An implementation of the {@link Transport} interface using raw UDP @@ -51,7 +51,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class UdpTransport extends TransportThreadSupport implements Transport, Service, Runnable { - private static final Log LOG = LogFactory.getLog(UdpTransport.class); + private static final Logger LOG = LoggerFactory.getLogger(UdpTransport.class); private static final int MAX_BIND_ATTEMPTS = 50; private static final long BIND_ATTEMPT_DELAY = 100; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java b/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java index 08766226e3..6885d6526d 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java @@ -40,8 +40,8 @@ import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.URISupport; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (logging improvement modifications) @@ -49,7 +49,7 @@ import org.apache.commons.logging.LogFactory; */ public class UdpTransportFactory extends TransportFactory { - private static final Log log = LogFactory.getLog(TcpTransportFactory.class); + private static final Logger log = LoggerFactory.getLogger(TcpTransportFactory.class); public TransportServer doBind(final URI location) throws IOException { try { diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java b/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java index 42662abd23..c73c7317ac 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java @@ -36,8 +36,8 @@ import org.apache.activemq.transport.reliable.ReliableTransport; import org.apache.activemq.transport.reliable.ReplayStrategy; import org.apache.activemq.transport.reliable.Replayer; import org.apache.activemq.util.ServiceStopper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A UDP based implementation of {@link TransportServer} @@ -46,7 +46,7 @@ import org.apache.commons.logging.LogFactory; */ public class UdpTransportServer extends TransportServerSupport { - private static final Log LOG = LogFactory.getLog(UdpTransportServer.class); + private static final Logger LOG = LoggerFactory.getLogger(UdpTransportServer.class); private UdpTransport serverTransport; private ReplayStrategy replayStrategy; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java b/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java index c1f88858e8..aa609b9af9 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java @@ -37,15 +37,15 @@ import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.ServiceSupport; import org.apache.activemq.util.URISupport; import org.apache.activemq.util.URISupport.CompositeData; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class VMTransportFactory extends TransportFactory { public static final ConcurrentHashMap BROKERS = new ConcurrentHashMap(); public static final ConcurrentHashMap CONNECTORS = new ConcurrentHashMap(); public static final ConcurrentHashMap SERVERS = new ConcurrentHashMap(); - private static final Log LOG = LogFactory.getLog(VMTransportFactory.class); + private static final Logger LOG = LoggerFactory.getLogger(VMTransportFactory.class); BrokerFactoryHandler brokerFactoryHandler; diff --git a/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java b/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java index 12d10d0161..cc17fe713d 100755 --- a/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java +++ b/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java @@ -24,8 +24,8 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.activemq.Service; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Used to keep track of how much of something is being used so that a @@ -37,7 +37,7 @@ import org.apache.commons.logging.LogFactory; */ public abstract class Usage implements Service { - private static final Log LOG = LogFactory.getLog(Usage.class); + private static final Logger LOG = LoggerFactory.getLogger(Usage.class); protected final Object usageMutex = new Object(); protected int percentUsage; protected T parent; diff --git a/activemq-core/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java b/activemq-core/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java index 8a37b648c2..caa833a527 100644 --- a/activemq-core/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java +++ b/activemq-core/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java @@ -19,13 +19,13 @@ package org.apache.activemq.util; import java.io.IOException; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class DefaultIOExceptionHandler implements IOExceptionHandler { - private static final Log LOG = LogFactory - .getLog(DefaultIOExceptionHandler.class); + private static final Logger LOG = LoggerFactory + .getLogger(DefaultIOExceptionHandler.class); private BrokerService broker; private boolean ignoreAllErrors = false; private boolean ignoreNoSpaceErrors = true; diff --git a/activemq-core/src/main/java/org/apache/activemq/util/IdGenerator.java b/activemq-core/src/main/java/org/apache/activemq/util/IdGenerator.java index 79ff3511da..f7199c75a7 100755 --- a/activemq-core/src/main/java/org/apache/activemq/util/IdGenerator.java +++ b/activemq-core/src/main/java/org/apache/activemq/util/IdGenerator.java @@ -19,8 +19,8 @@ package org.apache.activemq.util; import java.net.ServerSocket; import java.util.concurrent.atomic.AtomicLong; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Generator for Globally unique Strings. @@ -28,7 +28,7 @@ import org.apache.commons.logging.LogFactory; public class IdGenerator { - private static final Log LOG = LogFactory.getLog(IdGenerator.class); + private static final Logger LOG = LoggerFactory.getLogger(IdGenerator.class); private static final String UNIQUE_STUB; private static int instanceCount; private static String hostName; diff --git a/activemq-core/src/main/java/org/apache/activemq/util/LogWriterFinder.java b/activemq-core/src/main/java/org/apache/activemq/util/LogWriterFinder.java index a9573b495a..9f91589349 100644 --- a/activemq-core/src/main/java/org/apache/activemq/util/LogWriterFinder.java +++ b/activemq-core/src/main/java/org/apache/activemq/util/LogWriterFinder.java @@ -24,8 +24,8 @@ import java.util.concurrent.ConcurrentHashMap; import org.apache.activemq.transport.LogWriter; import org.apache.activemq.transport.TransportLoggerView; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Class used to find a LogWriter implementation, and returning @@ -40,7 +40,7 @@ import org.apache.commons.logging.LogFactory; */ public class LogWriterFinder { - private static final Log log = LogFactory.getLog(TransportLoggerView.class); + private static final Logger log = LoggerFactory.getLogger(TransportLoggerView.class); private final String path; private final ConcurrentHashMap classMap = new ConcurrentHashMap(); diff --git a/activemq-core/src/main/java/org/apache/activemq/util/ServiceStopper.java b/activemq-core/src/main/java/org/apache/activemq/util/ServiceStopper.java index 6a85f80850..751fd2440d 100644 --- a/activemq-core/src/main/java/org/apache/activemq/util/ServiceStopper.java +++ b/activemq-core/src/main/java/org/apache/activemq/util/ServiceStopper.java @@ -20,8 +20,8 @@ import java.util.Iterator; import java.util.List; import org.apache.activemq.Service; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A helper class used to stop a bunch of services, catching and logging any @@ -92,7 +92,7 @@ public class ServiceStopper { } protected void logError(Object service, Throwable e) { - Log log = LogFactory.getLog(service.getClass()); + Logger log = LoggerFactory.getLogger(service.getClass()); log.error("Could not stop service: " + service + ". Reason: " + e, e); } diff --git a/activemq-core/src/main/java/org/apache/activemq/util/ServiceSupport.java b/activemq-core/src/main/java/org/apache/activemq/util/ServiceSupport.java index aa246fd43e..d8dfeb60f5 100644 --- a/activemq-core/src/main/java/org/apache/activemq/util/ServiceSupport.java +++ b/activemq-core/src/main/java/org/apache/activemq/util/ServiceSupport.java @@ -21,8 +21,8 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.activemq.Service; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A helper class for working with services together with a useful base class @@ -31,7 +31,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.1 $ */ public abstract class ServiceSupport implements Service { - private static final Log LOG = LogFactory.getLog(ServiceSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(ServiceSupport.class); private AtomicBoolean started = new AtomicBoolean(false); private AtomicBoolean stopping = new AtomicBoolean(false); diff --git a/activemq-core/src/main/java/org/apache/activemq/util/ThreadTracker.java b/activemq-core/src/main/java/org/apache/activemq/util/ThreadTracker.java index 589dc9c03b..3ab7cb0460 100644 --- a/activemq-core/src/main/java/org/apache/activemq/util/ThreadTracker.java +++ b/activemq-core/src/main/java/org/apache/activemq/util/ThreadTracker.java @@ -19,8 +19,8 @@ package org.apache.activemq.util; import java.util.HashMap; import java.util.Map.Entry; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Debugging tool to track entry points through code, useful to see runtime call paths @@ -35,7 +35,7 @@ import org.apache.commons.logging.LogFactory; */ public class ThreadTracker { - static final Log LOG = LogFactory.getLog(ThreadTracker.class); + static final Logger LOG = LoggerFactory.getLogger(ThreadTracker.class); static HashMap trackers = new HashMap(); /** diff --git a/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java b/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java index 3b449e764a..79a45e715b 100755 --- a/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java +++ b/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java @@ -19,8 +19,8 @@ package org.apache.activemq.util; import java.io.IOException; import org.apache.activemq.broker.ConnectionContext; import org.apache.activemq.store.PersistenceAdapter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A helper class for running code with a PersistenceAdapter in a transaction. @@ -28,7 +28,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.2 $ */ public class TransactionTemplate { - private static final Log LOG = LogFactory.getLog(TransactionTemplate.class); + private static final Logger LOG = LoggerFactory.getLogger(TransactionTemplate.class); private PersistenceAdapter persistenceAdapter; private ConnectionContext context; diff --git a/activemq-core/src/main/java/org/apache/activemq/util/osgi/Activator.java b/activemq-core/src/main/java/org/apache/activemq/util/osgi/Activator.java index 7d489c3a46..135fb2e07e 100644 --- a/activemq-core/src/main/java/org/apache/activemq/util/osgi/Activator.java +++ b/activemq-core/src/main/java/org/apache/activemq/util/osgi/Activator.java @@ -32,8 +32,8 @@ import org.apache.activemq.transport.Transport; import org.apache.activemq.transport.discovery.DiscoveryAgent; import org.apache.activemq.util.FactoryFinder; import org.apache.activemq.util.FactoryFinder.ObjectFactory; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.logging.Log; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; import org.osgi.framework.Bundle; import org.osgi.framework.BundleActivator; @@ -48,7 +48,7 @@ import org.osgi.framework.SynchronousBundleListener; */ public class Activator implements BundleActivator, SynchronousBundleListener, ObjectFactory { - private static final Log LOG = LogFactory.getLog(Activator.class); + private static final Logger LOG = LoggerFactory.getLogger(Activator.class); private final ConcurrentHashMap serviceCache = new ConcurrentHashMap(); private final ConcurrentMap bundleWrappers = new ConcurrentHashMap(); @@ -183,7 +183,7 @@ public class Activator implements BundleActivator, SynchronousBundleListener, Ob // ================================================================ private void debug(Object msg) { - LOG.debug(msg); + LOG.debug(msg.toString()); } private Properties loadProperties(URL resource) throws IOException { diff --git a/activemq-core/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java b/activemq-core/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java index 8eaf05bc0e..501ec5c74f 100644 --- a/activemq-core/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java +++ b/activemq-core/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java @@ -20,8 +20,8 @@ import java.beans.PropertyEditorManager; import java.net.URI; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.xbean.spring.context.ResourceXmlApplicationContext; import org.apache.xbean.spring.context.impl.URIEditor; import org.springframework.beans.BeansException; diff --git a/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerFactory.java b/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerFactory.java index 8139bd624f..29ff8b0f37 100644 --- a/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerFactory.java +++ b/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerFactory.java @@ -26,8 +26,8 @@ import org.apache.activemq.broker.BrokerFactoryHandler; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.URISupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.xbean.spring.context.ResourceXmlApplicationContext; import org.apache.xbean.spring.context.impl.URIEditor; import org.springframework.beans.BeansException; @@ -44,7 +44,7 @@ import org.springframework.util.ResourceUtils; * @version $Revision$ */ public class XBeanBrokerFactory implements BrokerFactoryHandler { - private static final transient Log LOG = LogFactory.getLog(XBeanBrokerFactory.class); + private static final transient Logger LOG = LoggerFactory.getLogger(XBeanBrokerFactory.class); static { PropertyEditorManager.registerEditor(URI.class, URIEditor.class); diff --git a/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java b/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java index 63312994d6..c0b6a2b22d 100644 --- a/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java +++ b/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java @@ -23,8 +23,8 @@ import javax.annotation.PreDestroy; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * An ActiveMQ Message Broker. It consists of a number of transport @@ -41,7 +41,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.1 $ */ public class XBeanBrokerService extends BrokerService { - private static final transient Log LOG = LogFactory.getLog(XBeanBrokerService.class); + private static final transient Logger LOG = LoggerFactory.getLogger(XBeanBrokerService.class); private boolean start = true; diff --git a/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java b/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java index 69e42a377e..f1d880fcc5 100755 --- a/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java @@ -30,11 +30,11 @@ import javax.jms.Session; import org.apache.activemq.broker.BrokerRegistry; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.TransportConnector; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ActiveMQConnectionFactoryTest extends CombinationTestSupport { - private static final Log LOG = LogFactory.getLog(ActiveMQConnectionFactoryTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ActiveMQConnectionFactoryTest.class); private ActiveMQConnection connection; private BrokerService broker; diff --git a/activemq-core/src/test/java/org/apache/activemq/ActiveMQInputStreamTest.java b/activemq-core/src/test/java/org/apache/activemq/ActiveMQInputStreamTest.java index 6fadfabf9b..73cf47c5ab 100644 --- a/activemq-core/src/test/java/org/apache/activemq/ActiveMQInputStreamTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/ActiveMQInputStreamTest.java @@ -1,86 +1,86 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF 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; - -import java.io.InputStream; -import java.io.OutputStream; - -import javax.jms.Queue; -import javax.jms.Session; - -import junit.framework.TestCase; -import org.apache.activemq.broker.BrokerService; -import org.apache.activemq.command.ActiveMQDestination; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -public class ActiveMQInputStreamTest extends TestCase { - - private static final Log LOG = LogFactory.getLog(ActiveMQInputStreamTest.class); - - private static final String BROKER_URL = "tcp://localhost:61616"; - private static final String DESTINATION = "destination"; - private static final int STREAM_LENGTH = 64 * 1024 + 0; // change 0 to 1 to make it not crash - - public void testInputStreamMatchesDefaultChuckSize() throws Exception { - BrokerService broker = new BrokerService(); - broker.setUseJmx(false); - broker.setPersistent(false); - broker.setDestinations(new ActiveMQDestination[] { - ActiveMQDestination.createDestination(DESTINATION, ActiveMQDestination.QUEUE_TYPE), - }); - broker.addConnector(BROKER_URL); - broker.start(); - - ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(BROKER_URL); - ActiveMQConnection connection = (ActiveMQConnection) connectionFactory.createConnection(); - Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - Queue destination = session.createQueue(DESTINATION); - - OutputStream out = null; - try { - out = connection.createOutputStream(destination); - LOG.debug("writing..."); - for (int i = 0; i < STREAM_LENGTH; ++i) { - out.write(0); - } - LOG.debug("wrote " + STREAM_LENGTH + " bytes"); - } finally { - if (out != null) { - out.close(); - } - } - - InputStream in = null; - try { - in = connection.createInputStream(destination); - LOG.debug("reading..."); - int count = 0; - while (-1 != in.read()) { - ++count; - } - LOG.debug("read " + count + " bytes"); - } finally { - if (in != null) { - in.close(); - } - } - - connection.close(); - broker.stop(); - } -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF 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; + +import java.io.InputStream; +import java.io.OutputStream; + +import javax.jms.Queue; +import javax.jms.Session; + +import junit.framework.TestCase; +import org.apache.activemq.broker.BrokerService; +import org.apache.activemq.command.ActiveMQDestination; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ActiveMQInputStreamTest extends TestCase { + + private static final Logger LOG = LoggerFactory.getLogger(ActiveMQInputStreamTest.class); + + private static final String BROKER_URL = "tcp://localhost:61616"; + private static final String DESTINATION = "destination"; + private static final int STREAM_LENGTH = 64 * 1024 + 0; // change 0 to 1 to make it not crash + + public void testInputStreamMatchesDefaultChuckSize() throws Exception { + BrokerService broker = new BrokerService(); + broker.setUseJmx(false); + broker.setPersistent(false); + broker.setDestinations(new ActiveMQDestination[] { + ActiveMQDestination.createDestination(DESTINATION, ActiveMQDestination.QUEUE_TYPE), + }); + broker.addConnector(BROKER_URL); + broker.start(); + + ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(BROKER_URL); + ActiveMQConnection connection = (ActiveMQConnection) connectionFactory.createConnection(); + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + Queue destination = session.createQueue(DESTINATION); + + OutputStream out = null; + try { + out = connection.createOutputStream(destination); + LOG.debug("writing..."); + for (int i = 0; i < STREAM_LENGTH; ++i) { + out.write(0); + } + LOG.debug("wrote " + STREAM_LENGTH + " bytes"); + } finally { + if (out != null) { + out.close(); + } + } + + InputStream in = null; + try { + in = connection.createInputStream(destination); + LOG.debug("reading..."); + int count = 0; + while (-1 != in.read()) { + ++count; + } + LOG.debug("read " + count + " bytes"); + } finally { + if (in != null) { + in.close(); + } + } + + connection.close(); + broker.stop(); + } +} diff --git a/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java b/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java index 469a0315e3..42fb9cd8db 100644 --- a/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java @@ -53,11 +53,11 @@ import org.apache.activemq.management.JMSConnectionStatsImpl; import org.apache.activemq.transport.Transport; import org.apache.activemq.transport.failover.FailoverTransport; import org.apache.activemq.transport.stomp.StompTransportFilter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ActiveMQXAConnectionFactoryTest extends CombinationTestSupport { - private static final Log LOG = LogFactory.getLog(ActiveMQXAConnectionFactoryTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ActiveMQXAConnectionFactoryTest.class); long txGenerator = System.currentTimeMillis(); public void testCopy() throws URISyntaxException, JMSException { diff --git a/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java index df501a728f..427a13276c 100644 --- a/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java @@ -21,8 +21,8 @@ import java.util.Map.Entry; import java.util.concurrent.atomic.AtomicBoolean; import junit.framework.TestCase; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Enforces a test case to run for only an allotted time to prevent them from @@ -34,7 +34,7 @@ import org.apache.commons.logging.LogFactory; public abstract class AutoFailTestSupport extends TestCase { public static final int EXIT_SUCCESS = 0; public static final int EXIT_ERROR = 1; - private static final Log LOG = LogFactory.getLog(AutoFailTestSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(AutoFailTestSupport.class); private long maxTestTime = 5 * 60 * 1000; // 5 mins by default private Thread autoFailThread; @@ -79,7 +79,6 @@ public abstract class AutoFailTestSupport extends TestCase { // which usually means, it has finished its run. if (!isTestSuccess.get()) { LOG.error("Test case has exceeded the maximum allotted time to run of: " + getMaxTestTime() + " ms."); - LOG.fatal("Test case has exceeded the maximum allotted time to run of: " + getMaxTestTime() + " ms."); dumpAllThreads(getName()); System.exit(EXIT_ERROR); } diff --git a/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java index 1813acba94..dc4ddef909 100755 --- a/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java @@ -32,8 +32,8 @@ import java.util.Map; import junit.framework.Test; import junit.framework.TestSuite; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Poor mans way of getting JUnit to run a test case through a few different @@ -60,7 +60,7 @@ import org.apache.commons.logging.LogFactory; */ public abstract class CombinationTestSupport extends AutoFailTestSupport { - private static final Log LOG = LogFactory.getLog(CombinationTestSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(CombinationTestSupport.class); private HashMap comboOptions = new HashMap(); private boolean combosEvaluated; diff --git a/activemq-core/src/test/java/org/apache/activemq/CreateConsumerButDontStartConnectionWarningTest.java b/activemq-core/src/test/java/org/apache/activemq/CreateConsumerButDontStartConnectionWarningTest.java index 13efcc1f77..f1a503fbce 100644 --- a/activemq-core/src/test/java/org/apache/activemq/CreateConsumerButDontStartConnectionWarningTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/CreateConsumerButDontStartConnectionWarningTest.java @@ -18,14 +18,14 @@ package org.apache.activemq; import javax.jms.JMSException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1 $ */ public class CreateConsumerButDontStartConnectionWarningTest extends JmsQueueSendReceiveTest { - private static final transient Log LOG = LogFactory.getLog(CreateConsumerButDontStartConnectionWarningTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(CreateConsumerButDontStartConnectionWarningTest.class); @Override protected void startConnection() throws JMSException { diff --git a/activemq-core/src/test/java/org/apache/activemq/JMSConsumerTest.java b/activemq-core/src/test/java/org/apache/activemq/JMSConsumerTest.java index 40a3fbd983..20dd321053 100755 --- a/activemq-core/src/test/java/org/apache/activemq/JMSConsumerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/JMSConsumerTest.java @@ -44,8 +44,8 @@ import junit.framework.Test; import org.apache.activemq.broker.jmx.DestinationViewMBean; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Test cases used to test the JMS message consumer. @@ -54,7 +54,7 @@ import org.apache.commons.logging.LogFactory; */ public class JMSConsumerTest extends JmsTestSupport { - private static final Log LOG = LogFactory.getLog(JMSConsumerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JMSConsumerTest.class); public ActiveMQDestination destination; public int deliveryMode; diff --git a/activemq-core/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java b/activemq-core/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java index 25bb533d0e..bbcb514795 100755 --- a/activemq-core/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java @@ -20,15 +20,15 @@ import javax.jms.Message; import javax.jms.Session; import javax.jms.TextMessage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.4 $ */ public class JMSDurableTopicRedeliverTest extends JmsTopicRedeliverTest { - private static final Log LOG = LogFactory.getLog(JMSDurableTopicRedeliverTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JMSDurableTopicRedeliverTest.class); protected void setUp() throws Exception { durable = true; diff --git a/activemq-core/src/test/java/org/apache/activemq/JmsBenchmark.java b/activemq-core/src/test/java/org/apache/activemq/JmsBenchmark.java index ebcb844c93..c7169237c6 100755 --- a/activemq-core/src/test/java/org/apache/activemq/JmsBenchmark.java +++ b/activemq-core/src/test/java/org/apache/activemq/JmsBenchmark.java @@ -42,8 +42,8 @@ import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.TransportConnector; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Benchmarks the broker by starting many consumer and producers against the @@ -54,7 +54,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class JmsBenchmark extends JmsTestSupport { - private static final transient Log LOG = LogFactory.getLog(JmsBenchmark.class); + private static final transient Logger LOG = LoggerFactory.getLogger(JmsBenchmark.class); private static final long SAMPLE_DELAY = Integer.parseInt(System.getProperty("SAMPLE_DELAY", "" + 1000 * 5)); private static final long SAMPLES = Integer.parseInt(System.getProperty("SAMPLES", "10")); diff --git a/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java b/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java index 479cdbc165..ecc3de03d7 100755 --- a/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java @@ -26,14 +26,14 @@ import javax.jms.TextMessage; import javax.jms.Topic; import org.apache.activemq.test.JmsTopicSendReceiveTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.5 $ */ public class JmsDurableTopicSendReceiveTest extends JmsTopicSendReceiveTest { - private static final Log LOG = LogFactory.getLog(JmsDurableTopicSendReceiveTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsDurableTopicSendReceiveTest.class); protected Connection connection2; protected Session session2; diff --git a/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java b/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java index 95795a3026..c4088a0602 100644 --- a/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java @@ -20,14 +20,14 @@ import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest extends JmsQueueSendReceiveTwoConnectionsTest { - private static final Log LOG = LogFactory.getLog(JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.class); private Queue errors = new ConcurrentLinkedQueue(); private int delayBeforeStartingBroker = 1000; diff --git a/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsTest.java b/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsTest.java index 12662dfa5e..8cd26e509d 100755 --- a/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsTest.java @@ -17,8 +17,8 @@ package org.apache.activemq; import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.2 $ diff --git a/activemq-core/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java b/activemq-core/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java index 7fb745814c..cba662c383 100755 --- a/activemq-core/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java @@ -28,14 +28,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.test.JmsResourceProvider; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.2 $ */ public class JmsQueueTransactionTest extends JmsTransactionTestSupport { - private static final Log LOG = LogFactory.getLog(JmsQueueTransactionTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsQueueTransactionTest.class); /** * @see org.apache.activemq.JmsTransactionTestSupport#getJmsResourceProvider() diff --git a/activemq-core/src/test/java/org/apache/activemq/JmsRollbackRedeliveryTest.java b/activemq-core/src/test/java/org/apache/activemq/JmsRollbackRedeliveryTest.java index 35ccfd2cc9..f9050c089a 100644 --- a/activemq-core/src/test/java/org/apache/activemq/JmsRollbackRedeliveryTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/JmsRollbackRedeliveryTest.java @@ -31,11 +31,11 @@ import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class JmsRollbackRedeliveryTest extends AutoFailTestSupport { - protected static final Log LOG = LogFactory.getLog(JmsRollbackRedeliveryTest.class); + protected static final Logger LOG = LoggerFactory.getLogger(JmsRollbackRedeliveryTest.class); final int nbMessages = 10; final String destinationName = "Destination"; final String brokerUrl = "vm://localhost?create=false"; diff --git a/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java index 455cda4322..bfb7f12e1f 100755 --- a/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java @@ -33,14 +33,14 @@ import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TextMessage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.7 $ */ public class JmsSendReceiveTestSupport extends TestSupport implements MessageListener { - private static final Log LOG = LogFactory.getLog(JmsSendReceiveTestSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsSendReceiveTestSupport.class); protected int messageCount = 100; protected String[] data; diff --git a/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java b/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java index 1033073758..956fa40fed 100644 --- a/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java @@ -30,15 +30,15 @@ import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.Topic; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * */ public class JmsSendReceiveWithMessageExpirationTest extends TestSupport { - private static final Log LOG = LogFactory.getLog(JmsSendReceiveWithMessageExpirationTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsSendReceiveWithMessageExpirationTest.class); protected int messageCount = 100; protected String[] data; diff --git a/activemq-core/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java b/activemq-core/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java index 6dcc9420c4..5dd15a44ed 100755 --- a/activemq-core/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java @@ -26,15 +26,15 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.jms.Topic; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.4 $ */ public class JmsTopicRedeliverTest extends TestSupport { - private static final Log LOG = LogFactory.getLog(JmsTopicRedeliverTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsTopicRedeliverTest.class); protected Connection connection; protected Session session; diff --git a/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java b/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java index d5d511be10..9124e04dcd 100755 --- a/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java @@ -32,14 +32,14 @@ import javax.jms.TemporaryTopic; import javax.jms.TextMessage; import org.apache.activemq.test.TestSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.3 $ */ public class JmsTopicRequestReplyTest extends TestSupport implements MessageListener { - private static final Log LOG = LogFactory.getLog(JmsTopicRequestReplyTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsTopicRequestReplyTest.class); protected boolean useAsyncConsume; private Connection serverConnection; diff --git a/activemq-core/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java b/activemq-core/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java index 727c9ede9b..3075cb52ab 100755 --- a/activemq-core/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java @@ -28,14 +28,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import javax.jms.Topic; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.2 $ */ public class JmsTopicSelectorTest extends TestSupport { - private static final Log LOG = LogFactory.getLog(JmsTopicSelectorTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsTopicSelectorTest.class); protected Connection connection; protected Session session; diff --git a/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java b/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java index da06892d26..8a02396447 100755 --- a/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java @@ -23,14 +23,14 @@ import javax.jms.MessageConsumer; import javax.jms.Session; import javax.jms.Topic; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.3 $ */ public class JmsTopicSendReceiveTest extends JmsSendReceiveTestSupport { - private static final Log LOG = LogFactory.getLog(JmsTopicSendReceiveTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsTopicSendReceiveTest.class); protected Connection connection; diff --git a/activemq-core/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java index f94ebf30b0..70d03667c0 100755 --- a/activemq-core/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java @@ -37,15 +37,15 @@ import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.test.JmsResourceProvider; import org.apache.activemq.test.TestSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.9 $ */ public abstract class JmsTransactionTestSupport extends TestSupport implements MessageListener { - private static final Log LOG = LogFactory.getLog(JmsTransactionTestSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsTransactionTestSupport.class); private static final int MESSAGE_COUNT = 5; private static final String MESSAGE_TEXT = "message"; diff --git a/activemq-core/src/test/java/org/apache/activemq/LargeMessageTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/LargeMessageTestSupport.java index 57f256c83b..7ed3a44529 100755 --- a/activemq-core/src/test/java/org/apache/activemq/LargeMessageTestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/LargeMessageTestSupport.java @@ -35,8 +35,8 @@ import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.util.IdGenerator; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.4 $ @@ -46,7 +46,7 @@ public class LargeMessageTestSupport extends ClientTestSupport implements Messag protected static final int LARGE_MESSAGE_SIZE = 128 * 1024; protected static final int MESSAGE_COUNT = 100; - private static final Log LOG = LogFactory.getLog(LargeMessageTestSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(LargeMessageTestSupport.class); protected Connection producerConnection; protected Connection consumerConnection; diff --git a/activemq-core/src/test/java/org/apache/activemq/LargeStreamletTest.java b/activemq-core/src/test/java/org/apache/activemq/LargeStreamletTest.java index 9705c65973..9a0ed483e8 100644 --- a/activemq-core/src/test/java/org/apache/activemq/LargeStreamletTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/LargeStreamletTest.java @@ -44,15 +44,15 @@ import javax.jms.Session; import junit.framework.Assert; import junit.framework.TestCase; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author rnewson */ public final class LargeStreamletTest extends TestCase { - private static final Log LOG = LogFactory.getLog(LargeStreamletTest.class); + private static final Logger LOG = LoggerFactory.getLogger(LargeStreamletTest.class); private static final String BROKER_URL = "vm://localhost?broker.persistent=false"; private static final int BUFFER_SIZE = 1 * 1024; private static final int MESSAGE_COUNT = 10 * 1024; diff --git a/activemq-core/src/test/java/org/apache/activemq/LoadTestBurnIn.java b/activemq-core/src/test/java/org/apache/activemq/LoadTestBurnIn.java index 257110e046..8bca79f15c 100644 --- a/activemq-core/src/test/java/org/apache/activemq/LoadTestBurnIn.java +++ b/activemq-core/src/test/java/org/apache/activemq/LoadTestBurnIn.java @@ -38,8 +38,8 @@ import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.TransportConnector; import org.apache.activemq.command.ActiveMQDestination; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Small burn test moves sends a moderate amount of messages through the broker, @@ -49,7 +49,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class LoadTestBurnIn extends JmsTestSupport { - private static final transient Log LOG = LogFactory.getLog(LoadTestBurnIn.class); + private static final transient Logger LOG = LoggerFactory.getLogger(LoadTestBurnIn.class); public ActiveMQDestination destination; public int deliveryMode; diff --git a/activemq-core/src/test/java/org/apache/activemq/MessageEvictionTest.java b/activemq-core/src/test/java/org/apache/activemq/MessageEvictionTest.java index b76a9ee138..b4a6e196c8 100644 --- a/activemq-core/src/test/java/org/apache/activemq/MessageEvictionTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/MessageEvictionTest.java @@ -53,13 +53,13 @@ import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.After; import org.junit.Test; public class MessageEvictionTest { - static final Log LOG = LogFactory.getLog(MessageEvictionTest.class); + static final Logger LOG = LoggerFactory.getLogger(MessageEvictionTest.class); private BrokerService broker; private ConnectionFactory connectionFactory; Connection connection; diff --git a/activemq-core/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java b/activemq-core/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java index 97a5a08339..5f647fa84e 100644 --- a/activemq-core/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java @@ -37,12 +37,12 @@ import junit.framework.TestCase; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class MessageListenerRedeliveryTest extends TestCase { - private static final Log LOG = LogFactory.getLog(MessageListenerRedeliveryTest.class); + private static final Logger LOG = LoggerFactory.getLogger(MessageListenerRedeliveryTest.class); private Connection connection; diff --git a/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java b/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java index 042ca51768..900b1c0ab7 100644 --- a/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java @@ -35,12 +35,12 @@ import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; // see: https://issues.apache.org/activemq/browse/AMQ-2651 public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport { - private static final Log LOG = LogFactory.getLog(OnePrefetchAsyncConsumerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(OnePrefetchAsyncConsumerTest.class); private TestMutex testMutex; protected Connection connection; @@ -211,4 +211,4 @@ public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport { boolean testCompleted = false; boolean testSuccessful = true; } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java b/activemq-core/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java index aee9ceecc0..83d9179858 100644 --- a/activemq-core/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java @@ -38,12 +38,12 @@ import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.transport.tcp.TcpTransport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; // see: https://issues.apache.org/activemq/browse/AMQ-2668 public class PerDestinationStoreLimitTest extends JmsTestSupport { - static final Log LOG = LogFactory.getLog(PerDestinationStoreLimitTest.class); + static final Logger LOG = LoggerFactory.getLogger(PerDestinationStoreLimitTest.class); final String oneKb = new String(new byte[1024]); ActiveMQDestination queueDest = new ActiveMQQueue("PerDestinationStoreLimitTest.Queue"); diff --git a/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlTest.java b/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlTest.java index ea0c1a844d..70e15eca7d 100644 --- a/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlTest.java @@ -37,11 +37,11 @@ import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePoli import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.transport.tcp.TcpTransport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ProducerFlowControlTest extends JmsTestSupport { - static final Log LOG = LogFactory.getLog(ProducerFlowControlTest.class); + static final Logger LOG = LoggerFactory.getLogger(ProducerFlowControlTest.class); ActiveMQQueue queueA = new ActiveMQQueue("QUEUE.A"); ActiveMQQueue queueB = new ActiveMQQueue("QUEUE.B"); protected TransportConnector connector; diff --git a/activemq-core/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java b/activemq-core/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java index 4b55b6e902..edecbb9d34 100644 --- a/activemq-core/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java @@ -22,15 +22,15 @@ import javax.jms.JMSException; import javax.jms.Session; import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * * @version $Revision$ */ public class ReconnectWithSameClientIDTest extends EmbeddedBrokerTestSupport { - private static final Log LOG = LogFactory.getLog(ReconnectWithSameClientIDTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ReconnectWithSameClientIDTest.class); protected Connection connection; protected boolean transacted; diff --git a/activemq-core/src/test/java/org/apache/activemq/SpringTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/SpringTestSupport.java index 8249bbd443..55a54e1fda 100755 --- a/activemq-core/src/test/java/org/apache/activemq/SpringTestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/SpringTestSupport.java @@ -22,8 +22,8 @@ import java.util.HashSet; import java.util.Set; import junit.framework.TestCase; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.support.AbstractApplicationContext; /** diff --git a/activemq-core/src/test/java/org/apache/activemq/TestSupport.java b/activemq-core/src/test/java/org/apache/activemq/TestSupport.java index 095c7b8da1..db0bd061a3 100755 --- a/activemq-core/src/test/java/org/apache/activemq/TestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/TestSupport.java @@ -41,8 +41,8 @@ import org.apache.activemq.store.amq.AMQPersistenceAdapter; import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; import org.apache.activemq.store.memory.MemoryPersistenceAdapter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Useful base class for unit test cases diff --git a/activemq-core/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java b/activemq-core/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java index afe5240c5c..5599c3c5f7 100644 --- a/activemq-core/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java @@ -28,15 +28,15 @@ import javax.jms.TextMessage; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.spring.SpringConsumer; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class ZeroPrefetchConsumerTest extends EmbeddedBrokerTestSupport { - private static final Log LOG = LogFactory.getLog(ZeroPrefetchConsumerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ZeroPrefetchConsumerTest.class); protected Connection connection; protected Queue queue; diff --git a/activemq-core/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java b/activemq-core/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java index 12d463875e..845dd46716 100644 --- a/activemq-core/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java @@ -29,15 +29,15 @@ import javax.jms.Session; import org.apache.activemq.EmbeddedBrokerTestSupport; import org.apache.activemq.ReconnectWithSameClientIDTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * * @version $Revision$ */ public class ConsumerListenerTest extends EmbeddedBrokerTestSupport implements ConsumerListener { - private static final Log LOG = LogFactory.getLog(ConsumerListenerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ConsumerListenerTest.class); protected Session consumerSession1; protected Session consumerSession2; diff --git a/activemq-core/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java b/activemq-core/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java index f854f0ab90..495365c5ea 100644 --- a/activemq-core/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java @@ -30,8 +30,8 @@ import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.*; @@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.*; * @version $Revision$ */ public class DestinationListenerTest extends EmbeddedBrokerTestSupport implements DestinationListener { - private static final transient Log LOG = LogFactory.getLog(DestinationListenerTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(DestinationListenerTest.class); protected ActiveMQConnection connection; protected ActiveMQQueue sampleQueue = new ActiveMQQueue("foo.bar"); protected ActiveMQTopic sampleTopic = new ActiveMQTopic("cheese"); @@ -126,4 +126,4 @@ public class DestinationListenerTest extends EmbeddedBrokerTestSupport implement } super.tearDown(); } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/advisory/MasterSlaveTempQueueMemoryTest.java b/activemq-core/src/test/java/org/apache/activemq/advisory/MasterSlaveTempQueueMemoryTest.java index ce796f26a3..7bef61c566 100644 --- a/activemq-core/src/test/java/org/apache/activemq/advisory/MasterSlaveTempQueueMemoryTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/advisory/MasterSlaveTempQueueMemoryTest.java @@ -32,13 +32,13 @@ import org.apache.activemq.broker.region.RegionBroker; import org.apache.activemq.broker.region.policy.DispatchPolicy; import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class MasterSlaveTempQueueMemoryTest extends TempQueueMemoryTest { - private static final transient Log LOG = LogFactory.getLog(MasterSlaveTempQueueMemoryTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(MasterSlaveTempQueueMemoryTest.class); String masterBindAddress = "tcp://localhost:61616"; String slaveBindAddress = "tcp://localhost:62616"; diff --git a/activemq-core/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java b/activemq-core/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java index 7e7079490e..e9f3687638 100644 --- a/activemq-core/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java @@ -26,15 +26,15 @@ import javax.jms.MessageProducer; import javax.jms.Session; import org.apache.activemq.EmbeddedBrokerTestSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * * @version $Revision: 359679 $ */ public class ProducerListenerTest extends EmbeddedBrokerTestSupport implements ProducerListener { - private static final Log LOG = LogFactory.getLog(ProducerListenerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ProducerListenerTest.class); protected Session consumerSession1; protected Session consumerSession2; diff --git a/activemq-core/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java b/activemq-core/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java index 775853c98a..98a22c2df6 100644 --- a/activemq-core/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java @@ -33,14 +33,14 @@ import org.apache.activemq.EmbeddedBrokerTestSupport; import org.apache.activemq.broker.region.RegionBroker; import org.apache.activemq.command.ActiveMQTempQueue; import org.apache.activemq.command.ActiveMQTempTopic; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 397249 $ */ public class TempDestDeleteTest extends EmbeddedBrokerTestSupport implements ConsumerListener { - private static final Log LOG = LogFactory.getLog(TempDestDeleteTest.class); + private static final Logger LOG = LoggerFactory.getLogger(TempDestDeleteTest.class); protected int consumerCounter; protected ConsumerEventSource topicConsumerEventSource; diff --git a/activemq-core/src/test/java/org/apache/activemq/blob/FilesystemBlobTest.java b/activemq-core/src/test/java/org/apache/activemq/blob/FilesystemBlobTest.java index a5168c413b..bcd4a9769c 100644 --- a/activemq-core/src/test/java/org/apache/activemq/blob/FilesystemBlobTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/blob/FilesystemBlobTest.java @@ -1,105 +1,105 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF 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.blob; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import java.io.InputStream; - -import javax.jms.Connection; -import javax.jms.Message; -import javax.jms.MessageConsumer; -import javax.jms.MessageProducer; -import javax.jms.Session; - -import junit.framework.Assert; - -import org.apache.activemq.ActiveMQSession; -import org.apache.activemq.BlobMessage; -import org.apache.activemq.EmbeddedBrokerTestSupport; -import org.apache.activemq.command.ActiveMQBlobMessage; -import org.apache.activemq.util.IOHelper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - - -public class FilesystemBlobTest extends EmbeddedBrokerTestSupport { - private static final Log LOG = LogFactory.getLog(FilesystemBlobTest.class); - - private Connection connection; - private String tmpDir = System.getProperty("user.dir") + "/target/FilesystemBlobTest"; - public void setUp() throws Exception { - super.setUp(); - // replace \ with / to let it work on windows too - String fileUrl = "file:///" +tmpDir.replaceAll("\\\\", "/"); - LOG.info("Using file: " + fileUrl); - bindAddress = "vm://localhost?jms.blobTransferPolicy.defaultUploadUrl=" + fileUrl; - - connectionFactory = createConnectionFactory(); - - connection = createConnection(); - connection.start(); - } - - - public void testBlobFile() throws Exception { - // first create Message - File file = File.createTempFile("amq-data-file-", ".dat"); - // lets write some data - String content = "hello world " + System.currentTimeMillis(); - BufferedWriter writer = new BufferedWriter(new FileWriter(file)); - writer.append(content); - writer.close(); - - ActiveMQSession session = (ActiveMQSession) connection.createSession( - false, Session.AUTO_ACKNOWLEDGE); - MessageProducer producer = session.createProducer(destination); - MessageConsumer consumer = session.createConsumer(destination); - BlobMessage message = session.createBlobMessage(file); - - producer.send(message); - Thread.sleep(1000); - - // check message send - Message msg = consumer.receive(1000); - Assert.assertTrue(msg instanceof ActiveMQBlobMessage); - - InputStream input = ((ActiveMQBlobMessage) msg).getInputStream(); - StringBuilder b = new StringBuilder(); - int i = input.read(); - while (i != -1) { - b.append((char) i); - i = input.read(); - } - input.close(); - File uploaded = new File(tmpDir, msg.getJMSMessageID().toString().replace(":", "_")); - Assert.assertEquals(content, b.toString()); - assertTrue(uploaded.exists()); - ((ActiveMQBlobMessage)msg).deleteFile(); - assertFalse(uploaded.exists()); - } - - protected void tearDown() throws Exception { - if (connection != null) { - connection.stop(); - } - super.tearDown(); - - IOHelper.deleteFile(new File(tmpDir)); - } -} \ No newline at end of file +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF 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.blob; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.InputStream; + +import javax.jms.Connection; +import javax.jms.Message; +import javax.jms.MessageConsumer; +import javax.jms.MessageProducer; +import javax.jms.Session; + +import junit.framework.Assert; + +import org.apache.activemq.ActiveMQSession; +import org.apache.activemq.BlobMessage; +import org.apache.activemq.EmbeddedBrokerTestSupport; +import org.apache.activemq.command.ActiveMQBlobMessage; +import org.apache.activemq.util.IOHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +public class FilesystemBlobTest extends EmbeddedBrokerTestSupport { + private static final Logger LOG = LoggerFactory.getLogger(FilesystemBlobTest.class); + + private Connection connection; + private String tmpDir = System.getProperty("user.dir") + "/target/FilesystemBlobTest"; + public void setUp() throws Exception { + super.setUp(); + // replace \ with / to let it work on windows too + String fileUrl = "file:///" +tmpDir.replaceAll("\\\\", "/"); + LOG.info("Using file: " + fileUrl); + bindAddress = "vm://localhost?jms.blobTransferPolicy.defaultUploadUrl=" + fileUrl; + + connectionFactory = createConnectionFactory(); + + connection = createConnection(); + connection.start(); + } + + + public void testBlobFile() throws Exception { + // first create Message + File file = File.createTempFile("amq-data-file-", ".dat"); + // lets write some data + String content = "hello world " + System.currentTimeMillis(); + BufferedWriter writer = new BufferedWriter(new FileWriter(file)); + writer.append(content); + writer.close(); + + ActiveMQSession session = (ActiveMQSession) connection.createSession( + false, Session.AUTO_ACKNOWLEDGE); + MessageProducer producer = session.createProducer(destination); + MessageConsumer consumer = session.createConsumer(destination); + BlobMessage message = session.createBlobMessage(file); + + producer.send(message); + Thread.sleep(1000); + + // check message send + Message msg = consumer.receive(1000); + Assert.assertTrue(msg instanceof ActiveMQBlobMessage); + + InputStream input = ((ActiveMQBlobMessage) msg).getInputStream(); + StringBuilder b = new StringBuilder(); + int i = input.read(); + while (i != -1) { + b.append((char) i); + i = input.read(); + } + input.close(); + File uploaded = new File(tmpDir, msg.getJMSMessageID().toString().replace(":", "_")); + Assert.assertEquals(content, b.toString()); + assertTrue(uploaded.exists()); + ((ActiveMQBlobMessage)msg).deleteFile(); + assertFalse(uploaded.exists()); + } + + protected void tearDown() throws Exception { + if (connection != null) { + connection.stop(); + } + super.tearDown(); + + IOHelper.deleteFile(new File(tmpDir)); + } +} diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java b/activemq-core/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java index 10e961001c..7b37d3c0b5 100755 --- a/activemq-core/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java @@ -29,8 +29,8 @@ import org.apache.activemq.command.Message; import org.apache.activemq.command.MessageAck; import org.apache.activemq.command.ProducerInfo; import org.apache.activemq.command.SessionInfo; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * BrokerBenchmark is used to get an idea of the raw performance of a broker. @@ -45,7 +45,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.9 $ */ public class BrokerBenchmark extends BrokerTestSupport { - private static final transient Log LOG = LogFactory.getLog(BrokerBenchmark.class); + private static final transient Logger LOG = LoggerFactory.getLogger(BrokerBenchmark.class); public int produceCount = Integer.parseInt(System.getProperty("PRODUCE_COUNT", "10000")); public ActiveMQDestination destination; diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/NioQueueSubscriptionTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/NioQueueSubscriptionTest.java index 872da8b299..4833626798 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/NioQueueSubscriptionTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/NioQueueSubscriptionTest.java @@ -34,14 +34,14 @@ import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @SuppressWarnings("unchecked") public class NioQueueSubscriptionTest extends QueueSubscriptionTest implements ExceptionListener { - protected static final Log LOG = LogFactory.getLog(NioQueueSubscriptionTest.class); + protected static final Logger LOG = LoggerFactory.getLogger(NioQueueSubscriptionTest.class); private Map exceptions = Collections.synchronizedMap(new HashMap()); diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/SpringTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/SpringTest.java index 46e0a87ef9..5286ef022a 100755 --- a/activemq-core/src/test/java/org/apache/activemq/broker/SpringTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/SpringTest.java @@ -24,14 +24,14 @@ import junit.framework.TestCase; import org.apache.activemq.spring.SpringConsumer; import org.apache.activemq.spring.SpringProducer; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class SpringTest extends TestCase { - private static final Log LOG = LogFactory.getLog(SpringTest.class); + private static final Logger LOG = LoggerFactory.getLogger(SpringTest.class); protected AbstractApplicationContext context; protected SpringConsumer consumer; diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java index c6b59e3f9b..db2f11ca22 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java @@ -21,12 +21,12 @@ import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageProducer; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.derby.jdbc.EmbeddedDataSource; public class DbRestartJDBCQueueMasterSlaveTest extends JDBCQueueMasterSlaveTest { - private static final transient Log LOG = LogFactory.getLog(DbRestartJDBCQueueMasterSlaveTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(DbRestartJDBCQueueMasterSlaveTest.class); protected void messageSent() throws Exception { if (++inflightMessageCount == failureCount) { diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveProducerFlowControlTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveProducerFlowControlTest.java index 808fadfca8..488cabbbca 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveProducerFlowControlTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveProducerFlowControlTest.java @@ -22,11 +22,11 @@ import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy; import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class MasterSlaveProducerFlowControlTest extends ProducerFlowControlTest { - static final Log LOG = LogFactory.getLog(MasterSlaveProducerFlowControlTest.class); + static final Logger LOG = LoggerFactory.getLogger(MasterSlaveProducerFlowControlTest.class); BrokerService slave; protected BrokerService createBroker() throws Exception { BrokerService service = super.createBroker(); diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveSlaveDieTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveSlaveDieTest.java index 246d901119..9f3990559a 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveSlaveDieTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveSlaveDieTest.java @@ -25,12 +25,12 @@ import junit.framework.TestCase; import org.apache.activemq.broker.BrokerPlugin; import org.apache.activemq.broker.BrokerPluginSupport; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class MasterSlaveSlaveDieTest extends TestCase { - private static final Log LOG = LogFactory.getLog(MasterSlaveSlaveDieTest.class); + private static final Logger LOG = LoggerFactory.getLogger(MasterSlaveSlaveDieTest.class); private final AtomicBoolean pluginStopped = new AtomicBoolean(false); class Plugin extends BrokerPluginSupport { @@ -95,4 +95,4 @@ public class MasterSlaveSlaveDieTest extends TestCase { master.stop(); master.waitUntilStopped(); } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java index 737e25078f..a9527e10f5 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java @@ -25,15 +25,15 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.JmsTopicSendReceiveWithTwoConnectionsTest; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.xbean.BrokerFactoryBean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.core.io.ClassPathResource; /** * Test failover for Queues */ public class QueueMasterSlaveTest extends JmsTopicSendReceiveWithTwoConnectionsTest { - private static final transient Log LOG = LogFactory.getLog(QueueMasterSlaveTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(QueueMasterSlaveTest.class); protected BrokerService master; protected AtomicReference slave = new AtomicReference(); diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java index b814ea490e..3c5f02cea1 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java @@ -50,8 +50,8 @@ import org.apache.activemq.command.ActiveMQBlobMessage; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTempQueue; import org.apache.activemq.util.JMXSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A test case of the various MBeans in ActiveMQ. If you want to look at the @@ -61,7 +61,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class MBeanTest extends EmbeddedBrokerTestSupport { - private static final Log LOG = LogFactory.getLog(MBeanTest.class); + private static final Logger LOG = LoggerFactory.getLogger(MBeanTest.class); private static boolean waitForKeyPress; diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java index e38843583a..0f7360866b 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java @@ -31,8 +31,8 @@ import org.apache.activemq.store.PersistenceAdapter; import org.apache.activemq.store.amq.AMQPersistenceAdapter; import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter; import org.apache.activemq.store.memory.MemoryPersistenceAdapter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A specific test of Queue.purge() functionality @@ -40,7 +40,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class PurgeTest extends EmbeddedBrokerTestSupport { - private static final Log LOG = LogFactory.getLog(PurgeTest.class); + private static final Logger LOG = LoggerFactory.getLogger(PurgeTest.class); protected MBeanServer mbeanServer; protected String domain = "org.apache.activemq"; diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/policy/AbortSlowConsumerTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/policy/AbortSlowConsumerTest.java index 058e4bc496..162e3419be 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/policy/AbortSlowConsumerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/policy/AbortSlowConsumerTest.java @@ -26,8 +26,8 @@ import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.util.MessageIdList; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.jms.Connection; import javax.jms.ExceptionListener; @@ -45,7 +45,7 @@ import java.util.concurrent.TimeUnit; public class AbortSlowConsumerTest extends JmsMultipleClientsTestSupport implements ExceptionListener { - private static final Log LOG = LogFactory.getLog(AbortSlowConsumerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(AbortSlowConsumerTest.class); AbortSlowConsumerStrategy underTest; diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java index c5245313ea..f21fc652bb 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java @@ -23,15 +23,15 @@ import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.RedeliveryPolicy; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * * @version $Revision$ */ public class DeadLetterTest extends DeadLetterTestSupport { - private static final Log LOG = LogFactory.getLog(DeadLetterTest.class); + private static final Logger LOG = LoggerFactory.getLogger(DeadLetterTest.class); protected int rollbackCount; diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java index eeb447c24d..d0386b9338 100755 --- a/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java @@ -36,14 +36,14 @@ import org.apache.activemq.broker.region.RegionBroker; import org.apache.activemq.broker.region.policy.DeadLetterStrategy; import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public abstract class DeadLetterTestSupport extends TestSupport { - private static final Log LOG = LogFactory.getLog(DeadLetterTestSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(DeadLetterTestSupport.class); protected int messageCount = 10; protected long timeToLive; diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterTest.java index b378c219d2..d81f7ff4d2 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterTest.java @@ -31,14 +31,14 @@ import org.apache.activemq.broker.region.policy.IndividualDeadLetterStrategy; import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class IndividualDeadLetterTest extends DeadLetterTest { - private static final Log LOG = LogFactory.getLog(IndividualDeadLetterTest.class); + private static final Logger LOG = LoggerFactory.getLogger(IndividualDeadLetterTest.class); protected BrokerService createBroker() throws Exception { BrokerService broker = super.createBroker(); diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java index 72553089bf..78da9818bf 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java @@ -21,8 +21,8 @@ import javax.jms.Destination; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.xbean.BrokerFactoryBean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.core.io.ClassPathResource; /** @@ -30,7 +30,7 @@ import org.springframework.core.io.ClassPathResource; * @version $Revision$ */ public class IndividualDeadLetterViaXmlTest extends DeadLetterTest { - private static final Log LOG = LogFactory.getLog(IndividualDeadLetterViaXmlTest.class); + private static final Logger LOG = LoggerFactory.getLogger(IndividualDeadLetterViaXmlTest.class); protected BrokerService createBroker() throws Exception { diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/policy/MessageListenerDeadLetterTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/policy/MessageListenerDeadLetterTest.java index 551ad79842..b91f5a8b84 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/policy/MessageListenerDeadLetterTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/policy/MessageListenerDeadLetterTest.java @@ -28,12 +28,12 @@ import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.RedeliveryPolicy; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class MessageListenerDeadLetterTest extends DeadLetterTestSupport { - private static final Log LOG = LogFactory - .getLog(MessageListenerDeadLetterTest.class); + private static final Logger LOG = LoggerFactory + .getLogger(MessageListenerDeadLetterTest.class); private int rollbackCount; @@ -148,4 +148,4 @@ public class MessageListenerDeadLetterTest extends DeadLetterTestSupport { } } } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/policy/NoRetryDeadLetterTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/policy/NoRetryDeadLetterTest.java index cf774096d6..7421245920 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/policy/NoRetryDeadLetterTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/policy/NoRetryDeadLetterTest.java @@ -18,11 +18,11 @@ package org.apache.activemq.broker.policy; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.RedeliveryPolicy; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class NoRetryDeadLetterTest extends DeadLetterTest { - private static final Log LOG = LogFactory.getLog(NoRetryDeadLetterTest.class); + private static final Logger LOG = LoggerFactory.getLogger(NoRetryDeadLetterTest.class); protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { ActiveMQConnectionFactory connectionFactory = super.createConnectionFactory(); diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/region/QueueDuplicatesFromStoreTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/region/QueueDuplicatesFromStoreTest.java index 4798dea818..1fe61beb89 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/region/QueueDuplicatesFromStoreTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/region/QueueDuplicatesFromStoreTest.java @@ -48,16 +48,16 @@ import org.apache.activemq.state.ProducerState; import org.apache.activemq.store.MessageStore; import org.apache.activemq.store.PersistenceAdapter; import org.apache.activemq.thread.TaskRunnerFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author gtully * @see https://issues.apache.org/activemq/browse/AMQ-2020 **/ public class QueueDuplicatesFromStoreTest extends TestCase { - private static final Log LOG = LogFactory - .getLog(QueueDuplicatesFromStoreTest.class); + private static final Logger LOG = LoggerFactory + .getLogger(QueueDuplicatesFromStoreTest.class); ActiveMQQueue destination = new ActiveMQQueue("queue-" + QueueDuplicatesFromStoreTest.class.getSimpleName()); diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/region/QueuePurgeTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/region/QueuePurgeTest.java index 2dfeb15c7b..e4743d38d6 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/region/QueuePurgeTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/region/QueuePurgeTest.java @@ -40,11 +40,11 @@ import org.apache.activemq.broker.region.policy.PendingQueueMessageStoragePolicy import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class QueuePurgeTest extends TestCase { - private static final Log LOG = LogFactory.getLog(QueuePurgeTest.class); + private static final Logger LOG = LoggerFactory.getLogger(QueuePurgeTest.class); private final String MESSAGE_TEXT = new String(new byte[1024]); BrokerService broker; ConnectionFactory factory; diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java b/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java index d1b4a8147f..f73cb5d5e9 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java @@ -19,8 +19,8 @@ package org.apache.activemq.broker.region.cursors; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.CombinationTestSupport; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.List; import java.util.Properties; @@ -44,7 +44,7 @@ public abstract class CursorSupport extends CombinationTestSupport { public int MESSAGE_COUNT = 500; public int PREFETCH_SIZE = 50; - private static final Log LOG = LogFactory.getLog(CursorSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(CursorSupport.class); protected BrokerService broker; protected String bindAddress = "tcp://localhost:60706"; @@ -148,8 +148,8 @@ public abstract class CursorSupport extends CombinationTestSupport { Message consumed = consumerList.get(i); if (!sent.equals(consumed)) { LOG.error("BAD MATCH AT POS " + i); - LOG.error(sent); - LOG.error(consumed); + LOG.error(sent.toString()); + LOG.error(consumed.toString()); /* * log.error("\n\n\n\n\n"); for (int j = 0; j < * consumerList.size(); j++) { log.error(consumerList.get(j)); } diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/NegativeQueueTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/NegativeQueueTest.java index 2f3ac69520..09eb37174b 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/NegativeQueueTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/NegativeQueueTest.java @@ -52,8 +52,8 @@ import org.apache.activemq.usage.StoreUsage; import org.apache.activemq.usage.SystemUsage; import org.apache.activemq.usage.TempUsage; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Modified CursorSupport Unit test to reproduce the negative queue issue. @@ -79,7 +79,7 @@ import org.apache.commons.logging.LogFactory; * */ public class NegativeQueueTest extends AutoFailTestSupport { - private static final Log LOG = LogFactory.getLog(NegativeQueueTest.class); + private static final Logger LOG = LoggerFactory.getLogger(NegativeQueueTest.class); public static SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd,hh:mm:ss:SSS"); @@ -414,4 +414,4 @@ public class NegativeQueueTest extends AutoFailTestSupport { } } } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupTest.java index 5a60f54cb6..3437ba81e7 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupTest.java @@ -27,12 +27,12 @@ import org.apache.activemq.CombinationTestSupport; import org.apache.activemq.JmsTestSupport; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class MessageGroupTest extends JmsTestSupport { - private static final Log LOG = LogFactory.getLog(CombinationTestSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(CombinationTestSupport.class); public void testGroupedMessagesDeliveredToOnlyOneConsumer() throws Exception { diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerManagementTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerManagementTest.java index d1b69764dc..b6acef5f9b 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerManagementTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerManagementTest.java @@ -34,12 +34,12 @@ import org.apache.activemq.ScheduledMessage; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.util.IOHelper; import org.apache.activemq.util.IdGenerator; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class JobSchedulerManagementTest extends EmbeddedBrokerTestSupport { - private static final transient Log LOG = LogFactory.getLog(JobSchedulerManagementTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(JobSchedulerManagementTest.class); public void testRemoveAllScheduled() throws Exception { final int COUNT = 5; diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java b/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java index 52fe1f1d20..67cc38b01d 100755 --- a/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java @@ -38,15 +38,15 @@ import org.apache.activemq.broker.TransportConnector; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.memory.list.SimpleMessageList; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class LoadTester extends JmsTestSupport { - private static final Log LOG = LogFactory.getLog(LoadTester.class); + private static final Logger LOG = LoggerFactory.getLogger(LoadTester.class); protected int messageSize = 1024 * 64; protected int produceCount = 10000; diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/util/PluginBrokerTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/util/PluginBrokerTest.java index 13c03c3e5f..ef16339076 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/util/PluginBrokerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/util/PluginBrokerTest.java @@ -25,15 +25,15 @@ import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.test.JmsTopicSendReceiveTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * * @version $Revision: 564271 $ */ public class PluginBrokerTest extends JmsTopicSendReceiveTest { - private static final Log LOG = LogFactory.getLog(PluginBrokerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(PluginBrokerTest.class); private BrokerService broker; protected void setUp() throws Exception { diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java index 6724dab5b2..5626d93e0e 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java @@ -32,8 +32,8 @@ import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.spring.ConsumerBean; import org.apache.activemq.xbean.XBeanBrokerFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @@ -41,7 +41,7 @@ import org.apache.commons.logging.LogFactory; */ public class CompositeQueueTest extends EmbeddedBrokerTestSupport { - private static final Log LOG = LogFactory.getLog(CompositeQueueTest.class); + private static final Logger LOG = LoggerFactory.getLogger(CompositeQueueTest.class); protected int total = 10; protected Connection connection; diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/virtual/MirroredQueueTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/virtual/MirroredQueueTest.java index b3b9ca7e52..094206f1ad 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/virtual/MirroredQueueTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/virtual/MirroredQueueTest.java @@ -29,14 +29,14 @@ import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.spring.ConsumerBean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: $ */ public class MirroredQueueTest extends EmbeddedBrokerTestSupport { - private static final transient Log LOG = LogFactory.getLog(MirroredQueueTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(MirroredQueueTest.class); private Connection connection; public void testSendingToQueueIsMirrored() throws Exception { @@ -112,4 +112,4 @@ public class MirroredQueueTest extends EmbeddedBrokerTestSupport { } super.tearDown(); } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicSelectorTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicSelectorTest.java index 2b6d8d9c2f..3287bab029 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicSelectorTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicSelectorTest.java @@ -30,12 +30,12 @@ import org.apache.activemq.broker.region.virtual.VirtualTopic; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.spring.ConsumerBean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class VirtualTopicSelectorTest extends CompositeTopicTest { - private static final Log LOG = LogFactory.getLog(VirtualTopicSelectorTest.class); + private static final Logger LOG = LoggerFactory.getLogger(VirtualTopicSelectorTest.class); protected Destination getConsumer1Dsetination() { return new ActiveMQQueue("Consumer.1.VirtualTopic.TEST"); @@ -102,4 +102,4 @@ public class VirtualTopicSelectorTest extends CompositeTopicTest { broker.setDestinationInterceptors(new DestinationInterceptor[]{interceptor}); return broker; } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1866.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1866.java index 42c8eb7246..b0e6ddf4cd 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1866.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1866.java @@ -34,8 +34,8 @@ import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.store.amq.AMQPersistenceAdapter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This is a test case for the issue reported at: @@ -47,7 +47,7 @@ import org.apache.commons.logging.LogFactory; */ public class AMQ1866 extends TestCase { - private static final Log log = LogFactory.getLog(ConsumerThread.class); + private static final Logger log = LoggerFactory.getLogger(ConsumerThread.class); private BrokerService brokerService; private ArrayList threads = new ArrayList(); diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1893Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1893Test.java index e056d79081..f5ccd50269 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1893Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1893Test.java @@ -20,8 +20,8 @@ import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.jms.Connection; import javax.jms.ConnectionFactory; @@ -40,7 +40,7 @@ import java.util.concurrent.atomic.AtomicInteger; public class AMQ1893Test extends TestCase { - private static final Log log = LogFactory.getLog(AMQ1893Test.class); + private static final Logger log = LoggerFactory.getLogger(AMQ1893Test.class); static final String QUEUE_NAME = "TEST"; @@ -193,4 +193,4 @@ public class AMQ1893Test extends TestCase { } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java index 78ad8c3033..71cba39190 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java @@ -38,8 +38,8 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This is a test case for the issue reported at: @@ -49,7 +49,7 @@ import org.apache.commons.logging.LogFactory; */ public class AMQ2021Test extends TestCase implements ExceptionListener, UncaughtExceptionHandler { - private static final Log log = LogFactory.getLog(AMQ2021Test.class); + private static final Logger log = LoggerFactory.getLogger(AMQ2021Test.class); BrokerService brokerService; ArrayList threads = new ArrayList(); Vector exceptions; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2084Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2084Test.java index c91707f34d..832fd3e745 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2084Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2084Test.java @@ -41,15 +41,15 @@ import javax.jms.TopicSubscriber; import javax.naming.InitialContext; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.After; import org.junit.Before; import org.junit.Test; public class AMQ2084Test { - private static final Log LOG = LogFactory.getLog(AMQ2084Test.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQ2084Test.class); BrokerService broker; CountDownLatch qreceived; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2102Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2102Test.java index a18f6b6f86..e8ffcb715c 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2102Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2102Test.java @@ -42,8 +42,8 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.CombinationTestSupport; import org.apache.activemq.RedeliveryPolicy; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class AMQ2102Test extends CombinationTestSupport implements UncaughtExceptionHandler { @@ -52,7 +52,7 @@ public class AMQ2102Test extends CombinationTestSupport implements UncaughtExcep final static int CONSUME_ALL = -1; - private static final Log LOG = LogFactory.getLog(AMQ2102Test.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQ2102Test.class); private final static Map exceptions = new ConcurrentHashMap(); @@ -391,7 +391,7 @@ public class AMQ2102Test extends CombinationTestSupport implements UncaughtExcep } public void onException(JMSException exception) { - LOG.error(exception); + LOG.error(exception.toString()); exceptions.put(Thread.currentThread(), exception); } } diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2149Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2149Test.java index 62efec79d5..9c3edb8b6f 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2149Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2149Test.java @@ -46,8 +46,8 @@ import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.store.amq.AMQPersistenceAdapterFactory; import org.apache.activemq.usage.MemoryUsage; import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; interface Configurer { public void configure(BrokerService broker) throws Exception; @@ -55,7 +55,7 @@ interface Configurer { public class AMQ2149Test extends AutoFailTestSupport { - private static final Log LOG = LogFactory.getLog(AMQ2149Test.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQ2149Test.class); private static final String BROKER_CONNECTOR = "tcp://localhost:61617"; private static final String DEFAULT_BROKER_URL = "failover:("+ BROKER_CONNECTOR diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java index 980ce2e502..12c8006b7f 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java @@ -41,12 +41,12 @@ import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.util.Wait; import org.apache.activemq.util.Wait.Condition; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class AMQ2183Test extends AutoFailTestSupport implements UncaughtExceptionHandler, MessageListener { - private static final Log LOG = LogFactory.getLog(AMQ2183Test.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQ2183Test.class); private static final int maxSent = 2000; private final Map exceptions = new ConcurrentHashMap(); diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2314Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2314Test.java index 3b0e3c554e..b6c7691413 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2314Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2314Test.java @@ -35,8 +35,8 @@ import org.apache.activemq.CombinationTestSupport; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class AMQ2314Test extends CombinationTestSupport { @@ -44,7 +44,7 @@ public class AMQ2314Test extends CombinationTestSupport { public boolean consumeAll = false; public int deliveryMode = DeliveryMode.NON_PERSISTENT; - private static final Log LOG = LogFactory.getLog(AMQ2314Test.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQ2314Test.class); private static final int MESSAGES_COUNT = 30000; private static byte[] buf = new byte[1024]; private BrokerService broker; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2356Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2356Test.java index c1de970b6f..b74e11b3e3 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2356Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2356Test.java @@ -25,8 +25,8 @@ import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStorag import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.perf.NumberOfDestinationsTest; import org.apache.activemq.store.kahadb.KahaDBStore; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.File; import javax.jms.BytesMessage; import javax.jms.Connection; @@ -63,7 +63,7 @@ deadlocked at less than 30 messages each. public class AMQ2356Test extends TestCase { protected static final int MESSAGE_COUNT = 1000; protected static final int NUMBER_OF_PAIRS = 10; - private static final Log LOG = LogFactory.getLog(NumberOfDestinationsTest.class); + private static final Logger LOG = LoggerFactory.getLogger(NumberOfDestinationsTest.class); protected BrokerService broker; protected String brokerURL = ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL; protected int destinationCount; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java index c43ed17bcc..e1df9c8ad8 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java @@ -48,11 +48,11 @@ import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePoli import org.apache.activemq.command.MessageId; import org.apache.activemq.command.ProducerId; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class AMQ2413Test extends CombinationTestSupport implements MessageListener { - private static final Log LOG = LogFactory.getLog(AMQ2413Test.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQ2413Test.class); BrokerService broker; private ActiveMQConnectionFactory factory; @@ -191,7 +191,7 @@ public class AMQ2413Test extends CombinationTestSupport implements MessageListen ids[seq] = true; } } catch (Exception e) { - LOG.error(e); + LOG.error(e.toString()); } } @@ -340,4 +340,4 @@ public class AMQ2413Test extends CombinationTestSupport implements MessageListen public static Test suite() { return suite(AMQ2413Test.class); } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java index 55059e2f81..cd447f4108 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java @@ -28,11 +28,11 @@ import javax.jms.Session; import org.apache.activemq.JmsMultipleBrokersTestSupport; import org.apache.activemq.broker.jmx.BrokerView; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class AMQ2439Test extends JmsMultipleBrokersTestSupport { - private static final Log LOG = LogFactory.getLog(AMQ2439Test.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQ2439Test.class); Destination dest; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2580Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2580Test.java index 4c626f9d32..422af4992c 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2580Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2580Test.java @@ -21,8 +21,8 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQPrefetchPolicy; import org.apache.activemq.TestSupport; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.jms.ConnectionFactory; import javax.jms.JMSException; @@ -36,7 +36,7 @@ import javax.jms.TopicSession; public class AMQ2580Test extends TestSupport { - private static final Log LOG = LogFactory.getLog(AMQ2580Test.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQ2580Test.class); private static final String TOPIC_NAME = "topicName"; private static final String CLIENT_ID = "client_id"; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2584ConcurrentDlqTest.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2584ConcurrentDlqTest.java index 88ae816813..3e41dc9a54 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2584ConcurrentDlqTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2584ConcurrentDlqTest.java @@ -42,15 +42,15 @@ import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.store.PersistenceAdapter; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; import org.apache.activemq.util.IntrospectionSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; // variation on AMQ2584 where the DLQ consumer works in parallel to producer so // that some dups are not suppressed as they are already acked by the consumer // the audit needs to be disabled to allow these dupes to be consumed public class AMQ2584ConcurrentDlqTest extends org.apache.activemq.TestSupport { - static final Log LOG = LogFactory.getLog(AMQ2584ConcurrentDlqTest.class); + static final Logger LOG = LoggerFactory.getLogger(AMQ2584ConcurrentDlqTest.class); BrokerService broker = null; ActiveMQTopic topic; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2584Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2584Test.java index ea8638227c..57e23b8abb 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2584Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2584Test.java @@ -35,12 +35,12 @@ import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.store.PersistenceAdapter; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class AMQ2584Test extends org.apache.activemq.TestSupport { - static final Log LOG = LogFactory.getLog(AMQ2584Test.class); + static final Logger LOG = LoggerFactory.getLogger(AMQ2584Test.class); BrokerService broker = null; ActiveMQTopic topic; @@ -207,4 +207,4 @@ public class AMQ2584Test extends org.apache.activemq.TestSupport { stopBroker(); super.tearDown(); } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2645Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2645Test.java index dea6e77305..2ac6ff3f37 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2645Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2645Test.java @@ -32,11 +32,11 @@ import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.EmbeddedBrokerTestSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class AMQ2645Test extends EmbeddedBrokerTestSupport { - private static final Log LOG = LogFactory.getLog(AMQ2645Test.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQ2645Test.class); private final static String QUEUE_NAME = "test.daroo.q"; public void testWaitForTransportInterruptionProcessingHang() @@ -75,7 +75,7 @@ public class AMQ2645Test extends EmbeddedBrokerTestSupport { thirdMessageReceived.countDown(); } } catch (Exception e) { - LOG.error(e); + LOG.error(e.toString()); throw new RuntimeException(e); } } diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java index b58cc532ea..9ec6c7cc93 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java @@ -30,11 +30,11 @@ import javax.jms.Session; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.EmbeddedBrokerTestSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class AMQ2751Test extends EmbeddedBrokerTestSupport { - private static final Log LOG = LogFactory.getLog(AMQ2751Test.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQ2751Test.class); private static String clientIdPrefix = "consumer"; private static String queueName = "FOO"; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2832Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2832Test.java index 632917d7ac..b89c32b518 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2832Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2832Test.java @@ -21,8 +21,8 @@ import org.apache.activemq.ActiveMQSession; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.Test; import javax.jms.Connection; @@ -38,7 +38,7 @@ import static org.junit.Assert.assertNotNull; public class AMQ2832Test { - private static final Log LOG = LogFactory.getLog(AMQ2832Test.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQ2832Test.class); BrokerService broker = null; private final Destination destination = new ActiveMQQueue("AMQ2832Test"); diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2870Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2870Test.java index 2f3b3a7875..6355040f39 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2870Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2870Test.java @@ -32,12 +32,12 @@ import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.store.PersistenceAdapter; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class AMQ2870Test extends org.apache.activemq.TestSupport { - static final Log LOG = LogFactory.getLog(AMQ2870Test.class); + static final Logger LOG = LoggerFactory.getLogger(AMQ2870Test.class); BrokerService broker = null; ActiveMQTopic topic; @@ -198,4 +198,4 @@ public class AMQ2870Test extends org.apache.activemq.TestSupport { stopBroker(); super.tearDown(); } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3120Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3120Test.java index 84be94e5cc..0681eac09e 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3120Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3120Test.java @@ -24,8 +24,8 @@ import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; import org.apache.activemq.util.ConsumerThread; import org.apache.activemq.util.ProducerThread; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.Test; import javax.jms.*; @@ -36,7 +36,7 @@ import static org.junit.Assert.assertEquals; public class AMQ3120Test { - private static final Log LOG = LogFactory.getLog(AMQ3120Test.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQ3120Test.class); BrokerService broker = null; File kahaDbDir = null; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3145Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3145Test.java index 05efaf6d99..c7e067187f 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3145Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3145Test.java @@ -34,8 +34,8 @@ import org.apache.activemq.broker.region.policy.FilePendingQueueMessageStoragePo import org.apache.activemq.broker.region.policy.PendingQueueMessageStoragePolicy; import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -45,7 +45,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; public class AMQ3145Test { - private static final Log LOG = LogFactory.getLog(AMQ3145Test.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQ3145Test.class); private final String MESSAGE_TEXT = new String(new byte[1024]); BrokerService broker; ConnectionFactory factory; @@ -144,4 +144,4 @@ public class AMQ3145Test { } consumer.close(); } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/ConnectionPerMessageTest.java b/activemq-core/src/test/java/org/apache/activemq/bugs/ConnectionPerMessageTest.java index 85edceca0b..e7ee4d9f5f 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/ConnectionPerMessageTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/ConnectionPerMessageTest.java @@ -29,12 +29,12 @@ import javax.jms.Topic; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.EmbeddedBrokerTestSupport; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ConnectionPerMessageTest extends EmbeddedBrokerTestSupport { - private static final Log LOG = LogFactory.getLog(ConnectionPerMessageTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ConnectionPerMessageTest.class); private static final int COUNT = 20000; protected String bindAddress; @@ -48,7 +48,7 @@ public class ConnectionPerMessageTest extends EmbeddedBrokerTestSupport { for (int i = 0; i < COUNT; i++) { if (i % 1000 == 0) { - LOG.info(i); + LOG.info(new Integer(i).toString()); } Connection conn = null; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java b/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java index bf7259c749..273dd7b8fe 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java @@ -30,15 +30,15 @@ import org.apache.activemq.broker.BrokerService; import org.apache.activemq.kaha.impl.async.AsyncDataManager; import org.apache.activemq.store.amq.AMQPersistenceAdapter; import org.apache.activemq.store.amq.AMQPersistenceAdapterFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /* * see https://issues.apache.org/activemq/browse/AMQ-1926 */ public class DataFileNotDeletedTest extends TestCase { - private static final Log LOG = LogFactory.getLog(DataFileNotDeletedTest.class); + private static final Logger LOG = LoggerFactory.getLogger(DataFileNotDeletedTest.class); private final CountDownLatch latch = new CountDownLatch(max_messages); private static int max_messages = 600; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java b/activemq-core/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java index 18f5e8baf9..cb3821a6d0 100755 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java @@ -56,14 +56,14 @@ import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; import org.apache.activemq.store.kahadb.KahaDBStore; import org.apache.activemq.util.IOHelper; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.5 $ A Test case for AMQ-1479 */ public class DurableConsumerTest extends CombinationTestSupport{ - private static final Log LOG = LogFactory.getLog(DurableConsumerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(DurableConsumerTest.class); private static int COUNT = 1024 * 10; private static String CONSUMER_NAME = "DURABLE_TEST"; protected BrokerService broker; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java b/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java index 650dcc7afa..4ca4575ffb 100755 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java @@ -31,8 +31,8 @@ import javax.jms.TopicSubscriber; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.test.JmsTopicSendReceiveTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.5 $ @@ -41,7 +41,7 @@ public class JmsDurableTopicSlowReceiveTest extends JmsTopicSendReceiveTest { static final int NMSG = 200; static final int MSIZE = 256000; - private static final transient Log LOG = LogFactory.getLog(JmsDurableTopicSlowReceiveTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(JmsDurableTopicSlowReceiveTest.class); private static final String COUNT_PROPERY_NAME = "count"; protected Connection connection2; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java b/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java index 374efcadd7..671e7bf5c9 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java @@ -31,13 +31,13 @@ import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.EmbeddedBrokerTestSupport; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.transport.RequestTimedOutIOException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class JmsTimeoutTest extends EmbeddedBrokerTestSupport { - static final Log LOG = LogFactory.getLog(JmsTimeoutTest.class); + static final Logger LOG = LoggerFactory.getLogger(JmsTimeoutTest.class); private int messageSize=1024*64; private int messageCount=10000; @@ -152,4 +152,4 @@ public class JmsTimeoutTest extends EmbeddedBrokerTestSupport { return buffer.toString(); } - } \ No newline at end of file + } diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/MissingDataFileTest.java b/activemq-core/src/test/java/org/apache/activemq/bugs/MissingDataFileTest.java index f410fd7721..007181c39f 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/MissingDataFileTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/MissingDataFileTest.java @@ -29,8 +29,8 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.store.amq.AMQPersistenceAdapterFactory; import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /* * Try and replicate: @@ -42,7 +42,7 @@ import org.apache.commons.logging.LogFactory; public class MissingDataFileTest extends TestCase { - private static final Log LOG = LogFactory.getLog(MissingDataFileTest.class); + private static final Logger LOG = LoggerFactory.getLogger(MissingDataFileTest.class); private static int counter = 300; @@ -252,7 +252,7 @@ public class MissingDataFileTest extends TestCase { try { lock.wait(200); } catch (InterruptedException e) { - LOG.error(e); + LOG.error(e.toString()); } // check if all messages have been received hasMessages = hectorToHaloCtr < counter || xenaToHaloCtr < counter || troyToHaloCtr < counter || haloToHectorCtr < counter || haloToXenaCtr < counter diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/OutOfOrderTestCase.java b/activemq-core/src/test/java/org/apache/activemq/bugs/OutOfOrderTestCase.java index 74db85cc37..413ffe00cf 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/OutOfOrderTestCase.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/OutOfOrderTestCase.java @@ -31,12 +31,12 @@ import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class OutOfOrderTestCase extends TestCase { - private static final Log log = LogFactory.getLog(OutOfOrderTestCase.class); + private static final Logger log = LoggerFactory.getLogger(OutOfOrderTestCase.class); public static final String BROKER_URL = "tcp://localhost:61616"; private static final int PREFETCH = 10; @@ -129,4 +129,4 @@ public class OutOfOrderTestCase extends TestCase { private static String createMessageText(final int index) { return "message #" + index; } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/QueueWorkerPrefetchTest.java b/activemq-core/src/test/java/org/apache/activemq/bugs/QueueWorkerPrefetchTest.java index 99aa98ab48..feba861492 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/QueueWorkerPrefetchTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/QueueWorkerPrefetchTest.java @@ -37,15 +37,15 @@ import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQPrefetchPolicy; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Test case demonstrating situation where messages are not delivered to consumers. */ public class QueueWorkerPrefetchTest extends TestCase implements MessageListener { - private static final Log LOG = LogFactory.getLog(QueueWorkerPrefetchTest.class); + private static final Logger LOG = LoggerFactory.getLogger(QueueWorkerPrefetchTest.class); private static final int BATCH_SIZE = 10; private static final long WAIT_TIMEOUT = 1000*10; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java b/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java index fb3c96826b..cb5a9d080b 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java @@ -33,12 +33,12 @@ import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class SlowConsumerTest extends TestCase { - private static final Log LOG = LogFactory.getLog(SlowConsumerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(SlowConsumerTest.class); private static final int MESSAGES_COUNT = 10000; protected int messageLogFrequency = 2500; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/TempStorageBlockedBrokerTest.java b/activemq-core/src/test/java/org/apache/activemq/bugs/TempStorageBlockedBrokerTest.java index a25ef8e27e..a9b9b12ee1 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/TempStorageBlockedBrokerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/TempStorageBlockedBrokerTest.java @@ -43,8 +43,8 @@ import org.apache.activemq.usage.StoreUsage; import org.apache.activemq.usage.SystemUsage; import org.apache.activemq.usage.TempUsage; import org.apache.activemq.util.IOHelper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -54,7 +54,7 @@ public class TempStorageBlockedBrokerTest { public boolean consumeAll = false; public int deliveryMode = DeliveryMode.PERSISTENT; - private static final Log LOG = LogFactory.getLog(TempStorageBlockedBrokerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(TempStorageBlockedBrokerTest.class); private static final int MESSAGES_COUNT = 1000; private static byte[] buf = new byte[4 * 1024]; private BrokerService broker; diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/TransactionNotStartedErrorTest.java b/activemq-core/src/test/java/org/apache/activemq/bugs/TransactionNotStartedErrorTest.java index 12a1f1dd02..c37c8c97b9 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/TransactionNotStartedErrorTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/TransactionNotStartedErrorTest.java @@ -27,8 +27,8 @@ import javax.jms.Session; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /* * simulate message flow which cause the following exception in the broker @@ -42,7 +42,7 @@ import org.apache.commons.logging.LogFactory; */ public class TransactionNotStartedErrorTest extends TestCase { - private static final Log LOG = LogFactory.getLog(TransactionNotStartedErrorTest.class); + private static final Logger LOG = LoggerFactory.getLogger(TransactionNotStartedErrorTest.class); private static int counter = 500; @@ -223,7 +223,7 @@ public class TransactionNotStartedErrorTest extends TestCase { try { lock.wait(200); } catch (InterruptedException e) { - LOG.error(e); + LOG.error(e.toString()); } // check if all messages have been received hasMessages = hectorToHaloCtr < counter || xenaToHaloCtr < counter || troyToHaloCtr < counter || haloToHectorCtr < counter || haloToXenaCtr < counter diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/VerifySteadyEnqueueRate.java b/activemq-core/src/test/java/org/apache/activemq/bugs/VerifySteadyEnqueueRate.java index 8241e1e3d9..69d736a6fe 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/VerifySteadyEnqueueRate.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/VerifySteadyEnqueueRate.java @@ -32,13 +32,12 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.store.amq.AMQPersistenceAdapterFactory; import org.apache.activemq.store.kahadb.KahaDBStore; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class VerifySteadyEnqueueRate extends TestCase { - private static final Log LOG = LogFactory - .getLog(VerifySteadyEnqueueRate.class); + private static final Logger LOG = LoggerFactory.getLogger(VerifySteadyEnqueueRate.class); private static int max_messages = 1000000; private String destinationName = getName() + "_Queue"; diff --git a/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMapMessageTest.java b/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMapMessageTest.java index 43e584eed4..ffefe71892 100755 --- a/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMapMessageTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMapMessageTest.java @@ -29,14 +29,14 @@ import javax.jms.MessageNotReadableException; import javax.jms.MessageNotWriteableException; import junit.framework.TestCase; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class ActiveMQMapMessageTest extends TestCase { - private static final Log LOG = LogFactory.getLog(ActiveMQMapMessageTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ActiveMQMapMessageTest.class); private String name = "testName"; diff --git a/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java b/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java index f75af3c441..0a2c6afd83 100755 --- a/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java @@ -31,15 +31,15 @@ import org.apache.activemq.openwire.OpenWireFormat; import org.apache.activemq.state.CommandVisitor; import org.apache.activemq.util.ByteSequence; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class ActiveMQMessageTest extends TestCase { - private static final Log LOG = LogFactory.getLog(ActiveMQMessageTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ActiveMQMessageTest.class); protected boolean readOnlyMessage; diff --git a/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java b/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java index 1ce5d8337b..bab93090d9 100755 --- a/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java @@ -22,11 +22,11 @@ import junit.framework.Test; import org.apache.activemq.JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest; import org.apache.activemq.util.ByteSequence; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class MessageSendTest extends DataStructureTestSupport { - private static final Log LOG = LogFactory.getLog(MessageSendTest.class); + private static final Logger LOG = LoggerFactory.getLogger(MessageSendTest.class); public static Test suite() { return suite(MessageSendTest.class); diff --git a/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java b/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java index 631fc2d175..1b49ff2a24 100644 --- a/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java @@ -22,14 +22,14 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerRegistry; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class BrokerPropertiesTest extends TestCase { - private static final transient Log LOG = LogFactory.getLog(BrokerPropertiesTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(BrokerPropertiesTest.class); public void testPropertiesFile() throws Exception { BrokerService broker = BrokerFactory.createBroker("properties:org/apache/activemq/config/broker.properties"); diff --git a/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java b/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java index 269356fbb7..ae9abad99a 100755 --- a/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java @@ -47,8 +47,8 @@ import org.apache.activemq.transport.tcp.TcpTransportServer; import org.apache.activemq.usage.SystemUsage; import org.apache.activemq.wireformat.ObjectStreamWireFormat; import org.apache.activemq.xbean.BrokerFactoryBean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.derby.jdbc.EmbeddedDataSource; import org.jmock.Expectations; import org.jmock.Mockery; @@ -64,7 +64,7 @@ public class ConfigTest extends TestCase { protected static final String JOURNAL_ROOT = "target/test-data/"; protected static final String DERBY_ROOT = "target/test-data/"; protected static final String CONF_ROOT = "src/test/resources/org/apache/activemq/config/sample-conf/"; - private static final Log LOG = LogFactory.getLog(ConfigTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ConfigTest.class); static { System.setProperty("javax.net.ssl.trustStore", "src/test/resources/client.keystore"); diff --git a/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java b/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java index 09c1ed37a5..03177c020f 100644 --- a/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java +++ b/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java @@ -37,8 +37,8 @@ import javax.jms.MessageProducer; import javax.jms.Session; import org.apache.activemq.ActiveMQConnectionFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A simple queue sender which does not use JNDI @@ -47,7 +47,7 @@ import org.apache.commons.logging.LogFactory; */ public final class DefaultQueueSender { - private static final Log LOG = LogFactory.getLog(DefaultQueueSender.class); + private static final Logger LOG = LoggerFactory.getLogger(DefaultQueueSender.class); private DefaultQueueSender() { } diff --git a/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java b/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java index fb1425574e..9be8b5e433 100755 --- a/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java +++ b/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java @@ -39,8 +39,8 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A simple polymorphic JMS producer which can work with Queues or Topics which @@ -50,7 +50,7 @@ import org.apache.commons.logging.LogFactory; */ public final class SimpleProducer { - private static final Log LOG = LogFactory.getLog(SimpleProducer.class); + private static final Logger LOG = LoggerFactory.getLogger(SimpleProducer.class); private SimpleProducer() { } diff --git a/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java b/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java index 94b6198ef1..791efa1d18 100755 --- a/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java +++ b/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java @@ -37,12 +37,12 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public final class SimpleQueueReceiver { - private static final Log LOG = LogFactory.getLog(SimpleQueueReceiver.class); + private static final Logger LOG = LoggerFactory.getLogger(SimpleQueueReceiver.class); private SimpleQueueReceiver() { } diff --git a/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java b/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java index e7b1725ff5..22ee403be8 100755 --- a/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java +++ b/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java @@ -40,12 +40,12 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public final class SimpleQueueSender { - private static final Log LOG = LogFactory.getLog(SimpleQueueSender.class); + private static final Logger LOG = LoggerFactory.getLogger(SimpleQueueSender.class); private SimpleQueueSender() { } diff --git a/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java b/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java index cd5297ee88..4e5346c415 100644 --- a/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java @@ -17,15 +17,15 @@ package org.apache.activemq.filter; import junit.framework.TestCase; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1 $ */ public class BadDummyPolicyConfigTest extends TestCase { - private static final Log LOG = LogFactory.getLog(BadDummyPolicyConfigTest.class); + private static final Logger LOG = LoggerFactory.getLogger(BadDummyPolicyConfigTest.class); protected DummyPolicy policy = new DummyPolicy(); public void testNoDestinationSpecified() throws Exception { diff --git a/activemq-core/src/test/java/org/apache/activemq/jndi/InitialContextTest.java b/activemq-core/src/test/java/org/apache/activemq/jndi/InitialContextTest.java index 6b21340182..1d050876f7 100755 --- a/activemq-core/src/test/java/org/apache/activemq/jndi/InitialContextTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/jndi/InitialContextTest.java @@ -23,15 +23,15 @@ import javax.naming.InitialContext; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.3 $ */ public class InitialContextTest extends TestCase { - private static final Log LOG = LogFactory.getLog(InitialContextTest.class); + private static final Logger LOG = LoggerFactory.getLogger(InitialContextTest.class); public void testInitialContext() throws Exception { InitialContext context = new InitialContext(); diff --git a/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java b/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java index 769d337e95..d295ec5d2b 100644 --- a/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java +++ b/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java @@ -20,8 +20,8 @@ import java.util.Iterator; import java.util.Set; import java.util.concurrent.CountDownLatch; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Store test @@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFactory; */ class Loader extends Thread { - private static final Log LOG = LogFactory.getLog(Loader.class); + private static final Logger LOG = LoggerFactory.getLogger(Loader.class); private String name; private Store store; diff --git a/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java b/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java index be3103dcba..c71237f6d7 100644 --- a/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java @@ -25,13 +25,13 @@ import java.util.Map.Entry; import java.util.Set; import org.apache.activemq.kaha.impl.container.BaseContainerImpl; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import junit.framework.TestCase; public class MapContainerTest extends TestCase { - private static final Log LOG = LogFactory.getLog(MapContainerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(MapContainerTest.class); protected static final int COUNT = 10; protected String name = "test"; diff --git a/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java b/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java index bffcfd7a6f..cb434bdc01 100644 --- a/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java @@ -20,13 +20,13 @@ import java.io.IOException; import java.util.Iterator; import junit.framework.TestCase; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class VolumeTest extends TestCase { protected static final int NUMBER = 1; - private static final transient Log LOG = LogFactory.getLog(VolumeTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(VolumeTest.class); protected Store store; protected String name; diff --git a/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalImplTest.java b/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalImplTest.java index d944a2e0a1..ab080b5caf 100644 --- a/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalImplTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalImplTest.java @@ -29,8 +29,8 @@ import org.apache.activeio.packet.Packet; import org.apache.activemq.kaha.impl.async.JournalFacade.RecordLocationFacade; import org.apache.activemq.kaha.impl.async.ReadOnlyAsyncDataManager; import org.apache.activemq.util.ByteSequence; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Tests the AsyncDataManager based Journal @@ -39,7 +39,7 @@ import org.apache.commons.logging.LogFactory; */ public class JournalImplTest extends TestCase { - Log log = LogFactory.getLog(JournalImplTest.class); + Logger log = LoggerFactory.getLogger(JournalImplTest.class); int size = 1024 * 10; int logFileCount = 2; @@ -126,7 +126,7 @@ public class JournalImplTest extends TestCase { l = journal.getNextRecordLocation(l); assertNull(l); - log.info(journal); + log.info(journal.toString()); } public void testReadOnlyRead() throws InvalidRecordLocationException, InterruptedException, IOException { diff --git a/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/LocationTest.java b/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/LocationTest.java index 12c7251c77..ab881f9d39 100644 --- a/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/LocationTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/LocationTest.java @@ -22,8 +22,8 @@ import java.util.Collections; import junit.framework.TestCase; import org.apache.activemq.kaha.impl.async.JournalFacade.RecordLocationFacade; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Tests the Location Class @@ -31,7 +31,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.1 $ */ public class LocationTest extends TestCase { - private static final transient Log LOG = LogFactory.getLog(LocationTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(LocationTest.class); @SuppressWarnings("unchecked") public synchronized void testRecordLocationImplComparison() throws IOException { @@ -54,7 +54,7 @@ public class LocationTest extends TestCase { Collections.sort(l); // Did they get sorted to the correct order? - LOG.debug(l.get(0)); + LOG.debug(l.get(0).toString()); assertSame(l.get(0).getLocation(), l1); assertSame(l.get(1).getLocation(), l2); assertSame(l.get(2).getLocation(), l3); diff --git a/activemq-core/src/test/java/org/apache/activemq/load/LoadClient.java b/activemq-core/src/test/java/org/apache/activemq/load/LoadClient.java index 3b9b883024..11504deb2e 100644 --- a/activemq-core/src/test/java/org/apache/activemq/load/LoadClient.java +++ b/activemq-core/src/test/java/org/apache/activemq/load/LoadClient.java @@ -28,14 +28,14 @@ import javax.jms.TextMessage; import org.apache.activemq.ActiveMQMessageAudit; import org.apache.activemq.perf.PerfRate; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.3 $ */ public class LoadClient implements Runnable{ - private static final Log LOG = LogFactory.getLog(LoadClient.class); + private static final Logger LOG = LoggerFactory.getLogger(LoadClient.class); protected static int SLEEP_TIME = 2; protected String name; protected ConnectionFactory factory; diff --git a/activemq-core/src/test/java/org/apache/activemq/load/LoadTest.java b/activemq-core/src/test/java/org/apache/activemq/load/LoadTest.java index 21ef7bd693..e260c3f443 100644 --- a/activemq-core/src/test/java/org/apache/activemq/load/LoadTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/load/LoadTest.java @@ -25,15 +25,15 @@ import javax.jms.Session; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.3 $ */ public class LoadTest extends TestCase { - private static final Log LOG = LogFactory.getLog(LoadTest.class); + private static final Logger LOG = LoggerFactory.getLogger(LoadTest.class); protected BrokerService broker; protected String bindAddress="tcp://localhost:61616"; diff --git a/activemq-core/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.java b/activemq-core/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.java index a0c1320311..2b8e54dfaf 100644 --- a/activemq-core/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.java @@ -22,8 +22,8 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.xbean.BrokerFactoryBean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; @@ -31,7 +31,7 @@ import junit.framework.TestCase; public class MemoryPropertyTest extends TestCase { - private static final transient Log LOG = LogFactory.getLog(MemoryPropertyTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(MemoryPropertyTest.class); BrokerService broker; diff --git a/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java index e483419586..1821bdaa3c 100644 --- a/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java @@ -21,15 +21,15 @@ import junit.framework.TestCase; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.memory.buffer.MessageBuffer; import org.apache.activemq.memory.buffer.MessageQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * * @version $Revision: 1.1 $ */ public abstract class MemoryBufferTestSupport extends TestCase { - private static final Log LOG = LogFactory.getLog(MemoryBufferTestSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(MemoryBufferTestSupport.class); protected MessageBuffer buffer = createMessageBuffer(); protected MessageQueue qA = buffer.createMessageQueue(); diff --git a/activemq-core/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.java b/activemq-core/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.java index 8cf7c2b0df..8aefa73f90 100644 --- a/activemq-core/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.java @@ -61,8 +61,8 @@ import org.apache.activemq.transport.Transport; import org.apache.activemq.transport.TransportFactory; import org.apache.activemq.util.Wait; import org.apache.commons.io.FileUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This class duplicates most of the functionality in {@link NetworkTestSupport} @@ -75,7 +75,7 @@ import org.apache.commons.logging.LogFactory; */ public class BrokerNetworkWithStuckMessagesTest extends TestCase /*NetworkTestSupport*/ { - private static final Log LOG = LogFactory.getLog(BrokerNetworkWithStuckMessagesTest.class); + private static final Logger LOG = LoggerFactory.getLogger(BrokerNetworkWithStuckMessagesTest.class); private BrokerService localBroker; private BrokerService remoteBroker; diff --git a/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.java b/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.java index e22dab6ef7..c22ad94649 100644 --- a/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.java @@ -30,14 +30,14 @@ import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.Test; public class DuplexNetworkMBeanTest { - protected static final Log LOG = LogFactory.getLog(DuplexNetworkMBeanTest.class); + protected static final Logger LOG = LoggerFactory.getLogger(DuplexNetworkMBeanTest.class); protected final int numRestarts = 3; protected BrokerService createBroker() throws Exception { @@ -153,7 +153,7 @@ public class DuplexNetworkMBeanTest { LOG.info("Total MBean count=" + all.size()); for (Object o : all) { ObjectInstance bean = (ObjectInstance)o; - LOG.info(bean.getObjectName()); + LOG.info(bean.getObjectName().toString()); } } catch (Exception ignored) { LOG.warn("getMBeanServer ex: " + ignored); diff --git a/activemq-core/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java b/activemq-core/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java index 006b99def2..62e8906e79 100644 --- a/activemq-core/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java @@ -33,14 +33,14 @@ import org.apache.activemq.broker.TransportConnector; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.transport.tcp.SslBrokerServiceTest; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.After; import org.junit.Before; import org.junit.Test; public class FailoverStaticNetworkTest { - protected static final Log LOG = LogFactory.getLog(FailoverStaticNetworkTest.class); + protected static final Logger LOG = LoggerFactory.getLogger(FailoverStaticNetworkTest.class); private final static String DESTINATION_NAME = "testQ"; protected BrokerService brokerA; @@ -196,4 +196,4 @@ public class FailoverStaticNetworkTest { connectionFactory.setAlwaysSyncSend(true); return connectionFactory; } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.java b/activemq-core/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.java index 9295ca3533..a415e6e547 100644 --- a/activemq-core/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.java @@ -46,8 +46,8 @@ import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -59,7 +59,7 @@ public class NetworkBrokerDetachTest { private final static String DESTINATION_NAME = "testQ"; private final static int NUM_CONSUMERS = 1; - protected static final Log LOG = LogFactory.getLog(NetworkBrokerDetachTest.class); + protected static final Logger LOG = LoggerFactory.getLogger(NetworkBrokerDetachTest.class); protected final int numRestarts = 3; protected final int networkTTL = 2; protected final boolean dynamicOnly = false; diff --git a/activemq-core/src/test/java/org/apache/activemq/network/NetworkConnectionsCleanedupTest.java b/activemq-core/src/test/java/org/apache/activemq/network/NetworkConnectionsCleanedupTest.java index 17a356871b..8348e802fb 100755 --- a/activemq-core/src/test/java/org/apache/activemq/network/NetworkConnectionsCleanedupTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/network/NetworkConnectionsCleanedupTest.java @@ -40,8 +40,8 @@ import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.xbean.BrokerFactoryBean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; @@ -49,7 +49,7 @@ import org.springframework.core.io.Resource; public class NetworkConnectionsCleanedupTest extends TestCase { protected static final int MESSAGE_COUNT = 10; - private static final Log LOG = LogFactory.getLog(NetworkConnectionsCleanedupTest.class); + private static final Logger LOG = LoggerFactory.getLogger(NetworkConnectionsCleanedupTest.class); protected AbstractApplicationContext context; protected Connection localConnection; diff --git a/activemq-core/src/test/java/org/apache/activemq/network/NetworkFailoverTest.java b/activemq-core/src/test/java/org/apache/activemq/network/NetworkFailoverTest.java index 04dc2ac210..f453ec71be 100644 --- a/activemq-core/src/test/java/org/apache/activemq/network/NetworkFailoverTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/network/NetworkFailoverTest.java @@ -38,8 +38,8 @@ import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.transport.TransportFilter; import org.apache.activemq.transport.failover.FailoverTransport; import org.apache.activemq.xbean.BrokerFactoryBean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; @@ -47,7 +47,7 @@ import org.springframework.core.io.Resource; public class NetworkFailoverTest extends TestCase { protected static final int MESSAGE_COUNT = 10; - private static final Log LOG = LogFactory.getLog(NetworkFailoverTest.class); + private static final Logger LOG = LoggerFactory.getLogger(NetworkFailoverTest.class); protected AbstractApplicationContext context; protected Connection localConnection; diff --git a/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java b/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java index 52414245f3..31d2a07941 100644 --- a/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java @@ -1,336 +1,336 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF 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.network; - -import java.net.URI; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicLong; -import java.util.concurrent.atomic.AtomicReference; - -import javax.jms.Connection; -import javax.jms.DeliveryMode; -import javax.jms.JMSException; -import javax.jms.Message; -import javax.jms.MessageConsumer; -import javax.jms.MessageListener; -import javax.jms.MessageProducer; -import javax.jms.Session; -import javax.jms.TextMessage; - -import junit.framework.TestCase; - -import org.apache.activemq.ActiveMQConnectionFactory; -import org.apache.activemq.ActiveMQPrefetchPolicy; -import org.apache.activemq.broker.BrokerService; -import org.apache.activemq.broker.TransportConnector; -import org.apache.activemq.broker.region.policy.NoSubscriptionRecoveryPolicy; -import org.apache.activemq.broker.region.policy.PolicyEntry; -import org.apache.activemq.broker.region.policy.PolicyMap; -import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy; -import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy; -import org.apache.activemq.command.ActiveMQQueue; -import org.apache.activemq.command.ActiveMQTextMessage; -import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * This test case is used to load test store and forwarding between brokers. It sets up - * n brokers to which have a chain of queues which this test consumes and produces to. - * - * If the network bridges gets stuck at any point subsequent queues will not get messages. This test - * samples the production and consumption stats every second and if the flow of messages - * get stuck then this tast fails. The test monitors the flow of messages for 1 min. - * - * @author chirino - */ -public class NetworkLoadTest extends TestCase { - - private static final transient Log LOG = LogFactory.getLog(NetworkLoadTest.class); - - // How many times do we sample? - private static final long SAMPLES = Integer.parseInt(System.getProperty("SAMPLES", ""+60*1/5)); - // Slower machines might need to make this bigger. - private static final long SAMPLE_DURATION = Integer.parseInt(System.getProperty("SAMPLES_DURATION", "" + 1000 * 5)); - protected static final int BROKER_COUNT = 4; - protected static final int MESSAGE_SIZE = 2000; - String groupId; - - class ForwardingClient { - - private final AtomicLong forwardCounter = new AtomicLong(); - private final Connection toConnection; - private final Connection fromConnection; - - public ForwardingClient(int from, int to) throws JMSException { - toConnection = createConnection(from); - Session toSession = toConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - final MessageProducer producer = toSession.createProducer(new ActiveMQQueue("Q"+to)); - producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); - producer.setDisableMessageID(true); - - fromConnection = createConnection(from); - Session fromSession = fromConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer consumer = fromSession.createConsumer(new ActiveMQQueue("Q"+from)); - - consumer.setMessageListener(new MessageListener() { - public void onMessage(Message msg) { - try { - producer.send(msg); - forwardCounter.incrementAndGet(); - } catch (JMSException e) { - // this is caused by the connection getting closed. - } - } - }); - } - - public void start() throws JMSException { - toConnection.start(); - fromConnection.start(); - } - - public void stop() throws JMSException { - toConnection.stop(); - fromConnection.stop(); - } - - public void close() throws JMSException { - toConnection.close(); - fromConnection.close(); - } - } - - private BrokerService[] brokers; - private ForwardingClient[] forwardingClients; - - - protected void setUp() throws Exception { - groupId = "network-load-test-"+System.currentTimeMillis(); - brokers = new BrokerService[BROKER_COUNT]; - for (int i = 0; i < brokers.length; i++) { - LOG.info("Starting broker: "+i); - brokers[i] = createBroker(i); - brokers[i].start(); - } - - // Wait for the network connection to get setup. - // The wait is exponential since every broker has to connect to every other broker. - Thread.sleep(BROKER_COUNT*BROKER_COUNT*50); - - forwardingClients = new ForwardingClient[BROKER_COUNT-1]; - for (int i = 0; i < forwardingClients.length; i++) { - LOG.info("Starting fowarding client "+i); - forwardingClients[i] = new ForwardingClient(i, i+1); - forwardingClients[i].start(); - } - } - - protected void tearDown() throws Exception { - for (int i = 0; i < forwardingClients.length; i++) { - LOG.info("Stoping fowarding client "+i); - forwardingClients[i].close(); - } - for (int i = 0; i < brokers.length; i++) { - LOG.info("Stoping broker "+i); - brokers[i].stop(); - } - } - - protected Connection createConnection(int brokerId) throws JMSException { - ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:"+(60000+brokerId)); - connectionFactory.setOptimizedMessageDispatch(true); - connectionFactory.setCopyMessageOnSend(false); - connectionFactory.setUseCompression(false); - connectionFactory.setDispatchAsync(true); - connectionFactory.setUseAsyncSend(false); - connectionFactory.setOptimizeAcknowledge(false); - connectionFactory.setWatchTopicAdvisories(false); - ActiveMQPrefetchPolicy qPrefetchPolicy= new ActiveMQPrefetchPolicy(); - qPrefetchPolicy.setQueuePrefetch(100); - qPrefetchPolicy.setTopicPrefetch(1000); - connectionFactory.setPrefetchPolicy(qPrefetchPolicy); - connectionFactory.setAlwaysSyncSend(true); - return connectionFactory.createConnection(); - } - - protected BrokerService createBroker(int brokerId) throws Exception { - BrokerService broker = new BrokerService(); - broker.setBrokerName("broker-" + brokerId); - broker.setPersistent(false); - broker.setUseJmx(true); - broker.getManagementContext().setCreateConnector(false); - - final SystemUsage memoryManager = new SystemUsage(); - memoryManager.getMemoryUsage().setLimit(1024 * 1024 * 50); // 50 MB - broker.setSystemUsage(memoryManager); - - final List policyEntries = new ArrayList(); - final PolicyEntry entry = new PolicyEntry(); - entry.setQueue(">"); - entry.setMemoryLimit(1024 * 1024 * 1); // Set to 1 MB - entry.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy()); - entry.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy()); - policyEntries.add(entry); - - // This is to turn of the default behavior of storing topic messages for retroactive consumption - final PolicyEntry topicPolicyEntry = new PolicyEntry(); - topicPolicyEntry.setTopic(">"); - final NoSubscriptionRecoveryPolicy noSubscriptionRecoveryPolicy = new NoSubscriptionRecoveryPolicy(); - topicPolicyEntry.setSubscriptionRecoveryPolicy(noSubscriptionRecoveryPolicy); - - final PolicyMap policyMap = new PolicyMap(); - policyMap.setPolicyEntries(policyEntries); - broker.setDestinationPolicy(policyMap); - - TransportConnector transportConnector = new TransportConnector(); - transportConnector.setUri(new URI("tcp://localhost:"+(60000+brokerId))); - - transportConnector.setDiscoveryUri(new URI("multicast://default?group="+groupId)); - broker.addConnector(transportConnector); - - DiscoveryNetworkConnector networkConnector = new DiscoveryNetworkConnector(); - networkConnector.setUri(new URI("multicast://default?group="+groupId)); - networkConnector.setBridgeTempDestinations(true); - networkConnector.setPrefetchSize(1); - broker.addNetworkConnector(networkConnector); - - return broker; - } - - public void testRequestReply() throws Exception { - - final int to = 0; // Send to the first broker - int from = brokers.length-1; // consume from the last broker.. - - LOG.info("Staring Final Consumer"); - - Connection fromConnection = createConnection(from); - fromConnection.start(); - Session fromSession = fromConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer consumer = fromSession.createConsumer(new ActiveMQQueue("Q"+from)); - - final AtomicReference lastMessageReceived = new AtomicReference(); - final AtomicLong producedMessages = new AtomicLong(); - final AtomicLong receivedMessages = new AtomicLong(); - final AtomicBoolean done = new AtomicBoolean(); - - // Setup the consumer.. - consumer.setMessageListener(new MessageListener() { - public void onMessage(Message msg) { - ActiveMQTextMessage m = (ActiveMQTextMessage) msg; - ActiveMQTextMessage last = lastMessageReceived.get(); - if( last!=null ) { - // Some order checking... - if( last.getMessageId().getProducerSequenceId() > m.getMessageId().getProducerSequenceId() ) { - System.out.println("Received an out of order message. Got "+m.getMessageId()+", expected something after "+last.getMessageId()); - } - } - lastMessageReceived.set(m); - receivedMessages.incrementAndGet(); - } - }); - - LOG.info("Staring Initial Producer"); - final Connection toConnection = createConnection(to); - Thread producer = new Thread("Producer") { - @Override - public void run() { - try { - toConnection.start(); - Session toSession = toConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); - final MessageProducer producer = toSession.createProducer(new ActiveMQQueue("Q"+to)); - producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); - producer.setDisableMessageID(true); - - for (int i = 0; !done.get(); i++) { - TextMessage msg = toSession.createTextMessage(createMessageText(i)); - producer.send(msg); - producedMessages.incrementAndGet(); - } - } catch (JMSException e) { - e.printStackTrace(); - } - } - - private String createMessageText(int index) { - StringBuffer buffer = new StringBuffer(MESSAGE_SIZE); - buffer.append(index + " on " + new Date() + " ..."); - if (buffer.length() > MESSAGE_SIZE) { - return buffer.substring(0, MESSAGE_SIZE); - } - for (int i = buffer.length(); i < MESSAGE_SIZE; i++) { - buffer.append(' '); - } - - return buffer.toString(); - } - }; - producer.start(); - - - // Give the forwarding clients a chance to get going and fill the down - // stream broker queues.. - Thread.sleep(BROKER_COUNT*200); - - for (int i = 0; i < SAMPLES; i++) { - - long start = System.currentTimeMillis(); - producedMessages.set(0); - receivedMessages.set(0); - for (int j = 0; j < forwardingClients.length; j++) { - forwardingClients[j].forwardCounter.set(0); - } - - Thread.sleep(SAMPLE_DURATION); - - long end = System.currentTimeMillis(); - long r = receivedMessages.get(); - long p = producedMessages.get(); - - LOG.info("published: " + p + " msgs at " + (p * 1000f / (end - start)) + " msgs/sec, " + "consumed: " + r + " msgs at " + (r * 1000f / (end - start)) + " msgs/sec"); - - StringBuffer fwdingmsg = new StringBuffer(500); - fwdingmsg.append(" forwarding counters: "); - for (int j = 0; j < forwardingClients.length; j++) { - if( j!= 0 ) { - fwdingmsg.append(", "); - } - fwdingmsg.append(forwardingClients[j].forwardCounter.get()); - } - LOG.info(fwdingmsg); - - // The test is just checking to make sure thaat the producer and consumer does not hang - // due to the network hops take to route the message form the producer to the consumer. - assertTrue("Recieved some messages since last sample", r>0); - assertTrue("Produced some messages since last sample", p>0); - - } - LOG.info("Sample done."); - done.set(true); - // Wait for the producer to finish. - producer.join(1000*5); - toConnection.close(); - fromConnection.close(); - - } - - -} +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF 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.network; + +import java.net.URI; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.atomic.AtomicReference; + +import javax.jms.Connection; +import javax.jms.DeliveryMode; +import javax.jms.JMSException; +import javax.jms.Message; +import javax.jms.MessageConsumer; +import javax.jms.MessageListener; +import javax.jms.MessageProducer; +import javax.jms.Session; +import javax.jms.TextMessage; + +import junit.framework.TestCase; + +import org.apache.activemq.ActiveMQConnectionFactory; +import org.apache.activemq.ActiveMQPrefetchPolicy; +import org.apache.activemq.broker.BrokerService; +import org.apache.activemq.broker.TransportConnector; +import org.apache.activemq.broker.region.policy.NoSubscriptionRecoveryPolicy; +import org.apache.activemq.broker.region.policy.PolicyEntry; +import org.apache.activemq.broker.region.policy.PolicyMap; +import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy; +import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy; +import org.apache.activemq.command.ActiveMQQueue; +import org.apache.activemq.command.ActiveMQTextMessage; +import org.apache.activemq.usage.SystemUsage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This test case is used to load test store and forwarding between brokers. It sets up + * n brokers to which have a chain of queues which this test consumes and produces to. + * + * If the network bridges gets stuck at any point subsequent queues will not get messages. This test + * samples the production and consumption stats every second and if the flow of messages + * get stuck then this tast fails. The test monitors the flow of messages for 1 min. + * + * @author chirino + */ +public class NetworkLoadTest extends TestCase { + + private static final transient Logger LOG = LoggerFactory.getLogger(NetworkLoadTest.class); + + // How many times do we sample? + private static final long SAMPLES = Integer.parseInt(System.getProperty("SAMPLES", ""+60*1/5)); + // Slower machines might need to make this bigger. + private static final long SAMPLE_DURATION = Integer.parseInt(System.getProperty("SAMPLES_DURATION", "" + 1000 * 5)); + protected static final int BROKER_COUNT = 4; + protected static final int MESSAGE_SIZE = 2000; + String groupId; + + class ForwardingClient { + + private final AtomicLong forwardCounter = new AtomicLong(); + private final Connection toConnection; + private final Connection fromConnection; + + public ForwardingClient(int from, int to) throws JMSException { + toConnection = createConnection(from); + Session toSession = toConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); + final MessageProducer producer = toSession.createProducer(new ActiveMQQueue("Q"+to)); + producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); + producer.setDisableMessageID(true); + + fromConnection = createConnection(from); + Session fromSession = fromConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); + MessageConsumer consumer = fromSession.createConsumer(new ActiveMQQueue("Q"+from)); + + consumer.setMessageListener(new MessageListener() { + public void onMessage(Message msg) { + try { + producer.send(msg); + forwardCounter.incrementAndGet(); + } catch (JMSException e) { + // this is caused by the connection getting closed. + } + } + }); + } + + public void start() throws JMSException { + toConnection.start(); + fromConnection.start(); + } + + public void stop() throws JMSException { + toConnection.stop(); + fromConnection.stop(); + } + + public void close() throws JMSException { + toConnection.close(); + fromConnection.close(); + } + } + + private BrokerService[] brokers; + private ForwardingClient[] forwardingClients; + + + protected void setUp() throws Exception { + groupId = "network-load-test-"+System.currentTimeMillis(); + brokers = new BrokerService[BROKER_COUNT]; + for (int i = 0; i < brokers.length; i++) { + LOG.info("Starting broker: "+i); + brokers[i] = createBroker(i); + brokers[i].start(); + } + + // Wait for the network connection to get setup. + // The wait is exponential since every broker has to connect to every other broker. + Thread.sleep(BROKER_COUNT*BROKER_COUNT*50); + + forwardingClients = new ForwardingClient[BROKER_COUNT-1]; + for (int i = 0; i < forwardingClients.length; i++) { + LOG.info("Starting fowarding client "+i); + forwardingClients[i] = new ForwardingClient(i, i+1); + forwardingClients[i].start(); + } + } + + protected void tearDown() throws Exception { + for (int i = 0; i < forwardingClients.length; i++) { + LOG.info("Stoping fowarding client "+i); + forwardingClients[i].close(); + } + for (int i = 0; i < brokers.length; i++) { + LOG.info("Stoping broker "+i); + brokers[i].stop(); + } + } + + protected Connection createConnection(int brokerId) throws JMSException { + ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:"+(60000+brokerId)); + connectionFactory.setOptimizedMessageDispatch(true); + connectionFactory.setCopyMessageOnSend(false); + connectionFactory.setUseCompression(false); + connectionFactory.setDispatchAsync(true); + connectionFactory.setUseAsyncSend(false); + connectionFactory.setOptimizeAcknowledge(false); + connectionFactory.setWatchTopicAdvisories(false); + ActiveMQPrefetchPolicy qPrefetchPolicy= new ActiveMQPrefetchPolicy(); + qPrefetchPolicy.setQueuePrefetch(100); + qPrefetchPolicy.setTopicPrefetch(1000); + connectionFactory.setPrefetchPolicy(qPrefetchPolicy); + connectionFactory.setAlwaysSyncSend(true); + return connectionFactory.createConnection(); + } + + protected BrokerService createBroker(int brokerId) throws Exception { + BrokerService broker = new BrokerService(); + broker.setBrokerName("broker-" + brokerId); + broker.setPersistent(false); + broker.setUseJmx(true); + broker.getManagementContext().setCreateConnector(false); + + final SystemUsage memoryManager = new SystemUsage(); + memoryManager.getMemoryUsage().setLimit(1024 * 1024 * 50); // 50 MB + broker.setSystemUsage(memoryManager); + + final List policyEntries = new ArrayList(); + final PolicyEntry entry = new PolicyEntry(); + entry.setQueue(">"); + entry.setMemoryLimit(1024 * 1024 * 1); // Set to 1 MB + entry.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy()); + entry.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy()); + policyEntries.add(entry); + + // This is to turn of the default behavior of storing topic messages for retroactive consumption + final PolicyEntry topicPolicyEntry = new PolicyEntry(); + topicPolicyEntry.setTopic(">"); + final NoSubscriptionRecoveryPolicy noSubscriptionRecoveryPolicy = new NoSubscriptionRecoveryPolicy(); + topicPolicyEntry.setSubscriptionRecoveryPolicy(noSubscriptionRecoveryPolicy); + + final PolicyMap policyMap = new PolicyMap(); + policyMap.setPolicyEntries(policyEntries); + broker.setDestinationPolicy(policyMap); + + TransportConnector transportConnector = new TransportConnector(); + transportConnector.setUri(new URI("tcp://localhost:"+(60000+brokerId))); + + transportConnector.setDiscoveryUri(new URI("multicast://default?group="+groupId)); + broker.addConnector(transportConnector); + + DiscoveryNetworkConnector networkConnector = new DiscoveryNetworkConnector(); + networkConnector.setUri(new URI("multicast://default?group="+groupId)); + networkConnector.setBridgeTempDestinations(true); + networkConnector.setPrefetchSize(1); + broker.addNetworkConnector(networkConnector); + + return broker; + } + + public void testRequestReply() throws Exception { + + final int to = 0; // Send to the first broker + int from = brokers.length-1; // consume from the last broker.. + + LOG.info("Staring Final Consumer"); + + Connection fromConnection = createConnection(from); + fromConnection.start(); + Session fromSession = fromConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); + MessageConsumer consumer = fromSession.createConsumer(new ActiveMQQueue("Q"+from)); + + final AtomicReference lastMessageReceived = new AtomicReference(); + final AtomicLong producedMessages = new AtomicLong(); + final AtomicLong receivedMessages = new AtomicLong(); + final AtomicBoolean done = new AtomicBoolean(); + + // Setup the consumer.. + consumer.setMessageListener(new MessageListener() { + public void onMessage(Message msg) { + ActiveMQTextMessage m = (ActiveMQTextMessage) msg; + ActiveMQTextMessage last = lastMessageReceived.get(); + if( last!=null ) { + // Some order checking... + if( last.getMessageId().getProducerSequenceId() > m.getMessageId().getProducerSequenceId() ) { + System.out.println("Received an out of order message. Got "+m.getMessageId()+", expected something after "+last.getMessageId()); + } + } + lastMessageReceived.set(m); + receivedMessages.incrementAndGet(); + } + }); + + LOG.info("Staring Initial Producer"); + final Connection toConnection = createConnection(to); + Thread producer = new Thread("Producer") { + @Override + public void run() { + try { + toConnection.start(); + Session toSession = toConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); + final MessageProducer producer = toSession.createProducer(new ActiveMQQueue("Q"+to)); + producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); + producer.setDisableMessageID(true); + + for (int i = 0; !done.get(); i++) { + TextMessage msg = toSession.createTextMessage(createMessageText(i)); + producer.send(msg); + producedMessages.incrementAndGet(); + } + } catch (JMSException e) { + e.printStackTrace(); + } + } + + private String createMessageText(int index) { + StringBuffer buffer = new StringBuffer(MESSAGE_SIZE); + buffer.append(index + " on " + new Date() + " ..."); + if (buffer.length() > MESSAGE_SIZE) { + return buffer.substring(0, MESSAGE_SIZE); + } + for (int i = buffer.length(); i < MESSAGE_SIZE; i++) { + buffer.append(' '); + } + + return buffer.toString(); + } + }; + producer.start(); + + + // Give the forwarding clients a chance to get going and fill the down + // stream broker queues.. + Thread.sleep(BROKER_COUNT*200); + + for (int i = 0; i < SAMPLES; i++) { + + long start = System.currentTimeMillis(); + producedMessages.set(0); + receivedMessages.set(0); + for (int j = 0; j < forwardingClients.length; j++) { + forwardingClients[j].forwardCounter.set(0); + } + + Thread.sleep(SAMPLE_DURATION); + + long end = System.currentTimeMillis(); + long r = receivedMessages.get(); + long p = producedMessages.get(); + + LOG.info("published: " + p + " msgs at " + (p * 1000f / (end - start)) + " msgs/sec, " + "consumed: " + r + " msgs at " + (r * 1000f / (end - start)) + " msgs/sec"); + + StringBuffer fwdingmsg = new StringBuffer(500); + fwdingmsg.append(" forwarding counters: "); + for (int j = 0; j < forwardingClients.length; j++) { + if( j!= 0 ) { + fwdingmsg.append(", "); + } + fwdingmsg.append(forwardingClients[j].forwardCounter.get()); + } + LOG.info(fwdingmsg.toString()); + + // The test is just checking to make sure thaat the producer and consumer does not hang + // due to the network hops take to route the message form the producer to the consumer. + assertTrue("Recieved some messages since last sample", r>0); + assertTrue("Produced some messages since last sample", p>0); + + } + LOG.info("Sample done."); + done.set(true); + // Wait for the producer to finish. + producer.join(1000*5); + toConnection.close(); + fromConnection.close(); + + } + + +} diff --git a/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java b/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java index d34606beca..68376e16a7 100644 --- a/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java @@ -37,8 +37,8 @@ import org.apache.activemq.advisory.ConsumerListener; import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * These test cases are used to verifiy that network connections get re @@ -48,7 +48,7 @@ import org.apache.commons.logging.LogFactory; */ public class NetworkReconnectTest extends TestCase { - private static final Log LOG = LogFactory.getLog(NetworkReconnectTest.class); + private static final Logger LOG = LoggerFactory.getLogger(NetworkReconnectTest.class); private BrokerService producerBroker; private BrokerService consumerBroker; diff --git a/activemq-core/src/test/java/org/apache/activemq/network/SSHTunnelNetworkReconnectTest.java b/activemq-core/src/test/java/org/apache/activemq/network/SSHTunnelNetworkReconnectTest.java index 6093cc2490..3f50bbb05e 100644 --- a/activemq-core/src/test/java/org/apache/activemq/network/SSHTunnelNetworkReconnectTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/network/SSHTunnelNetworkReconnectTest.java @@ -24,8 +24,8 @@ import java.util.Iterator; import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Test network reconnects over SSH tunnels. This case can be especially tricky @@ -35,7 +35,7 @@ import org.apache.commons.logging.LogFactory; * @author chirino */ public class SSHTunnelNetworkReconnectTest extends NetworkReconnectTest { - private static final transient Log LOG = LogFactory.getLog(SSHTunnelNetworkReconnectTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(SSHTunnelNetworkReconnectTest.class); ArrayList processes = new ArrayList(); diff --git a/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java b/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java index f4ec1682be..b56c86bebc 100755 --- a/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java @@ -34,8 +34,8 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.xbean.BrokerFactoryBean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; @@ -43,7 +43,7 @@ import org.springframework.core.io.Resource; public class SimpleNetworkTest extends TestCase { protected static final int MESSAGE_COUNT = 10; - private static final Log LOG = LogFactory.getLog(SimpleNetworkTest.class); + private static final Logger LOG = LoggerFactory.getLogger(SimpleNetworkTest.class); protected AbstractApplicationContext context; protected Connection localConnection; diff --git a/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java b/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java index 34c32e926b..2ae9e61e36 100755 --- a/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java @@ -32,15 +32,15 @@ import javax.jms.TextMessage; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class QueueBridgeTest extends TestCase implements MessageListener { protected static final int MESSAGE_COUNT = 10; - private static final Log LOG = LogFactory.getLog(QueueBridgeTest.class); + private static final Logger LOG = LoggerFactory.getLogger(QueueBridgeTest.class); protected AbstractApplicationContext context; protected QueueConnection localConnection; diff --git a/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java b/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java index ab2ee1d070..fc9e744dd6 100755 --- a/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java @@ -31,15 +31,15 @@ import javax.jms.TopicSession; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class TopicBridgeSpringTest extends TestCase implements MessageListener { protected static final int MESSAGE_COUNT = 10; - private static final Log LOG = LogFactory.getLog(TopicBridgeSpringTest.class); + private static final Logger LOG = LoggerFactory.getLogger(TopicBridgeSpringTest.class); protected AbstractApplicationContext context; protected TopicConnection localConnection; diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java index 5d352b0e79..85024920a5 100644 --- a/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java @@ -58,13 +58,13 @@ import org.apache.activemq.openwire.v1.BrokerInfoTest; import org.apache.activemq.openwire.v1.MessageAckTest; import org.apache.activemq.test.TestSupport; import org.apache.activemq.util.ByteSequence; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public abstract class DataFileGeneratorTestSupport extends TestSupport { protected static final Object[] EMPTY_ARGUMENTS = {}; - private static final Log LOG = LogFactory.getLog(DataFileGeneratorTestSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(DataFileGeneratorTestSupport.class); private static final Throwable SINGLETON_EXCEPTION = new Exception("shared exception"); private static final File MODULE_BASE_DIR; diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java index 4bafb650b4..02ad1b455e 100644 --- a/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java @@ -24,15 +24,15 @@ import java.io.IOException; import junit.framework.TestCase; import org.apache.activemq.command.SessionId; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class NumberRangesWhileMarshallingTest extends TestCase { - private static final Log LOG = LogFactory.getLog(NumberRangesWhileMarshallingTest.class); + private static final Logger LOG = LoggerFactory.getLogger(NumberRangesWhileMarshallingTest.class); protected String connectionId = "Cheese"; protected ByteArrayOutputStream buffer = new ByteArrayOutputStream(); diff --git a/activemq-core/src/test/java/org/apache/activemq/perf/ConnectionChurnTest.java b/activemq-core/src/test/java/org/apache/activemq/perf/ConnectionChurnTest.java index 1fe8f39c13..378d0f6ae8 100644 --- a/activemq-core/src/test/java/org/apache/activemq/perf/ConnectionChurnTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/perf/ConnectionChurnTest.java @@ -26,15 +26,15 @@ import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.TransportConnector; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.3 $ */ public class ConnectionChurnTest extends TestCase { protected static final int CONNECTION_COUNT = 200; - private static final Log LOG = LogFactory.getLog(ConnectionChurnTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ConnectionChurnTest.class); protected BrokerService broker; protected String bindAddress = ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL+"?transport.closeAsync=false"; protected int topicCount; diff --git a/activemq-core/src/test/java/org/apache/activemq/perf/InactiveDurableTopicTest.java b/activemq-core/src/test/java/org/apache/activemq/perf/InactiveDurableTopicTest.java index f41b8d9a02..d95827023f 100644 --- a/activemq-core/src/test/java/org/apache/activemq/perf/InactiveDurableTopicTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/perf/InactiveDurableTopicTest.java @@ -29,14 +29,14 @@ import junit.framework.AssertionFailedError; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class InactiveDurableTopicTest extends TestCase { - private static final transient Log LOG = LogFactory.getLog(InactiveDurableTopicTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(InactiveDurableTopicTest.class); private static final int MESSAGE_COUNT = 2000; private static final String DEFAULT_PASSWORD = ""; diff --git a/activemq-core/src/test/java/org/apache/activemq/perf/InactiveQueueTest.java b/activemq-core/src/test/java/org/apache/activemq/perf/InactiveQueueTest.java index 5613a5e3a7..bf5ba09001 100644 --- a/activemq-core/src/test/java/org/apache/activemq/perf/InactiveQueueTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/perf/InactiveQueueTest.java @@ -27,14 +27,14 @@ import javax.jms.TopicSubscriber; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 454471 $ */ public class InactiveQueueTest extends TestCase { - private static final transient Log LOG = LogFactory.getLog(InactiveQueueTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(InactiveQueueTest.class); private static final int MESSAGE_COUNT = 0; private static final String DEFAULT_PASSWORD = ""; diff --git a/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java b/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java index 210ed0210d..5a7575593e 100644 --- a/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java @@ -31,8 +31,8 @@ import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.3 $ @@ -40,7 +40,7 @@ import org.apache.commons.logging.LogFactory; public class MemoryAllocationTest extends TestCase { protected static final int MESSAGE_COUNT = 2000; - private static final Log LOG = LogFactory.getLog(MemoryAllocationTest.class); + private static final Logger LOG = LoggerFactory.getLogger(MemoryAllocationTest.class); protected BrokerService broker; protected String bindAddress = "vm://localhost"; diff --git a/activemq-core/src/test/java/org/apache/activemq/perf/NetworkedSyncTest.java b/activemq-core/src/test/java/org/apache/activemq/perf/NetworkedSyncTest.java index 5a494af5ce..c46919f641 100644 --- a/activemq-core/src/test/java/org/apache/activemq/perf/NetworkedSyncTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/perf/NetworkedSyncTest.java @@ -33,8 +33,8 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.network.NetworkConnector; import org.apache.activemq.xbean.BrokerFactoryBean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.xbean.spring.context.ClassPathXmlApplicationContext; import org.springframework.core.io.ClassPathResource; @@ -47,7 +47,7 @@ public class NetworkedSyncTest extends TestCase { public final static String broker1URL = "tcp://localhost:61616"; public final static String broker2URL = "tcp://localhost:62616"; private final String networkConnectorURL = "static://(" + broker2URL + ")"; - private static final Log LOG = LogFactory.getLog(NetworkedSyncTest.class); + private static final Logger LOG = LoggerFactory.getLogger(NetworkedSyncTest.class); BrokerService broker1 = null; BrokerService broker2 = null; NetworkConnector connector = null; @@ -89,7 +89,7 @@ public class NetworkedSyncTest extends TestCase { broker1.waitUntilStopped(); } } catch (Exception e) { - LOG.fatal("Error: " + e.getMessage()); + LOG.error("Error: " + e.getMessage()); throw e; // brokerService.stop(); } @@ -110,7 +110,7 @@ public class NetworkedSyncTest extends TestCase { broker2.waitUntilStopped(); } } catch (Exception e) { - LOG.fatal("Error: " + e.getMessage()); + LOG.error("Error: " + e.getMessage()); throw e; } @@ -175,7 +175,7 @@ public class NetworkedSyncTest extends TestCase { */ class Producer implements Runnable { - private static final Log LOG = LogFactory.getLog(Producer.class); + private static final Logger LOG = LoggerFactory.getLogger(Producer.class); /** * connect to broker and constantly send messages @@ -221,7 +221,7 @@ class Producer implements Runnable { } } catch (Exception ex) { - LOG.error(ex); + LOG.error(ex.toString()); return; } finally { try { @@ -245,7 +245,7 @@ class Producer implements Runnable { */ class Consumer implements Runnable { - private static final Log LOG = LogFactory.getLog(Consumer.class);; + private static final Logger LOG = LoggerFactory.getLogger(Consumer.class);; /** diff --git a/activemq-core/src/test/java/org/apache/activemq/perf/NumberOfDestinationsTest.java b/activemq-core/src/test/java/org/apache/activemq/perf/NumberOfDestinationsTest.java index 185282a2c7..4948bd95c0 100644 --- a/activemq-core/src/test/java/org/apache/activemq/perf/NumberOfDestinationsTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/perf/NumberOfDestinationsTest.java @@ -32,15 +32,15 @@ import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.3 $ */ public class NumberOfDestinationsTest extends TestCase { protected static final int MESSAGE_COUNT = 1; protected static final int NUMBER_OF_DESTINATIONS = 100000; - private static final Log LOG = LogFactory.getLog(NumberOfDestinationsTest.class); + private static final Logger LOG = LoggerFactory.getLogger(NumberOfDestinationsTest.class); protected BrokerService broker; protected String bindAddress = "vm://localhost"; protected int destinationCount; diff --git a/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java b/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java index 4db035d222..4fdeac0e8f 100644 --- a/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java +++ b/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java @@ -26,14 +26,14 @@ import javax.jms.MessageListener; import javax.jms.Session; import javax.jms.Topic; import org.apache.activemq.ActiveMQMessageAudit; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.3 $ */ public class PerfConsumer implements MessageListener { - private static final Log LOG = LogFactory.getLog(PerfConsumer.class); + private static final Logger LOG = LoggerFactory.getLogger(PerfConsumer.class); protected Connection connection; protected MessageConsumer consumer; protected long sleepDuration; diff --git a/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java b/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java index ee8df9e304..e07d103123 100644 --- a/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java @@ -23,14 +23,14 @@ import javax.jms.MessageConsumer; import javax.jms.Session; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.3 $ */ public class QueueConnectionMemoryTest extends SimpleQueueTest { - private static final transient Log LOG = LogFactory.getLog(QueueConnectionMemoryTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(QueueConnectionMemoryTest.class); protected void setUp() throws Exception { } diff --git a/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java b/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java index a14e527a6a..fdb14e2371 100644 --- a/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java @@ -24,13 +24,13 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQPrefetchPolicy; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.network.NetworkConnector; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class SimpleNetworkTest extends SimpleTopicTest { - private static final Log LOG = LogFactory.getLog(SimpleNetworkTest.class); + private static final Logger LOG = LoggerFactory.getLogger(SimpleNetworkTest.class); protected String consumerBindAddress = "tcp://localhost:61616"; protected String producerBindAddress = "tcp://localhost:61617"; protected static final String CONSUMER_BROKER_NAME = "Consumer"; diff --git a/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java b/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java index 18a57290b6..f31d784bd4 100644 --- a/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java @@ -24,15 +24,15 @@ import javax.jms.Session; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.3 $ */ public class SimpleTopicTest extends TestCase { - private static final Log LOG = LogFactory.getLog(SimpleTopicTest.class); + private static final Logger LOG = LoggerFactory.getLogger(SimpleTopicTest.class); protected BrokerService broker; protected String clientURI="tcp://localhost:61616?wireFormat.cacheEnabled=true&wireFormat.tightEncodingEnabled=true&jms.useAsyncSend=false&wireFormat.maxInactivityDuration=0"; diff --git a/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java b/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java index 6b2af9b16c..52f56a5464 100644 --- a/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java +++ b/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java @@ -21,14 +21,14 @@ import javax.jms.Destination; import javax.jms.JMSException; import javax.jms.Message; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.3 $ */ public class SlowConsumer extends PerfConsumer { - private static final transient Log LOG = LogFactory.getLog(SlowConsumer.class); + private static final transient Logger LOG = LoggerFactory.getLogger(SlowConsumer.class); public SlowConsumer(ConnectionFactory fac, Destination dest, String consumerName) throws JMSException { super(fac, dest, consumerName); diff --git a/activemq-core/src/test/java/org/apache/activemq/plugin/BrokerStatisticsPluginTest.java b/activemq-core/src/test/java/org/apache/activemq/plugin/BrokerStatisticsPluginTest.java index 1168f4c82d..79f07cc4cb 100644 --- a/activemq-core/src/test/java/org/apache/activemq/plugin/BrokerStatisticsPluginTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/plugin/BrokerStatisticsPluginTest.java @@ -20,8 +20,8 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerPlugin; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.net.URI; import java.util.Enumeration; import javax.jms.Connection; @@ -40,7 +40,7 @@ import junit.framework.TestCase; * */ public class BrokerStatisticsPluginTest extends TestCase{ - private static final Log LOG = LogFactory.getLog(BrokerStatisticsPluginTest.class); + private static final Logger LOG = LoggerFactory.getLogger(BrokerStatisticsPluginTest.class); private Connection connection; private BrokerService broker; @@ -125,4 +125,4 @@ public class BrokerStatisticsPluginTest extends TestCase{ LOG.info("Loading broker configuration from the classpath with URI: " + uri); return BrokerFactory.createBroker(new URI("xbean:" + uri)); } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java b/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java index abe2b78bab..157b1e4366 100644 --- a/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java @@ -39,12 +39,12 @@ import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.jmx.QueueViewMBean; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class SecurityJMXTest extends TestCase { - private static final Log LOG = LogFactory.getLog(SimpleAuthenticationPluginTest.class); + private static final Logger LOG = LoggerFactory.getLogger(SimpleAuthenticationPluginTest.class); private BrokerService broker; public void setUp() throws Exception { diff --git a/activemq-core/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java b/activemq-core/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java index 0972c90423..6e8a1b52f6 100644 --- a/activemq-core/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java @@ -25,12 +25,12 @@ import org.apache.activemq.CombinationTestSupport; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class SimpleAnonymousPluginTest extends SimpleAuthenticationPluginTest { - private static final Log LOG = LogFactory.getLog(SimpleAnonymousPluginTest.class); + private static final Logger LOG = LoggerFactory.getLogger(SimpleAnonymousPluginTest.class); public static Test suite() { return suite(SimpleAnonymousPluginTest.class); diff --git a/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java b/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java index fa69556a00..02892e6e5d 100644 --- a/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java @@ -34,12 +34,12 @@ import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.jmx.TopicViewMBean; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class SimpleAuthenticationPluginTest extends SecurityTestSupport { - private static final Log LOG = LogFactory.getLog(SimpleAuthenticationPluginTest.class); + private static final Logger LOG = LoggerFactory.getLogger(SimpleAuthenticationPluginTest.class); public static Test suite() { return suite(SimpleAuthenticationPluginTest.class); diff --git a/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java b/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java index 1c0c1c0211..904c58d807 100644 --- a/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java @@ -31,8 +31,8 @@ import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.command.MessageSendTest; import org.apache.activemq.filter.DestinationMap; import org.apache.activemq.jaas.GroupPrincipal; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Tests that the broker allows/fails access to destinations based on the @@ -45,7 +45,7 @@ public class SimpleSecurityBrokerSystemTest extends SecurityTestSupport { static final GroupPrincipal GUESTS = new GroupPrincipal("guests"); static final GroupPrincipal USERS = new GroupPrincipal("users"); static final GroupPrincipal ADMINS = new GroupPrincipal("admins"); - private static final Log LOG = LogFactory.getLog(SimpleSecurityBrokerSystemTest.class); + private static final Logger LOG = LoggerFactory.getLogger(SimpleSecurityBrokerSystemTest.class); public BrokerPlugin authorizationPlugin; public BrokerPlugin authenticationPlugin; diff --git a/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java b/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java index 91a9d20087..251802bfa2 100644 --- a/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java @@ -21,8 +21,8 @@ import java.net.URI; import junit.framework.Test; import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFactory; */ public class XBeanSecurityTest extends SecurityTestSupport { - private static final Log LOG = LogFactory.getLog(XBeanSecurityTest.class); + private static final Logger LOG = LoggerFactory.getLogger(XBeanSecurityTest.class); public static Test suite() { return suite(XBeanSecurityTest.class); diff --git a/activemq-core/src/test/java/org/apache/activemq/selector/SelectorParserTest.java b/activemq-core/src/test/java/org/apache/activemq/selector/SelectorParserTest.java index 95e84e679c..0de15550e9 100755 --- a/activemq-core/src/test/java/org/apache/activemq/selector/SelectorParserTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/selector/SelectorParserTest.java @@ -24,14 +24,14 @@ import org.apache.activemq.filter.LogicExpression; import org.apache.activemq.filter.PropertyExpression; import org.apache.activemq.filter.XPathExpression; import org.apache.activemq.spring.ConsumerBean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.2 $ */ public class SelectorParserTest extends TestCase { - private static final Log LOG = LogFactory.getLog(SelectorParserTest.class); + private static final Logger LOG = LoggerFactory.getLogger(SelectorParserTest.class); public void testParseXPath() throws Exception { BooleanExpression filter = parse("XPATH '//title[@lang=''eng'']'"); diff --git a/activemq-core/src/test/java/org/apache/activemq/spring/ActiveMQConnectionFactoryFactoryBeanTest.java b/activemq-core/src/test/java/org/apache/activemq/spring/ActiveMQConnectionFactoryFactoryBeanTest.java index 2b24cf66a4..056202e6e8 100644 --- a/activemq-core/src/test/java/org/apache/activemq/spring/ActiveMQConnectionFactoryFactoryBeanTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/spring/ActiveMQConnectionFactoryFactoryBeanTest.java @@ -20,14 +20,14 @@ package org.apache.activemq.spring; import java.util.Arrays; import junit.framework.TestCase; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1 $ */ public class ActiveMQConnectionFactoryFactoryBeanTest extends TestCase { - private static final transient Log LOG = LogFactory.getLog(ActiveMQConnectionFactoryFactoryBeanTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(ActiveMQConnectionFactoryFactoryBeanTest.class); private ActiveMQConnectionFactoryFactoryBean factory; diff --git a/activemq-core/src/test/java/org/apache/activemq/spring/ConsumerBean.java b/activemq-core/src/test/java/org/apache/activemq/spring/ConsumerBean.java index ade0b6cfc0..2b0de0a2b5 100755 --- a/activemq-core/src/test/java/org/apache/activemq/spring/ConsumerBean.java +++ b/activemq-core/src/test/java/org/apache/activemq/spring/ConsumerBean.java @@ -23,11 +23,11 @@ import javax.jms.Message; import javax.jms.MessageListener; import junit.framework.Assert; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ConsumerBean extends Assert implements MessageListener { - private static final Log LOG = LogFactory.getLog(ConsumerBean.class); + private static final Logger LOG = LoggerFactory.getLogger(ConsumerBean.class); private final List messages = new ArrayList(); private boolean verbose; diff --git a/activemq-core/src/test/java/org/apache/activemq/spring/SpringConsumer.java b/activemq-core/src/test/java/org/apache/activemq/spring/SpringConsumer.java index 6f555ec5dd..118e0361c8 100755 --- a/activemq-core/src/test/java/org/apache/activemq/spring/SpringConsumer.java +++ b/activemq-core/src/test/java/org/apache/activemq/spring/SpringConsumer.java @@ -25,12 +25,12 @@ import javax.jms.MessageConsumer; import javax.jms.MessageListener; import javax.jms.Session; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.jms.core.JmsTemplate; public class SpringConsumer extends ConsumerBean implements MessageListener { - private static final Log LOG = LogFactory.getLog(SpringConsumer.class); + private static final Logger LOG = LoggerFactory.getLogger(SpringConsumer.class); private JmsTemplate template; private String myId = "foo"; private Destination destination; diff --git a/activemq-core/src/test/java/org/apache/activemq/spring/SpringProducer.java b/activemq-core/src/test/java/org/apache/activemq/spring/SpringProducer.java index 297f99f07c..c2bbad07c5 100755 --- a/activemq-core/src/test/java/org/apache/activemq/spring/SpringProducer.java +++ b/activemq-core/src/test/java/org/apache/activemq/spring/SpringProducer.java @@ -22,13 +22,13 @@ import javax.jms.Message; import javax.jms.Session; import javax.jms.TextMessage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.jms.core.JmsTemplate; import org.springframework.jms.core.MessageCreator; public class SpringProducer { - private static final Log LOG = LogFactory.getLog(SpringProducer.class); + private static final Logger LOG = LoggerFactory.getLogger(SpringProducer.class); private JmsTemplate template; private Destination destination; private int messageCount = 10; diff --git a/activemq-core/src/test/java/org/apache/activemq/spring/SpringTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/spring/SpringTestSupport.java index f1b9c9ce0c..760e566ffd 100644 --- a/activemq-core/src/test/java/org/apache/activemq/spring/SpringTestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/spring/SpringTestSupport.java @@ -21,8 +21,8 @@ import java.util.List; import junit.framework.TestCase; import org.apache.activemq.test.JmsTopicSendReceiveTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -30,7 +30,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; * @version $Revision: 1.1 $ */ public class SpringTestSupport extends TestCase { - private static final Log LOG = LogFactory.getLog(SpringTest.class); + private static final Logger LOG = LoggerFactory.getLogger(SpringTest.class); protected AbstractApplicationContext context; protected SpringConsumer consumer; protected SpringProducer producer; diff --git a/activemq-core/src/test/java/org/apache/activemq/store/MessagePriorityTest.java b/activemq-core/src/test/java/org/apache/activemq/store/MessagePriorityTest.java index 682bba93c5..aa6d9fd4c3 100644 --- a/activemq-core/src/test/java/org/apache/activemq/store/MessagePriorityTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/store/MessagePriorityTest.java @@ -37,12 +37,12 @@ import org.apache.activemq.broker.region.policy.StorePendingDurableSubscriberMes import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; abstract public class MessagePriorityTest extends CombinationTestSupport { - private static final Log LOG = LogFactory.getLog(MessagePriorityTest.class); + private static final Logger LOG = LoggerFactory.getLogger(MessagePriorityTest.class); BrokerService broker; PersistenceAdapter adapter; diff --git a/activemq-core/src/test/java/org/apache/activemq/store/StoreOrderTest.java b/activemq-core/src/test/java/org/apache/activemq/store/StoreOrderTest.java index 0fddfc6a81..3e12fb4751 100644 --- a/activemq-core/src/test/java/org/apache/activemq/store/StoreOrderTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/store/StoreOrderTest.java @@ -39,8 +39,8 @@ import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -48,7 +48,7 @@ import org.junit.Test; // https://issues.apache.org/activemq/browse/AMQ-2594 public abstract class StoreOrderTest { - private static final Log LOG = LogFactory.getLog(StoreOrderTest.class); + private static final Logger LOG = LoggerFactory.getLogger(StoreOrderTest.class); protected BrokerService broker; private ActiveMQConnection connection; @@ -270,4 +270,4 @@ public abstract class StoreOrderTest { brokerService.setDestinationPolicy(map); } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/store/jdbc/BrokenPersistenceAdapter.java b/activemq-core/src/test/java/org/apache/activemq/store/jdbc/BrokenPersistenceAdapter.java index 80b7547bb3..e275d75260 100644 --- a/activemq-core/src/test/java/org/apache/activemq/store/jdbc/BrokenPersistenceAdapter.java +++ b/activemq-core/src/test/java/org/apache/activemq/store/jdbc/BrokenPersistenceAdapter.java @@ -21,12 +21,12 @@ import java.io.IOException; import org.apache.activemq.broker.ConnectionContext; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; class BrokenPersistenceAdapter extends JDBCPersistenceAdapter { - private final Log LOG = LogFactory.getLog(BrokenPersistenceAdapter.class); + private final Logger LOG = LoggerFactory.getLogger(BrokenPersistenceAdapter.class); private boolean shouldBreak = false; diff --git a/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCCommitExceptionTest.java b/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCCommitExceptionTest.java index be69cf5beb..46e1b7368b 100644 --- a/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCCommitExceptionTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCCommitExceptionTest.java @@ -37,8 +37,8 @@ import org.apache.activemq.openwire.OpenWireFormat; import org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter; import org.apache.activemq.util.ByteSequence; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.derby.jdbc.EmbeddedDataSource; import junit.framework.TestCase; @@ -46,7 +46,7 @@ import junit.framework.TestCase; // https://issues.apache.org/activemq/browse/AMQ-2880 public class JDBCCommitExceptionTest extends TestCase { - private static final Log LOG = LogFactory.getLog(JDBCCommitExceptionTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JDBCCommitExceptionTest.class); protected static final int messagesExpected = 10; protected ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory( diff --git a/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java b/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java index 248ae1d99b..e3c07cd1ce 100644 --- a/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java @@ -34,13 +34,13 @@ import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.store.MessagePriorityTest; import org.apache.activemq.store.PersistenceAdapter; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.derby.jdbc.EmbeddedDataSource; public class JDBCMessagePriorityTest extends MessagePriorityTest { - private static final Log LOG = LogFactory.getLog(JDBCMessagePriorityTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JDBCMessagePriorityTest.class); EmbeddedDataSource dataSource; @Override diff --git a/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreOrderTest.java b/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreOrderTest.java index a010291cb0..4d3ac55953 100644 --- a/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreOrderTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreOrderTest.java @@ -25,14 +25,14 @@ import org.apache.activemq.openwire.OpenWireFormat; import org.apache.activemq.store.StoreOrderTest; import org.apache.activemq.util.ByteSequence; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.derby.jdbc.EmbeddedDataSource; // https://issues.apache.org/activemq/browse/AMQ-2594 public class JDBCStoreOrderTest extends StoreOrderTest { - private static final Log LOG = LogFactory.getLog(JDBCStoreOrderTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JDBCStoreOrderTest.class); @Override protected void dumpMessages() throws Exception { @@ -60,4 +60,4 @@ public class JDBCStoreOrderTest extends StoreOrderTest { brokerService.setPersistenceAdapter(jdbc); } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCXACommitExceptionTest.java b/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCXACommitExceptionTest.java index 8fb9f42858..7dd5fbcf53 100644 --- a/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCXACommitExceptionTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCXACommitExceptionTest.java @@ -37,14 +37,14 @@ import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; import org.apache.activemq.ActiveMQXAConnectionFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import junit.framework.TestCase; // https://issues.apache.org/activemq/browse/AMQ-2880 public class JDBCXACommitExceptionTest extends JDBCCommitExceptionTest { - private static final Log LOG = LogFactory.getLog(JDBCXACommitExceptionTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JDBCXACommitExceptionTest.class); private long txGenerator = System.currentTimeMillis(); diff --git a/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBVersionTest.java b/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBVersionTest.java index 4be5897639..b1abe18a3b 100644 --- a/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBVersionTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBVersionTest.java @@ -23,8 +23,8 @@ import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.util.IOHelper; import javax.jms.*; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; @@ -35,7 +35,7 @@ import java.io.FileNotFoundException; */ public class KahaDBVersionTest extends TestCase { - static final Log LOG = LogFactory.getLog(KahaDBVersionTest.class); + static final Logger LOG = LoggerFactory.getLogger(KahaDBVersionTest.class); final static File VERSION_1_DB= new File("src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion1"); final static File VERSION_2_DB= new File("src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion2"); @@ -151,4 +151,4 @@ public class KahaDBVersionTest extends TestCase { broker.stop(); } } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/store/kahadb/NoSpaceIOTest.java b/activemq-core/src/test/java/org/apache/activemq/store/kahadb/NoSpaceIOTest.java index 0b50700ed1..fd61f89b2d 100644 --- a/activemq-core/src/test/java/org/apache/activemq/store/kahadb/NoSpaceIOTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/store/kahadb/NoSpaceIOTest.java @@ -28,13 +28,13 @@ import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.Ignore; import org.junit.Test; public class NoSpaceIOTest { - private static final Log LOG = LogFactory.getLog(NoSpaceIOTest.class); + private static final Logger LOG = LoggerFactory.getLogger(NoSpaceIOTest.class); // need an app to input to console in intellij idea public static void main(String[] args) throws Exception { diff --git a/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/KahaBulkLoadingTest.java b/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/KahaBulkLoadingTest.java index bdf045fe18..6da5560174 100644 --- a/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/KahaBulkLoadingTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/KahaBulkLoadingTest.java @@ -39,8 +39,8 @@ import org.apache.activemq.broker.ProgressPrinter; import org.apache.activemq.broker.TransportConnector; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.activemq.store.kahadb.KahaDBStore; /** @@ -50,7 +50,7 @@ import org.apache.activemq.store.kahadb.KahaDBStore; */ public class KahaBulkLoadingTest extends JmsTestSupport { - private static final Log LOG = LogFactory.getLog(KahaBulkLoadingTest.class); + private static final Logger LOG = LoggerFactory.getLogger(KahaBulkLoadingTest.class); protected int messageSize = 1024 * 4; diff --git a/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java index dc01bb099f..70261314d9 100755 --- a/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java @@ -35,14 +35,14 @@ import javax.jms.TextMessage; import junit.framework.AssertionFailedError; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.2 $ */ public abstract class JmsSendReceiveTestSupport extends TestSupport implements MessageListener { - private static final Log LOG = LogFactory.getLog(JmsSendReceiveTestSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsSendReceiveTestSupport.class); protected int messageCount = 100; protected String[] data; diff --git a/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java b/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java index 52eee19988..97b65eb009 100755 --- a/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java @@ -23,14 +23,14 @@ import javax.jms.MessageConsumer; import javax.jms.Session; import javax.jms.Topic; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.2 $ */ public class JmsTopicSendReceiveTest extends JmsSendReceiveTestSupport { - private static final Log LOG = LogFactory.getLog(JmsTopicSendReceiveTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsTopicSendReceiveTest.class); protected Connection connection; diff --git a/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java b/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java index 02e1a5863a..daf60d7b8d 100644 --- a/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java @@ -25,14 +25,14 @@ import javax.jms.Message; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.security.SimpleSecurityBrokerSystemTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1 $ */ public class JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest extends JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest { - private static final Log LOG = LogFactory.getLog(JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.class); protected String userName = "James"; diff --git a/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java b/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java index 94c3b42057..9e0973c77c 100755 --- a/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java @@ -23,15 +23,15 @@ import javax.jms.MessageConsumer; import javax.jms.Session; import org.apache.activemq.ActiveMQConnectionFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.3 $ */ public class JmsTopicSendReceiveWithTwoConnectionsTest extends JmsSendReceiveTestSupport { - private static final Log LOG = LogFactory.getLog(JmsTopicSendReceiveWithTwoConnectionsTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsTopicSendReceiveWithTwoConnectionsTest.class); protected Connection sendConnection; protected Connection receiveConnection; diff --git a/activemq-core/src/test/java/org/apache/activemq/test/TemporaryDestinationToFromNameTest.java b/activemq-core/src/test/java/org/apache/activemq/test/TemporaryDestinationToFromNameTest.java index 699a70c065..2c24a5db86 100644 --- a/activemq-core/src/test/java/org/apache/activemq/test/TemporaryDestinationToFromNameTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/test/TemporaryDestinationToFromNameTest.java @@ -22,15 +22,15 @@ import javax.jms.Topic; import org.apache.activemq.EmbeddedBrokerAndConnectionTestSupport; import org.apache.activemq.broker.jmx.PurgeTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1 $ */ public class TemporaryDestinationToFromNameTest extends EmbeddedBrokerAndConnectionTestSupport { - private static final Log LOG = LogFactory.getLog(TemporaryDestinationToFromNameTest.class); + private static final Logger LOG = LoggerFactory.getLogger(TemporaryDestinationToFromNameTest.class); public void testCreateTemporaryQueueThenCreateAQueueFromItsName() throws Exception { Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); diff --git a/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java b/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java index 562a844704..a0864d5cd5 100755 --- a/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java @@ -31,8 +31,8 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Useful base class for unit test cases @@ -40,7 +40,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.4 $ */ public abstract class TestSupport extends TestCase { - private static final Log LOG = LogFactory.getLog(TestSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(TestSupport.class); protected ActiveMQConnectionFactory connectionFactory; protected boolean topic = true; diff --git a/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapAndListPropertyTest.java b/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapAndListPropertyTest.java index 58b3633243..819ac04c33 100644 --- a/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapAndListPropertyTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapAndListPropertyTest.java @@ -25,8 +25,8 @@ import javax.jms.JMSException; import javax.jms.Message; import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Tests that a Message can have nested Map and List properties attached. @@ -35,7 +35,7 @@ import org.apache.commons.logging.LogFactory; */ public class NestedMapAndListPropertyTest extends JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest { - private static final Log LOG = LogFactory.getLog(NestedMapAndListPropertyTest.class); + private static final Logger LOG = LoggerFactory.getLogger(NestedMapAndListPropertyTest.class); protected void assertMessageValid(int index, Message message) throws JMSException { Object value = message.getObjectProperty("textField"); diff --git a/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapMessageTest.java b/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapMessageTest.java index fa5be7252c..e6f97cc4c8 100644 --- a/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapMessageTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapMessageTest.java @@ -26,15 +26,15 @@ import javax.jms.MapMessage; import javax.jms.Message; import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class NestedMapMessageTest extends JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest { - private static final Log LOG = LogFactory.getLog(NestedMapMessageTest.class); + private static final Logger LOG = LoggerFactory.getLogger(NestedMapMessageTest.class); protected void assertMessageValid(int index, Message message) throws JMSException { assertTrue("Should be a MapMessage: " + message, message instanceof MapMessage); diff --git a/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java b/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java index fb031f9e65..fe34ce55ba 100644 --- a/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java +++ b/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java @@ -22,8 +22,8 @@ import org.apache.activemq.broker.region.policy.MessageQuery; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQTextMessage; import org.apache.activemq.command.Message; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @@ -32,7 +32,7 @@ import org.apache.commons.logging.LogFactory; public class DummyMessageQuery implements MessageQuery { public static final int MESSAGE_COUNT = 10; - private static final Log LOG = LogFactory.getLog(DummyMessageQuery.class); + private static final Logger LOG = LoggerFactory.getLogger(DummyMessageQuery.class); public void execute(ActiveMQDestination destination, MessageListener listener) throws Exception { diff --git a/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java b/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java index 2c9b16c0f9..0dfbb21b27 100644 --- a/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java @@ -33,14 +33,14 @@ import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.test.TemporaryDestinationToFromNameTest; import org.apache.activemq.util.MessageIdList; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1 $ */ public class RetroactiveConsumerTestWithSimpleMessageListTest extends EmbeddedBrokerTestSupport { - private static final Log LOG = LogFactory.getLog(RetroactiveConsumerTestWithSimpleMessageListTest.class); + private static final Logger LOG = LoggerFactory.getLogger(RetroactiveConsumerTestWithSimpleMessageListTest.class); protected int messageCount = 20; protected Connection connection; diff --git a/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java b/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java index 19b49321a7..4ad2499bc3 100644 --- a/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java @@ -32,14 +32,14 @@ import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.usecases.CreateLotsOfTemporaryQueuesTest; import org.apache.activemq.util.MessageIdList; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class RetroactiveConsumerWithMessageQueryTest extends EmbeddedBrokerTestSupport { - private static final Log LOG = LogFactory.getLog(RetroactiveConsumerWithMessageQueryTest.class); + private static final Logger LOG = LoggerFactory.getLogger(RetroactiveConsumerWithMessageQueryTest.class); protected int messageCount = 20; protected Connection connection; diff --git a/activemq-core/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java b/activemq-core/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java index 1c754d416f..26725a64f8 100644 --- a/activemq-core/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java @@ -26,13 +26,13 @@ import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.EmbeddedBrokerTestSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.jms.core.MessageCreator; public class CloseRollbackRedeliveryQueueTest extends EmbeddedBrokerTestSupport { - private static final transient Log LOG = LogFactory.getLog(CloseRollbackRedeliveryQueueTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(CloseRollbackRedeliveryQueueTest.class); protected int numberOfMessagesOnQueue = 1; private Connection connection; diff --git a/activemq-core/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java b/activemq-core/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java index c563923b46..8fd3457a98 100644 --- a/activemq-core/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java +++ b/activemq-core/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java @@ -24,11 +24,11 @@ import javax.jms.MessageConsumer; import javax.jms.MessageListener; import javax.jms.Session; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class DelegatingTransactionalMessageListener implements MessageListener { - private static final transient Log LOG = LogFactory.getLog(DelegatingTransactionalMessageListener.class); + private static final transient Logger LOG = LoggerFactory.getLogger(DelegatingTransactionalMessageListener.class); private final MessageListener underlyingListener; private boolean transacted = true; diff --git a/activemq-core/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java b/activemq-core/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java index 03a44e2618..5287847674 100644 --- a/activemq-core/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java @@ -32,8 +32,8 @@ import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.EmbeddedBrokerTestSupport; import org.apache.activemq.RedeliveryPolicy; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.jms.core.MessageCreator; /** @@ -41,7 +41,7 @@ import org.springframework.jms.core.MessageCreator; */ public class RollbacksWhileConsumingLargeQueueTest extends EmbeddedBrokerTestSupport implements MessageListener { - private static final transient Log LOG = LogFactory.getLog(RollbacksWhileConsumingLargeQueueTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(RollbacksWhileConsumingLargeQueueTest.class); protected int numberOfMessagesOnQueue = 650; private Connection connection; diff --git a/activemq-core/src/test/java/org/apache/activemq/thread/TaskRunnerTest.java b/activemq-core/src/test/java/org/apache/activemq/thread/TaskRunnerTest.java index 34fcbaea29..7d3c288a15 100755 --- a/activemq-core/src/test/java/org/apache/activemq/thread/TaskRunnerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/thread/TaskRunnerTest.java @@ -23,11 +23,11 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import junit.framework.TestCase; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class TaskRunnerTest extends TestCase { - private static final Log LOG = LogFactory.getLog(TaskRunnerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(TaskRunnerTest.class); public void testWakeupPooled() throws InterruptedException, BrokenBarrierException { System.setProperty("org.apache.activemq.UseDedicatedTaskRunner", "false"); diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java index 76b8d3f5c2..b9f159b0f0 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java @@ -37,11 +37,11 @@ import org.apache.activemq.transport.stomp.Stomp; import org.apache.activemq.transport.stomp.StompConnection; import org.apache.activemq.util.SocketProxy; import org.apache.activemq.util.URISupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class SoWriteTimeoutTest extends JmsTestSupport { - private static final Log LOG = LogFactory.getLog(SoWriteTimeoutTest.class); + private static final Logger LOG = LoggerFactory.getLogger(SoWriteTimeoutTest.class); final int receiveBufferSize = 16*1024; public String brokerTransportScheme = "nio"; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java index 8badf1623d..c5daa0591f 100755 --- a/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java @@ -41,8 +41,8 @@ import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTextMessage; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.util.ServiceStopper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ @@ -51,7 +51,7 @@ public class TopicClusterTest extends TestCase implements MessageListener { protected static final int MESSAGE_COUNT = 50; protected static final int NUMBER_IN_CLUSTER = 3; - private static final Log LOG = LogFactory.getLog(TopicClusterTest.class); + private static final Logger LOG = LoggerFactory.getLogger(TopicClusterTest.class); protected Destination destination; protected boolean topic = true; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java index 48efa68980..78dc1e797a 100755 --- a/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java @@ -30,8 +30,8 @@ import org.apache.activemq.broker.jmx.ManagementContext; import org.apache.activemq.transport.discovery.multicast.MulticastDiscoveryAgentFactory; import org.apache.activemq.util.SocketProxy; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; import org.jmock.Expectations; @@ -50,7 +50,7 @@ import org.junit.runner.RunWith; @RunWith(JMock.class) public class DiscoveryNetworkReconnectTest { - private static final Log LOG = LogFactory.getLog(DiscoveryNetworkReconnectTest.class); + private static final Logger LOG = LoggerFactory.getLogger(DiscoveryNetworkReconnectTest.class); final int maxReconnects = 5; final String groupName = "GroupID-" + "DiscoveryNetworkReconnectTest"; final String discoveryAddress = "multicast://default?group=" + groupName + "&initialReconnectDelay=1000"; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportBrokerTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportBrokerTest.java index a1eb906b09..38f7cdbed5 100755 --- a/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportBrokerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportBrokerTest.java @@ -36,12 +36,12 @@ import org.apache.activemq.network.NetworkTestSupport; import org.apache.activemq.transport.Transport; import org.apache.activemq.transport.TransportFactory; import org.apache.activemq.transport.failover.FailoverTransport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class DiscoveryTransportBrokerTest extends NetworkTestSupport { - private static final Log LOG = LogFactory.getLog(DiscoveryTransportBrokerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(DiscoveryTransportBrokerTest.class); String groupName; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportNoBrokerTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportNoBrokerTest.java index 497ffcd556..02aadb0f01 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportNoBrokerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportNoBrokerTest.java @@ -31,12 +31,12 @@ import org.apache.activemq.command.DiscoveryEvent; import org.apache.activemq.transport.StubCompositeTransport; import org.apache.activemq.util.URISupport; import org.apache.activemq.util.URISupport.CompositeData; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class DiscoveryTransportNoBrokerTest extends CombinationTestSupport { - private static final Log LOG = LogFactory.getLog(DiscoveryTransportNoBrokerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(DiscoveryTransportNoBrokerTest.class); public void testNoExtraThreads() throws Exception { BrokerService broker = new BrokerService(); diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java index e1cf048234..973a6b3edb 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java @@ -24,15 +24,15 @@ import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.transport.Transport; import org.apache.activemq.transport.TransportFactory; import org.apache.activemq.transport.TransportListener; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1 $ */ public class BadConnectionTest extends TestCase { - private static final Log LOG = LogFactory.getLog(BadConnectionTest.class); + private static final Logger LOG = LoggerFactory.getLogger(BadConnectionTest.class); protected Transport transport; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java index 3c0d70213b..a071d13a50 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java @@ -46,14 +46,14 @@ import org.apache.activemq.broker.ConnectionContext; import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; import org.apache.activemq.command.TransactionId; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.After; import org.junit.Test; public class FailoverConsumerOutstandingCommitTest { - private static final Log LOG = LogFactory.getLog(FailoverConsumerOutstandingCommitTest.class); + private static final Logger LOG = LoggerFactory.getLogger(FailoverConsumerOutstandingCommitTest.class); private static final String QUEUE_NAME = "FailoverWithOutstandingCommit"; private static final String MESSAGE_TEXT = "Test message "; private String url = "tcp://localhost:61616"; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerTest.java index fc2858d91d..61e976f9d2 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerTest.java @@ -28,13 +28,13 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQPrefetchPolicy; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.network.NetworkTestSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class FailoverConsumerTest extends NetworkTestSupport { public static final int MSG_COUNT = 100; - private static final Log LOG = LogFactory.getLog(FailoverConsumerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(FailoverConsumerTest.class); public void testPublisherFailsOver() throws Exception { diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java index c4d1a7be2d..de10509775 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java @@ -44,15 +44,15 @@ import org.apache.activemq.command.ConsumerId; import org.apache.activemq.command.ConsumerInfo; import org.apache.activemq.command.SessionId; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.After; import org.junit.Test; // see https://issues.apache.org/activemq/browse/AMQ-2573 public class FailoverConsumerUnconsumedTest { - private static final Log LOG = LogFactory.getLog(FailoverConsumerUnconsumedTest.class); + private static final Logger LOG = LoggerFactory.getLogger(FailoverConsumerUnconsumedTest.class); private static final String QUEUE_NAME = "FailoverWithUnconsumed"; private String url = "tcp://localhost:61616"; final int prefetch = 10; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java index e56f491da1..82375ef895 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java @@ -35,8 +35,8 @@ import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.ConnectionContext; import org.apache.activemq.command.MessagePull; import org.apache.activemq.command.Response; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.After; import org.junit.Test; @@ -46,7 +46,7 @@ import static org.junit.Assert.assertTrue; // see: https://issues.apache.org/activemq/browse/AMQ-2877 public class FailoverPrefetchZeroTest { - private static final Log LOG = LogFactory.getLog(FailoverPrefetchZeroTest.class); + private static final Logger LOG = LoggerFactory.getLogger(FailoverPrefetchZeroTest.class); private static final String QUEUE_NAME = "FailoverPrefetchZero"; private String url = "tcp://localhost:61616"; final int prefetch = 0; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java index bc80e61417..aa80dd230f 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java @@ -32,8 +32,8 @@ import org.apache.activemq.command.TransactionId; import org.apache.activemq.store.PersistenceAdapter; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; import org.apache.activemq.util.SocketProxy; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.jms.Connection; import javax.jms.JMSException; @@ -58,7 +58,7 @@ import java.util.concurrent.atomic.AtomicBoolean; // https://issues.apache.org/activemq/browse/AMQ-2590 public class FailoverTransactionTest extends TestSupport { - private static final Log LOG = LogFactory.getLog(FailoverTransactionTest.class); + private static final Logger LOG = LoggerFactory.getLogger(FailoverTransactionTest.class); private static final String QUEUE_NAME = "FailoverWithTx"; private String url = "tcp://localhost:61616"; BrokerService broker; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java index 0281d22d4f..f889e4b3d2 100755 --- a/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java @@ -34,12 +34,12 @@ import org.apache.activemq.network.NetworkTestSupport; import org.apache.activemq.transport.Transport; import org.apache.activemq.transport.TransportFactory; import org.apache.activemq.transport.multicast.MulticastTransportTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class FailoverTransportBrokerTest extends NetworkTestSupport { - private static final Log LOG = LogFactory.getLog(FailoverTransportBrokerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(FailoverTransportBrokerTest.class); public ActiveMQDestination destination; public int deliveryMode; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/failover/ReconnectTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/failover/ReconnectTest.java index f16cf013b0..7b7b8dc204 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/failover/ReconnectTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/failover/ReconnectTest.java @@ -37,8 +37,8 @@ import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.transport.TransportListener; import org.apache.activemq.transport.mock.MockTransport; import org.apache.activemq.util.ServiceStopper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1 $ @@ -48,7 +48,7 @@ public class ReconnectTest extends TestCase { public static final int MESSAGES_PER_ITTERATION = 10; public static final int WORKER_COUNT = 10; - private static final Log LOG = LogFactory.getLog(ReconnectTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ReconnectTest.class); private BrokerService bs; private URI tcpUri; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java index 01fe7e0ab0..f8236f51f9 100755 --- a/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java @@ -37,12 +37,12 @@ import org.apache.activemq.transport.Transport; import org.apache.activemq.transport.TransportFactory; import org.apache.activemq.transport.TransportFilter; import org.apache.activemq.transport.mock.MockTransport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class FanoutTransportBrokerTest extends NetworkTestSupport { - private static final Log LOG = LogFactory.getLog(FanoutTransportBrokerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(FanoutTransportBrokerTest.class); public ActiveMQDestination destination; public int deliveryMode; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java index ee75f2cddf..9827b4c43e 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java @@ -23,8 +23,8 @@ import org.apache.activemq.transport.CommandJoiner; import org.apache.activemq.transport.Transport; import org.apache.activemq.transport.udp.UdpTransportTest; import org.apache.activemq.util.IntSequenceGenerator; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @@ -32,7 +32,7 @@ import org.apache.commons.logging.LogFactory; */ public class MulticastTransportTest extends UdpTransportTest { - private static final Log LOG = LogFactory.getLog(MulticastTransportTest.class); + private static final Logger LOG = LoggerFactory.getLogger(MulticastTransportTest.class); private String multicastURI = "multicast://224.1.2.3:6255"; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/peer/PeerTransportTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/peer/PeerTransportTest.java index 0616682ba9..dc8c7d844d 100755 --- a/activemq-core/src/test/java/org/apache/activemq/transport/peer/PeerTransportTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/peer/PeerTransportTest.java @@ -36,8 +36,8 @@ import org.apache.activemq.command.ActiveMQTextMessage; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.command.ConsumerInfo; import org.apache.activemq.util.MessageIdList; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1.1.1 $ @@ -45,7 +45,7 @@ import org.apache.commons.logging.LogFactory; public class PeerTransportTest extends TestCase { protected static final int MESSAGE_COUNT = 50; protected static final int NUMBER_IN_CLUSTER = 3; - private static final Log LOG = LogFactory.getLog(PeerTransportTest.class); + private static final Logger LOG = LoggerFactory.getLogger(PeerTransportTest.class); protected ActiveMQDestination destination; protected boolean topic = true; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java index 43ae179895..e63f2e0f2d 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java @@ -22,15 +22,15 @@ import junit.framework.TestCase; import org.apache.activemq.command.ConsumerInfo; import org.apache.activemq.transport.StubTransport; import org.apache.activemq.transport.StubTransportListener; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class ReliableTransportTest extends TestCase { - private static final Log LOG = LogFactory.getLog(ReliableTransportTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ReliableTransportTest.class); protected ReliableTransport transport; protected StubTransportListener listener = new StubTransportListener(); diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramChannel.java b/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramChannel.java index 15c5f23940..6ba2a9bda9 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramChannel.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramChannel.java @@ -26,15 +26,15 @@ import org.apache.activemq.transport.udp.ByteBufferPool; import org.apache.activemq.transport.udp.CommandDatagramChannel; import org.apache.activemq.transport.udp.DatagramHeaderMarshaller; import org.apache.activemq.transport.udp.UdpTransport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: $ */ public class UnreliableCommandDatagramChannel extends CommandDatagramChannel { - private static final Log LOG = LogFactory.getLog(UnreliableCommandDatagramChannel.class); + private static final Logger LOG = LoggerFactory.getLogger(UnreliableCommandDatagramChannel.class); private DropCommandStrategy dropCommandStrategy; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java b/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java index ac23443ba7..137ac3f769 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java @@ -24,14 +24,14 @@ import org.apache.activemq.openwire.OpenWireFormat; import org.apache.activemq.transport.udp.CommandDatagramSocket; import org.apache.activemq.transport.udp.DatagramHeaderMarshaller; import org.apache.activemq.transport.udp.UdpTransport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: $ */ public class UnreliableCommandDatagramSocket extends CommandDatagramSocket { - private static final Log LOG = LogFactory.getLog(UnreliableCommandDatagramSocket.class); + private static final Logger LOG = LoggerFactory.getLogger(UnreliableCommandDatagramSocket.class); private DropCommandStrategy dropCommandStrategy; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java index fdc513a352..6bd8744956 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java @@ -26,15 +26,15 @@ import org.apache.activemq.transport.Transport; import org.apache.activemq.transport.udp.ResponseRedirectInterceptor; import org.apache.activemq.transport.udp.UdpTransport; import org.apache.activemq.transport.udp.UdpTransportTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * * @version $Revision: $ */ public class UnreliableUdpTransportTest extends UdpTransportTest { - private static final Log LOG = LogFactory.getLog(UnreliableUdpTransportTest.class); + private static final Logger LOG = LoggerFactory.getLogger(UnreliableUdpTransportTest.class); protected DropCommandStrategy dropStrategy = new DropCommandStrategy() { diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompAdvisoryTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompAdvisoryTest.java index d16faf5778..ce1d4b064e 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompAdvisoryTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompAdvisoryTest.java @@ -29,8 +29,8 @@ import org.apache.activemq.broker.region.policy.PolicyMap; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.util.URISupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.jms.*; import java.io.File; @@ -47,7 +47,7 @@ import java.util.Map; * @version $Revision: 1461 $ */ public class StompAdvisoryTest extends TestCase { - private static final Log LOG = LogFactory.getLog(StompAdvisoryTest.class); + private static final Logger LOG = LoggerFactory.getLogger(StompAdvisoryTest.class); protected ConnectionFactory factory; protected ActiveMQConnection connection; @@ -139,7 +139,7 @@ public class StompAdvisoryTest extends TestCase { c.start(); StompFrame f = stompConnection.receive(); - LOG.debug(f); + LOG.debug(f.toString()); assertEquals(f.getAction(),"MESSAGE"); assertTrue("Should have a body", f.getBody().length() > 0); assertTrue(f.getBody().startsWith("{\"ConnectionInfo\":")); @@ -149,7 +149,7 @@ public class StompAdvisoryTest extends TestCase { c.close(); f = stompConnection.receive(); - LOG.debug(f); + LOG.debug(f.toString()); assertEquals(f.getAction(),"MESSAGE"); assertNotNull("Body is not null", f.getBody()); assertTrue("Body should have content", f.getBody().length() > 0); @@ -173,7 +173,7 @@ public class StompAdvisoryTest extends TestCase { c.start(); StompFrame f = stompConnection.receive(); - LOG.debug(f); + LOG.debug(f.toString()); assertEquals(f.getAction(),"MESSAGE"); assertTrue("Should have a body", f.getBody().length() > 0); assertTrue(f.getBody().startsWith("{\"ConnectionInfo\":")); @@ -183,7 +183,7 @@ public class StompAdvisoryTest extends TestCase { c.close(); f = stompConnection.receive(); - LOG.debug(f); + LOG.debug(f.toString()); assertEquals(f.getAction(),"MESSAGE"); assertNotNull("Body is not null", f.getBody()); assertTrue("Body should have content", f.getBody().length() > 0); @@ -207,7 +207,7 @@ public class StompAdvisoryTest extends TestCase { c.start(); StompFrame f = stompConnection.receive(); - LOG.debug(f); + LOG.debug(f.toString()); assertEquals(f.getAction(),"MESSAGE"); assertTrue("Should have a body", f.getBody().length() > 0); assertTrue(f.getBody().startsWith("")); @@ -217,7 +217,7 @@ public class StompAdvisoryTest extends TestCase { c.close(); f = stompConnection.receive(); - LOG.debug(f); + LOG.debug(f.toString()); assertEquals(f.getAction(),"MESSAGE"); assertNotNull("Body is not null", f.getBody()); assertTrue("Body should have content", f.getBody().length() > 0); @@ -240,7 +240,7 @@ public class StompAdvisoryTest extends TestCase { MessageConsumer consumer = session.createConsumer(dest); StompFrame f = stompConnection.receive(); - LOG.debug(f); + LOG.debug(f.toString()); assertEquals(f.getAction(),"MESSAGE"); assertTrue("Should have a body", f.getBody().length() > 0); assertTrue(f.getBody().startsWith("{\"ConsumerInfo\":")); @@ -267,7 +267,7 @@ public class StompAdvisoryTest extends TestCase { producer.send(mess); StompFrame f = stompConnection.receive(); - LOG.debug(f); + LOG.debug(f.toString()); assertEquals(f.getAction(),"MESSAGE"); assertTrue("Should have a body", f.getBody().length() > 0); assertTrue(f.getBody().startsWith("{\"ProducerInfo\":")); @@ -298,7 +298,7 @@ public class StompAdvisoryTest extends TestCase { producer.send(mess); StompFrame f = stompConnection.receive(); - LOG.debug(f); + LOG.debug(f.toString()); assertEquals(f.getAction(),"MESSAGE"); assertTrue("Should have a body", f.getBody().length() > 0); assertTrue(f.getBody().startsWith("")); @@ -329,7 +329,7 @@ public class StompAdvisoryTest extends TestCase { producer.send(mess); StompFrame f = stompConnection.receive(); - LOG.debug(f); + LOG.debug(f.toString()); assertEquals(f.getAction(),"MESSAGE"); assertTrue("Should have a body", f.getBody().length() > 0); assertTrue(f.getBody().startsWith("{\"ProducerInfo\":")); diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java index 179f7dc1b9..46e010c81e 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java @@ -32,15 +32,15 @@ import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * * @version $Revision$ */ public class StompSubscriptionRemoveTest extends TestCase { - private static final Log LOG = LogFactory.getLog(StompSubscriptionRemoveTest.class); + private static final Logger LOG = LoggerFactory.getLogger(StompSubscriptionRemoveTest.class); private static final String COMMAND_MESSAGE = "MESSAGE"; private static final String HEADER_MESSAGE_ID = "message-id"; private static final int STOMP_PORT = 61613; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java index 5ab6d92acf..579f09a1ea 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java @@ -43,11 +43,11 @@ import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.jmx.BrokerViewMBean; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTextMessage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class StompTest extends CombinationTestSupport { - private static final Log LOG = LogFactory.getLog(StompTest.class); + private static final Logger LOG = LoggerFactory.getLogger(StompTest.class); protected String bindAddress = "stomp://localhost:61613"; protected String confUri = "xbean:org/apache/activemq/transport/stomp/stomp-auth-broker.xml"; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java index 71087272bf..5a67b4ae20 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java @@ -32,11 +32,11 @@ import org.apache.activemq.transport.TransportAcceptListener; import org.apache.activemq.transport.TransportFactory; import org.apache.activemq.transport.TransportListener; import org.apache.activemq.transport.TransportServer; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class InactivityMonitorTest extends CombinationTestSupport implements TransportAcceptListener { - private static final Log LOG = LogFactory.getLog(InactivityMonitorTest.class); + private static final Logger LOG = LoggerFactory.getLogger(InactivityMonitorTest.class); public Runnable serverRunOnCommand; public Runnable clientRunOnCommand; @@ -151,7 +151,7 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra } public void onAcceptError(Exception error) { - LOG.trace(error); + LOG.trace(error.toString()); } public void testClientHang() throws Exception { diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/ServerSocketTstFactory.java b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/ServerSocketTstFactory.java index a3afe748c5..5b6adf6d0a 100755 --- a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/ServerSocketTstFactory.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/ServerSocketTstFactory.java @@ -21,13 +21,13 @@ import java.net.InetAddress; import java.net.ServerSocket; import java.util.Random; import javax.net.ServerSocketFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** */ public class ServerSocketTstFactory extends ServerSocketFactory { - private static final Log LOG = LogFactory.getLog(ServerSocketTstFactory.class); + private static final Logger LOG = LoggerFactory.getLogger(ServerSocketTstFactory.class); private class ServerSocketTst { diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SocketTstFactory.java b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SocketTstFactory.java index f1215c767d..e83b0ed09b 100755 --- a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SocketTstFactory.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SocketTstFactory.java @@ -23,8 +23,8 @@ import java.net.UnknownHostException; import java.util.Random; import java.util.concurrent.ConcurrentHashMap; import javax.net.SocketFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ @@ -32,7 +32,7 @@ import org.apache.commons.logging.LogFactory; * Automatically generated socket.close() calls to simulate network faults */ public class SocketTstFactory extends SocketFactory { - private static final Log LOG = LogFactory.getLog(SocketTstFactory.class); + private static final Logger LOG = LoggerFactory.getLogger(SocketTstFactory.class); private static final ConcurrentHashMap closeIter = new ConcurrentHashMap(); diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslBrokerServiceTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslBrokerServiceTest.java index d656bbb115..25d7f3fb3b 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslBrokerServiceTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslBrokerServiceTest.java @@ -42,11 +42,11 @@ import org.apache.activemq.broker.SslContext; import org.apache.activemq.broker.TransportConnector; import org.apache.activemq.transport.TransportBrokerTestSupport; import org.apache.activemq.transport.TransportFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class SslBrokerServiceTest extends TransportBrokerTestSupport { - private static final Log LOG = LogFactory.getLog(SslBrokerServiceTest.class); + private static final Logger LOG = LoggerFactory.getLogger(SslBrokerServiceTest.class); TransportConnector needClientAuthConnector; TransportConnector limitedCipherSuites; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslContextNBrokerServiceTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslContextNBrokerServiceTest.java index bf034b675b..94647aff5e 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslContextNBrokerServiceTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslContextNBrokerServiceTest.java @@ -32,13 +32,13 @@ import junit.framework.TestCase; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.TransportConnector; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.support.ClassPathXmlApplicationContext; public class SslContextNBrokerServiceTest extends TestCase { - private static final transient Log LOG = LogFactory.getLog(SslContextNBrokerServiceTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(SslContextNBrokerServiceTest.class); private ClassPathXmlApplicationContext context; Map beansOfType; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java index 71c202789f..af9d6725ba 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java @@ -24,11 +24,11 @@ import java.util.Map; import junit.framework.TestCase; import org.apache.activemq.openwire.OpenWireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class SslTransportFactoryTest extends TestCase { - private static final Log LOG = LogFactory.getLog(SslTransportFactoryTest.class); + private static final Logger LOG = LoggerFactory.getLogger(SslTransportFactoryTest.class); private SslTransportFactory factory; private boolean verbose; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportFactory.java b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportFactory.java index f9b4fd8a9b..9044b70427 100755 --- a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportFactory.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportFactory.java @@ -37,8 +37,8 @@ import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.URISupport; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.net.Socket; import java.net.ServerSocket; @@ -50,7 +50,7 @@ import org.apache.activemq.transport.tcp.ServerSocketTstFactory; * Automatically generated socket.close() calls to simulate network faults */ public class TcpFaultyTransportFactory extends TcpTransportFactory { - private static final Log LOG = LogFactory.getLog(TcpFaultyTransportFactory.class); + private static final Logger LOG = LoggerFactory.getLogger(TcpFaultyTransportFactory.class); protected TcpFaultyTransport createTcpFaultyTransport(WireFormat wf, SocketFactory socketFactory, URI location, URI localLocation) throws UnknownHostException, IOException { return new TcpFaultyTransport(wf, socketFactory, location, localLocation); diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java index 3dc5bb76a0..5dae647a1a 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java @@ -22,15 +22,15 @@ import junit.framework.Test; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.EmbeddedBrokerTestSupport; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class TransportUriTest extends EmbeddedBrokerTestSupport { - private static final Log LOG = LogFactory.getLog(TransportUriTest.class); + private static final Logger LOG = LoggerFactory.getLogger(TransportUriTest.class); private static final String DIFF_SERV = "&diffServ="; private static final String TOS = "&typeOfService="; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/WireformatNegociationTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/WireformatNegociationTest.java index b9f7815625..37ae13830e 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/tcp/WireformatNegociationTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/tcp/WireformatNegociationTest.java @@ -32,11 +32,11 @@ import org.apache.activemq.transport.TransportAcceptListener; import org.apache.activemq.transport.TransportFactory; import org.apache.activemq.transport.TransportListener; import org.apache.activemq.transport.TransportServer; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class WireformatNegociationTest extends CombinationTestSupport { - private static final Log LOG = LogFactory.getLog(WireformatNegociationTest.class); + private static final Logger LOG = LoggerFactory.getLogger(WireformatNegociationTest.class); private TransportServer server; private Transport clientTransport; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java index 43a0239cd3..b7165e7cb2 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java @@ -33,15 +33,15 @@ import org.apache.activemq.transport.Transport; import org.apache.activemq.transport.TransportAcceptListener; import org.apache.activemq.transport.TransportListener; import org.apache.activemq.transport.TransportServer; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public abstract class UdpTestSupport extends TestCase implements TransportListener { - private static final Log LOG = LogFactory.getLog(UdpTestSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(UdpTestSupport.class); protected Transport producer; protected Transport consumer; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java index f625ba4815..a963a395aa 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java @@ -22,8 +22,8 @@ import org.apache.activemq.openwire.OpenWireFormat; import org.apache.activemq.transport.CommandJoiner; import org.apache.activemq.transport.Transport; import org.apache.activemq.util.IntSequenceGenerator; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @@ -31,7 +31,7 @@ import org.apache.commons.logging.LogFactory; */ public class UdpTransportTest extends UdpTestSupport { - private static final Log LOG = LogFactory.getLog(UdpTransportTest.class); + private static final Logger LOG = LoggerFactory.getLogger(UdpTransportTest.class); protected int consumerPort = 9123; protected String producerURI = "udp://localhost:" + consumerPort; diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java index 1841191afe..e0001377e1 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java @@ -24,15 +24,15 @@ import org.apache.activemq.transport.Transport; import org.apache.activemq.transport.TransportFactory; import org.apache.activemq.transport.TransportServer; import org.apache.activemq.transport.tcp.WireformatNegociationTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * * @version $Revision$ */ public class UdpTransportUsingServerTest extends UdpTestSupport { - private static final Log LOG = LogFactory.getLog(UdpTransportUsingServerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(UdpTransportUsingServerTest.class); protected int consumerPort = 9123; protected String producerURI = "udp://localhost:" + consumerPort; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/AMQ2927Test.java b/activemq-core/src/test/java/org/apache/activemq/usecases/AMQ2927Test.java index 81b22ecbaa..e2df753ec5 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/AMQ2927Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/AMQ2927Test.java @@ -21,8 +21,8 @@ import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.network.NetworkConnector; import org.apache.activemq.util.MessageIdList; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.jms.MessageConsumer; @@ -31,7 +31,7 @@ import java.net.URI; public class AMQ2927Test extends JmsMultipleBrokersTestSupport { - private static final Log LOG = LogFactory.getLog(AMQ2927Test.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQ2927Test.class); ActiveMQQueue queue = new ActiveMQQueue("TEST"); @@ -132,4 +132,4 @@ public class AMQ2927Test extends JmsMultipleBrokersTestSupport { waitForBridgeFormation(); } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/AdvisoryTopicDeletionTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/AdvisoryTopicDeletionTest.java index 41edd60c5e..1c00e69119 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/AdvisoryTopicDeletionTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/AdvisoryTopicDeletionTest.java @@ -29,11 +29,11 @@ import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class AdvisoryTopicDeletionTest extends TestSupport { - private static final Log LOG = LogFactory.getLog(AdvisoryTopicDeletionTest.class); + private static final Logger LOG = LoggerFactory.getLogger(AdvisoryTopicDeletionTest.class); private BrokerService broker; private Connection connection; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/BrowseOverNetworkTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/BrowseOverNetworkTest.java index 3ca490e2a8..5285683447 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/BrowseOverNetworkTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/BrowseOverNetworkTest.java @@ -30,12 +30,12 @@ import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQTextMessage; import org.apache.activemq.network.NetworkConnector; import org.apache.activemq.util.MessageIdList; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.core.io.ClassPathResource; public class BrowseOverNetworkTest extends JmsMultipleBrokersTestSupport { - private static final Log LOG = LogFactory.getLog(QueueSubscription.class); + private static final Logger LOG = LoggerFactory.getLogger(QueueSubscription.class); protected static final int MESSAGE_COUNT = 10; public void testBrowse() throws Exception { diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java index 7191ce859e..cdd04013e8 100755 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java @@ -22,14 +22,14 @@ import javax.jms.Message; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest; import org.apache.activemq.transport.udp.UdpTransportUsingServerTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1.1.1 $ */ public class CompositeConsumeTest extends JmsTopicSendReceiveWithTwoConnectionsTest { - private static final Log LOG = LogFactory.getLog(CompositeConsumeTest.class); + private static final Logger LOG = LoggerFactory.getLogger(CompositeConsumeTest.class); public void testSendReceive() throws Exception { messages.clear(); diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/CompositePublishTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/CompositePublishTest.java index d7b4b77395..b4d621d88a 100755 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/CompositePublishTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/CompositePublishTest.java @@ -30,14 +30,14 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.test.JmsSendReceiveTestSupport; import org.apache.activemq.test.retroactive.RetroactiveConsumerTestWithSimpleMessageListTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1.1.1 $ */ public class CompositePublishTest extends JmsSendReceiveTestSupport { - private static final Log LOG = LogFactory.getLog(CompositePublishTest.class); + private static final Logger LOG = LoggerFactory.getLogger(CompositePublishTest.class); protected Connection sendConnection; protected Connection receiveConnection; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java index 9dac8ee669..d95351291d 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java @@ -48,11 +48,11 @@ import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.util.MessageIdList; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ConcurrentProducerDurableConsumerTest extends TestSupport { - private static final Log LOG = LogFactory.getLog(ConcurrentProducerDurableConsumerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ConcurrentProducerDurableConsumerTest.class); private int consumerCount = 1; BrokerService broker; protected List connections = Collections.synchronizedList(new ArrayList()); diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeQueuePrefetchTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeQueuePrefetchTest.java index dbb53376b0..3810505523 100755 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeQueuePrefetchTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeQueuePrefetchTest.java @@ -19,11 +19,11 @@ package org.apache.activemq.usecases; import javax.jms.JMSException; import javax.jms.Message; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ConsumeQueuePrefetchTest extends ConsumeTopicPrefetchTest { - private static final Log LOG = LogFactory.getLog(ConsumeQueuePrefetchTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ConsumeQueuePrefetchTest.class); protected void setUp() throws Exception { topic = false; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeTopicPrefetchTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeTopicPrefetchTest.java index 5dc3f813dd..2b833bed0e 100755 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeTopicPrefetchTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeTopicPrefetchTest.java @@ -28,14 +28,14 @@ import org.apache.activemq.broker.region.DestinationStatistics; import org.apache.activemq.broker.region.RegionBroker; import org.apache.activemq.util.Wait; import org.apache.activemq.util.Wait.Condition; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1.1.1 $ */ public class ConsumeTopicPrefetchTest extends ProducerConsumerTestSupport { - private static final Log LOG = LogFactory.getLog(ConsumeTopicPrefetchTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ConsumeTopicPrefetchTest.class); protected int prefetchSize = 100; protected String[] messageTexts; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/CreateLotsOfTemporaryQueuesTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/CreateLotsOfTemporaryQueuesTest.java index 944352bda7..c960cb564d 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/CreateLotsOfTemporaryQueuesTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/CreateLotsOfTemporaryQueuesTest.java @@ -23,14 +23,14 @@ import junit.framework.Test; import junit.framework.TestSuite; import junit.textui.TestRunner; import org.apache.activemq.EmbeddedBrokerAndConnectionTestSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1 $ */ public class CreateLotsOfTemporaryQueuesTest extends EmbeddedBrokerAndConnectionTestSupport { - private static final Log LOG = LogFactory.getLog(CreateLotsOfTemporaryQueuesTest.class); + private static final Logger LOG = LoggerFactory.getLogger(CreateLotsOfTemporaryQueuesTest.class); private static int numberToCreate = 500; private static long sleep = 20; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/DispatchMultipleConsumersTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/DispatchMultipleConsumersTest.java index 40fed3375f..98b08616be 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/DispatchMultipleConsumersTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/DispatchMultipleConsumersTest.java @@ -29,8 +29,8 @@ import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** @@ -38,7 +38,7 @@ import org.apache.commons.logging.LogFactory; * */ public class DispatchMultipleConsumersTest extends TestCase { - private final static Log logger = LogFactory.getLog(DispatchMultipleConsumersTest.class); + private final static Logger logger = LoggerFactory.getLogger(DispatchMultipleConsumersTest.class); BrokerService broker; Destination dest; String destinationName = "TEST.Q"; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTcpTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTcpTest.java index 88a4cc457a..ac7bd62776 100755 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTcpTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTcpTest.java @@ -35,12 +35,12 @@ import org.apache.activemq.transport.TransportFactory; import org.apache.activemq.transport.TransportListener; import org.apache.activemq.transport.tcp.TcpTransportFactory; import org.apache.activemq.util.URISupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class DurableConsumerCloseAndReconnectTcpTest extends DurableConsumerCloseAndReconnectTest implements ExceptionListener, TransportListener { - private static final Log LOG = LogFactory.getLog(DurableConsumerCloseAndReconnectTcpTest.class); + private static final Logger LOG = LoggerFactory.getLogger(DurableConsumerCloseAndReconnectTcpTest.class); private BrokerService broker; private TransportConnector connector; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java index ce6517d0ec..b79a6842d9 100755 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java @@ -29,15 +29,15 @@ import javax.jms.Topic; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.test.TestSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1.1.1 $ */ public class DurableConsumerCloseAndReconnectTest extends TestSupport { protected static final long RECEIVE_TIMEOUT = 5000L; - private static final Log LOG = LogFactory.getLog(DurableConsumerCloseAndReconnectTest.class); + private static final Logger LOG = LoggerFactory.getLogger(DurableConsumerCloseAndReconnectTest.class); protected Connection connection; private Session session; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubProcessTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubProcessTest.java index 26735eeaae..65f9bfb628 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubProcessTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubProcessTest.java @@ -21,8 +21,8 @@ import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.Test; import javax.jms.*; @@ -39,7 +39,7 @@ import java.util.concurrent.CopyOnWriteArrayList; // see https://issues.apache.org/activemq/browse/AMQ-2985 // this demonstrated receiving old messages eventually along with validating order receipt public class DurableSubProcessTest extends org.apache.activemq.TestSupport { - private static final Log LOG = LogFactory.getLog(DurableSubProcessTest.class); + private static final Logger LOG = LoggerFactory.getLogger(DurableSubProcessTest.class); public static final long RUNTIME = 4 * 60 * 1000; public static final int SERVER_SLEEP = 2 * 1000; // max @@ -675,4 +675,4 @@ public class DurableSubProcessTest extends org.apache.activemq.TestSupport { broker.stop(); broker = null; } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java index 9480a9bb58..5095d6af57 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java @@ -27,14 +27,14 @@ import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; import javax.jms.*; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.File; import java.util.Vector; public class DurableSubscriptionOfflineTest extends org.apache.activemq.TestSupport { - private static final Log LOG = LogFactory.getLog(DurableSubscriptionOfflineTest.class); + private static final Logger LOG = LoggerFactory.getLogger(DurableSubscriptionOfflineTest.class); public Boolean usePrioritySupport = Boolean.TRUE; private BrokerService broker; private ActiveMQTopic topic; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java index 287ba08446..250844393d 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java @@ -41,15 +41,15 @@ import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.store.amq.AMQPersistenceAdapter; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import static org.apache.activemq.TestSupport.getDestination; import static org.apache.activemq.TestSupport.getDestinationStatistics; public class ExpiredMessagesTest extends CombinationTestSupport { - private static final Log LOG = LogFactory.getLog(ExpiredMessagesTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ExpiredMessagesTest.class); BrokerService broker; Connection connection; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesWithNoConsumerTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesWithNoConsumerTest.java index 53ee74b1d2..5bebb0b1d4 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesWithNoConsumerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesWithNoConsumerTest.java @@ -42,13 +42,13 @@ import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePoli import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ExpiredMessagesWithNoConsumerTest extends CombinationTestSupport { - private static final Log LOG = LogFactory.getLog(ExpiredMessagesWithNoConsumerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ExpiredMessagesWithNoConsumerTest.class); BrokerService broker; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/JdbcDurableSubDupTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/JdbcDurableSubDupTest.java index 97f7f5b702..3d04045ca1 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/JdbcDurableSubDupTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/JdbcDurableSubDupTest.java @@ -37,8 +37,8 @@ import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; import org.apache.activemq.broker.region.policy.StorePendingDurableSubscriberMessageStoragePolicy; import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -48,7 +48,7 @@ import static org.junit.Assert.assertTrue; public class JdbcDurableSubDupTest { - private static final Log LOG = LogFactory.getLog(JdbcDurableSubDupTest.class); + private static final Logger LOG = LoggerFactory.getLogger(JdbcDurableSubDupTest.class); final int prefetchVal = 150; String urlOptions = "jms.watchTopicAdvisories=false"; String url = null; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupCloseTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupCloseTest.java index 3c0fd8e386..4e008de4a7 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupCloseTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupCloseTest.java @@ -18,8 +18,8 @@ package org.apache.activemq.usecases; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.jms.*; import javax.jms.Queue; @@ -35,7 +35,7 @@ import java.util.concurrent.CountDownLatch; * 1 and 6 have the JMSXGroupFirstForConsumer property set to true. */ public class MessageGroupCloseTest extends TestCase { - private static final Log LOG = LogFactory.getLog(MessageGroupNewConsumerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(MessageGroupNewConsumerTest.class); private Connection connection; // Released after all messages are created private CountDownLatch latchMessagesCreated = new CountDownLatch(1); @@ -219,4 +219,4 @@ public class MessageGroupCloseTest extends TestCase { messageGroups.put(groupId, count + 1); } } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupDelayedTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupDelayedTest.java index ed601d6688..134d07c622 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupDelayedTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupDelayedTest.java @@ -37,13 +37,13 @@ import org.apache.activemq.broker.TransportConnector; import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class MessageGroupDelayedTest extends JmsTestSupport { - public static final Log log = LogFactory.getLog(MessageGroupDelayedTest.class); + public static final Logger log = LoggerFactory.getLogger(MessageGroupDelayedTest.class); protected Connection connection; protected Session session; protected MessageProducer producer; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupNewConsumerTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupNewConsumerTest.java index 8a87510b3b..5d43f66510 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupNewConsumerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupNewConsumerTest.java @@ -28,8 +28,8 @@ import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnectionFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import junit.framework.TestCase; /* @@ -42,7 +42,7 @@ import junit.framework.TestCase; * See bug AMQ-2016: Message grouping fails when consumers are added */ public class MessageGroupNewConsumerTest extends TestCase { - private static final Log LOG = LogFactory.getLog(MessageGroupNewConsumerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(MessageGroupNewConsumerTest.class); private Connection connection; // Released after the messages are created private CountDownLatch latchMessagesCreated = new CountDownLatch(1); diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/MessageReroutingTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/MessageReroutingTest.java index 60de00ff42..729d7754c3 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/MessageReroutingTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/MessageReroutingTest.java @@ -25,12 +25,12 @@ import org.apache.activemq.JmsMultipleBrokersTestSupport; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.util.MessageIdList; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.core.io.ClassPathResource; public class MessageReroutingTest extends JmsMultipleBrokersTestSupport { - private static final transient Log LOG = LogFactory.getLog(MessageReroutingTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(MessageReroutingTest.class); public Destination dest; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsTest.java index 74b7b3177a..f4c75e34e5 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsTest.java @@ -29,8 +29,8 @@ import javax.jms.MessageConsumer; import org.apache.activemq.JmsMultipleBrokersTestSupport; import org.apache.activemq.util.MessageIdList; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1.1.1 $ @@ -41,7 +41,7 @@ public class MultiBrokersMultiClientsTest extends JmsMultipleBrokersTestSupport public static final int PRODUCER_COUNT = 3; // producers per broker public static final int MESSAGE_COUNT = 20; // messages per producer - private static final Log LOG = LogFactory.getLog(MultiBrokersMultiClientsTest.class); + private static final Logger LOG = LoggerFactory.getLogger(MultiBrokersMultiClientsTest.class); protected Map consumerMap; Map unhandeledExceptions = new HashMap(); diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/NetworkOfTwentyBrokersTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/NetworkOfTwentyBrokersTest.java index 1649c616e9..4d0a6217ee 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/NetworkOfTwentyBrokersTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/NetworkOfTwentyBrokersTest.java @@ -27,11 +27,11 @@ import org.apache.activemq.broker.region.RegionBroker; import org.apache.activemq.command.BrokerInfo; import org.apache.activemq.network.NetworkConnector; import org.apache.activemq.util.ThreadTracker; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class NetworkOfTwentyBrokersTest extends JmsMultipleBrokersTestSupport { - private static final Log LOG = LogFactory.getLog(NetworkOfTwentyBrokersTest.class); + private static final Logger LOG = LoggerFactory.getLogger(NetworkOfTwentyBrokersTest.class); // This will interconnect all brokers using multicast protected void bridgeAllBrokers() throws Exception { diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/NewConsumerCreatesDestinationTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/NewConsumerCreatesDestinationTest.java index 3bdecd23a6..947bf2ec35 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/NewConsumerCreatesDestinationTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/NewConsumerCreatesDestinationTest.java @@ -24,15 +24,15 @@ import javax.jms.Session; import org.apache.activemq.EmbeddedBrokerAndConnectionTestSupport; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * * @version $Revision: $ */ public class NewConsumerCreatesDestinationTest extends EmbeddedBrokerAndConnectionTestSupport { - private static final Log LOG = LogFactory.getLog(NewConsumerCreatesDestinationTest.class); + private static final Logger LOG = LoggerFactory.getLogger(NewConsumerCreatesDestinationTest.class); private ActiveMQQueue wildcard; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/NoDuplicateOnTopicNetworkTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/NoDuplicateOnTopicNetworkTest.java index 5058d3758d..277bcc8284 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/NoDuplicateOnTopicNetworkTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/NoDuplicateOnTopicNetworkTest.java @@ -48,12 +48,12 @@ import org.apache.activemq.broker.region.policy.SimpleDispatchPolicy; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.network.NetworkConnector; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class NoDuplicateOnTopicNetworkTest extends CombinationTestSupport { - private static final Log LOG = LogFactory - .getLog(NoDuplicateOnTopicNetworkTest.class); + private static final Logger LOG = LoggerFactory + .getLogger(NoDuplicateOnTopicNetworkTest.class); private static final String MULTICAST_DEFAULT = "multicast://default"; private static final String BROKER_1 = "tcp://localhost:61626"; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/ObjectMessageNotSerializableTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/ObjectMessageNotSerializableTest.java index d09447e2e8..c9f0f5306a 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/ObjectMessageNotSerializableTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/ObjectMessageNotSerializableTest.java @@ -35,13 +35,13 @@ import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQObjectMessage; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ObjectMessageNotSerializableTest extends CombinationTestSupport { - private static final Log LOG = LogFactory.getLog(ObjectMessageNotSerializableTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ObjectMessageNotSerializableTest.class); BrokerService broker; AtomicInteger numReceived = new AtomicInteger(0); diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java index bc578d2ec7..ae203b0471 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java @@ -35,12 +35,12 @@ import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.util.IOHelper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public final class PublishOnQueueConsumedMessageInTransactionTest extends TestCase implements MessageListener { - private static final Log LOG = LogFactory.getLog(PublishOnQueueConsumedMessageInTransactionTest.class); + private static final Logger LOG = LoggerFactory.getLogger(PublishOnQueueConsumedMessageInTransactionTest.class); private Session producerSession; private Session consumerSession; @@ -126,10 +126,10 @@ public final class PublishOnQueueConsumedMessageInTransactionTest extends TestCa consumerSession.rollback(); LOG.info("rolled back transaction"); } catch (JMSException e1) { - LOG.info(e1); + LOG.info(e1.toString()); e1.printStackTrace(); } - LOG.info(e); + LOG.info(e.toString()); e.printStackTrace(); } } diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java index cbd92c430a..77d2e17ff1 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java @@ -21,8 +21,8 @@ import java.io.File; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.xbean.BrokerFactoryBean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; @@ -33,7 +33,7 @@ import org.springframework.core.io.Resource; */ public class PublishOnQueueConsumedMessageUsingActivemqXMLTest extends PublishOnTopicConsumedMessageTest { protected static final String JOURNAL_ROOT = "../data/"; - private static final transient Log LOG = LogFactory.getLog(PublishOnQueueConsumedMessageUsingActivemqXMLTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(PublishOnQueueConsumedMessageUsingActivemqXMLTest.class); BrokerService broker; /** diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumedMessageTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumedMessageTest.java index d1f8dc8171..eb64c15a30 100755 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumedMessageTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumedMessageTest.java @@ -22,15 +22,15 @@ import javax.jms.Message; import javax.jms.MessageProducer; import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1.1.1 $ */ public class PublishOnTopicConsumedMessageTest extends JmsTopicSendReceiveWithTwoConnectionsTest { - private static final Log LOG = LogFactory.getLog(PublishOnTopicConsumedMessageTest.class); + private static final Logger LOG = LoggerFactory.getLogger(PublishOnTopicConsumedMessageTest.class); private MessageProducer replyProducer; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java index 98ea88ac9c..112e8cf808 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java @@ -21,8 +21,8 @@ import java.io.File; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.xbean.BrokerFactoryBean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; @@ -33,7 +33,7 @@ import org.springframework.core.io.Resource; */ public class PublishOnTopicConsumerMessageUsingActivemqXMLTest extends PublishOnTopicConsumedMessageTest { protected static final String JOURNAL_ROOT = "../data/"; - private static final transient Log LOG = LogFactory.getLog(PublishOnTopicConsumerMessageUsingActivemqXMLTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(PublishOnTopicConsumerMessageUsingActivemqXMLTest.class); BrokerService broker; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/QueueDuplicatesTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/QueueDuplicatesTest.java index 43b89b889f..1084ce9457 100755 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/QueueDuplicatesTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/QueueDuplicatesTest.java @@ -37,12 +37,12 @@ import javax.jms.TextMessage; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class QueueDuplicatesTest extends TestCase { - private static final Log LOG = LogFactory.getLog(QueueDuplicatesTest.class); + private static final Logger LOG = LoggerFactory.getLogger(QueueDuplicatesTest.class); private static DateFormat formatter = new SimpleDateFormat("HH:mm:ss SSS"); private String brokerUrl; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/QueueRepeaterTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/QueueRepeaterTest.java index 3445a01df1..85316312c6 100755 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/QueueRepeaterTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/QueueRepeaterTest.java @@ -33,8 +33,8 @@ import javax.jms.TextMessage; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author pragmasoft @@ -42,7 +42,7 @@ import org.apache.commons.logging.LogFactory; */ public final class QueueRepeaterTest extends TestCase { - private static final Log LOG = LogFactory.getLog(QueueRepeaterTest.class); + private static final Logger LOG = LoggerFactory.getLogger(QueueRepeaterTest.class); private volatile String receivedText; @@ -83,10 +83,10 @@ public final class QueueRepeaterTest extends TestCase { consumerSession.rollback(); LOG.info("rolled back transaction"); } catch (JMSException e1) { - LOG.info(e1); + LOG.info(e1.toString()); e1.printStackTrace(); } - LOG.info(e); + LOG.info(e.toString()); e.printStackTrace(); } } diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/SubscribeClosePublishThenConsumeTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/SubscribeClosePublishThenConsumeTest.java index fa74878089..903cb11c3d 100755 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/SubscribeClosePublishThenConsumeTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/SubscribeClosePublishThenConsumeTest.java @@ -27,15 +27,15 @@ import javax.jms.TopicSubscriber; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.test.TestSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author Paul Smith * @version $Revision: 1.1.1.1 $ */ public class SubscribeClosePublishThenConsumeTest extends TestSupport { - private static final Log LOG = LogFactory.getLog(SubscribeClosePublishThenConsumeTest.class); + private static final Logger LOG = LoggerFactory.getLogger(SubscribeClosePublishThenConsumeTest.class); public void testDurableTopic() throws Exception { ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://locahost"); diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/TestSupport.java b/activemq-core/src/test/java/org/apache/activemq/usecases/TestSupport.java index 31e7a48b80..bc578101f0 100755 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/TestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/TestSupport.java @@ -27,8 +27,8 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Useful base class for unit test cases @@ -37,7 +37,7 @@ import org.apache.commons.logging.LogFactory; */ public class TestSupport extends TestCase { - private static final Log LOG = LogFactory.getLog(TestSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(TestSupport.class); protected ActiveMQConnectionFactory connectionFactory; protected boolean topic = true; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkTest.java index 9101254427..10a24170e3 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkTest.java @@ -37,14 +37,14 @@ import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ConsumerInfo; import org.apache.activemq.command.MessageDispatch; import org.apache.activemq.util.MessageIdList; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1.1.1 $ */ public class ThreeBrokerQueueNetworkTest extends JmsMultipleBrokersTestSupport { - private static final Log LOG = LogFactory.getLog(ThreeBrokerQueueNetworkTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ThreeBrokerQueueNetworkTest.class); protected static final int MESSAGE_COUNT = 100; private static final long MAX_WAIT_MILLIS = 10000; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerStompTemporaryQueueTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerStompTemporaryQueueTest.java index ab0f28d839..89a76f3e62 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerStompTemporaryQueueTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerStompTemporaryQueueTest.java @@ -30,12 +30,12 @@ import org.apache.activemq.store.kahadb.KahaDBStore; import org.apache.activemq.transport.stomp.Stomp; import org.apache.activemq.transport.stomp.StompConnection; import org.apache.activemq.transport.stomp.StompFrame; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ThreeBrokerStompTemporaryQueueTest extends JmsMultipleBrokersTestSupport { - private static final Log LOG = LogFactory.getLog(ThreeBrokerStompTemporaryQueueTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ThreeBrokerStompTemporaryQueueTest.class); private StompConnection stompConnection; protected NetworkConnector bridgeBrokers(BrokerService localBroker, BrokerService remoteBroker, boolean dynamicOnly, int networkTTL, boolean conduit, boolean failover) throws Exception { @@ -177,4 +177,4 @@ public class ThreeBrokerStompTemporaryQueueTest extends JmsMultipleBrokersTestSu broker.setPersistenceAdapter(kaha); } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkTest.java index 40ed53fe09..a8e8f5046d 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkTest.java @@ -32,12 +32,12 @@ import org.apache.activemq.broker.region.virtual.VirtualTopic; import org.apache.activemq.network.NetworkConnector; import org.apache.activemq.store.kahadb.KahaDBStore; import org.apache.activemq.util.MessageIdList; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ThreeBrokerVirtualTopicNetworkTest extends JmsMultipleBrokersTestSupport { - private static final Log LOG = LogFactory.getLog(ThreeBrokerVirtualTopicNetworkTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ThreeBrokerVirtualTopicNetworkTest.class); protected static final int MESSAGE_COUNT = 1; public boolean dynamicOnly = false; @@ -183,4 +183,4 @@ public class ThreeBrokerVirtualTopicNetworkTest extends JmsMultipleBrokersTestSu broker.setPersistenceAdapter(kaha); } -} \ No newline at end of file +} diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java index 5550a52d50..b3eaf4b958 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java @@ -33,11 +33,11 @@ import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class TopicProducerFlowControlTest extends TestCase implements MessageListener { - private static final Log LOG = LogFactory.getLog(TopicProducerFlowControlTest.class); + private static final Logger LOG = LoggerFactory.getLogger(TopicProducerFlowControlTest.class); private static final String brokerName = "testBroker"; private static final String brokerUrl = "vm://" + brokerName; private static final int destinationMemLimit = 2097152; // 2MB diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/TopicRedeliverTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/TopicRedeliverTest.java index cc80907448..a78d9d29f0 100755 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/TopicRedeliverTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/TopicRedeliverTest.java @@ -31,15 +31,15 @@ import javax.jms.Topic; import org.apache.activemq.test.TestSupport; import org.apache.activemq.util.IdGenerator; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1.1.1 $ */ public class TopicRedeliverTest extends TestSupport { - private static final Log LOG = LogFactory.getLog(TopicRedeliverTest.class); + private static final Logger LOG = LoggerFactory.getLogger(TopicRedeliverTest.class); private static final int RECEIVE_TIMEOUT = 10000; protected int deliveryMode = DeliveryMode.PERSISTENT; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionRollbackOrderTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionRollbackOrderTest.java index 9fffd1eb62..bdd1e2232a 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionRollbackOrderTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionRollbackOrderTest.java @@ -33,8 +33,8 @@ import javax.jms.TextMessage; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Test case for AMQ-268 @@ -43,7 +43,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.1 $ */ public final class TransactionRollbackOrderTest extends TestCase { - private static final Log LOG = LogFactory.getLog(TransactionRollbackOrderTest.class); + private static final Logger LOG = LoggerFactory.getLogger(TransactionRollbackOrderTest.class); private volatile String receivedText; @@ -108,10 +108,10 @@ public final class TransactionRollbackOrderTest extends TestCase { consumerSession.rollback(); LOG.info("rolled back transaction"); } catch (JMSException e1) { - LOG.info(e1); + LOG.info(e1.toString()); e1.printStackTrace(); } - LOG.info(e); + LOG.info(e.toString()); e.printStackTrace(); } } diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionTest.java index e7495d7814..89e6bd8a80 100755 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionTest.java @@ -34,8 +34,8 @@ import javax.jms.TextMessage; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author pragmasoft @@ -43,7 +43,7 @@ import org.apache.commons.logging.LogFactory; */ public final class TransactionTest extends TestCase { - private static final Log LOG = LogFactory.getLog(TransactionTest.class); + private static final Logger LOG = LoggerFactory.getLogger(TransactionTest.class); private volatile String receivedText; @@ -84,10 +84,10 @@ public final class TransactionTest extends TestCase { consumerSession.rollback(); LOG.info("rolled back transaction"); } catch (JMSException e1) { - LOG.info(e1); + LOG.info(e1.toString()); e1.printStackTrace(); } - LOG.info(e); + LOG.info(e.toString()); e.printStackTrace(); } } diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkLoadBalanceTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkLoadBalanceTest.java index 4a2e41061a..e773db288b 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkLoadBalanceTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkLoadBalanceTest.java @@ -24,11 +24,11 @@ import javax.jms.MessageConsumer; import org.apache.activemq.JmsMultipleBrokersTestSupport; import org.apache.activemq.util.MessageIdList; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class TwoBrokerNetworkLoadBalanceTest extends JmsMultipleBrokersTestSupport { - protected static final Log LOG = LogFactory.getLog(TwoBrokerNetworkLoadBalanceTest.class); + protected static final Logger LOG = LoggerFactory.getLogger(TwoBrokerNetworkLoadBalanceTest.class); public void testLoadBalancing() throws Exception { bridgeBrokers("BrokerA", "BrokerB"); bridgeBrokers("BrokerB", "BrokerA"); diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueClientsReconnectTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueClientsReconnectTest.java index 9eb4bbf627..45a88f0012 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueClientsReconnectTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueClientsReconnectTest.java @@ -27,8 +27,8 @@ import javax.jms.Session; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQPrefetchPolicy; import org.apache.activemq.JmsMultipleBrokersTestSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1.1.1 $ @@ -36,7 +36,7 @@ import org.apache.commons.logging.LogFactory; public class TwoBrokerQueueClientsReconnectTest extends JmsMultipleBrokersTestSupport { protected static final int MESSAGE_COUNT = 100; // Best if a factor of 100 protected static final int PREFETCH_COUNT = 1; - private static final Log LOG = LogFactory.getLog(TwoBrokerQueueClientsReconnectTest.class); + private static final Logger LOG = LoggerFactory.getLogger(TwoBrokerQueueClientsReconnectTest.class); protected int msgsClient1; diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveTest.java index cbc65e9a07..558ad09e09 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveTest.java @@ -27,15 +27,15 @@ import org.apache.activemq.broker.BrokerService; import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest; import org.apache.activemq.util.ServiceSupport; import org.apache.activemq.xbean.BrokerFactoryBean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.core.io.ClassPathResource; /** * @version $Revision: 1.1.1.1 $ */ public class TwoBrokerTopicSendReceiveTest extends JmsTopicSendReceiveWithTwoConnectionsTest { - private static final Log LOG = LogFactory.getLog(TwoBrokerTopicSendReceiveTest.class); + private static final Logger LOG = LoggerFactory.getLogger(TwoBrokerTopicSendReceiveTest.class); protected ActiveMQConnectionFactory sendFactory; protected ActiveMQConnectionFactory receiveFactory; diff --git a/activemq-core/src/test/java/org/apache/activemq/util/ConsumerThread.java b/activemq-core/src/test/java/org/apache/activemq/util/ConsumerThread.java index 15d0087a28..bfa1d96dea 100644 --- a/activemq-core/src/test/java/org/apache/activemq/util/ConsumerThread.java +++ b/activemq-core/src/test/java/org/apache/activemq/util/ConsumerThread.java @@ -16,14 +16,14 @@ */ package org.apache.activemq.util; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.jms.*; public class ConsumerThread extends Thread { - private static final Log LOG = LogFactory.getLog(ConsumerThread.class); + private static final Logger LOG = LoggerFactory.getLogger(ConsumerThread.class); int messageCount = 1000; int received = 0; diff --git a/activemq-core/src/test/java/org/apache/activemq/util/LRUCacheTest.java b/activemq-core/src/test/java/org/apache/activemq/util/LRUCacheTest.java index ea0850dd0f..0dd5e31db5 100644 --- a/activemq-core/src/test/java/org/apache/activemq/util/LRUCacheTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/util/LRUCacheTest.java @@ -18,12 +18,12 @@ package org.apache.activemq.util; import static org.junit.Assert.assertEquals; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.Test; public class LRUCacheTest { - protected static final Log LOG = LogFactory.getLog(LRUCacheTest.class); + protected static final Logger LOG = LoggerFactory.getLogger(LRUCacheTest.class); @Test public void testResize() throws Exception { diff --git a/activemq-core/src/test/java/org/apache/activemq/util/MessageIdList.java b/activemq-core/src/test/java/org/apache/activemq/util/MessageIdList.java index df3bfc9802..c9d2fa0ead 100644 --- a/activemq-core/src/test/java/org/apache/activemq/util/MessageIdList.java +++ b/activemq-core/src/test/java/org/apache/activemq/util/MessageIdList.java @@ -26,8 +26,8 @@ import javax.jms.MessageListener; import junit.framework.Assert; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A simple container of messages for performing testing and rendezvous style @@ -42,7 +42,7 @@ import org.apache.commons.logging.LogFactory; */ public class MessageIdList extends Assert implements MessageListener { - private static final Log LOG = LogFactory.getLog(MessageIdList.class); + private static final Logger LOG = LoggerFactory.getLogger(MessageIdList.class); private List messageIds = new ArrayList(); private Object semaphore; diff --git a/activemq-core/src/test/java/org/apache/activemq/util/ProducerThread.java b/activemq-core/src/test/java/org/apache/activemq/util/ProducerThread.java index 8b8762d0e3..c7cf90dbcf 100644 --- a/activemq-core/src/test/java/org/apache/activemq/util/ProducerThread.java +++ b/activemq-core/src/test/java/org/apache/activemq/util/ProducerThread.java @@ -16,14 +16,14 @@ */ package org.apache.activemq.util; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.jms.*; public class ProducerThread extends Thread { - private static final Log LOG = LogFactory.getLog(ProducerThread.class); + private static final Logger LOG = LoggerFactory.getLogger(ProducerThread.class); int messageCount = 1000; Destination dest; diff --git a/activemq-core/src/test/java/org/apache/activemq/util/SocketProxy.java b/activemq-core/src/test/java/org/apache/activemq/util/SocketProxy.java index a7653bd0e3..adb0d8c884 100644 --- a/activemq-core/src/test/java/org/apache/activemq/util/SocketProxy.java +++ b/activemq-core/src/test/java/org/apache/activemq/util/SocketProxy.java @@ -33,12 +33,12 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class SocketProxy { - private static final transient Log LOG = LogFactory.getLog(SocketProxy.class); + private static final transient Logger LOG = LoggerFactory.getLogger(SocketProxy.class); public static final int ACCEPT_TIMEOUT_MILLIS = 100; diff --git a/activemq-core/src/test/java/org/apache/activemq/xbean/ConnectorXBeanConfigTest.java b/activemq-core/src/test/java/org/apache/activemq/xbean/ConnectorXBeanConfigTest.java index 0d6ae511bf..8dac833aa9 100644 --- a/activemq-core/src/test/java/org/apache/activemq/xbean/ConnectorXBeanConfigTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/xbean/ConnectorXBeanConfigTest.java @@ -35,15 +35,15 @@ import org.apache.activemq.broker.TransportConnector; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.network.NetworkConnector; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1 $ */ public class ConnectorXBeanConfigTest extends TestCase { - private static final Log LOG = LogFactory.getLog(ConnectorXBeanConfigTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ConnectorXBeanConfigTest.class); protected BrokerService brokerService; public void testConnectorConfiguredCorrectly() throws Exception { diff --git a/activemq-core/src/test/java/org/apache/activemq/xbean/ManagementContextXBeanConfigTest.java b/activemq-core/src/test/java/org/apache/activemq/xbean/ManagementContextXBeanConfigTest.java index d06e621c73..c0a0caad4c 100644 --- a/activemq-core/src/test/java/org/apache/activemq/xbean/ManagementContextXBeanConfigTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/xbean/ManagementContextXBeanConfigTest.java @@ -32,8 +32,8 @@ import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; import junit.framework.TestCase; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1 $ @@ -41,7 +41,7 @@ import org.apache.commons.logging.LogFactory; public class ManagementContextXBeanConfigTest extends TestCase { protected BrokerService brokerService; - private static final transient Log LOG = LogFactory.getLog(ManagementContextXBeanConfigTest.class); + private static final transient Logger LOG = LoggerFactory.getLogger(ManagementContextXBeanConfigTest.class); public void testManagmentContextConfiguredCorrectly() throws Exception { assertEquals(2011, brokerService.getManagementContext().getConnectorPort()); diff --git a/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithEmbeddedBrokerTest.java b/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithEmbeddedBrokerTest.java index b4b7ecdb6f..62e2b7a298 100644 --- a/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithEmbeddedBrokerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithEmbeddedBrokerTest.java @@ -20,8 +20,8 @@ import javax.jms.Connection; import org.apache.activemq.EmbeddedBrokerTestSupport; import org.apache.activemq.test.retroactive.RetroactiveConsumerWithMessageQueryTest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @@ -29,7 +29,7 @@ import org.apache.commons.logging.LogFactory; * @version $Revision$ */ public class MultipleTestsWithEmbeddedBrokerTest extends EmbeddedBrokerTestSupport { - private static final Log LOG = LogFactory.getLog(MultipleTestsWithEmbeddedBrokerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(MultipleTestsWithEmbeddedBrokerTest.class); protected Connection connection; diff --git a/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringFactoryBeanTest.java b/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringFactoryBeanTest.java index fc12c36e74..1d672e201c 100644 --- a/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringFactoryBeanTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringFactoryBeanTest.java @@ -23,8 +23,8 @@ import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -35,7 +35,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; */ public class MultipleTestsWithSpringFactoryBeanTest extends TestCase { - private static final Log LOG = LogFactory.getLog(MultipleTestsWithSpringFactoryBeanTest.class); + private static final Logger LOG = LoggerFactory.getLogger(MultipleTestsWithSpringFactoryBeanTest.class); protected AbstractApplicationContext context; protected BrokerService service; diff --git a/activemq-core/src/test/java/org/apache/activemq/xbean/XBeanConfigTest.java b/activemq-core/src/test/java/org/apache/activemq/xbean/XBeanConfigTest.java index fc6ac58c19..5acd4923ed 100644 --- a/activemq-core/src/test/java/org/apache/activemq/xbean/XBeanConfigTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/xbean/XBeanConfigTest.java @@ -32,15 +32,15 @@ import org.apache.activemq.broker.region.policy.TimedSubscriptionRecoveryPolicy; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.command.ConnectionId; import org.apache.activemq.command.ConnectionInfo; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1 $ */ public class XBeanConfigTest extends TestCase { - private static final Log LOG = LogFactory.getLog(XBeanConfigTest.class); + private static final Logger LOG = LoggerFactory.getLogger(XBeanConfigTest.class); protected BrokerService brokerService; protected Broker broker; diff --git a/activemq-fileserver/pom.xml b/activemq-fileserver/pom.xml index c05c62d548..dd8194aa6d 100755 --- a/activemq-fileserver/pom.xml +++ b/activemq-fileserver/pom.xml @@ -61,8 +61,8 @@ - commons-logging - commons-logging-api + org.slf4j + slf4j-api @@ -98,6 +98,18 @@ jetty-all-server test + + + org.slf4j + slf4j-log4j12 + test + + + log4j + log4j + true + test + diff --git a/activemq-fileserver/src/main/java/org/apache/activemq/util/FilenameGuardFilter.java b/activemq-fileserver/src/main/java/org/apache/activemq/util/FilenameGuardFilter.java index b840db8739..099fa414a2 100644 --- a/activemq-fileserver/src/main/java/org/apache/activemq/util/FilenameGuardFilter.java +++ b/activemq-fileserver/src/main/java/org/apache/activemq/util/FilenameGuardFilter.java @@ -27,13 +27,13 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class FilenameGuardFilter implements Filter { - private static final Log LOG = LogFactory.getLog(FilenameGuardFilter.class); + private static final Logger LOG = LoggerFactory.getLogger(FilenameGuardFilter.class); public void destroy() { // nothing to destroy diff --git a/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java b/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java index d41de8cf8a..9c19f5b80d 100644 --- a/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java +++ b/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java @@ -36,8 +36,8 @@ import javax.servlet.UnavailableException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** @@ -50,7 +50,7 @@ import org.apache.commons.logging.LogFactory; * @author Aleksi Kallio */ public class RestFilter implements Filter { - private static final Log LOG = LogFactory.getLog(RestFilter.class); + private static final Logger LOG = LoggerFactory.getLogger(RestFilter.class); private static final String HTTP_HEADER_DESTINATION = "Destination"; private static final String HTTP_METHOD_MOVE = "MOVE"; diff --git a/activemq-fileserver/src/test/java/org/apache/activemq/util/HttpTestSupport.java b/activemq-fileserver/src/test/java/org/apache/activemq/util/HttpTestSupport.java index a44c9538e6..2d9c65efba 100644 --- a/activemq-fileserver/src/test/java/org/apache/activemq/util/HttpTestSupport.java +++ b/activemq-fileserver/src/test/java/org/apache/activemq/util/HttpTestSupport.java @@ -30,15 +30,15 @@ import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.eclipse.jetty.webapp.WebAppContext; public abstract class HttpTestSupport extends TestCase { - private static final Log LOG = LogFactory.getLog(HttpTestSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(HttpTestSupport.class); BrokerService broker; Server server; diff --git a/activemq-jaas/pom.xml b/activemq-jaas/pom.xml index ed4d35cc0e..c37f6f1a5e 100644 --- a/activemq-jaas/pom.xml +++ b/activemq-jaas/pom.xml @@ -69,10 +69,6 @@ - - commons-logging - commons-logging - commons-collections commons-collections @@ -106,17 +102,15 @@ log4j log4j + test org.slf4j slf4j-api - ${nlog4j-version} - test org.slf4j slf4j-log4j12 - ${nlog4j-version} test diff --git a/activemq-jaas/src/main/java/org/apache/activemq/jaas/CertificateLoginModule.java b/activemq-jaas/src/main/java/org/apache/activemq/jaas/CertificateLoginModule.java index 30ae4faf45..130829dba8 100644 --- a/activemq-jaas/src/main/java/org/apache/activemq/jaas/CertificateLoginModule.java +++ b/activemq-jaas/src/main/java/org/apache/activemq/jaas/CertificateLoginModule.java @@ -33,8 +33,8 @@ import javax.security.auth.login.FailedLoginException; import javax.security.auth.login.LoginException; import javax.security.auth.spi.LoginModule; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A LoginModule that allows for authentication based on SSL certificates. @@ -45,7 +45,7 @@ import org.apache.commons.logging.LogFactory; */ public abstract class CertificateLoginModule implements LoginModule { - private static final Log LOG = LogFactory.getLog(CertificateLoginModule.class); + private static final Logger LOG = LoggerFactory.getLogger(CertificateLoginModule.class); private CallbackHandler callbackHandler; private Subject subject; diff --git a/activemq-jaas/src/main/java/org/apache/activemq/jaas/GuestLoginModule.java b/activemq-jaas/src/main/java/org/apache/activemq/jaas/GuestLoginModule.java index ed8edba1ef..394f91b422 100644 --- a/activemq-jaas/src/main/java/org/apache/activemq/jaas/GuestLoginModule.java +++ b/activemq-jaas/src/main/java/org/apache/activemq/jaas/GuestLoginModule.java @@ -17,8 +17,8 @@ package org.apache.activemq.jaas; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.security.auth.Subject; import javax.security.auth.callback.CallbackHandler; @@ -41,7 +41,7 @@ public class GuestLoginModule implements LoginModule { private static final String GUEST_USER = "org.apache.activemq.jaas.guest.user"; private static final String GUEST_GROUP = "org.apache.activemq.jaas.guest.group"; - private static final Log LOG = LogFactory.getLog(GuestLoginModule.class); + private static final Logger LOG = LoggerFactory.getLogger(GuestLoginModule.class); private String userName = "guest"; @@ -101,4 +101,4 @@ public class GuestLoginModule implements LoginModule { } return true; } -} \ No newline at end of file +} diff --git a/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java b/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java index 5b895f35e8..285397fe63 100644 --- a/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java +++ b/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java @@ -49,8 +49,8 @@ import javax.security.auth.login.FailedLoginException; import javax.security.auth.login.LoginException; import javax.security.auth.spi.LoginModule; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Rev: $ $Date: $ @@ -72,7 +72,7 @@ public class LDAPLoginModule implements LoginModule { private static final String ROLE_SEARCH_SUBTREE = "roleSearchSubtree"; private static final String USER_ROLE_NAME = "userRoleName"; - private static Log log = LogFactory.getLog(LDAPLoginModule.class); + private static Logger log = LoggerFactory.getLogger(LDAPLoginModule.class); protected DirContext context; @@ -165,7 +165,7 @@ public class LDAPLoginModule implements LoginModule { try { context.close(); } catch (Exception e) { - log.error(e); + log.error(e.toString()); } } @@ -382,7 +382,7 @@ public class LDAPLoginModule implements LoginModule { context = new InitialDirContext(env); } catch (NamingException e) { - log.error(e); + log.error(e.toString()); throw e; } return context; diff --git a/activemq-jaas/src/main/java/org/apache/activemq/jaas/PropertiesLoginModule.java b/activemq-jaas/src/main/java/org/apache/activemq/jaas/PropertiesLoginModule.java index 38363cd7d4..268e85d039 100644 --- a/activemq-jaas/src/main/java/org/apache/activemq/jaas/PropertiesLoginModule.java +++ b/activemq-jaas/src/main/java/org/apache/activemq/jaas/PropertiesLoginModule.java @@ -35,8 +35,8 @@ import javax.security.auth.login.FailedLoginException; import javax.security.auth.login.LoginException; import javax.security.auth.spi.LoginModule; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Rev: $ $Date: $ @@ -46,7 +46,7 @@ public class PropertiesLoginModule implements LoginModule { private static final String USER_FILE = "org.apache.activemq.jaas.properties.user"; private static final String GROUP_FILE = "org.apache.activemq.jaas.properties.group"; - private static final Log LOG = LogFactory.getLog(PropertiesLoginModule.class); + private static final Logger LOG = LoggerFactory.getLogger(PropertiesLoginModule.class); private Subject subject; private CallbackHandler callbackHandler; diff --git a/activemq-optional/pom.xml b/activemq-optional/pom.xml index 88b9189c4a..f389700e22 100755 --- a/activemq-optional/pom.xml +++ b/activemq-optional/pom.xml @@ -124,7 +124,7 @@ commons-collections commons-collections - + commons-logging commons-logging @@ -171,6 +171,11 @@ compile true + + org.slf4j + slf4j-log4j12 + test + org.springframework.ws spring-oxm-tiger diff --git a/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/DiscoveryRegistryServlet.java b/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/DiscoveryRegistryServlet.java index 970739d30c..1d85ccba14 100644 --- a/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/DiscoveryRegistryServlet.java +++ b/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/DiscoveryRegistryServlet.java @@ -27,12 +27,12 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class DiscoveryRegistryServlet extends HttpServlet { - private static final Log LOG = LogFactory.getLog(HTTPDiscoveryAgent.class); + private static final Logger LOG = LoggerFactory.getLogger(HTTPDiscoveryAgent.class); long maxKeepAge = 1000*60*60; // 1 hour. ConcurrentHashMap> serviceGroups = new ConcurrentHashMap>(); diff --git a/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/HTTPDiscoveryAgent.java b/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/HTTPDiscoveryAgent.java index 46e2328bd1..97c8e15ae1 100644 --- a/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/HTTPDiscoveryAgent.java +++ b/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/HTTPDiscoveryAgent.java @@ -35,12 +35,12 @@ import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.methods.DeleteMethod; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.methods.PutMethod; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class HTTPDiscoveryAgent implements DiscoveryAgent { - private static final Log LOG = LogFactory.getLog(HTTPDiscoveryAgent.class); + private static final Logger LOG = LoggerFactory.getLogger(HTTPDiscoveryAgent.class); private String registryURL = "http://localhost:8080/discovery-registry/default"; private HttpClient httpClient = new HttpClient(); diff --git a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java index d053b395e8..493d3dba83 100755 --- a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java +++ b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java @@ -36,8 +36,8 @@ import org.apache.commons.httpclient.methods.HeadMethod; import org.apache.commons.httpclient.methods.InputStreamRequestEntity; import org.apache.commons.httpclient.methods.PostMethod; import org.apache.commons.httpclient.params.HttpClientParams; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A HTTP {@link org.apache.activemq.transport.TransportChannel} which uses the @@ -49,7 +49,7 @@ import org.apache.commons.logging.LogFactory; public class HttpClientTransport extends HttpTransportSupport { public static final int MAX_CLIENT_TIMEOUT = 30000; - private static final Log LOG = LogFactory.getLog(HttpClientTransport.class); + private static final Logger LOG = LoggerFactory.getLogger(HttpClientTransport.class); private static final IdGenerator CLIENT_ID_GENERATOR = new IdGenerator(); private HttpClient sendHttpClient; diff --git a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java index c5f1b868a8..50d7bd9e7d 100755 --- a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java +++ b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java @@ -33,8 +33,8 @@ import org.apache.activemq.util.ByteSequence; import org.apache.activemq.util.Callback; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.ServiceStopper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ @@ -44,7 +44,7 @@ import org.apache.commons.logging.LogFactory; @Deprecated public class HttpTransport extends HttpTransportSupport { - private static final Log LOG = LogFactory.getLog(HttpTransport.class); + private static final Logger LOG = LoggerFactory.getLogger(HttpTransport.class); private HttpURLConnection sendConnection; private HttpURLConnection receiveConnection; diff --git a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportFactory.java b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportFactory.java index 626be29d38..9903db12fe 100755 --- a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportFactory.java +++ b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportFactory.java @@ -35,8 +35,8 @@ import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.URISupport; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (logging improvement modifications) @@ -44,7 +44,7 @@ import org.apache.commons.logging.LogFactory; */ public class HttpTransportFactory extends TransportFactory { - private static final Log LOG = LogFactory.getLog(HttpTransportFactory.class); + private static final Logger LOG = LoggerFactory.getLogger(HttpTransportFactory.class); public TransportServer doBind(URI location) throws IOException { try { diff --git a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTunnelServlet.java b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTunnelServlet.java index 0f8087a8fe..1c9e0f8267 100755 --- a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTunnelServlet.java +++ b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTunnelServlet.java @@ -39,8 +39,8 @@ import org.apache.activemq.transport.util.TextWireFormat; import org.apache.activemq.transport.xstream.XStreamWireFormat; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.ServiceListener; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A servlet which handles server side HTTP transport, delegating to the @@ -51,7 +51,7 @@ import org.apache.commons.logging.LogFactory; */ public class HttpTunnelServlet extends HttpServlet { private static final long serialVersionUID = -3826714430767484333L; - private static final Log LOG = LogFactory.getLog(HttpTunnelServlet.class); + private static final Logger LOG = LoggerFactory.getLogger(HttpTunnelServlet.class); private TransportAcceptListener listener; private HttpTransportFactory transportFactory; diff --git a/activemq-optional/src/test/java/org/apache/activemq/bugs/AMQ2764Test.java b/activemq-optional/src/test/java/org/apache/activemq/bugs/AMQ2764Test.java index c6786a41e9..dbbfef09c5 100644 --- a/activemq-optional/src/test/java/org/apache/activemq/bugs/AMQ2764Test.java +++ b/activemq-optional/src/test/java/org/apache/activemq/bugs/AMQ2764Test.java @@ -32,12 +32,12 @@ import org.apache.activemq.advisory.ConsumerListener; import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class AMQ2764Test extends TestCase { - private static final Log LOG = LogFactory.getLog(AMQ2764Test.class); + private static final Logger LOG = LoggerFactory.getLogger(AMQ2764Test.class); private BrokerService brokerOne; private BrokerService brokerTwo; diff --git a/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpClientReconnectTest.java b/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpClientReconnectTest.java index 4ebc8fd0b3..a7a47d2055 100644 --- a/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpClientReconnectTest.java +++ b/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpClientReconnectTest.java @@ -35,13 +35,20 @@ public class HttpClientReconnectTest extends TestCase { ActiveMQConnectionFactory factory; protected void setUp() throws Exception { + System.setProperty("javax.net.ssl.trustStore", "src/test/resources/client.keystore"); + System.setProperty("javax.net.ssl.trustStorePassword", "password"); + System.setProperty("javax.net.ssl.trustStoreType", "jks"); + System.setProperty("javax.net.ssl.keyStore", "src/test/resources/server.keystore"); + System.setProperty("javax.net.ssl.keyStorePassword", "password"); + System.setProperty("javax.net.ssl.keyStoreType", "jks"); + broker = new BrokerService(); - broker.addConnector("http://localhost:61666?trace=true"); + broker.addConnector("https://localhost:61666?trace=true"); broker.setPersistent(false); broker.setUseJmx(false); broker.deleteAllMessages(); broker.start(); - factory = new ActiveMQConnectionFactory("http://localhost:61666?trace=true"); + factory = new ActiveMQConnectionFactory("https://localhost:61666?trace=true&soTimeout=1000"); } protected void tearDown() throws Exception { diff --git a/activemq-optional/src/test/java/org/apache/activemq/transport/http/WaitForJettyListener.java b/activemq-optional/src/test/java/org/apache/activemq/transport/http/WaitForJettyListener.java index 028bb30b28..dfac62787a 100644 --- a/activemq-optional/src/test/java/org/apache/activemq/transport/http/WaitForJettyListener.java +++ b/activemq-optional/src/test/java/org/apache/activemq/transport/http/WaitForJettyListener.java @@ -22,13 +22,13 @@ import java.net.URL; import javax.net.SocketFactory; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import static junit.framework.Assert.assertTrue; public class WaitForJettyListener { - private static final Log LOG = LogFactory.getLog(WaitForJettyListener.class); + private static final Logger LOG = LoggerFactory.getLogger(WaitForJettyListener.class); public static void waitForJettySocketToAccept(String bindLocation) throws Exception { final URL url = new URL(bindLocation); diff --git a/activemq-optional/src/test/java/org/apache/activemq/transport/xstream/XStreamWireFormatTest.java b/activemq-optional/src/test/java/org/apache/activemq/transport/xstream/XStreamWireFormatTest.java index 8968443c7c..58538bce39 100755 --- a/activemq-optional/src/test/java/org/apache/activemq/transport/xstream/XStreamWireFormatTest.java +++ b/activemq-optional/src/test/java/org/apache/activemq/transport/xstream/XStreamWireFormatTest.java @@ -21,14 +21,14 @@ import java.io.IOException; import org.apache.activemq.command.Command; import org.apache.activemq.command.MessageTest; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ */ public class XStreamWireFormatTest extends MessageTest { - private static final Log LOG = LogFactory.getLog(XStreamWireFormatTest.class); + private static final Logger LOG = LoggerFactory.getLogger(XStreamWireFormatTest.class); public void assertBeanMarshalls(Object original) throws IOException { super.assertBeanMarshalls(original); diff --git a/activemq-pool/pom.xml b/activemq-pool/pom.xml index 04b4955474..a5396e900d 100755 --- a/activemq-pool/pom.xml +++ b/activemq-pool/pom.xml @@ -48,8 +48,8 @@ - commons-logging - commons-logging-api + org.slf4j + slf4j-api ${project.groupId} @@ -89,6 +89,11 @@ junit test + + org.slf4j + slf4j-log4j12 + test + log4j log4j diff --git a/activemq-pool/src/main/java/org/apache/activemq/pool/ActiveMQResourceManager.java b/activemq-pool/src/main/java/org/apache/activemq/pool/ActiveMQResourceManager.java index 93b36c54ed..95c3de0483 100644 --- a/activemq-pool/src/main/java/org/apache/activemq/pool/ActiveMQResourceManager.java +++ b/activemq-pool/src/main/java/org/apache/activemq/pool/ActiveMQResourceManager.java @@ -23,8 +23,8 @@ import javax.jms.Session; import javax.jms.JMSException; import javax.transaction.TransactionManager; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQSession; @@ -60,7 +60,7 @@ import org.apache.geronimo.transaction.manager.WrapperNamedXAResource; */ public class ActiveMQResourceManager { - private static final Log LOGGER = LogFactory.getLog(ActiveMQResourceManager.class); + private static final Logger LOGGER = LoggerFactory.getLogger(ActiveMQResourceManager.class); private String resourceName; diff --git a/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java b/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java index 3b4b537eab..0b30c48343 100644 --- a/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java +++ b/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java @@ -28,8 +28,8 @@ import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.Service; import org.apache.activemq.util.IOExceptionSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.commons.pool.ObjectPoolFactory; import org.apache.commons.pool.impl.GenericObjectPoolFactory; @@ -58,7 +58,7 @@ import org.apache.commons.pool.impl.GenericObjectPoolFactory; * @version $Revision: 1.1 $ */ public class PooledConnectionFactory implements ConnectionFactory, Service { - private static final transient Log LOG = LogFactory.getLog(PooledConnectionFactory.class); + private static final transient Logger LOG = LoggerFactory.getLogger(PooledConnectionFactory.class); private ConnectionFactory connectionFactory; private Map> cache = new HashMap>(); private ObjectPoolFactory poolFactory; diff --git a/activemq-pool/src/main/java/org/apache/activemq/pool/PooledSession.java b/activemq-pool/src/main/java/org/apache/activemq/pool/PooledSession.java index 7d4ed81d30..e1ae511ce1 100644 --- a/activemq-pool/src/main/java/org/apache/activemq/pool/PooledSession.java +++ b/activemq-pool/src/main/java/org/apache/activemq/pool/PooledSession.java @@ -51,14 +51,14 @@ import org.apache.activemq.ActiveMQQueueSender; import org.apache.activemq.ActiveMQSession; import org.apache.activemq.ActiveMQTopicPublisher; import org.apache.activemq.AlreadyClosedException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision: 1.1 $ */ public class PooledSession implements Session, TopicSession, QueueSession, XASession { - private static final transient Log LOG = LogFactory.getLog(PooledSession.class); + private static final transient Logger LOG = LoggerFactory.getLogger(PooledSession.class); private ActiveMQSession session; private SessionPool sessionPool; diff --git a/activemq-pool/src/test/java/org/apache/activemq/pool/ConnectionFailureEvictsFromPoolTest.java b/activemq-pool/src/test/java/org/apache/activemq/pool/ConnectionFailureEvictsFromPoolTest.java index 0a2ef78264..c338fa492e 100644 --- a/activemq-pool/src/test/java/org/apache/activemq/pool/ConnectionFailureEvictsFromPoolTest.java +++ b/activemq-pool/src/test/java/org/apache/activemq/pool/ConnectionFailureEvictsFromPoolTest.java @@ -33,11 +33,11 @@ import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.test.TestSupport; import org.apache.activemq.transport.TransportListener; import org.apache.activemq.transport.mock.MockTransport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ConnectionFailureEvictsFromPoolTest extends TestSupport { - private static final Log LOG = LogFactory.getLog(ConnectionFailureEvictsFromPoolTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ConnectionFailureEvictsFromPoolTest.class); private BrokerService broker; private ActiveMQConnectionFactory factory; private PooledConnectionFactory pooledFactory; diff --git a/activemq-ra/pom.xml b/activemq-ra/pom.xml index dadc23acf7..23d60263cb 100755 --- a/activemq-ra/pom.xml +++ b/activemq-ra/pom.xml @@ -74,6 +74,11 @@ junit test + + org.slf4j + slf4j-log4j12 + test + diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java index 1187607dc0..eed974cc36 100755 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java @@ -30,8 +30,8 @@ import javax.resource.Referenceable; import javax.resource.ResourceException; import javax.resource.spi.ConnectionManager; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ @@ -40,7 +40,7 @@ public class ActiveMQConnectionFactory implements ConnectionFactory, QueueConnec private static final long serialVersionUID = -5754338187296859149L; - private static final Log LOG = LogFactory.getLog(ActiveMQConnectionFactory.class); + private static final Logger LOG = LoggerFactory.getLogger(ActiveMQConnectionFactory.class); private ConnectionManager manager; private ActiveMQManagedConnectionFactory factory; private Reference reference; diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java index f9d550a08f..042ab9cd19 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java @@ -19,8 +19,8 @@ package org.apache.activemq.ra; import javax.jms.JMSException; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Abstract base class providing support for creating physical @@ -31,7 +31,7 @@ import org.apache.commons.logging.LogFactory; public class ActiveMQConnectionSupport { private ActiveMQConnectionRequestInfo info = new ActiveMQConnectionRequestInfo(); - protected Log log = LogFactory.getLog(getClass()); + protected Logger log = LoggerFactory.getLogger(getClass()); /** * Creates a factory for obtaining physical connections to an Active MQ diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java index 1d6a7c2087..f07202fba0 100755 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java @@ -37,8 +37,8 @@ import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ $Date$ @@ -46,7 +46,7 @@ import org.apache.commons.logging.LogFactory; public class ActiveMQEndpointWorker { public static final Method ON_MESSAGE_METHOD; - private static final Log LOG = LogFactory.getLog(ActiveMQEndpointWorker.class); + private static final Logger LOG = LoggerFactory.getLogger(ActiveMQEndpointWorker.class); private static final long INITIAL_RECONNECT_DELAY = 1000; // 1 second. private static final long MAX_RECONNECT_DELAY = 1000 * 30; // 30 seconds. diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java index 0ed1667a0a..86be6c11cf 100755 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java @@ -34,8 +34,8 @@ import javax.transaction.xa.XAResource; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.LocalTransactionEventListener; import org.apache.activemq.TransactionContext; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * ActiveMQManagedConnection maps to real physical connection to the server. @@ -55,7 +55,7 @@ public class ActiveMQManagedConnection implements ManagedConnection, ExceptionLi // DissociatableManagedConnection // { - private static final Log LOG = LogFactory.getLog(ActiveMQManagedConnection.class); + private static final Logger LOG = LoggerFactory.getLogger(ActiveMQManagedConnection.class); private PrintWriter logWriter; diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java index 5b8792ca6a..d7cf3f7e5c 100755 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java @@ -33,7 +33,7 @@ import javax.resource.spi.ManagedConnectionFactory; import javax.resource.spi.ResourceAdapter; import javax.resource.spi.ResourceAdapterAssociation; import javax.security.auth.Subject; -import org.apache.commons.logging.LogFactory; +import org.slf4j.LoggerFactory; /** * @version $Revisio n$ TODO: Must override equals and hashCode (JCA spec 16.4) @@ -132,7 +132,7 @@ public class ActiveMQManagedConnectionFactory extends ActiveMQConnectionSupport private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); setInfo((ActiveMQConnectionRequestInfo) in.readObject()); - log = LogFactory.getLog(getClass()); + log = LoggerFactory.getLogger(getClass()); } /** diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/MessageEndpointProxy.java b/activemq-ra/src/main/java/org/apache/activemq/ra/MessageEndpointProxy.java index 575e7cae39..14a2e10fa2 100755 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/MessageEndpointProxy.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/MessageEndpointProxy.java @@ -22,8 +22,8 @@ import javax.jms.Message; import javax.jms.MessageListener; import javax.resource.ResourceException; import javax.resource.spi.endpoint.MessageEndpoint; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author Michael Gaffney @@ -32,7 +32,7 @@ public class MessageEndpointProxy implements MessageListener, MessageEndpoint { private static final MessageEndpointState ALIVE = new MessageEndpointAlive(); private static final MessageEndpointState DEAD = new MessageEndpointDead(); - private static final Log LOG = LogFactory.getLog(MessageEndpointProxy.class); + private static final Logger LOG = LoggerFactory.getLogger(MessageEndpointProxy.class); private static int proxyCount; private final int proxyID; diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java index f59735658c..474d4303bd 100755 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java @@ -34,8 +34,8 @@ import javax.resource.spi.work.WorkManager; import org.apache.activemq.ActiveMQSession; import org.apache.activemq.ActiveMQSession.DeliveryListener; import org.apache.activemq.TransactionContext; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ @@ -57,7 +57,7 @@ public class ServerSessionImpl implements ServerSession, InboundContext, Work, D private int serverSessionId = getNextLogId(); - private final Log log = LogFactory.getLog(ServerSessionImpl.class.getName() + ":" + serverSessionId); + private final Logger log = LoggerFactory.getLogger(ServerSessionImpl.class.getName() + ":" + serverSessionId); private ActiveMQSession session; private WorkManager workManager; diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionPoolImpl.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionPoolImpl.java index 53f5ccfe8d..242dd22eb6 100755 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionPoolImpl.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionPoolImpl.java @@ -34,15 +34,15 @@ import org.apache.activemq.ActiveMQQueueSession; import org.apache.activemq.ActiveMQSession; import org.apache.activemq.ActiveMQTopicSession; import org.apache.activemq.command.MessageDispatch; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Revision$ $Date$ */ public class ServerSessionPoolImpl implements ServerSessionPool { - private static final Log LOG = LogFactory.getLog(ServerSessionPoolImpl.class); + private static final Logger LOG = LoggerFactory.getLogger(ServerSessionPoolImpl.class); private final ActiveMQEndpointWorker activeMQAsfEndpointWorker; private final int maxSessions; diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/SimpleConnectionManager.java b/activemq-ra/src/main/java/org/apache/activemq/ra/SimpleConnectionManager.java index 258a260f93..6c18049aba 100755 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/SimpleConnectionManager.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/SimpleConnectionManager.java @@ -25,8 +25,8 @@ import javax.resource.spi.ManagedConnection; import javax.resource.spi.ManagedConnectionFactory; import javax.security.auth.Subject; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A simple implementation of a ConnectionManager. An Application Server will @@ -38,7 +38,7 @@ public class SimpleConnectionManager implements ConnectionManager, ConnectionEve private static final long serialVersionUID = -7662970495944876239L; - private static final Log LOG = LogFactory.getLog(SimpleConnectionManager.class); + private static final Logger LOG = LoggerFactory.getLogger(SimpleConnectionManager.class); /** * @see javax.resource.spi.ConnectionManager#allocateConnection(javax.resource.spi.ManagedConnectionFactory, diff --git a/activemq-ra/src/test/java/org/apache/activemq/ra/ConnectionManagerAdapter.java b/activemq-ra/src/test/java/org/apache/activemq/ra/ConnectionManagerAdapter.java index b78a390d72..86176472d1 100755 --- a/activemq-ra/src/test/java/org/apache/activemq/ra/ConnectionManagerAdapter.java +++ b/activemq-ra/src/test/java/org/apache/activemq/ra/ConnectionManagerAdapter.java @@ -28,8 +28,8 @@ import javax.resource.spi.ManagedConnection; import javax.resource.spi.ManagedConnectionFactory; import javax.security.auth.Subject; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A simple implementation of a ConnectionManager that can be extended so that @@ -41,7 +41,7 @@ public class ConnectionManagerAdapter implements ConnectionManager, ConnectionEv private static final long serialVersionUID = 5205646563916645831L; - private static final Log LOG = LogFactory.getLog(ConnectionManagerAdapter.class); + private static final Logger LOG = LoggerFactory.getLogger(ConnectionManagerAdapter.class); ArrayList listners = new ArrayList(); ArrayList connections = new ArrayList(); diff --git a/activemq-ra/src/test/java/org/apache/activemq/ra/FailoverManagedClusterTest.java b/activemq-ra/src/test/java/org/apache/activemq/ra/FailoverManagedClusterTest.java index e4beed7ec3..0b549f5500 100644 --- a/activemq-ra/src/test/java/org/apache/activemq/ra/FailoverManagedClusterTest.java +++ b/activemq-ra/src/test/java/org/apache/activemq/ra/FailoverManagedClusterTest.java @@ -49,11 +49,11 @@ import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class FailoverManagedClusterTest extends TestCase { - private static final Log LOG = LogFactory.getLog(FailoverManagedClusterTest.class); + private static final Logger LOG = LoggerFactory.getLogger(FailoverManagedClusterTest.class); long txGenerator = System.currentTimeMillis(); diff --git a/activemq-rar/pom.xml b/activemq-rar/pom.xml index 7277fc76a9..9d4fc3deba 100644 --- a/activemq-rar/pom.xml +++ b/activemq-rar/pom.xml @@ -217,6 +217,11 @@ log4j log4j + + org.slf4j + slf4j-log4j12 + test + org.apache.activemq activemq-all diff --git a/activemq-spring/pom.xml b/activemq-spring/pom.xml index e5b0648da5..62f8bb4aa5 100755 --- a/activemq-spring/pom.xml +++ b/activemq-spring/pom.xml @@ -50,8 +50,8 @@ - commons-logging - commons-logging-api + org.slf4j + slf4j-api ${project.groupId} @@ -120,16 +120,9 @@ 2.2 test - - org.slf4j - slf4j-api - 1.4.3 - test - org.slf4j slf4j-log4j12 - 1.4.3 test diff --git a/activemq-spring/src/main/java/org/apache/activemq/hooks/SpringContextHook.java b/activemq-spring/src/main/java/org/apache/activemq/hooks/SpringContextHook.java index 01bdce155b..5b1fef652b 100644 --- a/activemq-spring/src/main/java/org/apache/activemq/hooks/SpringContextHook.java +++ b/activemq-spring/src/main/java/org/apache/activemq/hooks/SpringContextHook.java @@ -16,8 +16,8 @@ */ package org.apache.activemq.hooks; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.osgi.framework.BundleException; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; @@ -27,7 +27,7 @@ import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext; public class SpringContextHook implements Runnable, ApplicationContextAware { - private static final transient Log LOG = LogFactory.getLog(SpringContextHook.class); + private static final transient Logger LOG = LoggerFactory.getLogger(SpringContextHook.class); ApplicationContext applicationContext; public void run() { diff --git a/activemq-spring/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java b/activemq-spring/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java index 4fcd5ae4a2..bde33a8b34 100644 --- a/activemq-spring/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java +++ b/activemq-spring/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java @@ -21,8 +21,8 @@ import javax.annotation.PreDestroy; import javax.jms.ConnectionFactory; import javax.transaction.TransactionManager; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.commons.pool.ObjectPoolFactory; import org.springframework.beans.factory.FactoryBean; @@ -47,7 +47,7 @@ import org.springframework.beans.factory.FactoryBean; */ public class PooledConnectionFactoryBean implements FactoryBean { - private static final Log LOGGER = LogFactory.getLog(PooledConnectionFactoryBean.class); + private static final Logger LOGGER = LoggerFactory.getLogger(PooledConnectionFactoryBean.class); private PooledConnectionFactory pooledConnectionFactory; private ConnectionFactory connectionFactory; diff --git a/activemq-spring/src/test/java/org/apache/activemq/spring/Listener.java b/activemq-spring/src/test/java/org/apache/activemq/spring/Listener.java index c9438b0273..b1747d98f5 100644 --- a/activemq-spring/src/test/java/org/apache/activemq/spring/Listener.java +++ b/activemq-spring/src/test/java/org/apache/activemq/spring/Listener.java @@ -17,8 +17,8 @@ package org.apache.activemq.spring; import org.apache.activemq.command.ActiveMQTextMessage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.jms.JMSException; import javax.jms.Message; @@ -27,7 +27,7 @@ import java.util.ArrayList; import java.util.List; public class Listener implements MessageListener { - private static final Log LOG = LogFactory.getLog(Listener.class); + private static final Logger LOG = LoggerFactory.getLogger(Listener.class); List messages = new ArrayList(); long lastReceived = 0L; diff --git a/activemq-spring/src/test/java/org/apache/activemq/spring/ListenerTest.java b/activemq-spring/src/test/java/org/apache/activemq/spring/ListenerTest.java index 57b10618c8..bf50b6395c 100644 --- a/activemq-spring/src/test/java/org/apache/activemq/spring/ListenerTest.java +++ b/activemq-spring/src/test/java/org/apache/activemq/spring/ListenerTest.java @@ -16,8 +16,8 @@ */ package org.apache.activemq.spring; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; @@ -34,7 +34,7 @@ import javax.jms.*; @ContextConfiguration(locations = {"classpath:spring/spring.xml"}) @TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = false) public class ListenerTest { - private static final Log LOG = LogFactory.getLog(ListenerTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ListenerTest.class); int msgNum = 10; diff --git a/activemq-spring/src/test/java/org/apache/activemq/spring/ParallelXATransactionTest.java b/activemq-spring/src/test/java/org/apache/activemq/spring/ParallelXATransactionTest.java index 4bde46cb2c..867e87e3be 100644 --- a/activemq-spring/src/test/java/org/apache/activemq/spring/ParallelXATransactionTest.java +++ b/activemq-spring/src/test/java/org/apache/activemq/spring/ParallelXATransactionTest.java @@ -17,8 +17,8 @@ package org.apache.activemq.spring; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; @@ -46,7 +46,7 @@ import java.util.Arrays; @TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = false) public class ParallelXATransactionTest { - private static final Log LOG = LogFactory.getLog(ParallelXATransactionTest.class); + private static final Logger LOG = LoggerFactory.getLogger(ParallelXATransactionTest.class); @Resource(name = "transactionManager") PlatformTransactionManager txManager = null; diff --git a/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQDeadlockTest3.java b/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQDeadlockTest3.java index 48242e6bc2..61da048fef 100644 --- a/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQDeadlockTest3.java +++ b/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQDeadlockTest3.java @@ -45,15 +45,15 @@ import org.apache.activemq.network.NetworkConnector; import org.apache.activemq.pool.PooledConnectionFactory; import org.apache.activemq.usage.SystemUsage; import org.apache.activemq.ActiveMQConnectionFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.jms.core.JmsTemplate; import org.springframework.jms.core.MessageCreator; import org.springframework.jms.listener.DefaultMessageListenerContainer; public class AMQDeadlockTest3 extends org.apache.activemq.test.TestSupport { - private static final transient Log LOG = LogFactory.getLog(AMQDeadlockTest3.class); + private static final transient Logger LOG = LoggerFactory.getLogger(AMQDeadlockTest3.class); private static final String URL1 = "tcp://localhost:61616"; diff --git a/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQDeadlockTestW4Brokers.java b/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQDeadlockTestW4Brokers.java index 5fcfdf56ca..42797c6ac8 100644 --- a/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQDeadlockTestW4Brokers.java +++ b/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQDeadlockTestW4Brokers.java @@ -45,15 +45,15 @@ import org.apache.activemq.network.DiscoveryNetworkConnector; import org.apache.activemq.network.NetworkConnector; import org.apache.activemq.pool.PooledConnectionFactory; import org.apache.activemq.usage.SystemUsage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.jms.core.JmsTemplate; import org.springframework.jms.core.MessageCreator; import org.springframework.jms.listener.DefaultMessageListenerContainer; public class AMQDeadlockTestW4Brokers extends org.apache.activemq.test.TestSupport { - private static final transient Log LOG = LogFactory.getLog(AMQDeadlockTestW4Brokers.class); + private static final transient Logger LOG = LoggerFactory.getLogger(AMQDeadlockTestW4Brokers.class); private static final String BROKER_URL1 = "tcp://localhost:61616"; private static final String BROKER_URL2 = "tcp://localhost:61617"; diff --git a/activemq-spring/src/test/java/org/apache/bugs/AMQ1730Test.java b/activemq-spring/src/test/java/org/apache/bugs/AMQ1730Test.java index 6f85099eb8..63766b28ee 100644 --- a/activemq-spring/src/test/java/org/apache/bugs/AMQ1730Test.java +++ b/activemq-spring/src/test/java/org/apache/bugs/AMQ1730Test.java @@ -20,8 +20,8 @@ package org.apache.bugs; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.jms.listener.DefaultMessageListenerContainer; import javax.jms.Connection; @@ -38,7 +38,7 @@ import java.util.concurrent.CountDownLatch; public class AMQ1730Test extends TestCase { - private static final Log log = LogFactory.getLog(AMQ1730Test.class); + private static final Logger log = LoggerFactory.getLogger(AMQ1730Test.class); private static final String JMSX_DELIVERY_COUNT = "JMSXDeliveryCount"; diff --git a/activemq-spring/src/test/java/org/apache/bugs/LoadBalanceTest.java b/activemq-spring/src/test/java/org/apache/bugs/LoadBalanceTest.java index 362c3f4097..36bdf01490 100644 --- a/activemq-spring/src/test/java/org/apache/bugs/LoadBalanceTest.java +++ b/activemq-spring/src/test/java/org/apache/bugs/LoadBalanceTest.java @@ -38,8 +38,8 @@ import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.network.NetworkConnector; import org.apache.activemq.store.memory.MemoryPersistenceAdapter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.Test; import org.springframework.jms.connection.CachingConnectionFactory; import org.springframework.jms.connection.SingleConnectionFactory; @@ -48,7 +48,7 @@ import org.springframework.jms.core.MessageCreator; import org.springframework.jms.listener.DefaultMessageListenerContainer; public class LoadBalanceTest { - private static final Log LOG = LogFactory.getLog(LoadBalanceTest.class); + private static final Logger LOG = LoggerFactory.getLogger(LoadBalanceTest.class); private static final String TESTING_QUEUE = "testingqueue"; private static int networkBridgePrefetch = 1000; diff --git a/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/JMSMemtest.java b/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/JMSMemtest.java index f282abbcdd..a633695bcd 100644 --- a/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/JMSMemtest.java +++ b/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/JMSMemtest.java @@ -30,13 +30,13 @@ import javax.jms.Session; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class JMSMemtest { - private static final Log LOG = LogFactory.getLog(JMSMemtest.class); + private static final Logger LOG = LoggerFactory.getLogger(JMSMemtest.class); private static final int DEFAULT_MESSAGECOUNT = 5000; protected BrokerService broker; diff --git a/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemMessageIdList.java b/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemMessageIdList.java index 460e8506fa..ae31ab9663 100644 --- a/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemMessageIdList.java +++ b/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemMessageIdList.java @@ -23,8 +23,8 @@ import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageListener; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A simple container of messages for performing testing and rendezvous style @@ -40,7 +40,7 @@ import org.apache.commons.logging.LogFactory; */ public class MemMessageIdList implements MessageListener { - protected static final Log LOG = LogFactory.getLog(MemMessageIdList.class); + protected static final Logger LOG = LoggerFactory.getLogger(MemMessageIdList.class); private List messageIds = new ArrayList(); private Object semaphore; diff --git a/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/ReportGenerator.java b/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/ReportGenerator.java index ec41ee45e4..984cb6eee3 100644 --- a/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/ReportGenerator.java +++ b/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/ReportGenerator.java @@ -24,12 +24,12 @@ import java.io.PrintWriter; import java.util.Enumeration; import java.util.Properties; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ReportGenerator { - private static final Log LOG = LogFactory.getLog(ReportGenerator.class); + private static final Logger LOG = LoggerFactory.getLogger(ReportGenerator.class); private String reportDirectory; private String reportName; private PrintWriter writer; diff --git a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java index bd91b0f4c7..4f3ffbeb12 100644 --- a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java +++ b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java @@ -23,12 +23,12 @@ import javax.jms.JMSException; import javax.jms.Session; import org.apache.activemq.tool.properties.JmsClientProperties; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public abstract class AbstractJmsClient { - private static final Log LOG = LogFactory.getLog(AbstractJmsClient.class); + private static final Logger LOG = LoggerFactory.getLogger(AbstractJmsClient.class); protected ConnectionFactory factory; protected Connection jmsConnection; diff --git a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java index 7605d415f8..9d0c7fe6b7 100644 --- a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java +++ b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java @@ -37,11 +37,11 @@ import org.apache.activemq.tool.reports.XmlFilePerfReportWriter; import org.apache.activemq.tool.sampler.CpuSamplerTask; import org.apache.activemq.tool.sampler.ThroughputSamplerTask; import org.apache.activemq.tool.spi.SPIConnectionFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public abstract class AbstractJmsClientSystem extends AbstractObjectProperties { - private static final Log LOG = LogFactory.getLog(AbstractJmsClientSystem.class); + private static final Logger LOG = LoggerFactory.getLogger(AbstractJmsClientSystem.class); protected ThreadGroup clientThreadGroup; protected ConnectionFactory jmsConnFactory; diff --git a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java index ebe8db15e3..0f6c475ced 100644 --- a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java +++ b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java @@ -28,11 +28,11 @@ import javax.jms.Topic; import org.apache.activemq.tool.properties.JmsClientProperties; import org.apache.activemq.tool.properties.JmsConsumerProperties; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class JmsConsumerClient extends AbstractJmsMeasurableClient { - private static final Log LOG = LogFactory.getLog(JmsConsumerClient.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsConsumerClient.class); protected MessageConsumer jmsConsumer; protected JmsConsumerProperties client; diff --git a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerClient.java b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerClient.java index 54690b126a..9abec9951b 100644 --- a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerClient.java +++ b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerClient.java @@ -27,11 +27,11 @@ import javax.jms.TextMessage; import org.apache.activemq.tool.properties.JmsClientProperties; import org.apache.activemq.tool.properties.JmsProducerProperties; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class JmsProducerClient extends AbstractJmsMeasurableClient { - private static final Log LOG = LogFactory.getLog(JmsProducerClient.class); + private static final Logger LOG = LoggerFactory.getLogger(JmsProducerClient.class); protected JmsProducerProperties client; protected MessageProducer jmsProducer; diff --git a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java index ff4df38452..974fffffd7 100644 --- a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java +++ b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java @@ -25,11 +25,11 @@ import java.util.List; import java.util.Properties; import java.util.StringTokenizer; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public final class ReflectionUtil { - private static final Log LOG = LogFactory.getLog(ReflectionUtil.class); + private static final Logger LOG = LoggerFactory.getLogger(ReflectionUtil.class); private ReflectionUtil() { } @@ -155,7 +155,7 @@ public final class ReflectionUtil { LOG.debug(debugInfo); } catch (Exception e) { - LOG.warn(e); + LOG.warn(e.toString()); } } @@ -179,7 +179,7 @@ public final class ReflectionUtil { try { props.putAll(retrieveClassProperties("", obj.getClass(), obj)); } catch (Exception e) { - LOG.warn(e); + LOG.warn(e.toString()); } return props; } diff --git a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/XmlFilePerfReportWriter.java b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/XmlFilePerfReportWriter.java index 21d0a0d877..520153af7b 100644 --- a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/XmlFilePerfReportWriter.java +++ b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/XmlFilePerfReportWriter.java @@ -35,12 +35,12 @@ import java.util.StringTokenizer; import org.apache.activemq.tool.reports.plugins.CpuReportPlugin; import org.apache.activemq.tool.reports.plugins.ThroughputReportPlugin; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class XmlFilePerfReportWriter extends AbstractPerfReportWriter { - private static final Log LOG = LogFactory.getLog(XmlFilePerfReportWriter.class); + private static final Logger LOG = LoggerFactory.getLogger(XmlFilePerfReportWriter.class); private File tempLogFile; private PrintWriter tempLogFileWriter; diff --git a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/CpuReportPlugin.java b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/CpuReportPlugin.java index 62cf7d2442..4285cadbe0 100644 --- a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/CpuReportPlugin.java +++ b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/CpuReportPlugin.java @@ -23,8 +23,8 @@ import java.util.Map; import java.util.StringTokenizer; import org.apache.activemq.tool.reports.PerformanceStatisticsUtil; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class CpuReportPlugin implements ReportPlugin { @@ -53,7 +53,7 @@ public class CpuReportPlugin implements ReportPlugin { public static final String KEY_AVE_IDLE_TIME = "AveIdleTime"; public static final String KEY_AVE_WAIT_TIME = "AveWaitingTime"; - private static final Log LOG = LogFactory.getLog(CpuReportPlugin.class); + private static final Logger LOG = LoggerFactory.getLogger(CpuReportPlugin.class); protected List blockRecv = new ArrayList(); protected List blockSent = new ArrayList(); diff --git a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java index 52e6d889ed..8b84798074 100644 --- a/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java +++ b/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java @@ -26,13 +26,13 @@ import java.util.StringTokenizer; import javax.jms.ConnectionFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public abstract class ClassLoaderSPIConnectionFactory implements SPIConnectionFactory { public static final String KEY_EXT_DIR = "extDir"; - private static final Log LOG = LogFactory.getLog(ClassLoaderSPIConnectionFactory.class); + private static final Logger LOG = LoggerFactory.getLogger(ClassLoaderSPIConnectionFactory.class); public final ConnectionFactory createConnectionFactory(Properties settings) throws Exception { diff --git a/activemq-web-console/src/main/java/org/apache/activemq/web/WebConsoleStarter.java b/activemq-web-console/src/main/java/org/apache/activemq/web/WebConsoleStarter.java index f189af769f..db6c667a41 100644 --- a/activemq-web-console/src/main/java/org/apache/activemq/web/WebConsoleStarter.java +++ b/activemq-web-console/src/main/java/org/apache/activemq/web/WebConsoleStarter.java @@ -21,8 +21,8 @@ import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; import org.springframework.web.context.support.XmlWebApplicationContext; @@ -34,7 +34,7 @@ import org.springframework.web.context.support.XmlWebApplicationContext; */ public class WebConsoleStarter implements ServletContextListener { - private static final Log LOG = LogFactory.getLog(WebConsoleStarter.class); + private static final Logger LOG = LoggerFactory.getLogger(WebConsoleStarter.class); public void contextInitialized(ServletContextEvent event) { LOG.debug("Initializing ActiveMQ WebConsole..."); diff --git a/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CopyMessage.java b/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CopyMessage.java index 578e66a64f..4e0f70b6eb 100644 --- a/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CopyMessage.java +++ b/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CopyMessage.java @@ -22,8 +22,8 @@ import javax.servlet.http.HttpServletResponse; import org.apache.activemq.broker.jmx.QueueViewMBean; import org.apache.activemq.web.BrokerFacade; import org.apache.activemq.web.DestinationFacade; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.Controller; @@ -36,7 +36,7 @@ import org.springframework.web.servlet.mvc.Controller; public class CopyMessage extends DestinationFacade implements Controller { private String messageId; private String destination; - private static final Log log = LogFactory.getLog(CopyMessage.class); + private static final Logger log = LoggerFactory.getLogger(CopyMessage.class); public CopyMessage(BrokerFacade brokerFacade) { super(brokerFacade); diff --git a/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteJob.java b/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteJob.java index 73ef722f62..2c1640a51d 100644 --- a/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteJob.java +++ b/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteJob.java @@ -21,8 +21,8 @@ import javax.servlet.http.HttpServletResponse; import org.apache.activemq.broker.jmx.JobSchedulerViewMBean; import org.apache.activemq.web.BrokerFacade; import org.apache.activemq.web.DestinationFacade; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.Controller; @@ -31,7 +31,7 @@ import org.springframework.web.servlet.mvc.Controller; */ public class DeleteJob extends DestinationFacade implements Controller { private String jobId; - private static final Log LOG = LogFactory.getLog(DeleteJob.class); + private static final Logger LOG = LoggerFactory.getLogger(DeleteJob.class); public DeleteJob(BrokerFacade brokerFacade) { super(brokerFacade); diff --git a/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteMessage.java b/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteMessage.java index 768e5c8a45..320cab1cc9 100644 --- a/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteMessage.java +++ b/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteMessage.java @@ -22,8 +22,8 @@ import javax.servlet.http.HttpServletResponse; import org.apache.activemq.broker.jmx.QueueViewMBean; import org.apache.activemq.web.BrokerFacade; import org.apache.activemq.web.DestinationFacade; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.Controller; @@ -32,7 +32,7 @@ import org.springframework.web.servlet.mvc.Controller; */ public class DeleteMessage extends DestinationFacade implements Controller { private String messageId; - private static final Log log = LogFactory.getLog(DeleteMessage.class); + private static final Logger log = LoggerFactory.getLogger(DeleteMessage.class); public DeleteMessage(BrokerFacade brokerFacade) { super(brokerFacade); diff --git a/activemq-web-console/src/main/java/org/apache/activemq/web/controller/MoveMessage.java b/activemq-web-console/src/main/java/org/apache/activemq/web/controller/MoveMessage.java index 71cb658ac2..7b0b87a4ea 100644 --- a/activemq-web-console/src/main/java/org/apache/activemq/web/controller/MoveMessage.java +++ b/activemq-web-console/src/main/java/org/apache/activemq/web/controller/MoveMessage.java @@ -22,8 +22,8 @@ import javax.servlet.http.HttpServletResponse; import org.apache.activemq.broker.jmx.QueueViewMBean; import org.apache.activemq.web.BrokerFacade; import org.apache.activemq.web.DestinationFacade; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.Controller; @@ -36,7 +36,7 @@ import org.springframework.web.servlet.mvc.Controller; public class MoveMessage extends DestinationFacade implements Controller { private String messageId; private String destination; - private static final Log log = LogFactory.getLog(MoveMessage.class); + private static final Logger log = LoggerFactory.getLogger(MoveMessage.class); public MoveMessage(BrokerFacade brokerFacade) { super(brokerFacade); diff --git a/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java b/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java index 6f899286a0..549caedab7 100644 --- a/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java +++ b/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java @@ -22,8 +22,8 @@ import java.util.UUID; import javax.servlet.http.HttpServletRequest; import org.apache.activemq.web.DestinationFacade; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.web.bind.ServletRequestDataBinder; import org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping; import org.springframework.web.servlet.HandlerExecutionChain; @@ -32,7 +32,7 @@ import org.springframework.web.servlet.HandlerExecutionChain; * @version $Revision$ */ public class BindingBeanNameUrlHandlerMapping extends BeanNameUrlHandlerMapping { - private static final transient Log LOG = LogFactory.getLog(BindingBeanNameUrlHandlerMapping.class); + private static final transient Logger LOG = LoggerFactory.getLogger(BindingBeanNameUrlHandlerMapping.class); protected Object getHandlerInternal(HttpServletRequest request) throws Exception { Object object = super.getHandlerInternal(request); diff --git a/activemq-web-demo/pom.xml b/activemq-web-demo/pom.xml index a6681e77e6..c03dfd64f1 100755 --- a/activemq-web-demo/pom.xml +++ b/activemq-web-demo/pom.xml @@ -96,6 +96,12 @@ true + + org.slf4j + slf4j-log4j12 + test + + org.eclipse.jetty.aggregate diff --git a/activemq-web-demo/src/test/java/org/apache/activemq/web/AjaxTest.java b/activemq-web-demo/src/test/java/org/apache/activemq/web/AjaxTest.java index 3024ffeff9..fbc73d12c2 100644 --- a/activemq-web-demo/src/test/java/org/apache/activemq/web/AjaxTest.java +++ b/activemq-web-demo/src/test/java/org/apache/activemq/web/AjaxTest.java @@ -23,8 +23,8 @@ import org.apache.activemq.transport.stomp.Stomp; import java.lang.Thread; import java.net.SocketTimeoutException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.commons.lang.StringUtils; import java.util.*; @@ -39,7 +39,7 @@ import javax.jms.Message; import javax.jms.TextMessage; public class AjaxTest extends JettyTestSupport { - private static final Log LOG = LogFactory.getLog(AjaxTest.class); + private static final Logger LOG = LoggerFactory.getLogger(AjaxTest.class); private class AjaxTestContentExchange extends ContentExchange { private HashMap headers; diff --git a/activemq-web-demo/src/test/java/org/apache/activemq/web/JettyTestSupport.java b/activemq-web-demo/src/test/java/org/apache/activemq/web/JettyTestSupport.java index bc38568181..00e2cc2cb4 100644 --- a/activemq-web-demo/src/test/java/org/apache/activemq/web/JettyTestSupport.java +++ b/activemq-web-demo/src/test/java/org/apache/activemq/web/JettyTestSupport.java @@ -29,15 +29,15 @@ import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.util.Wait; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.eclipse.jetty.webapp.WebAppContext; public class JettyTestSupport extends TestCase { - private static final Log LOG = LogFactory.getLog(JettyTestSupport.class); + private static final Logger LOG = LoggerFactory.getLogger(JettyTestSupport.class); BrokerService broker; Server server; diff --git a/activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java b/activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java index 137a5ed616..c96cac2090 100644 --- a/activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java +++ b/activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java @@ -22,15 +22,15 @@ import javax.management.ObjectName; import org.apache.activemq.broker.jmx.DestinationViewMBean; import org.apache.activemq.broker.jmx.SubscriptionViewMBean; import org.apache.commons.lang.RandomStringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.eclipse.jetty.client.ContentExchange; import org.eclipse.jetty.client.HttpClient; import java.util.Set; public class RestTest extends JettyTestSupport { - private static final Log LOG = LogFactory.getLog(RestTest.class); + private static final Logger LOG = LoggerFactory.getLogger(RestTest.class); public void testConsume() throws Exception { producer.send(session.createTextMessage("test")); diff --git a/activemq-web/src/main/java/org/apache/activemq/web/AjaxListener.java b/activemq-web/src/main/java/org/apache/activemq/web/AjaxListener.java index 597b5f82c3..46f1693c85 100644 --- a/activemq-web/src/main/java/org/apache/activemq/web/AjaxListener.java +++ b/activemq-web/src/main/java/org/apache/activemq/web/AjaxListener.java @@ -22,8 +22,8 @@ import javax.jms.MessageConsumer; import org.eclipse.jetty.continuation.Continuation; import org.eclipse.jetty.continuation.ContinuationSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.activemq.MessageAvailableListener; @@ -33,7 +33,7 @@ import java.util.LinkedList; * Listen for available messages and wakeup any continuations. */ public class AjaxListener implements MessageAvailableListener { - private static final Log LOG = LogFactory.getLog(AjaxListener.class); + private static final Logger LOG = LoggerFactory.getLogger(AjaxListener.class); private long maximumReadTimeout; private AjaxWebClient client; diff --git a/activemq-web/src/main/java/org/apache/activemq/web/AjaxWebClient.java b/activemq-web/src/main/java/org/apache/activemq/web/AjaxWebClient.java index 84bb65e6ad..62a022cc4a 100644 --- a/activemq-web/src/main/java/org/apache/activemq/web/AjaxWebClient.java +++ b/activemq-web/src/main/java/org/apache/activemq/web/AjaxWebClient.java @@ -23,8 +23,8 @@ import java.util.Date; import javax.jms.MessageConsumer; import javax.servlet.http.HttpServletRequest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.activemq.MessageAvailableConsumer; @@ -32,7 +32,7 @@ import org.apache.activemq.MessageAvailableConsumer; * Collection of all data needed to fulfill requests from a single web client. */ public class AjaxWebClient extends WebClient { - private static final Log LOG = LogFactory.getLog(AjaxWebClient.class); + private static final Logger LOG = LoggerFactory.getLogger(AjaxWebClient.class); // an instance which has not been accessed in this many milliseconds can be removed. final long expireAfter = 60 * 1000; diff --git a/activemq-web/src/main/java/org/apache/activemq/web/AuditFilter.java b/activemq-web/src/main/java/org/apache/activemq/web/AuditFilter.java index 6c27f973a6..0b37341374 100644 --- a/activemq-web/src/main/java/org/apache/activemq/web/AuditFilter.java +++ b/activemq-web/src/main/java/org/apache/activemq/web/AuditFilter.java @@ -18,8 +18,8 @@ package org.apache.activemq.web; import org.apache.activemq.broker.util.AuditLogEntry; import org.apache.activemq.broker.util.AuditLogService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; @@ -27,7 +27,7 @@ import java.io.IOException; public class AuditFilter implements Filter { - private static final Log LOG = LogFactory.getLog("org.apache.activemq.audit"); + private static final Logger LOG = LoggerFactory.getLogger("org.apache.activemq.audit"); private boolean audit; private AuditLogService auditLog; diff --git a/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java b/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java index 1d65ae95cf..0cc1b3bea8 100644 --- a/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java +++ b/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java @@ -36,8 +36,8 @@ import javax.servlet.http.HttpSession; import org.apache.activemq.MessageAvailableConsumer; import org.apache.activemq.MessageAvailableListener; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.eclipse.jetty.continuation.Continuation; import org.eclipse.jetty.continuation.ContinuationSupport; @@ -63,7 +63,7 @@ import org.eclipse.jetty.continuation.ContinuationSupport; * @version $Revision: 1.1.1.1 $ */ public class MessageListenerServlet extends MessageServletSupport { - private static final Log LOG = LogFactory.getLog(MessageListenerServlet.class); + private static final Logger LOG = LoggerFactory.getLogger(MessageListenerServlet.class); private String readTimeoutParameter = "timeout"; private long defaultReadTimeout = -1; diff --git a/activemq-web/src/main/java/org/apache/activemq/web/MessageServlet.java b/activemq-web/src/main/java/org/apache/activemq/web/MessageServlet.java index d123aced30..c2030b4259 100644 --- a/activemq-web/src/main/java/org/apache/activemq/web/MessageServlet.java +++ b/activemq-web/src/main/java/org/apache/activemq/web/MessageServlet.java @@ -36,8 +36,8 @@ import org.apache.activemq.MessageAvailableConsumer; import org.apache.activemq.MessageAvailableListener; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQTextMessage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.eclipse.jetty.continuation.Continuation; import org.eclipse.jetty.continuation.ContinuationSupport; @@ -55,7 +55,7 @@ public class MessageServlet extends MessageServletSupport { private static final long serialVersionUID = 8737914695188481219L; - private static final Log LOG = LogFactory.getLog(MessageServlet.class); + private static final Logger LOG = LoggerFactory.getLogger(MessageServlet.class); private String readTimeoutParameter = "readTimeout"; private long defaultReadTimeout = -1; diff --git a/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java b/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java index 7d3b58ba8c..93b6b0fbda 100644 --- a/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java +++ b/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java @@ -34,8 +34,8 @@ import javax.servlet.http.HttpServletRequest; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A useful base class for any JMS related servlet; there are various ways to @@ -56,7 +56,7 @@ import org.apache.commons.logging.LogFactory; */ public abstract class MessageServletSupport extends HttpServlet { - private static final transient Log LOG = LogFactory.getLog(MessageServletSupport.class); + private static final transient Logger LOG = LoggerFactory.getLogger(MessageServletSupport.class); private boolean defaultTopicFlag = true; private Destination defaultDestination; diff --git a/activemq-web/src/main/java/org/apache/activemq/web/RemoteJMXBrokerFacade.java b/activemq-web/src/main/java/org/apache/activemq/web/RemoteJMXBrokerFacade.java index 733a0b3120..a23e64cbde 100644 --- a/activemq-web/src/main/java/org/apache/activemq/web/RemoteJMXBrokerFacade.java +++ b/activemq-web/src/main/java/org/apache/activemq/web/RemoteJMXBrokerFacade.java @@ -38,8 +38,8 @@ import org.apache.activemq.broker.jmx.ManagementContext; import org.apache.activemq.broker.jmx.QueueViewMBean; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.web.config.WebConsoleConfiguration; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A {@link BrokerFacade} which uses a JMX-Connection to communicate with a @@ -49,7 +49,7 @@ import org.apache.commons.logging.LogFactory; */ public class RemoteJMXBrokerFacade extends BrokerFacadeSupport { - private static final transient Log LOG = LogFactory.getLog(RemoteJMXBrokerFacade.class); + private static final transient Logger LOG = LoggerFactory.getLogger(RemoteJMXBrokerFacade.class); private String brokerName; private JMXConnector connector; diff --git a/activemq-web/src/main/java/org/apache/activemq/web/SessionListener.java b/activemq-web/src/main/java/org/apache/activemq/web/SessionListener.java index 71df1fcc9e..1c04e937f2 100644 --- a/activemq-web/src/main/java/org/apache/activemq/web/SessionListener.java +++ b/activemq-web/src/main/java/org/apache/activemq/web/SessionListener.java @@ -17,15 +17,15 @@ package org.apache.activemq.web; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; public class SessionListener implements HttpSessionListener { - private static final Log LOG = LogFactory.getLog(SessionListener.class); + private static final Logger LOG = LoggerFactory.getLogger(SessionListener.class); public void sessionCreated(HttpSessionEvent se) { } diff --git a/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java b/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java index bd34e0e67e..72352e10ee 100644 --- a/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java +++ b/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java @@ -53,8 +53,8 @@ import org.apache.activemq.pool.PooledConnectionFactory; import org.apache.camel.CamelContext; import org.apache.camel.ProducerTemplate; import org.apache.camel.impl.DefaultCamelContext; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Represents a messaging client used from inside a web container typically @@ -72,7 +72,7 @@ public class WebClient implements HttpSessionActivationListener, HttpSessionBind public static final String BROKER_URL_INIT_PARAM = "org.apache.activemq.brokerURL"; public static final String SELECTOR_NAME = "org.apache.activemq.selectorName"; - private static final Log LOG = LogFactory.getLog(WebClient.class); + private static final Logger LOG = LoggerFactory.getLogger(WebClient.class); private static transient ConnectionFactory factory; diff --git a/activemq-xmpp/pom.xml b/activemq-xmpp/pom.xml index 0d2b1a63d9..54e3d146d3 100755 --- a/activemq-xmpp/pom.xml +++ b/activemq-xmpp/pom.xml @@ -124,6 +124,11 @@ 3.8.1 test + + org.slf4j + slf4j-log4j12 + test + diff --git a/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/ProtocolConverter.java b/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/ProtocolConverter.java index e8451e47ab..583a68af98 100644 --- a/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/ProtocolConverter.java +++ b/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/ProtocolConverter.java @@ -69,8 +69,8 @@ import org.apache.activemq.transport.xmpp.command.HandlerRegistry; import org.apache.activemq.util.IdGenerator; import org.apache.activemq.util.IntSequenceGenerator; import org.apache.activemq.util.LongSequenceGenerator; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.jabber.protocol.disco_info.Feature; import org.jabber.protocol.disco_info.Identity; import org.jabber.protocol.disco_items.Item; @@ -80,7 +80,7 @@ import org.jabber.protocol.muc_user.X; * TODO lots of this code could be shared with Stomp */ public class ProtocolConverter { - private static final transient Log LOG = LogFactory.getLog(ProtocolConverter.class); + private static final transient Logger LOG = LoggerFactory.getLogger(ProtocolConverter.class); private static final IdGenerator CONNECTION_ID_GENERATOR = new IdGenerator(); private static final IdGenerator CLIENT_ID_GENERATOR = new IdGenerator("xmpp"); diff --git a/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransport.java b/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransport.java index 7c98669893..d42b3d6348 100644 --- a/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransport.java +++ b/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransport.java @@ -49,8 +49,8 @@ import org.apache.activemq.transport.tcp.TcpTransport; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.ServiceStopper; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.jabber.etherx.streams.Features; /** @@ -59,7 +59,7 @@ import org.jabber.etherx.streams.Features; public class XmppTransport extends TcpTransport { protected static final QName ATTRIBUTE_TO = new QName("to"); - private static final transient Log LOG = LogFactory.getLog(XmppTransport.class); + private static final transient Logger LOG = LoggerFactory.getLogger(XmppTransport.class); protected OutputStream outputStream; protected InputStream inputStream; diff --git a/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppWireFormat.java b/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppWireFormat.java index 221a8243bb..fb80416f87 100644 --- a/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppWireFormat.java +++ b/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppWireFormat.java @@ -26,8 +26,8 @@ import org.apache.activemq.util.ByteArrayInputStream; import org.apache.activemq.util.ByteArrayOutputStream; import org.apache.activemq.util.ByteSequence; import org.apache.activemq.wireformat.WireFormat; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A wire format which uses XMPP format of messages diff --git a/assembly/pom.xml b/assembly/pom.xml index fdbc1a020f..5e921e8ed0 100755 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -291,7 +291,11 @@ org.slf4j - slf4j-jcl + slf4j-log4j12 + + + org.slf4j + jcl-over-slf4j opensymphony diff --git a/assembly/src/main/descriptors/common-bin.xml b/assembly/src/main/descriptors/common-bin.xml index 33b13a228a..1d6c39f76a 100644 --- a/assembly/src/main/descriptors/common-bin.xml +++ b/assembly/src/main/descriptors/common-bin.xml @@ -146,7 +146,8 @@ false runtime - commons-logging:commons-logging + org.slf4j:slf4j-api + org.slf4j:jcl-over-slf4j ${pom.groupId}:activemq-core ${pom.groupId}:activemq-console ${pom.groupId}:activemq-jaas @@ -191,6 +192,7 @@ commons-codec:commons-codec commons-net:commons-net commons-lang:commons-lang + org.slf4j:slf4j-log4j12 log4j:log4j org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec org.apache.xbean:xbean-spring @@ -224,8 +226,6 @@ org.eclipse.jetty.aggregate:jetty-all-server org.eclipse.jetty:jetty-websocket org.apache.geronimo.specs:geronimo-servlet_2.5_spec - org.slf4j:slf4j-api - org.slf4j:slf4j-jcl org.mortbay.jetty:jsp-2.1-glassfish diff --git a/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java b/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java index eeaa9fcb2e..7300e0647b 100755 --- a/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java +++ b/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java @@ -33,12 +33,12 @@ import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.TransportConnection; import org.apache.activemq.broker.TransportConnector; import org.apache.activemq.transport.stomp.StompConnection; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class BrokerXmlConfigStartTest extends TestCase { - private static final Log LOG = LogFactory.getLog(BrokerXmlConfigStartTest.class); + private static final Logger LOG = LoggerFactory.getLogger(BrokerXmlConfigStartTest.class); Properties secProps; public void testStartBrokerUsingXmlConfig() throws Exception { doTestStartBrokerUsingXmlConfig("xbean:src/release/conf/activemq.xml"); diff --git a/kahadb/pom.xml b/kahadb/pom.xml index ce80d7d1c5..277fcbcc65 100755 --- a/kahadb/pom.xml +++ b/kahadb/pom.xml @@ -42,36 +42,21 @@ - commons-logging - commons-logging - 1.1 - - - avalon-framework - avalon-framework - - - logkit - logkit - - - log4j - log4j - - - javax.servlet - servlet-api - - + org.slf4j + slf4j-api log4j log4j - 1.2.14 test true + + org.slf4j + slf4j-log4j12 + test + junit diff --git a/kahadb/src/main/java/org/apache/kahadb/index/BTreeIndex.java b/kahadb/src/main/java/org/apache/kahadb/index/BTreeIndex.java index 350a654ce2..07576a16cd 100644 --- a/kahadb/src/main/java/org/apache/kahadb/index/BTreeIndex.java +++ b/kahadb/src/main/java/org/apache/kahadb/index/BTreeIndex.java @@ -23,8 +23,8 @@ import java.util.Iterator; import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.kahadb.page.Page; import org.apache.kahadb.page.PageFile; import org.apache.kahadb.page.Transaction; @@ -59,7 +59,7 @@ import org.apache.kahadb.util.Marshaller; */ public class BTreeIndex implements Index { - private static final Log LOG = LogFactory.getLog(BTreeIndex.class); + private static final Logger LOG = LoggerFactory.getLogger(BTreeIndex.class); /** * Interface used to determine the simple prefix of two keys. diff --git a/kahadb/src/main/java/org/apache/kahadb/index/HashIndex.java b/kahadb/src/main/java/org/apache/kahadb/index/HashIndex.java index cb28174557..fefe198b31 100644 --- a/kahadb/src/main/java/org/apache/kahadb/index/HashIndex.java +++ b/kahadb/src/main/java/org/apache/kahadb/index/HashIndex.java @@ -24,8 +24,8 @@ import java.util.Map; import java.util.Map.Entry; import java.util.concurrent.atomic.AtomicBoolean; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.kahadb.page.Page; import org.apache.kahadb.page.PageFile; import org.apache.kahadb.page.Transaction; @@ -43,7 +43,7 @@ public class HashIndex implements Index { public static final int OPEN_STATE = 2; - private static final Log LOG = LogFactory.getLog(HashIndex.class); + private static final Logger LOG = LoggerFactory.getLogger(HashIndex.class); public static final int DEFAULT_BIN_CAPACITY; public static final int DEFAULT_MAXIMUM_BIN_CAPACITY; diff --git a/kahadb/src/main/java/org/apache/kahadb/journal/Journal.java b/kahadb/src/main/java/org/apache/kahadb/journal/Journal.java index 65a8b71226..cbef36003e 100644 --- a/kahadb/src/main/java/org/apache/kahadb/journal/Journal.java +++ b/kahadb/src/main/java/org/apache/kahadb/journal/Journal.java @@ -36,8 +36,8 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; import java.util.zip.Adler32; import java.util.zip.Checksum; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.kahadb.journal.DataFileAppender.WriteCommand; import org.apache.kahadb.journal.DataFileAppender.WriteKey; import org.apache.kahadb.util.ByteSequence; @@ -89,7 +89,7 @@ public class Journal { public static final int PREFERED_DIFF = 1024 * 512; public static final int DEFAULT_MAX_WRITE_BATCH_SIZE = 1024 * 1024 * 4; - private static final Log LOG = LogFactory.getLog(Journal.class); + private static final Logger LOG = LoggerFactory.getLogger(Journal.class); protected final Map inflightWrites = new ConcurrentHashMap(); diff --git a/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java b/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java index eca5979cc8..4ecae617ad 100644 --- a/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java +++ b/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java @@ -34,8 +34,8 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.zip.Adler32; import java.util.zip.Checksum; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.kahadb.util.DataByteArrayOutputStream; import org.apache.kahadb.util.IOExceptionSupport; import org.apache.kahadb.util.IOHelper; @@ -68,7 +68,7 @@ public class PageFile { private static final int PAGE_FILE_HEADER_SIZE=1024*4; // Recovery header is (long offset) - private static final Log LOG = LogFactory.getLog(PageFile.class); + private static final Logger LOG = LoggerFactory.getLogger(PageFile.class); // A PageFile will use a couple of files in this directory private File directory; diff --git a/pom.xml b/pom.xml index 1b4496a0bd..579d9508ca 100755 --- a/pom.xml +++ b/pom.xml @@ -72,12 +72,13 @@ 2.0 2.1.0 1.2.14 - 1.5.2 + 1.5.2 10.1.3.1 1.1.2 1.3 0.8 - 1.5.0 + + 1.5.11 1.5.8 1.0.1 1.2.0 @@ -356,11 +357,6 @@ - - commons-logging - commons-logging-api - ${commons-logging-version} - org.apache.geronimo.specs @@ -915,12 +911,12 @@ org.slf4j - slf4j-jcl + slf4j-log4j12 ${slf4j-version} org.slf4j - slf4j-log4j12 + jcl-over-slf4j ${slf4j-version}