• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Message is created but not received by the receiver

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)?
 
Vidya Moorthy
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

-->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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic