[jboss-cvs] JBoss Messaging SVN: r8062 - in branches/Branch_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807: src/main/org/jboss/jms/server/destination and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jun 24 09:38:51 EDT 2010


Author: jbertram at redhat.com
Date: 2010-06-24 09:38:50 -0400 (Thu, 24 Jun 2010)
New Revision: 8062

Modified:
   branches/Branch_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/.classpath
   branches/Branch_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/src/main/org/jboss/jms/server/destination/DestinationServiceSupport.java
   branches/Branch_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/tests/src/org/jboss/test/messaging/jms/server/destination/QueueManagementTest.java
   branches/Branch_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/tests/src/org/jboss/test/messaging/jms/server/destination/TopicManagementTest.java
Log:
JBPAPP-4481

Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/.classpath
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/.classpath	2010-06-24 13:35:30 UTC (rev 8061)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/.classpath	2010-06-24 13:38:50 UTC (rev 8062)
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="docs/examples/queue-failover/src"/>
-	<classpathentry kind="src" path="integration/EAP4/src"/>
+	<classpathentry kind="src" path="jgroups-src"/>
+	<classpathentry kind="src" path="integration/EAP4/src/main"/>
 	<classpathentry kind="src" path="integration/EAP4/tests-src"/>
 	<classpathentry kind="src" path="docs/examples/bridge/src"/>
 	<classpathentry kind="src" path="docs/examples/stateless-clustered/src"/>

Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/src/main/org/jboss/jms/server/destination/DestinationServiceSupport.java
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/src/main/org/jboss/jms/server/destination/DestinationServiceSupport.java	2010-06-24 13:35:30 UTC (rev 8061)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/src/main/org/jboss/jms/server/destination/DestinationServiceSupport.java	2010-06-24 13:38:50 UTC (rev 8062)
@@ -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_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/tests/src/org/jboss/test/messaging/jms/server/destination/QueueManagementTest.java
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/tests/src/org/jboss/test/messaging/jms/server/destination/QueueManagementTest.java	2010-06-24 13:35:30 UTC (rev 8061)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/tests/src/org/jboss/test/messaging/jms/server/destination/QueueManagementTest.java	2010-06-24 13:38:50 UTC (rev 8062)
@@ -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_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/tests/src/org/jboss/test/messaging/jms/server/destination/TopicManagementTest.java
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/tests/src/org/jboss/test/messaging/jms/server/destination/TopicManagementTest.java	2010-06-24 13:35:30 UTC (rev 8061)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP10_JBMESSAGING-1807/tests/src/org/jboss/test/messaging/jms/server/destination/TopicManagementTest.java	2010-06-24 13:38:50 UTC (rev 8062)
@@ -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