[jboss-cvs] JBoss Messaging SVN: r8056 - in branches/Branch_1_4: tests/src/org/jboss/test/messaging/jms/server/destination and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jun 9 23:36:04 EDT 2010
Author: gaohoward
Date: 2010-06-09 23:36:03 -0400 (Wed, 09 Jun 2010)
New Revision: 8056
Modified:
branches/Branch_1_4/src/main/org/jboss/jms/server/destination/DestinationServiceSupport.java
branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/server/destination/QueueManagementTest.java
branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/server/destination/TopicManagementTest.java
Log:
JBMESSAGING-1807
Modified: branches/Branch_1_4/src/main/org/jboss/jms/server/destination/DestinationServiceSupport.java
===================================================================
--- branches/Branch_1_4/src/main/org/jboss/jms/server/destination/DestinationServiceSupport.java 2010-06-04 07:56:10 UTC (rev 8055)
+++ branches/Branch_1_4/src/main/org/jboss/jms/server/destination/DestinationServiceSupport.java 2010-06-10 03:36:03 UTC (rev 8056)
@@ -105,9 +105,15 @@
//https://jira.jboss.org/jira/browse/JBMESSAGING-1667
if (name.contains("/"))
{
- throw new IllegalStateException("The " + (isQueue() ? "queue" : "topic") +
+ //https://jira.jboss.org/jira/browse/JBMESSAGING-1807
+ String jndiName = getJNDIName();
+
+ if (jndiName == null)
+ {
+ throw new IllegalStateException("The " + (isQueue() ? "queue" : "topic") +
" " +
"name should not contain forward slash: " + name);
+ }
}
destination.setName(name);
Modified: branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/server/destination/QueueManagementTest.java
===================================================================
--- branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/server/destination/QueueManagementTest.java 2010-06-04 07:56:10 UTC (rev 8055)
+++ branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/server/destination/QueueManagementTest.java 2010-06-10 03:36:03 UTC (rev 8056)
@@ -914,6 +914,22 @@
}
}
+ //https://jira.jboss.org/browse/JBMESSAGING-1807
+ public void testQueueDeploymentWithForwardSlashedName2() throws Exception
+ {
+ String config =
+ "<mbean code=\"org.jboss.jms.server.destination.QueueService\" " +
+ " name=\"somedomain:service=Queue,name=example/tests/myqueue/ver1\"" +
+ " xmbean-dd=\"xmdesc/Queue-xmbean.xml\">" +
+ " <depends optional-attribute-name=\"ServerPeer\">jboss.messaging:service=ServerPeer</depends>" +
+ " <attribute name=\"MessageCounterHistoryDayLimit\">10</attribute>" +
+ " <attribute name=\"JNDIName\">queue/example/tests/myqueue/ver1</attribute>" +
+ "</mbean>";
+
+ deploy(config);
+ undeployDestination("example/tests/myqueue/ver1");
+ }
+
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
Modified: branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/server/destination/TopicManagementTest.java
===================================================================
--- branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/server/destination/TopicManagementTest.java 2010-06-04 07:56:10 UTC (rev 8055)
+++ branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/server/destination/TopicManagementTest.java 2010-06-10 03:36:03 UTC (rev 8056)
@@ -933,6 +933,22 @@
}
}
+ //https://jira.jboss.org/browse/JBMESSAGING-1807
+ public void testTopicDeploymentWithForwardSlashedName2() throws Exception
+ {
+ String config =
+ "<mbean code=\"org.jboss.jms.server.destination.TopicService\" " +
+ " name=\"somedomain:service=Topic,name=example/tests/mytopic/ver1\"" +
+ " xmbean-dd=\"xmdesc/Topic-xmbean.xml\">" +
+ " <depends optional-attribute-name=\"ServerPeer\">jboss.messaging:service=ServerPeer</depends>" +
+ " <attribute name=\"MessageCounterHistoryDayLimit\">10</attribute>" +
+ " <attribute name=\"JNDIName\">/topic/whatever</attribute>" +
+ "</mbean>";
+
+ deploy(config);
+ undeployDestination("example/tests/mytopic/ver1");
+ }
+
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
More information about the jboss-cvs-commits
mailing list