1 24 package perfs; 25 26 import org.objectweb.joram.client.jms.admin.*; 27 import org.objectweb.joram.client.jms.*; 28 import org.objectweb.joram.client.jms.tcp.*; 29 30 32 public class PerfsAdmin 33 { 34 public static void main(String [] args) throws Exception 35 { 36 AdminModule.connect("root", "root", 60); 37 38 Queue queue = (Queue) Queue.create(0); 39 Topic topic = (Topic) Topic.create(0); 40 41 javax.jms.ConnectionFactory cf = 42 TcpConnectionFactory.create("localhost", 16010); 43 44 User user = User.create("anonymous", "anonymous", 0); 45 46 queue.setFreeReading(); 47 topic.setFreeReading(); 48 queue.setFreeWriting(); 49 topic.setFreeWriting(); 50 51 javax.naming.Context jndiCtx = new javax.naming.InitialContext (); 52 jndiCtx.bind("cf", cf); 53 jndiCtx.bind("queue", queue); 54 jndiCtx.bind("topic", topic); 55 jndiCtx.close(); 56 57 AdminModule.disconnect(); 58 } 59 } 60 | Popular Tags |