[Jboss-cvs] JBoss Messaging SVN: r1230 - in branches/Branch_1_0: src/etc/xmdesc src/main/org/jboss/jms/server tests/src/org/jboss/test/messaging/jms/server tests/src/org/jboss/test/messaging/tools tests/src/org/jboss/test/messaging/tools/jmx/rmi

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Aug 24 16:40:21 EDT 2006


Author: ovidiu.feodorov at jboss.com
Date: 2006-08-24 16:40:16 -0400 (Thu, 24 Aug 2006)
New Revision: 1230

Modified:
   branches/Branch_1_0/src/etc/xmdesc/ServerPeer-xmbean.xml
   branches/Branch_1_0/src/main/org/jboss/jms/server/ServerPeer.java
   branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/server/DestinationManagerTest.java
   branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/ServerManagement.java
   branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java
   branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/jmx/rmi/RMITestServer.java
   branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/jmx/rmi/Server.java
Log:
http://jira.jboss.org/jira/browse/JBMESSAGING-531

Modified: branches/Branch_1_0/src/etc/xmdesc/ServerPeer-xmbean.xml
===================================================================
--- branches/Branch_1_0/src/etc/xmdesc/ServerPeer-xmbean.xml	2006-08-22 21:07:07 UTC (rev 1229)
+++ branches/Branch_1_0/src/etc/xmdesc/ServerPeer-xmbean.xml	2006-08-24 20:40:16 UTC (rev 1230)
@@ -163,7 +163,9 @@
    </operation>
 
    <operation>
-      <description>Creates a queue with the specified name/JNDI name. The corresponding destination service will be instantiated, created and started</description>
+      <description>
+         Creates a queue with the specified name/JNDI name. The corresponding destination service will be instantiated, created and started.
+      </description>
       <name>createQueue</name>
       <parameter>
          <name>name</name>
@@ -177,8 +179,9 @@
    </operation>
    
    <operation>
-      <description>Creates a queue with the specified name/JNDI name and paging parameters
-         The corresponding destination service will be instantiated, created and started</description>
+      <description>
+         Creates a queue with the specified name/JNDI name and paging parameters. The corresponding destination service will be instantiated, created and started.
+      </description>
       <name>createQueue</name>
       <parameter>
          <name>name</name>
@@ -204,7 +207,9 @@
    </operation>   
 
    <operation>
-      <description>Stops and destroys the corresponding destination service. If the destination was created dynamically (via createQueue()), then the service is also unregistered from the MBean server.</description>
+      <description>
+         Stops, destroys and unregisters from the MBean server the corresponding destination service, but only if the destination in question was created programatically with createQueue(). Returns true on success. Returns false if the destination does not exist or was not created programatically. A deployed destination must be undeployed to achieve the same effect.
+      </description>
       <name>destroyQueue</name>
       <parameter>
          <name>name</name>
@@ -214,7 +219,9 @@
    </operation>
 
    <operation>
-      <description>Creates a topic with the specified name/JNDI name. The corresponding destination service will be instantiated, created and started</description>
+      <description>
+         Creates a topic with the specified name/JNDI name. The corresponding destination service will be instantiated, created and started.
+      </description>
       <name>createTopic</name>
       <parameter>
          <name>name</name>
@@ -240,8 +247,9 @@
    </operation>
    
    <operation>
-      <description>Creates a topic with the specified name/JNDI name and paging parameters
-         The corresponding destination service will be instantiated, created and started</description>
+      <description>
+         Creates a topic with the specified name/JNDI name and paging parameters. The corresponding destination service will be instantiated, created and started.
+      </description>
       <name>createTopic</name>
       <parameter>
          <name>name</name>
@@ -255,7 +263,9 @@
    </operation>   
 
    <operation>
-      <description>Stops and destroys the corresponding destination service. If can only destroy destinations that have been created programatically.</description>
+      <description>
+         Stops, destroys and unregisters from the MBean server the corresponding destination service, but only if the destination in question was created programatically with createTopic(). Returns true on success. Returns false if the destination does not exist or was not created programatically. A deployed destination must be undeployed to achieve the same effect.
+      </description>
       <name>destroyTopic</name>
       <parameter>
          <name>name</name>
@@ -264,5 +274,4 @@
       <return-type>boolean</return-type>
    </operation>
 
-
 </mbean>
\ No newline at end of file

Modified: branches/Branch_1_0/src/main/org/jboss/jms/server/ServerPeer.java
===================================================================
--- branches/Branch_1_0/src/main/org/jboss/jms/server/ServerPeer.java	2006-08-22 21:07:07 UTC (rev 1229)
+++ branches/Branch_1_0/src/main/org/jboss/jms/server/ServerPeer.java	2006-08-24 20:40:16 UTC (rev 1230)
@@ -817,7 +817,11 @@
 
       MBeanServer mbeanServer = getServer();
 
-      // we can only destroy destinations that have been created programatically
+      // we can only destroy destinations that exist AND that have been created programatically
+      if (!mbeanServer.isRegistered(on))
+      {
+         return false;
+      }
       Boolean b = (Boolean)mbeanServer.getAttribute(on, "CreatedProgrammatically");
       if (!b.booleanValue())
       {

Modified: branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/server/DestinationManagerTest.java
===================================================================
--- branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/server/DestinationManagerTest.java	2006-08-22 21:07:07 UTC (rev 1229)
+++ branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/server/DestinationManagerTest.java	2006-08-24 20:40:16 UTC (rev 1230)
@@ -84,7 +84,7 @@
       super.tearDown();
    }
 
-   public void testCreateQueue() throws Exception
+   public void testDeployQueue() throws Exception
    {
       String name = "testQueue";
 
@@ -95,7 +95,7 @@
       assertEquals(name, q.getQueueName());
    }
 
-   public void testCreateTopic() throws Exception
+   public void testDeployTopic() throws Exception
    {
       String name = "testQueue";
 
@@ -106,7 +106,7 @@
       assertEquals(name, t.getTopicName());
    }
 
-   public void testCreateQueueDifferentJNDIName() throws Exception
+   public void testDeployQueueDifferentJNDIName() throws Exception
    {
       String name = "testQueue";
       String jndiName = "/a/b/c/testQueue2";
@@ -117,7 +117,7 @@
       assertEquals(name, q.getQueueName());
    }
 
-   public void testCreateQueueDifferentJNDIName2() throws Exception
+   public void testDeployQueueDifferentJNDIName2() throws Exception
    {
       String name = "testQueue";
       String jndiName = "testQueue";
@@ -129,7 +129,7 @@
    }
 
 
-   public void testCreateTopicDifferrentJNDIName() throws Exception
+   public void testDeployTopicDifferrentJNDIName() throws Exception
    {
       String name = "testTopic";
       String jndiName = "/a/b/c/testTopic2";
@@ -140,7 +140,7 @@
       assertEquals(name, t.getTopicName());
    }
 
-   public void testCreateDuplicateQueue() throws Exception
+   public void testDeployDuplicateQueue() throws Exception
    {
       String name = "testQueue";
 
@@ -157,7 +157,7 @@
       }
    }
 
-   public void testCreateDuplicateTopic() throws Exception
+   public void testDeployDuplicateTopic() throws Exception
    {
       String name = "testTopic";
 
@@ -174,7 +174,7 @@
       }
    }
 
-   public void testCreateDuplicateQueueDifferentJNDIName() throws Exception
+   public void testDeployDuplicateQueueDifferentJNDIName() throws Exception
    {
       String name = "testQueue";
 
@@ -192,7 +192,7 @@
       }
    }
 
-   public void testCreateDuplicateTopicDifferentJNDIName() throws Exception
+   public void testDeployDuplicateTopicDifferentJNDIName() throws Exception
    {
       String name = "testTopic";
 
@@ -209,7 +209,7 @@
       }
    }
 
-   public void testCreateQueueAndTopicWithTheSameName() throws Exception
+   public void testDeployQueueAndTopicWithTheSameName() throws Exception
    {
       String name = "SomeName";
 
@@ -224,18 +224,8 @@
       assertEquals(name, t.getTopicName());
    }
 
-   public void testDestroyInexistentQueue() throws Exception
+   public void testUndeployQueue() throws Exception
    {
-      ServerManagement.undeployQueue("there is not such a queue");
-   }
-
-   public void testDestroyInexistentTopic() throws Exception
-   {
-      ServerManagement.undeployTopic("there is not such a topic");
-   }
-
-   public void testDestroyQueue() throws Exception
-   {
       String name = "testQueue";
 
       ServerManagement.deployQueue(name, null);
@@ -246,8 +236,6 @@
 
       ServerManagement.undeployQueue(name);
 
-      //assertNull(((DestinationManager)destinationManager).getCoreDestination(q));
-
       try
       {
          Object o = initialContext.lookup(ServerManagement.DEFAULT_QUEUE_CONTEXT + "/" + name);
@@ -259,7 +247,7 @@
       }
    }
 
-   public void testDestroyTopic() throws Exception
+   public void testUndeployTopic() throws Exception
    {
       String name = "testTopic";
 
@@ -271,8 +259,6 @@
 
       ServerManagement.undeployTopic(name);
 
-      //assertNull(((DestinationManager)destinationManager).getCoreDestination(t));
-
       try
       {
          Object o = initialContext.lookup(ServerManagement.DEFAULT_TOPIC_CONTEXT + "/" + name);
@@ -284,6 +270,106 @@
       }
    }
 
+   public void testCreateQueueProgramatically() throws Exception
+   {
+      String name = "SomeQueue";
+
+      ServerManagement.createQueue(name, null);
+      Queue q = (Queue)initialContext.lookup(ServerManagement.DEFAULT_QUEUE_CONTEXT + "/" + name);
+
+      assertEquals(name, q.getQueueName());
+   }
+
+   public void testCreateTopicProgramatically() throws Exception
+   {
+      String name = "SomeTopic";
+
+      ServerManagement.createTopic(name, null);
+      Topic t = (Topic)initialContext.lookup(ServerManagement.DEFAULT_TOPIC_CONTEXT + "/" + name);
+
+      assertEquals(name, t.getTopicName());
+   }
+
+   public void testUndeployInexistentQueue() throws Exception
+   {
+      ServerManagement.undeployQueue("there is not such a queue");
+   }
+
+   public void testUndeployInexistentTopic() throws Exception
+   {
+      ServerManagement.undeployTopic("there is not such a topic");
+   }
+
+   public void testDestroyQueue() throws Exception
+   {
+      String name = "AnotherQueue";
+      ServerManagement.createQueue(name, null);
+      assertTrue(ServerManagement.destroyQueue(name));
+
+      try
+      {
+         initialContext.lookup(ServerManagement.DEFAULT_QUEUE_CONTEXT + "/" + name);
+         fail("should have failed");
+      }
+      catch(NameNotFoundException e)
+      {
+         // OK
+      }
+   }
+
+   public void testDestroyTopic() throws Exception
+   {
+      String name = "AnotherTopic";
+      ServerManagement.createTopic(name, null);
+      assertTrue(ServerManagement.destroyTopic(name));
+
+      try
+      {
+         initialContext.lookup(ServerManagement.DEFAULT_TOPIC_CONTEXT + "/" + name);
+         fail("should have failed");
+      }
+      catch(NameNotFoundException e)
+      {
+         // OK
+      }
+   }
+
+   public void testDestroyInexistentQueue() throws Exception
+   {
+      assertFalse(ServerManagement.destroyQueue("NoSuchQueue"));
+   }
+
+   public void testDestroyInexistentTopic() throws Exception
+   {
+      assertFalse(ServerManagement.destroyTopic("NoSuchTopic"));
+   }
+
+   public void testDestroyDeployedQueue() throws Exception
+   {
+      String name = "ADeployedQueue";
+      ServerManagement.deployQueue(name, null);
+      assertFalse(ServerManagement.destroyQueue("ADeployedQueue"));
+
+      // the queue must not be destroyed
+
+      Queue q = (Queue)initialContext.lookup(ServerManagement.DEFAULT_QUEUE_CONTEXT + "/" + name);
+      assertEquals(name, q.getQueueName());
+   }
+
+   public void testDestroyDeployedTopic() throws Exception
+   {
+      String name = "ADeployedTopic";
+      ServerManagement.deployTopic(name, null);
+      assertFalse(ServerManagement.destroyTopic("ADeployedTopic"));
+
+      // the queue must not be destroyed
+
+      Topic q = (Topic)initialContext.lookup(ServerManagement.DEFAULT_TOPIC_CONTEXT + "/" + name);
+      assertEquals(name, q.getTopicName());      
+   }
+
+
+
    // Package protected ---------------------------------------------
    
    // Protected -----------------------------------------------------

Modified: branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/ServerManagement.java
===================================================================
--- branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/ServerManagement.java	2006-08-22 21:07:07 UTC (rev 1229)
+++ branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/ServerManagement.java	2006-08-24 20:40:16 UTC (rev 1230)
@@ -382,79 +382,157 @@
       return server.getDefaultSecurityConfig();
    }
 
+   /**
+    * Simulates a topic deployment (copying the topic descriptor in the deploy directory).
+    */
    public static void deployTopic(String name) throws Exception
    {
       deployTopic(name, null);
    }
 
+   /**
+    * Simulates a topic deployment (copying the topic descriptor in the deploy directory).
+    */
    public static void deployTopic(String name, String jndiName) throws Exception
    {
       insureStarted();
       server.deployTopic(name, jndiName);
    }
 
-   public static void deployQueue(String name) throws Exception
+   /**
+    * Simulates a topic deployment (copying the topic descriptor in the deploy directory).
+    */
+   public static void deployTopic(String name, int fullSize, int pageSize, int downCacheSize)
+      throws Exception
    {
-      deployQueue(name, null);
+      deployTopic(name, null, fullSize, pageSize, downCacheSize);
    }
 
-   public static void deployQueue(String name, String jndiName) throws Exception
+   /**
+    * Simulates a topic deployment (copying the topic descriptor in the deploy directory).
+    */
+   public static void deployTopic(String name, String jndiName, int fullSize, int pageSize,
+                                  int downCacheSize) throws Exception
    {
       insureStarted();
-      server.deployQueue(name, jndiName);
+      server.deployTopic(name, jndiName, fullSize, pageSize, downCacheSize);
    }
-   
-   public static void deployTopic(String name, int fullSize, int pageSize, int downCacheSize) throws Exception
+
+   /**
+    * Simulates a topic un-deployment (deleting the topic descriptor from the deploy directory).
+    */
+   public static void undeployTopic(String name) throws Exception
    {
-      deployTopic(name, null, fullSize, pageSize, downCacheSize);
+      undeployDestination(false, name);
    }
 
-   public static void deployTopic(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception
+   /**
+    * Creates a topic programatically.
+    */
+   public static void createTopic(String name, String jndiName) throws Exception
    {
       insureStarted();
-      server.deployTopic(name, jndiName, fullSize, pageSize, downCacheSize);
+      server.createTopic(name, jndiName);
    }
 
-   public static void deployQueue(String name, int fullSize, int pageSize, int downCacheSize) throws Exception
+   /**
+    * Destroys a programatically created topic.
+    */
+   public static boolean destroyTopic(String name) throws Exception
    {
+      return server.destroyDestination(false, name);
+   }
+
+   /**
+    * Simulates a queue deployment (copying the queue descriptor in the deploy directory).
+    */
+   public static void deployQueue(String name) throws Exception
+   {
+      deployQueue(name, null);
+   }
+
+   /**
+    * Simulates a queue deployment (copying the queue descriptor in the deploy directory).
+    */
+   public static void deployQueue(String name, String jndiName) throws Exception
+   {
+      insureStarted();
+      server.deployQueue(name, jndiName);
+   }
+
+   /**
+    * Simulates a queue deployment (copying the queue descriptor in the deploy directory).
+    */
+   public static void deployQueue(String name, int fullSize, int pageSize, int downCacheSize)
+      throws Exception
+   {
       deployQueue(name, null, fullSize, pageSize, downCacheSize);
    }
 
-   public static void deployQueue(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception
+   /**
+    * Simulates a queue deployment (copying the queue descriptor in the deploy directory).
+    */
+   public static void deployQueue(String name, String jndiName, int fullSize, int pageSize,
+                                  int downCacheSize) throws Exception
    {
       insureStarted();
       server.deployQueue(name, jndiName, fullSize, pageSize, downCacheSize);
    }
 
+   /**
+    * Simulates a queue un-deployment (deleting the queue descriptor from the deploy directory).
+    */
    public static void undeployQueue(String name) throws Exception
    {
       undeployDestination(true, name);
    }
 
-   public static void undeployTopic(String name) throws Exception
+   /**
+    * Creates a queue programatically.
+    */
+   public static void createQueue(String name, String jndiName) throws Exception
    {
-      undeployDestination(false, name);
+      insureStarted();
+      server.createQueue(name, jndiName);
    }
 
+   /**
+    * Destroys a programatically created queue.
+    */
+   public static boolean destroyQueue(String name) throws Exception
+   {
+      return server.destroyDestination(true, name);
+   }
+
+   /**
+    * Simulates a destination un-deployment (deleting the destination descriptor from the deploy
+    * directory).
+    */
    private static void undeployDestination(boolean isQueue, String name) throws Exception
    {
       insureStarted();
       server.undeployDestination(isQueue, name);
    }
-   
+
    public static void deployConnectionFactory(String objectName,
-                                             String[] jndiBindings, int prefetchSize,
-                                             int defaultTempQueueFullSize,
-                                             int defaultTempQueuePageSize,
-                                             int defaultTempQueueDownCacheSize)
-   throws Exception
+                                              String[] jndiBindings,
+                                              int prefetchSize,
+                                              int defaultTempQueueFullSize,
+                                              int defaultTempQueuePageSize,
+                                              int defaultTempQueueDownCacheSize)
+      throws Exception
    {
-      server.deployConnectionFactory(objectName, jndiBindings, prefetchSize,
-             defaultTempQueueFullSize, defaultTempQueuePageSize, defaultTempQueueDownCacheSize);
+      server.deployConnectionFactory(objectName,
+                                     jndiBindings,
+                                     prefetchSize,
+                                     defaultTempQueueFullSize,
+                                     defaultTempQueuePageSize,
+                                     defaultTempQueueDownCacheSize);
    }
 
    public static void deployConnectionFactory(String objectName,
-                                              String[] jndiBindings, int prefetchSize)
+                                              String[] jndiBindings,
+                                              int prefetchSize)
       throws Exception
    {
       server.deployConnectionFactory(objectName, jndiBindings, prefetchSize);

Modified: branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java
===================================================================
--- branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java	2006-08-22 21:07:07 UTC (rev 1229)
+++ branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java	2006-08-24 20:40:16 UTC (rev 1230)
@@ -471,25 +471,40 @@
          getAttribute(serverPeerObjectName, "Instance");
    }
 
-
    public void deployTopic(String name, String jndiName) throws Exception
    {
       deployDestination(false, name, jndiName);
    }
 
+   public void deployTopic(String name, String jndiName, int fullSize, int pageSize,
+                           int downCacheSize) throws Exception
+   {
+      deployDestination(false, name, jndiName, fullSize, pageSize, downCacheSize);
+   }
+
+   public void createTopic(String name, String jndiName) throws Exception
+   {
+      sc.invoke(serverPeerObjectName, "createTopic",
+                new Object[] { name, jndiName },
+                new String[] { "java.lang.String", "java.lang.String"} );
+   }
+
    public void deployQueue(String name, String jndiName) throws Exception
    {
       deployDestination(true, name, jndiName);
    }
    
-   public void deployTopic(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception
+   public void deployQueue(String name, String jndiName, int fullSize, int pageSize,
+                           int downCacheSize) throws Exception
    {
-      deployDestination(false, name, jndiName, fullSize, pageSize, downCacheSize);
+      deployDestination(true, name, jndiName, fullSize, pageSize, downCacheSize);
    }
 
-   public void deployQueue(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception
+   public void createQueue(String name, String jndiName) throws Exception
    {
-      deployDestination(true, name, jndiName, fullSize, pageSize, downCacheSize);
+      sc.invoke(serverPeerObjectName, "createQueue",
+                new Object[] { name, jndiName },
+                new String[] { "java.lang.String", "java.lang.String"} );
    }
 
    public void deployDestination(boolean isQueue, String name, String jndiName) throws Exception
@@ -509,7 +524,12 @@
       sc.invoke(deston, "start", new Object[0], new String[0]);
    }
    
-   public void deployDestination(boolean isQueue, String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception
+   public void deployDestination(boolean isQueue,
+                                 String name,
+                                 String jndiName,
+                                 int fullSize,
+                                 int pageSize,
+                                 int downCacheSize) throws Exception
    {
       log.info("deploying queue, fullsize:" + fullSize + ", ps:" + pageSize + " dc size:" + downCacheSize);
       
@@ -551,8 +571,23 @@
       sc.invoke(destinationObjectName, "destroy", new Object[0], new String[0]);
       sc.unregisterService(destinationObjectName);
    }
-   
-   
+
+   public boolean destroyDestination(boolean isQueue, String name) throws Exception
+   {
+      if (isQueue)
+      {
+         return  ((Boolean)sc.invoke(serverPeerObjectName, "destroyQueue",
+                                    new Object[] { name },
+                                    new String[] { "java.lang.String"})).booleanValue();
+      }
+      else
+      {
+         return  ((Boolean)sc.invoke(serverPeerObjectName, "destroyTopic",
+                                    new Object[] { name },
+                                    new String[] { "java.lang.String"})).booleanValue();
+      }
+   }
+
    public void deployConnectionFactory(String objectName,
                                        String[] jndiBindings,
                                        int prefetchSize) throws Exception

Modified: branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/jmx/rmi/RMITestServer.java
===================================================================
--- branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/jmx/rmi/RMITestServer.java	2006-08-22 21:07:07 UTC (rev 1229)
+++ branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/jmx/rmi/RMITestServer.java	2006-08-24 20:40:16 UTC (rev 1230)
@@ -135,32 +135,52 @@
       server.deployTopic(name, jndiName);
    }
    
-   public void deployQueue(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception
+   public void deployQueue(String name,
+                           String jndiName,
+                           int fullSize,
+                           int pageSize,
+                           int downCacheSize) throws Exception
    {
       server.deployQueue(name, jndiName, fullSize, pageSize, downCacheSize);
    }
 
-   public void deployTopic(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception
+   public void createQueue(String name, String jndiName) throws Exception
    {
+      server.createQueue(name, jndiName);
+   }
+
+   public void deployTopic(String name,
+                           String jndiName,
+                           int fullSize,
+                           int pageSize,
+                           int downCacheSize) throws Exception
+   {
       server.deployTopic(name, jndiName, fullSize, pageSize, downCacheSize);
    }
 
-   public void deployConnectionFactory(String objectName, String[] jndiBindings) throws Exception
+   public void createTopic(String name, String jndiName) throws Exception
    {
+      server.createTopic(name, jndiName);
+   }
+
+   public void deployConnectionFactory(String objectName, String[] jndiBindings)
+      throws Exception
+   {
       server.deployConnectionFactory(objectName, jndiBindings);
    }
    
-   public void deployConnectionFactory(String objectName, String[] jndiBindings, int prefetchSize) throws Exception
+   public void deployConnectionFactory(String objectName, String[] jndiBindings, int prefetchSize)
+      throws Exception
    {
       server.deployConnectionFactory(objectName, jndiBindings, prefetchSize);
    }
-   
+
    public void deployConnectionFactory(String objectName,
-            String[] jndiBindings,
-            int prefetchSize,
-            int defaultTempQueueFullSize,
-            int defaultTempQueuePageSize,
-            int defaultTempQueueDownCacheSize) throws Exception
+                                       String[] jndiBindings,
+                                       int prefetchSize,
+                                       int defaultTempQueueFullSize,
+                                       int defaultTempQueuePageSize,
+                                       int defaultTempQueueDownCacheSize) throws Exception
    {
       server.deployConnectionFactory(objectName, jndiBindings, prefetchSize,
                defaultTempQueueFullSize, defaultTempQueuePageSize, defaultTempQueueDownCacheSize);
@@ -314,6 +334,11 @@
       server.undeployDestination(isQueue, name);
    }
 
+   public boolean destroyDestination(boolean isQueue, String name) throws Exception
+   {
+      return server.destroyDestination(isQueue, name);
+   }
+
    public Object executeCommand(Command command) throws Exception
    {
       return server.executeCommand(command);

Modified: branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/jmx/rmi/Server.java
===================================================================
--- branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/jmx/rmi/Server.java	2006-08-22 21:07:07 UTC (rev 1229)
+++ branches/Branch_1_0/tests/src/org/jboss/test/messaging/tools/jmx/rmi/Server.java	2006-08-24 20:40:16 UTC (rev 1230)
@@ -129,23 +129,63 @@
     */
    ServerPeer getServerPeer() throws Exception;
 
+   /**
+    * Simulates a topic deployment (copying the topic descriptor in the deploy directory).
+    */
    void deployTopic(String name, String jndiName) throws Exception;
+
+   /**
+    * Simulates a topic deployment (copying the topic descriptor in the deploy directory).
+    */
+   void deployTopic(String name, String jndiName, int fullSize, int pageSize,
+                    int downCacheSize) throws Exception;
+
+   /**
+    * Creates a topic programatically.
+    */
+   void createTopic(String name, String jndiName) throws Exception;
+
+   /**
+    * Simulates a queue deployment (copying the queue descriptor in the deploy directory).
+    */
    void deployQueue(String name, String jndiName) throws Exception;
-   void deployTopic(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception;
-   void deployQueue(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception;
+
+   /**
+    * Simulates a queue deployment (copying the queue descriptor in the deploy directory).
+    */
+   void deployQueue(String name, String jndiName, int fullSize, int pageSize,
+                    int downCacheSize) throws Exception;
+
+   /**
+    * Creates a queue programatically.
+    */
+   void createQueue(String name, String jndiName) throws Exception;
+
+   /**
+    * Simulates a destination un-deployment (deleting the destination descriptor from the deploy
+    * directory).
+    */
    void undeployDestination(boolean isQueue, String name) throws Exception;
 
+   /**
+    * Destroys a programatically created destination.
+    */
+   boolean destroyDestination(boolean isQueue, String name) throws Exception;
+
    void deployConnectionFactory(String objectName,
             String[] jndiBindings,
             int prefetchSize,
             int defaultTempQueueFullSize,
             int defaultTempQueuePageSize,
             int defaultTempQueueDownCacheSize) throws Exception;
+
    void deployConnectionFactory(String objectName,
                                 String[] jndiBindings,
                                 int prefetchSize) throws Exception;
+
    void deployConnectionFactory(String objectName,
-                                String[] jndiBindings) throws Exception;   
+                                String[] jndiBindings) throws Exception;
+
    void undeployConnectionFactory(ObjectName objectName) throws Exception;
 
    /**




More information about the jboss-cvs-commits mailing list