I just started experimentation with JMS on JBoss3.2.1. I wrote a small jsp page which tries to post a message to a Queue. I created the queue by putting a queue-service.xml in the deploy directory.
I was able to get the jndi lookup to QueueConenctionFactory . but when I do a jndi lookup to the queue, it fails by throwing an error saying queue not bound. I have tried all possible things to correct this but I have failed. So I am turning to the forum for some enlightenement.
Here is the jsp code ! (I have just put the java code alone here!)
ctx = new InitialContext();
cf = (QueueConnectionFactory)ctx.lookup("java:/JmsXA");
destination = (Queue)ctx.lookup("queue/RameshQueue");
connection = cf.createQueueConnection();
session = connection.createQueueSession(false,
sender = session.createSender(destination);
message = session.createTextMessage();
The queue-service.xml file
If you're just starting out, why not use JBoss 3.2.6?
Refer to the JBoss getting started doc: Go to the JMX console and use the JNDI view tool to find out where your queue is bound.