JBoss hornetq SVN: r10356 - branches/Branch_2_2_EAP.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-22 23:54:43 -0400 (Tue, 22 Mar 2011)
New Revision: 10356
Modified:
branches/Branch_2_2_EAP/pom.xml
Log:
update pom
Modified: branches/Branch_2_2_EAP/pom.xml
===================================================================
--- branches/Branch_2_2_EAP/pom.xml 2011-03-23 03:47:55 UTC (rev 10355)
+++ branches/Branch_2_2_EAP/pom.xml 2011-03-23 03:54:43 UTC (rev 10356)
@@ -19,7 +19,7 @@
<groupId>org.hornetq</groupId>
<artifactId>messaging</artifactId>
<packaging>pom</packaging>
- <version>2.2.0.CR1</version>
+ <version>2.2.1.GA</version>
<properties>
<resteasy.version>2.1.0.GA</resteasy.version>
13 years, 9 months
JBoss hornetq SVN: r10355 - in branches/Branch_2_2_EAP: hornetq-rest and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-22 23:47:55 -0400 (Tue, 22 Mar 2011)
New Revision: 10355
Modified:
branches/Branch_2_2_EAP/build-maven.xml
branches/Branch_2_2_EAP/hornetq-rest/pom.xml
Log:
upload new release
Modified: branches/Branch_2_2_EAP/build-maven.xml
===================================================================
--- branches/Branch_2_2_EAP/build-maven.xml 2011-03-23 01:24:30 UTC (rev 10354)
+++ branches/Branch_2_2_EAP/build-maven.xml 2011-03-23 03:47:55 UTC (rev 10355)
@@ -13,7 +13,7 @@
-->
<project default="upload" name="HornetQ">
- <property name="hornetq.version" value="2.2.1.GA"/>
+ <property name="hornetq.version" value="2.2.1.GA-10354"/>
<property name="build.dir" value="build"/>
<property name="jars.dir" value="${build.dir}/jars"/>
Modified: branches/Branch_2_2_EAP/hornetq-rest/pom.xml
===================================================================
--- branches/Branch_2_2_EAP/hornetq-rest/pom.xml 2011-03-23 01:24:30 UTC (rev 10354)
+++ branches/Branch_2_2_EAP/hornetq-rest/pom.xml 2011-03-23 03:47:55 UTC (rev 10355)
@@ -10,7 +10,7 @@
<properties>
<resteasy.version>2.0.1.GA</resteasy.version>
- <hornetq.version>2.2.1.GA</hornetq.version>
+ <hornetq.version>2.2.1.GA-10354</hornetq.version>
</properties>
<licenses>
13 years, 9 months
JBoss hornetq SVN: r10354 - branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-22 21:24:30 -0400 (Tue, 22 Mar 2011)
New Revision: 10354
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/RealNodeManagerTest.java
Log:
fixing a test that's eventually failing on hudson
Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/RealNodeManagerTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/RealNodeManagerTest.java 2011-03-22 20:26:16 UTC (rev 10353)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/RealNodeManagerTest.java 2011-03-23 01:24:30 UTC (rev 10354)
@@ -33,7 +33,8 @@
protected void setUp() throws Exception
{
super.setUp();
- File file = new File(".", "server.lock");
+ clearData();
+ File file = new File(getTemporaryDir(), "server.lock");
if(file.exists())
{
file.delete();
@@ -42,7 +43,7 @@
public void testId() throws Exception
{
- NodeManager nodeManager = new FileLockNodeManager(".");
+ NodeManager nodeManager = new FileLockNodeManager(getTemporaryDir());
nodeManager.start();
UUID id1 = nodeManager.getUUID();
nodeManager.stop();
13 years, 9 months
JBoss hornetq SVN: r10353 - branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/core/paging/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-22 16:26:16 -0400 (Tue, 22 Mar 2011)
New Revision: 10353
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/core/paging/impl/PagingStoreImplTest.java
Log:
JBPAPP-6034 - fixing test (stop on pageStore was leaking)
Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/core/paging/impl/PagingStoreImplTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/core/paging/impl/PagingStoreImplTest.java 2011-03-22 20:15:16 UTC (rev 10352)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/core/paging/impl/PagingStoreImplTest.java 2011-03-22 20:26:16 UTC (rev 10353)
@@ -13,6 +13,7 @@
package org.hornetq.tests.unit.core.paging.impl;
+import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -747,6 +748,8 @@
storeImpl.startPaging();
assertNotNull(storeImpl.getCurrentPage());
+
+ storeImpl.stop();
}
public void testOrderOnPaging() throws Throwable
13 years, 9 months
JBoss hornetq SVN: r10352 - branches/Branch_2_2_EAP/tests/jms-tests/src/org/hornetq/jms/tests.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-22 16:15:16 -0400 (Tue, 22 Mar 2011)
New Revision: 10352
Modified:
branches/Branch_2_2_EAP/tests/jms-tests/src/org/hornetq/jms/tests/DeliveryOrderTest.java
Log:
JBPAPP-6034 - increasing timeouts to avoid failures
Modified: branches/Branch_2_2_EAP/tests/jms-tests/src/org/hornetq/jms/tests/DeliveryOrderTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/jms-tests/src/org/hornetq/jms/tests/DeliveryOrderTest.java 2011-03-22 13:57:39 UTC (rev 10351)
+++ branches/Branch_2_2_EAP/tests/jms-tests/src/org/hornetq/jms/tests/DeliveryOrderTest.java 2011-03-22 20:15:16 UTC (rev 10352)
@@ -50,7 +50,7 @@
Session sess = conn.createSession(true, Session.SESSION_TRANSACTED);
- Session sess2 = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ Session sess2 = conn.createSession(true, Session.SESSION_TRANSACTED);
MessageProducer prod = sess.createProducer(HornetQServerTestCase.queue1);
@@ -60,7 +60,7 @@
final int NUM_MESSAGES = 1000;
- MyListener listener = new MyListener(latch, NUM_MESSAGES);
+ MyListener listener = new MyListener(latch, sess2, NUM_MESSAGES);
cons.setMessageListener(listener);
@@ -81,7 +81,7 @@
// need extra commit for cases in which the last message index is not a multiple of 10
sess.commit();
- latch.await(20000, MILLISECONDS);
+ assertTrue(latch.await(20000, MILLISECONDS));
if (listener.failed)
{
@@ -109,11 +109,14 @@
private volatile boolean failed;
private String error;
+
+ private final Session sess;
- MyListener(final CountDownLatch latch, final int num)
+ MyListener(final CountDownLatch latch, final Session sess, final int num)
{
this.latch = latch;
this.num = num;
+ this.sess = sess;
}
public void onMessage(final Message msg)
@@ -124,6 +127,9 @@
return;
}
+
+ System.out.println("Message " + msg);
+
try
{
TextMessage tm = (TextMessage)msg;
@@ -137,18 +143,16 @@
}
c++;
+
+ if (c % 500 == 0)
+ {
+ sess.commit();
+ }
if (c == num)
{
+ sess.commit();
latch.countDown();
-
- try
- {
- Thread.sleep(2000);
- }
- catch (Exception e)
- {
- }
}
}
catch (JMSException e)
13 years, 9 months
JBoss hornetq SVN: r10351 - in branches/Branch_2_2_EAP: src/main/org/hornetq/core/server/cluster/impl and 3 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-22 09:57:39 -0400 (Tue, 22 Mar 2011)
New Revision: 10351
Added:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/core/server/cluster/
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/core/server/cluster/impl/
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/core/server/cluster/impl/RemoteQueueBindImplTest.java
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/filter/impl/FilterImpl.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/RemoteQueueBindingImpl.java
Log:
https://issues.jboss.org/browse/HORNETQ-659 - small fix to fix a memory leak on clustering
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/filter/impl/FilterImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/filter/impl/FilterImpl.java 2011-03-22 03:47:43 UTC (rev 10350)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/filter/impl/FilterImpl.java 2011-03-22 13:57:39 UTC (rev 10351)
@@ -107,14 +107,16 @@
try
{
result = parser.parse(sfilterString, identifiers);
-
+
resultType = result.getClass();
}
catch (Throwable e)
{
FilterImpl.log.error("Invalid filter: " + str, e);
- throw new HornetQException(HornetQException.INVALID_FILTER_EXPRESSION, "Invalid filter: " + sfilterString + " " + e.getMessage());
+ throw new HornetQException(HornetQException.INVALID_FILTER_EXPRESSION, "Invalid filter: " + sfilterString +
+ " " +
+ e.getMessage());
}
}
@@ -173,6 +175,41 @@
}
/* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((sfilterString == null) ? 0 : sfilterString.hashCode());
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ FilterImpl other = (FilterImpl)obj;
+ if (sfilterString == null)
+ {
+ if (other.sfilterString != null)
+ return false;
+ }
+ else if (!sfilterString.equals(other.sfilterString))
+ return false;
+ return true;
+ }
+
+ /* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
@@ -187,7 +224,7 @@
{
if (FilterConstants.HORNETQ_USERID.equals(fieldName))
{
- //It's the stringified (hex) representation of a user id that can be used in a selector expression
+ // It's the stringified (hex) representation of a user id that can be used in a selector expression
return new SimpleString("ID:" + msg.getUserID());
}
else if (FilterConstants.HORNETQ_PRIORITY.equals(fieldName))
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/RemoteQueueBindingImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/RemoteQueueBindingImpl.java 2011-03-22 03:47:43 UTC (rev 10350)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/RemoteQueueBindingImpl.java 2011-03-22 13:57:39 UTC (rev 10351)
@@ -181,7 +181,7 @@
public void route(final ServerMessage message, final RoutingContext context)
{
addRouteContextToMessage(message);
-
+
List<Queue> durableQueuesOnContext = context.getDurableQueues(address);
if (!durableQueuesOnContext.contains(storeAndForwardQueue))
@@ -203,7 +203,7 @@
if (i == null)
{
- filterCounts.put(filterString, 0);
+ filterCounts.put(filterString, 1);
filters.add(FilterImpl.createFilter(filterString));
}
@@ -230,7 +230,7 @@
{
filterCounts.remove(filterString);
- filters.remove(filterString);
+ filters.remove(FilterImpl.createFilter(filterString));
}
else
{
@@ -273,13 +273,17 @@
uniqueName +
"]";
}
-
+
+ public Set<Filter> getFilters()
+ {
+ return filters;
+ }
+
public void close() throws Exception
{
storeAndForwardQueue.close();
}
-
/**
* This will add routing information to the message.
* This will be later processed during the delivery between the nodes. Because of that this has to be persisted as a property on the message.
@@ -309,5 +313,4 @@
message.putBytesProperty(idsHeaderName, ids);
}
-
}
Added: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/core/server/cluster/impl/RemoteQueueBindImplTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/core/server/cluster/impl/RemoteQueueBindImplTest.java (rev 0)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/core/server/cluster/impl/RemoteQueueBindImplTest.java 2011-03-22 13:57:39 UTC (rev 10351)
@@ -0,0 +1,637 @@
+/*
+ * Copyright 2010 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.hornetq.tests.unit.core.server.cluster.impl;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.Executor;
+
+import org.hornetq.api.core.SimpleString;
+import org.hornetq.core.filter.Filter;
+import org.hornetq.core.paging.cursor.PageSubscription;
+import org.hornetq.core.server.Consumer;
+import org.hornetq.core.server.MessageReference;
+import org.hornetq.core.server.Queue;
+import org.hornetq.core.server.RoutingContext;
+import org.hornetq.core.server.ServerMessage;
+import org.hornetq.core.server.cluster.impl.RemoteQueueBindingImpl;
+import org.hornetq.core.server.impl.QueueImpl;
+import org.hornetq.core.transaction.Transaction;
+import org.hornetq.tests.util.RandomUtil;
+import org.hornetq.tests.util.UnitTestCase;
+import org.hornetq.utils.LinkedListIterator;
+
+/**
+ * A RemoteQueueBindImplTest
+ *
+ * @author clebertsuconic
+ *
+ *
+ */
+public class RemoteQueueBindImplTest extends UnitTestCase
+{
+
+ // Constants -----------------------------------------------------
+
+ // Attributes ----------------------------------------------------
+
+ // Static --------------------------------------------------------
+
+ // Constructors --------------------------------------------------
+
+ // Public --------------------------------------------------------
+
+ public void testAddRemoveConsumer() throws Exception
+ {
+
+ final long id = RandomUtil.randomLong();
+ final SimpleString address = RandomUtil.randomSimpleString();
+ final SimpleString uniqueName = RandomUtil.randomSimpleString();
+ final SimpleString routingName = RandomUtil.randomSimpleString();
+ final Long remoteQueueID = RandomUtil.randomLong();
+ final SimpleString filterString = new SimpleString("A>B");
+ final Queue storeAndForwardQueue = new FakeQueue();
+ final SimpleString bridgeName = RandomUtil.randomSimpleString();
+ final int distance = 0;
+ RemoteQueueBindingImpl binding = new RemoteQueueBindingImpl(id,
+ address,
+ uniqueName,
+ routingName,
+ remoteQueueID,
+ filterString,
+ storeAndForwardQueue,
+ bridgeName,
+ distance);
+
+ for (int i = 0; i < 100; i++)
+ {
+ binding.addConsumer(new SimpleString("B" + i + "<A"));
+ }
+
+ assertEquals(100, binding.getFilters().size());
+
+ for (int i = 0; i < 100; i++)
+ {
+ binding.removeConsumer(new SimpleString("B" + i + "<A"));
+ }
+
+ assertEquals(0, binding.getFilters().size());
+
+ }
+
+ // Package protected ---------------------------------------------
+
+ // Protected -----------------------------------------------------
+
+ // Private -------------------------------------------------------
+
+ // Inner classes -------------------------------------------------
+
+ class FakeQueue implements Queue
+ {
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Bindable#route(org.hornetq.core.server.ServerMessage, org.hornetq.core.server.RoutingContext)
+ */
+ public void route(ServerMessage message, RoutingContext context) throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getName()
+ */
+ public SimpleString getName()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getID()
+ */
+ public long getID()
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getFilter()
+ */
+ public Filter getFilter()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getPageSubscription()
+ */
+ public PageSubscription getPageSubscription()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#isDurable()
+ */
+ public boolean isDurable()
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#isTemporary()
+ */
+ public boolean isTemporary()
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#addConsumer(org.hornetq.core.server.Consumer)
+ */
+ public void addConsumer(Consumer consumer) throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#removeConsumer(org.hornetq.core.server.Consumer)
+ */
+ public void removeConsumer(Consumer consumer) throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getConsumerCount()
+ */
+ public int getConsumerCount()
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#reload(org.hornetq.core.server.MessageReference)
+ */
+ public void reload(MessageReference ref)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#addTail(org.hornetq.core.server.MessageReference)
+ */
+ public void addTail(MessageReference ref)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#addTail(org.hornetq.core.server.MessageReference, boolean)
+ */
+ public void addTail(MessageReference ref, boolean direct)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#addHead(org.hornetq.core.server.MessageReference)
+ */
+ public void addHead(MessageReference ref)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#acknowledge(org.hornetq.core.server.MessageReference)
+ */
+ public void acknowledge(MessageReference ref) throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#acknowledge(org.hornetq.core.transaction.Transaction, org.hornetq.core.server.MessageReference)
+ */
+ public void acknowledge(Transaction tx, MessageReference ref) throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#reacknowledge(org.hornetq.core.transaction.Transaction, org.hornetq.core.server.MessageReference)
+ */
+ public void reacknowledge(Transaction tx, MessageReference ref) throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#cancel(org.hornetq.core.transaction.Transaction, org.hornetq.core.server.MessageReference)
+ */
+ public void cancel(Transaction tx, MessageReference ref) throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#cancel(org.hornetq.core.server.MessageReference, long)
+ */
+ public void cancel(MessageReference reference, long timeBase) throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#deliverAsync()
+ */
+ public void deliverAsync()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getMessageCount()
+ */
+ public long getMessageCount()
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getDeliveringCount()
+ */
+ public int getDeliveringCount()
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#referenceHandled()
+ */
+ public void referenceHandled()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getScheduledCount()
+ */
+ public int getScheduledCount()
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getScheduledMessages()
+ */
+ public List<MessageReference> getScheduledMessages()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getMessagesAdded()
+ */
+ public long getMessagesAdded()
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#removeReferenceWithID(long)
+ */
+ public MessageReference removeReferenceWithID(long id) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getReference(long)
+ */
+ public MessageReference getReference(long id)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#deleteAllReferences()
+ */
+ public int deleteAllReferences() throws Exception
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#deleteReference(long)
+ */
+ public boolean deleteReference(long messageID) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#deleteMatchingReferences(org.hornetq.core.filter.Filter)
+ */
+ public int deleteMatchingReferences(Filter filter) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#expireReference(long)
+ */
+ public boolean expireReference(long messageID) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#expireReferences(org.hornetq.core.filter.Filter)
+ */
+ public int expireReferences(Filter filter) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#expireReferences()
+ */
+ public void expireReferences() throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#expire(org.hornetq.core.server.MessageReference)
+ */
+ public void expire(MessageReference ref) throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#sendMessageToDeadLetterAddress(long)
+ */
+ public boolean sendMessageToDeadLetterAddress(long messageID) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#sendMessagesToDeadLetterAddress(org.hornetq.core.filter.Filter)
+ */
+ public int sendMessagesToDeadLetterAddress(Filter filter) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#changeReferencePriority(long, byte)
+ */
+ public boolean changeReferencePriority(long messageID, byte newPriority) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#changeReferencesPriority(org.hornetq.core.filter.Filter, byte)
+ */
+ public int changeReferencesPriority(Filter filter, byte newPriority) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#moveReference(long, org.hornetq.api.core.SimpleString)
+ */
+ public boolean moveReference(long messageID, SimpleString toAddress) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#moveReference(long, org.hornetq.api.core.SimpleString, boolean)
+ */
+ public boolean moveReference(long messageID, SimpleString toAddress, boolean rejectDuplicates) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#moveReferences(org.hornetq.core.filter.Filter, org.hornetq.api.core.SimpleString)
+ */
+ public int moveReferences(Filter filter, SimpleString toAddress) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#moveReferences(org.hornetq.core.filter.Filter, org.hornetq.api.core.SimpleString, boolean)
+ */
+ public int moveReferences(Filter filter, SimpleString toAddress, boolean rejectDuplicates) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#addRedistributor(long)
+ */
+ public void addRedistributor(long delay)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#cancelRedistributor()
+ */
+ public void cancelRedistributor() throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#hasMatchingConsumer(org.hornetq.core.server.ServerMessage)
+ */
+ public boolean hasMatchingConsumer(ServerMessage message)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getConsumers()
+ */
+ public Collection<Consumer> getConsumers()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#checkRedelivery(org.hornetq.core.server.MessageReference, long)
+ */
+ public boolean checkRedelivery(MessageReference ref, long timeBase) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#iterator()
+ */
+ public LinkedListIterator<MessageReference> iterator()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#setExpiryAddress(org.hornetq.api.core.SimpleString)
+ */
+ public void setExpiryAddress(SimpleString expiryAddress)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#pause()
+ */
+ public void pause()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#resume()
+ */
+ public void resume()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#isPaused()
+ */
+ public boolean isPaused()
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getExecutor()
+ */
+ public Executor getExecutor()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#resetAllIterators()
+ */
+ public void resetAllIterators()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#blockOnExecutorFuture()
+ */
+ public boolean blockOnExecutorFuture()
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#close()
+ */
+ public void close() throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#isDirectDeliver()
+ */
+ public boolean isDirectDeliver()
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getAddress()
+ */
+ public SimpleString getAddress()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ }
+
+}
13 years, 9 months
JBoss hornetq SVN: r10350 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/stomp.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-21 23:47:43 -0400 (Mon, 21 Mar 2011)
New Revision: 10350
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/stomp/StompDecoder.java
Log:
https://issues.jboss.org/browse/HORNETQ-658 - Tweak on decoder
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/stomp/StompDecoder.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/stomp/StompDecoder.java 2011-03-21 17:36:06 UTC (rev 10349)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/stomp/StompDecoder.java 2011-03-22 03:47:43 UTC (rev 10350)
@@ -421,7 +421,7 @@
if (contentLength != -1)
{
- if (pos + contentLength > data)
+ if (pos + contentLength + 1 > data)
{
// Need more bytes
}
@@ -462,9 +462,11 @@
{
if (data > pos)
{
- // More data still in the buffer from the next packet
+ if (workingBuffer[pos] == NEW_LINE) pos++;
- System.arraycopy(workingBuffer, pos, workingBuffer, 0, data - pos);
+ if (data > pos)
+ // More data still in the buffer from the next packet
+ System.arraycopy(workingBuffer, pos, workingBuffer, 0, data - pos);
}
data = data - pos;
13 years, 9 months
JBoss hornetq SVN: r10349 - branches/Branch_2_2_EAP/src/main/org/hornetq/jms/client.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-21 13:36:06 -0400 (Mon, 21 Mar 2011)
New Revision: 10349
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/jms/client/HornetQMessageConsumer.java
Log:
https://issues.jboss.org/browse/JBPAPP-6110 - dealing with IndexOutOfBoundsException during communication errors
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/jms/client/HornetQMessageConsumer.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/jms/client/HornetQMessageConsumer.java 2011-03-21 16:19:54 UTC (rev 10348)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/jms/client/HornetQMessageConsumer.java 2011-03-21 17:36:06 UTC (rev 10349)
@@ -228,8 +228,6 @@
if (message != null)
{
- message.acknowledge();
-
msg = HornetQMessage.createMessage(message,
ackMode == Session.CLIENT_ACKNOWLEDGE ? session.getCoreSession() : null);
@@ -237,12 +235,16 @@
{
msg.doBeforeReceive();
}
- catch (Exception e)
+ catch (Throwable e)
{
HornetQMessageConsumer.log.error("Failed to prepare message for delivery", e);
return null;
}
+
+ // We Do the ack after doBeforeRecive, as in the case of large messages, this may fail so we don't want messages redelivered
+ // https://issues.jboss.org/browse/JBPAPP-6110
+ message.acknowledge();
}
return msg;
13 years, 9 months
JBoss hornetq SVN: r10348 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/postoffice/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-21 12:19:54 -0400 (Mon, 21 Mar 2011)
New Revision: 10348
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java
Log:
https://issues.jboss.org/browse/JBPAPP-6130 / https://issues.jboss.org/browse/HORNETQ-654 - removing duplicated record on redistribution
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java 2011-03-21 16:18:40 UTC (rev 10347)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java 2011-03-21 16:19:54 UTC (rev 10348)
@@ -692,12 +692,6 @@
if (routed)
{
- if (message.isDurable())
- {
- storageManager.storeMessageTransactional(tx.getID(), copyRedistribute);
- tx.setContainsPersistent();
- }
-
processRoute(copyRedistribute, context, false);
res = true;
13 years, 9 months
JBoss hornetq SVN: r10347 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-21 12:18:40 -0400 (Mon, 21 Mar 2011)
New Revision: 10347
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
Log:
improving tool to debug the journal used on investigating the data for issues
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-03-18 12:10:55 UTC (rev 10346)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-03-21 16:18:40 UTC (rev 10347)
@@ -2785,7 +2785,13 @@
private static String describeRecord(RecordInfo info)
{
- return "recordID=" + info.id + ";userRecordType=" + info.userRecordType + ";isUpdate=" + info.isUpdate + ";" + newObjectEncoding(info);
+ return "recordID=" + info.id +
+ ";userRecordType=" +
+ info.userRecordType +
+ ";isUpdate=" +
+ info.isUpdate +
+ ";" +
+ newObjectEncoding(info);
}
private static String describeRecord(RecordInfo info, Object o)
@@ -2831,13 +2837,7 @@
{
final RefEncoding encoding = new RefEncoding();
encoding.decode(buffer);
- return new Object()
- {
- public String toString()
- {
- return "ACK;" + encoding;
- }
- };
+ return new AckDescribe(encoding);
}
case UPDATE_DELIVERY_COUNT:
@@ -2942,6 +2942,7 @@
return null;
}
}
+
private static class ReferenceDescribe
{
RefEncoding refEncoding;
@@ -2950,12 +2951,30 @@
{
this.refEncoding = refEncoding;
}
+
public String toString()
{
+ return "ACK;" + refEncoding;
+ }
+
+ }
+
+ private static class AckDescribe
+ {
+ RefEncoding refEncoding;
+
+ public AckDescribe(RefEncoding refEncoding)
+ {
+ this.refEncoding = refEncoding;
+ }
+
+ public String toString()
+ {
return "AddRef;" + refEncoding;
}
}
+
private static class MessageDescribe
{
public MessageDescribe(Message msg)
@@ -2980,18 +2999,18 @@
if (value instanceof byte[])
{
buffer.append(prop + "=" + Arrays.toString((byte[])value) + ",");
-
+
}
else
{
buffer.append(prop + "=" + value + ",");
}
}
-
+
buffer.append("#properties = " + properties.size());
buffer.append("]");
-
+
buffer.append(" - " + msg.toString());
return buffer.toString();
@@ -3078,51 +3097,51 @@
public void onReadUpdateRecordTX(final long transactionID, final RecordInfo recordInfo) throws Exception
{
- out.println("operation@UpdateTX,txID@" + transactionID + "," + describeRecord(recordInfo));
+ out.println("operation@UpdateTX;txID=" + transactionID + "," + describeRecord(recordInfo));
}
public void onReadUpdateRecord(final RecordInfo recordInfo) throws Exception
{
- out.println("operation@Update," + describeRecord(recordInfo));
+ out.println("operation@Update;" + describeRecord(recordInfo));
}
public void onReadRollbackRecord(final long transactionID) throws Exception
{
- out.println("operation@Rollback,txID@" + transactionID);
+ out.println("operation@Rollback;txID=" + transactionID);
}
public void onReadPrepareRecord(final long transactionID, final byte[] extraData, final int numberOfRecords) throws Exception
{
- out.println("operation@Prepare,txID@" + transactionID +
- ",numberOfRecords@" +
+ out.println("operation@Prepare,txID=" + transactionID +
+ ",numberOfRecords=" +
numberOfRecords +
- ",extraData@" +
+ ",extraData=" +
encode(extraData));
}
public void onReadDeleteRecordTX(final long transactionID, final RecordInfo recordInfo) throws Exception
{
- out.println("operation@DeleteRecordTX,txID@" + transactionID + "," + describeRecord(recordInfo));
+ out.println("operation@DeleteRecordTX;txID=" + transactionID + "," + describeRecord(recordInfo));
}
public void onReadDeleteRecord(final long recordID) throws Exception
{
- out.println("operation@DeleteRecord,id@" + recordID);
+ out.println("operation@DeleteRecord;recordID=" + recordID);
}
public void onReadCommitRecord(final long transactionID, final int numberOfRecords) throws Exception
{
- out.println("operation@Commit,txID@" + transactionID + ",numberOfRecords@" + numberOfRecords);
+ out.println("operation@Commit;txID=" + transactionID + ",numberOfRecords=" + numberOfRecords);
}
public void onReadAddRecordTX(final long transactionID, final RecordInfo recordInfo) throws Exception
{
- out.println("operation@AddRecordTX,txID@" + transactionID + "," + describeRecord(recordInfo));
+ out.println("operation@AddRecordTX;txID=" + transactionID + "," + describeRecord(recordInfo));
}
public void onReadAddRecord(final RecordInfo recordInfo) throws Exception
{
- out.println("operation@AddRecord," + describeRecord(recordInfo));
+ out.println("operation@AddRecord;" + describeRecord(recordInfo));
}
public void markAsDataFile(final JournalFile file)
@@ -3139,7 +3158,7 @@
List<PreparedTransactionInfo> preparedTransactions = new LinkedList<PreparedTransactionInfo>();
journal.start();
-
+
final StringBuffer bufferFailingTransactions = new StringBuffer();
int messageCount = 0;
@@ -3168,24 +3187,37 @@
for (RecordInfo info : records)
{
Object o = newObjectEncoding(info);
- if(info.getUserRecordType() == 31)
+ if (info.getUserRecordType() == JournalStorageManager.ADD_MESSAGE)
{
messageCount++;
}
- else if(info.getUserRecordType() == 32)
+ else if (info.getUserRecordType() == JournalStorageManager.ADD_REF)
{
- ReferenceDescribe ref = (ReferenceDescribe) o;
+ ReferenceDescribe ref = (ReferenceDescribe)o;
Integer count = messageRefCounts.get(ref.refEncoding.queueID);
- if(count == null)
+ if (count == null)
{
count = 1;
messageRefCounts.put(ref.refEncoding.queueID, count);
}
else
{
- messageRefCounts.put(ref.refEncoding.queueID, count+1);
+ messageRefCounts.put(ref.refEncoding.queueID, count + 1);
}
}
+ else if (info.getUserRecordType() == JournalStorageManager.ACKNOWLEDGE_REF)
+ {
+ AckDescribe ref = (AckDescribe)o;
+ Integer count = messageRefCounts.get(ref.refEncoding.queueID);
+ if (count == null)
+ {
+ messageRefCounts.put(ref.refEncoding.queueID, 0);
+ }
+ else
+ {
+ messageRefCounts.put(ref.refEncoding.queueID, count - 1);
+ }
+ }
out.println(describeRecord(info, o));
}
@@ -3199,22 +3231,22 @@
{
Object o = newObjectEncoding(info);
out.println("- " + describeRecord(info, o));
- if(info.getUserRecordType() == 31)
+ if (info.getUserRecordType() == 31)
{
preparedMessageCount++;
}
- else if(info.getUserRecordType() == 32)
+ else if (info.getUserRecordType() == 32)
{
- ReferenceDescribe ref = (ReferenceDescribe) o;
+ ReferenceDescribe ref = (ReferenceDescribe)o;
Integer count = preparedMessageRefCount.get(ref.refEncoding.queueID);
- if(count == null)
+ if (count == null)
{
count = 1;
preparedMessageRefCount.put(ref.refEncoding.queueID, count);
}
else
{
- preparedMessageRefCount.put(ref.refEncoding.queueID, count+1);
+ preparedMessageRefCount.put(ref.refEncoding.queueID, count + 1);
}
}
}
@@ -3224,18 +3256,16 @@
out.println("- " + describeRecord(info) + " <marked to delete>");
}
}
-
+
String missingTX = bufferFailingTransactions.toString();
-
+
if (missingTX.length() > 0)
{
out.println();
out.println("### Failed Transactions (Missing commit/prepare/rollback record) ###");
}
-
-
+
out.println(bufferFailingTransactions.toString());
-
out.println("### Message Counts ###");
out.println("message count=" + messageCount);
13 years, 9 months