ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Java J2EE  >>  Java Related  >>  Struts
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
What happens when Two users requests for same action class?
How the threads are controlled?
 Question Submitted By :: Yamini
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What happens when Two users requests for same action class? How the threads are controlled?
Answer
# 1
here 2 users will get 2 different instance of the action
class. each one will behave in their way as said in
configuration file.
 
Is This Answer Correct ?    16 Yes 2 No
Joydeep
 
  Re: What happens when Two users requests for same action class? How the threads are controlled?
Answer
# 2
In this case both the users will get saparate instanceses
of the same action class.and both will work independintely.
 
Is This Answer Correct ?    5 Yes 3 No
Rajshekhar
 
 
 
  Re: What happens when Two users requests for same action class? How the threads are controlled?
Answer
# 3
For every request........crossponding instance is 
created.....
Means n no of rquest=n no of instance.......
And for every instance one thread is allocated for 
that......and then......somtimes may chances of deadlock...
 
Is This Answer Correct ?    0 Yes 0 No
Anjani Kumar Jha
 
  Re: What happens when Two users requests for same action class? How the threads are controlled?
Answer
# 4
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 ?    3 Yes 0 No
Rk
 

 
 
 
Other Struts Interview Questions
 
  Question Asked @ Answers
 
How to explain struts work flow TCS5
How do you customize ActionServlet? Ness-Technologies3
How do you know what to give for the "path " under in struts-config.xml ?  1
Hai all.What is the use of <logic:iterate>tag in struts application. TCS1
Is it possible to create mulitple instance of one Action Class in struts? Satyam9
explain method overridding method overloding with examples? IBM4
explain the struts-configuration file? TCS2
what are the struts tags?  1
who will run the execute method in struts? Wipro7
Difference between struts1.2 and struts2.0? HCL3
Even though Servlets and JSP are web based concepts .wht is the use of using Struts using then TCS7
what is the purpose of action servlet and action?  4
In web.xml file instead of *.do can i write *.ibm, Specify with example IBM10
what is frame work in struts? Infosys3
what is the advantages and diadvantages of Struts?  1
how the error can be showed in the jsp page in struts? Wipro2
what is difference between <bean:write> and <bean: message> tag CTS2
struts is thread safe or not ?give me answer as early as possible  2
multiple instances for action class is it possible iFlex7
what is diffrence between Dynaactionform,actionform and Dynavalidateform TCS7
 
For more Struts Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com