• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts and Thread Safety

 
Greenhorn
Posts: 20
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

My friend and I have recently developed a website using Stuts 1 and JDBC. We mostly learnt as we went along, and although the website seems to be working perfectly, we know enough now to realise we should be concerned about potential concurrency issues.

The website itself isn't much - it allows users to browse business listings, search for them (basic and advanced search), and allows business owners to log in and add/edit their business listing. It basically has a load of Struts Dispatch Actions with FormBeans that get populated by service classes. The service classes themselves are singletons, although I can't remember why we decided to make them this way -- they don't have any class level variables so I guess these are okay.

The problem is, we want to be 100% certain there aren't going to be concurrency issues once our site gets busier, but we're not really sure where to start. The last time we properly dealt with concurrency problems was during University classes, and they didn't really go into detail about web applications in particular.

So, my questions are...
  • Is thread safety / concurrency going to be a problem for us given our site is made with Struts?
  • If so, where might we encounter problems, and how can we test to ensure everything is okay?
  • Is there some recommending reading you could give me that will explain what we need to know in terms of Struts 1 and concurrency? (finding it hard to find good concise information on the topic that isn't totally baffling me)


  • Thank you very much!
     
    Author
    Posts: 12617
    IntelliJ IDE Ruby
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Why would you develop a new website using Struts 1? That baffling decision aside...

    Aside from the normal concurrency concerns (application-level data, singletons with shared data, etc.) the only other Struts 1-specific thing is that Struts 1 actions are like servlets: there's only one instance per mapping.

    Other than that, nothing unusual.
    reply
      Bookmark Topic Watch Topic
    • New Topic