Hello Everyone!
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!)
<%
try {
InitialContext ctx;
QueueConnectionFactory cf;
QueueConnection connection;
QueueSession session;
Queue destination;
QueueSender sender;
TextMessage message;
ctx = new InitialContext();
cf = (QueueConnectionFactory)ctx.lookup("java:/JmsXA");
destination = (Queue)ctx.lookup("queue/RameshQueue");
connection = cf.createQueueConnection();
session = connection.createQueueSession(false,
Session.AUTO_ACKNOWLEDGE);
sender = session.createSender(destination);
message = session.createTextMessage();
message.setText(Message);
System.out.println("Sending Message.");
sender.send(message);
connection.close();
System.out.println("Done.");
}
catch(Exception e)
{
}
%>
The queue-service.xml file
<depends optional-attribute-name="DestinationManager">
jboss.mq:service=DestinationManager
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3855060#3855060
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3855060
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user