JBoss hornetq SVN: r10542 - branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/server/management.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-04-19 16:35:49 -0400 (Tue, 19 Apr 2011)
New Revision: 10542
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java
Log:
tweak
Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java 2011-04-19 20:35:40 UTC (rev 10541)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java 2011-04-19 20:35:49 UTC (rev 10542)
@@ -91,7 +91,7 @@
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new TransportConfiguration(acceptorFactory));
- server = HornetQServers.newHornetQServer(conf, mbeanServer, false);
+ server = HornetQServers.newHornetQServer(conf, mbeanServer, true);
server.start();
context = new InVMContext();
13 years, 8 months
JBoss hornetq SVN: r10541 - branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/tests/src/org/hornetq/tests/integration/jms/server/management.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-04-19 16:35:40 -0400 (Tue, 19 Apr 2011)
New Revision: 10541
Modified:
branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java
Log:
Tweak on tests
Modified: branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java
===================================================================
--- branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java 2011-04-19 20:03:02 UTC (rev 10540)
+++ branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java 2011-04-19 20:35:40 UTC (rev 10541)
@@ -91,7 +91,7 @@
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new TransportConfiguration(acceptorFactory));
- server = HornetQServers.newHornetQServer(conf, mbeanServer, false);
+ server = HornetQServers.newHornetQServer(conf, mbeanServer, true);
server.start();
context = new InVMContext();
13 years, 8 months
JBoss hornetq SVN: r10540 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-04-19 16:03:02 -0400 (Tue, 19 Apr 2011)
New Revision: 10540
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java
Log:
JBPAPP-6327 - fixing test
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-04-19 19:59:45 UTC (rev 10539)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-04-19 20:03:02 UTC (rev 10540)
@@ -899,21 +899,25 @@
count++;
}
- // System.out.println("QueueMemorySize before depage = " + queueMemorySize.get());
- while (pageIterator.hasNext())
+
+ if (pageIterator != null)
{
- PagedReference reference = pageIterator.next();
- pageIterator.remove();
-
- if (filter == null || filter.match(reference.getMessage()))
+ // System.out.println("QueueMemorySize before depage = " + queueMemorySize.get());
+ while (pageIterator.hasNext())
{
- count++;
- pageSubscription.ack(reference);
+ PagedReference reference = pageIterator.next();
+ pageIterator.remove();
+
+ if (filter == null || filter.match(reference.getMessage()))
+ {
+ count++;
+ pageSubscription.ack(reference);
+ }
+ else
+ {
+ addTail(reference, false);
+ }
}
- else
- {
- addTail(reference, false);
- }
}
tx.commit();
13 years, 8 months
JBoss hornetq SVN: r10539 - branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/src/main/org/hornetq/core/server/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-04-19 15:59:45 -0400 (Tue, 19 Apr 2011)
New Revision: 10539
Modified:
branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/src/main/org/hornetq/core/server/impl/QueueImpl.java
Log:
Fixing test
Modified: branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-04-19 19:32:59 UTC (rev 10538)
+++ branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-04-19 19:59:45 UTC (rev 10539)
@@ -899,21 +899,25 @@
count++;
}
- // System.out.println("QueueMemorySize before depage = " + queueMemorySize.get());
- while (pageIterator.hasNext())
+
+ if (pageIterator != null)
{
- PagedReference reference = pageIterator.next();
- pageIterator.remove();
-
- if (filter == null || filter.match(reference.getMessage()))
+ // System.out.println("QueueMemorySize before depage = " + queueMemorySize.get());
+ while (pageIterator.hasNext())
{
- count++;
- pageSubscription.ack(reference);
+ PagedReference reference = pageIterator.next();
+ pageIterator.remove();
+
+ if (filter == null || filter.match(reference.getMessage()))
+ {
+ count++;
+ pageSubscription.ack(reference);
+ }
+ else
+ {
+ addTail(reference, false);
+ }
}
- else
- {
- addTail(reference, false);
- }
}
tx.commit();
13 years, 8 months
JBoss hornetq SVN: r10538 - 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-04-19 15:32:59 -0400 (Tue, 19 Apr 2011)
New Revision: 10538
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
Log:
small tweak
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-04-19 18:39:30 UTC (rev 10537)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-04-19 19:32:59 UTC (rev 10538)
@@ -129,11 +129,6 @@
public static final byte SECURITY_RECORD = 26;
- // type + expiration + timestamp + priority
- public static final int SIZE_FIELDS = DataConstants.SIZE_INT + DataConstants.SIZE_LONG +
- DataConstants.SIZE_LONG +
- DataConstants.SIZE_BYTE;
-
// Message journal record types
public static final byte ADD_LARGE_MESSAGE = 30;
13 years, 8 months
JBoss hornetq SVN: r10537 - branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/src/config/common.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-04-19 14:39:30 -0400 (Tue, 19 Apr 2011)
New Revision: 10537
Modified:
branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/src/config/common/hornetq-version.properties
Log:
Version change
Modified: branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/src/config/common/hornetq-version.properties
===================================================================
--- branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/src/config/common/hornetq-version.properties 2011-04-19 18:34:30 UTC (rev 10536)
+++ branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/src/config/common/hornetq-version.properties 2011-04-19 18:39:30 UTC (rev 10537)
@@ -1,4 +1,4 @@
-hornetq.version.versionName=Favo de Mel
+hornetq.version.versionName=One-off-jbpapp-6277
hornetq.version.majorVersion=2
hornetq.version.minorVersion=2
hornetq.version.microVersion=2
13 years, 8 months
JBoss hornetq SVN: r10536 - branches/one-offs.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-04-19 14:34:30 -0400 (Tue, 19 Apr 2011)
New Revision: 10536
Added:
branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/
Log:
Creating one-off branch for JBPAPP-6277
13 years, 8 months
JBoss hornetq SVN: r10535 - branches.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-04-19 14:33:27 -0400 (Tue, 19 Apr 2011)
New Revision: 10535
Added:
branches/one-offs/
Log:
creating new directory
13 years, 8 months
JBoss hornetq SVN: r10534 - in branches/Branch_2_2_EAP: src/main/org/hornetq/core/server/impl and 1 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-04-19 13:45:34 -0400 (Tue, 19 Apr 2011)
New Revision: 10534
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/impl/QueueImpl.java
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java
Log:
JBPAPP-6327 - Delete of paged messages through JMSQueueControl
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-04-19 15:52:06 UTC (rev 10533)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/filter/impl/FilterImpl.java 2011-04-19 17:45:34 UTC (rev 10534)
@@ -79,7 +79,7 @@
*/
public static Filter createFilter(final String filterStr) throws HornetQException
{
- return FilterImpl.createFilter(SimpleString.toSimpleString(filterStr));
+ return FilterImpl.createFilter(SimpleString.toSimpleString(filterStr == null ? null : filterStr.trim()));
}
/**
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-04-19 15:52:06 UTC (rev 10533)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-04-19 17:45:34 UTC (rev 10534)
@@ -898,8 +898,31 @@
acknowledge(tx, messageReference);
count++;
}
+
+ // System.out.println("QueueMemorySize before depage = " + queueMemorySize.get());
+ while (pageIterator.hasNext())
+ {
+ PagedReference reference = pageIterator.next();
+ pageIterator.remove();
+ if (filter == null || filter.match(reference.getMessage()))
+ {
+ count++;
+ pageSubscription.ack(reference);
+ }
+ else
+ {
+ addTail(reference, false);
+ }
+ }
+
tx.commit();
+
+
+ if (filter != null && pageIterator != null)
+ {
+ scheduleDepage();
+ }
return count;
}
Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java 2011-04-19 15:52:06 UTC (rev 10533)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java 2011-04-19 17:45:34 UTC (rev 10534)
@@ -22,6 +22,7 @@
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
+import javax.jms.Queue;
import javax.jms.Session;
import javax.naming.Context;
@@ -39,11 +40,11 @@
import org.hornetq.api.jms.JMSFactoryType;
import org.hornetq.api.jms.management.JMSQueueControl;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
+import org.hornetq.core.settings.impl.AddressFullMessagePolicy;
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.jms.client.HornetQConnectionFactory;
import org.hornetq.jms.client.HornetQDestination;
@@ -1014,7 +1015,112 @@
serverManager.destroyQueue(otherQueueName);
}
+
+ public void testDeleteWithPaging() throws Exception
+ {
+ AddressSettings pagedSetting = new AddressSettings();
+ pagedSetting.setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE);
+ pagedSetting.setPageSizeBytes(10 * 1024);
+ pagedSetting.setMaxSizeBytes(100 * 1024);
+ server.getAddressSettingsRepository().addMatch("#", pagedSetting);
+
+ serverManager.createQueue(true, "pagedTest", null, true, "/queue/pagedTest");
+
+ HornetQQueue pagedQueue = (HornetQQueue)context.lookup("/queue/pagedTest");
+
+ ServerLocator locator = createInVMNonHALocator();
+
+ ClientSessionFactory sf = locator.createSessionFactory();
+
+ ClientSession session = sf.createSession(true, true);
+
+ ClientProducer prod = session.createProducer(pagedQueue.getAddress());
+
+ ClientMessage msg = session.createMessage(true);
+
+ msg.getBodyBuffer().writeBytes(new byte[90 * 1024]);
+ for (int i = 0 ; i < 100; i++)
+ {
+ prod.send(msg);
+ }
+
+ JMSQueueControl control = createManagementControl(pagedQueue);
+
+ assertEquals(100, control.removeMessages(" "));
+
+
+
+ session.start();
+
+ ClientConsumer consumer = session.createConsumer(pagedQueue.getAddress());
+
+ assertNull(consumer.receive(300));
+
+
+ session.close();
+
+ sf.close();
+ locator.close();
+ }
+
+
+ public void testDeleteWithPagingAndFilter() throws Exception
+ {
+ AddressSettings pagedSetting = new AddressSettings();
+ pagedSetting.setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE);
+ pagedSetting.setPageSizeBytes(10 * 1024);
+ pagedSetting.setMaxSizeBytes(100 * 1024);
+ server.getAddressSettingsRepository().addMatch("#", pagedSetting);
+
+ serverManager.createQueue(true, "pagedTest", null, true, "/queue/pagedTest");
+
+ HornetQQueue pagedQueue = (HornetQQueue)context.lookup("/queue/pagedTest");
+
+
+ ServerLocator locator = createInVMNonHALocator();
+
+ ClientSessionFactory sf = locator.createSessionFactory();
+
+ ClientSession session = sf.createSession(true, true);
+
+ ClientProducer prod = session.createProducer(pagedQueue.getAddress());
+ for (int i = 0 ; i < 200; i++)
+ {
+ ClientMessage msg = session.createMessage(true);
+ msg.getBodyBuffer().writeBytes(new byte[90 * 1024]);
+ msg.putBooleanProperty("even", i % 2 == 0);
+ prod.send(msg);
+ }
+
+ JMSQueueControl control = createManagementControl(pagedQueue);
+
+ assertEquals(100, control.removeMessages("even=true"));
+
+ session.start();
+
+ ClientConsumer consumer = session.createConsumer(pagedQueue.getAddress());
+
+
+
+ for (int i = 0 ; i < 100; i++)
+ {
+ ClientMessage msg = consumer.receive(1000);
+ assertNotNull(msg);
+ msg.acknowledge();
+ assertFalse(msg.getBooleanProperty("even").booleanValue());
+ }
+
+ assertNull(consumer.receive(300));
+
+
+ session.close();
+
+
+ sf.close();
+ locator.close();
+ }
+
public void testMoveMessageToUnknownQueue() throws Exception
{
String unknwonQueue = RandomUtil.randomString();
@@ -1070,7 +1176,7 @@
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
conf.setFileDeploymentEnabled(false);
- server = HornetQServers.newHornetQServer(conf, mbeanServer, false);
+ server = HornetQServers.newHornetQServer(conf, mbeanServer, true);
server.start();
serverManager = new JMSServerManagerImpl(server);
@@ -1106,9 +1212,14 @@
protected JMSQueueControl createManagementControl() throws Exception
{
- return ManagementControlHelper.createJMSQueueControl(queue, mbeanServer);
+ return createManagementControl(queue);
}
+ protected JMSQueueControl createManagementControl(HornetQQueue queueParameter) throws Exception
+ {
+ return ManagementControlHelper.createJMSQueueControl(queueParameter, mbeanServer);
+ }
+
// Private -------------------------------------------------------
private Connection createConnection() throws JMSException
13 years, 8 months
JBoss hornetq SVN: r10533 - trunk.
by do-not-reply@jboss.org
Author: ataylor
Date: 2011-04-19 11:52:06 -0400 (Tue, 19 Apr 2011)
New Revision: 10533
Modified:
trunk/hornetq.iws
Log:
intellij file
Modified: trunk/hornetq.iws
===================================================================
--- trunk/hornetq.iws 2011-04-19 15:51:31 UTC (rev 10532)
+++ trunk/hornetq.iws 2011-04-19 15:52:06 UTC (rev 10533)
@@ -3,11 +3,6 @@
<component name="ChangeListManager">
<list default="true" readonly="true" id="a2aae645-dbcd-4d6e-9c99-efa05d93589a" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/hornetq.iws" afterPath="$PROJECT_DIR$/hornetq.iws" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/pom.xml" afterPath="$PROJECT_DIR$/pom.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/tests/concurrent-tests/pom.xml" afterPath="$PROJECT_DIR$/tests/concurrent-tests/pom.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/tests/performance-tests/pom.xml" afterPath="$PROJECT_DIR$/tests/performance-tests/pom.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/tests/soak-tests/pom.xml" afterPath="$PROJECT_DIR$/tests/soak-tests/pom.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/tests/stress-tests/pom.xml" afterPath="$PROJECT_DIR$/tests/stress-tests/pom.xml" />
</list>
<ignored path=".idea/workspace.xml" />
<ignored path="$USER_HOME_GRAILS$/" />
@@ -1972,7 +1967,7 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
- <frame x="-4" y="24" width="1928" height="1160" extended-state="6" />
+ <frame x="-4" y="24" width="1928" height="1160" extended-state="7" />
<editor active="false" />
<layout>
<window_info id="Changes" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.35579783" sideWeight="0.0" order="7" side_tool="false" content_ui="tabs" />
@@ -2015,7 +2010,7 @@
<option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
<option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
- <option name="LAST_COMMIT_MESSAGE" value="updated test profile" />
+ <option name="LAST_COMMIT_MESSAGE" value="intellij file" />
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
@@ -2028,7 +2023,6 @@
<option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
- <MESSAGE value="mavenised examples " />
<MESSAGE value="mavenised examples part 2 " />
<MESSAGE value="mavenised examples part 3 " />
<MESSAGE value="fixed pom name" />
@@ -2053,6 +2047,7 @@
<MESSAGE value="added release profile" />
<MESSAGE value="added test profile" />
<MESSAGE value="updated test profile" />
+ <MESSAGE value="intellij file" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
13 years, 8 months