Single thread model in Struts

Ads

 
 

Share on Google+Share on Google+

Rajendra
Single thread model in Struts
1 Answer(s)      8 years ago
Posted in : Struts
Ads
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...

Ads









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
Java single threaded model
Java single threaded model  How single threaded model works after implementation in class, basically architecture point of view
Model in struts
Model in struts  what is a model in struts
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
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: Model View and Controller Struts is also based
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
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  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
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
the model from view and the controller. Struts framework provides the following three... : Struts provides the POJO based actions. Thread safe. Struts has support... architecture : Struts Model Component : Provides Model of the business logic
Struts Tutorial
to the advance concepts of struts. At Roseindia you will learn the Basic Model View...Struts Tutorial Struts is an open source web application framework deployed to develop Java web applications. Based on the Model-View-Controller (MVC
Thread in java
Thread in java  which method will defined in thread class
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
Thread restart
Thread restart  hello,, can dead thread restart?   hii, A dead Thread can't restart not even by calling start() again on that object
What is Struts
Apache Struts is used to create Java web applications using Java Servlet API and Model-View-Controller (MVC) Architecture. Struts has a set of tag libaries and their associated Java classes. Struts is open-source and uses Java
Struts
Struts   How to retrive data from database by using Struts