Single thread model in Struts

Single thread model in Struts

View Answers

January 29, 2009 at 1:25 AM

Hi


Struts 1 Actions are singletons therefore they must be thread-safe because only one instance of a class handles all the requests for that Action. The singleton strategy restricts to Struts 1 Actions and requires extra care to make the action resources thread safe or synchronized while developing an application.


and



Struts 2 doesn't have thread-safety issues as Action objects are instantiated for each request. A servlet container generates many throw-away objects per request, and one more object does not impose a performance penalty or impact garbage collection.


For more details please visit:http://www.roseindia.net/struts/struts1-vs-struts2.shtml


Thanks...









Related Tutorials/Questions & Answers:
Single thread model - Struts
Single thread model  Hi Friedns , thank u in advance 1)I need sample code to find and remove duplicates in arraylist and hashmap. 2) In struts, ow to implement singlthread model and threadsafe
Single thread model in Struts - Struts
Single thread model in Struts   Hi Friends, Can u acheive singleThreadModel , ThreadSafe in Struts if so plx explain... an application. and Struts 2 doesn't have thread-safety issues
Advertisements
is having any method same behavior of Single thread model in java?
is having any method same behavior of Single thread model in java?  is having any method same behavior of Single thread model in java
is having any method same behavior of Single thread model in java?
is having any method same behavior of Single thread model in java?  is having any method same behavior of Single thread model in java
is having any method same behavior of Single thread model in java?
is having any method same behavior of Single thread model in java?  is having any method same behavior of Single thread model in java
is having any method same behavior of Single thread model in java?
is having any method same behavior of Single thread model in java?  is having any method same behavior of Single thread model in java
Model in struts
Model in struts  what is a model in struts
Java single threaded model
Java single threaded model  How single threaded model works after implementation in class, basically architecture point of view
JSP Thread Safe
JSP Thread Safe          JSP Thread Safe is used to send only one client request for processing. It is used to implement Single Thread Model interface
ModuleNotFoundError: No module named 'single-factor-model'
ModuleNotFoundError: No module named 'single-factor-model'  Hi, My... named 'single-factor-model' How to remove the ModuleNotFoundError: No module named 'single-factor-model' error? Thanks   Hi
ModuleNotFoundError: No module named 'django-single-instance-model'
ModuleNotFoundError: No module named 'django-single-instance-model'  ...: No module named 'django-single-instance-model' How to remove the ModuleNotFoundError: No module named 'django-single-instance-model' error
In Struts What is Model?
In Struts What is Model? This tutorial explains you What is Model in Struts. Struts is MVC based application and it is separated into three integral parts... of components:ADS_TO_REPLACE_1 Model View and Controller Struts
Thread
Thread  What is multi-threading? Explain different states of a thread... and parallel). It allows a process to run its tasks in parallel mode on a single processor system. States of Thread: New state ? After the creations of Thread
how insert multiple images in mysql database with use of struts 1.3.8 or java method, with single bean,or using array
how insert multiple images in mysql database with use of struts 1.3.8 or java method, with single bean,or using array  i am using netbeans 7.0 ,with struts 1.3.8 and i want to insert multiple images in mysql database ,with use
thread
thread  can parent thread be dead if child thread is not dead
Thread
Thread  Thread Life Cycle
Thread
Thread  what is the use of thread
Struts
Struts  Why struts rather than other frame works?   Struts... the developers time and costs as it is having a clear layer of MVC model. Struts2 is not only thread-safe but thread-dependent. Struts2 tag libraries provide
Thread
Thread  Explain two ways of creating thread in java. Explain at three methods of thread class.   Java Create Thread There are two main ways of creating a thread. The first is to extend the Thread class and the second
Thread
to the thread constructor eventhough we had created only one thread and if you say we have added to point to the current thread then why we have not added this in the following line "s=s1" Pls reply...... class MyThread extends Thread { Thread
Thread
Thread  what happen when we call the Wait(),Notify() and NotifyAll() methods in the Thread
Thread
Thread  class Extender extends Thread { Extender(Runnable run...(); } public void run(){ System.out.println("Extender Thread is Started :"); //new Thread(new Implementer()).start(); } } class Implementer
Thread
Thread  will this code work..? class A extends Thread { public...=" + i); } public static void main(string args[]) { A a = new A(); Thread t = new thread(a); t.start(); } } Is it possible to run above program with out
Thread
Thread  Write a Java program to create three theads. Each thread should produce the sum of 1 to 10, 11 to 20 and 21to 30 respectively. Main thread....   Java Thread Example class ThreadExample{ static int
Thread
Thread   there are two threads running at a time.. when am updating a values in database. both thread halt and stop for moment till it get updated into database... so i dnt want thread to get halts for tht moment of period. whats
Struts - Struts
Struts  Is Action class is thread safe in struts? if yes, how it is thread safe? if no, how to make it thread safe? Please give me with good explaination and example? thanks in advance.  Hi Friend, It is not thread
Struts Tutorial
it separates the model from view and the controller. Struts framework provides... are as follows :ADS_TO_REPLACE_2 Struts provides the POJO based actions. Thread.... Following is the view of the Struts architecture : Struts Model Component : Provides
Struts - Struts
Struts  How to display single validation error message, in stude of ?  Hi friend, I am sending you a link. This link will help you. Please visit for more information. http://www.roseindia.net/struts/struts
Struts
Struts   How to retrive data from database by using Struts
STRUTS
STRUTS  MAIN DIFFERENCES BETWEEN STRUTS 1 AND STRUTS 2
STRUTS
STRUTS  MAIN DIFFERENCES BETWEEN STRUTS 1 AND STRUTS 2
Struts
Struts  what is SwitchAction in struts
Struts
Struts  how to learn struts
STRUTS
STRUTS   Request context in struts? SendRedirect () and forward how to configure in struts-config.xml
single ton
single ton  we can call non static method from singleton class
struts
struts  in industry, struts 1 and struts 2. which is the best? which is useful as a professuional   Have a look at the following link: Struts Tutorials
Struts
Struts  Tell me good struts manual
struts
struts  what are the 4 methods of struts framework
struts
struts shopping cart project in struts with oracle database connection  shopping cart project in struts with oracle database connection   Have a look at the following link: Struts Shopping Cart using MySQL
Struts
Struts   When Submit a Form and while submit is working ,press the Refresh , what will happen in Struts
struts
struts  Hi what is struts flow of 1.2 version struts? i have struts applicatin then from jsp page how struts application flows Thanks Kalins Naik   Please visit the following link: Struts Tutorial
Struts - Struts
Struts  Hello I like to make a registration form in struts inwhich... be displayed on single dynamic page according to selected by student. pls send.... Struts1/Struts2 For more information on struts visit to : http://www.roseindia.net
struts
struts   how to write Dao to select data from the database
struts
struts  why doc type is not manditory in struts configuration file
struts
struts  why doc type is not manditory in struts configuration file
struts
struts  why doc type is not manditory in struts configuration file
struts
struts  why doc type is not manditory in struts configuration file
Struts
Struts  Hi i am new to struts. I don't know how to create struts please in eclipse help me
struts
struts   Hi how struts flows from jsp page to databae and also using validation ? Thanks Kalins Naik
Struts
Setter methods of form bean class in Struts applications  who calls the setter methods of form bean class in struts applications

Ads