Announcement Announcement Module
Collapse
No announcement yet.
Use Singletons for BOs and DAOs with Struts? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Use Singletons for BOs and DAOs with Struts?

    Hi, I'm looking for some best practices guidelines when configuring business objects and DAOs with Spring when using Struts. Specifically, should these objects be set as singletons or not as singletons (singleton="false")?

    If you use singletons are there any design issues that one should keep in mind (other than not to use instance variables)?

    Thanks

    Marcus.

  • #2
    Use of singletons is normally best practice. Whether or not you use Struts doesn't really impact the service layer. Spring MVC, like Struts, uses a single shared instance for each Action (called a Controller in Spring MVC).

    Comment

    Working...
    X