[jboss-cvs] JBossAS SVN: r100070 - in branches/Branch_Hornet_Temporary_2: hornetq-int/src/main/java/org/jboss/jms/testintegration and 6 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jan 28 13:55:18 EST 2010
Author: clebert.suconic at jboss.com
Date: 2010-01-28 13:55:17 -0500 (Thu, 28 Jan 2010)
New Revision: 100070
Added:
branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/test/JoramUnitTestCase.java
branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/test/joram/
branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/test/joram/JoramTestAdminDelegate.java
Removed:
branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/JBossMessagingAdmin.java
branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossMessagingJoramUnitTestCase.java
Modified:
branches/Branch_Hornet_Temporary_2/component-matrix/pom.xml
branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/testintegration/HornetQTestAdmin.java
branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/testintegration/JMSTestAdmin.java
branches/Branch_Hornet_Temporary_2/testsuite/build.xml
branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/SmokeTestSuite.java
branches/Branch_Hornet_Temporary_2/testsuite/src/resources/jbossmessaging/provider.properties
Log:
test changes
Modified: branches/Branch_Hornet_Temporary_2/component-matrix/pom.xml
===================================================================
--- branches/Branch_Hornet_Temporary_2/component-matrix/pom.xml 2010-01-28 18:52:22 UTC (rev 100069)
+++ branches/Branch_Hornet_Temporary_2/component-matrix/pom.xml 2010-01-28 18:55:17 UTC (rev 100070)
@@ -1223,7 +1223,7 @@
<dependency>
<groupId>objectweb-joramtests</groupId>
<artifactId>joramtests</artifactId>
- <version>1.5</version>
+ <version>1.6</version>
</dependency>
<dependency>
Modified: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/testintegration/HornetQTestAdmin.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/testintegration/HornetQTestAdmin.java 2010-01-28 18:52:22 UTC (rev 100069)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/testintegration/HornetQTestAdmin.java 2010-01-28 18:55:17 UTC (rev 100070)
@@ -41,14 +41,24 @@
public Object createQueue(String name, TestRole[] securityConfig) throws Exception
{
- jmx.invoke(hornetQJMSServerName, "createQueue", new Object[] { name, "/queue/" + name }, new String[] { "java.lang.String", "java.lang.String" });
+ return createQueue(name, "/queue/" + name, securityConfig);
+ }
+
+ public Object createQueue(String name, String jndi, TestRole[] securityConfig) throws Exception
+ {
+ jmx.invoke(hornetQJMSServerName, "createQueue", new Object[] { name, jndi }, new String[] { "java.lang.String", "java.lang.String" });
deployedQueues.add(name);
return name;
}
public Object createTopic(String name, TestRole[] securityConfig) throws Exception
{
- jmx.invoke(hornetQJMSServerName, "createTopic", new Object[] { name, "/topic/" + name }, new String[] { "java.lang.String", "java.lang.String" });
+ return createTopic(name, "/topic/" + name, securityConfig);
+ }
+
+ public Object createTopic(String name, String jndi, TestRole[] securityConfig) throws Exception
+ {
+ jmx.invoke(hornetQJMSServerName, "createTopic", new Object[] { name, jndi }, new String[] { "java.lang.String", "java.lang.String" });
deployedTopics.add(name);
return name;
}
Modified: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/testintegration/JMSTestAdmin.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/testintegration/JMSTestAdmin.java 2010-01-28 18:52:22 UTC (rev 100069)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/testintegration/JMSTestAdmin.java 2010-01-28 18:55:17 UTC (rev 100070)
@@ -35,13 +35,17 @@
* @return information about the deployment required to undeploy/remove the topic
* @throws Exception
*/
- public abstract Object createTopic(String name, TestRole[] securityConfig) throws Exception;
+ public abstract Object createTopic(String name, TestRole[] securityConfig) throws Exception;
+ public abstract Object createTopic(String name, String jndi, TestRole[] securityConfig) throws Exception;
+
public abstract void deleteTopic(Object topic) throws Exception;
public abstract Object createQueue(String name, TestRole[] securityConfig) throws Exception;
- public abstract void deleteQueue(Object queue) throws Exception;
+ public abstract Object createQueue(String name, String jndi, TestRole[] securityConfig) throws Exception;
+
+ public abstract void deleteQueue(Object queue) throws Exception;
public abstract void undeployCreatedDestinations() throws Exception;
}
Modified: branches/Branch_Hornet_Temporary_2/testsuite/build.xml
===================================================================
--- branches/Branch_Hornet_Temporary_2/testsuite/build.xml 2010-01-28 18:52:22 UTC (rev 100069)
+++ branches/Branch_Hornet_Temporary_2/testsuite/build.xml 2010-01-28 18:55:17 UTC (rev 100070)
@@ -181,7 +181,7 @@
<fileset refid="org.jboss.aop:jboss-aop-asintegration-mc:jar"/>
<fileset refid="org.jboss.aop:jboss-aop-aspects:jar"/>
<fileset refid="org.jboss.aop:jboss-aop-deployers:jar"/>
- <fileset refid="org.jboss.aop:jrockit-pluggable-instrumentor:jar"/>
+ <!-- <fileset refid="org.jboss.aop:jrockit-pluggable-instrumentor:jar"/> -->
<fileset refid="org.jboss.aop:pluggable-instrumentor:jar"/>
</path>
<path id="org.springframework.classpath">
@@ -962,7 +962,7 @@
<include name="org/jboss/test/jbossmessaging/test/*UnitTestCase.class"/>
<include name="org/jboss/test/jbossmessaging/perf/*StressTestCase.class"/>
<include name="org/jboss/test/jbossmessaging/ra/*UnitTestCase.class"/>
- <include name="org/jboss/test/jms/integration/**/*Test.class"/>
+ <include name="org/jboss/test/jms/integration/**/*Test.class"/>
</patternset>
<patternset id="jbossmessaging-clustering.includes">
<include name="org/jboss/test/jbossmessaging/clustertest/*TestCase.class"/>
Modified: branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/SmokeTestSuite.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/SmokeTestSuite.java 2010-01-28 18:52:22 UTC (rev 100069)
+++ branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/SmokeTestSuite.java 2010-01-28 18:55:17 UTC (rev 100070)
@@ -51,7 +51,7 @@
org.jboss.test.web.test.WebIntegrationUnitTestCase
*
* @author Scott.Stark at jboss.org
- * @version $Revision:$
+ * @version $Revision$
*/
public class SmokeTestSuite extends TestSuite
{
@@ -77,7 +77,7 @@
suite.addTest(org.jboss.test.cts.test.StatelessSessionBrokenCreateUnitTestCase.suite());
suite.addTest(org.jboss.test.cts.test.StatelessSessionUnitTestCase.suite());
suite.addTest(org.jboss.test.ejb3.test.SimpleSessionUnitTestCase.suite());
- suite.addTest(org.jboss.test.jbossmessaging.test.JBossMessagingJoramUnitTestCase.suite());
+ suite.addTest(org.jboss.test.jbossmessaging.test.JoramUnitTestCase.suite());
suite.addTestSuite(org.jboss.test.jca.test.BaseConnectionManagerUnitTestCase.class);
suite.addTest(org.jboss.test.jca.test.PoolingUnitTestCase.suite());
suite.addTest(org.jboss.test.jca.test.XADSUnitTestCase.suite());
Deleted: branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/JBossMessagingAdmin.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/JBossMessagingAdmin.java 2010-01-28 18:52:22 UTC (rev 100069)
+++ branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/JBossMessagingAdmin.java 2010-01-28 18:55:17 UTC (rev 100070)
@@ -1,220 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.jbossmessaging;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.NestedRuntimeException;
-
-import org.objectweb.jtests.jms.admin.Admin;
-
-/**
- * JBossMessagingAdmin.
- *
- * @author <a href="richard.achmatowicz at jboss.com">Richard Achmatowicz</a>
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class JBossMessagingAdmin implements Admin
-{
- private Logger log = Logger.getLogger(JBossMessagingAdmin.class);
-
- private InitialContext initialContext ;
- private MBeanServerConnection server ;
-
- protected static final String name ;
- protected static final ObjectName serverPeer;
- protected static final ObjectName namingService;
-
- static
- {
- try
- {
- name = JBossMessagingAdmin.class.getName() ;
- serverPeer = new ObjectName("jboss.messaging:service=ServerPeer");
- namingService = new ObjectName("jboss:service=NamingBeanImpl");
- }
- catch (Exception e)
- {
- throw new NestedRuntimeException(e);
- }
- }
-
- public JBossMessagingAdmin(Class clazz) throws Exception
- {
- this();
- }
- public JBossMessagingAdmin() throws Exception
- {
- try {
- log.info("Initializing...") ;
-
- // set up the initial naming service context
- initialContext = new InitialContext() ;
-
- // set up the MBean server connection
- String adaptorName = System.getProperty("jbosstest.server.name","jmx/invoker/RMIAdaptor") ;
- server = (MBeanServerConnection) initialContext.lookup(adaptorName) ;
-
- } catch (Exception e) {
- throw new NestedRuntimeException(e);
- }
- }
-
- public String getName() {
- return name ;
- }
-
- private MBeanServerConnection getServer() {
- return server ;
- }
-
- public InitialContext createInitialContext() throws NamingException {
- return initialContext ;
- }
-
- public void createQueue(String name)
- {
- try
- {
- MBeanServerConnection server = getServer();
- try
- {
- server.invoke(serverPeer, "deployQueue", new Object[] { name, name }, new String[] { String.class.getName(), String.class.getName() } );
- }
- catch (Exception ignored)
- {
- log.trace("Ignored", ignored);
- }
- ObjectName queueName = new ObjectName("jboss.messaging.destination:service=Queue,name=" + name);
- server.invoke(queueName, "removeAllMessages", null, null);
- }
- catch (Exception e)
- {
- throw new NestedRuntimeException(e);
- }
- }
-
- public void deleteQueue(String name)
- {
- try
- {
- MBeanServerConnection server = getServer();
- ObjectName queueName = new ObjectName("jboss.messaging.destination:service=Queue,name=" + name);
- server.invoke(queueName, "removeAllMessages", null, null);
- server.invoke(serverPeer, "destroyQueue", new Object[] { name }, new String[] { String.class.getName() } );
- }
- catch (Exception e)
- {
- throw new NestedRuntimeException(e);
- }
- }
-
- public void createTopic(String name)
- {
- try
- {
- MBeanServerConnection server = getServer();
- try
- {
- server.invoke(serverPeer, "deployTopic", new Object[] { name, name }, new String[] { String.class.getName(), String.class.getName() } );
- }
- catch (Exception ignored)
- {
- ignored.printStackTrace();
- }
- ObjectName topicName = new ObjectName("jboss.messaging.destination:service=Topic,name=" + name);
- server.invoke(topicName, "removeAllMessages", null, null);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- throw new NestedRuntimeException(e);
- }
- }
-
- public void deleteTopic(String name)
- {
- try
- {
- MBeanServerConnection server = getServer();
- ObjectName topicName = new ObjectName("jboss.messaging.destination:service=Topic,name=" + name);
- server.invoke(topicName, "removeAllMessages", null, null);
- server.invoke(serverPeer, "destroyTopic", new Object[] { name }, new String[] { String.class.getName() } );
- }
- catch (Exception e)
- {
- throw new NestedRuntimeException(e);
- }
- }
-
- public void createConnectionFactory(String name)
- {
- try
- {
- MBeanServerConnection server = getServer();
- server.invoke(namingService, "createAlias", new Object[] { name, "ConnectionFactory" }, new String[] { String.class.getName(), String.class.getName() } );
- }
- catch (Exception e)
- {
- throw new NestedRuntimeException(e);
- }
- }
-
- public void deleteConnectionFactory(String name)
- {
- try
- {
- MBeanServerConnection server = getServer();
- server.invoke(namingService, "removeAlias", new Object[] { name }, new String[] { String.class.getName() } );
- }
- catch (Exception e)
- {
- throw new NestedRuntimeException(e);
- }
- }
-
- public void createQueueConnectionFactory(String name)
- {
- createConnectionFactory(name) ;
- }
-
- public void deleteQueueConnectionFactory(String name)
- {
- deleteConnectionFactory(name) ;
- }
-
- public void createTopicConnectionFactory(String name)
- {
- createConnectionFactory(name) ;
- }
-
- public void deleteTopicConnectionFactory(String name)
- {
- deleteConnectionFactory(name) ;
- }
-
-}
Deleted: branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossMessagingJoramUnitTestCase.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossMessagingJoramUnitTestCase.java 2010-01-28 18:52:22 UTC (rev 100069)
+++ branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossMessagingJoramUnitTestCase.java 2010-01-28 18:55:17 UTC (rev 100070)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.jbossmessaging.test;
-
-import junit.framework.Test;
-
-import org.jboss.test.AbstractTestDelegate;
-
-/**
- * Joram unit tests
- *
- * @author <a href="mailto:clebert.suconic at jboss.com">Clebert Suconic</a>
- * @version $Revision$
- */
-public class JBossMessagingJoramUnitTestCase extends org.jboss.test.jms.JoramUnitTestCase
-{
- public JBossMessagingJoramUnitTestCase(String name)
- {
- super(name);
- }
-
- /**
- * Get the test delegate
- *
- * @param clazz the test class
- * @return the delegate
- * @throws Exception for any error
- */
- public static AbstractTestDelegate getDelegate(Class clazz) throws Exception
- {
- return getDelegate(clazz, "org.jboss.test.jbossmessaging.JBossMessagingAdmin");
- }
-
- public static Test suite() throws Exception
- {
- return getTestSuite(JBossMessagingJoramUnitTestCase.class);
- }
-
-}
Copied: branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/test/JoramUnitTestCase.java (from rev 100013, branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossMessagingJoramUnitTestCase.java)
===================================================================
--- branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/test/JoramUnitTestCase.java (rev 0)
+++ branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/test/JoramUnitTestCase.java 2010-01-28 18:55:17 UTC (rev 100070)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.jbossmessaging.test;
+
+import junit.framework.Test;
+
+import org.jboss.test.AbstractTestDelegate;
+import org.jboss.test.jbossmessaging.test.joram.JoramTestAdminDelegate;
+
+/**
+ * Joram unit tests
+ *
+ * @author <a href="mailto:clebert.suconic at jboss.com">Clebert Suconic</a>
+ * @version $Revision$
+ */
+public class JoramUnitTestCase extends org.jboss.test.jms.JoramUnitTestCase
+{
+ public JoramUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ /**
+ * Get the test delegate
+ *
+ * @param clazz the test class
+ * @return the delegate
+ * @throws Exception for any error
+ */
+ public static AbstractTestDelegate getDelegate(Class clazz) throws Exception
+ {
+ return getDelegate(clazz, JoramTestAdminDelegate.class.getName());
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getTestSuite(JoramUnitTestCase.class);
+ }
+
+}
Copied: branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/test/joram/JoramTestAdminDelegate.java (from rev 100013, branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/JBossMessagingAdmin.java)
===================================================================
--- branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/test/joram/JoramTestAdminDelegate.java (rev 0)
+++ branches/Branch_Hornet_Temporary_2/testsuite/src/main/org/jboss/test/jbossmessaging/test/joram/JoramTestAdminDelegate.java 2010-01-28 18:55:17 UTC (rev 100070)
@@ -0,0 +1,197 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.jbossmessaging.test.joram;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.jboss.jms.testintegration.JMSTestAdmin;
+import org.jboss.logging.Logger;
+import org.jboss.util.NestedRuntimeException;
+import org.objectweb.jtests.jms.admin.Admin;
+
+/**
+ * JBossMessagingAdmin.
+ *
+ * @author <a href="richard.achmatowicz at jboss.com">Richard Achmatowicz</a>
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision$
+ */
+public class JoramTestAdminDelegate implements Admin
+{
+ private Logger log = Logger.getLogger(JoramTestAdminDelegate.class);
+
+ private InitialContext initialContext;
+ private MBeanServerConnection server;
+
+ protected static final ObjectName namingService;
+
+ static
+ {
+ try
+ {
+ namingService = new ObjectName("jboss:service=NamingBeanImpl");
+ }
+ catch (Exception e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+
+ public JoramTestAdminDelegate(Class<?> clazz) throws Exception
+ {
+ this();
+ }
+
+ public JoramTestAdminDelegate() throws Exception
+ {
+ try
+ {
+ log.info("Initializing...");
+
+ // set up the initial naming service context
+ initialContext = new InitialContext();
+
+ // set up the MBean server connection
+ String adaptorName = System.getProperty("jbosstest.server.name", "jmx/invoker/RMIAdaptor");
+ server = (MBeanServerConnection) initialContext.lookup(adaptorName);
+
+ }
+ catch (Exception e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ private MBeanServerConnection getServer()
+ {
+ return server;
+ }
+
+ public InitialContext createInitialContext() throws NamingException
+ {
+ return initialContext;
+ }
+
+ public void createQueue(String name)
+ {
+ try
+ {
+ JMSTestAdmin.getAdmin().createQueue(name, name, null);
+ }
+ catch (Exception e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+
+ public void deleteQueue(String name)
+ {
+ try
+ {
+ JMSTestAdmin.getAdmin().deleteQueue(name);
+ }
+ catch (Exception e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+
+ public void createTopic(String name)
+ {
+ try
+ {
+ JMSTestAdmin.getAdmin().createTopic(name, name, null);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ throw new NestedRuntimeException(e);
+ }
+ }
+
+ public void deleteTopic(String name)
+ {
+ try
+ {
+ JMSTestAdmin.getAdmin().deleteTopic(name);
+ }
+ catch (Exception e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+
+ public void createConnectionFactory(String name)
+ {
+ try
+ {
+ MBeanServerConnection server = getServer();
+ server.invoke(namingService, "createAlias", new Object[] { name, "ConnectionFactory" }, new String[] { String.class.getName(), String.class.getName() });
+ }
+ catch (Exception e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+
+ public void deleteConnectionFactory(String name)
+ {
+ try
+ {
+ MBeanServerConnection server = getServer();
+ server.invoke(namingService, "removeAlias", new Object[] { name }, new String[] { String.class.getName() });
+ }
+ catch (Exception e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+
+ public void createQueueConnectionFactory(String name)
+ {
+ createConnectionFactory(name);
+ }
+
+ public void deleteQueueConnectionFactory(String name)
+ {
+ deleteConnectionFactory(name);
+ }
+
+ public void createTopicConnectionFactory(String name)
+ {
+ createConnectionFactory(name);
+ }
+
+ public void deleteTopicConnectionFactory(String name)
+ {
+ deleteConnectionFactory(name);
+ }
+
+}
Modified: branches/Branch_Hornet_Temporary_2/testsuite/src/resources/jbossmessaging/provider.properties
===================================================================
--- branches/Branch_Hornet_Temporary_2/testsuite/src/resources/jbossmessaging/provider.properties 2010-01-28 18:52:22 UTC (rev 100069)
+++ branches/Branch_Hornet_Temporary_2/testsuite/src/resources/jbossmessaging/provider.properties 2010-01-28 18:55:17 UTC (rev 100070)
@@ -27,8 +27,6 @@
# Uncomment the chosen provider and comment the other ones
##
-jms.provider.admin.class = org.jboss.test.jbossmessaging.JBossMessagingAdmin
+jms.provider.admin.class = org.jboss.test.jbossmessaging.test.joram.JoramTestAdminDelegate
jms.provider.resources.dir = jbossmessaging
-#jms.provider.admin.class = org.jboss.test.jbossmq.JBossMQAdmin
-#jms.provider.resources.dir = jbossmq
More information about the jboss-cvs-commits
mailing list