Results 1 to 2 of 2

Thread: Use Singletons for BOs and DAOs with Struts?

  1. #1
    Join Date
    Jan 2005
    Posts
    3

    Default 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. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    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).
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

Similar Threads

  1. Testing Struts Actions
    By bryanross in forum Container
    Replies: 4
    Last Post: Mar 13th, 2005, 07:54 PM
  2. DAOs with dynamic data source
    By rhasselbaum in forum Data
    Replies: 9
    Last Post: Jan 27th, 2005, 02:37 PM
  3. Combining Hibernate and JDBC DAOs
    By rosco in forum Data
    Replies: 8
    Last Post: Jan 4th, 2005, 01:34 PM
  4. Replies: 10
    Last Post: Nov 2nd, 2004, 09:38 AM
  5. Should Business Objects have References to DAOs?
    By sethladd in forum Architecture
    Replies: 9
    Last Post: Aug 25th, 2004, 01:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •