This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Where to synchronize struts 1.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Where to synchronize struts 1.1" Watch "Where to synchronize struts 1.1" New topic

Where to synchronize struts 1.1

Picus Ameradeus

Joined: Sep 22, 2006
Posts: 11

I need to thread safe a very basic struts app. It get user info and inserts it into a db, but there are sessions involved.

The app uses two model classes, users and orders, each with getters and setters that handle instance variables through the action classes..

My question is this,

Do I thread safe the getter and setters on the model classes or do I synchronize the execute methods on the Action classes?

I assume both are fine but are there performance issues?
I agree. Here's the link:
subject: Where to synchronize struts 1.1
Similar Threads
Struts 1.2 session problem
Are struts action classes thread safe?
Where to synchronize Struts 1.1?
Is Struts Action class Thread Safe?
Validation with Model-Aware design.