Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Asynchronous technics available

 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm a rookie on the thread world, so please forgive me if its a silly question
Let's say I have a web application (servlets/ejbs) with one functionality is to print huge reports.
Each report take time to be constructed and to be printed.
I don't want my client to be bound to the construct and print object. Instead of waiting for an answer from the server, he has to keep working on other stuffs.
What are the solution I have to design my application ?
I know I can do it with JMS and/or MDB, but then I need a MOM like MQSeries right ?
Can I achieve the asynchronous calls with another solution ?
Thanks in advance for you advices
 
Mike Broadbear
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A good book on concurrent programming:
Concurrent Programming in Java 2nd ed.
Doug Lea
There is a chapter (Ch. 4) that outlines various framworks for passing tasks between threads. One concept would be to use an event queue. You could have one thread drop off user requests in the event queue. Another thread would be responsible for extracting the user requests from the event queue and fulfilling them. This would separate user requests from the report generation.
...Mike B.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!