Announcement Announcement Module
Collapse
No announcement yet.
I need a new object Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • I need a new object

    Hello guys, =)

    I'm using the applicationContext to get a bean.
    in formBackingObject of a SimpleFormController.

    this.getApplicationContext.getBean("bean");

    in a first flow, I'm receiving it ok. in a second one, the bean is filled with the data of the first flow. I'm not getting a new bean. and I've setted the singleton propertie to false.

    is there something wrong with the ApplicationContext? how does it work? if singleton is false, should I get a new instance in every request "getApplicationContext.getBean("bean");" to the beanFactory?

    thanks in advance.

  • #2
    Can you post the applicationContext.xml and the code you are having problems with. Calls to a bean which is marked as singleton="false" (scope="prototype") will return a new instance.

    Comment


    • #3
      how does this scope thing work?

      Comment


      • #4
        Scope is a 2.0 change, see reference manual. If you are using 1.2 or 2.0 with dtd then singleton="false" is fine.
        http://www.springframework.org/docs/...factory-scopes

        Comment


        • #5
          well, My problem is resolved. thank u very much.

          Comment


          • #6
            Ok, out of interest.......... what was your problem?

            Comment

            Working...
            X