I suggested this before, but I don't think I wrote it up fully in the forums
so here goes.
It should be possible to manage JMS using JMS,
i.e. create queues, topics, connection factories by sending messages to
a management queue (which is suitably secured).
It would then possible to do something like:
queue = (Queue) jndi.lookup(JBossJMS.ManagementQueueName): QueueRequestor r = new QueueRequestor(session, queue); Message request = session.createMessage(); request.setStringProperty(JBossJMS.OPERATION, JBossJMS.CREATE_QUEUE); request.setStringProperty(JBossJMS.DESTINATION_NAME, "myQueue"); request.setIntegerProperty(JBossJMS.QUEUE_DEPTH, 1000); // etc. Message response = r.request(m); // check the response
manager = new JBossJMSManagement(session); QueueTemplate template = manager.createQueueTemplate(); template.setQueueDepth(1000); manager.createQueue("myQueue", template);
http://jira.jboss.org/jira/browse/JBMESSAGING-934
I'm waiting Tim Fox to come back from vacation before saying anything on this.