Results 1 to 3 of 3

Thread: Loading Beans in Order

  1. #1
    Join Date
    Mar 2005
    Posts
    2

    Default Loading Beans in Order

    Ok, I'm new to this forum and pretty new to Spring in general. I like it a lot but I have been having a few problems. The biggest one right now is that I want to load my beans in a particular order. I know I can use the "depends" attribute but I have so many beans that I don't want to go in and add a depends for each one just to have to change it later because the order is now switched up.

    Is there some way to order the beans' instantiation? Maybe by putting them in particular order or by creating some sort of "orderBean" that would instantiate in the order I specify? Thanks.
    that bubble is gonna burst quicker than ashlee simpson\'s career

  2. #2
    Join Date
    Mar 2005
    Posts
    2

    Default

    cmon I know one of you spring gurus knows the answer to this one
    that bubble is gonna burst quicker than ashlee simpson\'s career

  3. #3
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    AFAIK, "depends" is the only tag that you can use. Spring offers posibility for lazy loading and including other files which can affect the initialization so I recommend you use this one even though at the beginning it might be difficult because otherwise you can run into subtle problems...

    P.S. I don't pretend to be a Spring guru.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

Similar Threads

  1. Order of Bean definitions matters?
    By cfuser in forum Container
    Replies: 2
    Last Post: Oct 21st, 2005, 10:29 AM
  2. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  3. Replies: 4
    Last Post: Aug 17th, 2005, 04:42 AM
  4. problem loading beans from servlet
    By scottb022563 in forum Container
    Replies: 4
    Last Post: Jul 28th, 2005, 06:36 PM
  5. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM

Posting Permissions

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