File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes Asynchronous technics available Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Asynchronous technics available" Watch "Asynchronous technics available" New topic
Author

Asynchronous technics available

JeanLouis Marechaux
Ranch Hand

Joined: Nov 12, 2001
Posts: 906
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


/ JeanLouis<br /><i>"software development has been, is, and will remain fundamentally hard" (Grady Booch)</i><br /> <br />Take a look at <a href="http://www.epfwiki.net/wikis/openup/" target="_blank" rel="nofollow">Agile OpenUP</a> in the Eclipse community
Mike Broadbear
Ranch Hand

Joined: Jan 14, 2002
Posts: 39
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.
 
 
subject: Asynchronous technics available
 
Threads others viewed
How to prompt user that session is going to time out ?
Asynchronous JavaScript and XML as client side Presentation
Exception MQJMS1013: operation invalid whilst session is using asynchronous delivery
Running java-threads in JBoss
Server Time-out
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com