aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Message is created but not received by the receiver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Message is created but not received by the receiver " Watch "Message is created but not received by the receiver " New topic
Author

Message is created but not received by the receiver

Vidya Moorthy
Ranch Hand

Joined: Nov 13, 2003
Posts: 57
Hi
I am trying to create a sender JSP page using JMS and it creates a text message "Update" if the request attribute is "prodRequest". If not, then a message with the shopping cart contents are sent to the Queue. I can see that the message is getting created but it is not sent to the queue. Could you please help me find my mistake!

I'll post the code for the queue receiver program if somebody wants to check if that has errors in it!
Thanks in advance
Vidya
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
How do you know that your messages are not posted to the Queue? Do you have a monitoring tool to see if there are messages in the queue?

What output do you see in the server logs? Does your JVM (Server) terminate when you run your program(JSP)?


Amit Tank
Linked In
Vidya Moorthy
Ranch Hand

Joined: Nov 13, 2003
Posts: 57
First of all, thanks for your response. Second of all, sorry for the delay in posting the answers to your questions.
How do you know that your messages are not posted to the Queue?
-->The messages seem to be posted to the queue
Do you have a monitoring tool to see if there are messages in the queue?
-->I have the MQ series explorer

What output do you see in the server logs? Does your JVM (Server) terminate when you run your program(JSP)?
-->The statements which I print in the System.out are printed to the server log. The JVM doesn't terminate when I run the JSP.
I have one more question for you. Is it possible to write this queue sender and receiver in a Java program. How do I call that program from a jsp page?
Thanks
Vidya
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
-->I have the MQ series explorer

So you must be able to see if the messages are there in the Queue.

-->The statements which I print in the System.out are printed to the server log. The JVM doesn't terminate when I run the JSP.
I have one more question for you. Is it possible to write this queue sender and receiver in a Java program. How do I call that program from a jsp page?


I asked that question because I saw in your code. I guess you should remove that from your code as it will bring down the entire server in case of an Exception.

yes you can write the Sender and receiver in a java program and call that program from your JSP file. You just need to import those classes (sender and receiver) in the JSP and call the appropriate method in the scriplet. However, using scriplet is an old way of doing stuff in JSP, but if you are just working out examples then it is okay to use scriplets in JSP.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Message is created but not received by the receiver