Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Struts Single thread model in Struts

Have Programming Question? Ask it here!
 
 
 


Rajendra
Single thread model in Struts
1 Answer(s)      5 years and 6 months ago
Posted in : Struts



Advertisement
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
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
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
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
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
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
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
Writing model classes in struts2.2.1
Creating model classes StudentAdmissionModel.java -  Model class  is a java class(POJO). It has property and method. The method  name is setter and getter. Which sets and gets value of property. In our application
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
Presentation-Model Structure
Java NotesPresentation-Model Structure Previous - Big Blob, Next - MVC The single most important structure in a program is to separate the user interface from the model (business logic, domain, ...). This provides a huge
Java event-delegation model
Java event-delegation model  What is the advantage of the event-delegation model over the earlier eventinheritance model
JSP Architecture, JSP Model 1 architecture, JSP Model 2 architecture
of the architecture is used. These architectures are known as Model 1 and Model 2 architectures. So, in JSP there are two types of architecture of the JSP: Model 1 Architecture Model 2 Architecture JSP Model 1 Architecture In case
delegation event model
delegation event model  What is delegation event model?   delegation event model In the event-delegation model, specific objects...-listener interfaces. Advantages of event-delegation model: 1)It enables
Java event delegation model
Java event delegation model  What is the highest-level event class of the event-delegation model
spring Model class
spring Model class  how to connect database in spring MVC ,sample model class and diplay results from database   Have a look at the following link: http://www.roseindia.net/spring/jdbc-template-batch-update.shtml
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
Networking with OSI model
Networking with OSI model  What is networking and it's how to work with OSI model?   Please visit the following links: http://www.roseindia.net/java/network/index.shtml http://www.roseindia.net/technology/networking
Thread in java
Thread in java  which method will defined in thread class
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
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
java Thread
java Thread  what is purpose of Thread
Daemon thread
Daemon thread  what is need of daemon thread
Daemon thread
Daemon thread  what is need of daemon thread
Java thread
Java thread  How can a dead thread be restarted?  A dead thread cannot be restarted
Java thread
Java thread  What are the high-level thread states
Java thread
Java thread  What are the ways in which you can instantiate a thread
Java thread
Java thread  What invokes a thread's run() method
Thread method
Thread method  What is the purpose of the wait(), notify(), and notifyAll() methods
Java thread
Java thread  What is the difference between process and thread
Java thread
Java thread  What's the difference between a thread's start() and run() methods
Demon thread
Demon thread  What is demon thread? why we need Demon thread?  ... there are daemon thread by killing them abruptly.Any thread can be a daemon thread.../thread/daemon-threads.shtml
Thread scheduling
Thread scheduling  What is the algorithm used in Thread scheduling?  Java uses fixed-priority scheduling algorithms to decide which thread... on the basis of their priority relative to other Runnable threads. The thread
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
daemon thread
daemon thread  hello, What is a daemon thread?   hello, These are the threads which can run without user intervention. The JVM can exit when there are daemon thread by killing them abruptly
Extending thread - Java Beginners
that has only one thread is referred to as a single-threaded process, while...Extending thread  what is a thread & give me the programm of exeucte the thread   Hi friend, Thread : A thread is a lightweight
 

 

 

DMCA.com