[jboss-cvs] JBoss Messaging SVN: r5025 - branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Sep 25 04:42:18 EDT 2008
Author: gaohoward
Date: 2008-09-25 04:42:18 -0400 (Thu, 25 Sep 2008)
New Revision: 5025
Modified:
branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/DLQTest.java
branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/ExpiryQueueTest.java
Log:
JBMESSAGING-1374
Modified: branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/DLQTest.java
===================================================================
--- branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/DLQTest.java 2008-09-25 04:52:34 UTC (rev 5024)
+++ branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/DLQTest.java 2008-09-25 08:42:18 UTC (rev 5025)
@@ -501,18 +501,20 @@
ObjectName serverPeerObjectName = ServerManagement.getServerPeerObjectName();
- String testQueueName = "testQueue";
- String testTopicName = "testTopic";
+ String testQueueName = "testQueue0925";
+ String testTopicName = "testTopic0925";
- String testDLQName = "testDLQ";
- String testExpiryQName = "testExpiryQ";
+ String testDLQName = "testDLQ0925";
+ String testExpiryQName = "testExpiryQ0925";
Connection conn = null;
try
{
- ServerManagement.deployQueue("DLQ");
- ServerManagement.deployQueue("ExpiryQueue");
+ ServerManagement.deployQueue("DLQ0925");
+ ServerManagement.deployQueue("ExpiryQueue0925");
+
+ ServerManagement.setAttribute(serverPeerObjectName, "DefaultDLQ", "jboss.messaging.destination:service=Queue,name=DLQ0925");
ObjectName myQueue = ServerManagement.deployQueueWithDLQnExpiryQ(testQueueName, testDLQName, testExpiryQName);
ObjectName myTopic = ServerManagement.deployTopicWithDLQnExpiryQ(testTopicName, testDLQName, testExpiryQName);
@@ -535,7 +537,7 @@
{
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
- Queue myQRef = (Queue)ic.lookup("/queue/testQueue");
+ Queue myQRef = (Queue)ic.lookup("/queue/testQueue0925");
MessageProducer prod = sess.createProducer(myQRef);
@@ -574,7 +576,7 @@
checkEmpty(myQRef);
// Now should be in the dlq
- Queue myDLQRef = (Queue)ic.lookup("/queue/testDLQ");
+ Queue myDLQRef = (Queue)ic.lookup("/queue/testDLQ0925");
MessageConsumer cons3 = sess.createConsumer(myDLQRef);
for (int i = 0; i < NUM_MESSAGES; i++)
@@ -591,7 +593,17 @@
}
finally
{
+ ServerManagement.setAttribute(serverPeerObjectName,
+ "DefaultDLQ",
+ "jboss.messaging.destination:service=Queue,name=DLQ");
+ ServerManagement.undeployQueue("DLQ0925");
+ ServerManagement.undeployQueue("ExpiryQueue0925");
+ ServerManagement.undeployQueue("testQueue0925");
+ ServerManagement.undeployQueue("testDLQ0925");
+ ServerManagement.undeployQueue("testExpiryQ0925");
+ ServerManagement.undeployTopic("testTopic0925");
+
if (conn != null)
{
conn.close();
Modified: branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/ExpiryQueueTest.java
===================================================================
--- branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/ExpiryQueueTest.java 2008-09-25 04:52:34 UTC (rev 5024)
+++ branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/ExpiryQueueTest.java 2008-09-25 08:42:18 UTC (rev 5025)
@@ -626,7 +626,7 @@
conn.close();
}
- ServerManagement.destroyQueue("ExpiryQueue");
+ ServerManagement.undeployQueue("ExpiryQueue");
ServerManagement.setAttribute(ServerManagement.getServerPeerObjectName(),
"DefaultExpiryQueue",
@@ -645,18 +645,20 @@
final int NUM_MESSAGES = 5;
ObjectName serverPeerObjectName = ServerManagement.getServerPeerObjectName();
- String testQueueName = "testQueue";
- String testTopicName = "testTopic";
+ String testQueueName = "testQueue0925_1";
+ String testTopicName = "testTopic0925_1";
- String testDLQName = "testDLQ";
- String testExpiryQName = "testExpiryQ";
+ String testDLQName = "testDLQ0925_1";
+ String testExpiryQName = "testExpiryQ0925_1";
Connection conn = null;
try
{
- ServerManagement.deployQueue("DLQ");
- ServerManagement.deployQueue("ExpiryQueue");
+ ServerManagement.deployQueue("DLQ0925_1");
+ ServerManagement.deployQueue("ExpiryQueue0925_1");
+
+ ServerManagement.setAttribute(serverPeerObjectName, "DefaultExpiryQueue", "jboss.messaging.destination:service=Queue,name=DLQ0925_1");
ObjectName myQueue = ServerManagement.deployQueueWithDLQnExpiryQ(testQueueName, testDLQName, testExpiryQName);
ObjectName myTopic = ServerManagement.deployTopicWithDLQnExpiryQ(testTopicName, testDLQName, testExpiryQName);
@@ -675,8 +677,8 @@
{
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
- Queue myTestQRef = (Queue)ic.lookup("/queue/testQueue");
- Queue myExpQRef = (Queue)ic.lookup("/queue/testExpiryQ");
+ Queue myTestQRef = (Queue)ic.lookup("/queue/testQueue0925_1");
+ Queue myExpQRef = (Queue)ic.lookup("/queue/testExpiryQ0925_1");
MessageProducer prod = sess.createProducer(myTestQRef);
conn.start();
@@ -724,7 +726,15 @@
}
finally
{
+ ServerManagement.setAttribute(serverPeerObjectName, "DefaultExpiryQueue", "jboss.messaging.destination:service=Queue,name=ExpiryQueue");
+ ServerManagement.undeployQueue("DLQ0925_1");
+ ServerManagement.undeployQueue("ExpiryQueue0925_1");
+ ServerManagement.undeployQueue("testQueue0925_1");
+ ServerManagement.undeployQueue("testDLQ0925_1");
+ ServerManagement.undeployQueue("testExpiryQ0925_1");
+ ServerManagement.undeployTopic("testTopic0925_1");
+
if (conn != null)
{
conn.close();
More information about the jboss-cvs-commits
mailing list