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
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.