Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What happens when Two users requests for same action class?
How the threads are controlled?

Answer Posted / rk

I do not see a single correct answer.

In Struts1, Action resources must be thread-safe or
synchronized. So Actions are singletons and thread-safe,
there should only be one instance of a class to handle all
requests for that Action. The singleton strategy places
restrictions on what can be done with Struts1 Actions and
requires extra care to develop.

However in case of Struts 2, Action objects are instantiated
for each request, so there are no thread-safety issues. (In
practice, servlet containers generate many throw-away
objects per request, and one more object does not impose a
performance penalty or impact garbage collection.)

reference:
http://www.javabeat.net/qna/690-struts-1x-vs-struts-20/

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about the future of struts?

904


How to explain Software Bank Loan descriptions

2421


What are the features of struts?

986


What is meant by custom tags?

922


What is the purpose of @element annotation annotation?

1033


Difference between struts and spring? Or why use spring, if you are already using struts?

922


What are the major differences between html tags and strut specific html tags?

899


Which servlet does the struts framework use?

937


Is struts mvc framework?

878


What are the struts2 error message keys that can come during file uploading process?

1028


Is Struts Framework part of J2EE?

987


How is token generated?

987


What are the features of struts 2?

988


What is the purpose of struts.xml in struct2?

1090


Explain the difference between plain-validator and field-validator in struts?

905