You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2007/08/09 18:40:08 UTC
svn commit: r564271 [13/18] - in /activemq/trunk:
activemq-core/src/main/java/org/apache/activemq/
activemq-core/src/main/java/org/apache/activemq/advisory/
activemq-core/src/main/java/org/apache/activemq/blob/
activemq-core/src/main/java/org/apache/ac...
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveUsingMasterConnectorElementTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveUsingMasterConnectorElementTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveUsingMasterConnectorElementTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveUsingMasterConnectorElementTest.java Thu Aug 9 09:37:49 2007
@@ -1,12 +1,12 @@
/**
+ * 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
*
- * Copyright 2005-2006 The Apache Software Foundation
- *
- * Licensed 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
+ * 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,
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java Thu Aug 9 09:37:49 2007
@@ -32,7 +32,10 @@
import junit.textui.TestRunner;
import org.apache.activemq.EmbeddedBrokerTestSupport;
+import org.apache.activemq.advisory.TempDestDeleteTest;
import org.apache.activemq.broker.BrokerService;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* A test case of the various MBeans in ActiveMQ. If you want to look at the
@@ -42,6 +45,7 @@
* @version $Revision$
*/
public class MBeanTest extends EmbeddedBrokerTestSupport {
+ private static final Log LOG = LogFactory.getLog(MBeanTest.class);
private static boolean waitForKeyPress;
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java Thu Aug 9 09:37:49 2007
@@ -28,6 +28,8 @@
import junit.textui.TestRunner;
import org.apache.activemq.EmbeddedBrokerTestSupport;
import org.apache.activemq.broker.BrokerService;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* A specific test of Queue.purge() functionality
@@ -35,6 +37,7 @@
* @version $Revision$
*/
public class PurgeTest extends EmbeddedBrokerTestSupport {
+ private static final Log LOG = LogFactory.getLog(PurgeTest.class);
protected MBeanServer mbeanServer;
protected String domain = "org.apache.activemq";
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DestinationCursorConfigTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DestinationCursorConfigTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DestinationCursorConfigTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DestinationCursorConfigTest.java Thu Aug 9 09:37:49 2007
@@ -1,12 +1,12 @@
/**
+ * 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
*
- * Copyright 2005-2006 The Apache Software Foundation
- *
- * Licensed 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
+ * 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,
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorDurableTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorDurableTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorDurableTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorDurableTest.java Thu Aug 9 09:37:49 2007
@@ -1,17 +1,19 @@
/**
- *
- * 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.
+ * 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.broker.region.cursors;
import javax.jms.Connection;
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorQueueStoreTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorQueueStoreTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorQueueStoreTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorQueueStoreTest.java Thu Aug 9 09:37:49 2007
@@ -1,17 +1,19 @@
/**
- *
- * 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.
+ * 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.broker.region.cursors;
import javax.jms.Connection;
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java Thu Aug 9 09:37:49 2007
@@ -1,17 +1,19 @@
/**
- *
- * 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.
+ * 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.broker.region.cursors;
import java.util.ArrayList;
@@ -39,7 +41,7 @@
* @version $Revision: 1.3 $
*/
public abstract class CursorSupport extends TestCase {
- protected static final Log log = LogFactory.getLog(CursorSupport.class);
+ private static final Log LOG = LogFactory.getLog(CursorSupport.class);
protected static final int MESSAGE_COUNT = 500;
protected static final int PREFETCH_SIZE = 50;
@@ -135,9 +137,9 @@
Message sent = (Message)senderList.get(i);
Message consumed = (Message)consumerList.get(i);
if (!sent.equals(consumed)) {
- log.error("BAD MATCH AT POS " + i);
- log.error(sent);
- log.error(consumed);
+ LOG.error("BAD MATCH AT POS " + i);
+ LOG.error(sent);
+ LOG.error(consumed);
/*
* log.error("\n\n\n\n\n"); for (int j = 0; j <
* consumerList.size(); j++) { log.error(consumerList.get(j)); }
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java Thu Aug 9 09:37:49 2007
@@ -37,14 +37,19 @@
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;
/**
* @version $Revision$
*/
public class LoadTester extends JmsTestSupport {
- protected int MESSAGE_SIZE = 1024 * 64;
- protected int PRODUCE_COUNT = 10000;
+ private static final Log LOG = LogFactory.getLog(LoadTester.class);
+
+ protected int messageSize = 1024 * 64;
+ protected int produceCount = 10000;
protected BrokerService createBroker() throws Exception {
return BrokerFactory.createBroker(new URI("xbean:org/apache/activemq/broker/store/loadtester.xml"));
@@ -57,7 +62,7 @@
}
public void testQueueSendThenAddConsumer() throws Exception {
- ProgressPrinter printer = new ProgressPrinter(PRODUCE_COUNT, 20);
+ ProgressPrinter printer = new ProgressPrinter(produceCount, 20);
ActiveMQDestination destination = new ActiveMQQueue("TEST");
@@ -68,29 +73,29 @@
MessageProducer producer = session.createProducer(destination);
producer.setDeliveryMode(DeliveryMode.PERSISTENT);
- log.info("Sending " + PRODUCE_COUNT + " messages that are " + (MESSAGE_SIZE / 1024.0) + "k large, for a total of " + (PRODUCE_COUNT * MESSAGE_SIZE / (1024.0 * 1024.0))
+ LOG.info("Sending " + produceCount + " messages that are " + (messageSize / 1024.0) + "k large, for a total of " + (produceCount * messageSize / (1024.0 * 1024.0))
+ " megs of data.");
// Send a message to the broker.
long start = System.currentTimeMillis();
- for (int i = 0; i < PRODUCE_COUNT; i++) {
+ for (int i = 0; i < produceCount; i++) {
printer.increment();
BytesMessage msg = session.createBytesMessage();
- msg.writeBytes(new byte[MESSAGE_SIZE]);
+ msg.writeBytes(new byte[messageSize]);
producer.send(msg);
}
long end1 = System.currentTimeMillis();
- log.info("Produced messages/sec: " + (PRODUCE_COUNT * 1000.0 / (end1 - start)));
+ LOG.info("Produced messages/sec: " + (produceCount * 1000.0 / (end1 - start)));
- printer = new ProgressPrinter(PRODUCE_COUNT, 10);
+ printer = new ProgressPrinter(produceCount, 10);
start = System.currentTimeMillis();
MessageConsumer consumer = session.createConsumer(destination);
- for (int i = 0; i < PRODUCE_COUNT; i++) {
+ for (int i = 0; i < produceCount; i++) {
printer.increment();
assertNotNull("Getting message: " + i, consumer.receive(20000));
}
end1 = System.currentTimeMillis();
- log.info("Consumed messages/sec: " + (PRODUCE_COUNT * 1000.0 / (end1 - start)));
+ LOG.info("Consumed messages/sec: " + (produceCount * 1000.0 / (end1 - start)));
}
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/util/LoggingBrokerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/util/LoggingBrokerTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/util/LoggingBrokerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/util/LoggingBrokerTest.java Thu Aug 9 09:37:49 2007
@@ -29,7 +29,7 @@
* @version $Revision$
*/
public class LoggingBrokerTest extends JmsTopicSendReceiveTest {
- private static final Log log = LogFactory.getLog(LoggingBrokerTest.class);
+ private static final Log LOG = LogFactory.getLog(LoggingBrokerTest.class);
private BrokerService broker;
protected void setUp() throws Exception {
@@ -49,7 +49,7 @@
}
protected BrokerService createBroker(String uri) throws Exception {
- log.info("Loading broker configuration from the classpath with URI: " + uri);
+ LOG.info("Loading broker configuration from the classpath with URI: " + uri);
return BrokerFactory.createBroker(new URI("xbean:" + uri));
}
}
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java Thu Aug 9 09:37:49 2007
@@ -1,4 +1,4 @@
-/*
+/**
* 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.
@@ -41,7 +41,7 @@
*/
public class CompositeQueueTest extends EmbeddedBrokerTestSupport {
- private static final Log log = LogFactory.getLog(CompositeQueueTest.class);
+ private static final Log LOG = LogFactory.getLog(CompositeQueueTest.class);
private Connection connection;
@@ -65,8 +65,8 @@
Destination destination1 = getConsumer1Dsetination();
Destination destination2 = getConsumer2Dsetination();
- log.info("Sending to: " + producerDestination);
- log.info("Consuming from: " + destination1 + " and " + destination2);
+ LOG.info("Sending to: " + producerDestination);
+ LOG.info("Consuming from: " + destination1 + " and " + destination2);
MessageConsumer c1 = session.createConsumer(destination1);
MessageConsumer c2 = session.createConsumer(destination2);
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubTest.java Thu Aug 9 09:37:49 2007
@@ -1,4 +1,4 @@
-/*
+/**
* 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.
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/CraigsBugTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/CraigsBugTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/CraigsBugTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/CraigsBugTest.java Thu Aug 9 09:37:49 2007
@@ -1,4 +1,4 @@
-/*
+/**
* 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.
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java Thu Aug 9 09:37:49 2007
@@ -1,17 +1,19 @@
/**
- *
- * 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.
+ * 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.bugs;
import java.util.Properties;
@@ -36,7 +38,11 @@
* @version $Revision: 1.5 $
*/
public class JmsDurableTopicSlowReceiveTest extends JmsTopicSendReceiveTest {
- private static final transient Log log = LogFactory.getLog(JmsDurableTopicSlowReceiveTest.class);
+
+ static final int NMSG = 100;
+ static final int MSIZE = 256000;
+ private static final transient Log LOG = LogFactory.getLog(JmsDurableTopicSlowReceiveTest.class);
+ private static final String COUNT_PROPERY_NAME = "count";
protected Connection connection2;
protected Session session2;
@@ -45,12 +51,9 @@
protected MessageProducer producer2;
protected Destination consumerDestination2;
BrokerService broker;
- static final int NMSG = 100;
- static final int MSIZE = 256000;
private Connection connection3;
private Session consumeSession3;
private TopicSubscriber consumer3;
- private static final String countProperyName = "count";
/**
* Set up a durable suscriber test.
@@ -120,12 +123,12 @@
BytesMessage message = session2.createBytesMessage();
message.writeBytes(new byte[MSIZE]);
message.setStringProperty("test", "test");
- message.setIntProperty(countProperyName, count);
+ message.setIntProperty(COUNT_PROPERY_NAME, count);
message.setJMSType("test");
producer2.send(consumerDestination2, message);
Thread.sleep(50);
if (verbose) {
- log.debug("Sent(" + loop + "): " + i);
+ LOG.debug("Sent(" + loop + "): " + i);
}
count++;
}
@@ -155,15 +158,16 @@
int i;
for (i = 0; i < NMSG / 4; i++) {
msg = consumer3.receive(10000);
- if (msg == null)
+ if (msg == null) {
break;
+ }
if (verbose) {
- log.debug("Received(" + loop + "): " + i + " count = " + msg.getIntProperty(countProperyName));
+ LOG.debug("Received(" + loop + "): " + i + " count = " + msg.getIntProperty(COUNT_PROPERY_NAME));
}
assertNotNull(msg);
assertEquals(msg.getJMSType(), "test");
assertEquals(msg.getStringProperty("test"), "test");
- assertEquals("Messages received out of order", count, msg.getIntProperty(countProperyName));
+ assertEquals("Messages received out of order", count, msg.getIntProperty(COUNT_PROPERY_NAME));
Thread.sleep(500);
msg.acknowledge();
count++;
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java Thu Aug 9 09:37:49 2007
@@ -37,7 +37,7 @@
import org.apache.commons.logging.LogFactory;
public class SlowConsumerTest extends TestCase {
- private static final Log log = LogFactory.getLog(SlowConsumerTest.class);
+ private static final Log LOG = LogFactory.getLog(SlowConsumerTest.class);
private Socket stompSocket;
private ByteArrayOutputStream inputBuffer;
@@ -70,7 +70,7 @@
for (int idx = 0; idx < MESSAGES_COUNT; ++idx) {
Message message = session.createTextMessage("" + idx);
producer.send(message);
- log.debug("Sending: " + idx);
+ LOG.debug("Sending: " + idx);
}
producer.close();
session.close();
@@ -93,20 +93,20 @@
while (messagesCount != MESSAGES_COUNT) {
Message msg = consumer.receive(messageReceiveTimeout);
if (msg == null) {
- log.warn("Got null message at count: " + messagesCount + ". Continuing...");
+ LOG.warn("Got null message at count: " + messagesCount + ". Continuing...");
break;
}
String text = ((TextMessage)msg).getText();
int currentMsgIdx = Integer.parseInt(text);
- log.debug("Received: " + text + " messageCount: " + messagesCount);
+ LOG.debug("Received: " + text + " messageCount: " + messagesCount);
msg.acknowledge();
if ((messagesCount + diff) != currentMsgIdx) {
- log.debug("Message(s) skipped!! Should be message no.: " + messagesCount + " but got: " + currentMsgIdx);
+ LOG.debug("Message(s) skipped!! Should be message no.: " + messagesCount + " but got: " + currentMsgIdx);
diff = currentMsgIdx - messagesCount;
}
++messagesCount;
if (messagesCount % messageLogFrequency == 0) {
- log.info("Received: " + messagesCount + " messages so far");
+ LOG.info("Received: " + messagesCount + " messages so far");
}
// Thread.sleep(70);
}
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/camel/CamelJmsTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/camel/CamelJmsTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/camel/CamelJmsTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/camel/CamelJmsTest.java Thu Aug 9 09:37:49 2007
@@ -1,4 +1,4 @@
-/*
+/**
* 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.
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMapMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMapMessageTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMapMessageTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMapMessageTest.java Thu Aug 9 09:37:49 2007
@@ -35,7 +35,7 @@
* @version $Revision$
*/
public class ActiveMQMapMessageTest extends TestCase {
- private static final transient Log log = LogFactory.getLog(ActiveMQMapMessageTest.class);
+ private static final Log LOG = LogFactory.getLog(ActiveMQMapMessageTest.class);
private String name = "testName";
@@ -252,7 +252,7 @@
msg.setObject("short", shortValue);
msg.setObject("string", stringValue);
} catch (MessageFormatException mfe) {
- log.warn("Caught: " + mfe);
+ LOG.warn("Caught: " + mfe);
mfe.printStackTrace();
fail("object formats should be correct");
}
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java Thu Aug 9 09:37:49 2007
@@ -31,15 +31,19 @@
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;
/**
* @version $Revision$
*/
public class ActiveMQMessageTest extends TestCase {
- private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ActiveMQMessageTest.class);
+ private static final Log LOG = LogFactory.getLog(ActiveMQMessageTest.class);
- private String jmsMessageID;
+ protected boolean readOnlyMessage;
+
+ private String jmsMessageID;
private String jmsCorrelationID;
private ActiveMQDestination jmsDestination;
private ActiveMQDestination jmsReplyTo;
@@ -49,7 +53,6 @@
private long jmsExpiration;
private int jmsPriority;
private long jmsTimestamp;
- protected boolean readOnlyMessage;
private long[] consumerIDs;
public static void main(String[] args) {
@@ -183,7 +186,7 @@
assertTrue(msg1.getJMSPriority() == msg2.getJMSPriority());
assertTrue(msg1.getJMSTimestamp() == msg2.getJMSTimestamp());
- log.info("Message is: " + msg1);
+ LOG.info("Message is: " + msg1);
}
public void testGetAndSetJMSMessageID() throws Exception {
@@ -443,7 +446,7 @@
msg.setStringProperty(null, "Cheese");
fail("Should have thrown exception");
} catch (IllegalArgumentException e) {
- log.info("Worked, caught: " + e);
+ LOG.info("Worked, caught: " + e);
}
}
@@ -454,7 +457,7 @@
msg.setStringProperty("", "Cheese");
fail("Should have thrown exception");
} catch (IllegalArgumentException e) {
- log.info("Worked, caught: " + e);
+ LOG.info("Worked, caught: " + e);
}
}
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/DataStructureTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/DataStructureTestSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/DataStructureTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/DataStructureTestSupport.java Thu Aug 9 09:37:49 2007
@@ -59,13 +59,16 @@
// }
}
- static public void assertEquals(Object expect, Object was) {
- if (expect == null ^ was == null)
+ public static void assertEquals(Object expect, Object was) {
+ if (expect == null ^ was == null) {
throw new AssertionFailedError("Not equals, expected: " + expect + ", was: " + was);
- if (expect == null)
+ }
+ if (expect == null) {
return;
- if (expect.getClass() != was.getClass())
+ }
+ if (expect.getClass() != was.getClass()) {
throw new AssertionFailedError("Not equals, classes don't match. expected: " + expect.getClass() + ", was: " + was.getClass());
+ }
if (expect.getClass().isArray()) {
Class componentType = expect.getClass().getComponentType();
if (componentType.isPrimitive()) {
@@ -97,8 +100,9 @@
} else {
Object expectArray[] = (Object[])expect;
Object wasArray[] = (Object[])was;
- if (expectArray.length != wasArray.length)
+ if (expectArray.length != wasArray.length) {
throw new AssertionFailedError("Not equals, array lengths don't match. expected: " + expectArray.length + ", was: " + wasArray.length);
+ }
for (int i = 0; i < wasArray.length; i++) {
assertEquals(expectArray[i], wasArray[i]);
}
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageCompressionTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageCompressionTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageCompressionTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageCompressionTest.java Thu Aug 9 09:37:49 2007
@@ -1,12 +1,12 @@
/**
+ * 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
*
- * Copyright 2005-2006 The Apache Software Foundation
- *
- * Licensed 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
+ * 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,
@@ -105,7 +105,7 @@
// public void testJavaUtilZip() throws Exception {
// String str = "When the going gets weird, the weird turn pro.";
// byte[] bytes = str.getBytes();
- //
+ //
// ByteArrayOutputStream baos = new ByteArrayOutputStream(bytes.length);
// DeflaterOutputStream dos = new DeflaterOutputStream(baos);
// dos.
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java Thu Aug 9 09:37:49 2007
@@ -20,9 +20,13 @@
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;
public class MessageSendTest extends DataStructureTestSupport {
+ private static final Log LOG = LogFactory.getLog(MessageSendTest.class);
public static Test suite() {
return suite(MessageSendTest.class);
@@ -70,6 +74,6 @@
}
long end = System.currentTimeMillis();
- log.info("marshaled/unmarshaled: " + p + " msgs at " + (p * 1000f / (end - start)) + " msgs/sec");
+ LOG.info("marshaled/unmarshaled: " + p + " msgs at " + (p * 1000f / (end - start)) + " msgs/sec");
}
}
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java Thu Aug 9 09:37:49 2007
@@ -26,12 +26,12 @@
* @version $Revision$
*/
public class BrokerPropertiesTest extends TestCase {
- private static final transient Log log = LogFactory.getLog(BrokerPropertiesTest.class);
+ private static final transient Log LOG = LogFactory.getLog(BrokerPropertiesTest.class);
public void testPropertiesFile() throws Exception {
BrokerService broker = BrokerFactory.createBroker("properties:org/apache/activemq/config/broker.properties");
- log.info("Created broker: " + broker);
+ LOG.info("Created broker: " + broker);
assertNotNull(broker);
assertEquals("isUseJmx()", false, broker.isUseJmx());
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java Thu Aug 9 09:37:49 2007
@@ -52,7 +52,7 @@
*/
public class ConfigTest extends TestCase {
- private static final Log log = LogFactory.getLog(ConfigTest.class);
+ private static final Log LOG = LogFactory.getLog(ConfigTest.class);
protected static final String JOURNAL_ROOT = "target/test-data/";
protected static final String DERBY_ROOT = "target/test-data/";
@@ -106,7 +106,7 @@
// settings... ");
JournalPersistenceAdapter pa = (JournalPersistenceAdapter)broker.getPersistenceAdapter();
- log.info("Success");
+ LOG.info("Success");
} finally {
if (broker != null) {
broker.stop();
@@ -137,7 +137,7 @@
assertTrue("Should have created an EmbeddedDataSource", ((JDBCPersistenceAdapter)adapter).getDataSource() instanceof EmbeddedDataSource);
assertTrue("Should have created a DefaultWireFormat", ((JDBCPersistenceAdapter)adapter).getWireFormat() instanceof ObjectStreamWireFormat);
- log.info("Success");
+ LOG.info("Success");
} finally {
if (broker != null) {
broker.stop();
@@ -159,7 +159,7 @@
// Create broker from resource
// System.out.print("Creating broker... ");
broker = createBroker("org/apache/activemq/config/example.xml");
- log.info("Success");
+ LOG.info("Success");
try {
// Check broker configuration
@@ -171,12 +171,12 @@
assertEquals("Broker Config Error (persistent)", false, broker.isPersistent());
assertEquals("Broker Config Error (useShutdownHook)", false, broker.isUseShutdownHook());
assertEquals("Broker Config Error (deleteAllMessagesOnStartup)", true, broker.isDeleteAllMessagesOnStartup());
- log.info("Success");
+ LOG.info("Success");
// Check specific vm transport
// System.out.print("Checking vm connector... ");
assertEquals("Should have a specific VM Connector", "vm://javacoola", broker.getVmConnectorURI().toString());
- log.info("Success");
+ LOG.info("Success");
// Check transport connectors list
// System.out.print("Checking transport connectors... ");
@@ -190,7 +190,7 @@
// System.out.print("Checking network connectors... ");
List networkConnectors = broker.getNetworkConnectors();
assertEquals("Should have a single network connector", 1, networkConnectors.size());
- log.info("Success");
+ LOG.info("Success");
// Check dispatch policy configuration
// System.out.print("Checking dispatch policies... ");
@@ -206,7 +206,7 @@
dest = new ActiveMQTopic("Topic.StrictOrderDispatch");
assertTrue("Should have a strict order dispatch policy for " + dest.getTopicName(),
broker.getDestinationPolicy().getEntryFor(dest).getDispatchPolicy() instanceof StrictOrderDispatchPolicy);
- log.info("Success");
+ LOG.info("Success");
// Check subscription policy configuration
// System.out.print("Checking subscription recovery policies... ");
@@ -230,7 +230,7 @@
subsPolicy = broker.getDestinationPolicy().getEntryFor(dest).getSubscriptionRecoveryPolicy();
assertTrue("Should have a timed subscription recovery policy for " + dest.getTopicName(), subsPolicy instanceof TimedSubscriptionRecoveryPolicy);
assertEquals("TimedSubsPolicy Config Error (recoverDuration)", 25000, ((TimedSubscriptionRecoveryPolicy)subsPolicy).getRecoverDuration());
- log.info("Success");
+ LOG.info("Success");
// Check usage manager
// System.out.print("Checking memory manager configurations... ");
@@ -238,9 +238,9 @@
assertTrue("Should have a memory manager", memMgr != null);
assertEquals("UsageManager Config Error (limit)", 200000, memMgr.getLimit());
assertEquals("UsageManager Config Error (percentUsageMinDelta)", 20, memMgr.getPercentUsageMinDelta());
- log.info("Success");
+ LOG.info("Success");
- log.info("Success");
+ LOG.info("Success");
} finally {
if (broker != null) {
broker.stop();
@@ -268,7 +268,7 @@
assertTrue("Should have created a journal persistence adapter", adapter instanceof JournalPersistenceAdapter);
assertTrue("Should have created a journal directory at " + journalFile.getAbsolutePath(), journalFile.exists());
- log.info("Success");
+ LOG.info("Success");
} finally {
if (broker != null) {
broker.stop();
@@ -301,7 +301,7 @@
assertTrue("Should have not created a derby directory at " + derbyFile.getAbsolutePath(), !derbyFile.exists());
assertTrue("Should have not created a journal directory at " + journalFile.getAbsolutePath(), !journalFile.exists());
- log.info("Success");
+ LOG.info("Success");
} finally {
if (broker != null) {
broker.stop();
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java Thu Aug 9 09:37:49 2007
@@ -46,7 +46,7 @@
*/
public class DefaultQueueSender {
- private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DefaultQueueSender.class);
+ private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory.getLog(DefaultQueueSender.class);
public static void main(String[] args) {
@@ -72,8 +72,8 @@
idx += 2;
}
String queueName = args[idx];
- log.info("Connecting to: " + uri);
- log.info("Queue name is " + queueName);
+ LOG.info("Connecting to: " + uri);
+ LOG.info("Queue name is " + queueName);
if (++idx < args.length) {
text = args[idx];
@@ -89,7 +89,7 @@
Message message = session.createTextMessage(text);
producer.send(message);
} catch (JMSException e) {
- log.info("Exception occurred: " + e.toString());
+ LOG.info("Exception occurred: " + e.toString());
} finally {
if (connection != null) {
try {
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleConsumer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleConsumer.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleConsumer.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleConsumer.java Thu Aug 9 09:37:49 2007
@@ -44,7 +44,7 @@
*/
public class SimpleConsumer {
- private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SimpleConsumer.class);
+ private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory.getLog(SimpleConsumer.class);
/**
* @param args the queue used by the example
@@ -62,11 +62,11 @@
* Read destination name from command line and display it.
*/
if (args.length != 1) {
- log.info("Usage: java SimpleConsumer <destination-name>");
+ LOG.info("Usage: java SimpleConsumer <destination-name>");
System.exit(1);
}
destinationName = args[0];
- log.info("Destination name is " + destinationName);
+ LOG.info("Destination name is " + destinationName);
/*
* Create a JNDI API InitialContext object
@@ -74,7 +74,7 @@
try {
jndiContext = new InitialContext();
} catch (NamingException e) {
- log.info("Could not create JNDI API " + "context: " + e.toString());
+ LOG.info("Could not create JNDI API " + "context: " + e.toString());
System.exit(1);
}
@@ -85,7 +85,7 @@
connectionFactory = (ConnectionFactory)jndiContext.lookup("ConnectionFactory");
destination = (Destination)jndiContext.lookup(destinationName);
} catch (NamingException e) {
- log.info("JNDI API lookup failed: " + e.toString());
+ LOG.info("JNDI API lookup failed: " + e.toString());
System.exit(1);
}
@@ -106,14 +106,14 @@
if (m != null) {
if (m instanceof TextMessage) {
TextMessage message = (TextMessage)m;
- log.info("Reading message: " + message.getText());
+ LOG.info("Reading message: " + message.getText());
} else {
break;
}
}
}
} catch (JMSException e) {
- log.info("Exception occurred: " + e);
+ LOG.info("Exception occurred: " + e);
} finally {
if (connection != null) {
try {
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java Thu Aug 9 09:37:49 2007
@@ -47,7 +47,7 @@
*/
public class SimpleProducer {
- private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SimpleProducer.class);
+ private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory.getLog(SimpleProducer.class);
/**
* @param args the destination name to send to and optionally, the number of
@@ -61,18 +61,18 @@
Destination destination = null;
MessageProducer producer = null;
String destinationName = null;
- final int NUM_MSGS;
+ final int numMsgs;
if ((args.length < 1) || (args.length > 2)) {
- log.info("Usage: java SimpleProducer <destination-name> [<number-of-messages>]");
+ LOG.info("Usage: java SimpleProducer <destination-name> [<number-of-messages>]");
System.exit(1);
}
destinationName = args[0];
- log.info("Destination name is " + destinationName);
+ LOG.info("Destination name is " + destinationName);
if (args.length == 2) {
- NUM_MSGS = (new Integer(args[1])).intValue();
+ numMsgs = (new Integer(args[1])).intValue();
} else {
- NUM_MSGS = 1;
+ numMsgs = 1;
}
/*
@@ -81,7 +81,7 @@
try {
jndiContext = new InitialContext();
} catch (NamingException e) {
- log.info("Could not create JNDI API context: " + e.toString());
+ LOG.info("Could not create JNDI API context: " + e.toString());
System.exit(1);
}
@@ -92,7 +92,7 @@
connectionFactory = (ConnectionFactory)jndiContext.lookup("ConnectionFactory");
destination = (Destination)jndiContext.lookup(destinationName);
} catch (NamingException e) {
- log.info("JNDI API lookup failed: " + e);
+ LOG.info("JNDI API lookup failed: " + e);
System.exit(1);
}
@@ -107,9 +107,9 @@
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
producer = session.createProducer(destination);
TextMessage message = session.createTextMessage();
- for (int i = 0; i < NUM_MSGS; i++) {
+ for (int i = 0; i < numMsgs; i++) {
message.setText("This is message " + (i + 1));
- log.info("Sending message: " + message.getText());
+ LOG.info("Sending message: " + message.getText());
producer.send(message);
}
@@ -118,7 +118,7 @@
*/
producer.send(session.createMessage());
} catch (JMSException e) {
- log.info("Exception occurred: " + e);
+ LOG.info("Exception occurred: " + e);
} finally {
if (connection != null) {
try {
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java Thu Aug 9 09:37:49 2007
@@ -39,7 +39,7 @@
public class SimpleQueueReceiver {
- private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SimpleQueueReceiver.class);
+ private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory.getLog(SimpleQueueReceiver.class);
/**
* Main method.
@@ -60,11 +60,11 @@
* Read queue name from command line and display it.
*/
if (args.length != 1) {
- log.info("Usage: java " + "SimpleQueueReceiver <queue-name>");
+ LOG.info("Usage: java " + "SimpleQueueReceiver <queue-name>");
System.exit(1);
}
queueName = args[0];
- log.info("Queue name is " + queueName);
+ LOG.info("Queue name is " + queueName);
/*
* Create a JNDI API InitialContext object if none exists yet.
@@ -72,7 +72,7 @@
try {
jndiContext = new InitialContext();
} catch (NamingException e) {
- log.info("Could not create JNDI API " + "context: " + e.toString());
+ LOG.info("Could not create JNDI API " + "context: " + e.toString());
System.exit(1);
}
@@ -83,7 +83,7 @@
queueConnectionFactory = (QueueConnectionFactory)jndiContext.lookup("QueueConnectionFactory");
queue = (Queue)jndiContext.lookup(queueName);
} catch (NamingException e) {
- log.info("JNDI API lookup failed: " + e.toString());
+ LOG.info("JNDI API lookup failed: " + e.toString());
System.exit(1);
}
@@ -104,14 +104,14 @@
if (m != null) {
if (m instanceof TextMessage) {
message = (TextMessage)m;
- log.info("Reading message: " + message.getText());
+ LOG.info("Reading message: " + message.getText());
} else {
break;
}
}
}
} catch (JMSException e) {
- log.info("Exception occurred: " + e.toString());
+ LOG.info("Exception occurred: " + e.toString());
} finally {
if (queueConnection != null) {
try {
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java Thu Aug 9 09:37:49 2007
@@ -42,7 +42,7 @@
public class SimpleQueueSender {
- private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SimpleQueueSender.class);
+ private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory.getLog(SimpleQueueSender.class);
/**
* Main method.
@@ -59,18 +59,18 @@
Queue queue = null;
QueueSender queueSender = null;
TextMessage message = null;
- final int NUM_MSGS;
+ final int numMsgs;
if ((args.length < 1) || (args.length > 2)) {
- log.info("Usage: java SimpleQueueSender " + "<queue-name> [<number-of-messages>]");
+ LOG.info("Usage: java SimpleQueueSender " + "<queue-name> [<number-of-messages>]");
System.exit(1);
}
queueName = args[0];
- log.info("Queue name is " + queueName);
+ LOG.info("Queue name is " + queueName);
if (args.length == 2) {
- NUM_MSGS = (new Integer(args[1])).intValue();
+ numMsgs = (new Integer(args[1])).intValue();
} else {
- NUM_MSGS = 1;
+ numMsgs = 1;
}
/*
@@ -79,7 +79,7 @@
try {
jndiContext = new InitialContext();
} catch (NamingException e) {
- log.info("Could not create JNDI API context: " + e.toString());
+ LOG.info("Could not create JNDI API context: " + e.toString());
System.exit(1);
}
@@ -90,7 +90,7 @@
queueConnectionFactory = (QueueConnectionFactory)jndiContext.lookup("QueueConnectionFactory");
queue = (Queue)jndiContext.lookup(queueName);
} catch (NamingException e) {
- log.info("JNDI API lookup failed: " + e);
+ LOG.info("JNDI API lookup failed: " + e);
System.exit(1);
}
@@ -105,9 +105,9 @@
queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
queueSender = queueSession.createSender(queue);
message = queueSession.createTextMessage();
- for (int i = 0; i < NUM_MSGS; i++) {
+ for (int i = 0; i < numMsgs; i++) {
message.setText("This is message " + (i + 1));
- log.info("Sending message: " + message.getText());
+ LOG.info("Sending message: " + message.getText());
queueSender.send(message);
}
@@ -116,7 +116,7 @@
*/
queueSender.send(queueSession.createMessage());
} catch (JMSException e) {
- log.info("Exception occurred: " + e.toString());
+ LOG.info("Exception occurred: " + e.toString());
} finally {
if (queueConnection != null) {
try {
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java Thu Aug 9 09:37:49 2007
@@ -25,7 +25,7 @@
*/
public class BadDummyPolicyConfigTest extends TestCase {
- protected static final Log log = LogFactory.getLog(BadDummyPolicyConfigTest.class);
+ private static final Log LOG = LogFactory.getLog(BadDummyPolicyConfigTest.class);
protected DummyPolicy policy = new DummyPolicy();
public void testNoDestinationSpecified() throws Exception {
@@ -54,7 +54,7 @@
try {
entry.afterPropertiesSet();
} catch (IllegalArgumentException e) {
- log.info("Worked! Caught expected exception: " + e);
+ LOG.info("Worked! Caught expected exception: " + e);
}
}
}
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/InitialContextTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/InitialContextTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/InitialContextTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/InitialContextTest.java Thu Aug 9 09:37:49 2007
@@ -28,19 +28,18 @@
* @version $Revision: 1.3 $
*/
public class InitialContextTest extends TestCase {
-
- private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
- .getLog(InitialContextTest.class);
-
+
+ private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory.getLog(InitialContextTest.class);
+
public void testInitialContext() throws Exception {
InitialContext context = new InitialContext();
assertTrue("Created context", context != null);
- ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory) context.lookup("ConnectionFactory");
+ ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory)context.lookup("ConnectionFactory");
assertTrue("Should have created a ConnectionFactory", connectionFactory != null);
- log.info("Created with brokerURL: " + connectionFactory.getBrokerURL());
+ LOG.info("Created with brokerURL: " + connectionFactory.getBrokerURL());
}
@@ -53,17 +52,15 @@
InitialContext context = new InitialContext(properties);
assertTrue("Created context", context != null);
- ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory) context.lookup("ConnectionFactory");
+ ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory)context.lookup("ConnectionFactory");
assertTrue("Should have created a ConnectionFactory", connectionFactory != null);
assertEquals("the brokerURL should match", expected, connectionFactory.getBrokerURL());
}
-
-
-
+
public void testConnectionFactoryPolicyConfig() throws Exception {
-
+
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
properties.put(Context.PROVIDER_URL, "tcp://localhost:65432");
@@ -74,7 +71,7 @@
InitialContext context = new InitialContext(properties);
assertTrue("Created context", context != null);
- ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory) context.lookup("ConnectionFactory");
+ ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory)context.lookup("ConnectionFactory");
assertTrue("Should have created a ConnectionFactory", connectionFactory != null);
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/JNDITestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/JNDITestSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/JNDITestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/JNDITestSupport.java Thu Aug 9 09:37:49 2007
@@ -35,7 +35,7 @@
*/
public abstract class JNDITestSupport extends TestCase {
- private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
+ private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
.getLog(JNDITestSupport.class);
protected Hashtable environment = new Hashtable();
@@ -56,7 +56,7 @@
NamingEnumeration iter = childContext.listBindings("");
while (iter.hasMore()) {
Binding destinationBinding = (Binding) iter.next();
- log.info("Found destination: " + destinationBinding.getName());
+ LOG.info("Found destination: " + destinationBinding.getName());
Object destination = destinationBinding.getObject();
assertTrue("Should have a Destination but got: " + destination, destination instanceof Destination);
}
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java Thu Aug 9 09:37:49 2007
@@ -30,7 +30,7 @@
*/
class Loader extends Thread {
- protected static final Log log = LogFactory.getLog(Loader.class);
+ private static final Log LOG = LogFactory.getLog(Loader.class);
private String name;
private Store store;
@@ -67,7 +67,7 @@
}
long finishLoad = System.currentTimeMillis();
long totalLoadTime = finishLoad - startLoad;
- log.info("name " + name + " load time = " + totalLoadTime + "(ms)");
+ LOG.info("name " + name + " load time = " + totalLoadTime + "(ms)");
Set keys = container.keySet();
long startExtract = System.currentTimeMillis();
@@ -77,7 +77,7 @@
}
long finishExtract = System.currentTimeMillis();
long totalExtractTime = finishExtract - startExtract;
- log.info("name " + name + " extract time = " + totalExtractTime + "(ms)");
+ LOG.info("name " + name + " extract time = " + totalExtractTime + "(ms)");
long startRemove = System.currentTimeMillis();
for (Iterator i = keys.iterator(); i.hasNext();) {
@@ -85,7 +85,7 @@
}
long finishRemove = System.currentTimeMillis();
long totalRemoveTime = finishRemove - startRemove;
- log.info("name " + name + " remove time = " + totalRemoveTime + "(ms)");
+ LOG.info("name " + name + " remove time = " + totalRemoveTime + "(ms)");
// re-insert data of longer length
startLoad = System.currentTimeMillis();
value = getData(2048);
@@ -97,7 +97,7 @@
}
finishLoad = System.currentTimeMillis();
totalLoadTime = finishLoad - startLoad;
- log.info("name " + name + " 2nd load time = " + totalLoadTime + "(ms)");
+ LOG.info("name " + name + " 2nd load time = " + totalLoadTime + "(ms)");
} catch (Exception e) {
e.printStackTrace();
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java Thu Aug 9 09:37:49 2007
@@ -24,7 +24,7 @@
import org.apache.commons.logging.LogFactory;
public class VolumeTest extends TestCase {
- private static final transient Log log = LogFactory.getLog(VolumeTest.class);
+ private static final transient Log LOG = LogFactory.getLog(VolumeTest.class);
protected Store store;
protected String name;
@@ -36,12 +36,12 @@
*/
public void testListVolume() throws Exception {
ListContainer container = store.getListContainer("volume");
- container.setMarshaller(Store.BytesMarshaller);
+ container.setMarshaller(Store.BYTES_MARSHALLER);
byte[] data = new byte[10];
for (int i = 0; i < NUMBER; i++) {
container.add(data);
if (i % 100000 == 0) {
- log.error("persisted " + i);
+ LOG.error("persisted " + i);
}
}
@@ -51,7 +51,7 @@
assertNotNull(i.next());
count++;
if (count % 100000 == 0) {
- log.error("retrived " + count);
+ LOG.error("retrived " + count);
}
}
assertEquals("Different retrieved to stored", NUMBER, count);
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalImplTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalImplTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalImplTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalImplTest.java Thu Aug 9 09:37:49 2007
@@ -71,8 +71,9 @@
protected void tearDown() throws Exception {
journal.close();
- if (logDirectory.exists())
+ if (logDirectory.exists()) {
deleteDir(logDirectory);
+ }
// assertTrue( !logDirectory.exists() );
}
@@ -165,12 +166,15 @@
// System.out.println("Comparing: "+new String(arg0)+" and "+new
// String(arg1));
- if (arg0 == null ^ arg1 == null)
+ if (arg0 == null ^ arg1 == null) {
fail("Not equal: " + arg0 + " != " + arg1);
- if (arg0 == null)
+ }
+ if (arg0 == null) {
return;
- if (arg0.length != arg1.length)
+ }
+ if (arg0.length != arg1.length) {
fail("Array lenght not equal: " + arg0.length + " != " + arg1.length);
+ }
for (int i = 0; i < arg0.length; i++) {
if (arg0[i] != arg1[i]) {
fail("Array item not equal at index " + i + ": " + arg0[i] + " != " + arg1[i]);
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/LocationTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/LocationTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/LocationTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/LocationTest.java Thu Aug 9 09:37:49 2007
@@ -31,10 +31,10 @@
* @version $Revision: 1.1 $
*/
public class LocationTest extends TestCase {
- private static final transient Log log = LogFactory.getLog(LocationTest.class);
+ private static final transient Log LOG = LogFactory.getLog(LocationTest.class);
@SuppressWarnings("unchecked")
- synchronized public void testRecordLocationImplComparison() throws IOException {
+ public synchronized void testRecordLocationImplComparison() throws IOException {
Location l1 = new Location();
l1.setDataFileId(0);
l1.setOffset(5);
@@ -54,7 +54,7 @@
Collections.sort(l);
// Did they get sorted to the correct order?
- log.debug(l.get(0));
+ LOG.debug(l.get(0));
assertSame(l.get(0).getLocation(), l1);
assertSame(l.get(1).getLocation(), l2);
assertSame(l.get(2).getLocation(), l3);
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/hash/HashTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/hash/HashTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/hash/HashTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/hash/HashTest.java Thu Aug 9 09:37:49 2007
@@ -1,17 +1,19 @@
/**
- *
- * 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.
+ * 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.kaha.impl.index.hash;
import java.io.File;
@@ -27,7 +29,7 @@
*/
public class HashTest extends TestCase {
- private static int COUNT = 1000;
+ private static final int COUNT = 1000;
private HashIndex hashIndex;
private File directory;
private IndexManager indexManager;
@@ -42,7 +44,7 @@
directory.mkdirs();
indexManager = new IndexManager(directory, "im-hash-test", "rw", null);
this.hashIndex = new HashIndex(directory, "testHash", indexManager);
- this.hashIndex.setKeyMarshaller(Store.StringMarshaller);
+ this.hashIndex.setKeyMarshaller(Store.STRING_MARSHALLER);
}
public void testHashIndex() throws Exception {
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/tree/TreeTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/tree/TreeTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/tree/TreeTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/tree/TreeTest.java Thu Aug 9 09:37:49 2007
@@ -1,17 +1,19 @@
/**
- *
- * 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.
+ * 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.kaha.impl.index.tree;
import java.io.File;
@@ -27,7 +29,7 @@
*/
public class TreeTest extends TestCase {
- private static int COUNT = 55;
+ private static final int COUNT = 55;
private TreeIndex tree;
private File directory;
private IndexManager indexManager;
@@ -43,7 +45,7 @@
directory.mkdirs();
indexManager = new IndexManager(directory, "im-test", "rw", null);
this.tree = new TreeIndex(directory, "testTree", indexManager);
- this.tree.setKeyMarshaller(Store.StringMarshaller);
+ this.tree.setKeyMarshaller(Store.STRING_MARSHALLER);
}
public void testTreeWithCaching() throws Exception {
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/BoundaryStatisticTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/BoundaryStatisticTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/BoundaryStatisticTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/BoundaryStatisticTest.java Thu Aug 9 09:37:49 2007
@@ -19,7 +19,7 @@
public class BoundaryStatisticTest extends StatisticTestSupport {
- private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
+ private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
.getLog(BoundaryStatisticTest.class);
/**
@@ -33,6 +33,6 @@
assertEquals(1000, stat.getLowerBound());
assertEquals(2000, stat.getUpperBound());
- log.info("Stat is: " + stat);
+ LOG.info("Stat is: " + stat);
}
}
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/CountStatisticTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/CountStatisticTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/CountStatisticTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/CountStatisticTest.java Thu Aug 9 09:37:49 2007
@@ -19,7 +19,7 @@
public class CountStatisticTest extends StatisticTestSupport {
- private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
+ private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
.getLog(CountStatisticTest.class);
/**
@@ -48,7 +48,7 @@
assertLastTimeNotStartTime(stat);
- log.info("Counter is: " + stat);
+ LOG.info("Counter is: " + stat);
stat.reset();
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/RangeStatisticTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/RangeStatisticTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/RangeStatisticTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/RangeStatisticTest.java Thu Aug 9 09:37:49 2007
@@ -19,7 +19,7 @@
public class RangeStatisticTest extends StatisticTestSupport {
- private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
+ private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
.getLog(RangeStatisticTest.class);
/**
@@ -62,7 +62,7 @@
assertLastTimeNotStartTime(stat);
- log.info("Stat is: " + stat);
+ LOG.info("Stat is: " + stat);
stat.reset();
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/TimeStatisticTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/TimeStatisticTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/TimeStatisticTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/management/TimeStatisticTest.java Thu Aug 9 09:37:49 2007
@@ -19,7 +19,7 @@
public class TimeStatisticTest extends StatisticTestSupport {
- private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
+ private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
.getLog(TimeStatisticTest.class);
/**
@@ -56,7 +56,7 @@
assertLastTimeNotStartTime(stat);
- log.info("Stat is: " + stat);
+ LOG.info("Stat is: " + stat);
stat.reset();
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java Thu Aug 9 09:37:49 2007
@@ -27,7 +27,7 @@
* @version $Revision: 1.1 $
*/
public abstract class MemoryBufferTestSupport extends TestCase {
- protected static final Log log = LogFactory.getLog(MemoryBufferTestSupport.class);
+ private static final Log LOG = LogFactory.getLog(MemoryBufferTestSupport.class);
protected abstract MessageBuffer createMessageBuffer();
@@ -45,14 +45,14 @@
}
protected void dump() {
- log.info("Dumping current state");
+ LOG.info("Dumping current state");
dumpQueue(qA, "A");
dumpQueue(qB, "B");
dumpQueue(qC, "C");
}
protected void dumpQueue(MessageQueue queue, String name) {
- log.info(" " + name + " = " + queue.getList());
+ LOG.info(" " + name + " = " + queue.getList());
}
protected ActiveMQMessage createMessage(int size) throws Exception {
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java Thu Aug 9 09:37:49 2007
@@ -1,17 +1,19 @@
/**
- *
- * 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.
+ * 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 org.apache.activemq.broker.BrokerService;
@@ -20,7 +22,7 @@
public class DuplexNetworkTest extends SimpleNetworkTest {
- protected static final Log log = LogFactory.getLog(DuplexNetworkTest.class);
+ private static final Log LOG = LogFactory.getLog(DuplexNetworkTest.class);
protected String getLocalBrokerURI() {
return "org/apache/activemq/network/duplexLocalBroker.xml";