----- Original Message ----- From: "Christopher K. St. John" <[EMAIL PROTECTED]> Date: Wednesday, December 12, 2001 10:26 am Subject: Re: Clarification.
> "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. You might use 'Active Object' approach in conjunction with a thread pool. See Doug Lea's 'Concurrent Programming in Java Design principles and patterns' (see http://gee.cs.oswego.edu/dl/cpj/index.html). Peter ___________________________________________________________________________ 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
