-
Feb 6th, 2007, 07:24 AM
#1
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.
-
Feb 6th, 2007, 07:26 AM
#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.
-
Feb 6th, 2007, 07:26 AM
#3
how does this scope thing work?
-
Feb 6th, 2007, 07:28 AM
#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
-
Feb 6th, 2007, 07:29 AM
#5
well, My problem is resolved. thank u very much.
-
Feb 6th, 2007, 07:34 AM
#6
Ok, out of interest.......... what was your problem?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules