• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

JMS Example

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
Ranchers !! Please Give me a typical use of JMS. An example would help enhance my funda .. abt JMS.
thnx,
Gaya3
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://java.sun.com/products/jms/tutorial/1_3_1-fcs/doc/jms_tutorialTOC.html
 
Gayathri Prasad
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pradeep,
Thanx for the link. But I have the tuorial with me and will go with it. I need to know some fundamental uses of JMS. So please gimme some real life example buddy.
Cheers,
Gaya3
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
I don't really got what u asked, and please excuse my poor knowledge and skip this post, in case it's not u were looking for.
An example of JMS usage might be this: supposing u have 2 applications, one sends requests to the the other. If these requests are "getters", than u should use Java sesssion Beans, because u need that answer answer (get a customer address).
But if these requests are "updates" or "creates" (change customer's address), than u are not interested in the response of the second application, because if they fail, a system administrator can look at those fails, see why they failed, and resubmit them in some cases.
That would imply, of course, to have an error queue (or topic), but that's different topic.
These 2 applications might not have anything in common, so that's why you may not be interested if a flow failed or not. Maybe the second application is down for some time (but it will start again), but the first application might have no ideea about this, and you may not be able to change not even a line of code in these applications.
If you put a JMS server between those 2 applications, then your problems might be solved.
about an example of JMS, I would suggest u, from my poor knowledge, to use the examples from the example directory of your JMS server, because there are differences (it happened to me from Sun's J2EE server, different versions, as well as between Weblogic different versions).
Best regards, Tibi
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A simple example is email notification. Let's say your application sends email to a group of 100,000 people when a certain event occurs, for example when a newletter is published. There are two choices for sending these emails:
1) Send them synchronously, and make the user block while all 100,000 emails are sent.
2) Send a JMS message and have the listener send the 100,000 emails. Since JMS is asynchronous, the user will not have to wait until all emails are sent before they can continue. Furthermore, the sending of our emails is not something that needs to occur in a time sensitive manner, we just need them to eventually go out. This is a perfect fit for JMS.
 
Gayathri Prasad
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanx guys for the example. My Fellow mate was wondering what would go in for the time-critical systems.Thanx.
Cheers,
Gaya3
 
What could go wrong in a swell place like "The Evil Eye"? Or with this tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic