• 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

JMS and Message-Driven Beans; Job Percent Complete

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am interested in creating asynchronous messages in order to create large reports that a user requests, but for which the user is unwilling to wait. In other words, small reports will be generated on-the-fly and returned to the user's browser, but large reports will be processed in the background and selected for viewing via the browser once the processing has been completed. My question is this: how does one monitor such asynchronous processing? In other words, if I want the application to tell the user how much of the report has been processed so far (i.e. 10%, 50%, 90%, etc), so that the user has a rough idea of how much longer they have to wait to view the report, how does one do this via JMS and Message-Driven Beans? Any feedback is appreciated. Thanks.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Addendum to my first post: it is realized that percent complete for a job is only possible if the total size of the job is known - of a higher importance is whether the client can be notified when a job starts, is in process, and ends. A detailed answer to this post is not expected, but a point in the right direction is appreciated. Thanks.
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One idea that comes to my mind is to create a topic, and have your client create a background thread that subscribes to the topic. Then your report generator can publish a message to the topic with an Id to identify the client and a status message. when the client gets the message, it can check the Id to see if it should process the message. This would allow multiple clients to be getting status using a single topic.
 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am in similar situation as Erik, I was planning to use JMS point to point or MQ and have Message driven bean process and update database where user can go and check the status and if completed result...I was wondering how was your experience, and anybody else can add their experience that would be great input for my decisions...

Thanks
Venkatesh
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My current system has an applet that opens a ServerSocket and registers itself with the server at login. To send "push" content to the browser the server opens a client socket and sends info. The applet calls out to a JavaScript function on our permanent frame window in the browser. This is a nice generic mechanism to fire any JavaScript method by a name provided in the message.
 
I carry this gun in case a vending machine doesn't give me my fritos. This gun and this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic