Hi Kevin, in answer to your threading questions ...

>Ok..that makes sense. The second one throws me a bit..what would you only
>want to create a single instance of an object that is used by all requests
>for? I am sure there are reasons, just that none are hitting me right now.

I would suspect it all boils down to scalability. Having just one object
instance for all requests will
reduce the memory footprint, reduce garbage collection and increase
performance.


>Optimizations..now your talking! To optimize this, you mean use a single
>instance of the action class and use local variables? If so, what if two
>requests come in at the same time...does the method create local variables
>for each call the the method, even if by different threads?

Yes - each thread has it's own stack - and therefore local variables.

Regards

Nick Rumble








The statements and opinions expressed here are my own and may not represent those of 
the company.

This e-mail is subject to copyright and the information in it is confidential. It is 
intended only for the named recipient. You are advised not to disclose the contents of 
this e-mail to another pers
on or take copies of it.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to