This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMS Example

 
Gayathri Prasad
Ranch Hand
Posts: 116
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
 
Gayathri Prasad
Ranch Hand
Posts: 116
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Tiberiu Paun
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Chris Mathews
Ranch Hand
Posts: 2712
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic