PDA

View Full Version : do you usually set sessionForm to true in SimpleFormController?


thurm.zhang
Jun 8th, 2006, 04:33 AM
Hi all,
First of all, please forgive my poor english.

We use SpringMVC in our project, and in SimpleFormController, we usually set sessionForm to true so that we can reuse the command while doing form submission. but what if the user just wants to read the information rather than doing some updates, in such case, the stored commond object is useless and lives until next JVM garbage collection. Will it cause performance impact on system? or did we use SimpleFormController correctly?

any thoughts?

thanks you for any help,
thurm

manifoldronin
Jun 8th, 2006, 11:36 AM
I rarely set sessionForm to true, not only because of what you said - a littered session, also because I then have to always remember to reattach the form object to the hibernate session during subsequent requests. Finally, if you are working on one of those "enterprise"(//grin) projects where web app clustering is implemented, you don't want to stick a lot of objects into the http session.