answersLogoWhite

0

Is struts thread safe

User Avatar

Anonymous

12y ago
Updated: 8/16/2019

Struts 1 Actions are singletons and must be thread-safe since there will 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 Struts 1 Actions and requires extra care to develop. Action resources must be thread-safe or synchronized.

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.)

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Is Servlet instance Thread safe If not how can you make thread safe?

No. The Servlet is not thread-safe by default. You can make it thread safe by implementing the SingleThreadedModel interface


Is jsp thread safe by default?

No. JSPs are not thread safe by default


Is it safe to drive a Jeep Cherokee without struts?

no


What is difference between struts 1.3.8 and struts 2.0?

There are many differences between Struts 1.3 and Struts 2.0-1)Action Class-In Struts 1.3, Action Classes needs to extend an abstract base class. But in Struts 2.0, Action classes needs to implement an Action interface.2)Thread-Safety-In Struts 1.3, actions are singletons and thread-safe.In Struts 2.0, action objects are instantiated for each request.3)In Struts 1.3, actions must share same lifecycle.In Struts 2.0, every action has different lifecycle.4)In Struts 1.3, servlet action have dependencies on servlet API.In Struts 2.0, these dependencies have been removed.5)Struts 1.3 uses Action Forms to take the input.Struts 2.0 use Action Properties for taking inputs.As Struts 2.0 is improved version of Struts 1.3, so there are uncountable similarities between them. All the basic features are same in both.


Is thread safe for parrots?

If it is large enough.


What is thread safe object?

A thread safe object is one that would be safe even if multiple thread instances are accessing it. For example if a single object is being updated by a thread and the same object is being read by another thread - we will end up with an inconsistency where the reading object is reading incorrect data because by the time it finishes reading, another thread would've updated it. So we use the keyword synchronized with methods to ensure that such a situation does not happen. An object that wont let two threads access it simultaneously is called a thread safe object


Is it safe to drive with bad struts?

Maybe a little less stability and comfort in riding, but it is sure hard on your tires.


Does a 1999 Toyota Camry have front end struts or shocks?

Struts.


Is mercerized cotton thread microwave safe?

Mercerized cotton thread is generally considered microwave safe, as it is made from cotton fibers that can withstand high temperatures without melting or releasing harmful chemicals. However, it's important to ensure that the thread is free of any synthetic additives or coatings that may not be microwave safe. Always check the manufacturer's guidelines for specific recommendations regarding microwave use. When using mercerized cotton thread in microwave-related projects, consider the overall composition of the item being microwaved.


Where can you find stanza wagon rear struts?

It has shocks in the rear I believe. Not struts. Struts are in front.


What is thread safe servlet?

A thread-safe servlet is a type of servlet that can handle multiple requests simultaneously without leading to data inconsistency or corruption. This is achieved by ensuring that shared resources are properly synchronized, often by using mechanisms such as synchronized methods or blocks. In a thread-safe servlet, care must be taken to avoid issues like race conditions, ensuring that the servlet remains reliable and stable under concurrent access. Generally, it's advisable to keep servlets stateless or use instance variables cautiously to maintain thread safety.


Does a 2004 Chevy Malibu have struts or shocks?

They have struts!