I am still a little confused about the proper way to architect a struts application. In my application, I am using some "helper beans" in my ActionForms. They are created when my action form is instantiated. The beans also have some behind the scenese JDBC logic going on since they represent my "model."
Currently when certain properties on these beans are set, they update the database behind the scenes. Oh and I also have some db code in the constructors of a few of them. My gut instinct tells me this is wrong. My first concern is that can these properties be set before validate() is called? Because this would allow (or attempt) a db update even if there was a problem! Also, there is the matter of exceptions. What happens if the constructor (which is looking up a list to populate the bean with) fails? I am reusing a single form throughout my application so sometimes there would be db access when the form is created and then passed to the view and sometimes when the form was submitted to a follow-up action that would also use the same form. It seems to me that these beans are only for storing data in memory and passing around. Maybe they shouldn't even have db logic? Or if they did, maybe the place to access it is from the action? Any thoughts? TIA, - sean -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>