Commit 3a030473 authored by afreyssin's avatar afreyssin

Use specific factory to create monitoring queue and topic.

parent 9a427420
......@@ -38,6 +38,7 @@ import javax.naming.InitialContext;
import org.objectweb.joram.client.jms.Destination;
import org.objectweb.joram.client.jms.Queue;
import org.objectweb.joram.client.jms.admin.AdminModule;
import org.objectweb.joram.client.jms.admin.MonitoringQueue;
import org.objectweb.joram.client.jms.admin.User;
import org.objectweb.joram.client.jms.tcp.TcpConnectionFactory;
import org.objectweb.joram.mom.dest.MonitoringAcquisition;
......@@ -100,10 +101,9 @@ public class TestMonitoringQueue1 extends TestCase implements MessageListener {
Properties properties = new Properties();
properties.put("acquisition.period", "2000");
properties.put("Joram#0:*", "DestinationId");
properties.put("acquisition.className", MonitoringAcquisition.class.getName());
// create a Queue
Queue queue = Queue.create(0, "MonitoringQueue", Destination.ACQUISITION_QUEUE, properties);
Queue queue = MonitoringQueue.create(0, "MonitoringQueue", properties);
// create a user
User.create("anonymous", "anonymous");
......
......@@ -39,6 +39,7 @@ import javax.naming.InitialContext;
import org.objectweb.joram.client.jms.Destination;
import org.objectweb.joram.client.jms.Queue;
import org.objectweb.joram.client.jms.admin.AdminModule;
import org.objectweb.joram.client.jms.admin.MonitoringQueue;
import org.objectweb.joram.client.jms.admin.User;
import org.objectweb.joram.client.jms.tcp.TcpConnectionFactory;
import org.objectweb.joram.mom.dest.MonitoringAcquisition;
......@@ -121,10 +122,7 @@ public class TestMonitoringQueue2 extends TestCase implements MessageListener {
// connection
AdminModule.connect("localhost", 2560, "root", "root", 60);
// create a queue
Properties properties = new Properties();
properties.put("acquisition.className", MonitoringAcquisition.class.getName());
Queue queue = Queue.create(0, "MonitoringQueue", Destination.ACQUISITION_QUEUE, properties);
Queue queue = MonitoringQueue.create(0, "MonitoringQueue");
// create a user
User.create("anonymous", "anonymous");
......
......@@ -39,6 +39,7 @@ import javax.naming.InitialContext;
import org.objectweb.joram.client.jms.Destination;
import org.objectweb.joram.client.jms.Queue;
import org.objectweb.joram.client.jms.admin.AdminModule;
import org.objectweb.joram.client.jms.admin.MonitoringQueue;
import org.objectweb.joram.client.jms.admin.User;
import org.objectweb.joram.client.jms.tcp.TcpConnectionFactory;
import org.objectweb.joram.mom.dest.MonitoringAcquisition;
......@@ -124,9 +125,7 @@ public class TestMonitoringQueue3 extends TestCase implements MessageListener {
// create a user
User.create("anonymous", "anonymous");
Properties properties = new Properties();
properties.put("acquisition.className", MonitoringAcquisition.class.getName());
Queue queue = Queue.create(0, "MonitoringQueue", Destination.ACQUISITION_QUEUE, properties);
Queue queue = MonitoringQueue.create(0, "MonitoringQueue");
// set permissions
queue.setFreeReading();
......
......@@ -37,6 +37,7 @@ import javax.naming.InitialContext;
import org.objectweb.joram.client.jms.Destination;
import org.objectweb.joram.client.jms.Topic;
import org.objectweb.joram.client.jms.admin.AdminModule;
import org.objectweb.joram.client.jms.admin.MonitoringTopic;
import org.objectweb.joram.client.jms.admin.User;
import org.objectweb.joram.client.jms.tcp.TcpConnectionFactory;
import org.objectweb.joram.mom.dest.MonitoringAcquisition;
......@@ -99,10 +100,9 @@ public class TestMonitoringTopic1 extends TestCase implements MessageListener {
Properties properties = new Properties();
properties.put("acquisition.period", "2000");
properties.put("Joram#0:name=JoramAdminTopic,*", "DestinationId");
properties.put("acquisition.className", MonitoringAcquisition.class.getName());
// create a Topic
Topic topic = Topic.create(0, "MonitoringTopic", Destination.ACQUISITION_TOPIC, properties);
Topic topic = MonitoringTopic.create(0, "MonitoringTopic", properties);
// create a user
User.create("anonymous", "anonymous");
......
......@@ -39,6 +39,7 @@ import javax.naming.InitialContext;
import org.objectweb.joram.client.jms.Destination;
import org.objectweb.joram.client.jms.Topic;
import org.objectweb.joram.client.jms.admin.AdminModule;
import org.objectweb.joram.client.jms.admin.MonitoringTopic;
import org.objectweb.joram.client.jms.admin.User;
import org.objectweb.joram.client.jms.tcp.TcpConnectionFactory;
import org.objectweb.joram.mom.dest.MonitoringAcquisition;
......@@ -121,9 +122,7 @@ public class TestMonitoringTopic2 extends TestCase implements MessageListener {
AdminModule.connect("localhost", 2560, "root", "root", 60);
// create a Topic
Properties properties = new Properties();
properties.put("acquisition.className", MonitoringAcquisition.class.getName());
Topic topic = Topic.create(0, "MonitoringTopic", Destination.ACQUISITION_TOPIC, properties);
Topic topic = MonitoringTopic.create(0, "MonitoringTopic");
// create a user
User.create("anonymous", "anonymous");
......
......@@ -39,6 +39,7 @@ import javax.naming.InitialContext;
import org.objectweb.joram.client.jms.Destination;
import org.objectweb.joram.client.jms.Topic;
import org.objectweb.joram.client.jms.admin.AdminModule;
import org.objectweb.joram.client.jms.admin.MonitoringTopic;
import org.objectweb.joram.client.jms.admin.User;
import org.objectweb.joram.client.jms.tcp.TcpConnectionFactory;
import org.objectweb.joram.mom.dest.MonitoringAcquisition;
......@@ -124,9 +125,7 @@ public class TestMonitoringTopic3 extends TestCase implements MessageListener {
// create a user
User.create("anonymous", "anonymous");
Properties properties = new Properties();
properties.put("acquisition.className", MonitoringAcquisition.class.getName());
Topic topic = Topic.create(0, "MonitoringTopic", Destination.ACQUISITION_TOPIC, properties);
Topic topic = MonitoringTopic.create(0, "MonitoringTopic");
// set permissions
topic.setFreeReading();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment