"Mariappan Vaithianathan (CTC)" wrote: > > I want to call two EJBs from a servlet with calls being multithreaded, say > one thread calls one EJB , then another thread for another EJB. Is that > possible? Could there be any issues? >
It's possible, but there are issues. Off the top of my head: - Make sure any threads you spawn in service() finish before service() returns. Otherwise, they'll accummulate. - Depending on the JDK and operating system, threads can be fairly heavy. If you spawn too many of them, you can run out. And even if you don't run out, you can slow down the whole system. - If the EJB calls really take that long, you might consider a setup where one servlet call starts up the processing, then returns. Another servlet call gives you the status, and a third gets you the results. The client side can be driven using refreshes, or (if you must) by javascript. There is plenty of discussion in the archives about the details. -- Christopher St. John [EMAIL PROTECTED] DistribuTopia http://www.distributopia.com ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
