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 83eba02425..ab4a89362b 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java @@ -61,7 +61,6 @@ import org.apache.activemq.command.Message; import org.apache.activemq.command.MessageDispatch; import org.apache.activemq.command.MessageId; import org.apache.activemq.command.ProducerId; -import org.apache.activemq.command.RedeliveryPolicy; import org.apache.activemq.command.RemoveSubscriptionInfo; import org.apache.activemq.command.Response; import org.apache.activemq.command.SessionId; diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java index 556b46d2bc..4f8f6fa593 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java @@ -30,7 +30,6 @@ import javax.jms.TopicConnection; import javax.jms.TopicConnectionFactory; import javax.naming.Context; -import org.apache.activemq.command.RedeliveryPolicy; import org.apache.activemq.management.JMSStatsImpl; import org.apache.activemq.management.StatsCapable; import org.apache.activemq.management.StatsImpl; 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 4372d3ebc5..10e16e51e8 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java @@ -33,7 +33,6 @@ import org.apache.activemq.command.ConsumerId; import org.apache.activemq.command.ConsumerInfo; import org.apache.activemq.command.MessageAck; import org.apache.activemq.command.MessageDispatch; -import org.apache.activemq.command.RedeliveryPolicy; import org.apache.activemq.management.JMSConsumerStatsImpl; import org.apache.activemq.management.StatsCapable; import org.apache.activemq.management.StatsImpl; 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 747327307c..63d9589864 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java @@ -64,7 +64,6 @@ import org.apache.activemq.command.MessageAck; import org.apache.activemq.command.MessageDispatch; import org.apache.activemq.command.MessageId; import org.apache.activemq.command.ProducerId; -import org.apache.activemq.command.RedeliveryPolicy; import org.apache.activemq.command.Response; import org.apache.activemq.command.SessionId; import org.apache.activemq.command.SessionInfo; diff --git a/activemq-core/src/main/java/org/apache/activemq/command/RedeliveryPolicy.java b/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java similarity index 95% rename from activemq-core/src/main/java/org/apache/activemq/command/RedeliveryPolicy.java rename to activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java index a04dbfa5c2..5033fa7ed5 100644 --- a/activemq-core/src/main/java/org/apache/activemq/command/RedeliveryPolicy.java +++ b/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java @@ -14,7 +14,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.activemq.command; +package org.apache.activemq; + +import org.apache.activemq.command.CommandTypes; +import org.apache.activemq.command.DataStructure; /** * Configuration options used to control how messages are re-delivered when diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MarshallerFactory.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MarshallerFactory.java index 7508c9a2de..025e398e00 100755 --- a/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MarshallerFactory.java +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MarshallerFactory.java @@ -64,7 +64,6 @@ public class MarshallerFactory { add(new XATransactionIdMarshaller()); add(new JournalTraceMarshaller()); add(new FlushCommandMarshaller()); - add(new RedeliveryPolicyMarshaller()); add(new ConsumerIdMarshaller()); add(new JournalTopicAckMarshaller()); add(new ActiveMQTextMessageMarshaller()); diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v1/RedeliveryPolicyMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v1/RedeliveryPolicyMarshaller.java deleted file mode 100644 index 6262575db9..0000000000 --- a/activemq-core/src/main/java/org/apache/activemq/openwire/v1/RedeliveryPolicyMarshaller.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * - * 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 - * - * 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.openwire.v1; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; - -import org.apache.activemq.openwire.*; -import org.apache.activemq.command.*; - - -/** - * Marshalling code for Open Wire Format for RedeliveryPolicy - * - * - * NOTE!: This file is auto generated - do not modify! - * if you need to make a change, please see the modify the groovy scripts in the - * under src/gram/script and then use maven openwire:generate to regenerate - * this file. - * - * @version $Revision$ - */ -public class RedeliveryPolicyMarshaller extends org.apache.activemq.openwire.DataStreamMarshaller { - - /** - * Return the type of Data Structure we marshal - * @return short representation of the type data structure - */ - public byte getDataStructureType() { - return RedeliveryPolicy.DATA_STRUCTURE_TYPE; - } - - /** - * @return a new object instance - */ - public DataStructure createObject() { - return new RedeliveryPolicy(); - } - - /** - * Un-marshal an object instance from the data input stream - * - * @param o the object to un-marshal - * @param dataIn the data input stream to build the object from - * @throws IOException - */ - public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException { - super.unmarshal(wireFormat, o, dataIn, bs); - - RedeliveryPolicy info = (RedeliveryPolicy)o; - info.setBackOffMultiplier(dataIn.readShort()); - info.setInitialRedeliveryDelay(unmarshalLong(wireFormat, dataIn, bs)); - info.setMaximumRedeliveries(dataIn.readInt()); - info.setUseExponentialBackOff(bs.readBoolean()); - - } - - - /** - * Write the booleans that this object uses to a BooleanStream - */ - public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { - - RedeliveryPolicy info = (RedeliveryPolicy)o; - - int rc = super.marshal1(wireFormat, o, bs); - - rc+=marshal1Long(wireFormat, info.getInitialRedeliveryDelay(), bs); - - bs.writeBoolean(info.isUseExponentialBackOff()); - - return rc+6; - } - - /** - * Write a object instance to data output stream - * - * @param o the instance to be marshaled - * @param dataOut the output stream - * @throws IOException thrown if an error occurs - */ - public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException { - super.marshal2(wireFormat, o, dataOut, bs); - - RedeliveryPolicy info = (RedeliveryPolicy)o; - dataOut.writeShort(info.getBackOffMultiplier()); - marshal2Long(wireFormat, info.getInitialRedeliveryDelay(), dataOut, bs); - dataOut.writeInt(info.getMaximumRedeliveries()); - bs.readBoolean(); - - } -} diff --git a/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java b/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java index d5ead736dd..04be526e92 100644 --- a/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java @@ -24,7 +24,6 @@ import javax.jms.TextMessage; import junit.framework.Test; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.activemq.command.RedeliveryPolicy; /** * Test cases used to test the JMS message exclusive consumers. 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 1ebb0deac2..cad24eb482 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 @@ -18,8 +18,8 @@ package org.apache.activemq.broker.policy; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; +import org.apache.activemq.RedeliveryPolicy; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.activemq.command.RedeliveryPolicy; import javax.jms.Destination; import javax.jms.Message; 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 f569130168..0ed6ea80c8 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 @@ -125,7 +125,7 @@ public class JmsSendReceiveTestSupport extends TestSupport implements MessageLis if (data.length != copyOfMessages.size()) { for (Iterator iter = copyOfMessages.iterator(); iter.hasNext();) { TextMessage message = (TextMessage) iter.next(); - log.info("<== " + counter++ + " = " + message); + log.info("<== " + counter++ + " = " + message.getText()); } }