[hornetq-commits] JBoss hornetq SVN: r9968 - trunk/tests/joram-tests/src/org/hornetq/jms.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Dec 1 19:08:13 EST 2010
Author: clebert.suconic at jboss.com
Date: 2010-12-01 19:08:13 -0500 (Wed, 01 Dec 2010)
New Revision: 9968
Modified:
trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java
trunk/tests/joram-tests/src/org/hornetq/jms/SpawnedJMSServer.java
Log:
fixing JORAM tests
Modified: trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java
===================================================================
--- trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java 2010-12-01 19:11:00 UTC (rev 9967)
+++ trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java 2010-12-02 00:08:13 UTC (rev 9968)
@@ -103,15 +103,20 @@
public void createConnectionFactory(final String name)
{
+ createConnection(name, 0);
+ }
+
+ private void createConnection(final String name, final int cfType)
+ {
try
{
invokeSyncOperation(ResourceNames.JMS_SERVER,
"createConnectionFactory",
name,
false,
- NettyConnectorFactory.class.getName(),
- new HashMap<String, Object>(),
- new String[] { name });
+ cfType,
+ "netty",
+ name);
}
catch (Exception e)
{
@@ -141,19 +146,7 @@
public void createQueueConnectionFactory(final String name)
{
- try
- {
- invokeSyncOperation(ResourceNames.JMS_SERVER,
- "createQueueConnectionFactory",
- name,
- NettyConnectorFactory.class.getName(),
- new HashMap<String, Object>(),
- new String[] { name });
- }
- catch (Exception e)
- {
- throw new IllegalStateException(e);
- }
+ createConnection(name, 1);
}
public void createTopic(final String name)
@@ -172,19 +165,7 @@
public void createTopicConnectionFactory(final String name)
{
- try
- {
- invokeSyncOperation(ResourceNames.JMS_SERVER,
- "createTopicConnectionFactory",
- name,
- NettyConnectorFactory.class.getName(),
- new HashMap<String, Object>(),
- new String[] { name });
- }
- catch (Exception e)
- {
- throw new IllegalStateException(e);
- }
+ createConnection(name, 2);
}
public void deleteConnectionFactory(final String name)
Modified: trunk/tests/joram-tests/src/org/hornetq/jms/SpawnedJMSServer.java
===================================================================
--- trunk/tests/joram-tests/src/org/hornetq/jms/SpawnedJMSServer.java 2010-12-01 19:11:00 UTC (rev 9967)
+++ trunk/tests/joram-tests/src/org/hornetq/jms/SpawnedJMSServer.java 2010-12-02 00:08:13 UTC (rev 9968)
@@ -23,6 +23,7 @@
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory;
+import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.jms.server.JMSServerManager;
@@ -67,6 +68,9 @@
conf.getAcceptorConfigurations().add(new TransportConfiguration(NettyAcceptorFactory.class.getName()));
conf.setSecurityEnabled(false);
conf.setFileDeploymentEnabled(false);
+
+
+ conf.getConnectorConfigurations().put("netty", new TransportConfiguration(NettyConnectorFactory.class.getName()));
// disable server persistence since JORAM tests do not restart server
final HornetQServer server = HornetQServers.newHornetQServer(conf, false);
More information about the hornetq-commits
mailing list