Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Where to synchronize Struts 1.1?  RSS feed

 
Picus Ameradeus
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

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.

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?
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What problem are you trying to solve? That is, what events should not happen for two users at the same time? I think when we get the concerns more fully defined we'll find that synchronization is not the answer ... maybe something in the database or regular Java code will do.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!