• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Design pattern and mutlthreading

 
Ranch Hand
Posts: 594
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI

I faced a interview,in that session ,the below listed question posted to me.

1) In ENterprise web application using struts,if a client send request to Contoller servlet ,then it create new instance of action class then pass the request to it.If any already existing request comes in ,then existing instance of Action will be used.Please confirm the question itself correct or wrong ?; and above logic is common for all type of design pattern.

2) Designing Multi threading web application is best solution or not ?,when and where muthithreading applied to web application

3) what are the possible design pattern used in Struts based application?;which design pattern is best suited.
 
Ranch Hand
Posts: 471
Mac OS X Hibernate Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1- Yes if we are speaking about struts 1.x, and that's Singleton pattern. If struts 2.x, then no.

2- Web applications are multithreaded by default. There's usually only on instance of a servlet or a JSP, and threads work on the service() method. In struts, actions are singletons, so they are multithreaded as well

3- MVC & Front Controller.
 
I knew I would regret that burrito. But this tiny ad has never caused regrets:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic